@font-face { font-family: 'Game'; src: local('Aptos'), local('Inter'), local('Segoe UI'); font-display: swap; }
:root { color-scheme: dark; --bg: #10121e; --panel: #1b1e30; --panel-hi: #24283f; --ink: #f7f5ff; --muted: #abaec8; --line: #343950; --orange: #ff9c72; --orange-dark: #24170f; --mint: #9ce7d2; --violet: #b0a0ff; --red: #ff94a4; --radius: 23px; font-family: 'Game', system-ui, sans-serif; }
* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; color: var(--ink); min-width: 280px; min-height: 100svh; background: var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button, input, select, summary { touch-action: manipulation; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; }
button:disabled { opacity: .38; cursor: default; }
button:not(:disabled):active { transform: scale(.975); }
button { transition: transform 150ms, background 150ms, border-color 150ms; }
a { color: var(--mint); }
.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.ambient-orb { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(120px); opacity: .11; }
.orb-one { background: #8a68ff; top: -250px; left: calc(50% - 390px); }
.orb-two { background: #ff9269; bottom: -290px; right: calc(50% - 390px); }
.app-shell { position: relative; width: min(100%, 520px); margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 24px max(12px, env(safe-area-inset-bottom)); }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-bottom: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 750; letter-spacing: .1em; }
.brand img { width: 34px; height: 34px; }
.header-actions { display: flex; gap: 8px; }
.icon-button { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: #1a1d2b; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
#app { outline: none; }
.screen { animation: screen-in 320ms both; }
.eyebrow { color: var(--orange); font-size: .875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 9px; }
h1 { font-size: clamp(2rem, 6.5vw, 2.75rem); letter-spacing: -.045em; line-height: 1.08; margin: 0 0 12px; font-weight: 780; overflow-wrap: anywhere; }
h2 { font-size: 1.25rem; letter-spacing: -.02em; margin: 0 0 14px; font-weight: 700; }
h3 { font-size: 1rem; margin: 0 0 8px; }
p { margin: 0 0 16px; line-height: 1.55; }
.muted { color: var(--muted); }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 25px; }
.intro h1 { max-width: 295px; margin-bottom: 0; }
.mini-cast { position: relative; width: 110px; height: 97px; flex-shrink: 0; }
.mini-cast .avatar { position: absolute; border: 3px solid var(--bg); width: 66px; height: 66px; }
.mini-cast .avatar:nth-child(1) { right: 0; top: 0; transform: rotate(12deg); }
.mini-cast .avatar:nth-child(2) { left: 0; bottom: 0; transform: rotate(-12deg); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; margin: 0 0 14px; }
.panel-label { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: .9375rem; font-weight: 650; margin-bottom: 14px; }
.panel-label .icon { color: var(--violet); }
.panel-label .small { margin-left: auto; }
.small { font-size: .875rem; color: var(--muted); font-weight: 400; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.language-button { display: flex; align-items: center; justify-content: center; gap: 11px; border: 1px solid var(--line); border-radius: 14px; min-height: 51px; background: #151827; font-size: .9375rem; }
.language-button b { letter-spacing: .07em; font-size: .875rem; }
.language-button[aria-pressed='true'] { border-color: var(--violet); background: #393252; color: #f5f1ff; }
.stepper-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.stepper-row .panel-label { margin: 0; }
.stepper { display: flex; align-items: center; gap: 19px; }
.stepper button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-hi); font-size: 1.5rem; }
.stepper output { font-size: 1.5rem; width: 30px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.player-list { display: grid; gap: 8px; margin-top: 17px; }
.customize-button { width: 100%; display: flex; align-items: center; justify-content: flex-start; gap: 9px; margin-top: 12px; padding: 9px 0 0; min-height: 38px; background: none; border: 0; color: var(--muted); font-size: .875rem; text-align: left; }
.customize-button .icon { width: 17px; height: 17px; }
.player-row { display: flex; gap: 11px; align-items: center; }
.avatar-button { position: relative; flex-shrink: 0; background: transparent; border: 0; padding: 0; border-radius: 50%; }
.avatar-button::after { content: '+'; position: absolute; bottom: -1px; right: -2px; width: 18px; height: 18px; border-radius: 50%; background: #4b456a; border: 2px solid var(--panel); font-size: .8rem; font-weight: 700; line-height: 14px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background-color: var(--avatar-color, #353052); color: #f9f6ff; font-size: 1rem; font-weight: 700; letter-spacing: -.05em; overflow: hidden; }
.avatar.art { background-image: url('assets/avatars.webp'); background-size: 447.857% 447.857%; background-position: var(--avatar-x) var(--avatar-y); }
.avatar.large { width: 96px; height: 96px; font-size: 2rem; }
.avatar.huge { width: 112px; height: 112px; font-size: 2.5rem; }
.player-row input { width: 100%; min-width: 0; height: 45px; border-radius: 12px; border: 1px solid #31354b; background: #151827; color: var(--ink); padding: 10px 13px; font-size: 1rem; }
input::placeholder { color: #a1a5bc; }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-option { padding: 16px 13px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: #151827; min-height: 108px; }
.mode-option[aria-pressed='true'] { border-color: var(--orange); background: #362c2d; }
.mode-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 1rem; font-weight: 700; }
.mode-option[aria-pressed='true'] .icon { color: var(--orange); }
.mode-option .small { display: block; line-height: 1.4; }
.category-select { display: block; width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 13px; background: #151827; color: var(--ink); padding: 12px; font-size: 1rem; }
.category-bottom { display: flex; align-items: center; gap: 7px; margin-top: 10px; color: var(--muted); font-size: .875rem; }
.category-bottom .icon { width: 16px; height: 16px; }
.timer-setting { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.timer-setting label { display: flex; align-items: center; gap: 9px; font-size: .9375rem; }
.timer-setting input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--orange); }
.timer-setting select { color: var(--ink); background: #151827; border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 42px; }
.button { display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; min-height: 54px; border: 0; border-radius: 16px; padding: 15px 20px; font-size: 1rem; font-weight: 720; text-align: center; }
.button.primary { color: var(--orange-dark); background: var(--orange); box-shadow: 0 7px 28px #ff8b5d16; }
.button.primary:hover { background: #ffb390; }
.button.secondary { color: var(--ink); background: var(--panel-hi); border: 1px solid #41465f; }
.button.subtle { color: var(--muted); background: transparent; min-height: 44px; font-weight: 500; }
.button.danger { color: #2b0c18; background: var(--red); }
.actions { display: grid; gap: 11px; margin-top: 23px; }
.start-button { margin-top: 20px; }
.fine-print { text-align: center; margin: 13px 0 0; font-size: .875rem; color: var(--muted); }
.app-footer { display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font-size: .8125rem; margin: 27px 0 6px; }
.app-footer .icon { width: 15px; height: 15px; }
.footer-button { border: 0; background: transparent; color: inherit; font-size: inherit; min-height: 30px; padding: 4px 8px; text-decoration: underline; text-underline-offset: 3px; }
.progress-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.progress-row .small { font-weight: 600; }
.progress-pips { display: flex; flex-wrap: wrap; gap: 5px; max-width: 60%; }
.pip { width: 8px; height: 8px; border-radius: 50%; background: #41445e; }
.pip.done { background: var(--mint); }
.pip.current { background: var(--orange); }
.centered { text-align: center; }
.handoff-heading { margin-top: 26px; }
.player-name { color: var(--orange); display: block; margin-top: 7px; overflow-wrap: anywhere; }
.secret-card { position: relative; border-radius: 27px; border: 1px solid #68607e; height: 296px; margin: 24px 0 16px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; background: #302946; box-shadow: 0 16px 46px #00000035; cursor: pointer; width: 100%; padding: 0; perspective: 800px; }
.secret-card::before { position: absolute; content: ''; inset: 11px; border: 1px solid #ffffff16; border-radius: 18px; pointer-events: none; }
.secret-card:not(.revealed) { background-image: repeating-linear-gradient(40deg, transparent 0px, transparent 23px, #ffffff04 23px, #ffffff04 24px); }
.card-hidden, .card-revealed { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px; }
.card-hidden { gap: 15px; }
.card-hidden .mask-icon { width: 76px; height: 76px; transform: rotate(-8deg); animation: mask-float 4s ease-in-out infinite; }
.hold-label { font-size: 1.0625rem; font-weight: 650; }
.hold-sublabel { font-size: .875rem; color: #c1b9d8; }
.card-revealed { background: #a9ebd7; color: #11291f; animation: card-in 160ms both; }
.card-revealed.impostor-card { background: #ff9c72; color: #321b10; }
.secret-label { font-size: .875rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 13px; }
.secret-word { font-size: clamp(1.7rem, 8vw, 2.75rem); line-height: 1.1; font-weight: 780; letter-spacing: -.035em; overflow-wrap: anywhere; max-width: 100%; }
.secret-sub { margin: 17px 0 0; font-size: .9375rem; line-height: 1.4; }
.reveal-note { display: flex; gap: 8px; justify-content: center; align-items: center; color: var(--muted); font-size: .875rem; }
.reveal-note .icon { width: 17px; height: 17px; }
.invisible { visibility: hidden; }
.turn-card { display: grid; place-items: center; padding: 35px 20px; margin: 25px 0; gap: 14px; background: var(--panel); border-radius: 25px; border: 1px solid var(--line); }
.turn-card h2 { font-size: 1.7rem; margin: 0; overflow-wrap: anywhere; max-width: 100%; }
.timer-display { position: relative; width: 230px; height: 230px; margin: 30px auto 25px; display: grid; place-items: center; }
.timer-display svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-track { stroke: #30344b; }
.timer-fill { stroke: var(--mint); transition: stroke-dashoffset 400ms linear; }
.timer-center { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.timer-value { font-size: 3.35rem; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; font-weight: 750; }
.timer-center .small { color: var(--muted); }
.timer-display.expired .timer-fill { stroke: var(--orange); }
.timer-buttons { display: flex; justify-content: center; gap: 10px; margin: 0 0 23px; }
.timer-buttons button { border: 1px solid var(--line); padding: 9px 16px; border-radius: 13px; background: var(--panel); display: flex; align-items: center; gap: 7px; min-height: 43px; font-size: .9375rem; }
.suspect-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 24px 0; }
.suspect { display: flex; align-items: center; gap: 10px; text-align: left; min-height: 74px; padding: 11px; background: var(--panel); border: 1px solid var(--line); border-radius: 17px; min-width: 0; }
.suspect span:last-child { font-size: .9375rem; font-weight: 650; overflow-wrap: anywhere; min-width: 0; }
.suspect[aria-pressed='true'] { border-color: var(--violet); background: #3c3457; }
.result-emblem { margin: 30px auto 20px; display: flex; justify-content: center; }
.result-word { padding: 20px; background: var(--panel); border-radius: 20px; border: 1px solid var(--line); margin-top: 23px; }
.result-word .small { display: block; margin-bottom: 7px; }
.result-word strong { font-size: 1.7rem; font-weight: 700; display: block; line-height: 1.2; overflow-wrap: anywhere; }
.result-impostor { display: flex; align-items: center; text-align: left; justify-content: center; gap: 13px; margin: 20px 0; }
.result-impostor .small { display: block; margin-bottom: 4px; }
.result-impostor strong { overflow-wrap: anywhere; }
.tally-list { margin-top: 23px; text-align: left; border-top: 1px solid var(--line); padding-top: 21px; }
.tally-row { display: flex; align-items: center; gap: 10px; margin: 11px 0; }
.tally-name { min-width: 0; overflow-wrap: anywhere; flex: 1; }
.tally-row .avatar { width: 33px; height: 33px; font-size: .8125rem; }
.vote-badge { color: var(--muted); min-width: 55px; text-align: right; font-size: .875rem; font-variant-numeric: tabular-nums; }
.winner-mark { color: var(--orange); font-size: .8125rem; display: block; margin-top: 1px; }
.modal { background: #1b1e30; color: var(--ink); border: 1px solid #48445f; border-radius: 25px; padding: 25px; width: min(460px, calc(100% - 32px)); max-height: min(88svh, 900px); overflow-y: auto; box-shadow: 0 20px 100px #00000080; }
.modal::backdrop { background: #090b16d6; backdrop-filter: blur(6px); }
.modal h2 { padding-right: 30px; }
.modal-close { position: absolute; top: 15px; right: 15px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--panel-hi); display: grid; place-items: center; }
.avatar-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0; }
.avatar-choice { padding: 3px; border-radius: 50%; background: transparent; border: 2px solid transparent; aspect-ratio: 1; width: 100%; }
.avatar-choice .avatar { width: 100%; height: 100%; }
.avatar-choice[aria-pressed='true'] { border-color: var(--orange); }
.color-picker { display: flex; gap: 12px; justify-content: center; padding: 12px 0 20px; }
.color-choice { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; background: var(--avatar-color); }
.color-choice[aria-pressed='true'] { outline: 2px solid var(--orange); outline-offset: 3px; }
.rule-steps { padding-left: 21px; margin: 20px 0; }
.rule-steps li { padding-left: 5px; margin: 14px 0; line-height: 1.5; color: #d5d7e7; }
.rule-steps li::marker { color: var(--orange); font-weight: 700; }
.install-list { display: grid; gap: 14px; margin: 20px 0; }
.install-list p { margin: 0; }
.offline-badge { color: var(--mint); }
.error-screen { padding-top: 35px; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 8; }
.confetti span { position: absolute; width: 7px; height: 12px; top: -25px; background: var(--mint); animation: confetti-fall 1800ms ease-in both; }
.confetti span:nth-child(3n) { background: var(--orange); }
.confetti span:nth-child(3n+1) { background: var(--violet); }
.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; }
.noscript { padding: 30px; }
@keyframes screen-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes card-in { from { opacity: .4; transform: rotateY(-14deg) scale(.985); } to { opacity: 1; transform: rotateY(0) scale(1); } }
@keyframes mask-float { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-7px) rotate(1deg); } }
@keyframes confetti-fall { to { transform: translateY(110svh) rotate(540deg); opacity: 0; } }
@media (min-width: 800px) { .app-shell { margin-top: 28px; padding: 25px 30px 20px; border: 1px solid #303247; border-radius: 34px; background: #10121edb; box-shadow: 0 25px 100px #00000030; margin-bottom: 28px; } }
@media (max-width: 600px) {
  .app-shell { padding-top: max(14px, env(safe-area-inset-top)); }
  .topbar { margin-bottom: 12px; }
  .intro { margin-bottom: 19px; }
  .mini-cast { width: 87px; height: 68px; }
  .mini-cast .avatar { width: 53px; height: 53px; }
  .panel { padding: 14px; margin-bottom: 10px; }
  .panel-label { margin-bottom: 10px; }
  .language-button { min-height: 46px; }
  .customize-button { margin-top: 8px; padding-top: 4px; min-height: 34px; }
  .mode-option { padding: 12px; min-height: 90px; }
  .mode-top { margin-bottom: 6px; }
  .category-select { min-height: 44px; padding: 10px; }
  .category-bottom { margin-top: 8px; }
  .start-button { margin-top: 15px; }
  .fine-print { margin-top: 9px; }
  .app-footer { margin-top: 17px; }
}
@media (max-width: 370px) { .app-shell { padding-left: 16px; padding-right: 16px; } .panel { padding: 15px; } .mini-cast { width: 80px; } .mini-cast .avatar { width: 56px; height: 56px; } .stepper { gap: 11px; } .mode-option { padding: 14px 11px; } .suspect-list { grid-template-columns: 1fr; } .secret-card { height: 270px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .confetti { display: none; } }
