/* MINUS — playminus.com home page.
   The table at night: the app's sage felt and gold, under a lamp. The legal
   and panel pages keep styles.css; this file is the home page only.
   Self-hosted throughout — fonts, script and art all come from this origin. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque-Regular.ttf") format("truetype");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque-SemiBold.ttf") format("truetype");
  font-weight: 600; font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque-ExtraBold.ttf") format("truetype");
  font-weight: 800; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/CormorantGaramond-Bold.ttf") format("truetype");
  font-weight: 700; font-display: swap;
}

/* The parallax offset home.js writes. Registered and not inherited, so one
   element's offset never leaks into its children's transforms. */
@property --par { syntax: "<length>"; inherits: false; initial-value: 0px; }

:root {
  --bg: #0b100a;
  --bg-2: #121a0f;
  --panel: rgba(19, 27, 15, 0.74);
  --panel-solid: #161f12;
  --line: rgba(241, 194, 90, 0.2);
  --line-soft: rgba(233, 236, 223, 0.1);
  --text: #edf0e3;
  --body: #c5ceb2;
  --muted: #aab596;
  --sage: #8b9770;
  --gold: #f1c25a;
  --gold-deep: #e2a531;
  --btn-ink: #3c2e06;
  --red: #e8656c;
  --red-deep: #b8323b;
  --plus: #a8d48a;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Bricolage Grotesque", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 22px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg) radial-gradient(1200px 700px at 70% 0%, #1b2714 0%, transparent 60%) no-repeat;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
strong { color: #fff; font-weight: 600; }
h1, h2, h3 { margin: 0 0 0.45em; line-height: 1.08; text-wrap: balance; }
h2 { font-size: clamp(1.85rem, 4.4vw, 3.2rem); font-weight: 800; letter-spacing: -0.025em; }
h3 { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.eyebrow {
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 0.9em; display: flex; align-items: center; gap: 8px;
}
.lede { font-size: clamp(1.02rem, 1.5vw, 1.16rem); color: var(--muted); max-width: 62ch; }
.fineprint { font-size: 0.86rem; color: var(--muted); }
.suit.red { color: var(--red); }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: rgba(241, 194, 90, 0.35); color: #fff; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 50; padding: 10px 16px; border-radius: 12px;
  background: var(--gold); color: var(--btn-ink); font-weight: 800; text-decoration: none;
  transform: translateY(-160%); transition: transform 0.2s ease;
}
.skip:focus { transform: none; }

/* Parallax: the offset rides in each element's own transform. */
[data-depth] { transform: translate3d(0, var(--par), 0); }

/* Reveal on scroll. home.js adds .rv only when motion is welcome, so without
   it nothing is ever hidden. */
.rv {
  opacity: 0; translate: 0 26px;
  transition: opacity 0.8s var(--ease-out) var(--d, 0ms), translate 0.9s var(--ease-out) var(--d, 0ms);
}
.rv.in { opacity: 1; translate: none; }

/* ------------------------------------------------------------ the scene */

#scene {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh;
  display: none; z-index: 0; touch-action: pan-y; opacity: 0;
  transition: opacity 1.1s ease;
}
.has3d #scene { display: block; }
.ready #scene { opacity: 1; }
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(11, 16, 10, 0.86), rgba(11, 16, 10, 0.93));
  transition: opacity 0.9s ease;
}
body[data-stage="ambient"] .veil { opacity: 1; }
header.top, main, footer.site { position: relative; z-index: 2; }

/* --------------------------------------------------------------- header */

header.top {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(11, 16, 10, 0.82), rgba(11, 16, 10, 0));
}
header.top::before {
  /* The solid bar fades in once the page moves, so the hero starts open. */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: rgba(11, 16, 10, 0.78); border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: opacity 0.3s ease;
}
.scrolled header.top::before, header.top.open::before { opacity: 1; }
header.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 66px; }
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
  font-family: var(--serif); font-size: 1.5rem; letter-spacing: 0.12em; font-weight: 700;
  min-height: 44px; margin-right: auto;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
