/* FACEIT Demo Fixer — aero / iOS glass, dark */

:root {
  color-scheme: dark;

  --bg: #09090b;
  --text: #f5f5f7;
  --text-2: rgba(235, 235, 245, 0.64);
  --text-3: rgba(235, 235, 245, 0.4);

  --accent: #ff5500;
  --accent-hi: #ff8a3d;
  --accent-lo: #e04400;
  --accent-soft: rgba(255, 85, 0, 0.14);
  --accent-glow: rgba(255, 85, 0, 0.55);

  --green: #30d158;
  --blue: #0a84ff;
  --red: #ff453a;
  --yellow: #ffd60a;

  --glass: rgba(28, 28, 32, 0.5);
  --glass-strong: rgba(34, 34, 40, 0.68);
  --glass-sheet: rgba(26, 26, 30, 0.82);
  --fill: rgba(255, 255, 255, 0.06);
  --fill-2: rgba(255, 255, 255, 0.1);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-2: rgba(255, 255, 255, 0.14);
  --hairline: rgba(255, 255, 255, 0.07);
  --spec: inset 0 1px 0 rgba(255, 255, 255, 0.09);

  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --page: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
a { color: var(--accent-hi); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, kbd, pre { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--fill); border: 1px solid var(--stroke); border-radius: 7px; padding: 0.08em 0.4em; word-break: break-word; }
kbd { background: var(--fill-2); border: 1px solid var(--stroke-2); border-bottom-width: 2px; border-radius: 6px; padding: 0 0.4em; }
svg { width: 1em; height: 1em; flex: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(255, 85, 0, 0.4); }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ------------------------------------------------------------ ambient backdrop */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, transparent 40%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.5));
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; will-change: transform; }
.orb-a { width: 620px; height: 620px; left: -160px; top: -220px; background: radial-gradient(circle, #ff5500 0%, rgba(255, 85, 0, 0) 68%); animation: drift-a 26s ease-in-out infinite alternate; }
.orb-b { width: 560px; height: 560px; right: -180px; top: 120px; background: radial-gradient(circle, #c2185b 0%, rgba(194, 24, 91, 0) 66%); opacity: 0.32; animation: drift-b 32s ease-in-out infinite alternate; }
.orb-c { width: 720px; height: 720px; left: 30%; top: 70vh; background: radial-gradient(circle, #ff9f0a 0%, rgba(255, 159, 10, 0) 64%); opacity: 0.18; animation: drift-a 38s ease-in-out infinite alternate-reverse; }
.grain {
  position: absolute; inset: -50%; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift-a { to { transform: translate3d(120px, 80px, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-140px, 120px, 0) scale(0.9); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }

/* ------------------------------------------------------------ glass */
.glass {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)), var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid var(--stroke);
  box-shadow: var(--spec), 0 24px 60px -28px rgba(0, 0, 0, 0.75);
}
.glass-strong { background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.015)), var(--glass-strong); border-color: var(--stroke-2); }
.glass-inset { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); border-radius: var(--r-md); }

/* ------------------------------------------------------------ buttons */
.btn {
  --h: 44px;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--stroke-2); background: var(--fill);
  color: var(--text); font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: transform 0.25s var(--spring), background-color 0.2s, box-shadow 0.25s, border-color 0.2s, opacity 0.2s;
}
.btn svg { font-size: 18px; }
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(0.96); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn-primary {
  border-color: rgba(255, 160, 100, 0.5);
  background: linear-gradient(180deg, var(--accent-hi) 0%, var(--accent) 48%, var(--accent-lo) 100%);
  color: #fff;
  text-shadow: 0 1px 1px rgba(120, 30, 0, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(0, 0, 0, 0.15), 0 10px 28px -10px var(--accent-glow);
}
/* aero gloss */
.btn-primary::before {
  content: ""; position: absolute; z-index: -1; left: 1px; right: 1px; top: 1px; height: 50%;
  border-radius: 999px 999px 40% 40% / 999px 999px 12px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.05));
}
.btn-primary:hover { background: linear-gradient(180deg, #ff9a52 0%, #ff6214 48%, #ec4a00 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 14px 34px -10px var(--accent-glow); }
.btn-glass { background: rgba(255, 255, 255, 0.07); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--spec); }
.btn-lg { --h: 52px; padding: 0 28px; font-size: 16px; }
.btn-sm { --h: 34px; padding: 0 14px; font-size: 13.5px; }
.btn-sm svg { font-size: 15px; }
.btn-block { width: 100%; }
.btn.is-done { background: rgba(48, 209, 88, 0.16); border-color: rgba(48, 209, 88, 0.4); color: #8af0a6; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 50%; border: 1px solid var(--stroke); background: var(--fill);
  color: var(--text-2); cursor: pointer; transition: background-color 0.2s, color 0.2s, transform 0.25s var(--spring);
}
.icon-btn svg { font-size: 17px; }
.icon-btn:hover { background: var(--fill-2); color: var(--text); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn.is-done { color: var(--green); }

/* segmented control */
.seg {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px;
  background: rgba(118, 118, 128, 0.2); border: 1px solid var(--stroke);
}
.seg > button, .seg > label {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 30px; padding: 0 13px; border: 0; border-radius: 999px; background: none;
  color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.2s, box-shadow 0.25s;
}
.seg > button:hover, .seg > label:hover { color: var(--text); }
.seg > [aria-pressed="true"], .seg > label:has(input:checked) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.11));
  color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 3px 10px rgba(0, 0, 0, 0.35);
}
.seg > label input { position: absolute; opacity: 0; pointer-events: none; }
.seg > label:has(input:focus-visible) { outline: 2px solid var(--accent-hi); outline-offset: 1px; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--fill); border: 1px solid var(--stroke); color: var(--text-2);
  font: 500 12px/1 var(--mono);
}

