/* Simply Golf: the game's paper, ink, club green and brass. */

@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/BarlowCondensed-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/BarlowCondensed-Bold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url("fonts/BarlowCondensed-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 400 700; font-display: swap; src: url("fonts/Caveat.woff2") format("woff2"); }

:root {
  --paper: #FBF5E4;
  --paper-shade: #F1E6C9;
  --paper-edge: #D9C99F;
  --ink: #22302A;
  --ink-soft: #5C6960;
  --rule: #A9CDB4;
  --club: #1F6B45;
  --club-dark: #123F29;
  --club-light: #2F8A5A;
  --brass: #D8B05A;
  --brass-dark: #9A7630;
  --pencil: #34384A;
  --red: #EE6A5E;
  --stamp: #C2402F;
  --sky: #9EE3F8;
  --sky-high: #6CC6EE;
  --dirt: #7A3428;
  --dirt-2: #8A4332;
  --dirt-3: #6A2C22;
  --grass: #4EA843;
  --grass-hi: #7EE05A;

  --body: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.45;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--club); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--club-light); }

:focus-visible { outline: 3px solid var(--brass-dark); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--club); color: var(--paper); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- Hero: one golf hole ---------- */

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  min-height: min(92svh, 860px);
  background: linear-gradient(var(--sky-high), var(--sky) 70%);
  overflow: hidden;
  isolation: isolate;
}

.hero .scene {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
}

.sign {
  position: relative;
  margin: 0 auto;
  top: clamp(56px, 9vh, 96px);
  width: min(640px, calc(100% - 32px));
  padding: 18px 24px 20px;
  background: var(--club);
  border: 3px solid var(--brass);
  border-radius: 14px;
  box-shadow: 0 6px 0 var(--club-dark), 0 16px 30px rgba(18, 63, 41, .25);
  color: var(--paper);
  text-align: center;
}

.sign .hole {
  margin: 0;
  color: var(--brass);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sign h1 {
  margin: 2px 0 0;
  font-weight: 800;
  font-size: clamp(3.2rem, 11vw, 6.2rem);
  line-height: .9;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.sign .wind {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  margin: 10px 0 0;
  color: var(--brass);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.sign .wind svg { width: 54px; height: 14px; }

.sign .tagline {
  margin: 6px 0 0;
  font-family: var(--hand);
  font-weight: 600;
  font-size: clamp(1.5rem, 4.4vw, 2.1rem);
  line-height: 1.1;
  color: var(--paper);
}

/* Player cards, as in the corners of the game screen */
.card {
  position: absolute;
  top: 18px;
  display: flex;
  min-width: 96px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 5px 0 rgba(34, 48, 42, .35);
  overflow: hidden;
  text-align: center;
  font-size: 1rem;
}
.card::before { content: ""; width: 14px; background: var(--chip); }
.card div { flex: 1; padding: 4px 14px 2px 10px; }
.card b { display: block; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); font-size: .9rem; }
.card output { display: block; font-weight: 800; font-size: 2.1rem; line-height: 1; }
.card.p1 { left: 16px; --chip: var(--red); transform: rotate(-3deg); }
.card.p2 { right: 16px; --chip: #4FA9E0; transform: rotate(2deg); }
.card output.bump { animation: bump .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.6); } 100% { transform: scale(1); } }

.shoot {
  position: absolute;
  right: 20px; bottom: 20px;
  padding: 10px 20px 10px 16px;
  display: inline-flex; align-items: center; gap: 10px;
  font: 800 1.25rem/1 var(--body);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--club-dark);
  background: var(--paper);
  border: 3px solid var(--club-dark);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--club-dark);
  cursor: pointer;
}
.shoot:hover { background: #fff; }
.shoot:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--club-dark); }
.shoot:disabled { opacity: .6; cursor: default; }
.shoot svg { width: 22px; height: 22px; }