nav.main { display: flex; align-items: center; gap: 2px; }
nav.main a {
  color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 600;
  padding: 10px 12px; border-radius: 999px; white-space: nowrap;
}
nav.main a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.05); color: var(--text);
  align-items: center; justify-content: center; padding: 0;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.menu-btn span { position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.open .menu-btn span { background: transparent; }
.open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1020px) {
  nav.main a[href="/founder"] { display: none; }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  nav.main {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 8px var(--gutter) 18px;
    background: rgba(11, 16, 10, 0.94); border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  }
  .open nav.main { display: flex; animation: drop 0.22s var(--ease-out); }
  nav.main a, nav.main a[href="/founder"] { display: block; font-size: 1.05rem; padding: 12px 14px; border-radius: 12px; color: var(--text); }
  /* Without JavaScript there is no menu button, so the links simply wrap. */
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) nav.main { display: flex; position: static; flex-direction: row; flex-wrap: wrap; background: none; box-shadow: none; padding: 0; border: 0; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--line);
  font: 600 1rem var(--sans); color: var(--text); text-decoration: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.1); }
.btn:active { transform: translateY(0); }
/* The gold button keeps its dark ink in every state, wherever it sits. */
.btn.btn-gold, .btn.btn-gold:hover, .btn.btn-gold:focus-visible, .btn.btn-gold:active {
  color: var(--btn-ink); border-color: transparent; font-weight: 800;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  box-shadow: 0 10px 30px rgba(226, 165, 49, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.btn.btn-gold:hover { background: linear-gradient(180deg, #f7cf73, var(--gold-deep)); box-shadow: 0 14px 38px rgba(226, 165, 49, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 0.92rem; }
.btn-store { padding: 0 20px 0 16px; text-align: left; }
.btn-store small { display: block; font-size: 0.66rem; font-weight: 400; color: var(--muted); line-height: 1.1; }
.btn-store b { display: block; font-size: 1rem; line-height: 1.15; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ----------------------------------------------------------------- hero */

.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: 20px 0 96px; margin-top: -66px;
}
.hero .wrap { padding-top: 66px; }
.hero-copy { max-width: 560px; will-change: opacity; }
.hero h1 {
  font-family: var(--serif); font-weight: 700; letter-spacing: 0.08em; line-height: 0.86;
  font-size: clamp(4.4rem, 12vw, 9.5rem); margin: 0 0 0 -0.04em; width: max-content; max-width: 100%;
  background: linear-gradient(180deg, #fff6dc 10%, var(--gold) 55%, #b8862a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.55));
}
.hero .alt { font-size: clamp(1.3rem, 2.6vw, 1.9rem); font-weight: 800; letter-spacing: -0.02em; margin: 0.3em 0 0.6em; }
.hero .lede { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.8); color: #c9d2b6; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.pill {
  font-size: 0.8rem; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-soft); background: rgba(11, 16, 10, 0.55);
}
.pill.new { color: var(--btn-ink); background: var(--gold); border-color: transparent; }
.hero-shot { display: none; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 10px; white-space: nowrap;
}
.scroll-cue::after { content: ""; width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; } 50% { transform: scaleY(1); transform-origin: top; opacity: 1; } }
/* Portrait screens: the copy on top, the table below it. */
@media (orientation: portrait) and (max-width: 1100px), (max-width: 760px) {
  .hero { align-items: flex-start; padding-top: 92px; }
  .hero-copy { text-align: center; margin-inline: auto; }
  .hero h1 { margin-inline: auto; }
  .hero .lede { margin-inline: auto; }
  .hero .eyebrow, .hero .cta-row, .pills { justify-content: center; }
  .has3d .pills { display: none; }
}
@media (max-width: 760px) {
  .hero { padding-top: 84px; }
  .has3d .hero .lede, .has3d .hero .btn-store { display: none; }
  .has3d .hero .cta-row { margin-top: 18px; }
  .has3d .hero .cta-row .btn { flex: 1 1 100%; max-width: 340px; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .has3d .hero h1 { font-size: 3.8rem; }
}

/* Without WebGL the hero and the story fall back to the real screenshots. */
html:not(.has3d) .hero-shot { display: block; margin-top: 34px; }
html:not(.has3d) .scroll-cue { display: none; }
.device {
  margin: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); background: #000;
}
.device figcaption { font-size: 0.8rem; color: var(--muted); padding: 8px 14px; background: var(--panel-solid); }

/* ---------------------------------------------------------------- story */

.beat { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.beat .wrap { display: flex; }
.glass {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.beat-card { width: min(100%, 430px); padding: 30px 30px 26px; }
.beat-num { font-family: var(--serif); font-size: 3.4rem; line-height: 1; color: var(--gold); display: block; margin-bottom: 6px; }
.beat-card h3 { font-size: 1.7rem; }
.beat-card p { color: var(--body); margin-bottom: 0; }
.beat-card p + p { margin-top: 0.8em; }
.beat-card em { color: var(--gold); font-style: normal; font-weight: 600; }
.beat-card .device { margin-top: 18px; }
.has3d .beat-card .device { display: none; }
html:not(.has3d) .beat { min-height: 0; padding: 12px 0; }
html:not(.has3d) #hand { padding: 24px 0 40px; }
html:not(.has3d) .beat-card { width: min(100%, 640px); }
/* Portrait screens: the table above, the words in a card along the bottom. */
@media (orientation: portrait) and (max-width: 1100px), (max-width: 760px) {
  .has3d .beat { align-items: flex-end; padding-bottom: max(4vh, 20px); }
  .has3d .beat .wrap { justify-content: center; }
  .has3d .beat-card { width: min(100%, 560px); background: rgba(15, 21, 12, 0.86); }
}
@media (max-width: 760px) {
  .beat-card { width: 100%; padding: 18px 20px 18px; }
  .beat-num { font-size: 2.2rem; display: inline; margin-right: 10px; }
  .beat-card h3 { font-size: 1.3rem; display: inline; }
  .beat-card p { font-size: 0.95rem; margin-top: 8px; }
}

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

section.block { padding: clamp(72px, 11vw, 128px) 0; }
.grid { display: grid; gap: 16px; margin-top: 34px; }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tilt-wrap { perspective: 900px; }
.card3d {
  padding: 24px; height: 100%; transform-style: preserve-3d;
  transition: transform 0.25s ease, border-color 0.25s ease;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.card3d:hover { border-color: rgba(241, 194, 90, 0.5); }
.card3d h3 { transform: translateZ(26px); color: #fff; }
.card3d p { transform: translateZ(14px); color: var(--muted); margin: 0; font-size: 0.96rem; }
.card3d .glyph { font-size: 1.9rem; line-height: 1; margin-bottom: 14px; color: var(--gold); transform: translateZ(40px); display: block; }
.card3d .glyph.red { color: var(--red); }
@media (max-width: 560px) {
  .grid.c4, .grid.c3 { grid-template-columns: 1fr; }
  .card3d { padding: 20px; }
}
@media (min-width: 561px) and (max-width: 1000px) {
  .grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .grid.c3 { grid-template-columns: repeat(2, 1fr); }
}

/* leaderboard */
.lb-box { padding: 8px; margin-top: 28px; }
.lb-box + .fineprint { margin-top: 14px; }
.lb-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; }
.lb-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-tab {
  font: 600 0.86rem var(--sans); color: var(--muted); background: transparent; cursor: pointer;
  border: 1px solid var(--line-soft); border-radius: 999px; padding: 8px 14px; min-height: 44px;
}
.lb-tab:hover { color: var(--text); border-color: var(--line); }
.lb-tab.on { color: var(--btn-ink); background: var(--gold); border-color: transparent; }
.lb-when { font-size: 0.8rem; color: var(--muted); }
.lb { list-style: none; margin: 0; padding: 0; }
.lb-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 12px 14px; border-top: 1px solid var(--line-soft);
}
.lb-rank { font-family: var(--serif); font-size: 1.5rem; color: var(--sage); text-align: center; }
.lb-row.top1 .lb-rank, .lb-row.top2 .lb-rank, .lb-row.top3 .lb-rank { color: var(--gold); }
.lb-row.top1 { background: linear-gradient(90deg, rgba(241, 194, 90, 0.09), transparent 60%); border-radius: 12px; }
.lb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-meta { font-size: 0.82rem; color: var(--muted); }
.lb-val { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.lb-empty { padding: 26px 14px; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #7fe07a; box-shadow: 0 0 0 0 rgba(127, 224, 122, 0.6); animation: live 1.8s infinite; }
@keyframes live { to { box-shadow: 0 0 0 10px rgba(127, 224, 122, 0); } }
@media (max-width: 560px) {
  .lb-box { padding: 4px; }
  .lb-head { padding: 8px; }
  .lb-tabs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .lb-tab { padding: 8px 10px; }
  .lb-row { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; padding: 11px 10px; }
  .lb-meta { display: none; }
}

/* screens */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; perspective: 1400px; }
/* The side screens turn in toward the middle. The turn uses the separate
   rotate property so it can ease on hover while transform follows the scroll
   (a transition on transform would drag the parallax behind). */
.shots .device { transition: rotate 0.5s var(--ease-out), opacity 0.8s var(--ease-out) var(--d, 0ms), translate 0.9s var(--ease-out) var(--d, 0ms); }
.shots .device:nth-child(1) { rotate: y 14deg; }
.shots .device:nth-child(3) { rotate: y -14deg; }
.shots .device:hover { rotate: none; }
/* Narrow screens: a row to swipe through rather than three tall stacks. */
@media (max-width: 860px) {
  .shots {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(84%, 460px);
    overflow-x: auto; scroll-snap-type: x mandatory; perspective: none; gap: 12px;
    margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 14px; scroll-padding-inline: var(--gutter);
    scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  }
  .shots .device { scroll-snap-align: start; }
  .shots .device:nth-child(n) { transform: none; rotate: none; }
}
.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px 30px; margin-top: 40px; }
.feature-list h3 { color: #fff; }
.feature-list p { color: var(--muted); margin: 0; font-size: 0.96rem; }
.feature-list > div { padding-top: 16px; border-top: 1px solid var(--line); }

/* cast */
.cast { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.cast figure { margin: 0; padding: 18px 14px 14px; text-align: center; position: relative; overflow: hidden; }
.cast img {
  width: 100%; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5));
  transition: translate 0.35s ease, scale 0.35s ease;
}
.cast figure:hover img { translate: 0 -6px; scale: 1.04; }
.cast figcaption { font-weight: 800; letter-spacing: 0.08em; margin-top: 10px; }
.cast .line { display: block; font-size: 0.9rem; font-weight: 400; letter-spacing: 0; color: var(--gold); margin-top: 2px; }
@media (max-width: 760px) { .cast { grid-template-columns: repeat(2, 1fr); gap: 10px; } .cast figure { padding: 14px 10px 12px; } }

/* premium + get */
.split-box { padding: clamp(24px, 5vw, 48px); }
.price-row { display: flex; flex-wrap: wrap; gap: 18px 36px; margin: 18px 0 22px; }
.price b { font-family: var(--serif); font-size: 2.6rem; color: var(--gold); display: block; line-height: 1; }
.price span { font-size: 0.86rem; color: var(--muted); }
.perks { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 8px; }
.perks li { padding-left: 26px; position: relative; color: var(--body); }
.perks li::before { content: "♦"; position: absolute; left: 4px; color: var(--gold); font-size: 0.8rem; top: 0.25em; }
.big-cta { text-align: center; }
.big-cta .eyebrow, .big-cta .cta-row { justify-content: center; }
.big-cta .lede { margin-inline: auto; }
.big-cta .fineprint { margin-top: 22px; }
.flag { display: inline-block; vertical-align: -0.12em; border-radius: 2px; }
#made { padding-top: 0; }

footer.site { border-top: 1px solid var(--line-soft); padding: 34px 0 calc(44px + env(safe-area-inset-bottom)); background: rgba(11, 16, 10, 0.92); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 2px 8px; margin: 0 -10px 12px; }
footer.site a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
footer.site nav a { padding: 10px; }
footer.site a:hover { color: var(--gold); }
footer.site .copy { font-size: 0.84rem; color: var(--sage); }
footer.site .copy a { font-size: inherit; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); }

/* --------------------------------------------------------------- badges */

/* Under the page's glass cards (z-index 2), so a card passing over a seat hides it. */
#badges { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 0.5s ease; }
.ready #badges.on { opacity: 1; }
html:not(.has3d) #badges { display: none; }
.badge {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px;
  padding: 5px 13px 5px 5px; border-radius: 999px; white-space: nowrap;
  background: rgba(15, 21, 12, 0.82); border: 1px solid var(--line-soft);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 0.78rem; line-height: 1.2; will-change: transform;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.2s ease;
}
.badge img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: center 20%; background: #dfe5cf; }
.badge b { display: block; font-size: 0.82rem; }
.badge span { color: var(--muted); }
.badge.turn { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(241, 194, 90, 0.22), 0 0 26px rgba(241, 194, 90, 0.35); }
.badge.mine { background: rgba(15, 21, 12, 0.9); }
.badge.tuck { opacity: 0; }
.badge[data-tone="gold"] span { color: var(--gold); }
.badge[data-tone="minus"] span { color: var(--red); }
.badge[data-tone="plus"] span { color: var(--plus); }
.badge[data-tone="dealer"] b::after {
  content: "D"; display: inline-block; margin-left: 6px; width: 16px; height: 16px; line-height: 16px;
  text-align: center; border-radius: 50%; background: var(--gold); color: var(--btn-ink); font-size: 0.62rem;
}
.say {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 6px) scale(0.9);
  font-style: normal; font-weight: 800; font-size: 0.86rem; color: var(--btn-ink); background: #fff8e3;
  padding: 5px 12px; border-radius: 14px; opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.say.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.badge[data-tone="minus"] .say { background: var(--red-deep); color: #fff; }
.badge[data-tone="plus"] .say { background: var(--plus); color: #16300a; }
@media (max-width: 760px) {
  .badge { font-size: 0.7rem; padding: 4px 10px 4px 4px; gap: 6px; }
  .badge img { width: 28px; height: 28px; }
  .badge b { font-size: 0.74rem; }
  .say { font-size: 0.78rem; padding: 4px 10px; }
}

/* ------------------------------------------------------------ play mode */

body.playing { overflow: hidden; }
body.playing header.top, body.playing main, body.playing footer.site, body.playing .skip { visibility: hidden; }
body.playing .veil { opacity: 0; }
body.playing #scene { touch-action: none; }
#hud { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
#hud:focus { outline: none; }
#hud[hidden] { display: none; }
#hud > * { pointer-events: auto; }
.hud-top {
  position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(11, 16, 10, 0.85), transparent);
}
.chip {
  flex: none; font: 600 0.84rem var(--sans); color: var(--text); white-space: nowrap;
  min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; border: 1px solid var(--line-soft); background: rgba(15, 21, 12, 0.85);
}
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--gold); }
.chip .suit { font-size: 1.15rem; line-height: 1; }
.chip .suit.blk, .hbtn .suit.blk, .scores .suit.blk { color: #fff; }
.hud-top .spacer { flex: 1; }
@media (max-width: 560px) {
  .hud-top { gap: 6px; }
  .chip { padding: 0 12px; font-size: 0.8rem; }
  #hud-exit { width: 44px; padding: 0; justify-content: center; font-size: 1.1rem; }
  #hud-exit .long, #hud-level { display: none; }
}
#hud-dock {
  position: absolute; left: 50%; bottom: calc(100% - var(--hand-top, 70vh) + 8px); transform: translateX(-50%);
  width: min(100% - 24px, 560px); display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none;
}
#hud-dock > * { pointer-events: auto; }
#hud-status {
  margin: 0; pointer-events: none; text-align: center; max-width: 100%;
  font-weight: 600; font-size: 0.92rem; color: #fff8e3; line-height: 1.35;
  padding: 7px 14px; border-radius: 999px; background: rgba(11, 16, 10, 0.72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
#hud-status:empty { display: none; }
#hud-panel {
  width: 100%; padding: 16px; border-radius: 20px; display: none;
  background: rgba(17, 24, 13, 0.94); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}
#hud-panel.on { display: block; animation: rise 0.25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
#hud-hand { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ask { margin: 0 0 12px; font-size: 0.95rem; color: #dfe5cf; line-height: 1.45; }
.fine { margin: 10px 0 0; font-size: 0.8rem; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nums { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.row .nums { margin-bottom: 0; }
.num, .hbtn {
  font: 600 0.95rem var(--sans); color: var(--text); cursor: pointer; text-decoration: none;
  min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.num { padding: 0 6px; font-variant-numeric: tabular-nums; }
.num:hover, .hbtn:hover { border-color: var(--gold); background: rgba(255, 255, 255, 0.1); }
.num.sel, .hbtn.gold, .num.sel:hover, .hbtn.gold:hover {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep)); color: var(--btn-ink); border-color: transparent; font-weight: 800;
}
.hbtn.quiet { color: var(--muted); }
.hbtn.on { border-color: var(--gold); color: var(--gold); }
.hbtn .suit { font-size: 1.3rem; line-height: 1; }
.row.suits .hbtn { flex: 1 1 calc(50% - 8px); }
.row.level { margin: 14px 0 16px; }
.row.level .fine { margin: 0 6px 0 0; }
@media (max-width: 560px) {
  #hud-panel { padding: 12px; border-radius: 16px; }
  .ask { font-size: 0.88rem; margin-bottom: 10px; }
  .nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 5px; }
  .row .nums { flex: 1 1 100%; }
  .row > .hbtn { flex: 1 1 auto; }
}
#hud-sheet {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 16px;
  background: rgba(8, 12, 7, 0.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
#hud-sheet.on { display: flex; }
.sheet-card {
  /* A long game's score table scrolls inside the card; the heading and the
     buttons stay in view. */
  display: flex; flex-direction: column;
  width: min(100%, 580px); max-height: 100%; overflow: auto; padding: 24px; border-radius: 24px;
  background: var(--panel-solid); border: 1px solid var(--line); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
  animation: rise 0.25s ease;
}
.sheet-card:focus { outline: none; }
.sheet-card h3 { font-size: 1.7rem; color: var(--gold); }
.sheet-card p { color: var(--body); font-size: 0.95rem; }
.tablewrap { overflow: auto; margin: 0 0 16px; flex: 0 1 auto; min-height: 140px; }
.sheet-card > :not(.tablewrap) { flex: none; }
.scores thead th { position: sticky; top: 0; z-index: 1; background: var(--panel-solid); }
.scores tr.total > * { position: sticky; bottom: 0; background: var(--panel-solid); box-shadow: 0 -1px 0 var(--line); }
.scores { width: 100%; border-collapse: collapse; font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.scores th, .scores td { padding: 7px 6px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.scores thead th { color: var(--muted); font-weight: 600; font-size: 0.76rem; }
.scores tbody th { text-align: left; color: var(--muted); font-weight: 600; white-space: nowrap; }
.scores td b { display: block; font-size: 1rem; }
.scores td small { color: var(--muted); font-size: 0.7rem; }
.scores td.minus b { color: var(--red); }
.scores td.plus b { color: var(--plus); }
.scores tr.total td, .scores tr.total th { border-bottom: 0; font-weight: 800; font-size: 1.05rem; color: #fff; }
@media (max-width: 560px) {
  #hud-sheet { padding: 10px; align-items: flex-end; }
  .sheet-card { padding: 18px 16px; border-radius: 20px; }
  .sheet-card h3 { font-size: 1.4rem; }
  .scores { font-size: 0.8rem; }
  .scores th, .scores td { padding: 6px 3px; }
}

/* ------------------------------------------------------- large screens */

@media (min-width: 761px) and (max-width: 1100px) and (orientation: landscape) {
  .hero-copy { max-width: 470px; }
}
@media (min-width: 1600px) {
  :root { --wrap: 1240px; }
  .hero-copy { max-width: 620px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-depth] { transform: none; }
}
