/* ============================================================
   BUILD 18 — Editorial / Field Notebook Aesthetic
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --green-ink: #0d2818;
  --green-deep: #103626;
  --green-mid: #1c5239;
  --green-leaf: #2a7350;
  --green-grass: #3e9968;
  --green-mint: #b9d6c1;
  --green-pale: #e3eee5;

  --paper: #f0e9d4;
  --paper-warm: #ebe2c7;
  --paper-cool: #f6f1e1;
  --paper-deep: #e2d5b1;
  --bone: #faf6e8;

  --flag-red: #8a3a2c;
  --flag-red-dark: #5e2418;
  --gorse-yellow: #d9b52f;
  --gorse-deep: #a97818;
  --rule-amber: #c89a40;

  /* Single family, varied weights/italics for editorial contrast */
  --serif: 'Barlow', system-ui, sans-serif;
  --sans: 'Barlow', system-ui, sans-serif;
  --cond: 'Barlow Condensed', 'Barlow', sans-serif;

  --line: rgba(13, 40, 24, 0.16);
  --line-soft: rgba(13, 40, 24, 0.08);
  --shadow-card: 0 1px 0 rgba(13, 40, 24, 0.04), 0 6px 18px -8px rgba(13, 40, 24, 0.18);
  --shadow-deep: 0 24px 60px -12px rgba(13, 40, 24, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--sans);
  font-weight: 400;
  background: var(--paper);
  background-image:
    radial-gradient(circle at 25% 15%, rgba(255,255,255,0.4), transparent 55%),
    radial-gradient(circle at 80% 85%, rgba(13,40,24,0.06), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-warm) 100%);
  color: var(--green-ink);
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.005em;
  min-height: 100%;
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 36px; }
@media (max-width: 700px) { .wrap { padding: 0 22px; } }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--green-leaf); color: var(--paper); }

/* ---------- Paper grain overlay ---------- */
.grain {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.05 0 0 0 0 0.16 0 0 0 0 0.09 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- LOADER ---------- */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--green-ink);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
  color: var(--paper);
}
.loader.hide { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-mark { width: 180px; height: 180px; color: var(--paper); margin-bottom: 24px; }
.loader-topo ellipse { animation: topo-pulse 3s ease-in-out infinite; }
.loader-topo ellipse:nth-child(2) { animation-delay: 0.15s; }
.loader-topo ellipse:nth-child(3) { animation-delay: 0.3s; }
.loader-topo ellipse:nth-child(4) { animation-delay: 0.45s; }
.loader-topo ellipse:nth-child(5) { animation-delay: 0.6s; }
.loader-flag { transform-origin: 100px 36px; animation: flag-wave 1.6s ease-in-out infinite; color: var(--flag-red); }
.loader-cup { animation: cup-pulse 2s ease-in-out infinite; transform-origin: 100px 120px; transform-box: fill-box; }

@keyframes topo-pulse { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.5; } }
@keyframes flag-wave { 0%, 100% { transform: scaleX(1) skewY(0); } 50% { transform: scaleX(0.92) skewY(-3deg); } }
@keyframes cup-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.5); } }

.loader-text {
  font-family: var(--cond);
  font-weight: 600;
  letter-spacing: 0.4em;
  font-size: 12px;
  margin-bottom: 16px;
  color: var(--green-mint);
}
.loader-bar { width: 220px; height: 1px; background: rgba(255,255,255,0.15); margin: 0 auto; overflow: hidden; }
.loader-bar-fill { width: 30%; height: 100%; background: var(--paper); animation: barSlide 1.6s ease-in-out infinite; }
@keyframes barSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(240, 233, 212, 0.94);
  backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--green-deep); }
.brand-mark { width: 32px; height: 32px; color: var(--green-deep); flex-shrink: 0; }
.brand-mark path:last-child { color: var(--gorse-yellow); }
.brand-name {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--green-deep);
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}

.nav { display: flex; gap: 28px; }
.nav a {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-deep);
  display: flex; align-items: baseline; gap: 6px;
  transition: color 0.2s;
  position: relative;
}
.nav a .num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 11px;
  color: var(--rule-amber);
  letter-spacing: 0;
}
.nav a:hover { color: var(--flag-red); }
.nav a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--green-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav a:hover::after { transform: scaleX(1); }
@media (max-width: 800px) { .nav { display: none; } }

.btn-share {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-deep);
  color: var(--paper);
  padding: 9px 18px;
  font-family: var(--cond);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.2s;
  border: 1px solid var(--green-deep);
  position: relative;
}
.btn-share::before {
  content: '';
  position: absolute; inset: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}