/* "Hole in one!" rubber stamp */
.stamp {
  position: absolute;
  white-space: nowrap;
  left: 50%; top: 58%;
  margin: 0;
  padding: 6px 22px 4px;
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--stamp);
  border: 5px solid var(--stamp);
  border-radius: 12px;
  background: rgba(251, 245, 228, .88);
  box-shadow: 0 0 0 4px rgba(251, 245, 228, .88);
  transform: translate(-50%, -50%) rotate(-8deg) scale(2.4);
  opacity: 0;
  pointer-events: none;
}
.stamp.on { animation: stamp .45s cubic-bezier(.2, .9, .3, 1.2) forwards; }
/* A missed shot: a longer line, teasing, so smaller and free to wrap */
.stamp.miss {
  width: max-content; max-width: calc(100% - 40px);
  white-space: normal; text-align: center;
  padding: 10px 22px 8px;
  font-size: clamp(1.4rem, 4.6vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: .02em;
}
@keyframes stamp {
  to { transform: translate(-50%, -50%) rotate(-8deg) scale(1); opacity: .92; }
}

/* ---------- Paper sections ---------- */

main { position: relative; }

.paper {
  background:
    repeating-linear-gradient(transparent 0 37px, rgba(169, 205, 180, .55) 37px 39px),
    var(--paper);
  background-position: 0 14px;
}

.wrap { width: min(1080px, 100%); margin: 0 auto; padding: 0 16px; }

.intro {
  padding: 72px 0 40px;
}
.intro .lede {
  max-width: 34ch;
  margin: 0;
  font-weight: 800;
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  line-height: 1.05;
  color: var(--club-dark);
}
.intro .note {
  margin: 18px 0 0;
  max-width: 720px;
  color: var(--ink-soft);
  font-size: 1.35rem;
}
.intro .note .hand { display: block; margin-top: 10px; font-family: var(--hand); font-size: 1.7rem; color: var(--pencil); }

/* Store links: hidden until launch day (see the README) */
[hidden] { display: none !important; }
.stores { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 0; }
.stores a {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-width: 210px; padding: 10px 22px 12px;
  color: var(--paper); background: var(--club);
  border: 3px solid var(--club-dark); border-radius: 14px;
  box-shadow: 0 4px 0 var(--club-dark);
  font-weight: 800; font-size: 1.6rem; line-height: 1.05; text-decoration: none;
}
.stores a small { font-weight: 700; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brass); }
.stores a:hover { background: var(--club-dark); }
.stores a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--club-dark); }

/* The bag: what's in the game, as a scorecard */
.bag { padding: 24px 0 72px; }

.scorecard {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--paper);
  border: 3px solid var(--club);
  border-radius: 14px;
  box-shadow: 0 6px 0 var(--paper-edge);
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.scorecard li {
  padding: 22px 24px 24px;
  border-right: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
  margin: 0 -2px -2px 0;
}
.scorecard h3 {
  margin: 0 0 4px;
  font-weight: 800;
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--club-dark);
}
.scorecard p { margin: 0; color: var(--ink-soft); }
.scorecard .pencil { font-family: var(--hand); font-size: 1.6rem; color: var(--pencil); line-height: 1; }

/* Taped-on snapshots */
.snaps {
  padding: 8px 0 88px;
}
.snaps h2 {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--club-dark);
}
.snaps .wrap > p { margin: 0 0 28px; color: var(--ink-soft); }
.strip {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 18px max(16px, calc((100vw - 1080px) / 2 + 16px)) 30px;
  scrollbar-width: thin;
  scrollbar-color: var(--club) transparent;
}
.strip figure {
  position: relative;
  flex: 0 0 min(78vw, 560px);
  margin: 0;
  scroll-snap-align: center;
  background: #fff;
  padding: 10px 10px 12px;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(34, 48, 42, .18);
  transform: rotate(var(--tilt, -1.5deg));
}
.strip figure:nth-child(even) { --tilt: 1.2deg; }
.strip figure::before {
  content: "";
  position: absolute; left: 50%; top: -14px;
  width: 110px; height: 28px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(216, 176, 90, .55);
  border-left: 2px dashed rgba(255, 255, 255, .5);
  border-right: 2px dashed rgba(255, 255, 255, .5);
}
.strip img { width: 100%; height: auto; border-radius: 3px; aspect-ratio: 2778 / 1284; object-fit: cover; }

