/* Padel Score Tracker landing page. Palette read off the app screens. */
:root {
  --blue: #0a84ff;
  --green: #34c759;
  --deep: #0e3b25;
  --deep-2: #14512f;
  --navy: #1e2a5a;
  --purple: #3a2a63;
  --amber: #ff9f0a;
  --hr: #ff375f;
  --ink: #0b0b0f;
  --ink-2: #3c3c43;
  --ink-3: #6e6e73;
  --surface: #f2f2f7;
  --card: #ffffff;
  --line: #e3e3e8;
  --radius: 18px;
  --maxw: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--card);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

:where(a, button, input, summary):focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  line-height: 1.1;
  letter-spacing: -0.021em;
  margin: 0 0 0.5em;
  font-weight: 800;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: 1.08rem; font-weight: 700; }
h4 { font-size: 0.95rem; font-weight: 700; }
p { margin: 0 0 1em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.lede { font-size: 1.13rem; color: var(--ink-2); max-width: 62ch; }
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.7em;
}

/* Header */
.skip-link {
  position: fixed; top: 0.65rem; left: 0.65rem; z-index: 40;
  transform: translateY(-160%); padding: 0.55rem 0.8rem;
  border-radius: 8px; background: var(--ink); color: #fff;
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

.site-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--ink); font-weight: 700; letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-icon { border-radius: 8px; }
.site-nav { display: flex; align-items: center; gap: 1.15rem; font-size: 0.94rem; }
.site-nav a { color: var(--ink-2); }
.nav-cta {
  background: var(--ink); color: #fff !important;
  padding: 0.45rem 0.9rem; border-radius: 999px; font-weight: 600;
}
.nav-cta:hover { text-decoration: none; opacity: 0.88; }

/* Hero */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 2.5rem);
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.hero-cta { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin: 1.4rem 0; }
.ghost-btn {
  padding: 0.72rem 1.15rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); font-weight: 600; font-size: 0.95rem;
}
.ghost-btn:hover { text-decoration: none; border-color: var(--ink-3); }
.hero-points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 0.5rem; }
.hero-points li { position: relative; padding-left: 1.6rem; color: var(--ink-2); font-size: 0.99rem; }
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: 0.52em;
  width: 0.62rem; height: 0.62rem; border-radius: 50%; background: var(--green);
}
.hero-shots {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  min-height: 590px;
}
.hero-watch {
  width: min(210px, 40%);
  flex: 0 0 auto;
  margin: 0;
  filter:
    drop-shadow(0 30px 25px rgba(7, 18, 12, 0.18))
    drop-shadow(0 10px 9px rgba(7, 18, 12, 0.1));
}
.hero-watch img { width: 100%; }

/* Store badge */
.store-badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--ink); color: #fff !important;
  padding: 0.62rem 1.15rem; border-radius: 12px; font-weight: 600; font-size: 1.05rem;
}
.store-badge:hover { text-decoration: none; opacity: 0.9; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.05; }
.store-badge small { font-size: 0.62rem; font-weight: 500; opacity: 0.82; letter-spacing: 0.02em; }
.store-badge.small { padding: 0.5rem 0.95rem; font-size: 0.92rem; }

