:root {
  color-scheme: dark;
  --bg: #09080d;
  --bg-soft: #111017;
  --panel: #15141c;
  --panel-strong: #1d1b25;
  --paper: #f2efe8;
  --ink: #101015;
  --text: #f7f4ef;
  --muted: #aaa5b3;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .25);
  --pink: #ff315f;
  --pink-dark: #d90e40;
  --acid: #d9ff45;
  --violet: #9f7aea;
  --success: #58e6a9;
  --danger: #ff456d;
  --shadow: 0 24px 70px rgba(0, 0, 0, .42);
  --radius: 24px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; touch-action: pan-x pan-y; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 49, 95, .14), transparent 26rem),
    radial-gradient(circle at 90% 30%, rgba(159, 122, 234, .08), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  pointer-events: none;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--acid);
  color: var(--ink);
  transform: translateY(-140%);
}
.skip-link:focus { transform: translateY(0); }

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: rgba(9, 8, 13, .82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-number {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border: 2px solid var(--pink);
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -2px;
  transform: rotate(-4deg);
  box-shadow: 5px 5px 0 var(--pink-dark);
}

.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font-size: 14px; letter-spacing: .18em; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: .13em; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.role-link {
  display: none;
  min-height: 42px;
  align-items: center;
  padding: 0 15px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}
.role-link:hover { border-color: var(--acid); color: var(--acid); }
.role-link span { margin-left: 8px; }
.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}
.icon-button:hover { border-color: var(--pink); color: var(--pink); }

.app-main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.view { min-height: calc(100vh - 132px); padding: 28px 0 70px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--pink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.eyebrow > span { display: inline-block; width: 20px; height: 2px; margin-right: 7px; vertical-align: middle; background: currentColor; }

.hero {
  position: relative;
  display: grid;
  min-height: 420px;
  align-items: center;
  overflow: hidden;
  padding: clamp(30px, 7vw, 76px);
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(255,49,95,.12), transparent 42%),
    linear-gradient(160deg, #17151d 0%, #0b0a10 70%);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero::before {
  position: absolute;
  top: -12%;
  right: -7%;
  z-index: -1;
  width: min(48vw, 510px);
  aspect-ratio: 1;
  border: clamp(32px, 7vw, 84px) solid rgba(255, 49, 95, .9);
  border-radius: 50%;
  content: "";
  filter: drop-shadow(0 0 55px rgba(255,49,95,.22));
}

.hero::after {
  position: absolute;
  right: 12%;
  bottom: -24px;
  z-index: -1;
  color: rgba(255,255,255,.025);
  content: "117";
  font-size: clamp(180px, 32vw, 410px);
  font-weight: 1000;
  line-height: .7;
  letter-spacing: -.09em;
}

.hero-noise { position: absolute; inset: 0; z-index: -1; opacity: .35; pointer-events: none; }
.hero-noise::before, .hero-noise::after { position: absolute; height: 1px; background: rgba(255,255,255,.08); content: ""; transform: rotate(-14deg); }
.hero-noise::before { top: 22%; left: -8%; width: 54%; }
.hero-noise::after { right: -8%; bottom: 18%; width: 46%; }

.hero-copy { position: relative; z-index: 2; max-width: 760px; }
.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 8vw, 92px);
  font-weight: 950;
  line-height: .98;
  letter-spacing: -.065em;
}
.hero h1 em { color: var(--acid); font-style: normal; }
.hero-copy > p:not(.eyebrow) { max-width: 580px; margin: 24px 0 0; color: #c4becb; font-size: clamp(15px, 2vw, 19px); line-height: 1.75; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero-tags span { padding: 8px 12px; border: 1px solid var(--line-strong); color: #d8d3df; font-size: 12px; font-weight: 750; }

.hero-seal {
  position: absolute;
  right: clamp(20px, 6vw, 80px);
  bottom: 40px;
  z-index: 3;
  display: none;
  width: 128px;
  height: 128px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--acid);
  border-radius: 50%;
  background: var(--bg);
  transform: rotate(9deg);
  box-shadow: 12px 12px 0 rgba(217,255,69,.12);
}
.hero-seal span { color: var(--acid); font-size: 56px; font-weight: 950; }
.hero-seal small { position: absolute; right: -20px; bottom: -5px; padding: 5px 7px; background: var(--pink); color: #fff; font-size: 8px; font-weight: 900; letter-spacing: .1em; }

.resume-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(217,255,69,.32);
  background: rgba(217,255,69,.07);
}
.resume-card h2 { margin: 0 0 4px; font-size: 20px; }
.resume-card p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; }
.resume-actions { display: flex; flex-shrink: 0; gap: 8px; }