/* ---------- Footer: the dirt under the course ---------- */

.ground {
  position: relative;
  color: var(--paper);
  background:
    radial-gradient(circle at 12% 40%, rgba(0,0,0,.18) 0 5px, transparent 6px) 0 0 / 180px 120px,
    radial-gradient(circle at 70% 70%, rgba(0,0,0,.15) 0 4px, transparent 5px) 0 0 / 230px 140px,
    linear-gradient(var(--dirt) 0 34%, var(--dirt-2) 34% 68%, var(--dirt-3) 68%);
  padding: 64px 0 40px;
  margin-top: 0;
}
.ground::before {
  content: "";
  position: absolute; left: 0; right: 0; top: -20px; height: 34px;
  background:
    linear-gradient(var(--grass-hi) 0 6px, var(--grass) 6px);
  border-radius: 0 0 50% 50% / 0 0 14px 14px;
  -webkit-mask: radial-gradient(circle at 10px 0, #000 9px, transparent 10px) 0 100% / 20px 100% repeat-x,
                linear-gradient(#000, #000) 0 0 / 100% calc(100% - 8px) no-repeat;
          mask: radial-gradient(circle at 10px 0, #000 9px, transparent 10px) 0 100% / 20px 100% repeat-x,
                linear-gradient(#000, #000) 0 0 / 100% calc(100% - 8px) no-repeat;
}
.ground .wrap { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; justify-content: space-between; }
.ground .brand { display: flex; align-items: center; gap: 14px; font-weight: 800; font-size: 1.6rem; color: var(--paper); text-decoration: none; }
.ground .brand img { width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.ground nav { display: flex; gap: 24px; flex-wrap: wrap; }
.ground nav a { color: var(--paper); font-weight: 700; }
.ground nav a:hover { color: var(--brass); }
.ground small { flex-basis: 100%; color: rgba(251, 245, 228, .72); font-size: 1rem; }

/* ---------- Document pages (privacy, terms, beta testers, 404) ---------- */

.doc-top {
  background: var(--club);
  border-bottom: 4px solid var(--brass);
  color: var(--paper);
  padding: 22px 0 26px;
}
.doc-top .wrap { max-width: 820px; }
.doc-top a.home { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; font-weight: 800; font-size: 1.3rem; }
.doc-top a.home img { width: 36px; height: 36px; border-radius: 9px; }
.doc-top h1 { margin: 18px 0 0; font-weight: 800; font-size: clamp(2.4rem, 7vw, 3.6rem); line-height: 1; text-transform: uppercase; }
.doc-top p { margin: 4px 0 0; font-family: var(--hand); font-size: 1.7rem; color: var(--brass); }

.doc { padding: 40px 0 80px; }
.doc .wrap { max-width: 820px; }
.doc article {
  background: var(--paper);
  border: 3px solid var(--paper-edge);
  border-radius: 14px;
  box-shadow: 0 6px 0 var(--paper-edge);
  padding: clamp(22px, 5vw, 44px);
}
.doc article > :first-child { margin-top: 0; }
.doc h2 { margin: 34px 0 6px; font-weight: 800; font-size: 1.7rem; line-height: 1.15; color: var(--club-dark); }
.doc h3 { margin: 22px 0 6px; font-weight: 800; font-size: 1.3rem; line-height: 1.15; color: var(--club-dark); }
.doc p, .doc li { max-width: 68ch; }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 1.2em; }
.doc li { margin: 0 0 6px; }
.doc li::marker { color: var(--club-light); }
.doc details { margin: 0 0 12px; }
.doc summary { cursor: pointer; font-weight: 700; color: var(--club); }
.doc pre {
  margin: 10px 0 0;
  padding: 12px 14px;
  background: var(--paper-shade);
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: .8rem;
  line-height: 1.45;
}
.doc .short {
  margin: 0 0 8px;
  padding: 14px 18px;
  background: var(--paper-shade);
  border-left: 5px solid var(--club);
  border-radius: 6px;
}
.doc .short b { color: var(--club-dark); }

/* Beta testers: one tab per platform, like the game's segmented toggles */
.tabs:not(.js) .tablist { display: none; }
.tablist {
  display: flex; gap: 6px;
  margin: 22px 0 0;
  padding: 6px;
  background: var(--paper-shade);
  border: 3px solid var(--club);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--paper-edge);
}
.tab {
  flex: 1;
  padding: 10px 14px;
  font: 800 1.2rem/1 var(--body);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--club-dark);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.tab:hover { color: var(--club-light); }
.tab[aria-selected="true"] { color: var(--paper); background: var(--club); box-shadow: 0 2px 0 var(--club-dark); }
.tab[aria-selected="true"]:hover { color: var(--paper); }
.tabs .panel > h2:first-child { margin-top: 30px; }

.steps { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; margin: 0 0 18px; padding-left: 54px; max-width: none; }
.steps li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute; left: 0; top: -2px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.3rem; line-height: 1;
  color: var(--club-dark);
  background: var(--paper);
  border: 3px solid var(--club);
  border-radius: 50%;
  box-shadow: 0 3px 0 var(--paper-edge);
}
.steps h3 { margin: 0 0 4px; font-weight: 800; font-size: 1.35rem; line-height: 1.15; color: var(--club-dark); }
.steps p { margin: 0 0 8px; }
.invite a {
  display: inline-block;
  padding: 10px 20px 12px;
  color: var(--paper); background: var(--club);
  border: 3px solid var(--club-dark); border-radius: 14px;
  box-shadow: 0 4px 0 var(--club-dark);
  font-weight: 800; font-size: 1.3rem; line-height: 1.1; text-decoration: none;
}
.invite a:hover { background: var(--club-dark); color: var(--paper); }
.invite a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--club-dark); }

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  body { font-size: 1.15rem; }
  .card { top: 12px; min-width: 76px; font-size: .9rem; }
  .card.p1 { left: 10px; } .card.p2 { right: 10px; }
  .card output { font-size: 1.6rem; }
  .sign { top: 84px; padding: 14px 16px 16px; }
  .shoot { right: 50%; transform: translateX(50%); bottom: 16px; }
  .shoot:active { transform: translateX(50%) translateY(3px); }
  .stamp { top: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

.hero .scene.flight { z-index: 2; pointer-events: none; }
.shoot { z-index: 3; }
.stamp { z-index: 3; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.streaks path {
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: .45;
  stroke-dasharray: 70 2400;
  animation: streak 5s linear infinite;
}
@keyframes streak { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -2470; } }
@media (prefers-reduced-motion: reduce) { .streaks { display: none; } }

/* The way in to the leaderboard: the hero's other button, across from "Take a shot". */
.hero-board {
  position: absolute; z-index: 3;
  left: 20px; bottom: 20px;
  padding: 10px 20px 10px 16px;
  display: inline-flex; align-items: center; gap: 10px;
  font: 800 1.25rem/1 var(--body); letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  color: var(--club-dark); background: var(--brass); border: 3px solid var(--club-dark); border-radius: 999px; box-shadow: 0 4px 0 var(--club-dark);
}
.hero-board:hover { color: var(--club-dark); background: #E7C675; }
.hero-board:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--club-dark); }
.hero-board svg { width: 22px; height: 22px; }
@media (max-width: 560px) {
  /* side by side along the bottom: no room to centre one of them */
  .hero .shoot { right: 12px; transform: none; padding: 10px 14px 10px 12px; font-size: 1.1rem; }
  .hero .shoot:active { transform: translateY(3px); }
  .hero-board { left: 12px; bottom: 16px; padding: 10px 14px 10px 12px; font-size: 1.1rem; }
}

