:root {
  --ink: #0d1b2a;
  --ink-soft: #263647;
  --paper: #f7f5ef;
  --white: #ffffff;
  --lime: #d9ff62;
  --lime-dark: #badf43;
  --blue: #5664f5;
  --blue-soft: #e8eaff;
  --coral: #ff8067;
  --line: #dfe2e3;
  --muted: #697580;
  --surface: #ffffff;
  --shadow: 0 24px 70px rgba(13, 27, 42, .10);
  --radius: 28px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
[hidden] { display: none !important; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.04em; }
p { line-height: 1.65; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible {
  outline: 3px solid rgba(86, 100, 245, .45);
  outline-offset: 3px;
}

.section-shell,
.nav-shell,
.footer-inner {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid rgba(13, 27, 42, .08);
  padding-top: env(safe-area-inset-top);
}
.nav-shell {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.04em;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  color: var(--lime);
  font-size: 9px;
  text-align: center;
}
.brand-mark i {
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--ink);
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { background: var(--lime); color: var(--ink); }
.nav-menu { display: flex; align-items: center; gap: 42px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 650;
  transition: opacity .2s ease;
}
.nav-links a:hover { opacity: .55; }
.account-actions { display: flex; align-items: center; gap: 10px; }
.account-actions form { margin: 0; }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 11px;
  border: 0;
  border-radius: 14px;
  background: rgba(13,27,42,.06);
}
.nav-toggle > span:not(.visually-hidden) {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--ink);
  border-radius: 2px;
}

.button {
  min-height: 44px;
  padding: 0 19px;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 750;
  font-size: 14px;
  line-height: 1;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(.98); }