.setup-form { padding-top: 64px; }
.section-heading, .workspace-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.section-heading h2, .workspace-header h1 { margin: 0; font-size: clamp(27px, 4vw, 42px); line-height: 1.1; letter-spacing: -.045em; }
.step-mark { color: #77727f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; letter-spacing: .08em; }

.setup-grid { display: grid; gap: 14px; }
.setup-panel {
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(21, 20, 28, .82);
}
.setup-panel-primary { background: rgba(26, 24, 34, .88); }
.field-group { min-width: 0; margin: 0; padding: 0 0 24px; border: 0; }
.field-group + .field-group { padding-top: 24px; border-top: 1px solid var(--line); }
.field-group:last-child { padding-bottom: 0; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 13px; color: var(--text); font-size: 14px; font-weight: 850; }
.field-label small { color: #77727f; font-size: 11px; font-weight: 600; }
.text-input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  outline: 0;
  background: #0f0e14;
  color: var(--text);
}
.text-input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,49,95,.12); }
.text-input::placeholder { color: #635f69; }

.number-stepper { display: grid; grid-template-columns: 48px 72px 1fr 48px; align-items: center; gap: 10px; }
.number-stepper button { height: 48px; border: 1px solid var(--line-strong); background: transparent; font-size: 25px; cursor: pointer; }
.number-stepper button:hover { border-color: var(--acid); color: var(--acid); }
.number-stepper output { color: var(--acid); font-size: 36px; font-weight: 950; text-align: center; }
.number-stepper input { width: 100%; accent-color: var(--pink); }

.seat-preview, .seat-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.seat-preview span, .seat-picker button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.seat-picker button { cursor: pointer; }
.seat-picker button[aria-pressed="true"] { border-color: var(--pink); background: var(--pink); color: #fff; box-shadow: 0 0 0 4px rgba(255,49,95,.13); }
.seat-picker-glasses button[aria-pressed="true"] { border-color: var(--acid); background: var(--acid); color: var(--ink); box-shadow: 0 0 0 4px rgba(217,255,69,.1); }

.option-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.option-cards-three { grid-template-columns: 1fr; }
.option-card { position: relative; display: grid; min-height: 128px; align-content: start; padding: 16px; border: 1px solid var(--line); background: #111017; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card:has(input:checked) { border-color: var(--pink); background: linear-gradient(140deg, rgba(255,49,95,.15), rgba(255,49,95,.025)); box-shadow: inset 0 -3px var(--pink); }
.option-card:has(input:focus-visible) { outline: 2px solid var(--acid); outline-offset: 2px; }
.option-icon { display: grid; width: 30px; height: 30px; place-items: center; margin-bottom: 13px; border: 1px solid currentColor; color: #77727f; font-size: 11px; font-weight: 950; }
.option-card:has(input:checked) .option-icon { background: var(--pink); color: #fff; }
.option-card strong { font-size: 14px; }
.option-card small { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.5; }

.difficulty-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.difficulty-options label { position: relative; cursor: pointer; }
.difficulty-options input { position: absolute; opacity: 0; }
.difficulty-options span { display: flex; min-height: 57px; flex-direction: column; justify-content: center; padding: 9px 12px; border: 1px solid var(--line); background: #111017; }
.difficulty-options input:checked + span { border-color: var(--acid); color: var(--acid); box-shadow: inset 0 -2px var(--acid); }
.difficulty-options b { font-size: 13px; }
.difficulty-options small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.switch-field { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.switch-field .field-label { display: block; margin-bottom: 6px; }
.switch-field p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.switch { position: relative; flex: 0 0 auto; width: 52px; height: 30px; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border: 1px solid var(--line-strong); border-radius: 99px; background: #0d0c11; cursor: pointer; transition: .2s; }
.switch span::after { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #77727f; content: ""; transition: .2s; }
.switch input:checked + span { border-color: var(--pink); background: rgba(255,49,95,.2); }
.switch input:checked + span::after { background: var(--pink); transform: translateX(22px); }

.pool-preview { display: grid; gap: 5px; margin-top: 24px; padding: 16px; border-left: 3px solid var(--acid); background: rgba(217,255,69,.06); }
.pool-preview span, .pool-preview small { color: var(--muted); font-size: 10px; }
.pool-preview strong { font-size: 17px; }

.setup-principle { display: flex; align-items: center; gap: 15px; margin-top: 14px; padding: 17px 20px; border: 1px solid var(--line); color: var(--muted); }
.setup-principle > span { display: grid; flex: 0 0 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--pink); color: #fff; font-weight: 950; }
.setup-principle p { margin: 0; font-size: 12px; line-height: 1.65; }
.setup-principle strong { display: block; color: var(--text); }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s, background .18s, border-color .18s;
}
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { background: var(--pink); color: #fff; box-shadow: 7px 7px 0 rgba(217,14,64,.38); }
.button-primary:hover { background: #ff4570; }
.button-secondary { border-color: var(--line-strong); background: var(--panel-strong); }
.button-secondary:hover, .button-ghost:hover { border-color: var(--acid); color: var(--acid); }
.button-ghost { border-color: var(--line); }
.button-danger { border-color: rgba(255,69,109,.45); color: #ff7896; }
.button-danger:hover { background: var(--danger); color: #fff; }
.button-link { color: var(--muted); }
.button-wide { width: 100%; }
.button-small { min-height: 41px; padding: 0 13px; font-size: 12px; }
.button-start { width: 100%; min-height: 66px; justify-content: space-between; margin-top: 16px; padding: 0 24px; font-size: 16px; }
.button-start b { font-size: 12px; letter-spacing: .04em; }
.form-message { min-height: 22px; margin: 12px 0 0; color: #ff7896; font-size: 12px; text-align: center; }

.workspace-header { align-items: center; padding: 8px 0 24px; border-bottom: 1px solid var(--line); }
.back-button { min-height: 42px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.back-button:hover { color: var(--acid); }
.workspace-header > div { flex: 1; }

.deal-layout { margin-top: 28px; }
.deal-stage { width: min(630px, 100%); margin: 0 auto; }
.deal-progress { display: grid; gap: 9px; margin-bottom: 14px; }
.deal-progress span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-align: center; }
.deal-progress i { display: block; height: 3px; overflow: hidden; background: var(--line); }
.deal-progress b { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--pink), var(--acid)); transition: width .35s; }

.privacy-card {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: linear-gradient(155deg, #1c1923, #0e0d13 72%);
  box-shadow: var(--shadow);
}
.privacy-card::before { position: absolute; top: -80px; right: -80px; width: 220px; height: 220px; border: 45px solid rgba(255,49,95,.15); border-radius: 50%; content: ""; }
.privacy-cover, .secret-card { position: relative; z-index: 1; min-height: 540px; padding: 38px 28px 28px; }
.privacy-cover { display: flex; align-items: center; flex-direction: column; text-align: center; }
.privacy-cover > p:first-child { margin: 14px 0 6px; color: var(--muted); font-size: 13px; }
.privacy-cover > strong { display: flex; align-items: end; color: var(--acid); font-size: clamp(92px, 25vw, 144px); font-weight: 950; line-height: .9; letter-spacing: -.08em; }
.privacy-cover > strong small { margin: 0 0 10px 8px; font-size: 21px; letter-spacing: 0; }
.privacy-cover h2 { margin: 25px 0 9px; font-size: clamp(22px, 5vw, 34px); }
.privacy-cover h2 b { color: var(--pink); }
.privacy-cover > p:not(:first-child) { max-width: 390px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.hold-button { position: relative; width: min(330px, 100%); min-height: 60px; overflow: hidden; margin-top: auto; border: 1px solid var(--pink); background: rgba(255,49,95,.08); color: #fff; font-size: 14px; font-weight: 900; cursor: pointer; user-select: none; touch-action: none; }
.hold-button i { position: absolute; inset: 0; background: var(--pink); transform: scaleX(0); transform-origin: left; }
.hold-button.is-holding i { animation: holdFill 900ms linear forwards; }
.hold-button span { position: relative; z-index: 1; }
@keyframes holdFill { to { transform: scaleX(1); } }

.secret-card { display: flex; flex-direction: column; }
.secret-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.secret-card-top code { color: var(--acid); }
.secret-card-list { display: grid; gap: 12px; margin: auto 0; }
.secret-item { padding: 24px 20px; border: 1px solid rgba(255,49,95,.34); background: linear-gradient(145deg, rgba(255,49,95,.13), rgba(255,255,255,.025)); }
.secret-item-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.secret-item h3 { margin: 0; font-size: clamp(23px, 6vw, 37px); line-height: 1.22; letter-spacing: -.04em; }
.secret-item p { margin: 12px 0 0; color: #bdb7c4; font-size: 11px; line-height: 1.65; }
.secret-note { margin: 18px 0; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; }
.privacy-reminder { display: flex; gap: 14px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); }
.privacy-reminder span { color: var(--pink); font-size: 9px; font-weight: 950; letter-spacing: .14em; }
.privacy-reminder p { margin: 0; color: #77727f; font-size: 10px; line-height: 1.55; }

.host-deal-stage > header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.host-deal-stage > header h2 { margin: 0; font-size: 30px; }
.host-deal-stage > header > p { max-width: 420px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.host-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.host-card { position: relative; min-height: 210px; padding: 19px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.host-card::after { position: absolute; right: -7px; bottom: -20px; color: rgba(255,255,255,.035); content: attr(data-seat); font-size: 110px; font-weight: 950; line-height: 1; }
.host-card header { position: relative; z-index: 1; display: flex; justify-content: space-between; margin-bottom: 18px; }
.host-card header strong { color: var(--acid); font-size: 20px; }
.host-card header span { color: var(--muted); font-family: ui-monospace, monospace; font-size: 10px; }
.host-card-content { position: relative; z-index: 1; display: grid; gap: 13px; }
.host-card-content article + article { padding-top: 13px; border-top: 1px solid var(--line); }
.host-card-content h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.host-card-content p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

.game-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 10px 0 24px; border-bottom: 1px solid var(--line); }
.game-heading h1 { margin: 0; font-size: clamp(31px, 5vw, 52px); letter-spacing: -.05em; }
.game-meta { display: flex; gap: 12px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.game-meta time { color: var(--acid); font-family: ui-monospace, monospace; }
.game-header-actions { display: flex; gap: 8px; }

.score-hero { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 30px; margin: 28px 0; padding: 24px; border: 1px solid rgba(255,49,95,.28); background: linear-gradient(105deg, rgba(255,49,95,.15), rgba(255,49,95,.02)); }
.score-hero > div { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 10px; }
.score-hero span { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.score-hero strong { color: var(--pink); font-size: 58px; line-height: 1; }
.score-hero small { color: #817b87; font-size: 10px; }
.score-hero > p { max-width: 440px; margin: 0 0 0 auto; color: #aaa5b3; font-size: 12px; line-height: 1.7; }

.section-heading.compact { align-items: center; margin: 0 0 16px; }
.section-heading.compact h2 { font-size: 26px; }
.section-heading.compact > span { color: var(--muted); font-size: 11px; }
.scoreboard { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.score-seat { position: relative; min-height: 150px; overflow: hidden; padding: 17px; border: 1px solid var(--line); background: var(--panel); text-align: left; cursor: pointer; }
.score-seat:hover { border-color: var(--pink); transform: translateY(-1px); }
.score-seat::after { position: absolute; right: -6px; bottom: -22px; color: rgba(255,255,255,.035); content: attr(data-seat); font-size: 118px; font-weight: 1000; line-height: 1; }
.score-seat.is-leading { border-color: rgba(217,255,69,.42); background: linear-gradient(150deg, rgba(217,255,69,.1), var(--panel) 55%); }
.score-seat-top { position: relative; z-index: 1; display: flex; justify-content: space-between; }
.score-seat-top strong { color: var(--text); font-size: 21px; }
.score-seat-top span { color: var(--muted); font-size: 10px; }
.score-seat-value { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 7px; margin-top: 20px; }
.score-seat-value strong { color: var(--pink); font-size: 48px; line-height: 1; }
.score-seat-value span { color: var(--muted); font-size: 10px; }
.score-seat hint { position: relative; z-index: 1; display: block; margin-top: 8px; color: #6f6a75; font-size: 9px; }

.game-lower-grid { display: grid; gap: 12px; margin-top: 28px; }
.activity-card, .rule-card { border: 1px solid var(--line); background: var(--panel); }
.activity-card { padding: 20px; }
.activity-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.activity-card h2 { margin: 0; font-size: 24px; }
.text-button { padding: 8px 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.text-button:hover:not(:disabled) { color: var(--acid); }
.text-button:disabled { opacity: .4; cursor: not-allowed; }
.activity-list { display: grid; gap: 7px; }
.activity-item { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line); }
.activity-item > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: rgba(255,49,95,.13); color: var(--pink); font-weight: 900; }
.activity-item strong { display: block; font-size: 12px; }
.activity-item p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.activity-item time { color: #68636f; font-family: ui-monospace, monospace; font-size: 9px; }
.empty-list { padding: 36px 12px; color: var(--muted); text-align: center; }
.empty-list strong { display: block; color: var(--text); font-size: 14px; }
.empty-list span { display: block; margin-top: 7px; font-size: 10px; }
.rule-card { position: relative; overflow: hidden; padding: 25px; background: var(--acid); color: var(--ink); }
.rule-card::after { position: absolute; right: -12px; bottom: -42px; color: rgba(16,16,21,.07); content: "!"; font-size: 230px; font-weight: 1000; line-height: 1; }
.rule-card > * { position: relative; z-index: 1; }
.rule-card > span { font-size: 9px; font-weight: 950; letter-spacing: .16em; }
.rule-card h2 { margin: 25px 0 14px; font-size: 31px; line-height: 1.05; letter-spacing: -.04em; }
.rule-card p { margin: 0 0 12px; font-size: 11px; line-height: 1.6; }
.rule-card .text-button { color: var(--ink); font-weight: 850; }

.summary-view { width: min(760px, 100%); margin: 0 auto; }
.summary-hero { padding: 50px 10px 35px; text-align: center; }
.summary-crown { display: block; margin-bottom: 12px; color: var(--acid); font-size: 58px; line-height: 1; }
.summary-hero h1 { margin: 0; font-size: clamp(42px, 9vw, 78px); line-height: .98; letter-spacing: -.065em; }
.summary-hero h1 em { color: var(--pink); font-style: normal; }
.summary-hero > p:last-child { margin: 19px 0 0; color: var(--muted); font-size: 12px; }
.summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 12px; border: 1px solid var(--line); }
.summary-stats article { padding: 18px 10px; text-align: center; }
.summary-stats article + article { border-left: 1px solid var(--line); }
.summary-stats span { display: block; color: var(--muted); font-size: 9px; }
.summary-stats strong { display: block; margin-top: 8px; color: var(--acid); font-size: clamp(23px, 6vw, 38px); }
.ranking-card { padding: 22px; border: 1px solid var(--line); background: var(--panel); }
.ranking-card header h2 { margin: 0; font-size: 27px; }
.ranking-list { display: grid; gap: 8px; margin-top: 18px; }
.ranking-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); background: #111017; }
.ranking-row:first-child { border-color: rgba(217,255,69,.5); background: rgba(217,255,69,.08); }
.ranking-row > span { color: var(--muted); font-family: ui-monospace, monospace; font-size: 11px; }
.ranking-row strong { font-size: 15px; }
.ranking-row b { color: var(--pink); font-size: 21px; }
.ranking-row b small { margin-left: 4px; color: var(--muted); font-size: 9px; }
.summary-actions { display: grid; gap: 10px; margin-top: 14px; }

.tool-footer { display: flex; width: min(1180px, calc(100% - 32px)); min-height: 60px; align-items: center; justify-content: space-between; gap: 12px; margin: 0 auto; padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: #68636f; font-size: 10px; }
.tool-footer a { text-decoration: none; }
.tool-footer a:hover { color: var(--text); }

dialog { color: var(--text); }
dialog::backdrop { background: rgba(4, 3, 7, .82); backdrop-filter: blur(7px); }
.sheet {
  width: min(560px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--line-strong);
  background: #17151d;
  box-shadow: var(--shadow);
}
.sheet[open] { animation: sheetIn .22s ease-out; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.dialog-close { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; height: 0; margin: 0; }
.dialog-close button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #17151d; color: var(--muted); cursor: pointer; }
.sheet h2 { margin: 0 42px 10px 0; font-size: 30px; letter-spacing: -.04em; }
.sheet > p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.65; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 22px; }
.hit-card-options { display: grid; gap: 8px; margin-top: 18px; }
.hit-card-option { position: relative; display: block; cursor: pointer; }
.hit-card-option input { position: absolute; opacity: 0; }
.hit-card-option span { display: block; padding: 14px; border: 1px solid var(--line); background: #100f15; }
.hit-card-option input:checked + span { border-color: var(--pink); background: rgba(255,49,95,.1); }
.hit-card-option strong { display: block; font-size: 14px; }
.hit-card-option small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.replace-sheet .hold-button { width: 100%; }
.replace-sheet > .dialog-close { display: none; }
.replace-sheet h2 span { color: var(--acid); }
.replacement-result > span { color: var(--pink); font-size: 12px; font-weight: 850; }
.replacement-result h2 { margin-top: 16px; color: var(--text); font-size: 31px; line-height: 1.2; }
.replacement-result > div { margin: 14px 0; color: var(--acid); font-size: 11px; }
.replacement-result > p:not(.eyebrow) { color: var(--muted); font-size: 11px; line-height: 1.6; }
.all-cards-list { display: grid; gap: 8px; margin-top: 18px; }
.all-card-row { padding: 14px; border: 1px solid var(--line); background: #100f15; }
.all-card-row > strong { display: block; color: var(--acid); font-size: 13px; }
.all-card-row div { display: grid; gap: 4px; margin-top: 8px; }
.all-card-row span { font-size: 12px; line-height: 1.45; }
.all-card-row small { color: var(--muted); font-size: 9px; }
.rules-list { display: grid; gap: 13px; padding: 0; margin: 22px 0; list-style: none; }
.rules-list li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding-top: 13px; border-top: 1px solid var(--line); }
.rules-list li > span { color: var(--pink); font-family: ui-monospace, monospace; font-size: 11px; font-weight: 850; }
.rules-list strong { font-size: 13px; }
.rules-list p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.rules-warning { padding: 14px; border-left: 3px solid var(--acid); background: rgba(217,255,69,.06); }
.rules-warning strong { color: var(--acid); font-size: 11px; }
.rules-warning p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.confirm-dialog { width: min(430px, calc(100% - 24px)); padding: 24px; border: 1px solid var(--line-strong); background: #17151d; }
.confirm-dialog h2 { margin: 0; font-size: 25px; }
.confirm-dialog p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.6; }

.toast { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 80; max-width: calc(100% - 36px); padding: 12px 16px; background: var(--acid); color: var(--ink); font-size: 12px; font-weight: 850; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (min-width: 640px) {
  .role-link { display: inline-flex; }
  .app-main { width: min(1180px, calc(100% - 48px)); }
  .view { padding-top: 40px; }
  .hero { min-height: 540px; }
  .hero-seal { display: flex; }
  .option-cards-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .difficulty-options { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .host-card-grid, .scoreboard { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .tool-footer { width: min(1180px, calc(100% - 48px)); }
}

@media (min-width: 920px) {
  .app-header { padding-inline: max(32px, calc((100vw - 1180px) / 2)); }
  .setup-grid { grid-template-columns: 1.08fr .92fr; }
  .setup-panel { padding: 30px; }
  .host-card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .scoreboard { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .game-lower-grid { grid-template-columns: 1.55fr .75fr; }
  .summary-actions { grid-template-columns: 1.25fr 1fr .8fr; }
}

@media (max-width: 639px) {
  .app-header { min-height: 64px; }
  .brand-number { width: 41px; height: 41px; font-size: 17px; box-shadow: 4px 4px 0 var(--pink-dark); }
  .brand-copy small { display: none; }
  .view { min-height: calc(100vh - 120px); padding-top: 18px; }
  .hero { min-height: 460px; padding: 30px 22px; }
  .hero::before { top: auto; right: -95px; bottom: -90px; width: 330px; border-width: 50px; }
  .hero h1 { font-size: clamp(42px, 13vw, 62px); }
  .hero-copy > p:not(.eyebrow) { font-size: 14px; }
  .resume-card { align-items: stretch; flex-direction: column; }
  .resume-actions .button { flex: 1; }
  .setup-form { padding-top: 48px; }
  .setup-panel { padding: 20px 16px; }
  .number-stepper { grid-template-columns: 45px 55px 1fr 45px; }
  .option-card { min-height: 135px; padding: 13px; }
  .setup-principle { align-items: flex-start; padding: 14px; }
  .workspace-header .step-mark { display: none; }
  .host-deal-stage > header { flex-direction: column; }
  .game-header { align-items: stretch; flex-direction: column; }
  .game-header-actions .button { flex: 1; }
  .score-hero { grid-template-columns: 1fr; gap: 12px; padding: 19px; }
  .score-hero > p { margin: 0; }
  .score-seat { min-height: 138px; padding: 14px; }
  .score-seat-value strong { font-size: 42px; }
  .summary-stats strong { font-size: 23px; }
  .sheet { width: 100%; max-height: 88dvh; margin: auto 0 0; padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); border-bottom: 0; }
  .sheet[open] { animation: mobileSheetIn .24s ease-out; }
  @keyframes mobileSheetIn { from { opacity: 0; transform: translateY(30px); } }
  .tool-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 390px) {
  .option-cards { grid-template-columns: 1fr; }
  .option-cards-three { grid-template-columns: 1fr; }
  .option-card { min-height: 108px; }
  .difficulty-options { grid-template-columns: repeat(2, 1fr); }
  .scoreboard { grid-template-columns: 1fr 1fr; }
  .dialog-actions { grid-template-columns: 1fr; }
}

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