/* ---------- Leaderboard: a scorecard under the sky, the course along the bottom ---------- */

/* The page is one screen: the home page's hole fills it, the scorecard stands on the grass
   and its scores scroll inside it. */
.lb {
  height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column;
  background: linear-gradient(var(--sky-high), var(--sky) 70%);
  --lb-strip: 138px;
}
.lb-scene { position: fixed; inset: 0; width: 100%; height: 100%; }

.lb-main {
  position: relative; flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  width: min(980px, 100%); margin: 0 auto; padding: 14px 16px 16px;
}
.lb-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px 18px; margin-bottom: 14px; }
.lb-home { flex-basis: 100%; display: inline-flex; align-items: center; gap: 10px; color: var(--club-dark); text-decoration: none; font-weight: 800; font-size: 1.25rem; }
.lb-home img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 3px 0 rgba(18, 63, 41, .35); }

/* The title sits on the sky the way the game's banners do: dark green, outlined in paper. */
.lb-title {
  margin: 8px 0 0;
  font-weight: 800; font-size: clamp(2.6rem, 9vw, 4.6rem); line-height: .92; letter-spacing: .01em; text-transform: uppercase;
  color: var(--club-dark);
  -webkit-text-stroke: 10px var(--paper); paint-order: stroke fill;
  text-shadow: 0 6px 0 rgba(18, 63, 41, .22);
}
.lb-noscript { background: var(--paper); border-radius: 10px; padding: 14px 18px; }