.btn-share:hover { background: var(--flag-red); border-color: var(--flag-red); transform: translateY(-1px); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 56px 0 64px;
  overflow: hidden;
  color: var(--green-ink);
}
.hero::before {
  content: '';
  position: absolute;
  right: max(18px, calc((100vw - 1240px) / 2));
  top: 28px;
  width: min(310px, 32vw);
  aspect-ratio: 1;
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg width='310' height='310' viewBox='0 0 310 310' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%230d2818' stroke-width='2' stroke-linecap='round' opacity='.75'%3E%3Cpath d='M36 240 C98 190 142 144 180 60'/%3E%3Cpath d='M102 190 C132 168 158 142 182 108'/%3E%3Cpath d='M148 138 C178 128 204 108 228 74'/%3E%3Cpath d='M72 214 L52 198 M96 194 L72 180 M124 168 L100 154 M154 136 L128 124 M184 100 L158 90 M208 82 L188 66'/%3E%3C/g%3E%3Cg fill='%23d9b52f' opacity='.9'%3E%3Cellipse cx='54' cy='198' rx='10' ry='5' transform='rotate(-28 54 198)'/%3E%3Cellipse cx='76' cy='180' rx='11' ry='5' transform='rotate(-24 76 180)'/%3E%3Cellipse cx='104' cy='154' rx='10' ry='5' transform='rotate(-30 104 154)'/%3E%3Cellipse cx='132' cy='124' rx='11' ry='5' transform='rotate(-25 132 124)'/%3E%3Cellipse cx='162' cy='90' rx='10' ry='5' transform='rotate(-22 162 90)'/%3E%3Cellipse cx='190' cy='66' rx='11' ry='5' transform='rotate(-28 190 66)'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}
@media (max-width: 700px) { .hero { padding: 40px 0 50px; } }

/* Augusta 12 illustration — 2-column hero, illustration on the right */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
}
.hero-illo {
  width: 100%;
  height: auto;
  max-height: 700px;
  color: var(--green-mid);
  display: block;
  justify-self: end;
}
@media (max-width: 900px) {
  .hero-illo { max-height: 420px; justify-self: center; }
}
.hero-text { max-width: 56ch; }
.hero-wrap { position: relative; z-index: 2; }

.hero-meta {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(13, 40, 24, 0.55);
  margin-bottom: 18px;
}
.meta-line { flex: 0 0 50px; height: 1px; background: var(--green-mid); opacity: 0.4; }

.hero-h1 {
  font-family: var(--sans);
  font-weight: 200;
  font-size: clamp(48px, 9vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--green-ink);
  max-width: 14ch;
  margin-bottom: 22px;
}
.hero-line-1 {
  font-weight: 800;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.hero-h1 span { display: block; }
.hero-line-2 {
  font-weight: 400;
  margin-left: 0.8ch;
  color: var(--green-leaf);
}
.hero-line-2 em {
  font-style: italic;
  color: var(--flag-red);
  font-weight: 500;
}
.hero-line-1 { animation: rise 0.8s 0.1s ease-out backwards; }
.hero-line-2 { animation: rise 0.8s 0.22s ease-out backwards; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.lede {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  max-width: 56ch;
  color: rgba(13, 40, 24, 0.78);
  margin-bottom: 28px;
  animation: rise 0.8s 0.5s ease-out backwards;
}
.lede strong {
  font-family: var(--cond);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--green-deep);
  font-size: 0.95em;
}

.hero-stats {
  display: flex; align-items: stretch;
  margin-bottom: 28px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  animation: rise 0.8s 0.62s ease-out backwards;
}
.hero-stats::before, .hero-stats::after {
  content: ''; position: absolute; left: 0; right: 0; height: 1px;
  background: var(--line);
}
.hero-stats::before { top: 3px; }
.hero-stats::after { bottom: 3px; }

.stat {
  flex: 0 0 auto; padding: 0 30px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat:first-child { padding-left: 0; }
.stat-label {
  font-family: var(--cond);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(13, 40, 24, 0.5);
}
.stat-val {
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--serif);
  color: var(--green-deep);
}
.stat-val strong {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.stat-val em {
  font-style: italic;
  font-size: 14px;
  color: rgba(13, 40, 24, 0.45);
}
.stat-divider { width: 1px; background: var(--line); }

.hero-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  animation: rise 0.8s 0.74s ease-out backwards;
}

.gorse-field-note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 22px;
  padding-top: 18px;
  max-width: 48ch;
  border-top: 1px solid var(--line);
  animation: rise 0.8s 0.86s ease-out backwards;
}
.gorse-field-note p {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  color: rgba(13, 40, 24, 0.68);
}
.gorse-field-note strong {
  font-family: var(--cond);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-deep);
}
.gorse-sprig {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--bone);
}
.gorse-sprig::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 7px;
  width: 18px;
  height: 20px;
  border-left: 2px solid var(--green-mid);
  border-bottom: 1px solid var(--green-mid);
  transform: rotate(28deg);
}
.gorse-sprig::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 7px;
  width: 19px;
  height: 19px;
  background:
    radial-gradient(ellipse at 35% 28%, var(--gorse-yellow) 0 19%, transparent 20%),
    radial-gradient(ellipse at 68% 42%, var(--gorse-yellow) 0 18%, transparent 19%),
    radial-gradient(ellipse at 45% 72%, var(--gorse-yellow) 0 17%, transparent 18%);
}

.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px;
  font-family: var(--cond);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: all 0.2s;
  position: relative;
}
.btn-primary {
  background: var(--green-deep);
  color: var(--paper);
  border: 1px solid var(--green-deep);
}
.btn-primary::before {
  content: ''; position: absolute; inset: 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
  transition: inset 0.2s;
}
.btn-primary:hover {
  background: var(--green-mid);
  border-color: var(--green-mid);
  transform: translateY(-1px);
}
.btn-primary:hover::before { inset: 4px; }

.btn-ghost {
  background: transparent;
  color: var(--green-deep);
  border: 1px solid var(--green-deep);
}
.btn-ghost:hover { background: var(--green-deep); color: var(--paper); }
.btn-ghost.btn-quiet {
  border-color: rgba(13, 40, 24, 0.25);
  color: rgba(13, 40, 24, 0.55);
}
.btn-ghost.btn-quiet:hover { background: transparent; color: var(--flag-red); border-color: var(--flag-red); }

.tear-edge {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 10px;
  color: var(--paper-deep);
  display: block;
  z-index: 1;
}