/* Screenshots */
.shot { margin: 0; }
.shot-device { position: relative; isolation: isolate; }
.shot-frame {
  position: relative; overflow: hidden; background: #050506;
  box-shadow:
    0 42px 80px -38px rgba(7, 18, 12, 0.48),
    0 14px 30px -18px rgba(7, 18, 12, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}
.shot-frame img { width: 100%; }
.shot-phone .shot-device { width: min(280px, 100%); }
.shot-phone .shot-frame {
  padding: 7px;
  border-radius: 43px;
  background: linear-gradient(145deg, #505154 0%, #111214 24%, #050506 70%, #3b3c3f 100%);
}
.shot-phone .shot-frame img {
  border-radius: 36px;
  background: var(--surface);
}
.shot-phone .shot-device::before,
.shot-phone .shot-device::after {
  content: ""; position: absolute; left: -3px; z-index: -1;
  width: 4px; border-radius: 3px 0 0 3px;
  background: linear-gradient(90deg, #09090a, #535458);
}
.shot-phone .shot-device::before { top: 105px; height: 64px; }
.shot-phone .shot-device::after { top: 185px; height: 42px; }
.shot-phone .device-sensor {
  position: absolute; z-index: 2; top: 14px; left: 50%;
  width: 30%; height: 18px; transform: translateX(-50%);
  border-radius: 999px; background: #050506;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}
.shot-phone .device-control {
  position: absolute; z-index: -1; right: -3px; top: 142px;
  width: 4px; height: 78px; border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, #535458, #09090a);
}
.shot-watch .shot-device {
  width: min(210px, 100%);
  padding-block: 88px;
}
.shot-watch .shot-device::before,
.shot-watch .shot-device::after {
  content: ""; position: absolute; z-index: -2; left: 23%; width: 54%;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08), transparent 12% 88%, rgba(0,0,0,0.24)),
    linear-gradient(180deg, #183d29, #0d2518);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
.shot-watch .shot-device::before {
  top: 0; height: 102px; border-radius: 25px 25px 12px 12px;
}
.shot-watch .shot-device::after {
  bottom: 0; height: 102px; border-radius: 12px 12px 30px 30px;
}
.shot-watch .shot-frame {
  z-index: 1;
  padding: 8px;
  border-radius: 48px;
  background: linear-gradient(145deg, #515256 0%, #161719 24%, #060607 72%, #424347 100%);
  box-shadow:
    0 36px 60px -30px rgba(4, 18, 10, 0.58),
    0 14px 28px -18px rgba(4, 18, 10, 0.5),
    inset 0 0 0 1px rgba(255,255,255,0.26);
}
.shot-watch .shot-frame img {
  border-radius: 39px;
  background: #000;
}
.shot-watch .device-sensor {
  position: absolute; z-index: 2; right: -11px; top: calc(50% - 9px);
  width: 11px; height: 27px; border-radius: 0 7px 7px 0;
  background: linear-gradient(90deg, #151618, #55565a);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.13);
}
.shot-watch .device-control {
  position: absolute; z-index: 2; right: -7px; top: calc(50% + 29px);
  width: 7px; height: 23px; border-radius: 0 5px 5px 0;
  background: linear-gradient(90deg, #111214, #45464a);
}
.shot-watch-photo > img {
  display: block;
  width: min(246px, 100%);
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 28px 24px rgba(4, 18, 10, 0.2));
}
.shot figcaption {
  margin-top: 0.7rem; font-size: 0.86rem; color: var(--ink-3); max-width: 30ch;
}

/* Strip */
.strip { background: var(--surface); border-block: 1px solid var(--line); }
.strip-items {
  max-width: var(--maxw); margin: 0 auto; padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  display: flex; gap: 1.6rem; flex-wrap: wrap;
  font-size: 0.87rem; color: var(--ink-3); font-weight: 600;
}

/* Feature rows */
.feature-row {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}
.feature-row.alt { direction: rtl; }
.feature-row.alt > * { direction: ltr; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 2rem; margin-top: 1.8rem; }
.feature h3 { margin-bottom: 0.3em; }
.feature p { color: var(--ink-2); font-size: 0.96rem; margin: 0; }

/* How it works */
.how {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
}
.steps { list-style: none; counter-reset: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; }
.steps li { display: flex; gap: 0.8rem; align-items: flex-start; }
.step-n {
  flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--deep); color: #fff; font-weight: 700; font-size: 0.92rem;
  display: grid; place-items: center;
}
.steps p { color: var(--ink-2); font-size: 0.94rem; margin: 0; }
.how-shots { display: flex; gap: clamp(1rem, 4vw, 3rem); margin-top: 2.6rem; flex-wrap: wrap; }

/* Guides */
.guides-teaser {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
}
.guide-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.4rem; margin-top: 2rem;
}
.guide-card {
  display: block; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--card); color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.guide-card:hover {
  text-decoration: none; transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(11, 11, 15, 0.4);
}
.guide-card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.guide-card-body { padding: 1rem 1.15rem 1.25rem; }
.guide-card h3 { font-size: 1.02rem; margin-bottom: 0.35em; }
.guide-card p { font-size: 0.9rem; color: var(--ink-3); margin: 0; }

/* FAQ */
.faq {
  max-width: 860px; margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
}
.faq-list { display: grid; gap: 0.7rem; margin-top: 1.8rem; }
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.faq-item summary {
  cursor: pointer; padding: 0.95rem 1.15rem; font-weight: 650; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "\2013"; }
.faq-body { padding: 0 1.15rem 1.1rem; }
.faq-body p { color: var(--ink-2); font-size: 0.97rem; margin: 0 0 0.6em; }
.faq-link { font-size: 0.9rem; font-weight: 600; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--deep) 0%, var(--deep-2) 60%, #1b6b3c 100%);
  color: #fff; text-align: center;
  padding: clamp(2.6rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
  margin-top: 2rem;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.86); max-width: 52ch; margin-inline: auto; }
.cta-band .store-badge { background: #fff; color: var(--ink) !important; margin-top: 0.8rem; }
.cta-note { font-size: 0.85rem; margin-top: 1rem; color: rgba(255, 255, 255, 0.7) !important; }

/* Callout inside articles */
.callout {
  border: 1px solid var(--line); border-left: 4px solid var(--green);
  background: var(--surface); border-radius: 14px;
  padding: 1.2rem 1.3rem; margin: 1.8rem 0;
}
.callout h3 { margin-bottom: 0.4em; }
.callout p { color: var(--ink-2); font-size: 0.96rem; }

/* Article */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }
.crumbs {
  display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
  font-size: 0.84rem; color: var(--ink-3);
  /* Carries its own gutter so it lines up with the page it heads, whether or not
     a wrapper gives it one. .article-wrap already does, .crumbs-wide overrides. */
  max-width: 760px; margin: 0 auto; padding: 1.2rem clamp(1rem, 4vw, 2.5rem) 0;
}
.article-wrap .crumbs { max-width: none; padding-inline: 0; }
.crumbs span[aria-hidden] { opacity: 0.5; }
.page-head { max-width: 760px; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 0; }
.article { padding: 1rem 0 2rem; }
.article h1 { margin-bottom: 1.2rem; }
.feature-image { border-radius: var(--radius); margin-bottom: 1.6rem; width: 100%; }
.answer-first {
  font-size: 1.15rem; color: var(--ink); font-weight: 500;
  border-left: 4px solid var(--amber); padding-left: 1rem; margin-bottom: 2rem;
}
.article h2 { margin-top: 2.2rem; font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.article p { color: var(--ink-2); }
.howto { background: var(--surface); border-radius: var(--radius); padding: 1.3rem 1.5rem; margin: 1.5rem 0; }
.howto h2 { margin-top: 0; font-size: 1.2rem; }
.howto ol { list-style: decimal; padding-left: 1.3rem; margin: 0; display: grid; gap: 0.6rem; }
.howto li { color: var(--ink-2); font-size: 0.97rem; }
.article .shot { margin: 1.8rem 0; }
.article-faq, .related { margin-top: 2.6rem; }
.related ul { list-style: disc; padding-left: 1.3rem; }
.related li { margin-bottom: 0.35rem; }

/* Footer */
.site-foot {
  background: var(--surface); border-top: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 3.2rem) clamp(1rem, 4vw, 2.5rem) 1.6rem;
}
.foot-cols {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2rem;
}
.foot-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.foot-cols a, .foot-cols p { font-size: 0.9rem; color: var(--ink-2); }
.link-button {
  appearance: none; border: 0; padding: 0; background: transparent;
  color: var(--ink-2); font: inherit; font-size: 0.9rem;
  text-align: left; cursor: pointer;
}
.link-button:hover { color: var(--blue); text-decoration: underline; }
.foot-meta {
  max-width: var(--maxw); margin: 2.2rem auto 0;
  border-top: 1px solid var(--line); padding-top: 1.2rem;
}
.foot-meta p { margin-bottom: 0.5rem; }
.foot-legal {
  max-width: 90ch; margin: 0;
  font-size: 0.78rem; color: var(--ink-3);
}

/* Privacy controls */
.cookie-consent {
  position: fixed; z-index: 30; inset: auto 1rem 1rem;
  width: min(1120px, calc(100% - 2rem)); margin-inline: auto;
  display: grid; grid-template-columns: 1fr auto; gap: 1.5rem;
  align-items: end; padding: 1.25rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 16px;
  color: #fff; background: #10281d;
  box-shadow: 0 24px 70px -24px rgba(7, 18, 12, 0.68);
}
.cookie-consent[hidden] { display: none; }
.cookie-consent h2 { color: #fff; font-size: 1.25rem; margin-bottom: 0.45rem; }
.cookie-consent p { max-width: 70ch; margin-bottom: 0.45rem; color: rgba(255, 255, 255, 0.88); font-size: 0.92rem; line-height: 1.5; }
.cookie-consent .cookie-note { color: rgba(255, 255, 255, 0.67); font-size: 0.78rem; }
.cookie-consent a { color: #fff; font-size: 0.84rem; text-decoration: underline; text-underline-offset: 0.18em; }
.cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; min-width: min(23rem, 100%); }
.cookie-actions button {
  min-height: 2.75rem; padding: 0.65rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 9px;
  background: #fff; color: #10281d; font: inherit; font-size: 0.9rem;
  font-weight: 700; cursor: pointer; transition: transform 0.16s ease, background 0.16s ease;
}
.cookie-actions button:hover { background: #eef7f1; }
.cookie-actions button:active { transform: scale(0.98); }
.cookie-actions button:focus-visible { outline-color: #fff; }

/* Legal pages */
.legal-page .article { padding-top: 1.5rem; }
.legal-page .article h1 { margin-bottom: 0.3rem; }
.byline {
  margin: -0.4rem 0 1.2rem;
  font-size: 0.88rem;
  color: var(--ink-3);
}
.byline a { color: inherit; }

.legal-updated { color: var(--ink-3) !important; font-size: 0.88rem; margin-bottom: 1.5rem; }
.legal-page .answer-first { margin-top: 1.2rem; }
.legal-page ul, .legal-page ol { color: var(--ink-2); padding-left: 1.3rem; }
.legal-page li { margin-bottom: 0.65rem; }
.legal-page code { font-size: 0.84em; }
.table-wrap { overflow-x: auto; margin: 1.2rem 0; }
.legal-page table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.9rem; }
.legal-page th, .legal-page td { padding: 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal-page th { background: var(--surface); color: var(--ink); font-size: 0.8rem; letter-spacing: 0.02em; }
.legal-page td { color: var(--ink-2); }

/* Responsive */
@media (max-width: 900px) {
  .hero, .feature-row { grid-template-columns: 1fr; }
  .feature-row.alt { direction: ltr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .hero-shots { justify-content: center; min-height: auto; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .site-nav a:not(.nav-cta) { display: none; }
  .feature-grid, .steps, .foot-cols { grid-template-columns: 1fr; }
  .hero-shots { gap: 0.75rem; align-items: center; }
  .shot-phone .shot-device { width: min(220px, 52vw); }
  .hero-watch { width: min(145px, 34vw); }
  .shot-watch .shot-device { width: min(145px, 31vw); padding-block: 60px; }
  .shot-watch .shot-device::before,
  .shot-watch .shot-device::after { height: 72px; }
  .shot-watch .shot-frame { padding: 6px; border-radius: 36px; }
  .shot-watch .shot-frame img { border-radius: 30px; }
  .shot-watch .device-sensor { right: -8px; width: 8px; height: 21px; }
  .shot-watch .device-control { right: -5px; width: 5px; height: 17px; }
  .how-shots { gap: 1.2rem; }
  .cookie-consent {
    inset: auto 0 0; width: 100%; border-radius: 16px 16px 0 0;
    grid-template-columns: 1fr; gap: 1rem; padding: 1.1rem;
  }
  .cookie-actions { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .guide-card { transition: none; }
  .cookie-actions button { transition: none; }
}

/* ===== Web scoreboard ===================================================== */

.scorer {
  --sc-blue: #0a84ff;
  --sc-blue-2: #0060df;
  --sc-green: #34c759;
  --sc-green-2: #248a3d;
  container-type: inline-size;
}

.sc-shell {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 28px 70px -46px rgba(11, 11, 15, 0.55);
  overflow: hidden;
  /* scorer.js replaces this element's contents, and it is the largest thing above
     the fold on /play/. Without a reserved box the swap moved the page 690px on
     desktop and 960px on a phone. Measured hydrated heights: 867 at 620px and up,
     1183 at every width below that, where .sc-grid2 drops to one column. */
  min-height: 867px;
}
.sc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--surface);
}
.sc-title { font-size: 0.98rem; margin: 0; letter-spacing: -0.01em; }
.sc-body { padding: 1.1rem; }
.sc-foot {
  margin: 0; padding: 0.85rem 1.1rem; border-top: 1px solid var(--line);
  background: var(--surface); font-size: 0.79rem; color: var(--ink-3);
}

.sc-mini {
  font: inherit; font-size: 0.83rem; font-weight: 600;
  padding: 0.4rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  cursor: pointer;
}
.sc-mini:hover:not(:disabled) { border-color: var(--ink-3); color: var(--ink); }
.sc-mini:disabled { opacity: 0.4; cursor: default; }

.sc-primary {
  font: inherit; font-weight: 650; font-size: 1rem;
  padding: 0.8rem 1.4rem; border: 0; border-radius: 999px;
  background: var(--sc-blue); color: #fff; cursor: pointer; width: 100%;
}
.sc-primary:hover { background: var(--sc-blue-2); }

/* Live board */
.sc-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 0.8rem;
}
.sc-rules {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3);
}
.sc-banner {
  margin: 0 0 0.8rem; padding: 0.5rem 0.8rem; border-radius: 10px;
  background: rgba(255, 159, 10, 0.14); color: #8a5300;
  font-size: 0.86rem; font-weight: 650; text-align: center;
}

.sc-team {
  display: grid; gap: 0.15rem; width: 100%; text-align: left;
  position: relative; border: 0; border-radius: 18px;
  padding: 1.15rem 6.5rem 1.15rem 1.1rem; color: #fff; font: inherit;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, filter 0.12s ease;
}
button.sc-team:hover { filter: brightness(1.06); }
button.sc-team:active { transform: scale(0.985); }
button.sc-team:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.sc-team-a { background: linear-gradient(180deg, var(--sc-blue) 0%, var(--sc-blue-2) 140%); }
.sc-team-b { background: linear-gradient(180deg, var(--sc-green) 0%, var(--sc-green-2) 140%); }

.sc-team-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.sc-serve {
  width: 0.62rem; height: 0.62rem; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.75); background: transparent;
}
.sc-team.serving .sc-serve { background: #fff; }
.sc-team-name { font-size: 1.22rem; font-weight: 750; letter-spacing: -0.015em; }
.sc-serving-tag {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.24); padding: 0.12rem 0.42rem; border-radius: 999px;
}
.sc-players { font-size: 0.9rem; color: rgba(255, 255, 255, 0.85); }
.sc-subscore { font-size: 0.83rem; color: rgba(255, 255, 255, 0.8); }
.sc-points {
  position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
  font-size: clamp(2.6rem, 9cqw, 3.6rem); font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em;
}

.sc-midbar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.55rem 0.2rem;
}
.sc-timer {
  font-variant-numeric: tabular-nums; font-weight: 650; font-size: 0.95rem; color: var(--ink-2);
}
.sc-setline {
  font-size: 0.86rem; font-weight: 600; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.sc-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sc-hint { margin: 0.9rem 0 0; font-size: 0.8rem; color: var(--ink-3); }
.sc-hint kbd {
  font: inherit; font-size: 0.75rem; border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; padding: 0.05rem 0.32rem; background: var(--surface);
}

/* Result */
.sc-result { text-align: center; }
.sc-trophy { font-size: 2.4rem; margin: 0.3rem 0 0.2rem; }
.sc-result h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.sc-actions { display: grid; gap: 0.6rem; margin-top: 1.2rem; justify-items: center; }
.sc-actions .sc-primary { max-width: 22rem; }
.sc-note { font-size: 0.82rem; color: var(--ink-3); margin: 0.6rem 0 0; }

.sc-card {
  text-align: left; border-radius: 18px; padding: 1.1rem 1.15rem; color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--purple) 70%, #2b3a7a 100%);
}
.sc-card-head {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62); margin-bottom: 0.9rem;
}
.sc-card-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sc-card-team { display: flex; align-items: center; gap: 0.5rem; font-size: 1.05rem; font-weight: 700; }
.sc-card-team .dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; display: inline-block; }
.dot-a { background: var(--sc-blue); }
.dot-b { background: var(--sc-green); }
.sc-badge {
  font-style: normal; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.07em;
  background: var(--amber); color: #3a2400; padding: 0.14rem 0.42rem; border-radius: 999px;
}
.sc-card-sets { display: flex; gap: 0.75rem; font-variant-numeric: tabular-nums; }
.sc-card-sets span { font-size: 1.35rem; font-weight: 700; color: rgba(255, 255, 255, 0.45); min-width: 1ch; text-align: center; }
.sc-card-sets span.won { color: #fff; }
.sc-card-rule { height: 1px; background: rgba(255, 255, 255, 0.18); margin: 0.7rem 0; }
.sc-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-top: 1rem; }
.sc-card-stats div {
  background: rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 0.6rem 0.5rem; text-align: center;
}
.sc-card-stats strong { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.sc-card-stats span {
  font-size: 0.62rem; letter-spacing: 0.07em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

/* Setup */
.sc-setup { display: grid; gap: 1.4rem; }
.sc-group > h3 {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 0.7rem;
}
.sc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 0.9rem; }
.sc-field { display: grid; gap: 0.25rem; }
.sc-field span { font-size: 0.75rem; color: var(--ink-3); font-weight: 600; }
.sc-field input {
  font: inherit; font-size: 0.95rem; padding: 0.55rem 0.7rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
  min-width: 0;
}
.sc-field input:focus { outline: 2px solid var(--sc-blue); outline-offset: 1px; border-color: transparent; }

.sc-seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 0.25rem; margin-bottom: 0.7rem;
}
.sc-seg button {
  font: inherit; font-size: 0.88rem; font-weight: 600; padding: 0.5rem 0.4rem;
  border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sc-seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(11, 11, 15, 0.14); }

.sc-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 0.85rem; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 0.55rem;
  cursor: pointer;
}
.sc-toggle.is-disabled { opacity: 0.55; cursor: default; }
.sc-toggle strong { display: block; font-size: 0.95rem; }
.sc-toggle small { display: block; font-size: 0.8rem; color: var(--ink-3); margin-top: 0.1rem; }
.sc-toggle input { width: 1.15rem; height: 1.15rem; accent-color: var(--sc-green); flex: 0 0 auto; }