.badge {
  --c: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 650; white-space: nowrap; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge:empty { display: none; }
.badge-green { --c: var(--green); }
.badge-blue { --c: #64b5ff; }
.badge-red { --c: var(--red); }
.badge-orange { --c: var(--accent-hi); }
.badge-gray { --c: var(--text-3); }

/* ------------------------------------------------------------ topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: 12px 16px 0;
  padding-top: max(12px, env(safe-area-inset-top));
}
.topbar-inner {
  max-width: var(--page); margin: 0 auto; height: 60px;
  display: flex; align-items: center; gap: 16px; padding: 0 10px 0 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)), rgba(20, 20, 24, 0.6);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; margin-right: auto; }
.brand-mark {
  position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; overflow: hidden;
  background: linear-gradient(160deg, var(--accent-hi), var(--accent) 50%, #c93c00);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 18px -6px var(--accent-glow);
  color: #fff;
}
.brand-mark::after { content: ""; position: absolute; inset: 1px 1px 50% 1px; border-radius: 10px 10px 50% 50% / 10px 10px 8px 8px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0)); }
.brand-mark svg { font-size: 21px; position: relative; z-index: 1; }
.brand-text { display: flex; flex-direction: column; font-weight: 750; font-size: 15.5px; letter-spacing: -0.02em; line-height: 1.1; }
.brand-sub { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-hi); }

.tabs {
  position: relative; display: flex; padding: 3px; border-radius: 999px;
  background: rgba(118, 118, 128, 0.18); border: 1px solid var(--stroke);
}
.tab {
  position: relative; z-index: 1; padding: 0 16px; height: 32px; display: inline-flex; align-items: center;
  border-radius: 999px; color: var(--text-2); font-size: 14px; font-weight: 600; text-decoration: none !important;
  transition: color 0.25s;
}
.tab:hover, .tab.is-active { color: var(--text); }
.tab-pill {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 3px 10px rgba(0, 0, 0, 0.35);
  transform: translateX(var(--x, 3px)); width: var(--w, 0);
  transition: transform 0.45s var(--ease), width 0.45s var(--ease);
}
.seg-lang { margin-left: auto; }
.tabs + .seg-lang { margin-left: 0; }

/* ------------------------------------------------------------ layout */
main { padding: 0 16px; }
main > section { max-width: var(--page); margin: 0 auto; scroll-margin-top: 92px; }
.section-head { margin-bottom: 22px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 750; letter-spacing: -0.03em; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-lede { margin-top: 8px; max-width: 560px; color: var(--text-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke); box-shadow: var(--spec);
  color: var(--text-2); font-size: 13px; font-weight: 550;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.eyebrow-plain { height: auto; padding: 0; background: none; border: 0; box-shadow: none; margin-bottom: 8px; color: var(--accent-hi); font-weight: 650; font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase; -webkit-backdrop-filter: none; backdrop-filter: none; }
.eyebrow-plain svg { font-size: 16px; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(255, 85, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 85, 0, 0); } }

/* ------------------------------------------------------------ hero */
.hero { padding: 72px 0 28px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 { margin-top: 22px; font-size: clamp(36px, 6.2vw, 68px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; max-width: 900px; }
.grad {
  background: linear-gradient(95deg, #ffb27a 0%, var(--accent-hi) 30%, var(--accent) 65%, #ff3d6e 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin-top: 18px; max-width: 600px; font-size: clamp(16px, 1.6vw, 18.5px); color: var(--text-2); }

.drop {
  margin-top: 40px; width: 100%; max-width: 760px; min-height: 300px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 44px 24px 36px; border-radius: var(--r-xl); cursor: pointer;
  transition: transform 0.45s var(--spring), box-shadow 0.35s, border-color 0.35s;
}
.drop::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(60% 70% at 50% 0%, rgba(255, 85, 0, 0.22), transparent 70%);
  transition: opacity 0.35s;
}
.drop-ring {
  position: absolute; inset: 10px; border-radius: 22px; pointer-events: none;
  border: 1.5px dashed rgba(255, 255, 255, 0.13);
  transition: border-color 0.3s, inset 0.4s var(--spring);
}
.drop:hover::before, .drop:focus-within::before { opacity: 0.6; }
.drop:hover .drop-ring { border-color: rgba(255, 255, 255, 0.2); }
.drop:focus-within { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.drop.is-over { transform: scale(1.015); border-color: rgba(255, 120, 40, 0.6); box-shadow: var(--spec), 0 0 0 6px rgba(255, 85, 0, 0.12), 0 30px 80px -20px var(--accent-glow); }
.drop.is-over::before { opacity: 1; }
.drop.is-over .drop-ring { border-color: rgba(255, 140, 70, 0.7); inset: 14px; }
.drop.is-over .drop-icon { transform: translateY(-6px) scale(1.06); }

.drop-icon {
  position: relative; display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 6px;
  border-radius: 22px; overflow: hidden; color: #fff;
  background: linear-gradient(160deg, var(--accent-hi), var(--accent) 55%, #c63a00);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 6px rgba(120, 30, 0, 0.35), 0 16px 36px -10px var(--accent-glow);
  transition: transform 0.45s var(--spring);
}
.drop-icon::after { content: ""; position: absolute; left: 2px; right: 2px; top: 2px; height: 48%; border-radius: 20px 20px 50% 50% / 20px 20px 10px 10px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.04)); }
.drop-icon svg { position: relative; z-index: 1; font-size: 32px; }
.drop-title { font-size: clamp(21px, 2.4vw, 26px); font-weight: 700; letter-spacing: -0.025em; }
.drop-sub { color: var(--text-2); font-size: 15px; margin-bottom: 8px; }
.drop .chips { margin-top: 10px; }

.trust { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; color: var(--text-2); font-size: 14px; }
.trust-item { display: inline-flex; align-items: center; gap: 7px; }
.trust-item svg { font-size: 16px; color: var(--green); }
.trust-item.tally svg { color: var(--accent-hi); }
.trust-item[hidden] { display: none; }

/* ------------------------------------------------------------ jobs */
.jobs { display: grid; gap: 14px; max-width: 760px !important; margin-bottom: 20px !important; }
.job {
  padding: 18px 18px 16px; border-radius: var(--r-lg);
  animation: rise 0.55s var(--spring) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .job { animation: none; } }

.job-head { display: flex; align-items: center; gap: 12px; }
.job-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 13px;
  background: var(--fill-2); border: 1px solid var(--stroke); color: var(--text-2); box-shadow: var(--spec);
}
.job-icon svg { font-size: 21px; }
.job.is-working .job-icon { color: var(--accent-hi); background: var(--accent-soft); }
.job.is-working .job-icon svg { animation: wobble 1.2s ease-in-out infinite; }
@keyframes wobble { 50% { transform: rotate(-18deg); } }
.job.is-fixed .job-icon { color: var(--green); background: rgba(48, 209, 88, 0.14); }
.job.is-clean .job-icon { color: #64b5ff; background: rgba(10, 132, 255, 0.14); }
.job.is-error .job-icon { color: var(--red); background: rgba(255, 69, 58, 0.14); }

.job-title { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.job-name { font-weight: 650; font-size: 15.5px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-meta { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 13px; color: var(--text-3); }
.job-meta span + span::before { content: "·"; margin-right: 10px; }

.progress { position: relative; height: 6px; margin: 16px 0 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress-fill {
  position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-lo), var(--accent-hi));
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 0.35s var(--ease), background 0.4s;
}
.job.is-working .progress-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  background-size: 50% 100%; background-repeat: no-repeat;
  animation: glint 1.3s linear infinite;
}
@keyframes glint { from { background-position: -100% 0; } to { background-position: 200% 0; } }
.job.is-fixed .progress-fill { background: linear-gradient(90deg, #22a447, var(--green)); box-shadow: 0 0 12px rgba(48, 209, 88, 0.5); }
.job.is-clean .progress-fill { background: linear-gradient(90deg, #0062cc, #4aa3ff); box-shadow: 0 0 12px rgba(10, 132, 255, 0.45); }
.job.is-error .progress-fill { background: var(--red); box-shadow: none; }

.job-status { font-size: 13.5px; font-weight: 550; color: var(--text-2); font-variant-numeric: tabular-nums; }
.job-notes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.job-notes:empty { display: none; }
.job-notes li {
  position: relative; padding: 10px 12px 10px 38px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--hairline);
  font-size: 14px; color: var(--text-2);
}
.job-notes li svg { position: absolute; left: 12px; top: 11px; font-size: 17px; color: var(--green); }
.job-notes li.is-info svg { color: #64b5ff; }
.job-notes li.is-warning { background: rgba(255, 69, 58, 0.07); border-color: rgba(255, 69, 58, 0.22); color: #ffb4ae; }
.job-notes li.is-warning svg { color: var(--red); }

.job-actions { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.job-actions[hidden] { display: none; }
.job-file { font: 500 12.5px/1.3 var(--mono); color: var(--text-3); word-break: break-all; }

.cmd {
  margin-top: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 8px 8px 14px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.32); border: 1px solid var(--stroke);
}
.cmd[hidden] { display: none; }
.cmd-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.cmd-text { flex: 1; min-width: 0; background: none; border: 0; padding: 0; color: #ffd2b3; font-size: 14px; white-space: pre-wrap; line-height: 1.6; }
.cmd-rich { display: block; padding: 10px 10px 14px 14px; }
.cmd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cmd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cmd-steps li { display: grid; gap: 3px; padding-left: 12px; border-left: 2px solid rgba(255, 140, 70, 0.4); }
.cmd-steps .cmd-text { word-break: break-all; line-height: 1.45; }
.cmd-hint { font-size: 13px; line-height: 1.45; color: var(--text-2); }

.job-more { margin-top: 10px; }
.job-more[hidden] { display: none; }
.job-more summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; color: var(--text-3); font-size: 13px; font-weight: 600; }
.job-more summary::-webkit-details-marker { display: none; }
.job-more summary:hover { color: var(--text-2); }
.job-more[open] .chev { transform: rotate(90deg); }
.chev { transition: transform 0.3s var(--ease); }

.kv { margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); border-radius: var(--r-sm); overflow: hidden; background: rgba(0, 0, 0, 0.22); border: 1px solid var(--hairline); }
.kv > div { padding: 9px 12px; min-width: 0; box-shadow: 1px 0 0 var(--hairline), 0 1px 0 var(--hairline); }
.kv dt { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.kv dd { margin: 2px 0 0; font-size: 14px; font-weight: 550; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ------------------------------------------------------------ how-to */
.howto { padding: 56px 0 24px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.step { padding: 22px; border-radius: var(--r-lg); overflow: hidden; }
.step-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; margin-bottom: 18px;
  background: var(--accent-soft); border: 1px solid rgba(255, 120, 40, 0.25); color: var(--accent-hi);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.step-icon svg { font-size: 22px; }
.step-n { position: absolute; right: 18px; top: 10px; font-size: 56px; font-weight: 800; letter-spacing: -0.06em; color: rgba(255, 255, 255, 0.045); line-height: 1; }
.step h3 { font-size: 17.5px; margin-bottom: 6px; }
.step p { color: var(--text-2); font-size: 14.5px; }
.path-row { display: flex; align-items: flex-start; gap: 8px; }
.path { flex: 1; font-size: 12.5px; line-height: 1.5; color: #ffd2b3; }

/* ------------------------------------------------------------ vault */
.vault { padding: 64px 0 24px; }
.vault-tools { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.search {
  flex: 1 1 280px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px;
  border-radius: 14px; color: var(--text-3);
}
.search svg { font-size: 18px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text); font: inherit; font-size: 15px; outline: none; }
.search input::placeholder { color: var(--text-3); }
.search:focus-within { border-color: rgba(255, 140, 70, 0.5); box-shadow: var(--spec), 0 0 0 4px rgba(255, 85, 0, 0.12); }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }
.seg-scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }

.vault-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.demo-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; border-radius: var(--r-lg); overflow: hidden;
  cursor: pointer; font: inherit; color: inherit;
  transition: transform 0.45s var(--spring), box-shadow 0.35s, border-color 0.35s;
  animation: rise 0.55s var(--spring) both; animation-delay: calc(var(--i, 0) * 45ms);
}
.demo-card:hover { transform: translateY(-4px); border-color: var(--stroke-2); box-shadow: var(--spec), 0 30px 60px -24px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04); }
.demo-card:active { transform: translateY(-1px) scale(0.99); }
.demo-card.is-expired { opacity: 0.6; }
@media (prefers-reduced-motion: reduce) { .demo-card { animation: none; } }

/* map covers */
.cover {
  --m1: #5a4a3a; --m2: #1b1712; --m3: #ff9d4d;
  position: relative; height: 128px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--m3) 55%, transparent) 0%, transparent 55%),
    linear-gradient(150deg, var(--m1), var(--m2));
}
.cover::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.35;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 14px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.cover::after { content: ""; position: absolute; inset: auto 0 0 0; height: 60%; background: linear-gradient(180deg, transparent, rgba(10, 10, 12, 0.55)); }
.cover-map {
  position: absolute; left: 16px; bottom: 10px; z-index: 1;
  font-size: 40px; font-weight: 850; letter-spacing: -0.05em; line-height: 1; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92); text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}
.cover-badges { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 1; display: flex; gap: 6px; flex-wrap: wrap; }
.cover-badges .badge { background: rgba(10, 10, 12, 0.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.cover[data-map="de_mirage"]   { --m1: #a7713b; --m2: #2a1a0e; --m3: #ffc27a; }
.cover[data-map="de_inferno"]  { --m1: #9b3b24; --m2: #24100b; --m3: #ff7a45; }
.cover[data-map="de_nuke"]     { --m1: #2b6c78; --m2: #0c1a1f; --m3: #66e0e8; }
.cover[data-map="de_ancient"]  { --m1: #3f6b3a; --m2: #0f1a0e; --m3: #a6e07a; }
.cover[data-map="de_anubis"]   { --m1: #a8862f; --m2: #1f180a; --m3: #ffe08a; }
.cover[data-map="de_dust2"]    { --m1: #b08a55; --m2: #2a1f12; --m3: #ffdba3; }
.cover[data-map="de_vertigo"]  { --m1: #3a5f9a; --m2: #0c1424; --m3: #8ec1ff; }
.cover[data-map="de_train"]    { --m1: #59606b; --m2: #121418; --m3: #c6ced9; }
.cover[data-map="de_overpass"] { --m1: #4a7a6a; --m2: #0e1a16; --m3: #9fe8c9; }
.cover[data-map="de_cache"]    { --m1: #7a8a3a; --m2: #171a0c; --m3: #e2f07a; }

.demo-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.demo-title { font-weight: 680; font-size: 16.5px; letter-spacing: -0.015em; }
.versus { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.versus .team { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.versus .team:last-child { text-align: right; }
.score { flex: none; padding: 2px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--stroke); font-weight: 750; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; font-size: 13.5px; }
.demo-meta { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--text-3); border-top: 1px solid var(--hairline); }
.demo-meta span { display: inline-flex; align-items: center; gap: 5px; }
.demo-meta .go { margin-left: auto; color: var(--text-3); font-size: 16px; }

/* request CTA tile at the end of the grid */
.request-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 260px; padding: 24px;
  border-radius: var(--r-lg); border: 1.5px dashed rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.02);
  color: var(--text-2); text-align: center; cursor: pointer; font: inherit;
  transition: border-color 0.3s, background-color 0.3s, transform 0.45s var(--spring);
}
.request-tile:hover { border-color: rgba(255, 140, 70, 0.6); background: rgba(255, 85, 0, 0.05); color: var(--text); transform: translateY(-3px); }
.request-tile .plus { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-hi); border: 1px solid rgba(255, 120, 40, 0.3); }
.request-tile .plus svg { font-size: 24px; }
.request-tile strong { color: var(--text); font-size: 16px; font-weight: 650; }
.request-tile span { font-size: 13.5px; max-width: 220px; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 24px; border-radius: var(--r-xl); }
.empty[hidden] { display: none; }
.empty-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--fill-2); color: var(--text-2); margin-bottom: 6px; }
.empty-icon svg { font-size: 28px; }
.empty p { color: var(--text-2); max-width: 420px; }
.empty-filter { padding: 28px 0; text-align: center; color: var(--text-3); }

/* ------------------------------------------------------------ faq */
.faq { padding: 64px 0 40px; max-width: 820px !important; }
.faq-list { border-radius: var(--r-lg); overflow: hidden; }
.faq-list details + details { border-top: 1px solid var(--hairline); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; cursor: pointer; list-style: none; transition: background-color 0.2s;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { background: rgba(255, 255, 255, 0.025); }
.faq-list summary h3 { font-size: 16.5px; font-weight: 620; letter-spacing: -0.012em; }
.faq-list summary .chev { color: var(--text-3); font-size: 18px; }
.faq-list details[open] summary .chev { transform: rotate(90deg); color: var(--accent-hi); }
.faq-body { padding: 0 20px 20px; color: var(--text-2); font-size: 15px; display: grid; gap: 12px; }
.faq-body h4 { margin-top: 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }
.faq-body .tech { font-size: 13.5px; line-height: 1.7; }
.faq-list details::details-content { block-size: 0; overflow: clip; transition: block-size 0.4s var(--ease), content-visibility 0.4s allow-discrete; }
.faq-list details[open]::details-content { block-size: auto; }
@supports (interpolate-size: allow-keywords) { :root { interpolate-size: allow-keywords; } }

/* ------------------------------------------------------------ footer */
.foot { padding: 24px 16px calc(40px + env(safe-area-inset-bottom)); }
.foot-inner { max-width: var(--page); margin: 0 auto; padding-top: 24px; border-top: 1px solid var(--hairline); display: grid; gap: 6px; text-align: center; font-size: 13px; color: var(--text-3); }
.foot-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; align-items: center; }
.foot a { color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.foot a:hover { color: var(--text); }
.muted { color: var(--text-3); }
.source[hidden] { display: none; }

/* ------------------------------------------------------------ sheets (dialog) */
.sheet {
  width: min(560px, calc(100% - 24px)); max-height: min(88vh, 860px); padding: 0;
  border: 1px solid var(--stroke-2); border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01) 40%), var(--glass-sheet);
  -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  box-shadow: var(--spec), 0 40px 120px -20px rgba(0, 0, 0, 0.9);
  color: var(--text);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  opacity: 0; transform: translateY(24px) scale(0.97);
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease), overlay 0.5s allow-discrete, display 0.5s allow-discrete;
}
.sheet[open] { opacity: 1; transform: none; }
@starting-style { .sheet[open] { opacity: 0; transform: translateY(24px) scale(0.97); } }
.sheet::backdrop {
  background: rgba(0, 0, 0, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0);
  transition: background-color 0.35s, backdrop-filter 0.35s, overlay 0.5s allow-discrete, display 0.5s allow-discrete;
}
.sheet[open]::backdrop { background: rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@starting-style { .sheet[open]::backdrop { background: rgba(0, 0, 0, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); } }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { overflow: hidden; overscroll-behavior: contain; }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet::backdrop { transition: none; } }

.sheet-grabber { display: none; }
.sheet-close-form { position: absolute; top: 14px; right: 14px; z-index: 3; margin: 0; }
.sheet-close { background: rgba(0, 0, 0, 0.35); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.sheet-body { padding: 26px 22px 24px; }

.sheet-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 6px 0 22px; }
.sheet-hero h2 { font-size: 24px; letter-spacing: -0.03em; }
.sheet-hero p { color: var(--text-2); font-size: 14.5px; max-width: 400px; }
.sheet-badge {
  position: relative; overflow: hidden; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 17px; color: #fff; margin-bottom: 6px;
  background: linear-gradient(160deg, var(--accent-hi), var(--accent) 55%, #c63a00);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 12px 30px -10px var(--accent-glow);
}
.sheet-badge::after { content: ""; position: absolute; left: 2px; right: 2px; top: 2px; height: 48%; border-radius: 15px 15px 50% 50% / 15px 15px 8px 8px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.04)); }
.sheet-badge svg { font-size: 26px; position: relative; z-index: 1; }

/* demo page (demo.html) */
.demo-main { max-width: 1200px; margin: 0 auto; padding: 28px 16px 8px; display: grid; gap: 16px; }
.demo-main > .jobs { width: 100%; max-width: 760px !important; justify-self: center; }
.demo-main > .demo-page.empty { max-width: 640px; width: 100%; justify-self: center; }
.demo-main > .jobs { max-width: none !important; margin: 0 !important; }
.demo-page { border-radius: var(--r-xl); overflow: hidden; padding: 0 28px 28px; animation: rise 0.6s var(--spring) both; }
.demo-page.empty { padding: 48px 24px; align-items: center; }
.demo-page.empty .btn { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .demo-page { animation: none; } }
.cover-hero { margin: 0 -28px 22px; height: 260px; }
.cover-hero .cover-map { font-size: clamp(56px, 11vw, 96px); left: 28px; bottom: 16px; }
.cover-hero .cover-badges { left: 24px; top: 22px; }
.sheet-title { font-size: clamp(26px, 4vw, 36px); font-weight: 780; letter-spacing: -0.035em; }
.sheet-sub { margin-top: 6px; color: var(--text-2); font-size: 15px; }
.back-link {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px 0 8px; margin-left: auto; border-radius: 999px;
  background: rgba(118, 118, 128, 0.18); border: 1px solid var(--stroke); color: var(--text-2);
  font-size: 14px; font-weight: 600; text-decoration: none !important; transition: color 0.2s, background-color 0.2s;
}
.back-link svg { font-size: 18px; transform: scaleX(-1); }
.back-link:hover { color: var(--text); background: rgba(118, 118, 128, 0.28); }
.back-link + .seg-lang { margin-left: 0; }

/* key gate */
.sheet-compact { width: min(440px, calc(100% - 24px)); }
.key-demo { color: var(--text) !important; font-weight: 650; font-size: 15.5px !important; }
.key-demo:empty { display: none; }
#key-form input { font-family: var(--mono); letter-spacing: 0.06em; }
.is-shaking { animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .is-shaking { animation: none; } }

:is(.sheet, .demo-page) .versus { margin: 16px 0 4px; padding: 14px 16px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hairline); font-size: 15.5px; color: var(--text); font-weight: 600; }
:is(.sheet, .demo-page) .score { font-size: 16px; padding: 4px 12px; }
:is(.sheet, .demo-page) .kv { margin-top: 12px; }
.sheet-note { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.035); border: 1px solid var(--hairline); color: var(--text-2); font-size: 14px; }
.sheet-actions { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-actions .btn-primary { grid-column: 1 / -1; }
.sheet-actions .btn { width: 100%; }
:is(.sheet, .demo-page) .cmd { margin-top: 14px; }
.remote-progress { margin-top: 14px; }
.remote-progress[hidden] { display: none; }
.remote-progress .progress { margin: 0 0 8px; }
.remote-progress p { font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.remote-progress p.is-error { color: #ffb4ae; }
:is(.sheet, .demo-page) .job { margin-top: 14px; background: rgba(255, 255, 255, 0.03); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* form */
.form { display: grid; gap: 16px; }
.group { overflow: hidden; }
.field { display: grid; gap: 2px; padding: 11px 16px 12px; }
.field + .field { border-top: 1px solid var(--hairline); }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-3); letter-spacing: 0.01em; }
.field-label .opt { font-weight: 500; color: rgba(235, 235, 245, 0.28); }
.field input, .field textarea {
  width: 100%; border: 0; padding: 2px 0 0; background: none; color: var(--text);
  font: inherit; font-size: 16px; outline: none; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(235, 235, 245, 0.24); }
.field:focus-within { background: rgba(255, 255, 255, 0.025); }
.field:focus-within .field-label { color: var(--accent-hi); }
.field:has(:user-invalid) .field-label { color: var(--red); }
.field:has(:user-invalid) { background: rgba(255, 69, 58, 0.06); }
.field-error { margin-top: -6px; padding: 0 4px; color: #ffb4ae; font-size: 13.5px; }
.field-error[hidden] { display: none; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 4px; }
.seg-wide { flex: 0 1 auto; }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke);
  font-size: 15px; cursor: pointer;
}
.switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; margin: 0;
  width: 51px; height: 31px; border-radius: 99px; background: rgba(120, 120, 128, 0.32); cursor: pointer;
  transition: background-color 0.3s var(--ease);
}
.switch::after {
  content: ""; 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.3), 0 1px 1px rgba(0, 0, 0, 0.16);
  transition: transform 0.35s var(--spring);
}
.switch:checked { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); }
.switch:checked::after { transform: translateX(20px); }

.request-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.request-done[hidden] { display: none; }
.done-check {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; margin-bottom: 4px;
  background: rgba(48, 209, 88, 0.15); color: var(--green); border: 1px solid rgba(48, 209, 88, 0.35);
  animation: pop 0.6s var(--spring) both;
}
.done-check svg { font-size: 32px; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }
.request-done h3 { font-size: 21px; }
.request-done p { color: var(--text-2); font-size: 14.5px; max-width: 420px; }
.request-text {
  width: 100%; margin: 6px 0 0; padding: 14px 16px; text-align: left; white-space: pre-wrap; word-break: break-word;
  border-radius: var(--r-md); background: rgba(0, 0, 0, 0.35); border: 1px solid var(--stroke);
  font-size: 12.5px; line-height: 1.6; color: #ffd2b3; max-height: 220px; overflow: auto;
}
.request-text:empty { display: none; }
.done-actions { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 6px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 50;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; pointer-events: none;
  opacity: 0; transform: translate(-50%, 16px) scale(0.96);
  transition: opacity 0.3s var(--ease), transform 0.45s var(--spring);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.toast svg { color: var(--green); font-size: 18px; }

/* ------------------------------------------------------------ match room (demo.html) */
.cover-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.62) saturate(1.08); transition: transform 0.6s var(--ease); }
.demo-card:hover .cover-img { transform: scale(1.05); }

.room { display: grid; gap: 18px; animation: rise 0.6s var(--spring) both; }
@media (prefers-reduced-motion: reduce) { .room { animation: none; } }
.room-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.room-title { font-size: clamp(22px, 2.6vw, 28px); font-weight: 760; letter-spacing: -0.03em; }

.room-banner {
  position: relative; isolation: isolate; overflow: hidden; min-height: 210px;
  border-radius: var(--r-lg); border: 1px solid var(--stroke-2);
  background: linear-gradient(150deg, #2a1d14, #0d0d10);
  box-shadow: var(--spec), 0 30px 70px -30px rgba(0, 0, 0, 0.9);
}
.room-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.5) saturate(1.1); }
.room-banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 90% at 50% 60%, rgba(8, 8, 10, 0.55), transparent 75%),
    linear-gradient(180deg, rgba(8, 8, 10, 0.35), rgba(8, 8, 10, 0.1) 40%, rgba(8, 8, 10, 0.75));
}
.room-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px 0; }
.room-crumbs { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.room-crumbs svg { font-size: 16px; color: var(--accent-hi); }
.room-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.room-chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 8px;
  background: rgba(10, 10, 12, 0.55); border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 12.5px; font-weight: 650;
}

.room-score {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto auto minmax(0, 1fr);
  align-items: center; gap: 16px; padding: 26px 24px 30px;
}
.room-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.side-a { align-items: flex-end; text-align: right; }
.side-b { align-items: flex-start; text-align: left; }
.winner-tag { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #3ee05a; text-shadow: 0 0 12px rgba(62, 224, 90, 0.45); min-height: 16px; }
.winner-tag.is-empty { visibility: hidden; }
.room-team { max-width: 100%; font-size: clamp(18px, 2.4vw, 28px); font-weight: 800; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6); }
.room-team-sub { font-size: 12.5px; color: rgba(255, 255, 255, 0.7); }
.room-ava { width: 64px; height: 64px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.18); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.8); }
.room-ava.is-winner { border-color: rgba(62, 224, 90, 0.7); box-shadow: 0 0 0 4px rgba(62, 224, 90, 0.15), 0 10px 30px -8px rgba(0, 0, 0, 0.8); }
.room-num { font-size: clamp(36px, 4.6vw, 52px); font-weight: 850; line-height: 1; letter-spacing: -0.04em; color: rgba(255, 255, 255, 0.55); font-variant-numeric: tabular-nums; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6); }
.room-num.is-winner { color: #3ee05a; text-shadow: 0 0 22px rgba(62, 224, 90, 0.35); }
.room-vs { font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.5); }

