.multiplayer-page { min-height: 100vh; color-scheme: dark; --bg: #0d0c13; --panel: #17151f; --panel-light: #211e2a; --text: #f6f3fb; --muted: #a29cac; --purple: #a37aff; --pink: #ff6cad; color: var(--text); background: radial-gradient(ellipse at 50% 5%, #251a3a 0, #0d0c13 45rem); }
.multiplayer-page .topbar { position: sticky; border-color: #ffffff14; background: #0d0c13ed; }
.multiplayer-page .brand { color: #f6f3fb; }
.multiplayer-page .main-nav .nav-link { color: #aaa4b2; }
.multiplayer-page .main-nav .nav-link:hover, .multiplayer-page .main-nav .nav-link.active { color: #f6f3fb; }
.multiplayer-page .main-nav .nav-link.active::after { background: #a37aff; }
.multiplayer-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 45px 0 42px; }
.multiplayer-hero { text-align: center; padding: 12px 0 27px; }
.multiplayer-hero .section-kicker { margin-bottom: 14px; }
.multiplayer-hero h1 { margin-bottom: 14px; font-size: clamp(42px, 7vw, 66px); }
.multiplayer-hero h1 span { color: #bca1ff; }
.multiplayer-hero > p:not(.section-kicker) { max-width: 600px; margin: 0 auto; color: #b2acbd; font-size: 15px; line-height: 1.7; }
.multiplayer-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 21px; }
.multiplayer-badges span, .online-indicator { border: 1px solid #ffffff14; border-radius: 999px; padding: 8px 12px; background: #17151f; color: #cbc3d8; font-size: 11px; }
.lobby-panel, .room-panel { padding: clamp(20px, 4vw, 34px); border: 1px solid #ffffff15; border-radius: 18px; background: linear-gradient(145deg, #191622, #121119 82%); box-shadow: 0 18px 60px #0004, inset 0 1px #ffffff08; }
.lobby-heading, .room-topline, .players-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lobby-heading { margin-bottom: 26px; }
.lobby-heading h2, .room-topline h2 { font-size: 25px; }
.online-indicator { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.online-indicator i { width: 7px; height: 7px; border-radius: 50%; background: #54dca6; box-shadow: 0 0 12px #54dca6; }
.field-label { display: block; margin-bottom: 8px; color: #b9b2c4; font-size: 12px; font-weight: 700; }
.lobby-input { width: 100%; min-height: 46px; border: 1px solid #ffffff1c; border-radius: 9px; padding: 0 13px; background: #0e0d14; color: #f6f3fb; outline: none; }
.lobby-input::placeholder { color: #777181; }
.lobby-input:focus { border-color: #a37aff; box-shadow: 0 0 0 3px #a37aff2c; }
.lobby-actions { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(300px, 1.6fr); align-items: end; gap: 22px; margin-top: 23px; }
.join-room-form { min-width: 0; }
.join-room-controls { display: flex; gap: 9px; }
.code-input { max-width: 180px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; }
.multiplayer-button { display: inline-flex; min-height: 42px; justify-content: center; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; padding: 0 15px; cursor: pointer; font-size: 12px; font-weight: 800; transition: transform .18s, filter .18s, border-color .18s; }
.multiplayer-button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.09); }
.multiplayer-button:focus-visible, .copy-code:focus-visible { outline: 2px solid #cfb8ff; outline-offset: 3px; }
.multiplayer-button:disabled { cursor: not-allowed; opacity: .46; }
.multiplayer-button.primary { background: linear-gradient(110deg, #b590ff, #78d5ed); color: #14111d; }
.multiplayer-button.secondary { border-color: #a37aff70; background: #302544; color: #eee6ff; }
.multiplayer-button.quiet { border-color: #ffffff20; background: #17151f; color: #bdb6c8; }
.multiplayer-status { min-height: 20px; margin: 0 0 12px; color: #bfe9d2; text-align: center; font-size: 13px; }
.multiplayer-status.error { color: #ff9aaf; }
.multiplayer-status:empty { min-height: 0; margin-bottom: 0; }
.room-panel { margin-top: 24px; }
.room-topline { margin-bottom: 22px; }
.room-topline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.room-topline h2 span { color: #c6a9ff; letter-spacing: 2px; }
.room-share { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 19px; border: 1px solid #a37aff32; border-radius: 12px; background: linear-gradient(105deg, #2c2140, #191622); }
.room-share strong { font: 700 14px "Space Grotesk", sans-serif; }
.room-share p { margin: 5px 0 0; color: #a9a2b3; font-size: 12px; }
.room-code-display { display: flex; align-items: center; gap: 12px; }
.room-code-display > span { color: #e7d8ff; font: 700 24px "Space Grotesk", sans-serif; letter-spacing: 4px; }
.copy-code { min-height: 34px; border: 1px solid #ffffff25; border-radius: 8px; padding: 0 11px; background: #ffffff0b; color: #e6deef; cursor: pointer; font-size: 11px; font-weight: 700; }
.room-chat-toggle { display: flex; margin: 14px 0 0 auto; }
.room-chat { display: flex; width: min(100%, 520px); height: 360px; flex-direction: column; margin: 14px 0 0 auto; overflow: hidden; border: 1px solid #ffffff1a; border-radius: 13px; background: #14121b; box-shadow: 0 14px 35px #0005; }
.room-chat[hidden] { display: none !important; }
.room-chat-heading { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; border-bottom: 1px solid #ffffff13; padding: 11px 13px; }
.room-chat-heading h3 { margin: 0; color: #f0eafa; font: 700 14px "Space Grotesk", sans-serif; }
.chat-close { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #ffffff20; border-radius: 8px; background: #ffffff08; color: #e6deef; cursor: pointer; font-size: 20px; }
.room-chat-messages { display: flex; flex: 1 1 auto; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; padding: 12px; }
.room-chat-message { align-self: flex-start; max-width: 88%; border: 1px solid #ffffff12; border-radius: 10px 10px 10px 3px; padding: 8px 10px; background: #211e2a; }
.room-chat-message.own-chat-message { align-self: flex-end; border-color: #a37aff40; border-radius: 10px 10px 3px 10px; background: #35264c; }
.room-chat-message > div { display: flex; align-items: center; gap: 10px; }
.room-chat-message strong { color: #d3baff; font-size: 10px; }
.room-chat-message time { color: #8e8799; font-size: 8px; }
.room-chat-message p { margin: 4px 0 0; color: #ece7f2; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.room-chat-form { display: flex; flex: 0 0 auto; gap: 7px; border-top: 1px solid #ffffff13; padding: 10px; }
.room-chat-form input { width: 100%; min-width: 0; min-height: 40px; border: 1px solid #ffffff20; border-radius: 8px; padding: 0 10px; background: #0e0d14; color: #f6f3fb; font: inherit; font-size: 11px; }
.room-chat-form input:focus-visible, .chat-close:focus-visible, .room-chat-toggle:focus-visible { outline: 2px solid #c6a9ff; outline-offset: 2px; }
.room-chat-form .multiplayer-button { min-height: 40px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.players-heading { margin: 25px 0 12px; }
.players-heading h3 { margin: 0; font: 700 17px "Space Grotesk", sans-serif; }
.players-heading > span { color: #a7a0b0; font-size: 11px; }
.player-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.player-chip { display: flex; align-items: center; gap: 8px; border: 1px solid #ffffff12; border-radius: 9px; padding: 9px 11px; background: #17151f; color: #e9e3f0; font-size: 12px; }
.player-avatar { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; background: #a37aff25; color: #c8a9ff; font-size: 13px; }
.host-tag { border-radius: 4px; padding: 3px 5px; background: #a37aff20; color: #c9abff; font-size: 8px; font-weight: 800; letter-spacing: .5px; }
.party-library { padding: clamp(20px, 3.2vw, 34px); border: 1px solid #ffffff16; border-radius: 21px; background: linear-gradient(145deg, #171521eF, #111119f2); box-shadow: 0 22px 65px #0004, inset 0 1px #ffffff08; }
.party-library-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.party-library-heading .section-kicker { margin-bottom: 7px; }
.party-library-heading h2 { font-size: clamp(23px, 3vw, 31px); letter-spacing: -1px; }
.party-library-heading h2 span { color: #bc9cff; }
.party-library-heading > div > p:last-child { margin: 8px 0 0; color: #a7a0b0; font-size: 12px; line-height: 1.6; }
.library-availability { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-bottom: 3px; border: 1px solid #ffffff17; border-radius: 999px; padding: 8px 11px; background: #ffffff08; color: #b9b1c5; font-size: 10px; font-weight: 700; }
.library-availability i, .card-mood i { width: 7px; height: 7px; border-radius: 50%; background: #61dfaa; box-shadow: 0 0 10px #61dfaa88; }
.party-game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.party-game-card { --card-accent: #bb9cff; overflow: hidden; min-width: 0; border: 1px solid #ffffff16; border-radius: 15px; background: linear-gradient(145deg, #211e2a, #17151e); box-shadow: 0 8px 24px #0002; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.party-game-card:hover, .party-game-card:focus-within { transform: translateY(-4px); border-color: color-mix(in srgb, var(--card-accent) 60%, transparent); box-shadow: 0 17px 38px #0005, 0 0 25px color-mix(in srgb, var(--card-accent) 10%, transparent); }
.truth-card { --card-accent: #ee8bde; }
.traitor-card { --card-accent: #65dec6; }
.draw-card { --card-accent: #ffba73; }
.memory-card-game { --card-accent: #81c7ff; }
.coming-soon-card { --card-accent: #9cafff; }
.party-game-art { position: relative; overflow: hidden; aspect-ratio: 16 / 8.25; background: #25213a; }
.party-game-art::after { position: absolute; inset: 45% 0 0; background: linear-gradient(0deg, #100e19aa, transparent); content: ""; pointer-events: none; }
.party-game-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.party-game-card:hover .party-game-art img { transform: scale(1.035); }
.art-corner-label, .art-player-count { position: absolute; z-index: 1; bottom: 11px; border: 1px solid #ffffff3b; border-radius: 6px; padding: 6px 8px; background: #11111bd9; color: #f7f1ff; font-size: 8px; font-weight: 800; letter-spacing: .8px; }
.art-corner-label { left: 12px; }
.art-player-count { right: 12px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; font-size: 9px; font-weight: 700; letter-spacing: 0; }
.art-player-count > span { color: var(--card-accent); font-size: 11px; }
.party-game-content { padding: 16px 17px 15px; }
.card-eyebrow { display: flex; align-items: center; gap: 7px; color: var(--card-accent); font-size: 9px; font-weight: 800; letter-spacing: .9px; }
.card-game-icon { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid color-mix(in srgb, var(--card-accent) 35%, transparent); border-radius: 7px; background: color-mix(in srgb, var(--card-accent) 13%, transparent); font-size: 13px; }
.party-game-card h3 { margin: 11px 0 7px; color: #f5f0fb; font: 700 20px "Space Grotesk", sans-serif; letter-spacing: -.5px; }
.party-game-card p { min-height: 38px; margin: 0; color: #aaa4b2; font-size: 12px; line-height: 1.6; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 17px; padding-top: 13px; border-top: 1px solid #ffffff11; }
.card-mood { display: inline-flex; align-items: center; gap: 7px; color: #aba4b4; font-size: 10px; }
.card-mood i { width: 6px; height: 6px; background: var(--card-accent); box-shadow: 0 0 9px color-mix(in srgb, var(--card-accent) 65%, transparent); }
.party-game-card .multiplayer-button { min-height: 37px; border-color: color-mix(in srgb, var(--card-accent) 42%, transparent); background: color-mix(in srgb, var(--card-accent) 14%, #201c2b); color: #f4edff; font-size: 10px; }
.party-game-card .multiplayer-button:hover:not(:disabled) { border-color: var(--card-accent); background: color-mix(in srgb, var(--card-accent) 25%, #201c2b); }
.party-game-card .multiplayer-button span { font-size: 13px; }
.coming-soon-card { background: linear-gradient(145deg, #1d2030, #17151e); }
.coming-soon-card .party-game-art img { opacity: .83; }
.coming-soon-label { color: #bab9e2; font-size: 9px; font-weight: 800; letter-spacing: .7px; }
.coming-soon-label span { color: #b6a4ff; }
.active-game { margin-top: 25px; padding: clamp(17px, 3vw, 26px); border: 1px solid #ffffff18; border-radius: 14px; background: #100f17; }
.active-game[hidden] { display: none; }
.active-game h3 { margin: 0; font: 700 21px "Space Grotesk", sans-serif; }
.active-game-intro { margin: 7px 0 17px; color: #aca5b5; font-size: 12px; line-height: 1.6; }
.game-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.game-toolbar .multiplayer-button { min-height: 36px; }
.ready-invitation { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin: 17px 0; border: 1px solid #a37aff36; border-radius: 13px; padding: 16px; background: linear-gradient(110deg, #2c2140, #1a1b29); }
.ready-game-icon { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid #c5a5ff40; border-radius: 14px; background: #a37aff1c; font-size: 24px; }
.ready-invitation h4 { margin: 0; color: #f3edfc; font: 700 15px "Space Grotesk", sans-serif; }
.ready-invitation p { margin: 5px 0 0; color: #b7afc2; font-size: 11px; line-height: 1.55; }
.ready-counter { display: grid; min-width: 76px; justify-items: center; border: 1px solid #ffffff17; border-radius: 10px; padding: 8px; background: #0e0d1480; color: #c9adff; font: 700 21px "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums; }
.ready-counter span { margin-top: 2px; color: #aaa2b5; font: 700 8px "Inter", sans-serif; white-space: nowrap; }
.ready-player-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 9px; }
.ready-player-card { display: flex; align-items: center; gap: 9px; min-width: 0; border: 1px solid #ffffff14; border-radius: 10px; padding: 10px; background: #17151f; }
.ready-player-card .player-avatar { flex: 0 0 auto; }
.ready-player-card > strong { overflow: hidden; min-width: 0; color: #e8e2ef; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ready-player-status { margin-left: auto; color: #aaa3b1; font-size: 9px; font-weight: 700; white-space: nowrap; }
.player-is-ready { border-color: #54dca65c; background: linear-gradient(110deg, #1a302a, #171a20); }
.player-is-ready .ready-player-status { color: #71e9ad; }
.ready-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 15px; border-top: 1px solid #ffffff12; padding-top: 14px; }
.ready-hint { margin: 0; color: #b8b0c2; font-size: 11px; line-height: 1.5; }
.ready-action-buttons { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ready-action-buttons .multiplayer-button { min-height: 40px; }
.start-game-button:not(:disabled) { box-shadow: 0 6px 20px #a37aff25; }
.wheel-layout { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, .75fr); align-items: center; gap: 20px; }
.wheel-wrap { position: relative; width: min(100%, 300px); aspect-ratio: 1; margin: 0 auto; }
.wheel-pointer { position: absolute; z-index: 2; top: -8px; left: 50%; width: 0; height: 0; transform: translateX(-50%); border-right: 13px solid transparent; border-left: 13px solid transparent; border-top: 28px solid #fff2a1; filter: drop-shadow(0 3px 5px #0009); }
.truth-wheel { position: absolute; inset: 5px; display: grid; place-items: center; border: 6px solid #ffffffd6; border-radius: 50%; background: conic-gradient(#a37aff 0 50%, #ff6cad 50% 100%); box-shadow: 0 0 0 7px #a37aff35, 0 13px 35px #0008; transition: transform 3.3s cubic-bezier(.12,.74,.15,1); }
.truth-wheel span { position: absolute; top: 50%; left: 50%; width: min(38%, 115px); overflow: hidden; color: #fff; font: 800 var(--slice-font-size, 9px) "Space Grotesk", sans-serif; text-align: center; text-overflow: ellipsis; text-shadow: 0 1px 3px #0009; white-space: nowrap; transform: translate(-50%, -50%) rotate(var(--label-angle)) translateY(var(--label-distance, -88px)) rotate(var(--label-reverse)); }
.truth-wheel .wheel-sector-skip { color: #153a47; font-size: 7px; text-shadow: none; }
.wheel-turn-indicator, .memory-turn-banner { display: flex; align-items: center; gap: 12px; margin: 15px 0 19px; border: 1px solid #a37aff42; border-radius: 12px; padding: 12px 14px; background: linear-gradient(105deg, #332448, #1b2034); }
.turn-avatar, .memory-turn-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid #d5c2ff4d; border-radius: 12px; background: #a37aff29; color: #e2d2ff; font: 700 18px "Space Grotesk", sans-serif; }
.wheel-turn-indicator > div, .memory-turn-banner > div { display: grid; gap: 2px; min-width: 0; }
.wheel-turn-indicator > div > strong, .memory-turn-banner > div > strong { overflow: hidden; color: #f4edff; font: 700 15px "Space Grotesk", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.turn-caption { color: #c6a9ff; font-size: 8px; font-weight: 900; letter-spacing: 1.2px; }
.turn-number { margin-left: auto; color: #bfb4cf; font-size: 10px; font-weight: 800; white-space: nowrap; }
.wheel-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px 14px; margin: -7px 0 15px; color: #bcb4c8; font-size: 10px; }
.wheel-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.wheel-legend i { width: 9px; height: 9px; border-radius: 3px; }
.legend-truth { background: #a37aff; }.legend-dare { background: #ff6cad; }.legend-skip { background: #4fcbbb; }
.wheel-side-panel { align-self: stretch; padding: 17px; border: 1px solid #ffffff14; border-radius: 13px; background: #17151f; }
.wheel-side-panel > strong, .wheel-log-heading { color: #e9e3f0; font: 700 13px "Space Grotesk", sans-serif; }
.wheel-player-order { display: grid; gap: 7px; margin: 11px 0 19px; padding: 0; list-style: none; }
.wheel-player-order li { display: flex; align-items: center; gap: 9px; min-width: 0; border: 1px solid transparent; border-radius: 8px; padding: 7px 8px; color: #c5bdce; }
.wheel-player-order li.current-turn { border-color: #b590ff57; background: #a37aff18; color: #f4edff; }
.wheel-player-order li > span { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: #ffffff10; color: #bdb1d1; font-size: 9px; font-weight: 800; }
.wheel-player-order li > strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.wheel-player-order li > em { margin-left: auto; color: #c6a9ff; font-size: 7px; font-style: normal; font-weight: 900; letter-spacing: .7px; }
.wheel-turn-log { display: grid; gap: 6px; margin-top: 9px; }
.wheel-turn-log > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 7px; padding: 7px 8px; background: #ffffff08; color: #bdb6c8; font-size: 10px; }
.wheel-turn-log > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wheel-turn-log > div > strong { font-size: 9px; }
.wheel-log-truth { color: #c6a9ff; }.wheel-log-dare { color: #ff9fca; }.wheel-log-skip { color: #7de6d7; }
.wheel-side-panel .multiplayer-footnote { text-align: left; }
.game-toolbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.game-toolbar-actions .multiplayer-button { min-height: 36px; }
.wheel-main { min-width: 0; }
.wheel-choice { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 8px; }
.wheel-choice > span { flex-basis: 100%; color: #c8bdd5; font-size: 11px; text-align: center; }
.wheel-choice .multiplayer-button { min-width: 92px; }
.memory-countdown-panel { display: flex; align-items: center; justify-content: center; gap: 13px; width: max-content; margin: 15px auto 19px; border: 1px solid #81c7ff45; border-radius: 14px; padding: 11px 19px; background: linear-gradient(110deg, #18334c, #292448); }
.memory-countdown-number { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 13px; background: #81c7ff25; color: #bde4ff; font: 700 27px "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums; }
.memory-countdown-panel > div { display: grid; gap: 3px; }
.memory-countdown-panel > div strong { color: #f0f7ff; font: 700 14px "Space Grotesk", sans-serif; }
.memory-countdown-panel > div > span { color: #a9bdcf; font-size: 10px; }
.emoji-grid { display: grid; gap: 9px; max-width: 650px; margin: 0 auto; }
.emoji-preview-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.emoji-board-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.emoji-tile { position: relative; display: grid; min-width: 0; aspect-ratio: 1; place-items: center; overflow: hidden; border: 1px solid #ffffff20; border-radius: 11px; background: linear-gradient(145deg, #26243a, #1b1b2b); font-size: clamp(20px, 4vw, 35px); }
.preview-emoji { border-color: #81c7ff42; background: linear-gradient(145deg, #233955, #292344); box-shadow: 0 5px 15px #0003, inset 0 1px #ffffff1a; animation: emoji-reveal .35s ease both; }
.preview-emoji:nth-child(2n) { animation-delay: 45ms; }.preview-emoji:nth-child(3n) { animation-delay: 90ms; }
@keyframes emoji-reveal { from { opacity: .2; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
button.emoji-tile { padding: 2px; color: inherit; cursor: pointer; transition: transform .12s, border-color .12s, background .12s; }
button.emoji-tile:hover:not(:disabled) { transform: translateY(-2px) scale(1.05); border-color: #81c7ff; background: #304468; }
button.emoji-tile:focus-visible { z-index: 1; outline: 2px solid #bde4ff; outline-offset: 2px; }
button.emoji-tile:disabled { cursor: default; opacity: .55; }
button.emoji-tile.emoji-found { border-color: #61dfaa75; background: #285447; opacity: .8; }
.found-check { position: absolute; top: 2px; right: 4px; color: #8dffce; font-size: 10px; font-weight: 900; }
.memory-status-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px 18px; margin: 15px 0 0; color: #aaa4b2; font-size: 10px; }
.memory-turn-banner { border-color: #ffffff1c; background: linear-gradient(105deg, #202535, #211d30); }
.memory-turn-banner.your-memory-turn { border-color: #81c7ff6b; background: linear-gradient(105deg, #1f3a50, #292644); }
.memory-turn-icon { border-color: #81c7ff42; background: #81c7ff1d; font-size: 19px; }
.memory-turn-banner > div > small { color: #a9a2b3; font-size: 10px; }
.memory-result-banner { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 18px 0; border: 1px solid #ffe18d64; border-radius: 12px; padding: 18px; background: linear-gradient(100deg, #57432255, #3a2b4755); color: #ffe8a6; text-align: center; }
.memory-result-banner > span { font-size: 27px; }
.memory-result-banner > strong { font: 700 17px "Space Grotesk", sans-serif; }
.emoji-pick-message { margin: 0 0 12px; color: #cec6db; font-size: 11px; text-align: center; }
.wheel-result { min-height: 52px; margin: 13px 0 0; color: #e4d7ff; font: 700 17px "Space Grotesk", sans-serif; text-align: center; }
.custom-wheel-form { display: flex; gap: 7px; margin-top: 12px; }
.custom-wheel-form .lobby-input { min-width: 0; min-height: 38px; font-size: 11px; }
.wheel-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wheel-option { border: 1px solid #ffffff17; border-radius: 99px; padding: 5px 9px; color: #c7bfd1; font-size: 10px; }
.secret-card { margin: 15px 0; border: 1px solid #ffcf6650; border-radius: 10px; padding: 14px; background: #382d191f; color: #f1d88f; text-align: center; }
.secret-card span { display: block; margin-bottom: 6px; color: #b6a771; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.secret-card strong { font: 700 22px "Space Grotesk", sans-serif; }
.game-roster { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 9px; margin: 15px 0; }
.roster-player { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 11px; border: 1px solid #ffffff14; border-radius: 10px; background: #1b1923; }
.roster-player strong { overflow: hidden; color: #e6e1eb; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.roster-player .multiplayer-button { min-height: 33px; padding-inline: 8px; font-size: 10px; }
.roster-player.eliminated { opacity: .48; }
.roster-player.eliminated strong::after { content: " · out"; color: #ff8da7; }
.game-message { margin: 12px 0; border-radius: 9px; padding: 11px 13px; background: #a37aff16; color: #d3c4f7; font-size: 12px; line-height: 1.6; }
.draw-board { display: block; width: min(100%, 620px); height: min(38dvh, 360px); margin: 12px auto; border: 1px solid #ffffff2a; border-radius: 10px; background: #fbf8ff; touch-action: none; cursor: crosshair; }
.draw-tools { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.drawing-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.drawing-card { min-width: 0; padding: 9px; border: 1px solid #ffffff17; border-radius: 9px; background: #191720; }
.drawing-card canvas { display: block; width: 100%; height: auto; aspect-ratio: 1.5; border-radius: 6px; background: #fbf8ff; }
.drawing-card strong { display: block; overflow: hidden; margin-top: 7px; color: #e5dfed; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.vote-count { color: #a69fb0; font-size: 10px; }
.multiplayer-footnote { margin: 18px 0 0; color: #797382; font-size: 10px; line-height: 1.6; text-align: center; }
.multiplayer-page .footer { margin-top: 10px; color: #a29cac; }
.multiplayer-page button:disabled { filter: grayscale(.25); }
body.game-screen-active { height: 100vh; height: 100dvh; overflow: hidden; }
body.game-screen-active > .topbar,
body.game-screen-active > .footer,
body.game-screen-active .multiplayer-shell > :not(.room-panel) { display: none !important; }
body.game-screen-active .multiplayer-shell { position: fixed; z-index: 20; inset: 0; display: block; width: 100%; height: 100vh; height: 100dvh; max-width: none; margin: 0; overflow: hidden; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
body.game-screen-active .room-panel { display: flex; width: 100%; height: 100%; flex-direction: column; min-height: 0; margin: 0; overflow: hidden; border: 0; border-radius: 0; padding: clamp(12px, 2.2vw, 26px); background: radial-gradient(ellipse at 50% 0, #241a37, #0d0c13 72%); box-shadow: none; }
body.game-screen-active .room-panel > :not(#active-game):not(#room-chat):not(#room-chat-toggle):not(#rotate-prompt) { display: none !important; }
body.game-screen-active .room-panel > .room-chat-toggle { position: fixed; z-index: 27; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); display: inline-flex; margin: 0; }
body.game-screen-active .room-panel > .room-chat:not([hidden]) { position: fixed; z-index: 26; right: max(12px, env(safe-area-inset-right)); bottom: calc(max(12px, env(safe-area-inset-bottom)) + 54px); width: min(360px, calc(100vw - 24px)); height: min(64dvh, 500px); margin: 0; }
body.game-screen-active .room-panel .active-game { position: relative; display: flex; width: 100%; height: 100%; flex: 1 1 auto; flex-direction: column; gap: clamp(8px, 1.4vh, 14px); min-height: 0; margin: 0; overflow: hidden; border: 0; border-radius: 0; padding: 0; background: transparent; }
body.game-screen-active #multiplayer-status { position: fixed; z-index: 31; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); display: block !important; width: max-content; max-width: min(90vw, 360px); min-height: 0; margin: 0; border: 1px solid #ffffff20; border-radius: 9px; padding: 7px 10px; background: #17151fea; font-size: 10px; text-align: left; pointer-events: none; }
body.game-screen-active #multiplayer-status:empty { display: none !important; }
body.game-screen-active .game-toolbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
body.game-screen-active .game-toolbar { flex: 0 0 auto; margin: 0; }
body.game-screen-active .game-toolbar .section-kicker { margin-bottom: 4px; font-size: 9px; }
body.game-screen-active .active-game-intro { flex: 0 0 auto; margin: 0; }
body.game-screen-active .wheel-layout { display: grid; flex: 1 1 auto; grid-template-columns: minmax(0, 1.2fr) minmax(180px, .8fr); gap: 15px; min-height: 0; }
body.game-screen-active .wheel-main { display: flex; flex-direction: column; justify-content: center; min-height: 0; }
body.game-screen-active .wheel-wrap { width: min(55dvh, 42vw, 440px); max-width: 100%; flex: 0 1 auto; }
body.game-screen-active .wheel-side-panel { min-height: 0; overflow: hidden; }
body.game-screen-active .wheel-turn-log { max-height: 36dvh; overflow: auto; }
body.game-screen-active .wheel-result { min-height: 32px; margin: 7px 0; font-size: clamp(14px, 2.3vh, 19px); }
body.game-screen-active .draw-tools { flex: 0 0 auto; }
body.game-screen-active .ready-player-grid,
body.game-screen-active .game-roster,
body.game-screen-active .drawing-gallery { max-height: 32dvh; overflow: auto; }
body.game-screen-active .draw-board { width: min(100%, 560px); height: min(34dvh, 320px); flex: 0 1 auto; margin: 6px auto; }
body.game-screen-active .secret-card { margin: 4px 0; padding: 9px 12px; }
body.game-screen-active .secret-card strong { font-size: clamp(17px, 2.8vh, 22px); }
body.game-screen-active .game-message { margin: 4px 0; padding: 8px 10px; }
body.game-screen-active .emoji-board-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: clamp(3px, .7vw, 8px); }
body.game-screen-active .emoji-grid { max-width: min(100%, 760px); }
body.game-screen-active .emoji-tile { min-height: 0; border-radius: clamp(4px, 1vw, 10px); font-size: clamp(14px, 4vw, 32px); }
body.game-screen-active .memory-countdown-panel { margin: 4px auto; }
.immersive-button { display: none; }
.rotate-prompt[hidden] { display: none !important; }
.rotate-prompt { display: none; }
body.game-screen-active .active-game[data-game="traitor"],
body.game-screen-active .active-game[data-game="draw"],
body.game-screen-active .active-game[data-game="memory"] { align-items: stretch; }
body.game-screen-active .active-game[data-game="traitor"] > .game-roster { flex: 1 1 auto; min-height: 0; align-content: start; }
body.game-screen-active .active-game[data-game="draw"] > .draw-board { flex: 1 1 0; min-height: 0; }
body.game-screen-active .active-game[data-game="draw"] > .drawing-gallery { flex: 0 1 auto; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
body.game-screen-active .active-game[data-game="draw"] > .drawing-gallery .drawing-card { padding: 5px; }
body.game-screen-active .active-game[data-game="draw"] > .drawing-gallery .drawing-card canvas { max-height: 11dvh; object-fit: contain; }
body.game-screen-active .active-game[data-game="memory"] > .emoji-preview-grid,
body.game-screen-active .active-game[data-game="memory"] > .emoji-board-grid { flex: 1 1 auto; align-content: center; min-height: 0; }
body.game-screen-active .active-game[data-game="memory"] > .memory-countdown-panel,
body.game-screen-active .active-game[data-game="memory"] > .memory-turn-banner,
body.game-screen-active .active-game[data-game="memory"] > .emoji-pick-message,
body.game-screen-active .active-game[data-game="memory"] > .memory-status-strip { flex: 0 0 auto; }
body.game-screen-active .active-game[data-game="memory"] > .emoji-preview-grid .emoji-tile { font-size: clamp(20px, 7vh, 42px); }
body.game-screen-active .active-game[data-game="memory"] > .emoji-board-grid .emoji-tile { font-size: clamp(13px, 3.2vw, 29px); }
body.game-screen-active .active-game[data-game="draw"] > .draw-board { width: min(100%, 700px); height: min(40dvh, 390px); }
body.game-screen-active .room-panel > .rotate-prompt:not([hidden]) { position: fixed; z-index: 40; inset: 0; display: grid; place-items: center; padding: 20px; background: #0d0c13f5; }
.rotate-prompt-card { width: min(100%, 380px); border: 1px solid #ffffff20; border-radius: 20px; padding: 28px 22px 20px; background: linear-gradient(145deg, #211a2d, #13121b); box-shadow: 0 24px 80px #0009; text-align: center; }
.rotate-phone-icon { display: block; margin-bottom: 10px; color: #c8a9ff; font-size: 45px; line-height: 1; transform: rotate(90deg); }
.rotate-prompt-card .section-kicker { margin-bottom: 8px; }
.rotate-prompt-card h3 { margin: 0 0 8px; color: #f5f0fb; font: 700 22px "Space Grotesk", sans-serif; }
.rotate-prompt-card > p:not(.section-kicker) { margin: 0 0 18px; color: #b7afc2; font-size: 12px; line-height: 1.6; }
.rotate-prompt-card .multiplayer-button { width: 100%; }
.rotate-continue { display: block; margin: 12px auto 0; border: 0; background: transparent; color: #aaa1b5; cursor: pointer; font: 600 11px "DM Sans", sans-serif; }
.rotate-continue:focus-visible { outline: 2px solid #c6a9ff; outline-offset: 3px; }
@media (min-width: 901px) and (pointer: fine) {
  body.game-screen-active { min-height: 100dvh; }
  body.game-screen-active > .topbar { position: fixed; z-index: 25; inset: 0 0 auto; display: flex; height: 72px; }
  body.game-screen-active > .footer { display: none !important; }
  body.game-screen-active .multiplayer-shell { inset: 72px auto 0; left: 50%; width: min(1440px, calc(100% - 48px)); height: calc(100dvh - 72px); transform: translateX(-50%); padding: 14px 0; }
  body.game-screen-active .room-panel { display: grid; grid-template-columns: minmax(190px, 245px) minmax(0, 1fr); grid-template-rows: auto auto auto auto minmax(0, 1fr); align-content: stretch; gap: 10px 16px; height: 100%; border: 1px solid #ffffff18; border-radius: 17px; padding: 15px; background: linear-gradient(145deg, #17151f, #101017); box-shadow: 0 18px 60px #0006; }
  body.game-screen-active .room-panel > .room-topline { display: flex; grid-column: 1 / -1; grid-row: 1; align-items: center; margin: 0; border-bottom: 1px solid #ffffff14; padding-bottom: 10px; }
  body.game-screen-active .room-topline h2 { font-size: 20px; }
  body.game-screen-active .room-topline .section-kicker { margin-bottom: 4px; }
  body.game-screen-active .room-topline-actions .multiplayer-button { min-height: 34px; }
  body.game-screen-active .room-panel > .room-chat-toggle { position: static; display: inline-flex; grid-column: 1; grid-row: 2; justify-self: stretch; margin: 0; }
  body.game-screen-active .room-panel > .room-share { display: flex; grid-column: 1; grid-row: 3; align-items: flex-start; flex-direction: column; gap: 10px; padding: 12px; }
  body.game-screen-active .room-share p { line-height: 1.45; }
  body.game-screen-active .room-code-display { width: 100%; justify-content: space-between; gap: 7px; }
  body.game-screen-active .room-code-display > span { font-size: 19px; }
  body.game-screen-active .room-panel > .players-heading { display: flex; grid-column: 1; grid-row: 4; margin: 3px 0 0; }
  body.game-screen-active .room-panel > .player-list { display: flex; grid-column: 1; grid-row: 5; align-content: start; align-items: flex-start; flex-direction: column; flex-wrap: nowrap; gap: 6px; min-height: 0; overflow-y: auto; }
  body.game-screen-active .player-chip { width: 100%; min-width: 0; }
  body.game-screen-active .room-panel > .active-game { display: flex; grid-column: 2; grid-row: 2 / 6; width: 100%; height: 100%; min-height: 0; margin: 0; border: 1px solid #ffffff1a; border-radius: 12px; padding: clamp(14px, 1.6vw, 24px); background: linear-gradient(145deg, #111119, #0b0b10); box-shadow: inset 0 1px #ffffff08; }
  body.game-screen-active .active-game[data-game="wheel"] .wheel-layout { grid-template-columns: minmax(0, 1fr) minmax(190px, .42fr); }
  body.game-screen-active .active-game[data-game="wheel"] .wheel-wrap { width: min(48dvh, 35vw, 420px); }
  body.game-screen-active .active-game[data-game="wheel"] .wheel-turn-log { max-height: 32dvh; }
  body.game-screen-active .active-game[data-game="draw"] > .draw-board { height: min(40dvh, 390px); }
  body.game-screen-active .room-panel > .room-chat:not([hidden]) { position: fixed; z-index: 35; right: max(28px, calc((100vw - 1440px) / 2 + 20px)); bottom: 24px; width: min(360px, calc(100vw - 40px)); height: min(64dvh, 520px); margin: 0; }
  body.game-screen-active #multiplayer-status { right: 24px; bottom: 14px; }
  .rotate-prompt { display: none !important; }
}
@media (max-width: 900px) {
  .party-game-grid { gap: 13px; }
  .card-footer { align-items: flex-start; flex-direction: column; }
  .party-game-card .multiplayer-button { width: 100%; }
}
@media (max-width: 620px) {
  .multiplayer-shell { width: calc(100% - 30px); padding-top: 38px; }
  .multiplayer-page .topbar { padding-bottom: 0; }
  .multiplayer-page .main-nav { flex-wrap: nowrap; }
  .party-library { padding: 19px 14px; border-radius: 16px; }
  .party-library-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 16px; }
  .party-game-grid { grid-template-columns: 1fr; gap: 13px; }
  .party-game-art { aspect-ratio: 16 / 7.7; }
  .party-game-content { padding: 14px; }
  .party-game-card h3 { font-size: 19px; }
  .party-game-card p { min-height: 0; }
  .card-footer { align-items: center; flex-direction: row; }
  .party-game-card .multiplayer-button { width: auto; }
  .lobby-actions { grid-template-columns: 1fr; gap: 18px; }
  .lobby-actions > .multiplayer-button { width: 100%; }
  .lobby-heading, .room-topline { align-items: flex-start; }
  .online-indicator { padding: 7px 8px; font-size: 9px; }
  .room-share { align-items: flex-start; flex-direction: column; }
  .room-code-display { width: 100%; justify-content: space-between; }
  .ready-invitation { grid-template-columns: auto minmax(0, 1fr); gap: 11px; padding: 13px; }
  .ready-counter { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: center; gap: 6px; min-width: 0; padding: 7px; }
  .ready-counter span { margin: 0; }
  .ready-actions { align-items: stretch; flex-direction: column; }
  .ready-action-buttons { display: grid; grid-template-columns: 1fr; }
  .ready-action-buttons .multiplayer-button { width: 100%; }
  .wheel-layout { grid-template-columns: 1fr; }
  .wheel-wrap { width: min(75vw, 280px); }
  .wheel-side-panel { padding: 14px; }
  .emoji-board-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
  .emoji-tile { border-radius: 9px; }
  body.game-screen-active .wheel-layout { display: flex; flex-direction: column; justify-content: space-evenly; gap: 5px; }
  body.game-screen-active .wheel-main { flex: 0 1 auto; }
  body.game-screen-active .wheel-wrap { width: min(39dvh, 76vw, 340px); }
  body.game-screen-active .wheel-sector-label { --label-distance: min(-15dvh, -70px) !important; }
  body.game-screen-active .wheel-side-panel { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; max-height: 76px; padding: 8px 10px; }
  body.game-screen-active .wheel-side-panel > strong { white-space: nowrap; }
  body.game-screen-active .wheel-turn-log { display: flex; max-height: 55px; gap: 5px; overflow-x: auto; }
  body.game-screen-active .wheel-turn-log > div { min-width: max-content; }
  body.game-screen-active .wheel-side-panel .multiplayer-footnote { display: none; }
  body.game-screen-active .draw-board { width: 100%; height: min(30dvh, 260px); }
  body.game-screen-active .emoji-board-grid { gap: 3px; }
  body.game-screen-active .emoji-tile { font-size: clamp(12px, 5vw, 22px); }
  body.game-screen-active .game-toolbar-actions .multiplayer-button { min-height: 34px; padding-inline: 9px; font-size: 10px; }
  body.game-screen-active .immersive-button { display: inline-flex; }
  body.game-screen-active .active-game[data-game="memory"] > .emoji-preview-grid { max-width: min(100%, 620px); }
}
@media (max-width: 420px) {
  .multiplayer-hero h1 { letter-spacing: -2px; }
  .join-room-controls { align-items: stretch; flex-direction: column; }
  .code-input { max-width: none; }
  .card-footer { align-items: stretch; flex-direction: column; }
  .party-game-card .multiplayer-button { width: 100%; }
  .ready-player-grid { grid-template-columns: 1fr; }
  .ready-invitation h4 { font-size: 13px; }
  body.game-screen-active .room-panel { padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  body.game-screen-active .game-toolbar-actions { gap: 5px; }
  body.game-screen-active .room-panel > .room-chat:not([hidden]) { right: max(8px, env(safe-area-inset-right)); bottom: calc(max(8px, env(safe-area-inset-bottom)) + 52px); width: calc(100vw - 16px); height: min(58dvh, 440px); }
}
@media (max-height: 500px) {
  body.game-screen-active .room-panel .active-game { gap: 5px; }
  body.game-screen-active .game-toolbar-actions .multiplayer-button { min-height: 30px; }
  body.game-screen-active .active-game-intro { font-size: 10px; }
  body.game-screen-active .wheel-wrap { width: min(34dvh, 30vw, 220px); }
  body.game-screen-active .wheel-result { min-height: 24px; margin: 3px 0; font-size: 13px; }
  body.game-screen-active .wheel-side-panel { max-height: 55px; padding: 6px 9px; }
  body.game-screen-active .wheel-turn-log { max-height: 40px; }
  body.game-screen-active .draw-board { height: min(27dvh, 190px); margin-block: 3px; }
  body.game-screen-active .secret-card { padding: 6px 9px; }
  body.game-screen-active .secret-card span { margin-bottom: 2px; }
  body.game-screen-active .game-message { padding: 6px 8px; font-size: 10px; }
  body.game-screen-active .emoji-tile { font-size: clamp(12px, 3.5vh, 24px); }
  body.game-screen-active .active-game[data-game="memory"] > .emoji-preview-grid .emoji-tile { font-size: clamp(17px, 6vh, 30px); }
}
@media (max-width: 900px) and (orientation: portrait) {
  body.game-screen-active .active-game[data-game="wheel"] .wheel-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, .7fr); gap: 5px; align-items: center; }
  body.game-screen-active .active-game[data-game="wheel"] .wheel-wrap { width: min(40vw, 34dvh, 260px); }
  body.game-screen-active .active-game[data-game="wheel"] .wheel-side-panel { display: block; max-height: min(35dvh, 220px); overflow: hidden; }
  body.game-screen-active .active-game[data-game="wheel"] .wheel-turn-log { display: grid; max-height: 22dvh; }
  body.game-screen-active .active-game[data-game="draw"] > .draw-board { width: min(100%, 58dvh); height: min(36dvh, 300px); }
  body.game-screen-active .active-game[data-game="memory"] > .emoji-board-grid .emoji-tile { font-size: clamp(12px, 3.8vw, 22px); }
}
body.game-screen-active .room-panel > .room-chat-toggle { position: fixed; z-index: 37; right: auto; left: max(12px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); }
body.game-screen-active .room-panel > .room-chat:not([hidden]) { right: auto; left: max(12px, env(safe-area-inset-left)); }
@media (min-width: 901px) and (pointer: fine) {
  body.game-screen-active .room-panel > .room-chat-toggle { left: max(24px, calc((100vw - 1440px) / 2 + 20px)); bottom: 24px; }
  body.game-screen-active .room-panel > .room-chat:not([hidden]) { left: max(24px, calc((100vw - 1440px) / 2 + 20px)); bottom: 74px; }
}
@media (prefers-reduced-motion: reduce) {
  .truth-wheel { transition: none; }
  .multiplayer-button { transition: none; }
  .party-game-card, .party-game-art img { transition: none; }
}
