/* Sandline — design system */
:root {
  --bg: #fbfbfd;
  --bg-2: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.14);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --sun: #ff9f0a;
  --sun-soft: rgba(255, 159, 10, 0.14);
  --ok: #248a3d;
  --ok-bg: rgba(52, 199, 89, 0.14);
  --warn: #b25000;
  --warn-bg: rgba(255, 159, 10, 0.16);
  --bad: #d70015;
  --bad-bg: rgba(255, 59, 48, 0.12);
  --info-bg: rgba(0, 113, 227, 0.1);
  --sand: #f3e4c6;
  --sand-2: #e9d2a3;
  --sand-line: rgba(140, 100, 40, 0.35);
  --sea-1: #0a84ff;
  --sea-2: #5ac8fa;
  --glass: rgba(251, 251, 253, 0.72);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-3: 0 30px 80px rgba(0, 0, 0, 0.14);
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 22px;
  --r-xl: 30px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-2: #0b0b0c;
    --surface: #161618;
    --surface-2: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --line: rgba(255, 255, 255, 0.1);
    --line-2: rgba(255, 255, 255, 0.18);
    --accent: #2997ff;
    --accent-hover: #47a6ff;
    --accent-soft: rgba(41, 151, 255, 0.16);
    --ok: #30d158;
    --ok-bg: rgba(48, 209, 88, 0.16);
    --warn: #ffb340;
    --warn-bg: rgba(255, 159, 10, 0.18);
    --bad: #ff6961;
    --bad-bg: rgba(255, 69, 58, 0.18);
    --info-bg: rgba(41, 151, 255, 0.16);
    --sand: #3a3126;
    --sand-2: #4a3e2e;
    --sand-line: rgba(255, 220, 160, 0.3);
    --glass: rgba(22, 22, 24, 0.72);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-3: 0 30px 80px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-2: #0b0b0c; --surface: #161618; --surface-2: #1c1c1e; --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #8e8e93;
  --line: rgba(255, 255, 255, 0.1); --line-2: rgba(255, 255, 255, 0.18); --accent: #2997ff; --accent-hover: #47a6ff; --accent-soft: rgba(41, 151, 255, 0.16);
  --ok: #30d158; --ok-bg: rgba(48, 209, 88, 0.16); --warn: #ffb340; --warn-bg: rgba(255, 159, 10, 0.18); --bad: #ff6961; --bad-bg: rgba(255, 69, 58, 0.18);
  --info-bg: rgba(41, 151, 255, 0.16); --sand: #3a3126; --sand-2: #4a3e2e; --sand-line: rgba(255, 220, 160, 0.3); --glass: rgba(22, 22, 24, 0.72);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-2: 0 12px 40px rgba(0, 0, 0, 0.5); --shadow-3: 0 30px 80px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
p { margin: 0; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; border-radius: 8px; }

/* ---------- Layout ---------- */
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.wrap-narrow { width: min(680px, 100% - 32px); margin-inline: auto; }
.wrap-wide { width: min(1360px, 100% - 32px); margin-inline: auto; }
main { min-height: calc(100vh - 52px); }
.page { padding: 40px 0 96px; animation: pageIn 0.5s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: var(--gap, 20px); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.grid > * { min-width: 0; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: 52px;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { width: min(1360px, 100% - 32px); margin: 0 auto; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: -0.03em; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a, .nav-links button.link { font-size: 14px; color: var(--text); opacity: 0.8; padding: 6px 12px; border-radius: 999px; background: none; border: 0; cursor: pointer; }
.nav-links a:hover, .nav-links button.link:hover { opacity: 1; text-decoration: none; background: var(--line); }
.nav-links a.btn { background: var(--accent); color: #fff; opacity: 1; padding: 0 14px; }
.nav-links a.btn:hover { background: var(--accent-hover); }
body.tv .nav { display: none; }
.theme-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; opacity: 0.8; flex: none; transition: background 0.2s, opacity 0.2s, transform 0.3s var(--spring); }
.theme-btn:hover { opacity: 1; background: var(--line); }
.theme-btn:active { transform: rotate(30deg) scale(0.92); }
.theme-btn.floating { position: fixed; right: 16px; bottom: 16px; z-index: 60; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-2); width: 44px; height: 44px; }
html { transition: background-color 0.3s; }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--accent); --b-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--b-bg); color: var(--b-fg);
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; cursor: pointer; white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s, opacity 0.2s;
  text-decoration: none !important;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn.secondary { --b-bg: var(--accent-soft); --b-fg: var(--accent); }