/* The card: the game's paper scorecard, a touch askew. */
.lb-card {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--paper-edge);
  border-radius: 12px;
  box-shadow: 0 8px 0 var(--club-dark), 0 22px 30px rgba(18, 63, 41, .28);
  transform: rotate(-.35deg);
  /* a fixed height: whatever the screen has left. The rows scroll inside. */
  flex: 1; min-height: 0; display: flex; flex-direction: column;
}
.lb-head {
  flex: none;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; justify-content: space-between;
  padding: 16px 18px;
  background: var(--club); border-bottom: 5px solid var(--brass);
  border-radius: 8px 8px 0 0;
}
.lb-headline { margin: 0; font-family: var(--hand); font-weight: 700; font-size: 1.7rem; line-height: 1; color: var(--brass); }

/* Segmented switches, as the game's ON | OFF and range toggles. */
.lb-seg { display: inline-flex; gap: 5px; padding: 5px; background: var(--paper-shade); border: 3px solid var(--club-dark); border-radius: 999px; }
.lb-seg button {
  padding: 9px 16px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: 800 1.1rem/1 var(--body); letter-spacing: .04em; text-transform: uppercase; color: var(--club-dark); white-space: nowrap;
}
.lb-seg button:hover { color: var(--club-light); }
.lb-seg button[aria-selected="true"], .lb-seg button[aria-pressed="true"] { color: var(--paper); background: var(--club); box-shadow: 0 2px 0 var(--club-dark); }
.lb-seg-main { border-color: var(--brass); background: var(--club-dark); }
.lb-seg-main button { color: var(--paper); font-size: 1.3rem; padding: 11px 20px; }
.lb-seg-main button:hover { color: var(--brass); }
.lb-seg-main button[aria-selected="true"] { color: var(--club-dark); background: var(--brass); box-shadow: 0 2px 0 var(--brass-dark); }