/* ---------- SECTION HEADS ---------- */
.section-head { margin-bottom: 28px; position: relative; }
.section-num {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  color: var(--rule-amber);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.section-h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--green-ink);
  margin-bottom: 8px;
}
.section-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: rgba(13, 40, 24, 0.65);
  max-width: 60ch;
}
.yard-rule {
  border: none;
  height: 1px;
  background: var(--line);
  margin-top: 18px;
  position: relative;
}
.yard-rule::before {
  content: '';
  position: absolute; left: 0; top: -3px;
  width: 60px; height: 7px;
  background: var(--green-deep);
}

/* ---------- SCORECARD SECTION ---------- */
.course-section {
  padding: 60px 0 70px;
  position: relative;
}
.course-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--line);
}

/* Rules Panel */
.rules-panel {
  background: var(--bone);
  border: 1px solid var(--line);
  padding: 22px 28px;
  margin-bottom: 22px;
  position: relative;
}
.rules-panel::before {
  content: 'House Rules';
  position: absolute; top: -9px; left: 24px;
  background: var(--paper);
  padding: 0 10px;
  font-family: var(--cond);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--green-deep);
}
.rules-row {
  display: flex; gap: 36px;
  align-items: center; flex-wrap: wrap;
}
.rule-group { display: flex; flex-direction: column; gap: 10px; }
.rule-group-tip { flex: 1; min-width: 220px; }
.rule-label {
  font-family: var(--cond);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(13, 40, 24, 0.55);
}
.rule-pills { display: flex; gap: 0; }
.pill {
  padding: 9px 16px;
  background: var(--paper-cool);
  border: 1px solid var(--line);
  border-right: none;
  font-family: var(--cond);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--green-deep);
}
.pill:last-child { border-right: 1px solid var(--line); }
.pill:hover { background: var(--paper-warm); }
.pill.active { background: var(--green-deep); color: var(--paper); border-color: var(--green-deep); }

.toggle { display: flex; align-items: center; gap: 12px; padding: 0; }
.toggle-track {
  width: 48px; height: 26px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  position: relative;
  transition: background 0.2s;
}
.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s;
}
.toggle[data-on="true"] .toggle-track { background: var(--green-leaf); border-color: var(--green-leaf); }
.toggle[data-on="true"] .toggle-thumb { transform: translateX(22px); }
.toggle-text {
  font-family: var(--cond);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-deep);
  min-width: 28px;
}
.rule-tip {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: rgba(13, 40, 24, 0.55);
  line-height: 1.5;
}

/* Conflict banner */
.conflict-banner {
  background: var(--flag-red);
  background-image:
    repeating-linear-gradient(135deg, rgba(0,0,0,0) 0, rgba(0,0,0,0) 20px, rgba(0,0,0,0.06) 20px, rgba(0,0,0,0.06) 21px);
  color: var(--paper);
  padding: 14px 22px;
  margin-bottom: 18px;
  font-family: var(--cond);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--flag-red-dark);
}
.conflict-banner strong {
  color: var(--paper);
  margin-right: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  font-weight: 600;
}

/* SCORECARD GRID */
.scorecard {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0;
  background: var(--green-deep);
  padding: 1px;
  border: 1px solid var(--green-deep);
  position: relative;
  box-shadow: var(--shadow-card);
}
@media (max-width: 900px) { .scorecard { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 600px) { .scorecard { grid-template-columns: repeat(3, 1fr); } }

.slot {
  aspect-ratio: 4/5;
  background: var(--bone);
  background-image: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 30%, transparent 70%, rgba(13,40,24,0.04) 100%);
  padding: 14px 12px;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  margin: 1px;
  overflow: hidden;
}
.slot::after {
  content: '';
  position: absolute; inset: 4px;
  border: 1px dashed transparent;
  pointer-events: none;
  transition: border-color 0.2s;
}
.slot:hover::after { border-color: rgba(13, 40, 24, 0.2); }
.slot:not(.filled):hover { background: var(--paper-cool); }

/* Drag-and-drop feedback */
.slot.drag-over::after {
  border: 2px dashed var(--rule-amber) !important;
  inset: 2px;
}
.slot.drag-over {
  background-color: var(--paper-warm);
}
.slot.filled.drag-over {
  background-color: var(--green-mid);
}
.slot.dragging { opacity: 0.45; }
.hole-row[draggable="true"] { cursor: grab; }
.hole-row[draggable="true"]:active { cursor: grabbing; }
.hole-row.dragging { opacity: 0.5; }

.slot.filled {
  background: var(--bone);
  color: var(--green-ink);
}
.slot.filled::after { border-color: rgba(13, 40, 24, 0.1); }
.slot.filled:hover { background-color: var(--paper-cool); }

.slot-num {
  font-family: var(--cond);
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(13, 40, 24, 0.5);
  margin-bottom: auto;
  display: flex; align-items: center; gap: 6px;
}
.slot.filled .slot-num { color: var(--green-deep); }

