@font-face {
  font-family: "Cafe24SsurroundAir";
  src: url("https://cdn.jsdelivr.net/gh/sweetherofonts/fontshero_pack1/cafe24ssurroundair/cafe24ssurroundair-Regular.woff2") format("woff2");
  font-display: swap;
}

@media (max-width: 699px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  textarea,
  select {
    font-size: 16px !important;
  }
}

@font-face {
  font-family: "Cafe24Ssurround";
  src: url("https://cdn.jsdelivr.net/gh/sweetherofonts/fontshero_pack1/cafe24ssurround/cafe24ssurround-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #090610;
  --panel: rgba(24, 16, 38, .9);
  --panel-strong: #1d142c;
  --line: rgba(190, 140, 255, .22);
  --text: #fffafd;
  --muted: #b9acc7;
  --purple: #a75bff;
  --purple-dark: #7026dd;
  --pink: #ff5fac;
  --gold: #ffd477;
  --success: #57e6b2;
  --danger: #ff6687;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
  font-family: Cafe24SsurroundAir, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -8%, rgba(143, 62, 229, .32), transparent 34rem),
    radial-gradient(circle at 110% 64%, rgba(255, 72, 161, .14), transparent 26rem),
    linear-gradient(180deg, #0b0714 0%, #08050e 100%);
  overscroll-behavior: none;
}

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, .button, .brand, .round-label, .mode-card { font-family: Cafe24Ssurround, Cafe24SsurroundAir, sans-serif; }

.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.ambient i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 18px var(--pink); opacity: .45; animation: drift 7s ease-in-out infinite; }
.ambient i:nth-child(1) { top: 18%; left: 12%; }
.ambient i:nth-child(2) { top: 36%; right: 13%; animation-delay: -2s; background: var(--purple); }
.ambient i:nth-child(3) { bottom: 20%; left: 20%; animation-delay: -4s; }

.app-shell {
  position: relative;
  min-height: 100dvh;
  width: min(100%, 520px);
  margin: 0 auto;
  isolation: isolate;
}

.screen {
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) 20px max(22px, env(safe-area-inset-bottom));
}