/* History */
.sc-history-panel { padding: 0 1.1rem 1.1rem; border-top: 1px solid var(--line); }
.sc-history { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.5rem; }
.sc-history li {
  display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 1rem;
  padding: 0.65rem 0.8rem; border: 1px solid var(--line); border-radius: 12px;
}
.sc-h-teams { font-weight: 650; font-size: 0.92rem; }
.sc-h-score { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 0.92rem; }
.sc-h-meta { grid-column: 1 / -1; font-size: 0.78rem; color: var(--ink-3); }
.sc-empty { font-size: 0.9rem; color: var(--ink-3); margin: 0.8rem 0; }

/* Page placement */
.play-section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.play-section-copy { align-self: start; }
.play-section-points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 0.8rem; }
.play-section-points li { font-size: 0.94rem; color: var(--ink-2); }

.crumbs-wide { max-width: var(--maxw); margin: 0 auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }
.play-head {
  max-width: var(--maxw); margin: 0 auto;
  padding: 1.2rem clamp(1rem, 4vw, 2.5rem) 0;
}
.play-board {
  max-width: 640px; margin: 0 auto;
  padding: 1.6rem clamp(1rem, 4vw, 2.5rem) 0;
}
.play-copy, .play-limits {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2.5rem) 0;
}
.play-copy > p { max-width: 62ch; color: var(--ink-2); font-size: 1.05rem; }
.play-copy .feature h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.3em; }
.play-limits { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.play-limits ul { padding-left: 1.2rem; color: var(--ink-2); }
.play-limits li { margin-bottom: 0.5rem; }

@media (max-width: 900px) {
  .play-section, .play-limits { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .sc-grid2 { grid-template-columns: 1fr; }
  .sc-team { padding-right: 5rem; }
  .sc-card-stats { grid-template-columns: 1fr; }
  .sc-shell { min-height: 1183px; }
}

/* ===== Language picker and app languages ================================== */
.lang { position: relative; }
.lang > summary {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--ink-2); font-size: 0.94rem; cursor: pointer;
  list-style: none; padding: 0.3rem 0.1rem;
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary::after {
  content: ""; width: 0.38rem; height: 0.38rem; margin-left: 0.1rem;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-0.1rem);
}
.lang[open] > summary::after { transform: rotate(-135deg) translateY(-0.1rem); }
.lang > summary:hover { color: var(--ink); }
.lang > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 0.45rem); z-index: 20;
  margin: 0; padding: 0.3rem; list-style: none; min-width: 9rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(11, 11, 15, 0.12);
}
.lang ul a {
  display: block; padding: 0.4rem 0.6rem; border-radius: 8px;
  color: var(--ink-2); font-size: 0.92rem;
}
.lang ul a:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.lang ul a[aria-current] { color: var(--ink); font-weight: 600; }

.languages {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}
.languages-note { font-size: 0.95rem; color: var(--ink-3); margin: 0; }
.language-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.55rem;
}
.language-list li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.45rem 0.95rem; font-weight: 600; font-size: 0.95rem; color: var(--ink-2);
}
.foot-sitelang { margin-top: 0.6rem; }

@media (max-width: 900px) {
  .languages { grid-template-columns: 1fr; }
}
/* The picker earns its place in the narrow header; the wordmark does not, and
   the icon still links home. */
@media (max-width: 620px) {
  .brand span { display: none; }
}