.btn.secondary:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.btn.ghost { --b-bg: transparent; --b-fg: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { background: var(--line); }
.btn.dark { --b-bg: var(--text); --b-fg: var(--bg); }
.btn.dark:hover { opacity: 0.88; background: var(--text); }
.btn.danger { --b-bg: var(--bad-bg); --b-fg: var(--bad); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 22%, transparent); }
.btn.ok { --b-bg: #34c759; --b-fg: #fff; }
.btn.ok:hover { background: #30b350; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn.xs { height: 28px; padding: 0 11px; font-size: 13px; }
.btn.lg { height: 56px; padding: 0 30px; font-size: 18px; }
.btn.block { width: 100%; }
.btn.icon { width: 34px; padding: 0; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Cards ---------- */
.card { background: var(--surface); border-radius: var(--r-l); padding: 28px; box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.card.flat { box-shadow: none; }
.card.pad-s { padding: 18px; }
.card.pad-l { padding: 40px; }
.card h3 { font-size: 21px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-title h3 { font-size: 21px; }
.section-title { font-size: 28px; margin-bottom: 6px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--sun); letter-spacing: 0; text-transform: none; }
.hover-lift { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.input, select.input, textarea.input {
  width: 100%; height: 48px; padding: 0 16px; border-radius: var(--r-m);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font: inherit; font-size: 17px; letter-spacing: -0.01em;
  transition: border-color 0.2s, box-shadow 0.2s; appearance: none; -webkit-appearance: none;
}
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
textarea.input { height: auto; min-height: 96px; padding: 12px 16px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input.sm { height: 36px; font-size: 15px; padding: 0 12px; border-radius: 10px; }
.input::placeholder { color: var(--text-3); }
.hint { font-size: 13px; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 1px; flex: none; }

/* Switch (the host's "paid" tick) */
.switch { position: relative; display: inline-flex; width: 51px; height: 31px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background 0.25s var(--ease); }
.switch .thumb { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16); transition: transform 0.3s var(--spring); }
.switch input:checked + .track { background: #34c759; }
.switch input:checked + .track + .thumb { transform: translateX(20px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px var(--accent-soft); }

/* Segmented control */
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--line); gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: none; padding: 7px 16px; border-radius: 9px; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--text); white-space: nowrap; transition: background 0.2s, box-shadow 0.2s; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.04); font-weight: 600; }
.seg.lg button { padding: 10px 20px; font-size: 15px; }
.seg .count { margin-left: 6px; font-size: 12px; color: var(--text-3); font-weight: 600; }

/* Chips & pills */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0; white-space: nowrap; background: var(--line); color: var(--text-2); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--accent); }
.pill.live { background: var(--bad-bg); color: var(--bad); }
.pill.live::before, .dot-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.75); } }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 14px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Toasts & modal ---------- */
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(520px, 100% - 32px); }
.toast { background: rgba(29, 29, 31, 0.92); color: #fff; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 12px 20px; border-radius: 999px; font-size: 15px; font-weight: 500; box-shadow: var(--shadow-2); animation: toastIn 0.45s var(--spring) both; text-align: center; }
.toast.err { background: rgba(215, 0, 21, 0.94); }
.toast.out { animation: toastOut 0.3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(0.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.32); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; animation: fade 0.25s var(--ease) both; }
.modal { background: var(--surface); border-radius: var(--r-xl); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 32px; box-shadow: var(--shadow-3); animation: modalIn 0.45s var(--spring) both; }
.modal.wide { width: min(820px, 100%); }
.modal h2 { font-size: 26px; margin-bottom: 6px; }
@keyframes fade { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(0.97); } }

