/* Poopverse website: shared styles.
   House style from the app: cream paper, 3px ink outlines, hard offset
   shadows, Luckiest Guy headings. Mobile-first; readable from 320px up. */

:root {
  color-scheme: light dark;
  --bg: #FFF8EC;
  --grout: rgba(139, 90, 43, 0.07);
  --paper: #FFFFFF;
  --text: #3B2412;
  --muted: #6E5440;
  --ink: #3B2412;          /* outlines */
  --shadow: #3B2412;       /* hard offset shadows */
  --brown: #8B5A2B;        /* links, accents (5.5:1 on --bg) */
  --yellow: #FFD23F;
  --on-yellow: #3B2412;
  --tile: #BDEBF5;         /* bathroom-tile blue used behind the mascot */
  --line: #E6D6BF;         /* dashed separators */
  --soft: #FFF1D6;         /* callout background */
  --focus: #1F6FD1;
  --radius-card: 22px;
  --radius-btn: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1B130C;
    --grout: rgba(255, 210, 63, 0.035);
    --paper: #2A1D12;
    --text: #FFF3DF;
    --muted: #D9C4A6;
    --ink: #E8D2AE;
    --shadow: #000000;
    --brown: #F2B872;
    --tile: #1B4A55;
    --line: #4A3826;
    --soft: #37271A;
    --focus: #7CB8FF;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grout) 2px, transparent 2px),
    linear-gradient(90deg, var(--grout) 2px, transparent 2px);
  background-size: 48px 48px;
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brown);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-thickness: 3px;
}

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

/* Luckiest Guy has tall ascenders; give it room so nothing clips. */
h1,
h2,
.display {
  font-family: "Luckiest Guy", "Nunito", system-ui, sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.25;
  padding-top: 0.08em;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 8vw, 3rem);
  margin: 0 0 0.25em;
}

h2 {
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  margin: 1.8em 0 0.4em;
}

h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 1.4em 0 0.3em;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

ul,
ol {
  padding-left: 1.3em;
}

li + li {
  margin-top: 0.35em;
}

strong {
  font-weight: 800;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--yellow);
  color: var(--on-yellow);
  border: 3px solid var(--ink);
  border-radius: 12px;
}

.skip:focus {
  top: 8px;
}