.lb-filters { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 16px 18px 4px; }
.lb-daynav { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; color: var(--club-dark); }
.lb-daynav span { min-width: 9.5em; text-align: center; }
.lb-daynav button, .lb-back {
  height: 44px; min-width: 44px; padding: 0 12px; cursor: pointer;
  font: 800 1.2rem/1 var(--body); color: var(--club-dark);
  background: var(--paper); border: 3px solid var(--club-dark); border-radius: 999px; box-shadow: 0 3px 0 var(--club-dark);
}
.lb-daynav button:hover:not(:disabled), .lb-back:hover { background: #fff; }
.lb-daynav button:active:not(:disabled), .lb-back:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--club-dark); }
.lb-daynav button:disabled { opacity: .3; cursor: default; }
/* The seed box: type a course's seed, as on the game's New Round page. */
.lb-seed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lb-seed label { font-weight: 800; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.lb-seed input {
  width: 5.2em; height: 46px; padding: 0 10px; text-align: center;
  font: 800 1.6rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--club-dark);
  background: #fff; border: 3px solid var(--club-dark); border-radius: 10px; box-shadow: inset 0 3px 0 rgba(18, 63, 41, .12);
}
.lb-seed input::placeholder { color: var(--paper-edge); }
.lb-seed button[type="submit"] {
  height: 46px; padding: 0 16px; cursor: pointer; font: 800 1.1rem/1 var(--body); letter-spacing: .04em; text-transform: uppercase;
  color: var(--paper); background: var(--club); border: 3px solid var(--club-dark); border-radius: 10px; box-shadow: 0 3px 0 var(--club-dark);
}
.lb-seed button[type="submit"]:hover { background: var(--club-light); }
.lb-seed button[type="submit"]:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--club-dark); }
.lb-picks { display: flex; gap: 8px; }
.lb-clear {
  width: 46px; height: 46px; cursor: pointer; font: 800 1.6rem/1 var(--body); color: var(--club-dark);
  background: var(--paper); border: 3px solid var(--club-dark); border-radius: 50%; box-shadow: 0 3px 0 var(--club-dark);
}
.lb-clear:hover { background: #fff; }
.lb-clear:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--club-dark); }
.lb-select {
  height: 46px; padding: 0 12px; max-width: 100%; cursor: pointer;
  font: 800 1.1rem/1 var(--body); color: var(--club-dark); background: var(--paper); border: 3px solid var(--club-dark); border-radius: 10px;
}
.lb-chip {
  padding: 3px 9px 2px; border: 0; border-radius: 6px; background: var(--club); color: var(--paper); cursor: pointer; box-shadow: 0 2px 0 var(--club-dark);
  font: 800 1.05rem/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase;
}
.lb-chip:hover { background: var(--club-light); }
.lb-chip:active { transform: translateY(2px); box-shadow: none; }
.lb-rank.lb-when { font-size: .95rem; font-weight: 700; white-space: nowrap; }
.lb-row:has(.lb-when) > summary { grid-template-columns: 5.4em minmax(0, 1fr) auto; }
.lb-status { flex: none; margin: 10px 20px 6px; min-height: 1.2em; font-family: var(--hand); font-weight: 700; font-size: 1.55rem; line-height: 1.15; color: var(--pencil); }
.lb-status:empty { display: none; }
.lb-rows {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 10px 6px;
  scrollbar-width: thin; scrollbar-color: var(--paper-edge) transparent;
  /* a fade where rows run off the bottom, so it reads as "more below" */
  -webkit-mask-image: linear-gradient(#000 calc(100% - 26px), transparent); mask-image: linear-gradient(#000 calc(100% - 26px), transparent);
}
.lb-rows::-webkit-scrollbar { width: 10px; }
.lb-rows::-webkit-scrollbar-thumb { background: var(--paper-edge); border-radius: 999px; border: 2px solid var(--paper); }
.lb-section { margin: 18px 10px 2px; font-weight: 800; font-size: 1.05rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-dark); }
.lb-gap { margin: 4px 10px; font-family: var(--hand); font-size: 1.4rem; color: var(--ink-soft); text-align: center; }