.slot-empty {
  display: flex; align-items: center; justify-content: center;
  flex: 1;
  color: rgba(13, 40, 24, 0.18);
  font-family: var(--sans);
  font-size: 54px;
  font-weight: 200;
}
.slot.filled .slot-empty { display: none; }
.slot-content { display: none; }
.slot.filled .slot-content {
  display: flex; flex-direction: column; gap: 3px;
  flex: 1; justify-content: flex-end;
}
.slot-course {
  font-family: var(--cond);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
  line-height: 1.2;
  margin-bottom: 4px;
}
.slot-hole {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.slot-meta {
  font-family: var(--cond);
  font-style: italic;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.06em;
  opacity: 0.55;
  margin-top: 2px;
}

.slot-remove {
  position: absolute; top: 8px; right: 8px;
  width: 20px; height: 20px;
  display: none;
  align-items: center; justify-content: center;
  color: var(--paper);
  font-size: 14px;
  z-index: 2;
  background: rgba(255,255,255,0.1);
  font-family: var(--sans);
}
.slot.filled:hover .slot-remove { display: flex; }
.slot-remove:hover { background: var(--flag-red); }

.slot-note-btn {
  margin-top: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--paper);
  font-family: var(--cond);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  text-align: center;
  transition: background 0.15s;
  border-top: 1px dashed rgba(250, 246, 232, 0.15);
  padding-top: 8px;
}
.slot-note-btn:hover { background: rgba(255,255,255,0.16); }

/* Conflict slot */
.slot.conflict.filled {
  background: var(--flag-red-dark);
  background-image: repeating-linear-gradient(135deg, transparent 0, transparent 14px, rgba(0,0,0,0.12) 14px, rgba(0,0,0,0.12) 15px);
}
.conflict-badge {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--flag-red);
  color: var(--paper);
  font-family: var(--serif);
  font-style: italic;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}
.slot-note-icon {
  margin-left: auto;
  font-size: 10px;
  color: rgba(250, 246, 232, 0.6);
  font-style: italic;
}

/* ---------- ANALYTICS ---------- */
.analytics {
  margin-top: 32px;
  background: var(--bone);
  border: 1px solid var(--line);
  padding: 28px 30px;
  position: relative;
}
.analytics::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--green-deep) 0, var(--green-deep) 30%, var(--rule-amber) 30%, var(--rule-amber) 35%, var(--green-deep) 35%);
}
.analytics-head { margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ana-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  color: var(--green-ink);
  letter-spacing: -0.01em;
}
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  border-left: 1px solid var(--line-soft);
}
.ana-card {
  padding: 16px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 5px;
}
.ana-label {
  font-family: var(--cond);
  font-size: 13px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(13, 40, 24, 0.55);
}
.ana-value {
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 800;
  color: var(--green-ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.ana-sub {
  font-family: var(--cond);
  font-size: 14px;
  color: rgba(13, 40, 24, 0.65);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.builder-grid .ana-card { padding: 18px 18px; gap: 8px; }
.builder-grid .ana-value { font-size: 32px; }

/* ---------- LIBRARY ---------- */
.library-section {
  padding: 100px 0 110px;
  background: var(--green-ink);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(62, 153, 104, 0.1), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(62, 153, 104, 0.08), transparent 65%);
  color: var(--paper);
  position: relative;
}
.section-head-light .section-h2 { color: var(--paper); }
.section-head-light .section-sub { color: rgba(250, 246, 232, 0.7); }
.section-head-light .section-num { color: var(--rule-amber); }
.section-head-light .yard-rule { background: rgba(250, 246, 232, 0.18); }
.section-head-light .yard-rule::before { background: var(--rule-amber); }

.filters {
  display: flex; gap: 20px; align-items: center;
  margin-bottom: 28px; flex-wrap: wrap;
}
.search-wrap {
  flex: 1; min-width: 280px;
  position: relative;
}
.search-icon {
  position: absolute;
  left: 18px; top: 50%; transform: translateY(-50%);
  color: rgba(250, 246, 232, 0.5);
}
#searchInput, #pickerSearch {
  width: 100%;
  padding: 14px 22px 14px 44px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(250, 246, 232, 0.2);
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  color: var(--paper);
  transition: border-color 0.2s, background 0.2s;
}
#searchInput::placeholder { color: rgba(250, 246, 232, 0.4); }
#searchInput:focus { outline: none; border-color: var(--rule-amber); background: rgba(255, 255, 255, 0.1); }

.search-count {
  font-family: var(--cond);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(250, 246, 232, 0.6);
  white-space: nowrap;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
  border-top: 1px solid rgba(250, 246, 232, 0.14);
  border-left: 1px solid rgba(250, 246, 232, 0.14);
}
.course-tile {
  background: transparent;
  padding: 22px 24px;
  border-right: 1px solid rgba(250, 246, 232, 0.14);
  border-bottom: 1px solid rgba(250, 246, 232, 0.14);
  cursor: pointer;
  transition: all 0.18s;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  overflow: hidden;
  color: var(--paper);
  min-height: 140px;
}
.course-tile::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
}
.course-tile::after {
  content: '';
  position: absolute; top: 16px; right: 16px;
  width: 14px; height: 14px;
  background-image: linear-gradient(45deg, transparent 49%, var(--paper) 49%, var(--paper) 51%, transparent 51%);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}
.course-tile:hover { background: rgba(255, 255, 255, 0.04); z-index: 1; }
.course-tile:hover::before { opacity: 1; }
.course-tile:hover::after { opacity: 0.4; transform: translate(2px, -2px); }

.ct-name,
.ct-stats,
.ct-bottom {
  position: relative;
  z-index: 2;
}

.ct-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--paper);
}
.ct-stats {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 246, 232, 0.7);
}
.ct-stats strong { color: var(--rule-amber); font-weight: 700; }
.ct-stats .dot { width: 3px; height: 3px; background: rgba(250, 246, 232, 0.4); border-radius: 50%; }
.ct-cta {
  margin-top: auto;
  font-family: var(--cond);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: rgba(250, 246, 232, 0.55);
  text-transform: uppercase;
  padding-top: 10px;
  display: flex; align-items: center; gap: 6px;
}
.ct-cta::before { content: ''; width: 12px; height: 1px; background: rgba(250, 246, 232, 0.4); }