/* ── header ── */
.site-header {
  padding: 14px 0 6px;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Luckiest Guy", "Nunito", system-ui, sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.25;
  padding-top: 0.08em;
  letter-spacing: 0.03em;
  color: var(--text);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav li + li {
  margin-top: 0;
}

.nav a {
  display: inline-block;
  padding: 6px 12px;
  border: 2px solid transparent;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
}

.nav a:hover {
  border-color: var(--ink);
}

.nav a[aria-current="page"] {
  background: var(--yellow);
  color: var(--on-yellow);
  border-color: var(--ink);
}

/* ── main + cards ── */
main {
  flex: 1;
  padding-top: 12px;
  padding-bottom: 40px;
}

.card {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 0 5px 0 var(--shadow);
  padding: 20px;
  margin: 0 0 22px;
}

@media (min-width: 600px) {
  .card {
    padding: 28px 32px;
  }
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.meta {
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 1.2em;
}

.callout {
  background: var(--soft);
  border: 2px dashed var(--ink);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 1.2em 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout h2 {
  margin-top: 0;
}

.toc {
  border-top: 2px dashed var(--line);
  border-bottom: 2px dashed var(--line);
  padding: 10px 0;
  margin: 1.2em 0 0.5em;
}

.toc ol {
  margin: 0;
  columns: 1;
}

@media (min-width: 600px) {
  .toc ol {
    columns: 2;
    column-gap: 32px;
  }
}

.toc li {
  break-inside: avoid;
}

/* ── hero (landing + invite) ── */
.hero {
  text-align: center;
}

.hero-art {
  display: block;
  width: 150px;
  margin: 0 auto 8px;
  padding: 14px;
  background: var(--tile);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 5px 0 var(--shadow);
}

.pitch {
  font-size: 1.2rem;
  font-weight: 700;
  max-width: 34em;
  margin: 0 auto 1em;
}

.tagline {
  color: var(--muted);
  font-weight: 800;
  text-transform: lowercase;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 6px;
}

.store {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 150px;
  padding: 8px 16px;
  border: 3px dashed var(--ink);
  border-radius: var(--radius-btn);
  background: var(--paper);
  color: var(--text);
  line-height: 1.25;
  text-align: left;
}

.store small {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.store span {
  font-weight: 800;
  font-size: 1.1rem;
}

.pill {
  display: inline-block;
  padding: 2px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--on-yellow);
  font-weight: 800;
  font-size: 0.9rem;
}

/* ── buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 52px;
  padding: 0.55em 1.3em 0.45em;
  font-family: "Luckiest Guy", "Nunito", system-ui, sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--on-yellow);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: var(--radius-btn);
  box-shadow: 0 4px 0 var(--shadow);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--shadow);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--shadow);
}

/* ── link cards (landing) ── */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.grid li + li {
  margin-top: 0;
}

@media (min-width: 640px) {
  .grid.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid .card {
  margin: 0;
  height: 100%;
}

.link-card {
  display: block;
  height: 100%;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--shadow);
}

.emoji {
  display: block;
  font-size: 2rem;
  line-height: 1.2;
}

.link-card h3,
.feature h3 {
  font-family: "Luckiest Guy", "Nunito", system-ui, sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  line-height: 1.25;
  padding-top: 0.08em;
  margin: 0.3em 0 0.2em;
}

.link-card p {
  margin: 0;
  font-weight: 400;
  color: var(--muted);
}

.feature p {
  margin: 0;
}

/* ── FAQ ── */
.faq details {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 4px 0 var(--shadow);
  margin: 0 0 14px;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 48px 14px 16px;
  position: relative;
  font-weight: 800;
  font-size: 1.08rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--on-yellow);
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq .answer {
  padding: 0 16px 16px;
  border-top: 2px dashed var(--line);
  padding-top: 12px;
}

.faq .answer > :last-child {
  margin-bottom: 0;
}

.contact {
  text-align: center;
}

.contact .btn {
  margin-top: 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* ── footer ── */
.site-footer {
  padding: 20px 0 28px;
  border-top: 3px solid var(--ink);
  background: var(--paper);
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li + li {
  margin-top: 0;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* ── homepage (marketing) ──────────────────────────────────────────── */
.wrap.wide {
  max-width: 1080px;
}

.section {
  padding-top: 8px;
  scroll-margin-top: 12px;
}

.section > h2 {
  text-align: center;
  font-size: clamp(1.7rem, 6vw, 2.4rem);
  margin: 1.6em 0 0.8em;
}

.kicker {
  margin: 0 0 0.3em;
  font-weight: 800;
  color: var(--brown);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
}

/* hero */
.landing-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  padding-top: 12px;
  padding-bottom: 12px;
}

.landing-hero h1 {
  font-size: clamp(2.2rem, 9vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 0.35em;
}

.landing-hero .pitch {
  margin-left: 0;
  margin-right: 0;
}

.landing-hero-copy {
  text-align: center;
}

@media (min-width: 820px) {
  .landing-hero {
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    padding-top: 28px;
  }
  .landing-hero-copy {
    text-align: left;
  }
  .landing-hero .store-row {
    justify-content: flex-start;
  }
}

/* store buttons */
.store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 10px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  min-height: 56px;
  padding: 8px 18px 8px 14px;
  background: var(--ink);
  color: var(--bg);
  border: 3px solid var(--ink);
  border-radius: var(--radius-btn);
  box-shadow: 0 4px 0 var(--yellow);
  text-decoration: none;
  text-align: left;
  line-height: 1.15;
}

.store-btn small {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.85;
}

.store-btn strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
}

.store-glyph {
  font-size: 1.7rem;
  line-height: 1;
}

.store-btn[aria-disabled="true"] {
  cursor: default;
}

a.store-btn:hover {
  transform: translateY(-1px);
}

/* phone frames around app screenshots */
.phone {
  margin: 0 auto;
  width: min(280px, 72vw);
  border: 4px solid var(--ink);
  border-radius: 36px;
  background: var(--ink);
  box-shadow: 0 8px 0 var(--shadow);
  overflow: hidden;
  line-height: 0;
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
}

.phone-hero {
  width: min(320px, 78vw);
  transform: rotate(2deg);
}

.phone-pair {
  position: relative;
  display: flex;
  justify-content: center;
  padding-right: 40px;
}

.phone-pair .phone {
  margin: 0;
  width: min(240px, 58vw);
  position: relative;
  z-index: 1;
}

.phone-pair .phone-back {
  position: absolute;
  z-index: 2;
  right: max(0px, calc(50% - 170px));
  bottom: -18px;
  width: min(160px, 38vw);
  transform: rotate(5deg);
}

/* how it works */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li + li {
  margin-top: 0;
}

@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  position: relative;
  margin: 0;
  padding-top: 34px;
}

.step h3 {
  font-family: "Luckiest Guy", "Nunito", system-ui, sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  line-height: 1.25;
  padding-top: 0.08em;
  margin: 0 0 0.3em;
}

.step p {
  margin: 0;
}

.step-num {
  position: absolute;
  top: -18px;
  left: 20px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--on-yellow);
  font-family: "Luckiest Guy", "Nunito", system-ui, sans-serif;
  text-transform: uppercase;
  font-size: 1.4rem;
  line-height: 1;
  padding-top: 4px;
}

/* feature rows: screenshot + copy, alternating sides on wide screens */
.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: center;
  margin: 0 0 56px;
  min-width: 0;
}
.feature-row > * { min-width: 0; }

.feature-copy h3 {
  font-family: "Luckiest Guy", "Nunito", system-ui, sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(1.5rem, 5vw, 2rem);
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding-top: 0.08em;
  margin: 0 0 0.4em;
}

.feature-copy p {
  font-size: 1.1rem;
}

@media (min-width: 820px) {
  .feature-row {
    grid-template-columns: 1fr 1.25fr;
    gap: 56px;
  }
  .feature-row.flip > :first-child {
    order: 2;
  }
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ticks li {
  position: relative;
  padding-left: 32px;
  font-weight: 700;
}

.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 22px;
  height: 22px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--on-yellow);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.skins-sheet {
  padding: 12px;
  text-align: center;
}

@media (min-width: 600px) {
  .skins-sheet {
    padding: 14px;
  }
}

.skins-sheet img {
  display: block;
  width: 100%;
  border-radius: 12px;
}

.skins-sheet figcaption {
  margin-top: 10px;
  font-weight: 800;
  color: var(--muted);
}

/* closing call to action */
.cta {
  text-align: center;
  background: var(--soft);
}

.cta h2 {
  margin-top: 0.2em;
}

.cta-emoji {
  display: block;
  font-size: 3rem;
  line-height: 1.1;
}

@media (prefers-reduced-motion: reduce) {
  .phone-hero,
  .phone-pair .phone-back {
    transform: none;
  }
}

/* homepage nav: one line on small phones */
@media (max-width: 480px) {
  .home .header-inner {
    justify-content: center;
  }
  .home .nav {
    justify-content: center;
    gap: 2px;
  }
  .home .nav a {
    padding: 4px 8px;
    font-size: 0.85rem;
  }
}

/* ---- Mini interactive demos (brand mark + playable-feeling teasers) ---- */
.brand-mark { width: 30px; height: 30px; vertical-align: -8px; margin-right: 4px; }

.mini-demo {
  margin-top: 22px;
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  background: var(--tile);
  padding: 14px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}
.mini-demo-label {
  margin: 10px 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

/* Daily Toss court */
.court { position: relative; height: 190px; overflow: hidden; border-radius: 14px; }
.court .wc { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); width: 110px; }
.court .fan { position: absolute; top: 10px; left: 12px; font-size: 20px; animation: dt-spin 1s linear infinite; }
.court .wind { position: absolute; top: 12px; left: 40px; font-size: 13px; font-weight: 800; }
@keyframes dt-spin { to { transform: rotate(360deg); } }
.court .cat { position: absolute; bottom: 14px; animation: dt-walk 7s linear infinite; }
.court .cat svg { width: 34px; height: 27px; display: block; }
@keyframes dt-walk { from { left: -40px; } to { left: 100%; } }
.court .tp { position: absolute; z-index: 2; font-size: 22px; top: 60px; left: -30px; animation: dt-tpfly 4.2s ease-in-out infinite 1.1s; }
@keyframes dt-tpfly {
  0%   { left: -30px; top: 60px;  transform: rotate(0); }
  45%  { left: 78%;   top: 24px;  transform: rotate(320deg); }
  55%  { left: 78%;   top: 24px;  transform: rotate(320deg); }
  100% { left: 112%;  top: 78px;  transform: rotate(560deg); }
}

/* Poop Crush mini board */
.crushbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.crushbar span {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 12px;
  padding: 4px 9px; font-size: 12.5px; font-weight: 700;
}
.crushbar b { font-family: "Luckiest Guy", "Nunito", system-ui, sans-serif; font-weight: 400; margin-left: 3px; }
.grid8 {
  display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 6px;
  border: 3px solid var(--ink); border-radius: 16px; padding: 9px;
  background: var(--paper); position: relative; min-width: 0;
}

/* ---- Interactive demo controls (Daily Toss + Poop Crush) ---- */
.demo-controls { margin-top: 12px; text-align: center; }

.demo-btn {
  font-family: "Luckiest Guy", "Nunito", system-ui, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1rem;
  color: var(--on-yellow);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: var(--radius-btn);
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--shadow);
}
.demo-btn span { font-family: "Nunito", system-ui, sans-serif; font-size: 0.72em; text-transform: none; opacity: .85; display: block; margin-top: 2px; }
.demo-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--shadow); }
.demo-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shadow); }
.demo-btn:disabled { cursor: default; opacity: .85; }
.demo-btn[aria-disabled="true"] { cursor: default; opacity: .85; }