/* One player: a line on the card. Opens to the round, hole by hole. */
.lb-row { border-bottom: 2px solid var(--rule); }
.lb-row > summary, .lb-row.plain {
  display: grid; grid-template-columns: 3.1em minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 4px 10px; min-height: 54px; list-style: none; cursor: pointer; border-radius: 8px;
}
.lb-row.plain { cursor: default; }
.lb-row > summary::-webkit-details-marker { display: none; }
.lb-row > summary:hover { background: rgba(47, 138, 90, .08); }
.lb-rank { font-weight: 800; font-size: 1.25rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.lb-who { display: flex; align-items: center; gap: 12px; min-width: 0; font-weight: 800; font-size: 1.45rem; color: var(--ink); }
.lb-who .lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-ball { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--pencil); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .12), inset 3px 3px 0 rgba(255, 255, 255, .45); }
.lb-nums { display: flex; align-items: center; gap: 14px; }
.lb-small { font-size: 1.05rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Scores are pencilled in, ringed when under par and boxed when over, as on the game's card. */
.lb-mark {
  display: inline-grid; place-items: center; min-width: 2.1em; height: 2.1em; padding: 0 .3em;
  font-family: var(--hand); font-weight: 700; font-size: 1.55rem; line-height: 1; color: var(--pencil);
  border: 3px solid transparent;
}
.lb-mark.under { border-color: var(--pencil); border-radius: 50%; transform: rotate(-4deg); }
.lb-mark.under.deep { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--pencil); }
.lb-mark.over { border-color: var(--pencil); border-radius: 5px 7px 4px 8px; transform: rotate(2deg); }

/* The top three get brass, and the leader a rubber stamp. */
.lb-row.top .lb-rank { color: var(--club-dark); font-size: 1.6rem; }
.lb-row.first > summary, .lb-row.first.plain { background: linear-gradient(90deg, rgba(216, 176, 90, .34), rgba(216, 176, 90, 0) 75%); }
.lb-stamp {
  flex: none; padding: 3px 9px 2px; border: 3px solid var(--stamp); border-radius: 6px; transform: rotate(-7deg);
  font: 800 .95rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--stamp); opacity: .85;
}

/* A score someone linked to. */
.lb-row.linked > summary, .lb-row.linked.plain { background: rgba(238, 106, 94, .16); box-shadow: inset 6px 0 0 var(--red); animation: nudge 1.1s ease-out 2; }
@keyframes nudge { 0%, 100% { transform: none; } 30% { transform: translateX(7px); } 60% { transform: translateX(-3px); } }