/* avatars with a letter underneath, for when the picture is missing or fails */
.room-ava, .pl-ava { position: relative; display: grid; place-items: center; flex: none; overflow: hidden; background: linear-gradient(150deg, #3a3a42, #1b1b20); }
.room-ava img, .pl-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ava-letter { font-weight: 800; color: var(--text-2); font-size: 0.42em; }
.room-ava .ava-letter { font-size: 26px; }
.pl-ava .ava-letter { font-size: 18px; }

.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.room-grid.is-solo { grid-template-columns: minmax(0, 460px); justify-content: center; }
.room-col { display: grid; gap: 8px; min-width: 0; }
.room-label { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--text-2); letter-spacing: 0; }
.room-label .badge { height: 22px; font-size: 11.5px; }

.pl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pl {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px 10px 10px; border-radius: 14px;
  background: rgba(22, 22, 26, 0.78); border: 1px solid var(--stroke); box-shadow: var(--spec);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: border-color 0.25s, transform 0.35s var(--spring);
}
.pl:hover { border-color: var(--stroke-2); transform: translateY(-1px); }
.room-team-col.is-winner .pl { border-right: 3px solid rgba(62, 224, 90, 0.55); }
.room-team-col.is-loser .pl { border-right: 3px solid rgba(255, 105, 97, 0.5); }
.pl-ava { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--stroke); }
.pl-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.pl-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pl-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 700; font-size: 15px; margin-right: auto; }
.pl-name:hover { color: var(--accent-hi); text-decoration: none; }
.pl-mvp { flex: none; font-size: 11px; font-weight: 750; color: var(--yellow); padding: 1px 6px; border-radius: 6px; background: rgba(255, 214, 10, 0.1); border: 1px solid rgba(255, 214, 10, 0.25); }
.pl-elo { flex: none; font-size: 12px; font-weight: 650; color: var(--text-2); padding: 2px 8px; border-radius: 99px; background: var(--fill); font-variant-numeric: tabular-nums; }
.lvl { width: 28px; height: 28px; flex: none; }
.cc { flex: none; padding: 1px 5px; border-radius: 4px; background: var(--fill-2); color: var(--text-2); font: 700 10px/1.4 var(--mono); }
.cc-lg { font-size: 12px; padding: 3px 7px; }
.pl-stats { margin: 0; display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 4px; }
.pl-stats > div { min-width: 0; }
.pl-stats dd { margin: 0; font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-stats dt { font-size: 10.5px; color: var(--text-3); font-weight: 600; letter-spacing: 0.02em; }
.pl-stats .is-good dd { color: #4ade6b; }
.pl-stats .is-bad dd { color: #ff7b72; }

.room-center { gap: 8px; }
.room-tile {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  background: rgba(22, 22, 26, 0.78); border: 1px solid var(--stroke); box-shadow: var(--spec);
}
.room-tile strong { font-size: 15px; }
.room-tile-sub { margin-left: auto; font: 500 12px var(--mono); color: var(--text-3); }
.room-map-thumb { width: 68px; height: 40px; border-radius: 8px; object-fit: cover; border: 1px solid var(--stroke); }
.room-actions { display: grid; gap: 8px; margin-top: 10px; }
.room-actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.room-actions-row .btn { flex: 1 1 0; padding: 0 12px; }
.room-center .cmd { margin-top: 6px; }
.room-center .remote-progress { margin-top: 6px; }
.room-note { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--hairline); display: flex; gap: 10px; align-items: baseline; color: var(--text-2); font-size: 14px; }
.room-center .kv { margin-top: 0; }

/* scoreboard */
.room-board { display: grid; gap: 8px; }
.board-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--stroke); background: rgba(16, 16, 19, 0.82); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--spec); }
.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; min-width: 720px; }
.board th, .board td { padding: 10px 12px; text-align: center; white-space: nowrap; }
.board thead th { font-size: 12.5px; font-weight: 700; color: var(--text-2); background: rgba(0, 0, 0, 0.35); border-bottom: 1px solid var(--stroke); }
.board .board-player { text-align: left; }
td.board-player { display: flex; align-items: center; gap: 8px; font-weight: 600; }
td.board-player .lvl { width: 22px; height: 22px; }
.board-team th { text-align: left; padding-top: 14px; font-size: 14px; font-weight: 750; border-bottom: 1px solid var(--hairline); }
.board-score { margin-left: 10px; color: #ff7b72; font-weight: 800; }
.board-score.is-winner { color: #3ee05a; }
.board tbody tr:not(.board-team) td { border-bottom: 1px solid var(--hairline); }
.board tbody tr:not(.board-team):hover td { background: rgba(255, 255, 255, 0.025); }
.board td.is-best { background: rgba(62, 224, 90, 0.09); color: #8af0a6; font-weight: 700; }

@media (max-width: 1000px) {
  .room-grid { grid-template-columns: 1fr 1fr; }
  .room-center { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 680px) {
  .room-grid, .room-grid.is-solo { grid-template-columns: 1fr; }
  .room-score { grid-template-columns: auto auto auto auto auto; justify-content: center; gap: 10px; padding: 18px 12px 22px; }
  .room-side { grid-row: 2; }
  .side-a { grid-column: 1 / 3; align-items: flex-start; text-align: left; }
  .side-b { grid-column: 4 / 6; align-items: flex-end; text-align: right; }
  .room-ava { width: 48px; height: 48px; }
  .room-team { font-size: 16px; }
  .room-top { padding: 12px 12px 0; }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .step { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; }
  .step-icon { grid-row: span 2; margin-bottom: 0; }
}
@media (max-width: 680px) {
  .topbar { padding: 8px 10px 0; padding-top: max(8px, env(safe-area-inset-top)); }
  .topbar-inner { height: 54px; gap: 8px; padding: 0 6px 0 8px; border-radius: 19px; }
  .brand-text { display: none; }
  .brand { margin-right: 0; }
  .tabs { margin: 0 auto; }
  .tab { padding: 0 10px; font-size: 13px; }
  .seg-lang { padding: 2px; }
  .seg-lang > [aria-pressed="true"] { display: none; }
  .seg-lang > button { padding: 0 9px; min-height: 30px; }
  .hero { padding-top: 44px; }
  .drop { min-height: 260px; padding: 36px 18px 28px; }
  .section-head-row .btn { width: 100%; }
  .howto, .vault, .faq { padding-top: 44px; }

  /* iOS bottom sheets */
  .sheet {
    width: 100%; max-width: none; max-height: 92vh; margin: auto 0 0; border-radius: 28px 28px 0 0; border-bottom: 0;
    transform: translateY(100%);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sheet[open] { transform: none; }
  @starting-style { .sheet[open] { transform: translateY(100%); } }
  .sheet-grabber { display: block; position: absolute; top: 7px; left: 50%; z-index: 4; width: 38px; height: 5px; margin-left: -19px; border-radius: 9px; background: rgba(255, 255, 255, 0.28); }
  .sheet-body { padding: 26px 16px 20px; }
  .demo-main { padding-top: 16px; }
  .demo-page { padding: 0 16px 20px; }
  .cover-hero { margin: 0 -16px 18px; height: 190px; }
  .cover-hero .cover-map { left: 16px; }
  .cover-hero .cover-badges { left: 14px; top: 14px; }
  .back-link { margin-left: auto; }
  .sheet-actions { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; align-items: stretch; }
  .seg-wide { display: flex; }
  .seg-wide > label { flex: 1; }
}
@media (max-width: 400px) {
  .tab { padding: 0 8px; font-size: 12.5px; }
  .brand-mark { width: 32px; height: 32px; }
}