.load-more-wrap { margin-top: 36px; display: flex; justify-content: center; }
.library-section .btn-ghost {
  color: var(--paper);
  border-color: rgba(250, 246, 232, 0.4);
}
.library-section .btn-ghost:hover { background: var(--paper); color: var(--green-deep); border-color: var(--paper); }

.empty-state {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: rgba(250, 246, 232, 0.6);
  padding: 60px;
  text-align: center;
  grid-column: 1 / -1;
}
.empty-state strong { color: var(--rule-amber); font-style: normal; font-family: var(--cond); }

/* ---------- ABOUT ---------- */
.about { padding: 80px 0; background: var(--paper-warm); }
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 70px;
  align-items: start;
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; gap: 36px; } }
.about-lede {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  color: var(--green-deep);
  margin-bottom: 22px;
  max-width: 22ch;
}
.about-col p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: rgba(13, 40, 24, 0.78);
}
.about-col-side { padding-top: 12px; }
.about-label {
  display: block;
  font-family: var(--cond);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rule-amber);
  margin-bottom: 6px;
  margin-top: 18px;
}
.about-meta {
  font-family: var(--serif);
  font-size: 15px !important;
  line-height: 1.5 !important;
  color: var(--green-deep) !important;
  font-style: italic;
}

/* ---------- MODALS ---------- */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(13, 40, 24, 0.7);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}
.modal-panel {
  position: relative;
  background: var(--bone);
  padding: 36px 40px;
  max-width: 580px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-deep);
  border: 1px solid var(--green-deep);
  animation: popIn 0.3s ease;
}
.modal-panel-wide { max-width: 760px; }
.modal-panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--green-deep);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-eyebrow {
  display: inline-block;
  font-family: var(--cond);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rule-amber);
  margin-bottom: 8px;
}
.modal-title, .modal-panel h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 36px;
  color: var(--green-ink);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.modal-panel p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(13, 40, 24, 0.7);
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 300;
  color: rgba(13, 40, 24, 0.5);
  transition: color 0.15s;
}
.modal-close:hover { color: var(--flag-red); }

.course-summary {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 0 14px;
  font-family: var(--cond);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(13, 40, 24, 0.65);
}
.course-summary strong { color: var(--green-deep); font-size: 13px; }
.course-summary .dot { width: 3px; height: 3px; background: var(--line); border-radius: 50%; }
.course-help {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: rgba(13, 40, 24, 0.6);
  margin-bottom: 24px;
  line-height: 1.5;
}
.course-help strong {
  font-family: var(--cond);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--green-deep);
}

.hole-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
@media (max-width: 600px) { .hole-list { grid-template-columns: 1fr; } }
.hole-row {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-cool);
  transition: background 0.15s;
}
.hole-row:hover { background: var(--paper); }
.hole-row.in-card { background: var(--green-deep); color: var(--paper); }

.hole-row-main {
  display: grid;
  grid-template-columns: auto 60px 1fr auto;
  gap: 12px;
  align-items: center;
}
.hole-row-n {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--green-ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.hole-row.in-card .hole-row-n { color: var(--rule-amber); }
.hole-row-par {
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-deep);
}
.hole-row.in-card .hole-row-par { color: var(--green-mint); }
.hole-row-y {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: rgba(13, 40, 24, 0.7);
}
.hole-row.in-card .hole-row-y { color: rgba(250, 246, 232, 0.75); }
.hole-tag {
  font-family: var(--cond);
  font-style: normal;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(13, 40, 24, 0.4);
  margin-left: 6px;
}
.hole-row.in-card .hole-tag { color: rgba(250, 246, 232, 0.5); }

.hole-add {
  background: var(--green-deep);
  color: var(--paper);
  padding: 6px 14px;
  font-family: var(--cond);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.15s;
  border: 1px solid var(--green-deep);
}
.hole-add:hover { background: var(--flag-red); border-color: var(--flag-red); }
.will-conflict {
  background: var(--paper-cool) !important;
  color: var(--flag-red) !important;
  border-color: var(--flag-red) !important;
}
.will-conflict:hover {
  background: var(--flag-red) !important;
  color: var(--paper) !important;
}
.hole-badge {
  display: inline-block;
  background: var(--rule-amber);
  color: var(--green-ink);
  padding: 4px 10px;
  font-family: var(--cond);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hole-row.in-card .hole-badge { background: var(--paper); color: var(--green-deep); }

.hole-desc {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(13, 40, 24, 0.65);
  padding: 6px 0 0 4px;
  margin-top: 4px;
  border-top: 1px dotted rgba(13, 40, 24, 0.2);
}
.hole-row.in-card .hole-desc {
  color: rgba(250, 246, 232, 0.75);
  border-top-color: rgba(250, 246, 232, 0.2);
}

#noteText, #shareUrl {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  background: var(--paper);
  margin: 8px 0 18px;
  resize: vertical;
  color: var(--green-ink);
}
#noteText { min-height: 110px; }
#shareUrl {
  font-style: normal;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0;
  min-height: 140px;
}
#noteText:focus, #shareUrl:focus { outline: none; border-color: var(--rule-amber); }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--green-ink);
  color: var(--paper);
  padding: 28px 0;
  border-top: 4px solid var(--rule-amber);
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.footer-mark { color: var(--rule-amber); }
.footer-mark svg { width: 36px; height: 36px; }
.footer-text {
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(250, 246, 232, 0.7);
}
.footer-text-right { text-align: right; }