.home-screen { display: flex; flex-direction: column; align-items: stretch; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { color: #ef82ff; text-decoration: none; font-size: 19px; font-weight: 1000; font-style: italic; letter-spacing: -.06em; }
.brand-logo { display: block; width: 56px; height: 56px; object-fit: contain; }
.brand-copy { display: grid; gap: 2px; font-style: normal; }
.brand-copy strong { color: white; font-size: 14px; line-height: 1.05; letter-spacing: -.02em; }
.brand-copy small { color: #c8bad6; font-size: 8px; font-weight: 850; line-height: 1; letter-spacing: .08em; text-transform: uppercase; }
.brand span { color: white; margin-left: 3px; letter-spacing: -.04em; }
.home-top-actions { display: flex; align-items: center; gap: 8px; }
.status-pill { color: #c8bad6; border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; font-size: 10px; font-weight: 800; letter-spacing: .12em; background: rgba(255,255,255,.03); }
.status-pill b { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--success); box-shadow: 0 0 9px var(--success); }
.settings-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: #e8d9f4; background: rgba(31,21,47,.8); cursor: pointer; font-size: 18px; }
.settings-button:focus-visible { outline: 3px solid rgba(255, 212, 119, .8); outline-offset: 3px; }

.hero-mark {
  position: relative;
  width: 166px;
  height: 145px;
  margin: clamp(48px, 11vh, 94px) auto 20px;
  border: 1px solid rgba(208, 160, 255, .38);
  border-radius: 48% 52% 48% 48% / 62% 62% 36% 36%;
  background: linear-gradient(145deg, rgba(117, 49, 184, .65), rgba(34, 18, 57, .86));
  box-shadow: inset 0 0 36px rgba(255,255,255,.08), 0 0 70px rgba(164, 77, 255, .22);
  transform: rotate(-2deg);
}
.hero-mark::before, .hero-mark::after { content: ""; position: absolute; top: -17px; width: 52px; height: 58px; border-top: 10px solid #7c3bbd; border-radius: 50%; opacity: .75; }
.hero-mark::before { left: 14px; transform: rotate(-25deg); }
.hero-mark::after { right: 14px; transform: rotate(25deg); }
.mask-eye { position: absolute; top: 64px; width: 45px; height: 19px; background: #0c0715; border-radius: 50% 50% 44% 44%; box-shadow: 0 0 16px rgba(255, 94, 196, .3); }
.mask-eye.left { left: 25px; transform: rotate(8deg); }
.mask-eye.right { right: 25px; transform: rotate(-8deg); }
.question { position: absolute; right: -20px; top: -23px; color: var(--pink); font-size: 56px; font-weight: 1000; text-shadow: 0 0 22px rgba(255, 91, 173, .55); transform: rotate(8deg); }

.hero-copy { text-align: center; }
.eyebrow { margin: 0 0 7px; color: #dca9ff; font-size: 11px; font-weight: 900; letter-spacing: .28em; }
.hero-copy h1 { margin: 0; font-size: clamp(46px, 14vw, 68px); line-height: .98; letter-spacing: -.09em; text-shadow: 0 8px 30px rgba(0,0,0,.35); }
.hero-copy h1 span { color: var(--gold); }
.hero-copy > p:last-child { margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }

.home-actions { margin-top: auto; padding-top: 42px; }
.button { border: 0; color: white; cursor: pointer; font-weight: 850; transition: transform .16s ease, filter .16s ease, border-color .16s ease; }
.button-link { display: grid; place-items: center; text-align: center; text-decoration: none; }
.button:active { transform: translateY(2px) scale(.99); }
.button:focus-visible { outline: 3px solid rgba(255, 212, 119, .8); outline-offset: 3px; }
.button-primary { position: relative; width: 100%; min-height: 76px; border-radius: 21px; background: linear-gradient(105deg, var(--purple-dark), var(--purple) 58%, #cb58df); box-shadow: 0 14px 40px rgba(126, 45, 225, .32), inset 0 1px rgba(255,255,255,.26); font-size: 19px; }
.button-primary::after { content: ""; position: absolute; inset: 1px; border: 1px solid rgba(255,255,255,.12); border-radius: 20px; pointer-events: none; }
.button-primary small { display: block; margin-top: 4px; color: rgba(255,255,255,.68); font-size: 11px; font-weight: 650; }
.button-icon { display: inline-grid; width: 26px; height: 26px; place-items: center; margin-right: 6px; border-radius: 50%; background: rgba(255,255,255,.15); font-size: 10px; vertical-align: 2px; }
.secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.button-secondary { min-height: 49px; border: 1px solid var(--line); border-radius: 15px; background: rgba(28,19,42,.76); color: #ddd3e7; font-size: 14px; }
.button-danger { border: 1px solid rgba(255,102,135,.38); color: #ffb0c1; background: rgba(122,29,55,.2); box-shadow: none; }
.home-note { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 20px 0 0; color: #80748e; font-size: 11px; }
.home-note i { width: 3px; height: 3px; border-radius: 50%; background: #705887; }

@keyframes drift { 50% { transform: translateY(-18px) scale(1.4); opacity: .8; } }

@media (min-width: 700px) {
  body { padding: 24px; }
  .app-shell { min-height: calc(100dvh - 50px); border: 1px solid rgba(193,136,255,.16); border-radius: 32px; background: rgba(8,5,14,.42); box-shadow: var(--shadow); overflow: hidden; }
  .screen { min-height: calc(100dvh - 50px); }
}

@media (max-height: 700px) {
  .hero-mark { width: 116px; height: 100px; margin-top: 24px; border-radius: 44%; }
  .hero-mark::before, .hero-mark::after { width: 38px; height: 42px; }
  .mask-eye { top: 45px; width: 33px; height: 14px; }
  .mask-eye.left { left: 17px; } .mask-eye.right { right: 17px; }
  .question { font-size: 42px; }
  .hero-copy h1 { font-size: 46px; }
  .home-actions { padding-top: 24px; }
}

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

/* Shared game screens */
.phase-screen { display: flex; flex-direction: column; gap: 20px; animation: screen-in .34s ease both; }
.game-topbar { display: grid; grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr); align-items: center; min-height: 42px; gap: 8px; }
.brand.compact { font-size: 13px; }
.round-label { color: #d6c9e3; text-align: center; font-size: 12px; font-weight: 850; letter-spacing: .08em; }
.top-spacer { display: flex; align-items: center; justify-content: flex-end; gap: 7px; color: #9e8cae; text-align: right; font-size: 11px; font-weight: 800; }
.host-control-button { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid rgba(255,102,135,.38); border-radius: 11px; color: #ffb3c4; background: rgba(128,32,62,.28); cursor: pointer; font-size: 17px; }
.host-control-button:focus-visible { outline: 3px solid rgba(255,212,119,.8); outline-offset: 2px; }
.phase-screen > .host-control-button { position: fixed; z-index: 30; top: max(14px, env(safe-area-inset-top)); right: max(14px, calc((100vw - 520px) / 2 + 14px)); }
.icon-button { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 13px; color: white; background: rgba(31,21,47,.8); cursor: pointer; font-size: 20px; }
.live-dot { color: var(--success); font-size: 9px; letter-spacing: .14em; }
.live-dot::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.step-kicker { color: #d898ff; font-size: 10px; font-weight: 950; letter-spacing: .2em; }
.section-heading { margin-top: clamp(44px, 10vh, 88px); text-align: center; }
.section-heading.compact-heading { margin-top: 18px; }
.section-heading h1 { margin: 8px 0; font-size: clamp(31px, 9vw, 42px); letter-spacing: -.055em; }
.section-heading p { max-width: 330px; margin: 0 auto; color: var(--muted); font-size: 14px; line-height: 1.55; }
.button[disabled] { cursor: not-allowed; filter: grayscale(.45); opacity: .48; }
.button.ready-on { color: var(--success); border-color: rgba(87,230,178,.35); background: rgba(37,73,68,.32); }
.phase-screen > .button:last-of-type { width: 100%; min-height: 58px; margin-top: auto; border-radius: 17px; }

/* Entry, forms and guidance */
.mode-stack { display: grid; gap: 13px; margin-top: 12px; }
.mode-card { display: grid; grid-template-columns: 58px 1fr 20px; align-items: center; min-height: 98px; padding: 16px; border: 1px solid var(--line); border-radius: 22px; color: white; text-align: left; background: linear-gradient(135deg, rgba(42,27,64,.9), rgba(23,15,35,.9)); cursor: pointer; box-shadow: 0 14px 34px rgba(0,0,0,.16); }
.mode-card.host-card { border-color: rgba(183,103,255,.5); background: radial-gradient(circle at 10% 20%, rgba(170,70,255,.22), transparent 48%), var(--panel); }
.mode-card.fool-card { border-color: rgba(255,195,100,.42); background: radial-gradient(circle at 10% 20%, rgba(255,176,65,.16), transparent 48%), var(--panel); }
.mode-card.fool-card .mode-icon { color: #ffd477; border-color: rgba(255,195,100,.34); background: rgba(166,99,28,.2); }
.mode-card.hard-fool-card { border-color: rgba(255,102,135,.5); background: radial-gradient(circle at 10% 20%, rgba(255,83,168,.2), transparent 48%), var(--panel); }
.mode-card.hard-fool-card .mode-icon { color: #ff9eb7; border-color: rgba(255,102,135,.4); background: rgba(151,37,78,.22); }
.join-divider { display: flex; align-items: center; gap: 10px; margin: 15px 2px 1px; color: #796d84; font-size: 9px; letter-spacing: .06em; }
.join-divider::before, .join-divider::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, rgba(186,153,214,.2)); }
.join-divider::after { background: linear-gradient(90deg, rgba(186,153,214,.2), transparent); }
.join-divider span { white-space: nowrap; }
.mode-card.join-card { border-style: dashed; border-color: rgba(157,144,174,.28); background: rgba(16,12,23,.68); box-shadow: none; }
.mode-card.join-card .mode-icon { color: #bdb1c8; border-color: rgba(171,157,185,.24); background: rgba(132,119,144,.12); }
.mode-card.join-card em { color: #9588a0; }
.mode-card.join-card:hover, .mode-card.join-card:focus-visible { border-color: rgba(205,188,220,.5); background: rgba(28,21,38,.78); }
.mode-card .mode-icon { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid rgba(201,147,255,.34); border-radius: 15px; color: var(--gold); background: rgba(130,63,203,.2); font-size: 25px; font-weight: 900; }
.mode-card b { display: block; margin-bottom: 5px; font-size: 17px; }
.mode-card small { color: var(--muted); font-size: 11px; }
.mode-card em { color: #caa0f2; font-style: normal; font-size: 20px; }
.recent-room-card { display: grid; grid-template-columns: 38px 1fr 18px; align-items: center; gap: 9px; min-height: 58px; padding: 9px 13px; border: 1px solid rgba(87,230,178,.28); border-radius: 17px; color: white; text-align: left; background: rgba(31,82,68,.2); cursor: pointer; }
.recent-room-card > span:first-child { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: var(--success); background: rgba(87,230,178,.12); font-size: 20px; }
.recent-room-card b, .recent-room-card small { display: block; }.recent-room-card b { font-size: 13px; }.recent-room-card small { margin-top: 3px; color: #9dcbbb; font-size: 9px; }.recent-room-card em { color: var(--success); font-style: normal; }
.tip-card, .joined-banner { display: flex; align-items: center; gap: 13px; margin-top: auto; padding: 15px; border: 1px solid rgba(255,211,119,.16); border-radius: 17px; background: rgba(255,209,119,.055); }
.tip-card > span { display: grid; flex: 0 0 28px; height: 28px; place-items: center; border-radius: 50%; color: #24152e; background: var(--gold); font-weight: 1000; }
.tip-card p, .joined-banner p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.tip-card b { color: #f8dfaa; }
.form-card { display: grid; gap: 17px; padding: 20px; border: 1px solid var(--line); border-radius: 23px; background: var(--panel); box-shadow: var(--shadow); }
.field { display: grid; gap: 8px; color: #ded4e7; font-size: 12px; font-weight: 800; }
.field input, .field select { width: 100%; min-height: 51px; padding: 0 14px; border: 1px solid rgba(195,147,239,.25); border-radius: 14px; outline: 0; color: white; background: rgba(10,7,17,.72); }
.field input:focus, .field select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(167,91,255,.14); }
.field input::placeholder { color: #756a81; }
.segmented { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.segmented button { min-height: 42px; padding: 0; border: 1px solid rgba(183,143,221,.2); border-radius: 11px; color: #a99db5; background: rgba(13,9,20,.65); cursor: pointer; font-size: 11px; font-weight: 800; }
.segmented button.active { color: white; border-color: var(--purple); background: linear-gradient(140deg, #7130d1, #a454ec); }
.game-mode-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.game-mode-options button { min-height: 78px; padding: 12px 10px; border: 1px solid rgba(183,143,221,.2); border-radius: 14px; color: #aaa0b4; background: rgba(13,9,20,.65); cursor: pointer; text-align: left; }
.game-mode-options button.active { color: white; border-color: var(--purple); background: radial-gradient(circle at 10% 10%,rgba(193,96,255,.2),transparent 55%),linear-gradient(145deg,#57249a,#29163f); box-shadow: 0 0 0 2px rgba(167,91,255,.1); }
.game-mode-options b, .game-mode-options small { display: block; }
.game-mode-options b { font-size: 13px; }
.game-mode-options small { margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.vote-visibility-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.vote-visibility-options button { min-height: 54px; padding: 8px 10px; border: 1px solid rgba(183,143,221,.2); border-radius: 13px; color: #aaa0b4; background: rgba(13,9,20,.65); cursor: pointer; text-align: left; }
.vote-visibility-options button.active { color: white; border-color: var(--success); background: rgba(36,91,75,.3); box-shadow: 0 0 0 2px rgba(87,230,178,.08); }
.vote-visibility-options b, .vote-visibility-options small { display: block; }.vote-visibility-options b { font-size: 11px; }.vote-visibility-options small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.quick-mode-toggle { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 12px; min-height: 55px; padding: 10px 13px; border: 1px solid rgba(255,102,135,.26); border-radius: 14px; background: rgba(151,37,78,.1); cursor: pointer; }
.quick-mode-toggle b, .quick-mode-toggle small { display: block; }.quick-mode-toggle b { color: #ffc0cf; font-size: 12px; }.quick-mode-toggle small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.quick-mode-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.quick-mode-toggle i { position: relative; flex: 0 0 42px; height: 24px; border-radius: 20px; background: #3a3044; transition: .2s; }
.quick-mode-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: .2s; }
.quick-mode-toggle input:checked + i { background: linear-gradient(135deg, var(--pink), var(--purple)); box-shadow: 0 0 16px rgba(255,95,172,.22); }
.quick-mode-toggle input:checked + i::after { transform: translateX(18px); }
.quick-mode-toggle.compact { min-height: 38px; padding: 5px 9px; }.quick-mode-toggle.compact small { font-size: 8px; }
.create-select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.range-heading { display: flex; align-items: center; justify-content: space-between; }
.range-heading output { color: var(--gold); font-size: 14px; }
.player-count-control { display: grid; grid-template-columns: minmax(0, 1fr) 52px; align-items: center; gap: 8px; }
.player-range { min-height: 24px !important; padding: 0 !important; border: 0 !important; background: transparent !important; accent-color: var(--purple); cursor: pointer; }
.player-range::-webkit-slider-runnable-track { height: 7px; border-radius: 99px; background: linear-gradient(90deg, #7430d5, #bd59e8); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.player-range::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -7px; border: 3px solid white; border-radius: 50%; background: var(--purple); box-shadow: 0 3px 12px rgba(0,0,0,.45); -webkit-appearance: none; }
.player-range::-moz-range-track { height: 7px; border-radius: 99px; background: linear-gradient(90deg, #7430d5, #bd59e8); }
.player-range::-moz-range-thumb { width: 17px; height: 17px; border: 3px solid white; border-radius: 50%; background: var(--purple); }
.player-free-button { min-height: 31px; border: 1px solid rgba(183,143,221,.28); border-radius: 10px; color: #b4a6c0; background: rgba(13,9,20,.72); cursor: pointer; font-size: 10px; font-weight: 900; }
.player-free-button.active { color: #17101e; border-color: var(--gold); background: var(--gold); box-shadow: 0 0 16px rgba(255,212,119,.2); }
.player-range-field.free-active .player-range { opacity: .3; cursor: not-allowed; }
.range-scale { display: flex; justify-content: space-between; margin-top: -4px; padding-right: 60px; color: #82748e; }
.range-scale i { font-style: normal; font-size: 9px; }
.setting-summary { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(151,89,208,.1); }
.setting-summary > span { color: #d59cff; font-size: 20px; }
.setting-summary p { margin: 0; font-size: 12px; }
.setting-summary small { display: block; margin-top: 3px; color: var(--muted); font-weight: 500; }
.sticky-action { min-height: 58px; }
.join-heading { margin-top: 34px; }
.join-symbol { display: grid; width: 74px; height: 74px; margin: 0 auto 18px; place-items: center; border: 1px solid rgba(190,120,255,.4); border-radius: 24px; color: #daabff; background: rgba(121,50,194,.24); box-shadow: 0 0 45px rgba(162,70,255,.16); font-size: 43px; font-weight: 900; }
.join-form { margin-top: 8px; }
.code-input { text-align: center; text-transform: uppercase; font-size: 24px !important; font-weight: 950; letter-spacing: .18em; }
.privacy-note { margin: 0; color: #756a80; text-align: center; font-size: 10px; }
.guide-list { display: grid; gap: 10px; }
.guide-list article { display: flex; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: rgba(27,18,41,.78); }
.guide-list article > span { color: #d192ff; font-size: 12px; font-weight: 950; }
.guide-list h2 { margin: 0 0 4px; font-size: 14px; }
.guide-list p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.warning-card { padding: 15px; border: 1px solid rgba(255,91,172,.28); border-radius: 16px; color: #ffd7ea; background: rgba(255,75,162,.08); text-align: center; font-size: 12px; line-height: 1.5; }
.settings-card { display: grid; margin-top: 12px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--panel); }
.settings-card label { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.settings-card label:last-child { border-bottom: 0; }
.settings-card b, .settings-card small { display: block; }
.settings-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.settings-card input { position: absolute; opacity: 0; }
.settings-card i { position: relative; width: 46px; height: 26px; border-radius: 20px; background: #3a3044; transition: .2s; }
.settings-card i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: white; transition: .2s; }
.settings-card input:checked + i { background: var(--purple); }
.settings-card input:checked + i::after { transform: translateX(20px); }
.support-card { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.support-card h2 { margin: 5px 0 4px; font-size: 18px; }
.support-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.email-copy-button { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 54px; padding: 8px 9px 8px 13px; border: 1px solid rgba(188,124,255,.3); border-radius: 14px; color: white; text-align: left; background: rgba(10,7,17,.72); cursor: pointer; }
.email-copy-button span { min-width: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 800; }
.email-copy-button strong { padding: 9px 10px; border-radius: 9px; color: #f7eaff; background: rgba(139,66,208,.4); font-size: 10px; white-space: nowrap; }
.email-copy-button:focus-visible { outline: 3px solid rgba(255, 212, 119, .8); outline-offset: 3px; }
.settings-actions { display: grid; grid-template-columns: .75fr 1.25fr; gap: 9px; margin-top: auto; }
.settings-actions .button { min-height: 58px; border-radius: 17px; }

/* Invitation preview */
.invite-preview-screen { gap: 14px; }
.invite-preview-heading { text-align: center; }
.invite-preview-heading h1 { margin: 8px 0 5px; font-size: clamp(27px, 8vw, 36px); letter-spacing: -.055em; }
.invite-preview-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.invite-room-card { padding: 17px; border: 1px solid rgba(190,123,255,.36); border-radius: 22px; background: radial-gradient(circle at 12% 8%, rgba(166,77,239,.18), transparent 42%), var(--panel); box-shadow: var(--shadow); }
.invite-host { display: flex; align-items: center; gap: 12px; }
.invite-host > span { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border: 1px solid rgba(213,163,255,.38); border-radius: 15px; color: white; background: linear-gradient(145deg,#8744df,#d061df); font-size: 18px; font-weight: 950; }
.invite-host small { color: #9b89a8; font-size: 9px; }
.invite-host h2 { margin: 3px 0 0; font-size: 19px; }
.invite-status { display: flex; align-items: center; gap: 7px; margin: 13px 0; padding: 9px 11px; border-radius: 11px; font-size: 10px; font-weight: 850; }
.invite-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.invite-status.open { color: var(--success); background: rgba(87,230,178,.08); }
.invite-status.closed { color: var(--danger); background: rgba(255,102,135,.08); }
.invite-room-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; border: 1px solid rgba(190,140,255,.12); border-radius: 13px; overflow: hidden; background: rgba(190,140,255,.12); }
.invite-room-card dl > div { padding: 10px 11px; background: rgba(13,9,20,.88); }
.invite-room-card dt { color: #83758d; font-size: 8px; }
.invite-room-card dd { margin: 4px 0 0; color: #eee6f3; font-size: 11px; font-weight: 850; }
.invite-code { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 10px 12px; border: 1px dashed rgba(190,140,255,.25); border-radius: 12px; }
.invite-code span { color: #887693; font-size: 8px; letter-spacing: .14em; }
.invite-code strong { color: #e6c5ff; font-size: 16px; letter-spacing: .12em; }
.invite-entry-form { display: grid; gap: 11px; }
.invite-enter-button, .invite-decline-button { width: 100%; min-height: 54px; border-radius: 16px; }
.invite-decline-button { min-height: 43px; }
.invite-preview-loading, .invite-preview-error { display: grid; margin: auto 0; place-items: center; text-align: center; }
.invite-preview-loading > span { width: 52px; height: 52px; border: 4px solid rgba(190,140,255,.14); border-top-color: var(--purple); border-radius: 50%; animation: invite-spin .8s linear infinite; }
.invite-preview-loading h1, .invite-preview-error h1 { margin: 20px 0 7px; font-size: 24px; }
.invite-preview-loading p, .invite-preview-error p { margin: 0; color: var(--muted); font-size: 11px; }
.invite-preview-error > span { display: grid; width: 66px; height: 66px; place-items: center; border: 1px solid rgba(255,102,135,.4); border-radius: 20px; color: var(--danger); background: rgba(255,102,135,.1); font-size: 34px; font-weight: 950; }
.invite-preview-error .button { width: 100%; min-height: 56px; margin-top: 28px; border-radius: 17px; }

.resume-choice-screen { justify-content: center; gap: 18px; }
.resume-choice-heading { text-align: center; }
.resume-choice-heading h1 { margin: 9px 0 6px; font-size: clamp(30px, 9vw, 42px); letter-spacing: -.055em; }
.resume-choice-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.resume-choice-card { display: flex; align-items: center; gap: 16px; padding: 19px; border: 1px solid rgba(190,123,255,.36); border-radius: 22px; background: radial-gradient(circle at 10% 10%, rgba(166,77,239,.2), transparent 46%), var(--panel); box-shadow: var(--shadow); }
.resume-choice-symbol { display: grid; flex: 0 0 68px; height: 68px; place-items: center; border: 1px solid rgba(220,173,255,.28); border-radius: 22px; color: #f0ccff; background: rgba(155,75,223,.18); font-size: 37px; font-weight: 1000; }
.resume-choice-card small, .resume-choice-card strong, .resume-choice-card p { display: block; }
.resume-choice-card small { color: #9b86a9; font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.resume-choice-card strong { margin-top: 2px; color: white; font-size: 30px; letter-spacing: .12em; }
.resume-choice-card p { margin: 4px 0 0; color: #b8a9c2; font-size: 10px; }
.resume-choice-actions { display: grid; gap: 10px; }
.resume-choice-actions .button { display: flex; min-height: 67px; flex-direction: column; justify-content: center; gap: 3px; border-radius: 18px; }
.resume-choice-actions .button small { color: inherit; font-size: 9px; font-weight: 650; opacity: .7; }
.resume-expiry-note { margin: 0; color: #8d7e98; text-align: center; font-size: 10px; }

/* Lobby */
.room-mode-badge { align-self: center; padding: 7px 12px; border: 1px solid rgba(178,114,244,.28); border-radius: 999px; color: #d9b1ff; background: rgba(110,49,167,.16); font-family: Cafe24Ssurround, sans-serif; font-size: 10px; }
.room-mode-badge.fool { color: #ffd28c; border-color: rgba(255,190,92,.3); background: rgba(141,87,27,.16); }
.room-mode-badge.hard-fool { color: #ffadc1; border-color: rgba(255,102,135,.38); background: rgba(151,37,78,.18); }
.lobby-settings { padding: 12px; border: 1px solid rgba(190,140,255,.22); border-radius: 18px; background: rgba(27,18,41,.76); }
.lobby-settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.lobby-settings-heading b { font-family: Cafe24Ssurround, sans-serif; font-size: 13px; }
.lobby-settings-heading small { color: #a292ae; font-size: 8px; }
.room-settings-form { display: grid; gap: 12px; }
.room-settings-form .mode-field { grid-column: 1 / -1; }
.room-settings-form .player-range-field { grid-column: 1 / -1; }
.room-settings-form .game-mode-options button { min-height: 44px; padding: 6px 10px; }
.room-settings-form .game-mode-options b, .room-settings-form .game-mode-options small { display: inline; }
.room-settings-form .game-mode-options small { margin-left: 5px; }
.room-settings-form .quick-mode-toggle { grid-column: 1 / -1; }
.room-settings-save { width: 100%; min-height: 39px; border-radius: 12px; color: #e5d5f2; }
.room-settings-save.settings-dirty { color: white; box-shadow: 0 0 0 3px rgba(190,97,255,.16), 0 12px 30px rgba(142,57,220,.28); animation: save-nudge 1.25s ease-in-out infinite; }
.lobby-code { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(31,21,47,.76); }
.lobby-code > span { min-width: 0; color: #8c7e99; font-size: 8px; font-weight: 900; letter-spacing: .12em; white-space: nowrap; }
.lobby-code button { border: 0; color: #f4dfff; background: none; cursor: pointer; font-size: 18px; font-weight: 950; letter-spacing: .09em; white-space: nowrap; }
.lobby-code small { margin-left: 5px; color: var(--muted); font-size: 9px; letter-spacing: 0; }
.invite-card { padding: 18px; border: 1px solid rgba(181,106,255,.35); border-radius: 23px; background: radial-gradient(circle at 50% 12%, rgba(158,74,239,.17), transparent 52%), var(--panel); text-align: center; }
.invite-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.invite-card-heading > div { min-width: 0; }
.invite-card h1 { margin: 0 0 5px; font-size: 22px; }
.invite-card p { margin: 0; color: var(--muted); font-size: 11px; }
.invite-card-toggle { display: inline-flex; min-height: 34px; flex: 0 0 auto; align-items: center; gap: 5px; padding: 0 10px; border: 1px solid rgba(196,139,255,.28); border-radius: 11px; color: #e4c1ff; background: rgba(100,45,148,.22); cursor: pointer; font-size: 10px; font-weight: 900; }
.invite-card-toggle i { font-style: normal; font-size: 14px; line-height: 1; }
.invite-card.collapsed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, .8fr); grid-template-areas: "heading code"; align-items: center; gap: 12px; padding: 11px 14px; text-align: left; }
.invite-card.collapsed .invite-card-heading { grid-area: heading; }
.invite-card.collapsed .invite-card-heading p { display: none; }
.invite-card.collapsed .lobby-code { grid-area: code; min-width: 0; }
.invite-card.collapsed .qr-wrap, .invite-card.collapsed .invite-link, .invite-card.collapsed .share-button { display: none; }
.invite-open-button { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 76px; padding: 12px 15px; border: 1px solid rgba(181,106,255,.38); border-radius: 20px; color: white; background: radial-gradient(circle at 5% 20%, rgba(183,77,255,.26), transparent 38%), rgba(29,19,45,.9); box-shadow: 0 14px 38px rgba(76,28,116,.2); cursor: pointer; text-align: left; }
.invite-open-button:focus-visible { outline: 3px solid rgba(255,212,119,.8); outline-offset: 3px; }
.invite-open-icon { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid rgba(220,176,255,.26); border-radius: 15px; color: #edc9ff; background: rgba(150,68,221,.2); font-size: 22px; }
.invite-open-button b, .invite-open-button small { display: block; }
.invite-open-button b { font-family: Cafe24Ssurround, sans-serif; font-size: 16px; }
.invite-open-button small { margin-top: 4px; color: #a996b7; font-size: 9px; }
.invite-open-button em { color: #d9a8ff; font-style: normal; font-size: 10px; font-weight: 900; white-space: nowrap; }
.qr-wrap { width: 168px; height: 168px; margin: 16px auto; padding: 8px; border-radius: 17px; background: white; box-shadow: 0 0 30px rgba(196,139,255,.17); }
.qr-wrap img { width: 100%; height: 100%; display: block; }
.invite-link { display: flex; align-items: center; min-height: 43px; padding-left: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7,5,12,.65); overflow: hidden; }
.invite-link span { min-width: 0; flex: 1; color: #ad9fb9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-size: 10px; }
.invite-link button { align-self: stretch; border: 0; border-left: 1px solid var(--line); color: #d9a9ff; background: rgba(124,57,187,.18); cursor: pointer; font-size: 11px; font-weight: 800; }
.share-button { width: 100%; min-height: 46px; margin-top: 9px; border: 1px solid rgba(192,139,247,.25); border-radius: 13px; background: rgba(81,40,118,.34); }
.joined-banner { margin-top: 0; }
.joined-banner > span { display: grid; flex: 0 0 40px; height: 40px; place-items: center; border-radius: 50%; color: #12231e; background: var(--success); font-weight: 950; }
.joined-banner b { color: white; }
.players-panel { min-height: 0; }
.panel-title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 9px; }
.panel-title h2 { margin: 0; font-size: 15px; }
.panel-title span { color: #9c8aa9; font-size: 10px; }
.player-list { display: grid; gap: 7px; }
.player-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid rgba(184,139,224,.13); border-radius: 14px; background: rgba(28,19,42,.62); }
.player-row.me { border-color: rgba(177,95,255,.36); background: rgba(87,40,124,.22); }
.avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 13px; color: white; background: linear-gradient(145deg, #5f4cad, #a05cd8); font-size: 14px; font-weight: 900; }
.avatar-2 { background: linear-gradient(145deg, #bf4b82, #ee7ba5); }.avatar-3 { background: linear-gradient(145deg, #2b90a0, #65d3c0); }.avatar-4 { background: linear-gradient(145deg, #b5702a, #e0af4e); }.avatar-5 { background: linear-gradient(145deg, #5063bf, #8b9aed); }
.player-row b { font-size: 13px; }.player-row em { padding: 2px 5px; border-radius: 5px; color: #deafff; background: rgba(164,80,233,.18); font-style: normal; font-size: 8px; }
.player-row small { display: block; margin-top: 3px; color: #766a80; font-size: 8px; letter-spacing: .08em; }
.player-status-area { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.ready-state { color: #7c7186; font-size: 9px; font-weight: 900; white-space: nowrap; }.ready-state.on { color: var(--success); }
.kick-player-button, .management-player-list button { min-height: 29px; padding: 0 9px; border: 1px solid rgba(255,102,135,.32); border-radius: 9px; color: #ff9eb3; background: rgba(138,39,70,.18); cursor: pointer; font-size: 9px; font-weight: 900; }
.kick-player-button:hover, .management-player-list button:hover { border-color: rgba(255,102,135,.65); background: rgba(168,44,83,.28); }
.lobby-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: auto; }.lobby-actions > .button { min-height: 56px; border-radius: 16px; }
.lobby-actions > .button:only-child { grid-column: 1 / -1; }
.lobby-actions .close-room-button { grid-column: 1 / -1; min-height: 42px; font-size: 11px; }
.waiting-note, .progress-note { margin: -10px 0 0; color: #85768f; text-align: center; font-size: 10px; }

/* App dialogs */
.app-dialog { width: min(calc(100% - 24px), 470px); max-height: min(92dvh, 760px); padding: 0; border: 0; border-radius: 26px; color: var(--text); background: transparent; box-shadow: 0 28px 100px rgba(0,0,0,.7); overflow: visible; }
.app-dialog::backdrop { background: rgba(5,3,10,.82); backdrop-filter: blur(8px); }
.dialog-surface { max-height: min(92dvh, 760px); padding: 21px; border: 1px solid rgba(198,145,255,.3); border-radius: 26px; background: radial-gradient(circle at 50% 0%, rgba(145,61,222,.22), transparent 32%), #160f22; overflow-y: auto; overscroll-behavior: contain; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.dialog-heading span { color: #d697ff; font-size: 9px; font-weight: 950; letter-spacing: .18em; }
.dialog-heading h1 { margin: 5px 0 4px; font-size: 25px; letter-spacing: -.04em; }
.dialog-heading p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.dialog-heading > button { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: #d8c9e3; background: rgba(255,255,255,.04); cursor: pointer; font-size: 24px; line-height: 1; }
.invite-dialog-qr { width: min(58vw, 238px); height: min(58vw, 238px); margin: 18px auto; padding: 10px; border-radius: 22px; background: white; box-shadow: 0 0 48px rgba(183,93,255,.24); }
.invite-dialog-qr img { display: block; width: 100%; height: 100%; }
.invite-copy-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; align-items: center; width: 100%; margin-top: 9px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 15px; color: white; background: rgba(8,5,13,.64); cursor: pointer; text-align: left; }
.invite-copy-card span { grid-column: 1; color: #887895; font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.invite-copy-card strong { grid-column: 1; min-width: 0; overflow: hidden; color: #f1dcff; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; letter-spacing: .08em; }
.invite-copy-card em { grid-column: 2; grid-row: 1 / span 2; color: #d9a9ff; font-style: normal; font-size: 10px; font-weight: 900; white-space: nowrap; }
.invite-link-copy strong { font-family: Cafe24SsurroundAir, sans-serif; font-size: 11px; letter-spacing: 0; }
.invite-dialog-share { min-height: 56px; margin-top: 13px; border-radius: 16px; font-size: 15px; }
.dialog-close-button { width: 100%; min-height: 45px; margin-top: 9px; border-radius: 14px; }
.management-section { margin-top: 18px; }
.management-dialog .dialog-surface { background: radial-gradient(circle at 85% 0%, rgba(255,82,132,.1), transparent 30%), radial-gradient(circle at 20% 0%, rgba(145,61,222,.2), transparent 34%), #160f22; }
.management-section-title { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-bottom: 9px; }
.management-section-title b { font-family: Cafe24Ssurround, sans-serif; font-size: 13px; }
.management-section-title small { color: #8d7e99; text-align: right; font-size: 8px; }
.management-player-list { display: grid; gap: 7px; }
.management-player-list article { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid rgba(185,138,225,.15); border-radius: 14px; background: rgba(25,17,38,.78); }
.management-player-list .avatar { width: 36px; height: 36px; border-radius: 11px; }
.management-player-list b, .management-player-list small { display: block; }
.management-player-list b { font-size: 12px; }
.management-player-list small { margin-top: 2px; color: #7f7189; font-size: 8px; }
.management-empty, .management-notice { margin: 0; padding: 13px; border: 1px solid rgba(190,140,255,.14); border-radius: 13px; color: #9d8daa; background: rgba(255,255,255,.025); font-size: 10px; line-height: 1.5; }
.management-notice { border-color: rgba(255,190,92,.22); color: #d7bb91; background: rgba(143,91,28,.09); }
.danger-zone { margin-top: 17px; padding: 15px; border: 1px solid rgba(255,102,135,.3); border-radius: 18px; background: radial-gradient(circle at 100% 0%, rgba(255,74,121,.15), transparent 45%), rgba(85,22,43,.14); }
.danger-zone > span { color: #ff9db2; font-size: 8px; font-weight: 950; letter-spacing: .12em; }
.danger-zone h2 { margin: 5px 0 4px; font-size: 18px; }
.danger-zone p { margin: 0; color: #bda2aa; font-size: 9px; line-height: 1.5; }
.danger-zone .button { width: 100%; min-height: 48px; margin-top: 12px; border-radius: 14px; }

/* Countdown and secret card */
.countdown-screen { display: grid; place-items: center; overflow: hidden; }
.countdown-stage { width: 100%; text-align: center; }
.round-chip { display: inline-block; margin: 0; padding: 7px 13px; border: 1px solid rgba(190,125,255,.28); border-radius: 999px; color: #d5a5ff; background: rgba(118,52,183,.15); font-size: 10px; font-weight: 950; letter-spacing: .16em; }
.countdown-number { height: 190px; margin-top: 14px; color: white; font-size: clamp(130px, 42vw, 190px); font-weight: 1000; line-height: 190px; letter-spacing: -.08em; text-shadow: 0 0 45px rgba(175,85,255,.65), 0 15px 50px rgba(0,0,0,.45); }
.countdown-number.pop { animation: count-pop .55s cubic-bezier(.2,.85,.25,1); }
.countdown-stage h1 { margin: 0; font-size: 18px; }
.privacy-warning { display: flex; align-items: center; gap: 13px; max-width: 360px; margin: 38px auto 0; padding: 17px; border: 1px solid rgba(255,92,168,.28); border-radius: 18px; background: rgba(255,73,159,.08); text-align: left; }
.privacy-warning > span { display: grid; flex: 0 0 44px; height: 44px; place-items: center; border-radius: 14px; color: #ffb6d8; background: rgba(255,89,171,.14); font-size: 22px; }
.privacy-warning p { margin: 0; color: #bdaebf; font-size: 11px; line-height: 1.55; }.privacy-warning b { color: #ffe5f1; font-size: 13px; }
.countdown-dots { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }.countdown-dots i { width: 5px; height: 5px; border-radius: 50%; background: #a65cff; animation: dot-wave 1.1s infinite; }.countdown-dots i:nth-child(2){animation-delay:.15s}.countdown-dots i:nth-child(3){animation-delay:.3s}
.card-heading, .discussion-heading, .vote-heading, .nomination-heading, .defense-heading, .guess-heading, .final-heading { text-align: center; }
.card-heading h1, .discussion-heading h1, .vote-heading h1, .nomination-heading h1, .defense-heading h1, .guess-heading h1, .final-heading h1 { margin: 10px 0 5px; font-size: clamp(27px, 8vw, 38px); letter-spacing: -.055em; }
.card-heading p, .discussion-heading p, .vote-heading p, .nomination-heading p, .defense-heading p, .guess-heading p, .final-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.secret-card { position: relative; display: flex; min-height: 385px; flex-direction: column; align-items: center; justify-content: center; padding: 26px; border: 1px solid rgba(255,215,141,.62); border-radius: 27px; background: radial-gradient(circle at 50% 24%, rgba(255,218,137,.16), transparent 35%), linear-gradient(150deg, #f9f0df, #e7d5bb); color: #26192d; box-shadow: 0 26px 65px rgba(0,0,0,.42), 0 0 0 5px rgba(255,238,202,.06); overflow: hidden; animation: card-enter .7s cubic-bezier(.18,.85,.2,1) both; }
.secret-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(80,46,85,.18); border-radius: 20px; pointer-events: none; }
.secret-card.liar-card { color: white; border-color: rgba(213,107,255,.55); background: radial-gradient(circle at 50% 25%, rgba(177,66,255,.32), transparent 35%), linear-gradient(150deg, #342047, #160d22); }
.card-shine { position: absolute; top: -80%; left: -65%; width: 80%; height: 240%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.17), transparent); transform: rotate(24deg); animation: shine 2.8s .4s ease-in-out both; }
.role-label, .keyword-label { color: #765c78; font-size: 9px; font-weight: 950; letter-spacing: .2em; }.liar-card .role-label,.liar-card .keyword-label { color: #c9a2dd; }
.role-symbol { display: grid; width: 63px; height: 63px; margin: 12px 0 8px; place-items: center; border: 1px solid rgba(89,56,95,.25); border-radius: 50%; color: #fff7e7; background: #50325a; font-size: 36px; font-weight: 1000; }.liar-card .role-symbol { color: var(--pink); border-color: rgba(255,95,172,.5); background: #1a0d24; box-shadow: 0 0 32px rgba(255,94,172,.24); }
.secret-card h2 { margin: 0; font-size: 28px; letter-spacing: -.05em; }.card-rule { width: 46px; height: 1px; margin: 17px 0; background: currentColor; opacity: .2; }
.secret-card > strong { margin: 6px 0 12px; font-size: clamp(40px, 13vw, 57px); line-height: 1; letter-spacing: -.07em; }.liar-card > strong { color: #ef8bff; letter-spacing: .12em; }
.category-chip { padding: 7px 12px; border-radius: 999px; background: rgba(78,45,79,.1); font-size: 10px; font-weight: 850; }.liar-card .category-chip { background: rgba(205,123,255,.12); }
.secret-card p { max-width: 250px; margin: 18px 0 0; color: #69546b; text-align: center; font-size: 10px; line-height: 1.5; }.liar-card p { color: #c1a9cb; }

/* Discussion and voting */
.timer-ring { --progress: 360deg; position: relative; display: grid; width: 215px; height: 215px; margin: 2px auto; place-items: center; border-radius: 50%; background: conic-gradient(var(--pink) 0deg, var(--purple) var(--progress), rgba(255,255,255,.07) var(--progress)); box-shadow: 0 0 45px rgba(157,63,241,.18); }
.timer-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #100918; }
.timer-ring > div { position: relative; text-align: center; }.timer-ring span { display: block; font-variant-numeric: tabular-nums; font-size: 48px; font-weight: 950; letter-spacing: -.05em; }.timer-ring small { color: var(--muted); font-size: 10px; }
.speaker-card { display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto auto; column-gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.speaker-card > span { grid-column: 2; color: #a892b8; font-size: 9px; }.speaker-avatar { grid-row: 1 / span 3; display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: linear-gradient(145deg,#8946e5,#d568df); font-weight: 950; }
.speaker-card h2 { grid-column: 2; margin: 2px 0; font-size: 18px; }.speaker-card p { grid-column: 2; margin: 0; color: var(--gold); font-size: 10px; }
.speaker-pass-button { min-height: 42px; margin-top: -10px; border-radius: 13px; font-size: 11px; }
.discussion-tip { display: flex; gap: 11px; padding: 13px; border-radius: 15px; background: rgba(125,74,166,.1); }.discussion-tip > span { color: var(--gold); font-size: 20px; }.discussion-tip p { margin: 0; color: #9d8ca8; font-size: 10px; line-height: 1.5; }.discussion-tip b { color: #d9cce1; }
.quick-discussion-screen .quick-heading { margin-top: 10px; }.quick-speaker { border-color: rgba(255,102,135,.34); background: radial-gradient(circle at 50% 0,rgba(255,83,168,.18),transparent 60%),var(--panel); }.quick-speaker h2 { color: #ffc0cf; }.quick-timer { width: 176px; height: 176px; }
.keyword-peek-button { position: absolute; z-index: 55; top: 62px; right: 14px; min-height: 34px; padding: 0 11px; border: 1px solid rgba(255,212,119,.35); border-radius: 999px; color: #ffe6a8; background: rgba(38,25,48,.94); box-shadow: 0 8px 24px rgba(0,0,0,.28); cursor: pointer; touch-action: none; user-select: none; font-size: 10px; font-weight: 900; }
.keyword-peek-overlay { position: fixed; z-index: 80; inset: 0; display: grid; place-content: center; gap: 10px; padding: 24px; text-align: center; pointer-events: none; opacity: 0; background: rgba(7,4,12,.94); backdrop-filter: blur(12px); transition: opacity .12s ease; }
.keyword-peek-overlay.visible { opacity: 1; }.keyword-peek-overlay small { color: #b79cc8; font-size: 11px; font-weight: 900; letter-spacing: .18em; }.keyword-peek-overlay strong { color: var(--gold); font-family: Cafe24Ssurround, sans-serif; font-size: clamp(48px,16vw,76px); letter-spacing: -.06em; }.keyword-peek-overlay span { color: var(--muted); font-size: 11px; }
.named-vote-history { display: grid; gap: 7px; max-height: 132px; padding: 10px; border: 1px solid rgba(87,230,178,.22); border-radius: 14px; background: rgba(25,63,54,.16); overflow-y: auto; }
.named-vote-history > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.named-vote-history > div b { color: #bff7e2; font-size: 10px; }.named-vote-history > div small { color: #7f9f94; font-size: 7px; }
.named-vote-history article { display: grid; grid-template-columns: 58px 1fr; gap: 4px 7px; padding-top: 6px; border-top: 1px solid rgba(87,230,178,.12); }.named-vote-history article > strong { grid-row: 1 / span 10; color: var(--success); font-size: 8px; }.named-vote-history article > span { display: grid; grid-template-columns: minmax(0,1fr) 14px minmax(0,1fr); align-items: center; color: #c5b8cc; font-size: 9px; }.named-vote-history article > span b { overflow: hidden; color: white; text-overflow: ellipsis; white-space: nowrap; }.named-vote-history article > span i { color: var(--pink); text-align: center; font-style: normal; }
.vote-progress { height: 6px; border-radius: 8px; background: rgba(255,255,255,.07); overflow: hidden; }.vote-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--purple),var(--pink)); transition: width .3s; }
.vote-count { margin: -12px 0 0; color: #88798f; text-align: center; font-size: 9px; }
.candidate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.candidate { position: relative; display: flex; min-height: 126px; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 18px; color: white; background: rgba(27,18,41,.8); cursor: pointer; transition: .17s; }
.candidate.selected { border-color: var(--pink); background: radial-gradient(circle at 50% 20%, rgba(255,87,172,.16), transparent 62%), rgba(49,23,55,.9); box-shadow: 0 0 0 2px rgba(255,95,172,.17); transform: translateY(-2px); }
.candidate .avatar { margin-bottom: 7px; }.candidate b { font-size: 13px; }.candidate small { margin-top: 3px; color: #7e7087; font-size: 8px; letter-spacing: .08em; }.candidate i { position: absolute; top: 9px; right: 9px; display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #231329; background: var(--pink); font-style: normal; font-size: 11px; font-weight: 950; }

/* Nomination and final defense */
.nominee-card { position: relative; display: flex; min-height: 255px; flex-direction: column; align-items: center; justify-content: center; padding: 25px; border: 1px solid rgba(255,91,168,.4); border-radius: 26px; background: radial-gradient(circle at 50% 35%,rgba(255,91,168,.18),transparent 55%),linear-gradient(150deg,rgba(55,25,66,.96),rgba(25,14,37,.96)); text-align: center; box-shadow: 0 18px 55px rgba(0,0,0,.32); }
.nominee-card.is-me { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255,91,168,.1),0 20px 60px rgba(255,68,151,.18); }
.nominee-card > span { color: var(--pink); font-size: 9px; font-weight: 950; letter-spacing: .2em; }
.nominee-avatar { display: grid; width: 82px; height: 82px; margin: 14px 0 9px; place-items: center; border: 2px solid rgba(255,255,255,.2); border-radius: 28px; background: linear-gradient(145deg,#8c46e4,#e15caa); font-size: 33px; font-weight: 950; }
.nominee-card strong { font-size: clamp(34px,10vw,47px); letter-spacing: -.055em; }
.nominee-card p { margin: 9px 0 0; color: #c7b3ce; font-size: 11px; line-height: 1.5; }
.nomination-progress { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nomination-progress span { padding: 10px; border: 1px solid var(--line); border-radius: 12px; color: #b9a8c2; background: rgba(255,255,255,.025); text-align: center; font-size: 10px; font-weight: 800; }
.nomination-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.nomination-actions .button { min-width: 0; padding-inline: 10px; font-size: 12px; }
.defense-card { min-height: 300px; border-color: rgba(255,205,120,.42); background: radial-gradient(circle at 50% 35%,rgba(255,202,109,.13),transparent 58%),linear-gradient(150deg,rgba(51,31,60,.96),rgba(24,14,36,.96)); }

/* Reveal, guess and final */
.reveal-screen { display: grid; place-items: center; overflow: hidden; }.reveal-stage { width: 100%; text-align: center; }
.reveal-line { color: #c7b8d1; opacity: 0; font-size: 17px; animation: reveal-line .6s .3s forwards; }.reveal-player { margin: 34px 0; opacity: 0; transform: scale(.7); animation: reveal-player .65s 1.45s cubic-bezier(.18,.9,.2,1) forwards; }.reveal-player span { display: block; margin-bottom: 7px; color: var(--pink); font-size: 10px; font-weight: 900; letter-spacing: .2em; }.reveal-player strong { font-size: clamp(47px,15vw,70px); letter-spacing: -.07em; }
.reveal-line.line-two { animation-delay: 2.6s; }.identity-reveal { margin-top: 25px; opacity: 0; transform: scale(.65); animation: identity .8s 3.65s cubic-bezier(.15,.9,.2,1) forwards; }.identity-reveal > span { display: grid; width: 78px; height: 78px; margin: 0 auto 12px; place-items: center; border: 2px solid currentColor; border-radius: 50%; font-size: 43px; font-weight: 1000; }.identity-reveal h1 { margin: 0; font-size: 48px; }.identity-reveal p { margin: 9px 0; color: var(--muted); font-size: 13px; }.identity-reveal.caught { color: var(--pink); }.identity-reveal.innocent { color: var(--success); }
.brain-orb { display: grid; width: 106px; height: 106px; margin: 18px auto; place-items: center; border: 1px solid rgba(255,103,180,.48); border-radius: 46% 54% 50% 50%; color: var(--pink); background: radial-gradient(circle,rgba(255,93,174,.25),rgba(102,40,147,.15)); box-shadow: 0 0 50px rgba(255,83,168,.2); font-size: 58px; font-weight: 1000; animation: pulse-orb 2s infinite; }
.waiting-stage { margin: auto 0; text-align: center; }.waiting-stage h1 { margin: 15px 0; font-size: 35px; letter-spacing: -.06em; }.waiting-stage p { color: var(--muted); font-size: 12px; line-height: 1.6; }.waiting-stage b { color: white; }
.thinking-dots { display: flex; justify-content: center; gap: 9px; margin-top: 32px; }.thinking-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--purple); animation: dot-wave 1.1s infinite; }.thinking-dots i:nth-child(2){animation-delay:.15s}.thinking-dots i:nth-child(3){animation-delay:.3s}
.guess-heading .brain-orb { width: 80px; height: 80px; margin: 4px auto 13px; font-size: 44px; }.category-banner { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: rgba(41,26,59,.75); }.category-banner > span { color: var(--gold); font-size: 25px; }.category-banner small,.category-banner b { display: block; }.category-banner small { color: #8f809b; font-size: 8px; }.category-banner b { margin-top: 2px; font-size: 14px; }
.guess-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.guess-option { position: relative; min-height: 65px; border: 1px solid var(--line); border-radius: 15px; color: white; background: rgba(27,18,41,.8); cursor: pointer; font-size: 14px; font-weight: 800; }.guess-option.selected { border-color: var(--pink); background: rgba(103,40,102,.48); }.guess-option i { position: absolute; top: 7px; right: 8px; color: var(--pink); font-style: normal; }
.final-heading { margin-top: 8px; }.winner-symbol { display: grid; width: 78px; height: 78px; margin: 0 auto 14px; place-items: center; border: 2px solid currentColor; border-radius: 50%; font-size: 42px; font-weight: 1000; box-shadow: 0 0 40px currentColor; }.final-heading.citizens { color: var(--gold); }.final-heading.liar { color: var(--pink); }.final-heading p { color: var(--muted); }
.result-card { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 21px; background: var(--panel); overflow: hidden; }.result-card > div { padding: 15px; border-right: 1px solid var(--line); }.result-card > div:nth-child(2) { border-right: 0; }.result-card span,.result-card strong { display: block; }.result-card span { color: #8d7e98; font-size: 9px; }.result-card strong { margin-top: 5px; font-size: 17px; }.result-card .keyword-result { grid-column: 1 / -1; border-top: 1px solid var(--line); border-right: 0; text-align: center; background: rgba(133,67,192,.1); }.result-card .keyword-result strong { color: var(--gold); font-size: 33px; }.result-card > p { grid-column: 1 / -1; margin: 0; padding: 10px; border-top: 1px solid var(--line); color: #9b8ba6; text-align: center; font-size: 10px; }.result-card > p b { color: white; }
.rematch-button { font-size: 19px; box-shadow: 0 15px 42px rgba(137,54,222,.35); }.final-confetti i { position: absolute; top: 18%; left: 14%; width: 7px; height: 16px; border-radius: 2px; background: var(--pink); animation: confetti 3s infinite; }.final-confetti i:nth-child(2){left:30%;animation-delay:-1s;background:var(--gold)}.final-confetti i:nth-child(3){left:72%;animation-delay:-.6s;background:var(--success)}.final-confetti i:nth-child(4){left:86%;animation-delay:-1.8s;background:var(--purple)}.final-confetti i:nth-child(5){left:55%;animation-delay:-2.3s;background:#6db7ff}

.toast { position: fixed; z-index: 100; left: 50%; bottom: max(25px, env(safe-area-inset-bottom)); width: min(calc(100% - 36px), 440px); padding: 14px 18px; border: 1px solid rgba(192,140,241,.3); border-radius: 15px; color: white; background: rgba(34,22,49,.97); box-shadow: 0 16px 45px rgba(0,0,0,.45); text-align: center; font-size: 12px; font-weight: 750; opacity: 0; transform: translate(-50%, 14px); transition: .23s; }.toast.show { opacity: 1; transform: translate(-50%,0); }.toast.error { border-color: rgba(255,88,130,.45); color: #ffd5df; }
.is-busy .button, .is-busy .mode-card, .is-busy .candidate, .is-busy .guess-option { pointer-events: none; }

@keyframes screen-in { from { opacity:0; transform:translateY(8px); } }
@keyframes count-pop { 0%{opacity:.2;transform:scale(.45)} 55%{opacity:1;transform:scale(1.12)} 100%{transform:scale(1)} }
@keyframes dot-wave { 50% { opacity:.25; transform:translateY(-7px); } }
@keyframes card-enter { from { opacity:0; transform:perspective(800px) rotateY(70deg) translateY(24px); } }
@keyframes shine { to { left:145%; } }
@keyframes reveal-line { to { opacity:1; } }
@keyframes reveal-player { to { opacity:1; transform:scale(1); } }
@keyframes identity { to { opacity:1; transform:scale(1); } }
@keyframes pulse-orb { 50% { transform:scale(1.04); box-shadow:0 0 68px rgba(255,83,168,.32); } }
@keyframes confetti { from { transform:translateY(-90px) rotate(0); opacity:0; } 15%{opacity:1} to { transform:translateY(420px) rotate(520deg); opacity:0; } }
@keyframes invite-spin { to { transform: rotate(360deg); } }
@keyframes save-nudge { 50% { transform: translateY(-2px); filter: brightness(1.12); } }

@media (orientation: landscape) and (max-height: 620px) {
  .phase-screen { min-height: 100dvh; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .game-topbar { min-height: 34px; }.section-heading,.section-heading.compact-heading { margin-top: 0; }.section-heading h1 { font-size: 28px; }
  .mode-stack { grid-template-columns: 1fr 1fr; }.game-choice-stack .recent-room-card,.game-choice-stack .join-divider,.game-choice-stack .join-card { grid-column: 1 / -1; }.tip-card { margin-top: 4px; }.form-card { grid-template-columns: 1fr 1fr; gap: 10px; }.form-card .mode-field,.form-card .quick-mode-toggle,.form-card .vote-visibility-field,.form-card .sticky-action,.form-card .setting-summary { grid-column: 1 / -1; }
  .invite-card { display: grid; grid-template-columns: 1fr 130px; text-align:left; }.qr-wrap { grid-row:1 / span 3; grid-column:2; width:120px; height:120px; margin:0 auto; }.invite-link,.share-button { grid-column:1; }.player-list { grid-template-columns:1fr 1fr; }
  .card-heading { display:none; }.secret-card { min-height:300px; }.timer-ring { width:150px; height:150px; }.timer-ring span { font-size:38px; }.candidate-grid { grid-template-columns:repeat(3,1fr); }.candidate { min-height:90px; }
}

@media (max-width: 350px) {
  .screen { padding-left: 14px; padding-right: 14px; }.segmented { grid-template-columns: repeat(3,1fr); }.secret-card { min-height:350px; }.candidate { min-height:112px; }
}

/* In-game AdFit layout */
.game-center {
  width: min(100%, 520px);
  margin: 0 auto;
}

.game-ad {
  display: none;
  overflow: hidden;
  line-height: 0;
}

body.large-ad-active .game-ad-banner {
  display: flex;
  width: 100%;
  height: 100px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
}

.game-ad[data-adfit-fluid] .kakao_ad_area { width: 100% !important; max-width: 100%; }

@media (max-width: 1039px) {
  html,
  body {
    min-height: 0;
    height: 100dvh;
    overflow: hidden;
  }

  .game-ad-mobile {
    display: flex;
    width: 320px;
    height: 50px;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
  }

  body.large-ad-active .game-ad-banner {
    display: none;
  }

  .app-shell,
  .screen,
  body.large-ad-active .app-shell,
  body.large-ad-active .screen,
  body.game-active .app-shell,
  body.game-active .screen {
    min-height: calc(100dvh - 50px);
  }

  .phase-screen,
  body.large-ad-active .phase-screen,
  body.game-active .phase-screen {
    gap: clamp(8px, 1.5vh, 13px);
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
}

body.game-active .app-shell,
body.game-active .screen {
  min-height: calc(100dvh - 50px);
}

body.game-active .phase-screen {
  gap: clamp(8px, 1.6vh, 14px);
  padding-top: max(10px, env(safe-area-inset-top));
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

body.game-active .candidate-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

body.game-active .candidate {
  min-height: clamp(82px, 12vh, 100px);
  border-radius: 15px;
}

body.game-active .candidate .avatar {
  width: 34px;
  height: 34px;
  margin-bottom: 5px;
  border-radius: 11px;
}

body.game-active .candidate b {
  max-width: calc(100% - 10px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.game-active .secret-card {
  min-height: clamp(280px, 42dvh, 350px);
  padding: 20px;
}

body.game-active .timer-ring {
  width: clamp(150px, 24vh, 190px);
  height: clamp(150px, 24vh, 190px);
}

body.game-active .timer-ring span { font-size: 42px; }
body.game-active .card-rule { margin: 12px 0; }
body.game-active .secret-card p { margin-top: 12px; }
body.game-active .final-heading { margin-top: 0; }
body.game-active .winner-symbol { width: 66px; height: 66px; margin-bottom: 9px; font-size: 36px; }
body.game-active .final-heading h1 { margin-top: 6px; }

@media (min-width: 700px) and (max-width: 1039px) {
  .app-shell,
  .screen,
  body.large-ad-active .app-shell,
  body.large-ad-active .screen,
  body.game-active .app-shell,
  body.game-active .screen {
    min-height: calc(100dvh - 100px);
  }
}

@media (min-width: 1040px) {
  .game-ad-mobile { display: none; }
  body.large-ad-active .game-ad-banner { display: none; }

  body.game-active .app-shell,
  body.game-active .screen {
    min-height: calc(100dvh - 50px);
  }
}

@media (max-width: 699px) {
  .dialog-surface { padding: 17px; border-radius: 22px; }
  .app-dialog { border-radius: 22px; }
  .invite-copy-card strong { font-size: 16px; }
  .invite-link-copy strong { font-size: 10px; }

  .invite-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-areas:
      "qr heading"
      "qr link"
      "qr share";
    align-items: center;
    gap: 7px 10px;
    text-align: left;
  }

  .invite-card > div:first-child { grid-area: heading; }
  .invite-card .qr-wrap { grid-area: qr; width: 112px; height: 112px; margin: 0; }
  .invite-card .invite-link { grid-area: link; min-width: 0; }
  .invite-card .share-button { grid-area: share; margin-top: 0; }
}

@media (max-width: 699px) and (max-height: 800px) {
  .screen { padding: 10px 14px; }

  .home-screen { padding-top: 12px; padding-bottom: 10px; }
  .hero-mark { width: 116px; height: 100px; margin: 25px auto 12px; border-radius: 44%; }
  .hero-mark::before, .hero-mark::after { width: 38px; height: 42px; }
  .mask-eye { top: 45px; width: 33px; height: 14px; }
  .mask-eye.left { left: 17px; }
  .mask-eye.right { right: 17px; }
  .question { font-size: 42px; }
  .hero-copy h1 { font-size: 46px; }
  .hero-copy > p:last-child { margin-top: 10px; font-size: 13px; line-height: 1.45; }
  .home-actions { padding-top: 16px; }
  .home-actions .button-primary { min-height: 62px; border-radius: 18px; }
  .secondary-actions { gap: 7px; margin-top: 7px; }
  .secondary-actions .button { min-height: 44px; }
  .home-note { margin-top: 11px; }

  .game-topbar { min-height: 38px; }
  .section-heading,
  .section-heading.compact-heading,
  .join-heading { margin-top: 0; }
  .section-heading h1 { margin: 5px 0; font-size: 27px; }
  .section-heading p { font-size: 12px; line-height: 1.4; }
  .mode-stack { gap: 7px; margin-top: 3px; }
  .mode-card { grid-template-columns: 45px 1fr 16px; min-height: 72px; padding: 9px 11px; border-radius: 17px; }
  .mode-card .mode-icon { width: 37px; height: 37px; border-radius: 12px; font-size: 20px; }
  .mode-card b { margin-bottom: 3px; font-size: 15px; }
  .join-divider { margin: 4px 2px 0; }
  .tip-card, .joined-banner { padding: 10px; }

  .form-card { gap: 8px; padding: 12px; border-radius: 18px; }
  .field { gap: 5px; }
  .field input, .field select { min-height: 43px; }
  .game-mode-options button { min-height: 60px; padding: 7px 8px; }
  .game-mode-options small { margin-top: 3px; line-height: 1.25; }
  .segmented button { min-height: 35px; }
  .setting-summary { padding: 8px; }
  .sticky-action, .phase-screen > .button:last-of-type { min-height: 50px; }
  .join-symbol { width: 52px; height: 52px; margin-bottom: 8px; border-radius: 17px; font-size: 30px; }
  .join-form { margin-top: 0; }

  .guide-list { gap: 6px; }
  .guide-list article { gap: 9px; padding: 9px 10px; }
  .guide-list h2 { margin-bottom: 2px; }
  .guide-list p { line-height: 1.35; }
  .warning-card { padding: 9px; line-height: 1.35; }
  .settings-card { margin-top: 4px; }
  .settings-card label { padding: 11px 13px; }
  .support-card { gap: 8px; padding: 12px; }
  .email-copy-button { min-height: 45px; }
  .settings-actions .button { min-height: 50px; }

  .invite-card { padding: 12px; }
  .invite-card h1 { font-size: 18px; }
  .qr-wrap { width: 112px; height: 112px; margin: 0; }
  .invite-link { min-height: 38px; }
  .share-button { min-height: 40px; margin-top: 6px; }
  .player-list { gap: 5px; }
  .player-row { grid-template-columns: 34px 1fr auto; gap: 8px; padding: 6px 9px; }
  .player-row .avatar { width: 32px; height: 32px; border-radius: 10px; }
  .lobby-actions > .button { min-height: 49px; }
}

@media (max-height: 700px) {
  .invite-dialog .dialog-surface { padding: 16px; }
  .invite-dialog-qr { width: min(34vh, 210px); height: min(34vh, 210px); margin: 11px auto; padding: 8px; border-radius: 18px; }
  .invite-dialog .invite-copy-card { margin-top: 7px; padding: 9px 12px; }
  .invite-dialog-share { min-height: 48px; margin-top: 9px; }
  .invite-dialog .dialog-close-button { min-height: 40px; margin-top: 7px; }
}

@media (max-height: 800px) {
  body.large-ad-active .invite-preview-heading p,
  body.large-ad-active .section-heading p { display: none; }
  body.large-ad-active .invite-room-card { padding: 13px; }
  body.large-ad-active .invite-status { margin: 9px 0; }
  body.large-ad-active .invite-room-card dl > div { padding: 8px 9px; }
  body.large-ad-active .invite-code { margin-top: 8px; padding-top: 8px; padding-bottom: 8px; }

  body.game-active .card-heading p,
  body.game-active .discussion-heading p,
  body.game-active .vote-heading p,
  body.game-active .nomination-heading p,
  body.game-active .defense-heading p,
  body.game-active .guess-heading p { display: none; }

  body.game-active .card-heading h1,
  body.game-active .discussion-heading h1,
  body.game-active .vote-heading h1,
  body.game-active .nomination-heading h1,
  body.game-active .defense-heading h1,
  body.game-active .guess-heading h1,
  body.game-active .final-heading h1 {
    margin-top: 5px;
    font-size: 25px;
  }

  body.game-active .secret-card { min-height: 270px; }
  body.game-active .role-symbol { width: 52px; height: 52px; margin: 8px 0 5px; font-size: 29px; }
  body.game-active .secret-card > strong { font-size: 38px; }
  body.game-active .guess-heading .brain-orb { width: 62px; height: 62px; margin-bottom: 7px; font-size: 36px; }
  body.game-active .guess-option { min-height: 52px; }
  body.game-active .result-card > div { padding: 10px; }
  body.game-active .result-card .keyword-result strong { font-size: 26px; }
}

/* Compact mobile setup and lobby */
@media (max-width: 699px) {
  .game-center {
    display: flex;
    width: 100%;
    height: 100dvh;
    flex-direction: column;
  }

  .app-shell {
    width: 100%;
    height: calc(100dvh - 50px);
    min-height: 0 !important;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .screen,
  body.game-active .screen {
    height: 100%;
    min-height: 0 !important;
  }

  .game-ad-mobile { flex: 0 0 50px; }

  .create-screen {
    gap: 6px !important;
    padding-top: max(5px, env(safe-area-inset-top)) !important;
    padding-bottom: 7px !important;
    overflow: hidden;
  }

  .create-screen .game-topbar { min-height: 34px; }
  .create-screen .icon-button { width: 34px; height: 34px; border-radius: 11px; }
  .create-screen .create-form {
    min-height: 0;
    padding: 10px 12px;
    align-content: start;
    gap: 7px;
    border-radius: 17px;
    box-shadow: none;
    overflow: hidden;
  }
  .create-screen .field { gap: 4px; }
  .create-screen .field input:not([type="range"]),
  .create-screen .field select { min-height: 40px; }
  .create-screen .game-mode-options button { min-height: 55px; padding: 6px 8px; }
  .create-screen .game-mode-options small { margin-top: 2px; line-height: 1.2; }
  .create-screen .quick-mode-toggle { min-height: 43px; padding: 6px 9px; }
  .create-screen .vote-visibility-options button { min-height: 40px; padding: 5px 8px; }
  .create-screen .player-range { min-height: 22px !important; }
  .create-screen .range-scale { margin-top: -5px; }
  .create-screen .sticky-action { min-height: 47px; }

  .lobby-screen {
    gap: 7px !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .lobby-screen .game-topbar { flex: 0 0 auto; }
  .lobby-screen .room-mode-badge { flex: 0 0 auto; padding: 5px 10px; }
  .lobby-screen .invite-card {
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-areas:
      "qr heading"
      "qr code"
      "qr link"
      "qr share";
    flex: 0 0 auto;
    gap: 5px 9px;
    padding: 10px;
    border-radius: 18px;
  }
  .lobby-screen .invite-card-heading { grid-area: heading; min-width: 0; }
  .lobby-screen .invite-card-heading h1 { margin: 0; font-size: 16px; }
  .lobby-screen .invite-card-heading p { margin-top: 2px; font-size: 9px; }
  .lobby-screen .invite-card .qr-wrap { grid-area: qr; width: 104px; height: 104px; padding: 6px; border-radius: 14px; }
  .lobby-screen .invite-card .lobby-code { grid-area: code; min-width: 0; min-height: 31px; padding: 4px 7px; }
  .lobby-screen .invite-card .lobby-code > span { font-size: 7px; }
  .lobby-screen .invite-card .lobby-code small { display: none; }
  .lobby-screen .invite-card .lobby-code button { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
  .lobby-screen .invite-card .invite-link { grid-area: link; min-height: 31px; padding-left: 8px; }
  .lobby-screen .invite-card .invite-link span { font-size: 8px; }
  .lobby-screen .invite-card .invite-link button { padding: 0 7px; }
  .lobby-screen .invite-card .share-button { grid-area: share; min-height: 32px; margin: 0; font-size: 11px; }
  .lobby-screen .invite-card.collapsed {
    grid-template-columns: minmax(0, 1fr) minmax(130px, .85fr);
    grid-template-areas: "heading code";
    gap: 7px;
    padding: 7px 9px;
  }
  .lobby-screen .invite-card.collapsed .invite-card-heading p { display: none; }
  .lobby-screen .invite-card.collapsed .lobby-code { grid-area: code; }
  .lobby-screen .invite-card-toggle { min-height: 30px; padding: 0 8px; }

  .lobby-screen > .lobby-code { flex: 0 0 auto; padding: 8px 11px; }
  .lobby-screen .joined-banner { flex: 0 0 auto; }
  .lobby-screen .players-panel {
    display: flex;
    min-height: 82px;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
  }
  .lobby-screen .panel-title { flex: 0 0 auto; margin-bottom: 5px; }
  .lobby-screen .player-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 0;
    flex: 1 1 auto;
    align-content: start;
    gap: 5px;
    padding-right: 2px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(167,91,255,.55) transparent;
  }
  .lobby-screen .player-list.player-columns-1 { grid-template-columns: 1fr; }
  .lobby-screen .player-list.player-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lobby-screen .player-row {
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-width: 0;
    gap: 3px 6px;
    padding: 6px;
    align-content: center;
  }
  .lobby-screen .player-row .avatar { grid-column: 1; grid-row: 1; width: 30px; height: 30px; }
  .lobby-screen .player-row > div { grid-column: 2; grid-row: 1; min-width: 0; }
  .lobby-screen .player-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
  .lobby-screen .player-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lobby-screen .player-status-area { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .lobby-screen .ready-state { text-align: center; font-size: 8px; }
  .lobby-screen .kick-player-button { min-height: 24px; padding: 0 7px; font-size: 8px; }
  .lobby-screen .lobby-actions { flex: 0 0 auto; margin-top: 0; }
  .lobby-screen .lobby-actions > .button { min-height: 44px; }
  .lobby-screen .lobby-actions .close-room-button { min-height: 34px; }
  .lobby-screen .waiting-note { flex: 0 0 auto; margin: 0; }

  .lobby-settings { flex: 0 0 auto; padding: 8px 10px; border-radius: 15px; }
  .lobby-settings-heading { margin-bottom: 6px; }
  .room-settings-form { grid-template-columns: .82fr 1.18fr; gap: 6px 8px; }
  .room-settings-form .mode-field { grid-column: 1; }
  .room-settings-form .player-range-field { grid-column: 2; }
  .room-settings-form .create-select-row { grid-column: 1 / -1; }
  .room-settings-form .field { gap: 4px; }
  .room-settings-form .field select { min-height: 34px; padding: 0 9px; font-size: 10px; }
  .room-settings-form .game-mode-options { gap: 4px; }
  .room-settings-form .game-mode-options button { min-height: 34px; padding: 4px; text-align: center; }
  .room-settings-form .game-mode-options b { font-size: 10px; }
  .room-settings-form .game-mode-options small { display: none; }
  .room-settings-form .quick-mode-toggle { min-height: 32px; padding: 3px 7px; }
  .room-settings-form .quick-mode-toggle small { display: none; }
  .room-settings-form .vote-visibility-field { grid-column: 1 / -1; }
  .room-settings-form .vote-visibility-options button { min-height: 30px; padding: 3px 7px; text-align: center; }
  .room-settings-form .vote-visibility-options small { display: none; }
  .room-settings-form .player-count-control { grid-template-columns: minmax(0,1fr) 43px; gap: 5px; }
  .room-settings-form .range-scale { display: none; }
  .room-settings-form .room-settings-save { grid-column: 1 / -1; min-height: 34px; font-size: 11px; }

  .timer-ring.free-discussion span { font-size: clamp(22px, 7vw, 31px); letter-spacing: -.04em; }
  .timer-ring.free-discussion::before { background: conic-gradient(var(--success), var(--purple), var(--pink), var(--success)); }
}