.button-large { min-height: 56px; padding-inline: 25px; border-radius: 17px; font-size: 15px; }
.button-small { min-height: 38px; padding-inline: 14px; }
.button-block { width: 100%; }
.button-primary { background: var(--lime); color: var(--ink); box-shadow: 0 10px 28px rgba(190, 224, 67, .22); }
.button-primary:hover { background: #e1ff82; box-shadow: 0 14px 34px rgba(190, 224, 67, .32); }
.button-dark { background: var(--ink); color: white; }
.button-dark:hover { background: #1e3042; }
.button-quiet { background: transparent; color: var(--ink); }
.button-glass { color: white; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(12px); }
.button-glass:hover { background: rgba(255,255,255,.16); }
.text-link { font-size: 14px; font-weight: 750; display: inline-flex; gap: 10px; }
.text-link span { transition: transform .2s; }
.text-link:hover span { transform: translateX(4px); }

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 4px 12px 4px 4px;
  border-radius: 14px;
  background: rgba(13,27,42,.055);
  font-weight: 700;
  font-size: 13px;
}
.avatar {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 850;
  font-size: 13px;
}
.avatar-small { width: 36px; height: 36px; }
.avatar-coral { background: var(--coral); color: var(--ink); }
.avatar-blue { background: #6672ff; color: white; }
.avatar-lime { background: var(--lime); color: var(--ink); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow > span {
  width: 22px;
  height: 2px;
  background: currentColor;
}
.eyebrow-light { color: var(--lime); }

.hero {
  min-height: 720px;
  padding: 85px max(24px, calc((100vw - 1180px) / 2));
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 72px;
  color: white;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 90% 15%, rgba(86,100,245,.32), transparent 30%),
    radial-gradient(circle at 10% 90%, rgba(217,255,98,.08), transparent 32%),
    var(--ink);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 50%;
}
.hero::before { width: 560px; height: 560px; right: -260px; top: -180px; }
.hero::after { width: 340px; height: 340px; right: -130px; top: -70px; }
.hero-copy { position: relative; z-index: 2; }
.hero h1 {
  max-width: 680px;
  margin-bottom: 28px;
  font-size: clamp(56px, 6.5vw, 90px);
  line-height: .93;
  letter-spacing: -.072em;
}
.hero h1 em {
  color: var(--lime);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.07em;
}
.hero-copy > p {
  max-width: 565px;
  margin-bottom: 32px;
  color: rgba(255,255,255,.7);
  font-size: 18px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-proof { display: flex; align-items: center; gap: 16px; margin-top: 42px; color: rgba(255,255,255,.65); font-size: 13px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 3px solid var(--ink); margin-left: -9px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.hero-game { position: relative; z-index: 2; display: flex; justify-content: center; transform: rotate(2deg); }
.phone-card {
  width: min(100%, 390px);
  padding: 24px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 38px;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
  box-shadow: 0 50px 100px rgba(0,0,0,.35);
  backdrop-filter: blur(25px);
}
.phone-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 42px; font-variant-numeric: tabular-nums; font-weight: 750; }
.live-pill { padding: 8px 11px; border: 1px solid rgba(255,255,255,.12); border-radius: 100px; font-size: 10px; letter-spacing: .1em; }
.live-pill i, .live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(255,128,103,.12); }
.letter-preview { display: grid; gap: 8px; }
.letter-preview-row { display: flex; justify-content: center; gap: 8px; }
.letter-preview span {
  flex: 0 0 calc((100% - 32px) / 5);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f5f4ee;
  color: var(--ink);
  font-size: 25px;
  font-weight: 850;
  box-shadow: inset 0 -3px 0 rgba(13,27,42,.1);
}
.phone-answer { margin: 32px 0 18px; padding: 16px 18px; border-radius: 15px; background: rgba(255,255,255,.09); }
.phone-answer small { display: block; margin-bottom: 7px; color: rgba(255,255,255,.5); }
.phone-answer strong { font-size: 21px; letter-spacing: .06em; }
.cursor { display: inline-block; width: 2px; height: 21px; margin-left: 4px; vertical-align: -4px; background: var(--lime); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.phone-card > button { width: 100%; height: 52px; border: 0; border-radius: 15px; background: var(--lime); color: var(--ink); font-weight: 850; }
.float-tag { position: absolute; padding: 11px 16px; border-radius: 14px; background: white; color: var(--ink); font-size: 12px; font-weight: 800; box-shadow: var(--shadow); }
.float-tag-top { top: 55px; right: -5px; transform: rotate(-7deg); }
.float-tag-bottom { bottom: 80px; left: -20px; color: var(--blue); transform: rotate(-5deg); }

.game-picker { padding-block: 105px 120px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 42px; }
.section-heading h2, .how-section h2 { margin: 0; font-size: clamp(40px, 5vw, 64px); line-height: 1; }
.game-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.game-card {
  min-width: 0;
  border: 1px solid rgba(13,27,42,.08);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  box-shadow: 0 6px 24px rgba(13,27,42,.04);
  transition: transform .28s ease, box-shadow .28s ease;
}
a.game-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.game-art { height: 285px; position: relative; overflow: hidden; }
.game-art-thirty {
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
}
.game-art-thirty::before {
  content: "";
  position: absolute;
  width: 350px; height: 350px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  left: -160px; top: -175px;
  box-shadow: 0 0 0 70px rgba(255,255,255,.035), 0 0 0 140px rgba(255,255,255,.025);
}
.mini-timer {
  position: absolute;
  top: 24px; right: 26px;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 50%;
  color: white;
  font-weight: 850;
  font-size: 14px;
}
.mini-letters { display: flex; gap: 6px; transform: rotate(-3deg); position: relative; z-index: 2; }
.mini-letters i {
  width: clamp(42px, 6vw, 64px);
  aspect-ratio: .82;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-style: normal;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 900;
  box-shadow: 0 7px 0 rgba(13,27,42,.2);
}
.game-art-sudoku { display: grid; place-items: center; background: #dce3ff; }
.game-art-sudoku::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 25%, rgba(255,255,255,.8), transparent 32%); }
.mini-grid { width: 220px; display: grid; grid-template-columns: repeat(9, 1fr); grid-template-rows: repeat(9, 1fr); border: 3px solid var(--ink); background: rgba(255,255,255,.4); transform: rotate(3deg); box-shadow: 15px 18px 0 rgba(86,100,245,.12); }
.mini-grid i { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(13,27,42,.18); color: transparent; font-style: normal; font-weight: 800; }
.mini-grid i.filled { color: var(--blue); background: rgba(255,255,255,.82); }
.game-art-word-search { display: grid; place-items: center; background: #ddf5c1; }
.mini-search-grid { width: 220px; padding: 15px; display: grid; grid-template-columns: repeat(6,1fr); gap: 4px; border-radius: 23px; background: rgba(255,255,255,.82); box-shadow: 15px 17px 0 rgba(13,27,42,.09); transform: rotate(-3deg); }
.mini-search-grid i { aspect-ratio: 1; display: grid; place-items: center; border-radius: 7px; color: var(--ink); font-size: 12px; font-style: normal; font-weight: 850; }
.mini-search-grid i:nth-child(6n+2), .mini-search-grid i:nth-child(7), .mini-search-grid i:nth-child(12) { color: white; background: var(--blue); }
.game-art-crossword { display: grid; place-items: center; background: var(--ink); }
.mini-crossword-grid { width: 210px; padding: 6px; display: grid; grid-template-columns: repeat(4,1fr); gap: 3px; background: rgba(255,255,255,.18); transform: rotate(3deg); box-shadow: 15px 18px 0 rgba(217,255,98,.14); }
.mini-crossword-grid i { aspect-ratio: 1; display: grid; place-items: center; color: var(--ink); background: white; font-size: 23px; font-style: normal; font-weight: 900; }
.game-art-trivia { display: grid; place-items: center; color: var(--ink); background: var(--coral); }
.trivia-preview-mark { width: 150px; height: 150px; display: grid; place-items: center; border: 4px solid var(--ink); border-radius: 50%; background: var(--paper); font-family: Georgia,serif; font-size: 105px; line-height: 1; box-shadow: 14px 16px 0 rgba(13,27,42,.16); transform: rotate(-7deg); }
.trivia-preview-chips { position: absolute; inset: auto 22px 20px; display: flex; justify-content: center; gap: 6px; }
.trivia-preview-chips span { padding: 6px 9px; border-radius: 100px; background: rgba(255,255,255,.75); font-size: 8px; font-weight: 850; letter-spacing: .06em; }
.large-nine { position: relative; z-index: 2; color: var(--blue); font-family: Georgia,serif; font-size: 170px; line-height: 1; }
.grid-lines { position: absolute; width: 200px; height: 200px; border: 2px solid rgba(13,27,42,.25); background: repeating-linear-gradient(0deg,transparent 0 65px,rgba(13,27,42,.18) 65px 67px),repeating-linear-gradient(90deg,transparent 0 65px,rgba(13,27,42,.18) 65px 67px); transform: rotate(5deg); }
.game-card-body { min-height: 180px; padding: 30px 31px 25px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.card-kicker { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.game-card h3 { margin: 6px 0 10px; font-size: 34px; }
.game-card p { margin: 0; max-width: 385px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.round-arrow { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--ink); color: white; font-size: 20px; transition: transform .2s; }
a:hover .round-arrow { transform: translateX(4px); }
.mode-row { padding: 16px 30px; display: flex; gap: 8px; border-top: 1px solid var(--line); }
.mode-row span { padding: 7px 10px; border-radius: 100px; background: var(--paper); color: var(--muted); font-size: 10px; font-weight: 750; }
.game-card-coming { min-height: 225px; padding: 38px; grid-column: 1 / -1; display: flex; align-items: center; gap: 28px; background: transparent; border-style: dashed; box-shadow: none; }
.coming-icon { width: 82px; height: 82px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 26px; background: var(--ink); color: var(--lime); font-size: 38px; font-weight: 300; }

.how-section { padding: 110px 0; color: white; background: var(--ink); }
.how-section h2 { max-width: 850px; margin-bottom: 65px; }
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-bottom: 55px; }
.steps > div { padding-top: 24px; border-top: 1px solid rgba(255,255,255,.16); }
.steps > div > span { color: var(--lime); font-size: 11px; font-weight: 850; }
.steps h3 { margin: 36px 0 9px; font-size: 22px; }
.steps p { max-width: 280px; color: rgba(255,255,255,.55); font-size: 14px; }

.site-footer { padding: 50px 0 calc(50px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(13,27,42,.08); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 13px; }
.footer-inner > div { display: flex; gap: 24px; font-size: 13px; font-weight: 700; }

.page-hero { padding-top: 100px; padding-bottom: 58px; }
.page-hero h1, .form-page h1, .content-page h1 { margin-bottom: 20px; font-size: clamp(48px, 7vw, 82px); line-height: .96; }
.page-hero p, .form-page > p { max-width: 610px; color: var(--muted); font-size: 18px; }
.page-hero-row { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.compact-top { padding-bottom: 110px; }
.narrow-shell { max-width: 760px; }
.content-page { padding-block: 90px 120px; }
.content-page h2 { margin: 44px 0 12px; font-size: 27px; }
.content-page p { color: var(--ink-soft); font-size: 17px; }

.back-link { display: inline-flex; margin-bottom: 30px; color: var(--muted); font-size: 13px; font-weight: 750; }
.back-link:hover { color: var(--ink); }
.back-link-light { color: rgba(255,255,255,.62); }
.form-page { padding-block: 75px 120px; }
.panel-form, .auth-card {
  padding: 34px;
  border: 1px solid rgba(13,27,42,.08);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}
.stack-form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label, .setup-label { color: var(--ink-soft); font-size: 13px; font-weight: 800; }
.field input, .copy-field input, .form-control {
  width: 100%;
  min-height: 56px;
  padding: 0 17px;
  border: 1px solid #d7dadd;
  border-radius: 15px;
  background: white;
  color: var(--ink);
  font-size: 16px;
  box-shadow: none;
}
.field input:focus, .copy-field input:focus, .form-control:focus { border-color: var(--blue); outline: 3px solid rgba(86,100,245,.12); box-shadow: none; }
.field input::placeholder { color: #9ba3aa; }
.field > span, .field-validation-error { color: #c83f3f; font-size: 12px; }
.field-label-row { display: flex; justify-content: space-between; align-items: center; }
.field-label-row a, .auth-switch a { color: var(--blue); font-size: 13px; font-weight: 750; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check-row input { width: 19px; height: 19px; accent-color: var(--blue); }
.validation-summary { color: #a92e2e; font-size: 13px; }
.validation-summary ul { margin: 0; padding-left: 18px; }
.panel-form > small, .invite-sheet > small { display: block; text-align: center; color: var(--muted); }

.auth-shell { min-height: calc(100vh - 80px); padding: 70px 24px 110px; display: grid; place-items: start center; background: radial-gradient(circle at 50% 0, #e7eaff 0, transparent 38%); }
.auth-card { width: min(100%, 510px); }
.auth-card h1 { margin-bottom: 13px; font-size: 42px; }
.auth-intro { margin-bottom: 30px; color: var(--muted); font-size: 14px; }
.auth-switch { margin: 26px 0 0; text-align: center; color: var(--muted); font-size: 14px; }

.group-list { display: grid; gap: 12px; }
.group-row { min-height: 92px; padding: 18px 22px; display: flex; align-items: center; gap: 18px; border: 1px solid rgba(13,27,42,.08); border-radius: 22px; background: white; transition: transform .2s, box-shadow .2s; }
.group-row:hover { transform: translateY(-3px); box-shadow: 0 15px 38px rgba(13,27,42,.08); }
.group-monogram { width: 55px; height: 55px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 18px; background: var(--blue); color: white; font-weight: 900; font-size: 19px; }
.group-main { display: grid; gap: 5px; flex: 1; }
.group-main strong { font-size: 18px; }
.group-main small { color: var(--muted); }
.empty-state { min-height: 420px; padding: 55px 24px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed #c8ced2; border-radius: var(--radius); }
.empty-state h2 { margin: 25px 0 10px; font-size: 34px; }
.empty-state p { max-width: 520px; margin-bottom: 25px; color: var(--muted); }
.empty-avatars { display: flex; }
.empty-avatars span { width: 58px; height: 58px; display: grid; place-items: center; margin-left: -8px; border: 4px solid var(--paper); border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 850; }
.empty-avatars span:nth-child(2) { background: var(--lime); color: var(--ink); }
.empty-avatars span:nth-child(3) { background: var(--coral); color: var(--ink); }

.group-hero { padding: 45px 0 65px; color: white; background: var(--ink); }
.group-title-row { display: flex; align-items: center; gap: 25px; }
.group-title-row h1 { margin: 0 0 8px; font-size: clamp(45px,6vw,72px); }
.group-title-row p { margin: 0; color: rgba(255,255,255,.55); }
.group-monogram-large { width: 90px; height: 90px; border-radius: 28px; background: var(--lime); color: var(--ink); font-size: 34px; }
.group-layout { padding-block: 70px 110px; display: grid; grid-template-columns: 1.5fr .8fr; gap: 40px; }
.small-heading h2 { font-size: 42px; }
.group-game-list { display: grid; gap: 13px; }
.group-game-row { padding: 20px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; border-radius: 22px; background: white; border: 1px solid rgba(13,27,42,.08); }
.group-game-row h3 { margin: 0 0 5px; font-size: 20px; }
.group-game-row p { margin: 0; color: var(--muted); font-size: 13px; }
.group-game-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; font-size: 20px; font-weight: 900; }
.group-game-icon-thirty { color: white; background: var(--blue); }
.group-game-icon-sudoku { color: var(--blue); background: var(--blue-soft); }
.group-game-icon-word-search { color: var(--ink); background: #ddf5c1; }
.group-game-icon-crossword { color: white; background: var(--ink); }
.group-game-icon-trivia { color: var(--ink); background: var(--coral); }
.group-sidebar { display: grid; gap: 18px; align-content: start; }
.invite-card, .member-card { padding: 25px; border-radius: 24px; background: white; border: 1px solid rgba(13,27,42,.08); }
.invite-card { background: var(--ink); color: white; }
.invite-card .card-kicker { color: var(--lime); }
.invite-card h3 { margin: 9px 0; font-size: 25px; }
.invite-card p { color: rgba(255,255,255,.58); font-size: 13px; }
.copy-field { display: flex; gap: 8px; margin-top: 20px; }
.copy-field input { min-width: 0; min-height: 48px; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); color: white; font-size: 12px; }
.copy-button { padding-inline: 15px; border: 0; border-radius: 14px; background: var(--lime); color: var(--ink); font-size: 12px; font-weight: 850; cursor: pointer; }
.copy-button.copied { background: white; }
.member-card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.member-card-title h3 { margin: 0; }
.member-card-title span { min-width: 28px; padding: 5px; border-radius: 8px; background: var(--paper); text-align: center; font-size: 12px; font-weight: 800; }
.member-row { padding: 11px 0; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.member-row > span:last-child { display: grid; gap: 3px; }
.member-row strong { font-size: 14px; }
.member-row small { color: var(--muted); font-size: 11px; }
.invite-page { min-height: calc(100vh - 80px); padding: 80px 24px; display: grid; place-items: start center; background: radial-gradient(circle at 50% 15%, rgba(86,100,245,.18), transparent 35%), var(--ink); }
.invite-sheet { width: min(100%, 530px); padding: 42px; border-radius: 32px; background: white; text-align: center; box-shadow: 0 35px 90px rgba(0,0,0,.3); }
.invite-sheet .group-monogram { margin: 0 auto 28px; }
.invite-sheet .eyebrow { justify-content: center; }
.invite-sheet h1 { margin-bottom: 15px; font-size: 42px; }
.invite-sheet p { color: var(--muted); }

.toast-message { position: fixed; z-index: 200; top: calc(92px + env(safe-area-inset-top)); left: 50%; padding: 13px 18px; border-radius: 14px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: 13px; font-weight: 750; transform: translate(-50%,-20px); opacity: 0; transition: all .25s; }
.toast-message.show { transform: translate(-50%,0); opacity: 1; }

/* Game surfaces */
.play-page { min-height: 100vh; padding-bottom: 100px; background: #f3f4f6; }
.play-topbar { min-height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.play-topbar .back-link { margin: 0; }
.play-title { display: flex; align-items: center; gap: 9px; }
.game-dot { width: 12px; height: 12px; border-radius: 4px; }
.game-dot-thirty { background: var(--blue); }
.game-dot-sudoku { background: var(--coral); }
.game-dot-word-search { background: #83bc38; }
.game-dot-crossword { background: var(--ink); }
.game-dot-trivia { background: var(--coral); }
.icon-button { width: 44px; height: 44px; justify-self: end; border: 0; border-radius: 15px; background: white; font-size: 19px; font-weight: 700; box-shadow: 0 5px 18px rgba(13,27,42,.06); cursor: pointer; }
.room-banner { min-height: 43px; padding: 10px 24px; display: flex; align-items: center; justify-content: center; gap: 9px; color: white; background: var(--blue); font-size: 12px; }
.room-banner span:not(.live-dot) { opacity: .7; }
.room-banner i { margin-left: 10px; font-style: normal; opacity: .75; }
.room-banner .live-dot { margin: 0; background: var(--lime); box-shadow: 0 0 0 5px rgba(217,255,98,.12); }
.room-banner-sudoku { background: var(--ink); }
.game-setup { padding-block: 55px 90px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: start; }
.setup-copy { position: sticky; top: 40px; padding-top: 45px; }
.setup-copy h1 { margin-bottom: 25px; font-size: clamp(55px,7vw,88px); line-height: .9; }
.setup-copy h1 em { color: var(--blue); font-family: Georgia,serif; font-weight: 400; }
.setup-copy p { max-width: 440px; color: var(--muted); font-size: 17px; }
.ios-sheet { padding: 30px; border: 1px solid rgba(13,27,42,.07); border-radius: 30px; background: rgba(255,255,255,.92); box-shadow: 0 20px 60px rgba(13,27,42,.08); backdrop-filter: blur(20px); }
.setup-group { margin-bottom: 30px; }
.setup-label { display: block; margin-bottom: 11px; }
.ios-segment { padding: 4px; display: grid; grid-template-columns: repeat(2,1fr); gap: 3px; border-radius: 14px; background: #e8eaed; }
.ios-segment button { min-height: 43px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 750; cursor: pointer; transition: background .2s, box-shadow .2s; }
.ios-segment button.active { color: var(--ink); background: white; box-shadow: 0 2px 7px rgba(13,27,42,.12); }
.ios-segment button span { margin-right: 4px; color: var(--blue); }
.setup-help { margin: 9px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.round-choice-grid { display: grid; gap: 10px; }
.round-choice { width: 100%; min-height: 82px; padding: 13px; display: flex; align-items: center; gap: 15px; border: 1.5px solid var(--line); border-radius: 18px; background: white; text-align: left; cursor: pointer; transition: border .2s, background .2s; }
.round-choice:hover { border-color: #b9bec2; }
.round-choice.active { border-color: var(--blue); background: #f7f7ff; }
.round-choice-icon { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 15px; color: white; background: var(--blue); font-size: 23px; font-weight: 900; }
.numbers-icon { color: var(--ink); background: var(--lime); }
.clue-twist-icon { color: var(--ink); background: #ffcf70; }
.ninefold-icon { color: white; background: linear-gradient(145deg,var(--blue),#8c58f5); }
.number-mix-picker { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; }
.number-mix-picker button { min-width: 0; min-height: 65px; padding: 8px 4px; display: grid; place-items: center; gap: 2px; border: 1.5px solid var(--line); border-radius: 15px; color: var(--ink); background: white; cursor: pointer; }
.number-mix-picker button strong { font-size: 20px; line-height: 1; }
.number-mix-picker button small { color: var(--muted); font-size: 9px; font-weight: 750; }
.number-mix-picker button.active { border-color: var(--blue); color: white; background: var(--blue); box-shadow: 0 8px 20px rgba(86,100,245,.18); }
.number-mix-picker button.active small { color: rgba(255,255,255,.72); }
.round-choice > span:nth-child(2) { flex: 1; display: grid; gap: 5px; }
.round-choice strong { font-size: 15px; }
.round-choice small { color: var(--muted); font-size: 12px; }
.round-choice i { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: white; font-style: normal; font-size: 12px; opacity: 0; }
.round-choice.active i { opacity: 1; }
.tv-fields { padding: 20px; margin-bottom: 25px; border-radius: 19px; background: #f1f2f4; }
.tv-fields > div[data-tv-for="numbers"] { display: grid; grid-template-columns: 1.5fr .7fr; gap: 10px; }
.tv-fields > div[data-tv-for="clue-twist"] { display: grid; gap: 10px; }
.setup-error { padding: 12px 14px; margin: 0 0 12px; border-radius: 12px; color: #9c2e2e; background: #ffe5e2; font-size: 13px; }

.thirty-board { max-width: 900px; padding-block: 35px 100px; }
.round-meta { display: flex; align-items: center; justify-content: space-between; }
.round-meta > div { display: grid; gap: 5px; }
.round-meta span { color: var(--blue); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.round-meta strong { font-size: 22px; }
.timer-wrap { margin: 38px auto 32px; display: grid; place-items: center; gap: 13px; }
.timer-ring {
  --progress: 100;
  width: 132px; height: 132px;
  padding: 7px;
  border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--progress) * 1%), #dfe2e6 0);
  transition: background .2s;
}
.timer-ring > div { width: 100%; height: 100%; display: grid; place-content: center; text-align: center; border-radius: 50%; background: #f3f4f6; }
.timer-ring strong { display: block; font-size: 50px; line-height: .85; font-variant-numeric: tabular-nums; letter-spacing: -.06em; }
.timer-ring span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.timer-ring.timer-urgent { background: conic-gradient(var(--coral) calc(var(--progress) * 1%), #dfe2e6 0); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.035); } }
.timer-toggle { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; cursor: pointer; }
.timer-toggle span { margin-right: 5px; color: var(--ink); }
.round-panel { max-width: 760px; margin: 0 auto; }
.letter-board { display: grid; grid-template-columns: repeat(var(--letter-count,9),1fr); gap: 7px; }
.letter-board span {
  aspect-ratio: .83;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  font-size: clamp(24px,4.2vw,42px);
  font-weight: 900;
  box-shadow: inset 0 -5px 0 rgba(13,27,42,.18), 0 8px 18px rgba(86,100,245,.13);
  animation: tile-in .35s both;
  animation-delay: var(--delay);
}
.ninefold-prompt { margin: 12px 2px -10px; color: var(--muted); font-size: 11px; text-align: center; }
.ninefold-prompt strong { margin-right: 5px; color: var(--blue); font-size: 9px; letter-spacing: .13em; }
.clue-twist-card { margin: 13px 0 -9px; padding: 17px 19px; display: grid; gap: 4px; border-radius: 17px; color: white; background: var(--ink); text-align: center; }
.clue-twist-card span { color: var(--lime); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.clue-twist-card strong { font-size: clamp(15px,2.4vw,20px); line-height: 1.35; }
@keyframes tile-in { from { transform: translateY(-12px) rotate(-3deg); opacity: 0; } }
.answer-sheet { margin-top: 25px; padding: 24px; border-radius: 25px; background: white; box-shadow: 0 12px 40px rgba(13,27,42,.06); }
.answer-sheet > label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 800; }
.answer-input-row { position: relative; margin-bottom: 16px; }
.answer-input-row input { width: 100%; height: 62px; padding: 0 55px 0 17px; border: 1.5px solid var(--line); border-radius: 17px; color: var(--ink); font-size: 24px; font-weight: 750; outline: none; text-transform: uppercase; }
.answer-input-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(86,100,245,.1); }
.answer-input-row span { position: absolute; right: 17px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; font-weight: 800; }
.input-hint { margin: -7px 3px 15px; color: var(--muted); font-size: 11px; }
.word-check-status:empty { display: none; }
.round-helper { margin-top: 16px; padding: 17px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 13px 16px; border: 1px solid var(--line); border-radius: 18px; background: #f7f8fa; }
.round-helper-copy { min-width: 0; display: grid; gap: 3px; }
.round-helper-copy span { color: var(--blue); font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.round-helper-copy strong { font-size: 14px; }
.round-helper-copy small { max-width: 520px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.round-helper-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.round-helper-result { grid-column: 1 / -1; padding-top: 13px; border-top: 1px solid var(--line); color: var(--ink); font-size: 12px; line-height: 1.55; }
.round-helper-result strong { color: var(--blue); }
.round-helper-words { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.round-helper-words span { padding: 7px 10px; border-radius: 100px; color: white; background: var(--ink); font-size: 11px; font-weight: 850; letter-spacing: .04em; }
.numbers-board { padding: 28px; border-radius: 28px; background: var(--ink); color: white; text-align: center; }
.target-label { display: block; margin-bottom: 3px; color: var(--lime); font-size: 10px; font-weight: 850; letter-spacing: .16em; }
.numbers-board > strong { display: block; margin-bottom: 24px; font-size: 66px; line-height: 1; letter-spacing: -.04em; }
.number-tiles { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.number-tiles button { min-width: 0; min-height: 58px; display: grid; place-items: center; border: 0; border-radius: 13px; background: white; color: var(--ink); font-size: 22px; font-weight: 900; cursor: pointer; box-shadow: inset 0 -4px 0 rgba(13,27,42,.13); animation: tile-in .35s both; animation-delay: var(--delay); transition: opacity .18s, transform .18s; }
.number-tiles button:active:not(:disabled) { transform: scale(.94); }
.number-tiles button.used, .number-tiles button:disabled { opacity: .3; cursor: default; box-shadow: none; }
.calculation-pad { margin: -5px 0 15px; }
.operator-pad { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 7px; }
.operator-pad button { min-width: 0; min-height: 46px; border: 0; border-radius: 13px; color: var(--blue); background: var(--blue-soft); font-size: 20px; font-weight: 850; cursor: pointer; }
.operator-pad button:active { transform: scale(.94); }
.operator-pad .calculation-key-wide { color: var(--ink); background: #eceef1; font-size: 12px; }
.result-sheet { position: relative; max-width: 760px; margin: 25px auto 0; padding: 40px; overflow: hidden; border-radius: 28px; background: var(--ink); color: white; }
.result-sheet h2 { margin-bottom: 10px; font-size: 38px; }
.result-sheet p { max-width: 570px; color: rgba(255,255,255,.6); }
.result-burst { position: absolute; top: -45px; right: -25px; color: rgba(217,255,98,.1); font-size: 180px; line-height: 1; }
.round-score { display: block; margin: 25px 0; color: var(--lime); font-size: 58px; }
.result-actions { display: flex; gap: 10px; }
.result-sheet .button-quiet { color: white; }

/* Sudoku */
.sudoku-layout { max-width: 1060px; padding-block: 55px 100px; }
.sudoku-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; }
.sudoku-heading h1 { margin: 0; font-size: 70px; line-height: .9; }
.sudoku-stats { display: flex; gap: 30px; }
.sudoku-stats span { display: grid; gap: 4px; min-width: 75px; }
.sudoku-stats small { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .09em; }
.sudoku-stats strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.sudoku-stats .score-stat strong { color: var(--blue); }
.sudoku-pause-button { min-width: 62px; padding: 7px 10px; display: grid; place-items: center; gap: 3px; border: 0; border-radius: 13px; color: var(--blue); background: white; cursor: pointer; box-shadow: 0 5px 16px rgba(13,27,42,.07); }
.sudoku-pause-button strong { font-size: 16px; line-height: 1; }
.sudoku-pause-button small { color: var(--muted); font-size: 8px; }
.sudoku-pause-button[aria-pressed="true"] { color: var(--ink); background: var(--lime); }
.difficulty-bar { width: min(100%, 440px); grid-template-columns: repeat(3,1fr); margin-bottom: 25px; }
.daily-score-strip { margin-bottom: 25px; padding: 14px 18px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) 1.35fr; gap: 0; border: 1px solid rgba(13,27,42,.07); border-radius: 18px; background: rgba(255,255,255,.78); box-shadow: 0 8px 28px rgba(13,27,42,.04); }
.daily-score-strip > span { min-width: 0; padding: 3px 18px; display: grid; gap: 4px; border-left: 1px solid var(--line); }
.daily-score-strip > span:first-child { padding-left: 0; border-left: 0; }
.daily-score-strip small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.daily-score-strip strong { overflow: hidden; font-size: 15px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.daily-score-strip .daily-leader strong { color: var(--blue); }
.sudoku-play-area { display: grid; grid-template-columns: minmax(0,650px) 1fr; align-items: start; gap: 38px; }
.sudoku-board-shell { position: relative; }
.sudoku-grid { width: 100%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(9,minmax(0,1fr)); grid-template-rows: repeat(9,minmax(0,1fr)); overflow: hidden; border: 3px solid var(--ink); border-radius: 11px; background: white; box-shadow: 0 18px 55px rgba(13,27,42,.08); }
.sudoku-pause-overlay { position: absolute; z-index: 10; inset: 0; padding: 25px; display: grid; place-content: center; justify-items: center; border-radius: 11px; color: white; background: rgba(13,27,42,.97); text-align: center; }
.sudoku-pause-overlay[hidden] { display: none; }
.sudoku-pause-overlay > span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: var(--ink); background: var(--lime); font-size: 23px; font-weight: 900; }
.sudoku-pause-overlay h2 { margin: 18px 0 5px; font-size: clamp(28px,5vw,42px); }
.sudoku-pause-overlay p { max-width: 310px; margin-bottom: 22px; color: rgba(255,255,255,.6); }
.sudoku-is-paused .sudoku-grid { filter: blur(5px); }
.sudoku-cell { width: 100%; height: 100%; min-width: 0; min-height: 0; padding: 0; position: relative; display: grid; place-items: center; border: 0; border-right: 1px solid #cbd0d5; border-bottom: 1px solid #cbd0d5; background: white; color: var(--blue); font-size: clamp(18px,3.1vw,30px); font-weight: 650; cursor: pointer; }
.sudoku-cell:nth-child(3n):not(:nth-child(9n)) { border-right: 2.5px solid var(--ink); }
.sudoku-cell:nth-child(n+28):nth-child(-n+36),
.sudoku-cell:nth-child(n+55):nth-child(-n+63) { border-top: 2.5px solid var(--ink); }
.sudoku-cell.given { color: var(--ink); font-weight: 850; }
.sudoku-cell.peer { background: #f1f2f9; }
.sudoku-cell.same-number { background: #dfe3ff; }
.sudoku-cell.selected { z-index: 2; background: #cbd1ff; box-shadow: inset 0 0 0 2px var(--blue); }
.sudoku-cell.mistake { color: #c83f3f; background: #ffe2df; animation: shake .35s; }
.sudoku-cell.unit-complete::after { content: ""; position: absolute; z-index: 3; inset: 0; pointer-events: none; background: var(--lime); opacity: 0; animation: unit-glow .82s ease-out var(--wave-delay) both; }
.score-pop { position: absolute; z-index: 5; top: 46%; left: 50%; padding: 3px 6px; border-radius: 8px; color: white; background: var(--blue); box-shadow: 0 5px 14px rgba(86,100,245,.35); font-size: clamp(8px,1.2vw,11px); font-weight: 900; line-height: 1; pointer-events: none; animation: score-float .9s ease-out both; }
.score-pop-hint { color: var(--ink); background: var(--lime); box-shadow: 0 5px 14px rgba(186,223,67,.32); }
@keyframes shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
@keyframes unit-glow { 0% { opacity: 0; } 28% { opacity: .52; } 100% { opacity: 0; } }
@keyframes score-float { 0% { opacity: 0; transform: translate(-50%,4px) scale(.75); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-28px) scale(1.05); } }
.note-grid { position: absolute; inset: 3px; display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); }
.note-grid i { display: grid; place-items: center; color: #75808a; font-size: clamp(7px,1.3vw,11px); font-style: normal; font-weight: 650; }
.sudoku-tools { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 18px; }
.sudoku-tools button { min-height: 70px; position: relative; display: grid; place-items: center; align-content: center; gap: 4px; border: 0; border-radius: 17px; background: white; color: var(--ink); cursor: pointer; }
.sudoku-tools button > span { color: var(--blue); font-size: 24px; line-height: 1; }
.sudoku-tools button small { color: var(--muted); font-size: 10px; font-weight: 750; }
.sudoku-tools button i { position: absolute; top: 7px; right: 7px; padding: 3px 5px; border-radius: 5px; color: var(--muted); background: #eef0f2; font-size: 7px; font-style: normal; font-weight: 850; }
.sudoku-tools button.active { background: var(--blue); }
.sudoku-tools button.active > span, .sudoku-tools button.active small { color: white; }
.sudoku-tools button.active i { color: var(--blue); background: white; }
.sudoku-tools button:disabled { opacity: .45; cursor: default; }
.number-pad { display: grid; grid-template-columns: repeat(9,1fr); gap: 7px; margin-top: 12px; }
.number-pad button { min-width: 0; aspect-ratio: .84; border: 0; border-radius: 14px; background: white; color: var(--blue); font-size: clamp(20px,3.5vw,30px); font-weight: 750; cursor: pointer; box-shadow: 0 4px 12px rgba(13,27,42,.045); }
.number-pad button:active { transform: scale(.94); background: var(--blue-soft); }
.number-pad button:disabled { color: #c3c7ca; background: #eceef0; }
.sudoku-side-card { padding: 28px; border-radius: 25px; background: var(--ink); color: white; }
.sudoku-side-card h2 { margin: 9px 0; font-size: 30px; }
.sudoku-side-card > p { color: rgba(255,255,255,.58); font-size: 13px; }
.sudoku-side-card .card-kicker { color: var(--lime); }
.side-tip { padding-top: 18px; margin-top: 18px; display: flex; gap: 12px; border-top: 1px solid rgba(255,255,255,.13); }
.side-tip > span:not(.live-dot) { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; color: var(--ink); background: var(--lime); }
.side-tip .live-dot { margin: 12px; flex: 0 0 auto; }
.side-tip p { margin: 0; color: rgba(255,255,255,.55); font-size: 11px; line-height: 1.5; }
.side-tip strong { color: white; font-size: 12px; }
.completion-overlay { position: fixed; z-index: 100; inset: 0; padding: 25px; display: grid; place-items: center; background: rgba(13,27,42,.72); backdrop-filter: blur(12px); }
.completion-sheet { width: min(100%,470px); padding: 40px; position: relative; overflow: hidden; border-radius: 30px; background: white; box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.completion-sheet h2 { margin-bottom: 10px; font-size: 39px; }
.completion-sheet p { color: var(--muted); }
.completion-sheet .result-burst { color: rgba(86,100,245,.07); }
.completion-sheet .button + .button { margin-top: 8px; }
.completion-score-card { margin: 24px 0; padding: 15px 18px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 17px; background: var(--paper); }
.completion-score-card span { display: grid; gap: 4px; }
.completion-score-card span + span { padding-left: 18px; border-left: 1px solid var(--line); }
.completion-score-card small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.completion-score-card strong { color: var(--blue); font-size: 23px; font-variant-numeric: tabular-nums; }

/* Word Search, Mini Crossword and Trivia */
.casual-game-page { background: #f5f6f7; }
.casual-game-shell { padding-top: 48px; }
.casual-game-heading { margin-bottom: 28px; display: flex; align-items: end; justify-content: space-between; gap: 35px; }
.casual-game-heading h1, .trivia-heading h1 { margin: 6px 0 10px; font-size: clamp(48px,7vw,78px); line-height: .95; }
.casual-game-heading p { max-width: 620px; margin: 0; color: var(--muted); }
.casual-stats { display: flex; gap: 10px; flex: 0 0 auto; }
.casual-stats span { min-width: 95px; padding: 13px 15px; display: grid; gap: 3px; border-radius: 17px; background: white; box-shadow: 0 6px 18px rgba(13,27,42,.05); }
.casual-stats small, .trivia-score small { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.casual-stats strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.word-search-layout, .crossword-layout { display: grid; grid-template-columns: minmax(0,720px) minmax(260px,1fr); gap: 28px; align-items: start; }
.puzzle-surface { min-width: 0; padding: 23px; border: 1px solid rgba(13,27,42,.07); border-radius: 28px; background: white; box-shadow: 0 18px 55px rgba(13,27,42,.07); }
.puzzle-surface-top { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.puzzle-surface-top > div { display: grid; }
.puzzle-surface-top small { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.puzzle-surface-top strong { font-size: 20px; }
.puzzle-surface-top > span { color: var(--blue); font-size: 11px; font-weight: 750; text-align: right; }
.casual-difficulty { margin-bottom: 24px; }
.word-search-grid { display: grid; grid-template-columns: repeat(var(--word-grid-size,10),minmax(0,1fr)); gap: 4px; touch-action: manipulation; user-select: none; }
.word-search-grid button { min-width: 0; aspect-ratio: 1; padding: 0; border: 0; border-radius: 9px; color: var(--ink); background: #f1f3f5; font-size: clamp(13px,2.2vw,22px); font-weight: 850; cursor: pointer; transition: color .15s, background .15s, transform .15s; }
.word-search-grid[data-difficulty="hard"] button { border-radius: 7px; font-size: clamp(10px,1.7vw,17px); }
.word-search-grid button:active { transform: scale(.88); }
.word-search-grid button.selection-start { color: white; background: var(--blue); box-shadow: 0 0 0 3px rgba(86,100,245,.2); }
.word-search-grid button.word-found { color: var(--ink); background: var(--lime); }
.game-side-panel { padding: 25px; border-radius: 27px; color: white; background: var(--ink); }
.game-side-panel .card-kicker { color: var(--lime); }
.word-list { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.word-list > span { padding: 10px 9px; border-radius: 11px; color: white; background: rgba(255,255,255,.08); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-align: center; }
.word-list > span.found { color: var(--ink); background: var(--lime); text-decoration: line-through; }

.check-puzzle-button { min-height: 42px; padding: 0 15px; border: 0; border-radius: 13px; color: white; background: var(--blue); font-size: 11px; font-weight: 800; cursor: pointer; }
.crossword-grid { width: min(100%,570px); margin-inline: auto; display: grid; grid-template-columns: repeat(var(--crossword-size,4),1fr); border: 3px solid var(--ink); background: var(--ink); gap: 2px; }
.crossword-cell { aspect-ratio: 1; position: relative; display: grid; place-items: center; background: white; }
.crossword-cell.active-entry { background: #edf0ff; }
.crossword-cell.selected { background: var(--lime); }
.crossword-cell.needs-check { background: #ffe4df; }
.crossword-cell > span { position: absolute; z-index: 2; top: 4px; left: 5px; color: var(--ink); font-size: clamp(7px,1.2vw,10px); font-weight: 800; pointer-events: none; }
.crossword-cell input { width: 100%; height: 100%; padding: 10% 0 0; border: 0; border-radius: 0; color: var(--ink); background: transparent; font-size: clamp(30px,7vw,58px); font-weight: 750; text-align: center; text-transform: uppercase; caret-color: var(--blue); }
.crossword-grid[data-difficulty="hard"] .crossword-cell input { font-size: clamp(25px,5vw,46px); }
.crossword-cell input:focus { outline: 0; box-shadow: inset 0 0 0 3px var(--blue); }
.crossword-message { min-height: 20px; margin: 15px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.crossword-clues { display: grid; gap: 25px; }
.clue-column ol { margin: 12px 0 0; padding: 0; display: grid; gap: 6px; list-style: none; }
.clue-column button { width: 100%; padding: 10px; display: grid; grid-template-columns: 22px 1fr; gap: 6px; border: 0; border-radius: 11px; color: rgba(255,255,255,.67); background: transparent; font-size: 11px; line-height: 1.4; text-align: left; cursor: pointer; }
.clue-column button strong { color: white; }
.clue-column button.active { color: var(--ink); background: var(--lime); }
.clue-column button.active strong { color: var(--ink); }

.trivia-shell { width: min(100% - 48px,850px); padding-top: 48px; }
.trivia-heading { margin-bottom: 25px; display: flex; align-items: end; justify-content: space-between; gap: 25px; }
.trivia-score { min-width: 125px; padding: 15px 20px; display: grid; gap: 2px; border-radius: 18px; background: var(--ink); color: white; text-align: right; }
.trivia-score small { color: var(--lime); }
.trivia-score strong { font-size: 27px; font-variant-numeric: tabular-nums; }
.trivia-progress { margin-bottom: 14px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 15px; color: var(--muted); font-size: 10px; font-weight: 800; }
.trivia-progress > div { height: 7px; overflow: hidden; border-radius: 100px; background: #e2e5e8; }
.trivia-progress i { height: 100%; display: block; border-radius: inherit; background: var(--blue); transition: width .3s ease; }
.trivia-card { padding: clamp(25px,5vw,48px); border: 1px solid rgba(13,27,42,.07); border-radius: 31px; background: white; box-shadow: 0 20px 65px rgba(13,27,42,.08); }
.trivia-category { padding: 7px 10px; display: inline-block; border-radius: 100px; color: var(--blue); background: var(--blue-soft); font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.trivia-card h2 { min-height: 100px; margin: 24px 0 28px; font-size: clamp(28px,4.5vw,42px); line-height: 1.12; }
.trivia-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trivia-options button { min-height: 72px; padding: 12px 15px; display: flex; align-items: center; gap: 13px; border: 1.5px solid var(--line); border-radius: 17px; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.trivia-options button > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 850; }
.trivia-options button strong { font-size: 14px; }
.trivia-options button:not(:disabled):active { transform: scale(.98); }
.trivia-options button.correct { border-color: #94c74d; background: #effbdc; }
.trivia-options button.correct > span { color: var(--ink); background: var(--lime); }
.trivia-options button.incorrect { border-color: var(--coral); background: #fff0ed; }
.trivia-options button.incorrect > span { color: var(--ink); background: var(--coral); }
.trivia-options button:disabled { cursor: default; }
.trivia-feedback { margin: 20px 0 14px; padding: 15px; display: flex; align-items: center; gap: 12px; border-radius: 16px; background: #effbdc; }
.trivia-feedback[hidden] { display: none; }
.trivia-feedback > span { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; color: var(--ink); background: var(--lime); font-weight: 900; }
.trivia-feedback p { margin: 0; display: grid; }
.trivia-feedback small { color: var(--muted); line-height: 1.4; }
.trivia-feedback.incorrect { background: #fff0ed; }
.trivia-feedback.incorrect > span { background: var(--coral); }
.trivia-room-note { margin-top: 16px; color: var(--muted); font-size: 11px; text-align: center; }
.trivia-room-note .live-dot { margin-right: 8px; }

/* Identity UI compatibility */
.container { width: min(1100px, calc(100% - 48px)); margin-inline: auto; }
.row { display: flex; flex-wrap: wrap; gap: 24px; }
.col-md-4, .col-md-6 { flex: 1 1 360px; }
.btn { min-height: 44px; padding: 0 18px; border: 0; border-radius: 13px; font-weight: 750; cursor: pointer; }
.btn-primary { background: var(--blue); color: white; }
.form-floating { margin-bottom: 15px; }
.form-check-input { accent-color: var(--blue); }
.nav-pills { list-style: none; padding: 0; }
.nav-pills .nav-link { display: block; padding: 10px 14px; border-radius: 10px; }
.nav-pills .active { color: white; background: var(--blue); }

@media (max-width: 900px) {
  .hero { min-height: auto; grid-template-columns: 1fr; padding-block: 75px 90px; }
  .hero-game { max-width: 470px; margin: 10px auto 0; }
  .game-setup { grid-template-columns: 1fr; gap: 20px; }
  .setup-copy { position: static; padding-top: 0; }
  .setup-copy h1 { font-size: 65px; }
  .group-layout { grid-template-columns: 1fr; }
  .sudoku-play-area { grid-template-columns: minmax(0,650px); justify-content: center; }
  .sudoku-side-card { display: none; }
}

@media (max-width: 720px) {
  .section-shell, .nav-shell, .footer-inner { width: min(100% - 30px, 1180px); }
  .site-header { position: sticky; top: 0; }
  .nav-shell { min-height: 68px; }
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed;
    inset: calc(68px + env(safe-area-inset-top)) 0 0;
    padding: 24px 18px calc(35px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 25px;
    background: var(--paper);
    transform: translateX(100%);
    transition: transform .25s ease;
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-links { display: grid; gap: 0; }
  .nav-links a { padding: 20px 5px; border-bottom: 1px solid var(--line); font-size: 24px; }
  .account-actions { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; }
  .account-actions .profile-chip { grid-column: 1 / -1; }
  .account-actions form, .account-actions form .button { width: 100%; }
  .profile-name { display: inline; }
  .hero { padding: 65px 20px 75px; gap: 48px; }
  .hero h1 { font-size: 57px; }
  .hero-copy > p { font-size: 16px; }
  .hero-actions { display: grid; }
  .hero-game { transform: none; }
  .phone-card { padding: 20px; border-radius: 29px; }
  .float-tag { display: none; }
  .game-picker { padding-block: 75px; }
  .section-heading { align-items: start; }
  .section-heading h2 { font-size: 42px; }
  .section-heading .text-link { display: none; }
  .game-card-grid { grid-template-columns: 1fr; }
  .game-art { height: 230px; }
  .mini-letters i { width: min(12vw,58px); }
  .game-card-body { min-height: 160px; padding: 25px; }
  .game-card-coming { grid-column: auto; padding: 28px; }
  .how-section { padding: 78px 0; }
  .how-section h2 { font-size: 42px; }
  .steps { grid-template-columns: 1fr; gap: 35px; }
  .steps h3 { margin-top: 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .page-hero { padding-top: 68px; }
  .page-hero-row { align-items: start; flex-direction: column; }
  .group-title-row { align-items: flex-start; }
  .group-monogram-large { width: 70px; height: 70px; border-radius: 22px; font-size: 27px; }
  .group-game-row { grid-template-columns: auto 1fr; }
  .group-game-row form { grid-column: 1 / -1; }
  .group-game-row .button { width: 100%; }
  .group-layout { padding-top: 50px; }
  .form-page { padding-top: 55px; }
  .panel-form, .auth-card { padding: 24px; border-radius: 24px; }
  .auth-shell { padding-top: 38px; }
  .invite-sheet { padding: 30px 23px; }
  .play-page { padding-bottom: calc(65px + env(safe-area-inset-bottom)); }
  .play-topbar { min-height: 65px; }
  .game-setup { padding-block: 35px 65px; }
  .setup-copy h1 { font-size: 54px; }
  .setup-copy p { font-size: 15px; }
  .ios-sheet { padding: 19px; border-radius: 25px; }
  .tv-fields > div[data-tv-for="numbers"] { grid-template-columns: 1fr; }
  .thirty-board { padding-top: 25px; }
  .timer-wrap { margin-block: 25px 23px; }
  .timer-ring { width: 112px; height: 112px; }
  .timer-ring strong { font-size: 42px; }
  .letter-board { gap: 4px; }
  .letter-board span { border-radius: 8px; box-shadow: inset 0 -3px 0 rgba(13,27,42,.18); }
  .answer-sheet { padding: 17px; border-radius: 21px; }
  .round-helper { grid-template-columns: 1fr; align-items: stretch; }
  .round-helper > .button, .round-helper-actions { width: 100%; }
  .round-helper-actions .button { flex: 1; }
  .number-tiles { gap: 5px; }
  .number-tiles button { min-height: 50px; font-size: 18px; border-radius: 10px; }
  .numbers-board { padding: 22px 14px; }
  .numbers-board > strong { font-size: 56px; }
  .operator-pad { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .result-sheet { padding: 30px 23px; }
  .result-actions { display: grid; }
  .sudoku-layout { padding-top: 34px; }
  .sudoku-heading { align-items: start; flex-direction: column; gap: 18px; }
  .sudoku-heading h1 { font-size: 53px; }
  .sudoku-stats { width: 100%; justify-content: space-between; gap: 14px; }
  .sudoku-stats span { min-width: 58px; }
  .daily-score-strip { grid-template-columns: repeat(3,minmax(0,1fr)); padding: 13px 10px; }
  .daily-score-strip > span { padding-inline: 10px; text-align: center; }
  .daily-score-strip .daily-leader { grid-column: 1 / -1; margin-top: 12px; padding: 12px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .sudoku-grid { border-width: 2px; border-radius: 7px; }
  .sudoku-tools button { min-height: 62px; }
  .number-pad { gap: 4px; }
  .number-pad button { border-radius: 10px; }
  .completion-sheet { padding: 34px 24px; }
}

@media (max-width: 390px) {
  .profile-name { display: none; }
  .hero h1 { font-size: 50px; }
  .letter-preview span { font-size: 21px; }
  .round-choice { min-height: 75px; }
  .round-choice-icon { width: 46px; height: 46px; }
  .sudoku-stats small { font-size: 8px; }
  .sudoku-stats strong { font-size: 13px; }
  .sudoku-tools button { min-height: 58px; }
  .sudoku-tools button > span { font-size: 20px; }
}

@media (max-width: 900px) {
  .word-search-layout, .crossword-layout { grid-template-columns: minmax(0,680px); justify-content: center; }
  .game-side-panel { width: 100%; }
}

@media (max-width: 720px) {
  .casual-game-shell { padding-top: 30px; }
  .casual-game-heading { align-items: start; flex-direction: column; gap: 16px; }
  .casual-game-heading h1, .trivia-heading h1 { font-size: 48px; }
  .casual-game-heading p { font-size: 14px; }
  .casual-stats { width: 100%; }
  .casual-stats span { flex: 1; }
  .puzzle-surface { padding: 14px; border-radius: 22px; }
  .puzzle-surface-top { align-items: flex-start; }
  .puzzle-surface-top > span { max-width: 135px; }
  .word-search-grid { gap: 3px; }
  .word-search-grid button { border-radius: 6px; font-size: clamp(12px,4vw,17px); }
  .game-side-panel { padding: 21px; border-radius: 22px; }
  .crossword-cell input { font-size: clamp(30px,13vw,50px); }
  .trivia-shell { width: min(100% - 30px,850px); padding-top: 30px; }
  .trivia-heading { align-items: start; }
  .trivia-score { min-width: 105px; padding: 12px 15px; }
  .trivia-card { border-radius: 24px; }
  .trivia-card h2 { min-height: 0; margin-block: 20px 23px; }
  .trivia-options { grid-template-columns: 1fr; }
  .trivia-options button { min-height: 61px; }
}

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