@media (max-width: 700px) {
  .hero-stats { gap: 0; padding: 14px 0; flex-wrap: wrap; }
  .stat { padding: 8px 18px 8px 0; }
  .stat-divider { display: none; }
  .modal-panel { padding: 28px 24px; }
  .modal-title { font-size: 28px; }
  .about-lede { font-size: 22px; }
  .footer-text-right { display: none; }
  .site-footer .wrap { grid-template-columns: auto 1fr; }
  .rules-row { gap: 18px; }
}

/* Target slot banner — pinned above library */
.target-banner {
  background: var(--rule-amber);
  color: var(--green-ink);
  padding: 14px 22px;
  font-family: var(--cond);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--green-deep);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 64px;
  z-index: 50;
}
.target-banner strong {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.18em;
  margin-right: 4px;
}
.target-cancel {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 14px;
  background: var(--green-deep);
  color: var(--paper);
  border: 1px solid var(--green-deep);
  cursor: pointer;
}
.target-cancel:hover { background: var(--flag-red); border-color: var(--flag-red); }

/* Card stats — moved from hero to above the scorecard */
.card-stats {
  display: flex; align-items: stretch;
  margin-bottom: 18px;
  padding: 16px 22px;
  background: var(--bone);
  border: 1px solid var(--line);
  position: relative;
}
.card-stats .stat:first-child { padding-left: 0; }