/* An opened row and its round are one block: the same tint, bracketed on the left. */
.lb-row[open] { margin: 4px 0; background: var(--paper-shade); border: 0; border-left: 6px solid var(--club); border-radius: 8px; }
.lb-row[open] > summary:hover { background: none; }
.lb-row[open].linked { border-left-color: var(--red); background: #F9E4D6; }
.lb-row[open].linked > summary { background: none; box-shadow: none; }
.lb-detail { padding: 2px 10px 10px; }
/* The round: a printed scorecard the width of the row, pars in print, scores in pencil. */
.lb-scorecard { overflow-x: auto; background: #FFFBEF; border: 3px solid var(--club-dark); border-radius: 10px; }
.lb-scorecard table { width: 100%; border-collapse: collapse; }
.lb-scorecard th, .lb-scorecard td { padding: 4px 6px; text-align: center; min-width: 2.4em; border-right: 2px solid var(--rule); }
.lb-scorecard tr > :last-child { border-right: 0; }
.lb-scorecard .hd th { background: var(--club); color: var(--paper); font-weight: 800; font-size: 1.05rem; border-right-color: var(--club-light); }
.lb-scorecard .hd th:first-child, .lb-scorecard .pr th, .lb-scorecard .sc th { width: 1%; text-align: left; padding-left: 12px; padding-right: 14px; font-weight: 800; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; }
.lb-scorecard .pr th, .lb-scorecard .pr td { background: var(--paper-shade); color: var(--ink-soft); font-weight: 700; font-size: 1.05rem; border-bottom: 2px solid var(--rule); }
.lb-scorecard .sc th { color: var(--club-dark); }
.lb-scorecard .sc td { padding: 6px; }
.lb-scorecard .lb-mark { font-size: 1.45rem; }
.lb-scorecard .tot { background: rgba(216, 176, 90, .28); }
.lb-scorecard .hd .tot { background: var(--brass); color: var(--club-dark); }
.lb-actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 6px; }
.lb-quiet { padding: 2px 0; border: 0; background: none; cursor: pointer; font: 700 1rem/1.2 var(--body); color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.lb-quiet:hover { color: var(--club); }

.lb-foot { flex: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 10px 20px 14px; border-top: 2px solid var(--rule); }
.lb-link { padding: 0; border: 0; background: none; cursor: pointer; font: 700 1.1rem/1.3 var(--body); color: var(--club); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lb-link:hover { color: var(--club-light); }

/* Along the bottom, over the dirt under the course. */
.lb-legal {
  position: relative; flex: none; height: var(--lb-strip);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; padding: 0 12px 8px;
  text-align: center; color: rgba(251, 245, 228, .8);
}
.lb-legal nav { display: flex; gap: 20px; }
.lb-legal a { color: var(--paper); font-weight: 700; font-size: 1.05rem; }
.lb-legal a:hover { color: var(--brass); }
.lb-legal small { font-size: .8rem; line-height: 1.2; }

/* What gets posted: a note pinned over the page. */
.lb-about {
  width: min(680px, calc(100vw - 28px)); max-height: calc(100vh - 40px); padding: 0; overflow: hidden;
  color: var(--ink); font: 600 1.2rem/1.45 var(--body);
  background: var(--paper); border: 3px solid var(--paper-edge); border-radius: 14px; box-shadow: 0 10px 0 var(--club-dark), 0 30px 60px rgba(0, 0, 0, .4);
}
.lb-about::backdrop { background: rgba(10, 26, 18, .6); }
.lb-about[open] { display: flex; flex-direction: column; }
.lb-about-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--club); border-bottom: 5px solid var(--brass); }
.lb-about-head h2 { margin: 0; font-weight: 800; font-size: 1.7rem; line-height: 1; text-transform: uppercase; color: var(--paper); }
.lb-close { width: 42px; height: 42px; cursor: pointer; font: 800 1.7rem/1 var(--body); color: var(--club-dark); background: var(--paper); border: 3px solid var(--club-dark); border-radius: 50%; }
.lb-close:hover { background: #fff; }
.lb-about-body { padding: 16px 20px 20px; overflow-y: auto; }
.lb-about-body p { margin: 0 0 12px; }
.lb-about-body h3 { margin: 16px 0 6px; font-weight: 800; font-size: 1.3rem; line-height: 1.15; color: var(--club-dark); }
.lb-about-body ul { margin: 0 0 12px; padding-left: 1.2em; }
.lb-about-body li { margin: 0 0 6px; }
.lb-about-body li::marker { color: var(--club-light); }
.lb-about-body b { color: var(--club-dark); }

@media (max-width: 620px) {
  .lb { --lb-strip: 96px; }
  .lb-main { padding: 10px 10px 12px; }
  .lb-title { -webkit-text-stroke-width: 7px; }
  .lb-card { transform: none; }
  .lb-head { justify-content: center; padding: 12px; }
  .lb-seg-main { width: 100%; }
  .lb-seg-main button { flex: 1; padding: 11px 8px; font-size: 1.15rem; }
  .lb-filters { justify-content: center; padding: 12px 12px 2px; }
  .lb-row > summary, .lb-row.plain { grid-template-columns: 2.4em minmax(0, 1fr) auto; gap: 6px; padding: 4px 6px; }
  .lb-who { font-size: 1.25rem; gap: 8px; }
  .lb-detail { padding-left: 6px; }
  .lb-small.wide { display: none; }
  .lb-stamp { display: none; }
  .lb-legal small { display: none; }
}
/* A short screen (a phone on its side, a small laptop): give the height to the scores. */
@media (max-height: 760px) {
  .lb-title { font-size: clamp(2.2rem, 7vw, 3.2rem); margin-top: 2px; }
  .lb-top { margin-bottom: 10px; }
  .lb-home { flex-basis: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-row.linked > summary { animation: none; }
  .lb-cloud, .lb-course-scene .cloth, .lb-row.linked > summary { animation: none; }
}