/* ---------- Landing ---------- */
.hero { position: relative; padding: 96px 0 40px; text-align: center; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 120%; background: radial-gradient(50% 50% at 30% 30%, rgba(90, 200, 250, 0.22), transparent 70%), radial-gradient(40% 40% at 75% 25%, rgba(255, 159, 10, 0.18), transparent 70%); z-index: -1; filter: blur(10px); }
.hero h1 { font-size: clamp(44px, 8vw, 92px); letter-spacing: -0.045em; line-height: 1.02; font-weight: 800; }
.grad { background: linear-gradient(100deg, #0a84ff 0%, #5ac8fa 35%, #ffb340 70%, #ff7a45 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: clamp(19px, 2.3vw, 24px); color: var(--text-2); max-width: 720px; margin: 24px auto 36px; line-height: 1.4; letter-spacing: -0.015em; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-visual { margin: 64px auto 0; width: min(1080px, 100% - 32px); perspective: 1600px; }
.hero-board { border-radius: 28px; padding: 22px; background: linear-gradient(180deg, var(--surface), var(--surface-2)); box-shadow: var(--shadow-3); border: 1px solid var(--line); transform: rotateX(12deg); transform-origin: 50% 0; animation: boardIn 1.2s var(--ease) 0.2s both; }
@keyframes boardIn { from { opacity: 0; transform: rotateX(28deg) translateY(40px); } }
.hero-board .board-head { display: flex; justify-content: space-between; align-items: center; margin: 0 4px 16px; }
.lsec { padding: 110px 0; }
.lsec.alt { background: var(--bg-2); }
.lsec h2 { font-size: clamp(36px, 5.4vw, 64px); letter-spacing: -0.04em; line-height: 1.05; }
.lsec .sub { font-size: clamp(18px, 2vw, 22px); color: var(--text-2); max-width: 680px; margin-top: 18px; line-height: 1.45; }
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.tile { background: var(--surface); border-radius: var(--r-xl); padding: 34px; border: 1px solid var(--line); position: relative; overflow: hidden; min-height: 280px; display: flex; flex-direction: column; }
.tile h3 { font-size: 28px; letter-spacing: -0.03em; margin-bottom: 10px; }
.tile p { color: var(--text-2); font-size: 17px; }
.tile .art { margin-top: auto; padding-top: 24px; }
.t-2 { grid-column: span 2; } .t-3 { grid-column: span 3; } .t-4 { grid-column: span 4; } .t-6 { grid-column: span 6; }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr 1fr; } .t-2, .t-3, .t-4, .t-6 { grid-column: span 2; } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } .t-2, .t-3, .t-4, .t-6 { grid-column: span 1; } }
.tile.dark { background: #000; color: #f5f5f7; border-color: #1d1d1f; }
.tile.dark p { color: #a1a1a6; }
.tile.sunny { background: linear-gradient(160deg, #fff6e6, #ffe1b3); border: 0; }
.tile.sunny p, .tile.sunny h3 { color: #4a2c00; }
.tile.ocean { background: linear-gradient(160deg, #0a84ff, #5ac8fa); color: #fff; border: 0; }
.tile.ocean p { color: rgba(255, 255, 255, 0.85); }
.big-num { font-size: 72px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; counter-reset: step; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 32px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--text); color: var(--bg); font-weight: 700; margin-bottom: 20px; }
.step h3 { font-size: 22px; margin-bottom: 8px; }
.step p { color: var(--text-2); }
.format-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.format-chips span { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); font-size: 14px; font-weight: 500; }
.tile:not(.dark):not(.ocean) .format-chips span { background: var(--bg-2); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; }
@media (max-width: 720px) { .compare { grid-template-columns: 1fr; } }
.compare ul { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 12px; }
.compare li { display: flex; gap: 10px; align-items: flex-start; }
.compare li::before { content: "✕"; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--bad-bg); color: var(--bad); font-weight: 700; }
.compare .good li::before { content: "✓"; background: var(--ok-bg); color: var(--ok); }
.footer { padding: 40px 0 60px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* ---------- Auth ---------- */
.auth { min-height: calc(100vh - 52px); display: grid; place-items: center; padding: 40px 16px; }
.auth .card { width: min(440px, 100%); padding: 40px; }
.auth h1 { font-size: 32px; margin-bottom: 6px; }

/* ---------- Page headers ---------- */
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.ph h1 { font-size: clamp(32px, 4.5vw, 48px); letter-spacing: -0.035em; }
.ph .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--text-2); font-size: 15px; margin-top: 10px; align-items: center; }
.tabs-bar { position: sticky; top: 52px; z-index: 20; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); padding: 10px 0; margin-bottom: 28px; border-bottom: 1px solid var(--line); }

/* ---------- Dashboard ---------- */
.t-card { display: flex; flex-direction: column; gap: 14px; color: var(--text); min-height: 210px; }
.t-card:hover { text-decoration: none; }
.t-card h3 { font-size: 22px; }
.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sea-1), var(--sea-2)); transition: width 0.6s var(--ease); }
.new-card { display: grid; place-items: center; text-align: center; border: 2px dashed var(--line-2); background: transparent; box-shadow: none; color: var(--text-2); min-height: 210px; cursor: pointer; }
.new-card:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.plus { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 30px; margin: 0 auto 12px; font-weight: 400; }
.empty { text-align: center; padding: 56px 20px; color: var(--text-2); }
.empty .emoji { font-size: 44px; margin-bottom: 12px; }
.empty h3 { color: var(--text); font-size: 22px; margin-bottom: 6px; }