/* Clear card action — placed near the scorecard */
.card-actions {
  margin-bottom: 14px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-tagline {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(16px, 2vw, 22px);
  letter-spacing: 0;
  color: var(--gorse-deep);
  margin: -12px 0 18px;
  text-transform: uppercase;
}

/* Cleaner hero h1 — single direct statement */
.hero-h1-alt {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(42px, 6.8vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
  color: var(--green-ink);
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: rise 0.8s 0.1s ease-out backwards;
}


/* ---------- Vertical builder: 18 tiles stacked top-to-bottom; tile content horizontal ---------- */
.scorecard.draft {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}
.scorecard.draft .slot {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 18px;
  padding: 14px 22px;
  margin: 0;
  border: 1px solid var(--line);
  border-bottom: none;
  background: var(--bone);
  background-image: none;
  aspect-ratio: auto;
  min-height: 60px;
  text-align: left;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
.scorecard.draft .slot:last-child { border-bottom: 1px solid var(--line); }
.scorecard.draft .slot::after { display: none; }
.scorecard.draft .slot:not(.filled):hover { background: var(--paper-cool); }
.scorecard.draft .slot.filled {
  background: var(--bone);
  color: var(--green-ink);
  border-color: var(--green-deep);
  border-width: 2px;
  box-shadow: inset 5px 0 0 var(--green-deep);
}
.scorecard.draft .slot.filled:hover { background: var(--paper-cool); }
.scorecard.draft .slot.filled .slot-num { color: var(--green-deep); }
.scorecard.draft .slot.filled .slot-class { color: rgba(13,40,24,0.6); }
.scorecard.draft .slot.filled .slot-orig { color: var(--rule-amber); }
.scorecard.draft .slot.filled .slot-remove { color: var(--green-deep); opacity: 0.5; }
.scorecard.draft .slot.filled .slot-note-btn {
  background: var(--green-deep);
  color: var(--paper);
}
.scorecard.draft .slot.filled .cand-list {
  background: var(--paper-cool);
  border-top-color: var(--line);
  color: var(--green-ink);
}
.scorecard.draft .slot.filled .cand-row {
  background: var(--bone);
  border-color: var(--line);
  color: var(--green-ink);
}
.scorecard.draft .slot.filled .cand-tag { background: rgba(13,40,24,0.1); color: rgba(13,40,24,0.7); }
.scorecard.draft .slot.filled .cand-row.primary .cand-tag { background: var(--rule-amber); color: var(--green-ink); }
.scorecard.draft .slot.filled .cand-add { color: var(--green-deep); border-color: var(--line); }
.scorecard.draft .slot.filled .cand-add:hover { border-color: var(--rule-amber); color: var(--flag-red); }

.scorecard.draft .slot-num {
  font-family: var(--cond);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(13, 40, 24, 0.55);
  white-space: nowrap;
  flex: 0 0 92px;
  display: inline-flex; align-items: center; gap: 6px;
}
.scorecard.draft .slot.filled .slot-num { color: var(--green-deep); }

.scorecard.draft .slot-sep { display: none; }

.scorecard.draft .slot-empty {
  font-family: var(--cond);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(13, 40, 24, 0.35);
  flex: 1;
  text-align: left;
  display: block;
}

.scorecard.draft .slot-course {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.005em;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  text-transform: none;
  color: inherit;
}
.scorecard.draft .slot-orig {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--rule-amber);
  margin-left: 6px;
}

.scorecard.draft .slot-par,
.scorecard.draft .slot-yds {
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-flex; align-items: baseline; gap: 5px;
  flex: 0 0 auto;
}
.scorecard.draft .slot-par .lbl,
.scorecard.draft .slot-yds .lbl { opacity: 0.55; }
.scorecard.draft .slot-par strong {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.scorecard.draft .slot-yds strong {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.scorecard.draft .slot-class {
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(13, 40, 24, 0.5);
  white-space: nowrap;
  flex: 0 0 auto;
}
.scorecard.draft .slot.filled .slot-class { color: rgba(250, 246, 232, 0.55); }

.scorecard.draft .slot-note-btn {
  font-family: var(--cond);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.08);
  color: var(--paper);
  padding: 5px 10px;
  flex: 0 0 auto;
  border: none;
  margin: 0;
}
.scorecard.draft .slot:not(.filled) .slot-note-btn { display: none; }
.scorecard.draft .slot-note-btn:hover { background: rgba(255,255,255,0.18); }

.scorecard.draft .slot-remove {
  position: static;
  display: flex;
  background: transparent;
  color: var(--paper);
  opacity: 0.5;
  width: 22px; height: 22px;
  font-size: 18px;
  flex: 0 0 auto;
}
.scorecard.draft .slot.filled:hover .slot-remove { opacity: 1; }

@media (max-width: 1100px) { .scorecard.draft .slot-class { display: none; } }
@media (max-width: 800px) { .scorecard.draft .slot-orig { display: none; } .scorecard.draft .slot-num { flex-basis: 70px; font-size: 12px; } }

/* Builder grid wrapper (sticky analytics sidebar) */
.builder-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 1000px) {
  .builder-grid { grid-template-columns: 1fr; }
}
.builder-grid .scorecard { min-width: 0; }
.builder-grid .analytics {
  position: sticky;
  top: 88px;
  margin-top: 0;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.builder-grid .analytics-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 1000px) { .builder-grid .analytics { position: static; max-height: none; } }

/* Expandable hole tile — primary row + candidate drafts panel */
.scorecard.draft .slot { flex-direction: column; align-items: stretch; padding: 0; }
.scorecard.draft .slot-row {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 22px;
  width: 100%;
  cursor: pointer;
}
.scorecard.draft .slot.expanded { background: var(--paper-cool); }
.scorecard.draft .slot.expanded.filled { background: var(--paper-cool); }

.cand-badge {
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--rule-amber);
  color: var(--green-ink);
  padding: 3px 8px;
  flex: 0 0 auto;
}

.cand-list {
  display: flex; flex-direction: column;
  background: var(--paper-cool);
  border-top: 1px solid var(--line);
  padding: 10px 22px 14px;
  gap: 6px;
}
.scorecard.draft .slot.filled .cand-list {
  background: rgba(0, 0, 0, 0.2);
  border-top-color: rgba(255,255,255,0.15);
  color: var(--paper);
}
.cand-row {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 14px;
  background: var(--bone);
  border: 1px solid var(--line);
  font-size: 14px;
}
.scorecard.draft .slot.filled .cand-row {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: var(--paper);
}
.cand-row.primary {
  border-color: var(--rule-amber);
  border-width: 1.5px;
}
.cand-tag {
  font-family: var(--cond);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  padding: 3px 7px;
  background: rgba(13, 40, 24, 0.1);
  color: rgba(13, 40, 24, 0.7);
  flex: 0 0 70px;
  text-align: center;
}
.cand-row.primary .cand-tag { background: var(--rule-amber); color: var(--green-ink); }
.scorecard.draft .slot.filled .cand-tag { background: rgba(255,255,255,0.1); color: var(--paper); }
.cand-course {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cand-par, .cand-yds {
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  flex: 0 0 auto;
}
.cand-par strong, .cand-yds strong {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 800;
  margin-right: 4px;
}
.cand-class {
  font-family: var(--cond);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.6;
  flex: 0 0 auto;
}
.cand-promote {
  font-family: var(--cond);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--green-deep);
  color: var(--paper);
  padding: 5px 10px;
  border: 1px solid var(--green-deep);
}
.cand-promote:hover { background: var(--flag-red); border-color: var(--flag-red); }
.cand-remove {
  width: 22px; height: 22px;
  font-size: 16px;
  opacity: 0.55;
  flex: 0 0 auto;
}
.cand-remove:hover { opacity: 1; color: var(--flag-red); }
.cand-add {
  margin-top: 6px;
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: transparent;
  color: var(--green-deep);
  border: 1.5px dashed var(--line);
  padding: 10px 14px;
  cursor: pointer;
  text-align: center;
}
.cand-add:hover { border-color: var(--rule-amber); color: var(--flag-red); }
.scorecard.draft .slot.filled .cand-add { color: var(--paper); border-color: rgba(255,255,255,0.25); }
.scorecard.draft .slot.filled .cand-add:hover { border-color: var(--rule-amber); color: var(--rule-amber); }
.cand-empty {
  font-family: var(--cond);
  font-style: italic;
  color: rgba(13, 40, 24, 0.5);
  text-align: center;
  padding: 12px;
}

/* Make rules panel labels and toggles bigger / clearer */
.rules-panel { padding: 26px 32px; }
.rules-panel::before { font-size: 12px; padding: 2px 12px; top: -10px; }
.rule-label { font-size: 13px; letter-spacing: 0.16em; color: rgba(13, 40, 24, 0.75); }
.pill { padding: 11px 18px; font-size: 14px; letter-spacing: 0.1em; }
.toggle-text { font-size: 14px; }
.toggle-track { width: 56px; height: 30px; }
.toggle-thumb { width: 24px; height: 24px; }
.toggle[data-on="true"] .toggle-thumb { transform: translateX(26px); }
.rule-tip { font-size: 14px; line-height: 1.55; color: rgba(13, 40, 24, 0.7); font-style: normal; }

#heroIllo { transition: opacity 0.45s ease; }

/* New Reading the Card layout — sectioned: Front 9, Back 9, Par Distribution, Vibe */
.builder-grid .analytics-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: none;
}
.ana-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.ana-section:last-child { border-bottom: none; }
.ana-section-label {
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rule-amber);
  margin-bottom: 12px;
}
.ana-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ana-stat { display: flex; flex-direction: column; gap: 4px; }
.ana-stat .ana-label {
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(13, 40, 24, 0.55);
}
.ana-stat .ana-value {
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 800;
  color: var(--green-ink);
  letter-spacing: -0.02em;
  line-height: 1;
  border: none;
  padding: 0;
}
.ana-stat .ana-value-sm {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 800;
  color: var(--green-ink);
  letter-spacing: -0.005em;
  line-height: 1;
}
.ana-stat .ana-value-sm em {
  font-family: var(--cond);
  font-style: normal;
  font-weight: 600;
  font-size: 13px;
  color: rgba(13, 40, 24, 0.55);
  letter-spacing: 0.06em;
  margin-left: 4px;
}
.ana-pars { display: flex; flex-direction: column; gap: 8px; }
.ana-par-row {
  display: grid;
  grid-template-columns: 60px auto 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bone);
  border-left: 3px solid var(--green-deep);
}
.ana-par-tag {
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--green-deep);
}
.ana-par-row strong {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--green-ink);
}
.ana-par-sub {
  font-family: var(--cond);
  font-size: 12px;
  font-weight: 700;
  color: rgba(13, 40, 24, 0.6);
  letter-spacing: 0.04em;
  text-align: right;
}
.ana-par-sub em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(13, 40, 24, 0.45);
  margin-left: 4px;
}