.court .flier {
  position: absolute; bottom: 46px; left: 50%; font-size: 26px;
  transform: translateX(-50%);
}
.court .flier.flicking {
  animation: dt-arc 0.65s cubic-bezier(.3,.9,.4,1) forwards;
}
.court .flier.flicking.miss { animation-name: dt-arc-miss; }
@keyframes dt-arc {
  0%   { bottom: 46px; transform: translateX(-50%) rotate(0); }
  55%  { bottom: 128px; transform: translate(calc(-50% + var(--dx, 0px)), 0) rotate(var(--rot, 30deg)); }
  100% { bottom: 96px; opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), 0) rotate(var(--rot, 30deg)); }
}
@keyframes dt-arc-miss {
  0%   { bottom: 46px; transform: translateX(-50%) rotate(0); }
  55%  { bottom: 150px; transform: translate(calc(-50% + var(--dx, 0px) * 2.6), 0) rotate(var(--rot, 30deg)); }
  100% { bottom: 40px; opacity: 0; transform: translate(calc(-50% + var(--dx, 0px) * 3.4), 40px) rotate(calc(var(--rot, 30deg) * 2)); }
}
.court.shake { animation: dt-shake .35s; }
@keyframes dt-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.court .result {
  position: absolute; top: 92px; left: 50%; transform: translateX(-50%) scale(.7);
  font-family: "Luckiest Guy", "Nunito", system-ui, sans-serif;
  font-size: 20px; opacity: 0; pointer-events: none;
  -webkit-text-stroke: 2px var(--ink);
  transition: opacity .15s, transform .15s;
}
.court .result.show { opacity: 1; transform: translateX(-50%) scale(1); }
.court .result.good { color: var(--yellow); }
.court .result.bad { color: #E8637A; }

/* Poop Crush tiles: real buttons now, reset default styling */
.grid8 { position: relative; min-width: 0; }
.grid8 button.tile {
  font: inherit;
  aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center;
  font-size: 20px; border: 2px solid var(--ink); background: var(--paper);
  box-shadow: 0 3px 0 rgba(59,36,18,.35);
  cursor: pointer; padding: 0;
  transition: transform .12s;
}
.grid8 button.tile:hover { transform: translateY(-1px); }
.grid8 button.tile:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(59,36,18,.35); }
.grid8 button.tile.selected {
  background: var(--yellow);
  box-shadow: 0 0 0 3px var(--ink), 0 3px 0 rgba(59,36,18,.35);
}
.grid8 button.tile.clearing { opacity: 0; transform: scale(.4); transition: transform .2s, opacity .2s; }
.grid8 .hole {
  aspect-ratio: 1; border-radius: 10px;
  background: repeating-linear-gradient(45deg, rgba(59,36,18,.18), rgba(59,36,18,.18) 6px, rgba(59,36,18,.28) 6px, rgba(59,36,18,.28) 12px);
  border: 2px dashed var(--ink);
}
.grid8 .pop {
  position: absolute; transform: translate(-50%, 0);
  font-family: "Luckiest Guy", "Nunito", system-ui, sans-serif; font-size: 18px; color: var(--yellow);
  text-shadow: 2px 2px 0 var(--ink); pointer-events: none;
  animation: crush-popup .9s ease-out forwards;
}
@keyframes crush-popup {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(.6); }
  15%  { opacity: 1; transform: translate(-50%, -6px) scale(1.1); }
  75%  { opacity: 1; transform: translate(-50%, -30px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -40px) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .court .fan, .court .cat, .court .flier.flicking, .court.shake,
  .grid8 .pop { animation: none !important; }
}