/* ---------- Stats ---------- */
.stat { padding: 22px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.stat .v { font-size: 40px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; }
.stat .v small { font-size: 20px; color: var(--text-3); font-weight: 600; }
.stat .k { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.stat.accent { background: linear-gradient(150deg, #0a84ff, #5ac8fa); color: #fff; border: 0; }
.stat.accent .k, .stat.accent .v small { color: rgba(255, 255, 255, 0.85); }
.share { display: flex; gap: 10px; align-items: center; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.share .url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-family: var(--mono); color: var(--text-2); }
.callout { display: flex; gap: 16px; align-items: center; padding: 18px 22px; border-radius: var(--r-l); background: var(--info-bg); }
.callout.warn { background: var(--warn-bg); }
.callout.ok { background: var(--ok-bg); }
.callout .ic { font-size: 26px; flex: none; }

/* ---------- Tables / lists ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff; flex: none; letter-spacing: 0; }
.avatars { display: flex; flex: none; }
.avatars .avatar { width: 36px; height: 36px; font-size: 13px; border: 2px solid var(--surface); }
.avatars .avatar + .avatar { margin-left: -10px; }
.li .name { font-weight: 600; }
.li .sub { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 8px 10px; border-bottom: 1px solid var(--line); letter-spacing: 0; text-transform: uppercase; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.q td { background: color-mix(in srgb, var(--ok-bg) 50%, transparent); }
.table tr.q td:first-child { box-shadow: inset 3px 0 0 #34c759; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Format picker ---------- */
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .formats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .formats { grid-template-columns: 1fr; } }
.fmt { text-align: left; padding: 20px; border-radius: var(--r-l); border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease); display: flex; flex-direction: column; gap: 6px; }
.fmt:hover { transform: translateY(-2px); }
.fmt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.fmt .ico { height: 44px; margin-bottom: 8px; color: var(--accent); }
.fmt .ico svg { height: 44px; width: auto; display: block; }
.fmt b { font-size: 17px; }
.fmt span { font-size: 14px; color: var(--text-2); line-height: 1.4; }

/* ---------- Courts ---------- */
.courts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.court-card { border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow 0.3s; }
.court-card.live { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--sun) 60%, transparent), var(--shadow-1); }
.court-card.off { opacity: 0.55; }
.court-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; }
.court-head b { font-size: 16px; }
.sand {
  position: relative; margin: 0 14px; border-radius: 14px; aspect-ratio: 2 / 1;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1.5px) 0 0 / 9px 9px,
    radial-gradient(circle at 70% 60%, rgba(120, 80, 20, 0.12) 0 1px, transparent 1.5px) 0 0 / 7px 7px,
    linear-gradient(160deg, var(--sand), var(--sand-2));
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
}
.sand::before { content: ""; position: absolute; inset: 10px; border: 2px solid var(--sand-line); border-radius: 3px; }
.sand::after { content: ""; position: absolute; top: 4px; bottom: 4px; left: 50%; width: 3px; transform: translateX(-50%); background: repeating-linear-gradient(180deg, rgba(40, 40, 40, 0.65) 0 3px, transparent 3px 6px); border-radius: 2px; }
.side { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 14px; gap: 4px; }
.side .tn { font-weight: 700; font-size: 15px; line-height: 1.2; color: #3a2a10; letter-spacing: -0.02em; }
:root[data-theme="dark"] .side .tn { color: #f5e6cc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side .tn { color: #f5e6cc; } }
.side .sc { font-size: 32px; font-weight: 800; letter-spacing: -0.04em; color: #3a2a10; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .side .sc { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side .sc { color: #fff; } }
.sand.empty-court { display: grid; place-items: center; grid-template-columns: 1fr; }
.sand.empty-court .side .tn { opacity: 0.6; font-weight: 600; }
.court-foot { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.timer { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.next-up { font-size: 13px; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 10px; }
.next-up b { color: var(--text); font-weight: 600; }

/* ---------- Matches ---------- */
.match { display: grid; grid-template-columns: 1fr auto; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); overflow: hidden; font-size: 14px; }
.match .tm { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; align-items: center; min-width: 0; }
.match .tm + .tm { border-top: 1px solid var(--line); }
.match .tm .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match .tm.w .n { font-weight: 700; }
.match .tm .s { font-variant-numeric: tabular-nums; color: var(--text-2); display: flex; gap: 8px; }
.match .tm.w .s { color: var(--text); font-weight: 700; }
.match .tbd { color: var(--text-3); font-style: italic; }
.match-meta { font-size: 11px; color: var(--text-3); display: flex; justify-content: space-between; padding: 0 2px 4px; gap: 8px; font-weight: 500; }
.match.live { box-shadow: 0 0 0 1.5px var(--sun); }
.match.mine { box-shadow: 0 0 0 2px var(--accent); }
.mrow { display: grid; grid-template-columns: 70px 1fr auto; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mrow .when { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; }
.mrow .when small { display: block; font-weight: 500; color: var(--text-3); font-size: 12px; }
.mrow .vs { font-weight: 600; min-width: 0; }
.mrow .vs .sub { font-weight: 400; font-size: 13px; color: var(--text-2); }

/* ---------- Bracket ---------- */
.bracket { display: flex; gap: 28px; overflow-x: auto; padding: 6px 2px 18px; -webkit-overflow-scrolling: touch; }
.bracket .col { display: flex; flex-direction: column; justify-content: space-around; gap: 16px; min-width: 210px; flex: none; }
.bracket .col h4 { font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; text-align: center; margin-bottom: 4px; }
.bracket-label { font-size: 15px; font-weight: 700; margin: 24px 0 10px; }

/* ---------- Gantt ---------- */
.gantt { position: relative; overflow-x: auto; padding-bottom: 8px; }
.gantt-inner { position: relative; min-width: 100%; }
.g-row { display: flex; align-items: stretch; height: 56px; border-bottom: 1px solid var(--line); }
.g-label { position: sticky; left: 0; z-index: 2; width: 92px; flex: none; display: flex; align-items: center; font-size: 13px; font-weight: 600; background: var(--surface); padding-right: 10px; }
.g-track { position: relative; flex: 1; }
.g-bar { position: absolute; top: 8px; bottom: 8px; border-radius: 10px; padding: 4px 9px; font-size: 11px; line-height: 1.25; overflow: hidden; background: var(--accent-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); white-space: nowrap; text-overflow: ellipsis; }
.g-bar b { display: block; font-size: 11px; }
.g-bar.pool { background: var(--sun-soft); border-color: color-mix(in srgb, var(--sun) 35%, transparent); }
.g-bar.live { background: var(--sun); color: #fff; border: 0; }
.g-bar.done { background: var(--line); color: var(--text-3); border: 0; }
.g-axis { position: relative; height: 26px; margin-left: 92px; }
.g-axis span { position: absolute; font-size: 11px; color: var(--text-3); transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.g-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); z-index: 3; }

/* ---------- Score editor ---------- */
.score-ed { display: grid; grid-template-columns: 1fr 76px 18px 76px 1fr; gap: 10px; align-items: center; }
.score-ed .tn { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.score-ed .tn.r { text-align: right; }
.score-ed .dash { text-align: center; color: var(--text-3); }
.score-ed input { height: 60px; text-align: center; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; border-radius: 14px; padding: 0; font-variant-numeric: tabular-nums; }
.score-ed .set-l { grid-column: 1 / -1; font-size: 12px; color: var(--text-3); font-weight: 600; margin-top: 6px; text-align: center; }
@media (max-width: 480px) { .score-ed { grid-template-columns: 1fr 64px 12px 64px 1fr; gap: 6px; } .score-ed .tn { font-size: 13px; } }

/* ---------- Player portal ---------- */
.status-hero { border-radius: var(--r-xl); padding: 40px 32px; text-align: center; position: relative; overflow: hidden; color: #fff; background: linear-gradient(150deg, #0058c7, #0a7ae0); }
.status-hero.warn { background: linear-gradient(150deg, #ff9f0a, #ffcc00); color: #3d2400; }
.status-hero.ok { background: linear-gradient(150deg, #157a3c, #1f9d55); }
.status-hero.neutral { background: linear-gradient(150deg, #3a3a3c, #636366); }
.status-hero .emoji { font-size: 54px; line-height: 1; margin-bottom: 14px; }
.status-hero h1 { font-size: clamp(30px, 6vw, 44px); letter-spacing: -0.035em; }
.status-hero p { font-size: 18px; opacity: 0.9; margin-top: 10px; }
.now-card { border-radius: var(--r-xl); padding: 26px; background: #000; color: #fff; }
.now-card .sand { margin: 16px 0; }
.ref-box { display: inline-flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 14px; background: var(--bg-2); border: 1px dashed var(--line-2); font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: 0.06em; }
.notif { padding: 14px 0; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif b { font-size: 15px; }
.notif p { font-size: 14px; color: var(--text-2); white-space: pre-line; margin-top: 4px; }

/* ---------- Register ---------- */
.reg-hero { border-radius: var(--r-xl); padding: 48px 36px; color: #fff; position: relative; overflow: hidden; background: linear-gradient(160deg, #0a84ff 0%, #34aadc 55%, #ffb340 130%); }
.reg-hero::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -60px; height: 130px; background: var(--bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0; opacity: 0.12; }
.reg-hero h1 { font-size: clamp(34px, 6vw, 56px); letter-spacing: -0.04em; }
.reg-hero .facts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.reg-hero .facts span { background: rgba(255, 255, 255, 0.18); backdrop-filter: blur(10px); padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 500; }
.player-block { border-radius: var(--r-l); border: 1px solid var(--line); padding: 22px; background: var(--surface-2); }
.player-block h4 { font-size: 15px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.num-badge { width: 26px; height: 26px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; font-size: 13px; }

/* ---------- Live board (TV) ---------- */
.tv-page { min-height: 100vh; background: var(--bg); color: var(--text); padding: 28px 0 60px; }
.tv-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.tv-head h1 { font-size: clamp(28px, 4vw, 48px); letter-spacing: -0.04em; }
.clock { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }

/* ---------- Misc ---------- */
.kbd { font-family: var(--mono); font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--line); }
.drop { border: 2px dashed var(--line-2); border-radius: var(--r-l); padding: 26px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.seed-list { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.seed-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--bg-2); font-size: 15px; }
.seed-item .sn { width: 26px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); padding: 6px; display: flex; flex-direction: column; animation: modalIn 0.3s var(--spring); }
.menu-pop button { text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 9px; font-size: 14px; cursor: pointer; }
.menu-pop button:hover { background: var(--bg-2); }
.menu-pop button.danger { color: var(--bad); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.place { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: var(--bg-2); flex: none; }
.place.p1 { background: linear-gradient(150deg, #ffd60a, #ff9f0a); color: #4a2c00; }
.place.p2 { background: linear-gradient(150deg, #e5e5ea, #aeaeb2); color: #1d1d1f; }
.place.p3 { background: linear-gradient(150deg, #f4b183, #c97a40); color: #3d1f00; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; }
.podium > div { border-radius: var(--r-l); padding: 22px 16px; text-align: center; background: var(--bg-2); }
.podium .p-1 { padding-top: 34px; background: linear-gradient(170deg, rgba(255, 214, 10, 0.3), rgba(255, 159, 10, 0.12)); }
.podium .medal { font-size: 40px; }
.podium b { display: block; font-size: 17px; margin-top: 6px; }
@media (max-width: 560px) { .podium { grid-template-columns: 1fr; } }

/* ---------- Venue picker ---------- */
.venue-box { position: relative; }
.venue-box .input { padding-left: 42px; }
.venue-ico { position: absolute; left: 15px; top: 15px; color: var(--text-3); pointer-events: none; }
.venue-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); padding: 6px; max-height: 360px; overflow: auto; animation: modalIn 0.3s var(--spring); }
.venue-sec { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 12px 4px; }
.venue-opt { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 11px; cursor: pointer; color: var(--text); }
.venue-opt:hover, .venue-opt.on { background: var(--bg-2); }
.venue-opt .vi { width: 32px; height: 32px; border-radius: 10px; background: var(--bg-2); display: grid; place-items: center; flex: none; font-size: 16px; }
.venue-opt:hover .vi, .venue-opt.on .vi { background: var(--surface); }
.venue-opt b { display: block; font-size: 15px; font-weight: 600; }
.venue-opt small { display: block; font-size: 12px; color: var(--text-2); }
.venue-opt.new .vi { color: var(--accent); background: var(--accent-soft); font-weight: 700; }

/* ---------- divisions, advisor, running order, paste list ---------- */
.div-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.div-tabs a.chip { text-decoration: none; color: var(--text); gap: 8px; }
.div-tabs a.chip[aria-pressed="true"] { color: var(--bg); }
.div-tabs .chip small { opacity: .65; font-weight: 500; }
.chip.add { border-style: dashed; color: var(--text-2); }
.court-card.other-div { opacity: .78; }
.court-card.other-div .sand { filter: saturate(.6); }
.fmt { position: relative; }
.fmt .fmt-meta { margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--text-3); font-weight: 600; }
.fmt.rec::after { content: "Recommended"; position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--accent); color: #fff; }
.fmt.invalid { opacity: .45; }
.advice { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: var(--r-l); background: var(--accent-soft); }
.advice .ic { font-size: 22px; }
.advice b { color: var(--text); }
.queue { display: flex; flex-direction: column; gap: 6px; }
.q-item { display: grid; grid-template-columns: 22px 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); cursor: grab; user-select: none; }
.q-item.dragging { opacity: .4; }
.q-item.over { box-shadow: inset 0 2px 0 var(--accent); }
.q-item .grip { color: var(--text-3); font-size: 16px; line-height: 1; }
.q-item .when { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.q-item .when small { display: block; font-weight: 500; color: var(--text-3); font-size: 11px; }
.q-item .vs { font-weight: 600; min-width: 0; font-size: 15px; }
.q-item .vs .sub { font-weight: 400; font-size: 12px; color: var(--text-2); }
.q-item.blocked { cursor: default; opacity: .6; }
.paste { height: auto; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; min-height: 180px; line-height: 1.5; }
.paste-preview { max-height: 260px; overflow: auto; }
.paste-preview .li { padding: 8px 2px; }
details.more { border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); padding: 4px 22px; }
details.more > summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "＋"; color: var(--text-3); font-weight: 400; }
details.more[open] > summary::after { content: "－"; }
details.more[open] { padding-bottom: 22px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-input { display: inline-flex; gap: 8px; align-items: center; }
.ref-card { box-shadow: 0 0 0 2px var(--sun); }
.reg-divs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 22px; }
.reg-div { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--r-l); background: var(--surface); border: 1.5px solid var(--line-2); text-decoration: none; color: var(--text); transition: transform .2s var(--ease), border-color .2s; }
.reg-div:hover { transform: translateY(-2px); border-color: var(--accent); }
.reg-div b { font-size: 22px; letter-spacing: -.02em; }
@media (max-width: 640px) { .q-item { grid-template-columns: 18px 54px 1fr; } .q-item > :last-child { grid-column: 2 / -1; } }

/* ---------- court page, QR print, photos, embed ---------- */
.court-page .sand { margin: 6px 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.photo { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.photo:hover img { transform: scale(1.03); }
.photo span { position: absolute; left: 8px; bottom: 8px; font-size: 11px; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; }
.photo.hidden-photo { opacity: .35; }
.photo .ph-acts { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
.qr-sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.qr-sheet { background: #fff; color: #000; border: 1px solid var(--line-2); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.qr-sheet img { width: 100%; max-width: 320px; aspect-ratio: 1; }
.qr-court { font-size: 44px; font-weight: 800; letter-spacing: -.04em; }
.qr-how { font-size: 16px; line-height: 1.4; }
.qr-foot { font-size: 12px; color: #6e6e73; }
.snippet { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--bg-2); border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; word-break: break-all; }
body.embed .nav, body.embed #theme-btn { display: none !important; }
body.embed main { padding-top: 0; }
body.embed .page { padding-top: 12px; padding-bottom: 12px; }
body.embed { background: transparent; }
@media print {
  .nav, .no-print, #toasts { display: none !important; }
  body.print-page { background: #fff; }
  .qr-sheets { display: block; }
  .qr-sheet { break-after: page; border: 0; height: 95vh; justify-content: center; }
  .qr-sheet img { max-width: 70%; }
  .qr-court { font-size: 72px; }
  .qr-how { font-size: 24px; }
}
.kit { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.kit-item { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--r-l); background: var(--bg-2); border: 1px solid transparent; color: var(--text); text-decoration: none; cursor: pointer; font: inherit; transition: border-color .2s, transform .2s var(--ease); }
.kit-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.kit-item .kit-ic { font-size: 24px; }
.kit-item b { font-size: 15px; }
.kit-item span:last-child { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.callout.wa { background: color-mix(in srgb, #25d366 14%, transparent); }
body.branded .reg-hero { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000)); }

/* ---------- phone polish ---------- */
.nav-links a, .nav-links button.link { white-space: nowrap; }
@media (max-width: 640px) {
  .nav-links a, .nav-links button.link { padding: 6px 8px; font-size: 13px; }
  .grid.g4:has(> .stat) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 16px; }
  .stat .v { font-size: 30px; }
  .li { flex-wrap: wrap; gap: 10px 12px; }
  .li > .grow { flex: 1 1 60%; min-width: 0; }
  [data-entry-row] .mono { display: none; }
  .card-title { flex-wrap: wrap; }
  .card { padding: 18px; }
  .ph { flex-wrap: wrap; gap: 12px; }
  .ph h1 { font-size: 30px; }
  .share { padding-left: 14px; }
  .share .url { font-size: 13px; }
}
.bracket-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bracket-note { font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.match:has(.tm .n.tbd + .s:empty):has(.tm + .tm .n.tbd) { border-style: dashed; background: transparent; }
.match .tbd { color: var(--text-2); }
.demo-page h1 { font-size: clamp(36px, 6vw, 60px); letter-spacing: -0.045em; line-height: 1.04; margin-top: 10px; }
.grad-text { background: linear-gradient(90deg, #0a84ff, #5e5ce6 45%, #ff9f0a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.demo-video { margin: 30px auto 0; max-width: 420px; border-radius: 28px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.25); background: #000; aspect-ratio: 9 / 16; }
.demo-video video { width: 100%; height: 100%; display: block; }