/* Hide old per-card styles inside the new sectioned analytics */
.builder-grid .ana-card { display: none; }

/* ---------- View toggle pills (Build / Add courses) ---------- */
.view-pills {
  display: inline-flex;
  margin: 14px 0 6px;
}
.view-pills .pill { padding: 10px 22px; font-size: 13px; }

/* ---------- Played-courses view ---------- */
.played-view {
  background: var(--paper-cool);
  border: 1px dashed var(--line);
  padding: 28px 32px;
  margin-top: 24px;
  position: relative;
}
.played-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.played-title {
  font-family: var(--cond);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin: 0;
}
.played-sub {
  font-family: var(--cond);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(13, 40, 24, 0.6);
  margin: 0;
}
.played-sub strong { color: var(--green-deep); font-size: 14px; }
.played-search-wrap {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
  display: flex; align-items: center;
  padding: 0 14px;
}
.played-search-wrap .search-icon {
  color: rgba(13, 40, 24, 0.5);
  margin-right: 10px;
}
.played-search-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 0;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--green-deep);
  outline: none;
}
.played-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0;
  margin-top: 12px;
}
.played-search-results:empty { margin-top: 0; }
.played-result {
  border: 1px solid var(--line);
  border-bottom: none;
  padding: 12px 16px;
  background: var(--paper);
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.12s;
}
.played-result:last-child { border-bottom: 1px solid var(--line); }
.played-result:hover { background: var(--paper-warm); }
.played-result-name {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--green-deep);
}
.played-result-stats {
  font-family: var(--cond);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(13, 40, 24, 0.55);
}
.played-result.added .played-result-stats { color: var(--green-leaf); }

.played-list {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.played-list:empty { display: none; }
.played-card {
  border: 1px solid var(--line);
  border-top: none;
  border-left: none;
  padding: 16px 18px;
  background: var(--paper);
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
.played-card:first-child { border-left: 1px solid var(--line); }
.played-card-name {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.05em;
  color: var(--green-deep);
  padding-right: 28px;
}
.played-card-stats {
  font-family: var(--cond);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(13, 40, 24, 0.6);
}
.played-card-remove {
  position: absolute;
  top: 10px; right: 10px;
  width: 22px; height: 22px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: rgba(13, 40, 24, 0.55);
  transition: all 0.12s;
}
.played-card-remove:hover { color: var(--flag-red); border-color: var(--flag-red); }
.played-empty {
  font-family: var(--serif);
  font-style: italic;
  color: rgba(13, 40, 24, 0.55);
  padding: 16px 0;
  text-align: center;
}

/* ---------- Library scope pills + rule note ---------- */
.lib-scope-pills { margin-left: 12px; }
.lib-scope-pills .pill { padding: 9px 14px; font-size: 12px; }
.lib-rule-note {
  font-family: var(--cond);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-warm);
  background: rgba(255,255,255,0.06);
  border-left: 2px solid var(--rule-amber);
  padding: 8px 14px;
  margin: 0 0 16px;
}

/* Course tile: bottom row with CTA + bank toggle */
.ct-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; }
.ct-bank-btn {
  font-family: var(--cond);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid rgba(250, 246, 232, 0.3);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: all 0.15s;
}
.ct-bank-btn.add:hover { background: var(--rule-amber); color: var(--green-ink); border-color: var(--rule-amber); }
.ct-bank-btn.in-bank { background: var(--rule-amber); color: var(--green-ink); border-color: var(--rule-amber); }
.ct-bank-btn.in-bank:hover { background: var(--flag-red); color: var(--paper); border-color: var(--flag-red); }

/* Shared card banner */
.shared-card-banner {
  background: var(--rule-amber);
  color: var(--green-ink);
  padding: 12px 28px;
  font-family: var(--cond);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  border-bottom: 2px solid var(--green-deep);
}
.shared-card-banner strong { font-family: var(--sans); font-weight: 800; letter-spacing: 0.04em; font-size: 13px; }
.shared-card-banner button {
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--green-deep);
  color: var(--paper);
  padding: 6px 14px;
  border: 1px solid var(--green-deep);
  cursor: pointer;
}
.shared-card-banner button:hover { background: var(--flag-red); border-color: var(--flag-red); }
