:root{color-scheme:dark;--bg:#111319;--panel:#1b1e27;--panel-alt:#222632;--line:#303441;--text:#eff0f6;--muted:#a5a9bc;--accent:#a4acff;--accent-bright:#b7bdff;--green:#91dab3;--danger:#ffa2aa;--radius:18px;font-family:Inter,"Pretendard","Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-size:14px;line-height:1.6}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--accent);outline-offset:3px}a{color:inherit;text-decoration:none}h1,h2,h3,p{margin:0}ul,ol{padding:0;margin:0;list-style:none}[hidden]{display:none!important}.muted{color:var(--muted)}.site-header{height:88px;max-width:1512px;padding:0 48px;display:flex;align-items:center;justify-content:space-between;margin:auto;border-bottom:1px solid #242731}.brand{display:flex;align-items:center;gap:12px;font-size:24px;font-weight:850;letter-spacing:-1.3px}.brand-sub{display:inline-block;margin-left:13px;padding-left:13px;border-left:1px solid var(--line);font-size:12px;letter-spacing:-.2px;color:var(--muted);font-weight:500}.brand-dice{width:33px;height:33px;border-radius:9px;background:var(--accent);display:block;position:relative;transform:rotate(-8deg)}.brand-dice i{position:absolute;width:5px;height:5px;border-radius:50%;background:#24283b;left:8px;top:8px}.brand-dice i:nth-child(2){left:14px;top:14px}.brand-dice i:nth-child(3){left:20px;top:20px}.header-note{color:var(--muted);font-size:12px;display:flex;align-items:center;gap:9px}.status-dot,.chat-live-dot{width:6px;height:6px;border-radius:50%;background:var(--green);display:inline-block}.home-screen{max-width:1136px;margin:0 auto;padding:96px 32px 26px;display:grid;grid-template-columns:1.2fr 1fr;gap:64px 90px}.hero-copy{padding-top:16px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:var(--muted)}.hero-copy>.eyebrow{display:flex;align-items:center;gap:10px}.short-line{height:1px;width:28px;background:var(--accent)}.hero-copy h1{font-size:clamp(44px,4.3vw,62px);line-height:1.2;letter-spacing:-3px;margin:29px 0 25px;font-weight:850}.hero-copy h1 span{color:var(--accent)}.hero-description{color:var(--muted);font-size:15px;line-height:1.9;letter-spacing:-.3px}.game-preview{margin-top:36px;padding-top:26px;border-top:1px solid var(--line);display:flex;gap:16px;align-items:center}.preview-icon{width:60px;height:64px;border:1px solid #484b65;border-radius:14px;background:#252937;color:var(--accent);font-size:37px;font-weight:800;text-align:center;line-height:64px;transform:rotate(-6deg)}.preview-label{font-size:10px;color:var(--accent)}.game-preview h2{font-size:17px;letter-spacing:-.3px;margin-top:2px}.game-tag{display:inline-block;margin-left:6px;padding:2px 6px;border:1px solid var(--line);border-radius:5px;color:var(--muted);font-size:10px;vertical-align:middle;font-weight:400}.game-preview p{color:var(--muted);font-size:12px;margin-top:3px}.hero-details{display:flex;gap:17px;margin-top:25px;color:#84899e;font-size:11px}.hero-details span+span::before{content:"·";margin-right:17px}.entry-card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:30px 32px;box-shadow:0 16px 60px #00000018}.card-topline{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px}.card-topline .eyebrow{color:var(--accent)}.tiny-dice{letter-spacing:3px;color:#555b70}.entry-card h2{font-size:25px;letter-spacing:-1px;margin-bottom:5px}.entry-card>.muted{font-size:13px;margin-bottom:27px}label{display:block;font-size:12px;font-weight:650;margin-bottom:8px;color:#d4d7e3}input,textarea,select{width:100%;background:#14171e;border:1px solid #373b48;border-radius:9px;color:var(--text);min-height:48px;padding:11px 13px;outline:none}input::placeholder,textarea::placeholder{color:#73798f}input:hover,textarea:hover,select:hover{border-color:#51566b}.button{min-height:44px;border:1px solid transparent;border-radius:9px;padding:10px 16px;font-size:13px;font-weight:650;display:inline-flex;align-items:center;justify-content:center;gap:12px;line-height:1.4;transition:background .15s}.button-primary{background:var(--accent);color:#171b34}.button-primary:hover:enabled{background:var(--accent-bright)}.button-secondary{background:#2b303e;border-color:#3a4052;color:var(--text)}.button-secondary:hover:enabled{background:#383f51}.button-quiet{background:transparent;color:var(--muted)}.button-quiet:hover:enabled{background:#252a36}.button-wide{width:100%;margin-top:14px;min-height:49px;justify-content:space-between}.button-small{padding:7px 11px;min-height:44px;font-size:12px;background:#303647;color:var(--text)}.button-danger{background:#482c36;color:#ffc1c6}.form-divider{display:flex;align-items:center;gap:12px;color:#848a9e;font-size:11px;margin:23px 0}.form-divider::before,.form-divider::after{content:"";height:1px;background:var(--line);flex:1}.join-controls{display:flex;gap:8px}.join-controls input{min-width:0;letter-spacing:3px;text-transform:uppercase}.join-controls button{white-space:nowrap;padding-left:19px;padding-right:19px}.entry-note{border-top:1px solid var(--line);padding-top:18px;margin-top:24px;font-size:11px;color:#9298ad;text-align:center;line-height:1.8}.home-footer{grid-column:1/-1;display:flex;justify-content:space-between;border-top:1px solid #242731;padding-top:22px;color:#747b91;font-size:10px;letter-spacing:.2px}.inline-error{color:var(--danger);font-size:12px;margin-top:14px}.connection-banner{max-width:1416px;margin:16px auto 0;padding:10px 16px;background:#393023;border:1px solid #695634;border-radius:9px;color:#f3d498;display:flex;align-items:center;justify-content:space-between;gap:15px}.room-screen{max-width:1512px;margin:auto;padding:28px 36px 36px}.room-topbar{display:flex;align-items:center;justify-content:space-between;margin:0 0 24px}.room-label{font-size:11px;color:var(--muted)}.room-heading>div{display:flex;align-items:center;gap:12px}.room-heading h1{font-size:26px;letter-spacing:3px;font-weight:750}.round-badge{font-size:10px;border:1px solid var(--line);border-radius:5px;color:var(--muted);padding:2px 7px;letter-spacing:0}.room-actions{display:flex;gap:6px}.room-grid{display:grid;grid-template-columns:minmax(190px,.76fr) minmax(360px,1.8fr) minmax(260px,1fr);gap:18px;align-items:stretch;min-height:620px}.panel{border:1px solid var(--line);border-radius:14px;background:var(--panel);min-width:0;overflow:hidden}.panel-heading{padding:20px 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:5px}.panel-heading h2{font-size:13px;display:flex;align-items:center;gap:8px}.panel-heading-note{font-size:10px;color:#858ba0}.count-badge{background:#303545;border-radius:5px;padding:1px 6px;font-size:10px;color:#c4c9da}.participants-panel{display:flex;flex-direction:column}.player-list{padding:13px 10px}.player-item{display:flex;align-items:center;gap:10px;padding:10px 7px;border-radius:8px;min-width:0}.player-item.is-me{background:#262b3a}.avatar{position:relative;width:33px;height:33px;background:#343b54;color:#c0c7ff;border-radius:11px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;flex:0 0 auto}.avatar.tone-1{background:#334c45;color:#b0dfc9}.avatar.tone-2{background:#514033;color:#e9c7a3}.avatar.tone-3{background:#4a354c;color:#dbb5df}.avatar::after{content:"";position:absolute;right:-1px;bottom:-1px;width:7px;height:7px;background:var(--green);border:2px solid var(--panel);border-radius:50%}.disconnected .avatar::after{background:#787f94}.player-text{min-width:0;flex:1}.player-name{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:600;min-width:0}.player-name>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.me-tag{font-size:9px;color:var(--accent);font-weight:400}.crown{color:#e4c480;font-size:13px}.player-status{font-size:10px;color:#858da3}.kick-button{padding:0;width:28px;min-width:28px;min-height:44px;border:0;background:transparent;color:#80889e;font-size:16px}.kick-button:hover{color:var(--danger)}.participants-note{display:flex;align-items:center;gap:10px;padding:20px 17px;margin-top:auto;border-top:1px solid var(--line);font-size:10px;color:#8991a8}.small-icon{font-size:25px;color:#6d7591}.game-panel{display:flex;flex-direction:column;padding:26px}.game-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.game-panel-heading h2{font-size:23px;letter-spacing:-.8px;margin-top:3px}.game-panel-heading .eyebrow{font-size:9px;letter-spacing:1.7px}.phase-label{font-size:11px;padding:5px 10px;border:1px solid #464e72;background:#2c324b;color:#c4c9ff;border-radius:20px;white-space:nowrap}.phase-progress{display:flex;gap:6px;margin:23px 0 26px}.phase-progress li{flex:1;min-width:0;font-size:9px;color:#737c92;padding-top:8px;border-top:3px solid #343a4b;white-space:nowrap}.phase-progress li.active{border-color:var(--accent);color:#d3d7ff}.phase-progress li.done{border-color:#647097}.game-stage{flex:1;min-width:0}.stage-title{font-size:22px;line-height:1.4;letter-spacing:-.6px;margin-bottom:9px}.stage-description{color:var(--muted);font-size:13px;line-height:1.85;margin-bottom:22px}.lobby-art{height:114px;display:flex;justify-content:center;align-items:center;margin:2px 0 16px}.lobby-card{width:69px;height:88px;border-radius:13px;background:#2d3349;border:1px solid #4c557c;display:flex;align-items:center;justify-content:center;font-size:35px;color:var(--accent);font-weight:800;transform:rotate(-12deg)}.lobby-card:last-child{margin-left:-20px;transform:rotate(13deg);background:#444057;border-color:#746585;color:#d7b5e7}.centered{text-align:center}.rule-chips{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:16px 0 27px}.rule-chips span{font-size:10px;padding:5px 9px;border:1px solid var(--line);border-radius:6px;color:var(--muted)}.setting-field{border-top:1px solid var(--line);padding-top:21px;margin-top:18px}.setting-field select{min-height:46px}.help-text{color:#9199ae;font-size:11px;margin-top:10px;line-height:1.8}.stage-action{width:100%;margin-top:20px;min-height:48px}.waiting-note{padding:13px 14px;background:#252b3a;border:1px solid #3b435e;border-radius:9px;color:#bcc4dd;font-size:12px;margin-top:18px;line-height:1.8}.private-card{border:1px solid #4a506e;background:#252a3d;border-radius:11px;padding:13px 16px;margin-bottom:22px}.private-top{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;color:#c8cdef}.private-card .muted{font-size:10px;margin-top:6px;color:#909bb9}#secret-content{border-top:1px solid #444a65;margin-top:12px;padding:17px 0 9px;text-align:center}#secret-role{font-size:12px;color:#c2c9fa}#secret-word{font-size:31px;font-weight:800;letter-spacing:-1px;margin:5px 0}#secret-description{font-size:11px;color:#aab4d2}#secret-content.is-liar #secret-word{color:#f3bbcd}.turn-card{background:#292f43;border:1px solid #495376;border-radius:12px;padding:21px;text-align:center;margin:18px 0}.turn-card .eyebrow{color:#a9b4dc;font-size:9px}.speaker-name{font-size:26px;letter-spacing:-.7px;margin:6px 0;color:#e5e8ff;overflow-wrap:anywhere}.talk-list{display:grid;grid-template-columns:1fr 1fr;gap:7px}.talk-list li{display:flex;align-items:center;gap:9px;padding:9px 10px;border:1px solid var(--line);border-radius:7px;min-width:0;font-size:11px;color:var(--muted)}.talk-list li span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.talk-list li.current{border-color:#636da7;background:#2e3550;color:#e3e6ff}.talk-list li.spoken{opacity:.55}.order-number{font-size:10px;color:#9da8cd}.vote-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:15px 0}.vote-option{background:#242a37;border:1px solid #3b4354;border-radius:9px;min-height:48px;color:#dbe0ef;padding:10px;font-size:12px;overflow-wrap:anywhere}.vote-option.selected{border-color:var(--accent);background:#383f60;color:#e6e9ff}.progress-copy{font-size:12px;color:var(--accent);margin:12px 0}.game-panel-footer{margin-top:24px;border-top:1px solid var(--line);padding-top:16px;display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:10px;color:#949eb7;min-height:40px}.text-button{background:none;border:0;color:#909ab4;font-size:10px;min-height:44px;padding:0}.text-button:hover{color:#d0d5e4}.chat-panel{display:flex;flex-direction:column;position:relative;max-height:calc(100dvh - 210px);min-height:620px}.chat-messages{flex:1;min-height:0;overflow-y:auto;padding:20px 16px;scrollbar-width:thin;scrollbar-color:#485064 transparent}.chat-message{margin-bottom:19px;overflow-wrap:anywhere}.chat-message:last-child{margin-bottom:0}.chat-meta{display:flex;align-items:baseline;gap:7px;margin-bottom:3px}.chat-author{font-size:11px;font-weight:700;color:#cad0e8;overflow-wrap:anywhere}.chat-message.own .chat-author{color:var(--accent)}.chat-time{color:#7b859d;font-size:9px;white-space:nowrap}.chat-body{font-size:12px;color:#d6dcea;white-space:pre-wrap;line-height:1.75}.chat-empty{position:absolute;top:43%;left:12px;right:12px;text-align:center;color:#a3abc0;font-size:12px;pointer-events:none}.chat-empty span{font-size:10px;color:#7e899f}.chat-form{padding:14px 14px 12px;border-top:1px solid var(--line);background:#1b1e27}.chat-input-wrap{display:flex;align-items:flex-end;border:1px solid #424a60;border-radius:10px;background:#141821;padding:4px}.chat-input-wrap:focus-within{border-color:var(--accent)}.chat-input-wrap textarea{min-width:0;padding:10px 8px;border:0;min-height:43px;max-height:100px;resize:none;background:transparent;font-size:12px}.chat-input-wrap textarea:focus-visible{outline:none}.chat-send{width:38px;min-width:38px;min-height:43px;border:0;border-radius:7px;background:#8994d7;color:#141b38;font-size:23px}.chat-help{display:block;font-size:9px;color:#758199;margin:7px 2px 0}.result-banner{padding:21px 16px;background:#2d3d37;border:1px solid #4c7862;border-radius:12px;margin-bottom:22px;text-align:center}.result-banner.liar-win{background:#43313e;border-color:#855673}.result-banner h3{font-size:23px;letter-spacing:-.6px;color:#b6eccd}.result-banner.liar-win h3{color:#efbfdd}.result-banner p{font-size:11px;color:#becbbf;margin-top:5px}.result-facts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.result-fact{background:#252a38;border-radius:9px;padding:14px}.result-fact dt{font-size:10px;color:var(--muted);margin-bottom:5px}.result-fact dd{font-size:17px;font-weight:700;margin:0;overflow-wrap:anywhere}.tally-title{font-size:12px;margin:19px 0 11px}.tally-list li{display:flex;justify-content:space-between;gap:12px;font-size:12px;padding:8px 0;border-bottom:1px solid #303644}.tally-list li span:first-child{overflow-wrap:anywhere}.tally-list li span:last-child{color:var(--accent);white-space:nowrap}.toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 32px);width:max-content;background:#dce1fa;color:#171d35;padding:13px 21px;border-radius:10px;box-shadow:0 8px 30px #0005;font-size:13px;z-index:20}.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}
@media(min-width:1600px){.home-screen{padding-top:120px}}
@media(max-width:1100px){.site-header{padding:0 28px}.home-screen{gap:50px;padding-top:65px}.room-screen{padding:24px 20px}.room-grid{grid-template-columns:175px minmax(300px,1.6fr) minmax(230px,1fr);gap:12px}.game-panel{padding:20px}.panel-heading{padding:18px 13px}.participants-note{padding:17px 12px}.panel-heading-note{display:none}.player-list{padding:10px 6px}.player-item{gap:7px}.room-grid .avatar{width:29px;height:29px}.phase-progress li{font-size:8px}}
@media(max-width:850px){.site-header{height:74px}.room-grid{grid-template-columns:minmax(0,1.4fr) minmax(240px,1fr)}.game-panel{grid-column:1;grid-row:1}.chat-panel{grid-column:2;grid-row:1;min-height:560px}.participants-panel{grid-column:1/-1;grid-row:2}.player-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.participants-note{display:none}.panel-heading-note{display:block}.hero-copy h1{font-size:46px}.home-screen{gap:35px;padding:48px 25px 25px}.entry-card{padding:25px}.hero-details{gap:8px;font-size:10px}.hero-details span+span::before{margin-right:8px}.hero-description{font-size:13px}}
@media(max-width:640px){.site-header{height:68px;padding:0 20px}.brand{font-size:22px}.brand-sub{font-size:10px;margin-left:10px;padding-left:10px}.brand-dice{width:30px;height:30px}.header-note{font-size:0;gap:0}.header-note .status-dot{width:6px;height:6px}.home-screen{display:flex;flex-direction:column;padding:34px 22px 24px;gap:31px}.hero-copy{padding-top:0}.hero-copy>.eyebrow{font-size:8px;letter-spacing:1.5px}.hero-copy h1{font-size:45px;letter-spacing:-2.7px;margin:21px 0 17px}.hero-description{font-size:13px;line-height:1.85}.game-preview{margin-top:24px;padding-top:20px}.preview-icon{width:47px;height:53px;font-size:29px;line-height:53px;border-radius:11px}.game-preview h2{font-size:15px}.game-preview p{font-size:11px}.hero-details{margin-top:18px;font-size:10px;gap:13px}.hero-details span+span::before{margin-right:13px}.entry-card{padding:25px 24px}.entry-card h2{font-size:24px}.entry-card>.muted{font-size:12px;margin-bottom:24px}.home-footer{font-size:9px;gap:12px;flex-wrap:wrap;padding-top:18px}.home-footer span:last-child{font-size:8px;letter-spacing:.5px}.room-screen{padding:20px 12px 28px}.room-topbar{align-items:flex-start;gap:10px;margin-bottom:18px;padding:0 3px}.room-heading h1{font-size:24px}.room-heading>div{gap:7px;flex-wrap:wrap}.room-heading .round-badge{font-size:9px}.room-actions{gap:2px}.room-actions .button{font-size:11px;padding:10px;min-height:44px}.room-label{font-size:10px}.room-grid{display:flex;flex-direction:column;min-height:0;gap:14px}.game-panel{order:0;padding:23px 20px}.chat-panel{order:1;min-height:0;height:420px;max-height:none}.participants-panel{order:2}.game-panel-heading h2{font-size:23px}.phase-progress li{font-size:9px}.stage-title{font-size:22px}.game-panel-footer{margin-top:20px;padding-top:7px}.player-list{grid-template-columns:1fr 1fr;padding:10px}.player-item{padding:9px 7px;gap:9px}.room-grid .avatar{width:32px;height:32px}.panel-heading{padding:18px}.chat-messages{padding:19px}.chat-body{font-size:13px}.chat-author{font-size:12px}.chat-form{padding:12px 14px}.chat-input-wrap textarea{font-size:16px}.chat-help{font-size:9px}.chat-send{min-height:44px;width:44px}.connection-banner{margin:10px 12px 0;font-size:12px;padding:10px 12px}.connection-banner .button{white-space:nowrap}.toast{bottom:max(20px,env(safe-area-inset-bottom));font-size:12px}.kick-button{min-width:30px}.lobby-art{height:105px}.rule-chips{margin-bottom:22px}input,select{font-size:16px}.vote-option{min-height:50px}.private-card{padding:12px 14px}.talk-list li{font-size:12px}.entry-card .button{font-size:13px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}/* Practical text sizes and touch targets. */
body{font-size:16px}.eyebrow,.header-note,.panel-heading-note,.room-label,.chat-help,.chat-time,.home-footer,.brand-sub,.entry-note,.game-panel-footer,.phase-progress li{font-size:12px}.player-name,.player-status,.chat-author,.chat-body,.stage-description,.progress-copy,.talk-list li,.vote-option,.tally-title,.tally-list li,.setting-label,label{font-size:14px}.chat-body{font-size:16px}.kick-button{min-width:44px;min-height:44px}.text-button{font-size:13px}.chat-input-wrap textarea{font-size:16px}.game-stage select{margin:12px 0 22px}.game-stage .button-wide{margin-top:20px}.game-stage form input{margin:8px 0}.game-stage .stage-description{margin:12px 0;line-height:1.8}.player-info{min-width:0;flex:1}.player-name,.player-status{display:block;overflow-wrap:anywhere}.player-status{font-size:12px;color:var(--muted)}.player-item.disconnected{opacity:.6}.avatar{flex-shrink:0}.phase-progress{flex-wrap:wrap;gap:8px}.room-grid{grid-template-columns:220px minmax(0,1fr) 310px}.game-panel,.chat-panel,.participants-panel{min-width:0}.game-stage input,.game-stage select{width:100%}.result-banner p{font-size:14px}.private-card p{overflow-wrap:anywhere}#secret-role{font-size:16px}#secret-word{font-size:28px;font-weight:800}#secret-description{font-size:14px}.chat-messages{overscroll-behavior:contain}.home-screen{padding-top:60px}.hero-copy h1{font-size:52px}.hero-description{font-size:16px}.hero-details{font-size:13px}
@media(max-width:1100px){.room-grid{grid-template-columns:175px minmax(0,1fr) 270px}.room-screen{padding:20px 12px}.game-panel{padding:18px}}
@media(max-width:850px){.room-grid{display:flex;flex-direction:column}.game-panel{order:0}.chat-panel{order:1;height:420px;min-height:0;max-height:none}.participants-panel{order:2}.player-list{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-copy h1{font-size:40px}}
@media(max-width:640px){.hero-copy{display:none}.home-screen{padding:26px 16px}.entry-card{padding:25px 22px}.home-footer{font-size:12px}.home-footer span:last-child{display:none}.entry-card>.muted,.entry-note,.entry-card label,.entry-card .button{font-size:14px}.room-actions .button{font-size:12px}.stage-title{font-size:23px}.room-heading .round-badge,.phase-progress li,.chat-help{font-size:12px}.game-panel{padding:22px 16px}.player-list{grid-template-columns:1fr}.vote-option{font-size:15px}.chat-panel{height:430px}.game-panel-footer{flex-wrap:wrap;font-size:12px}}
.confirm-dialog{width:min(430px,calc(100vw - 32px));padding:26px;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:16px;box-shadow:0 20px 80px #0008}.confirm-dialog::backdrop{background:#0009}.confirm-dialog p{font-size:16px;line-height:1.8}.dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}.dialog-actions button{min-width:84px;min-height:48px}

/* Nickname entry, room directory and chat-first room flow. */
.home-screen{display:flex;flex-direction:column;max-width:480px;width:100%;padding:52px 24px 36px;gap:28px}
.home-screen .hero-copy{display:block;padding:0}
.home-screen .hero-copy h1{font-size:46px;line-height:1.2;margin:20px 0 18px;letter-spacing:-2px}
.home-screen .hero-description{font-size:16px}
.home-screen .entry-card{width:100%;padding:24px}
.home-screen #enter-button{margin-top:20px;min-height:50px;font-size:16px}
.lobby-screen{width:100%;max-width:760px;padding:32px 24px 48px;margin:0 auto}
.lobby-heading{margin-bottom:24px}
.lobby-heading h1{font-size:30px;margin:6px 0;letter-spacing:-1px}
.lobby-heading .eyebrow{letter-spacing:0;overflow-wrap:anywhere}
.lobby-heading .muted{font-size:15px}
#open-create-button{font-size:16px;min-height:48px}
.directory-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:24px 0 12px}
.directory-heading h2{font-size:16px}
.room-list{display:grid;gap:12px}
.room-card{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
.room-card.invited{border-color:var(--accent)}
.room-card-info{min-width:0}
.room-card h3{font-size:18px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.room-card .muted,.room-card-status{font-size:13px}
.room-card-status{color:var(--green)}
.room-card-action{display:flex;align-items:center;gap:14px;flex-shrink:0}
.room-card-action .button{min-width:70px;min-height:46px}
.room-occupancy{white-space:nowrap;font-size:14px;color:var(--muted)}
.invited-label{font-size:11px;color:var(--accent);font-weight:500}
.directory-empty{padding:48px 20px;text-align:center;border:1px dashed var(--line);border-radius:14px;color:var(--muted);line-height:1.9}
.directory-empty span{font-size:14px}
.sheet-dialog{width:min(520px,calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;padding:22px;background:var(--panel);color:var(--text);border:1px solid #414762;border-radius:18px;box-shadow:0 20px 80px #0008}
.sheet-dialog::backdrop{background:#090c18b3}
.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.dialog-heading h2{font-size:20px}
.dialog-heading .button{min-width:44px;min-height:44px;font-size:24px;padding:6px}
#create-room-form label{margin:18px 0 8px}
#create-room-form .button-wide{margin-top:24px;font-size:16px}
#create-game:disabled{opacity:1;color:var(--text)}
body.in-room{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
body.in-room>.site-header{display:none}
body.in-room>main{display:flex;flex:1;min-height:0;width:100%}
body.in-room .connection-banner{flex:none;margin:6px 12px}
body.in-room .room-screen{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:960px;padding:14px 18px;margin:0 auto;gap:12px}
.room-screen .room-topbar{flex:none;margin:0;padding:0;align-items:center;gap:12px}
.room-screen .room-heading h1{font-size:24px}
.room-screen .room-heading>div{gap:10px;align-items:center}
#room-menu-button{font-size:24px;min-width:48px;min-height:48px}
.room-screen .room-grid{display:flex;flex-direction:column;flex:1;min-height:0;gap:12px}
.room-screen .game-panel{flex:none;padding:12px 16px;border-radius:14px}
.room-screen .game-panel-heading h2{font-size:16px;margin:0}
.room-screen .phase-label{font-size:12px;padding:3px 9px}
.game-summary{font-size:14px;color:#c1c7df;margin:6px 0;overflow-wrap:anywhere;line-height:1.5}
.summary-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}
.room-screen .phase-progress{display:inline;margin:0;color:var(--muted);font-size:12px}
.summary-deadline{font-size:12px;color:var(--muted);white-space:nowrap}
#game-details-button{min-height:44px;font-size:13px;padding:9px 14px}
.room-screen .chat-panel{flex:1;min-height:0;height:auto;max-height:none;border-radius:14px}
.room-screen .chat-panel>.panel-heading{flex:none;padding:8px 16px}
.room-screen .chat-panel>.panel-heading h2{font-size:13px}
.room-screen .chat-panel .panel-heading-note{font-size:12px}
.room-screen .chat-messages{flex:1;min-height:0;padding:18px}
.chat-message{width:fit-content;max-width:85%;margin:0 0 18px}
.chat-message.own{margin-left:auto}
.chat-message.own .chat-meta{justify-content:flex-end}
.chat-meta{gap:10px;margin-bottom:5px}
.chat-author{font-size:12px}.chat-time{font-size:11px}
.chat-body{padding:10px 13px;background:#272c3e;border:1px solid #353b54;border-radius:4px 16px 16px 16px;text-align:left;font-size:15px;line-height:1.65}
.chat-message.own .chat-body{background:#a4a0ed;border-color:#a4a0ed;color:#161a30;border-radius:16px 4px 16px 16px}
.room-screen .chat-form{flex:none;padding:10px 12px max(10px,env(safe-area-inset-bottom))}
.room-screen .chat-help{display:none}
.room-screen .chat-send{min-width:44px;min-height:44px}
.room-screen .chat-input-wrap textarea{font-size:16px}
.room-menu{margin:12px 12px auto auto;width:min(360px,calc(100vw - 24px))}
.room-menu .participants-panel{border:0;background:transparent}
.room-menu .panel-heading{padding:0 0 12px}
.room-menu .panel-heading-note{display:block}
.room-menu .player-list{display:block;padding:0;max-height:40dvh;overflow-y:auto}
.room-menu .player-item{padding:8px 0}
.room-menu .participants-note{display:none}
.menu-info{padding:18px 0;margin-top:14px;border-top:1px solid var(--line)}
.menu-info h3{font-size:15px;margin-bottom:8px}
.menu-info p{font-size:14px;color:var(--muted)}
.menu-actions{display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--line);padding-top:16px}
.menu-actions #leave-button{color:var(--danger)}
.game-dialog .stage-title{font-size:21px}
.game-dialog .private-card{margin-bottom:18px}
.game-dialog .game-panel-footer{flex-wrap:wrap;gap:4px;margin-top:18px}
.game-dialog .game-stage .stage-description{line-height:1.65}
@media(max-width:640px){
 .home-screen{padding:30px 22px;gap:24px}
 .home-screen .hero-copy h1{font-size:42px}
 .home-screen .entry-card{padding:22px}
 .lobby-screen{padding:24px 16px}
 .room-card{padding:14px;gap:10px}
 .room-card-action{gap:10px}
 .room-card-action .button{min-width:60px;padding:10px 12px}
 .room-card h3{font-size:16px}
 .room-occupancy{font-size:13px}
 .sheet-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 24px);padding:20px;margin:auto auto 8px;border-radius:18px}
 .room-menu{width:min(360px,calc(100vw - 16px));margin:8px 8px auto auto}
 body.in-room .room-screen{padding:8px;gap:8px}
 .room-screen .room-heading h1{font-size:21px}
 .room-screen .room-grid{gap:8px}
 .room-screen .game-panel{padding:10px 12px}
 .room-screen .chat-messages{padding:12px}
 .room-screen .room-label{font-size:11px}
 .game-summary{font-size:13px}
 .room-screen .round-badge{font-size:11px}
 .chat-message{max-width:90%}
}
