
:root{color-scheme:dark;--bg:#101918;--panel:#172220;--line:#2c3935;--text:#f1eee5;--muted:#a3afa7;--gold:#e9c783;--red:#ed8582;--yellow:#e8cd76;--blue:#8eb9ed;--green:#86c5a0;--orange:#ffad70;--radius:20px;font-family:Arial,"Segoe UI",sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-size:14px;line-height:1.5}button,input,select{font:inherit}button{color:inherit;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.4}button,input,select{outline-offset:4px}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--gold)}button{border:0;background:none}svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}h1,h2,h3,p{margin:0}button,input{touch-action:manipulation}button{transition:background .18s,color .18s,transform .18s,border-color .18s}button:active:not(:disabled){transform:translateY(1px)}.muted{color:var(--muted)}.small{font-size:12px}.eyebrow{font-size:10px;letter-spacing:2.3px;text-transform:uppercase;color:var(--gold);font-weight:700}.serif{font-family:Georgia,"Times New Roman",serif}.row{display:flex;align-items:center;gap:10px}.between{justify-content:space-between}.hidden{display:none!important}.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:12px;border:1px solid var(--line);background:#18211f}.icon-btn:hover{background:#26332d}.quiet{display:inline-flex;gap:8px;align-items:center;padding:10px 13px;border:1px solid var(--line);border-radius:10px;background:#192320}.quiet:hover{background:#26332d}.primary{background:var(--gold);color:#22281f;border-radius:12px;padding:15px 22px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:12px}.primary:hover{background:#f7dba7}.primary svg{width:19px}.danger{color:#f39d97}.dot{width:7px;height:7px;border-radius:50%;background:currentColor;display:inline-block;flex-shrink:0}.mafia{--role:var(--red)}.girl{--role:var(--yellow)}.doctor{--role:var(--green)}.detective{--role:var(--blue)}.civilian{--role:#ccd1c9}.unknown{--role:#8b9c91}
.shell{max-width:1480px;margin:auto;padding:0 42px 140px}.topbar{height:92px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:18px}.brand{display:flex;align-items:center;gap:13px}.brand-mark{width:39px;height:44px;display:grid;place-items:center;color:var(--gold);border:1px solid #a68e6055;border-radius:16px 16px 18px 18px}.brand-mark svg{width:25px;height:25px}.brand-title{font-size:22px;letter-spacing:4px;font-weight:bold}.brand-sub{font-size:9px;letter-spacing:2px;color:var(--muted)}.saved{font-size:11px;color:var(--muted);margin-right:8px;display:flex;align-items:center;gap:7px}.saved .dot{color:var(--green);width:5px;height:5px}.hero{display:flex;align-items:center;justify-content:space-between;padding:29px 0 24px;gap:20px}h1{font-size:38px;font-weight:400;letter-spacing:-1.4px;line-height:1.2;margin-top:8px}.hero-sub{color:var(--muted);margin-top:9px;font-size:13px}.counts{display:flex;gap:8px}.count{display:flex;align-items:center;gap:14px;padding:12px 18px;border:1px solid var(--line);border-radius:13px;min-width:114px}.count strong{font-size:30px;font-weight:400;line-height:1}.count span{font-size:11px;color:var(--muted)}.count .role-label{display:flex;align-items:center;gap:6px}.count.mafia .dot{color:var(--red)}.count.civilian .dot{color:#c5d1c1}.layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:22px;align-items:start}.table-panel{border:1px solid var(--line);border-radius:var(--radius);background:radial-gradient(ellipse at 50% 45%,#20312b 0%,#192622 39%,#15201d 78%);overflow:hidden;position:relative}.table-top{display:flex;align-items:center;justify-content:space-between;padding:18px 23px;border-bottom:1px solid #ffffff08;gap:8px}.table-top .eyebrow{color:#bdc7bd;font-size:9px;letter-spacing:1.8px}.seat-count{font-size:11px;color:var(--muted)}.board{position:relative;height:480px;isolation:isolate}.orbit{position:absolute;inset:63px 67px;border:1px solid #a9c0a324;border-radius:50%;pointer-events:none}.orbit:before{content:"";position:absolute;inset:22px;border:1px dashed #a9c0a31a;border-radius:50%}.table-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:260px;text-align:center;pointer-events:none}.center-icon{color:var(--gold);display:flex;justify-content:center;margin-bottom:14px}.center-icon svg{width:39px;height:39px;stroke-width:1.1}.table-center h2{font-family:Georgia,serif;font-size:35px;font-weight:400;line-height:1.12;letter-spacing:-.8px;margin:11px 0}.center-description{font-size:12px;color:var(--muted);line-height:1.6;max-width:215px;margin:auto}.center-rule{width:38px;height:1px;background:#e9c78350;margin:17px auto}.center-step{font-size:9px;letter-spacing:2px;color:#819689}.player{position:absolute;width:108px;min-height:100px;transform:translate(-50%,-50%);padding:4px;display:flex;flex-direction:column;align-items:center;gap:6px;border-radius:16px;user-select:none;z-index:2;touch-action:none}.player:active:not(:disabled){transform:translate(-50%,-50%)}.avatar{display:grid;place-items:center;width:66px;height:66px;border-radius:50%;border:1.5px solid var(--role);background:#25312c;color:var(--role);font-size:19px;font-weight:600;position:relative;transition:transform .25s,background .25s,box-shadow .25s;box-shadow:0 0 0 5px #14201b,0 0 0 6px #90a58f17}.player.unknown .avatar{border-style:dashed;background:#1b2923}.player:hover .avatar,.player:focus-visible .avatar{transform:translateY(-3px);box-shadow:0 0 0 5px #14201b,0 0 0 6px var(--role)}.player-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#e1e7dc;font-weight:500}.player-meta{font-size:9px;line-height:1;color:var(--role);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.seat-num{position:absolute;left:-5px;top:-3px;background:#17231d;border:1px solid #3b4b40;border-radius:50%;width:18px;height:18px;display:grid;place-items:center;font-size:9px;color:#bcc5b6}.badges{position:absolute;right:-6px;bottom:-3px;display:flex;gap:2px}.badge{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:3px solid #18241e;background:var(--orange);color:#292620}.badge svg{width:13px;height:13px;stroke-width:2.3}.badge.heal{background:var(--green)}.badge.visit{background:var(--yellow)}.player.hit .avatar,.player.fresh .avatar{background:#663e28;border-color:var(--orange);color:#ffd5b1;animation:warningPulse 2.2s ease-in-out infinite}.player.old .avatar{width:33px;height:33px;background:#29302c;border-color:#56615a;color:#8f9992;font-size:11px;box-shadow:none}.player.old{justify-content:center}.player.old .seat-num{display:none}.player.old .player-name,.player.old .player-meta{color:#7e8b81}.player.old .badge{width:17px;height:17px;border-width:2px;background:#626b62;color:#202620;right:0}.player.old .badge svg{width:9px;height:9px}.player.swap-source .avatar,.player.drop-over .avatar{box-shadow:0 0 0 5px #14201b,0 0 0 8px var(--gold)}.player.dragging{opacity:.5}.table-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 21px;border-top:1px solid #ffffff09;color:var(--muted);font-size:11px}.table-bottom .quiet{font-size:11px;padding:8px 11px}.legend{display:flex;gap:15px;flex-wrap:wrap;padding:15px 5px;color:var(--muted);font-size:10px}.legend span{display:flex;align-items:center;gap:6px}.legend .dot{background:var(--role);width:6px;height:6px}.steps{display:flex;gap:5px;margin:0 0 18px;overflow-x:auto;scrollbar-width:thin}.step{padding:7px 11px;font-size:10px;white-space:nowrap;border-radius:8px;color:#86998d;border:1px solid transparent;display:flex;gap:6px;align-items:center}.step.active{color:var(--gold);background:#e9c7830d;border-color:#e9c78332}.step.done{color:#c0cabb}.step svg{width:13px;height:13px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:23px;margin-bottom:16px}.panel-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:19px}.panel h3{font-size:17px;font-weight:500}.panel-heading>svg{color:#7f9387}.field-label{font-size:12px;color:#c4cec5;display:block;margin-bottom:9px}.stepper{display:flex;border:1px solid #3a493f;border-radius:10px;align-items:center;justify-content:space-between;padding:4px;margin-bottom:21px}.stepper button{width:38px;height:35px;border-radius:7px;font-size:22px}.stepper button:hover{background:#2c3d31}.stepper strong{font-size:17px;font-weight:500}.role-toggle{display:flex;align-items:center;gap:10px;padding:12px 0;border-top:1px solid #ffffff08;cursor:pointer}.role-toggle svg{color:var(--role);width:18px;height:18px}.role-toggle span{flex:1;font-size:12px}.role-toggle input{accent-color:var(--gold);width:17px;height:17px;cursor:pointer}.note{font-size:11px;line-height:1.65;color:var(--muted);padding-top:16px;border-top:1px solid var(--line);margin-top:13px}.guide{background:#1e2a23;border-color:#4b553a}.guide .eyebrow{font-size:9px;letter-spacing:1.5px;margin-bottom:12px}.guide p{font-size:12px;line-height:1.7;color:#c1cbbd}.guide svg{color:var(--gold);width:17px;height:17px}.hint-bubble{padding:12px;border-radius:10px;background:#e9c7830a;border:1px solid #e9c78320;color:#deca9f;font-size:11px;margin-top:15px}.summary-line{display:flex;gap:9px;padding:12px 0;border-bottom:1px solid var(--line);font-size:12px}.summary-line:last-child{border:0}.summary-line svg{color:var(--gold);width:17px;height:17px;margin-top:2px}.summary-line b{display:block;font-weight:500;overflow-wrap:anywhere}.summary-line span{font-size:10px;color:var(--muted)}.journal{margin-top:8px}.log-entry{position:relative;padding:0 0 15px 17px;border-left:1px solid #394a3d;font-size:11px;color:#bac5ba;overflow-wrap:anywhere}.log-entry:before{content:"";width:5px;height:5px;background:#7d917e;border-radius:50%;position:absolute;left:-3px;top:6px}.log-entry small{display:block;font-size:9px;color:#849789;margin-bottom:4px}.log-entry:last-child{padding-bottom:0}.journal-empty{color:var(--muted);font-size:12px;line-height:1.7}.warning-note{color:#e6c78f;font-size:11px;line-height:1.6;margin-top:12px}.footer{position:fixed;bottom:0;left:0;right:0;background:#101917f5;border-top:1px solid #3a483b;z-index:10;backdrop-filter:blur(18px);padding:18px 42px max(18px,env(safe-area-inset-bottom))}.footer-inner{max-width:1396px;margin:auto;display:flex;align-items:center;gap:18px}.footer .primary{min-width:200px;min-height:55px}.footer-info{display:flex;align-items:center;gap:14px;flex:1;justify-content:flex-end}.stage-card{min-width:200px;padding:7px 17px;border-left:1px solid #3b493e}.stage-card small{font-size:9px;letter-spacing:1.5px;color:var(--muted);display:block;text-transform:uppercase;margin-bottom:4px}.stage-card strong{font-size:13px;font-weight:500}.stage-card.current strong{color:var(--gold)}.footer-arrow{color:#71836f}.footer-arrow svg{width:17px}.undo{display:flex;align-items:center;gap:7px;color:var(--muted);padding:10px;font-size:11px}.undo:hover{color:var(--text)}.undo svg{width:16px}.winner .center-icon{color:var(--gold)}.winner h2{color:var(--gold)}.fade-in{animation:fadeIn .35s ease-out}.toast{position:fixed;bottom:124px;left:50%;transform:translateX(-50%);background:#e5dfcd;color:#263025;padding:12px 20px;border-radius:12px;z-index:40;font-size:12px;box-shadow:0 10px 40px #0005;max-width:min(90vw,500px);text-align:center}.toast[hidden]{display:none}dialog{color:var(--text);background:#19241f;border:1px solid #526046;border-radius:22px;width:min(460px,calc(100vw - 28px));padding:0;box-shadow:0 28px 120px #0009;max-height:calc(100dvh - 40px)}dialog::backdrop{background:#060d0bba;backdrop-filter:blur(5px)}dialog[open]{animation:modalIn .2s ease-out}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:22px 24px 14px;gap:10px}.modal-head h2{font-family:Georgia,serif;font-size:25px;font-weight:400}.modal-body{padding:0 24px 24px}.modal-body label{display:block;font-size:11px;color:var(--muted);margin:16px 0 7px}.modal-body input[type=text],.modal-body select{width:100%;border-radius:10px;background:#101b16;border:1px solid #3b4d3c;color:var(--text);padding:12px 13px;font-size:14px}.modal-body .primary{width:100%;margin-top:18px}.modal-divider{height:1px;background:var(--line);margin:22px 0 17px}.status-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px}.status-button{border:1px solid #3b4d3c;border-radius:10px;padding:13px 4px;font-size:10px;display:flex;flex-direction:column;gap:7px;align-items:center;background:#1c2b22}.status-button[aria-pressed=true]{border-color:var(--gold);background:#e9c78314;color:var(--gold)}.status-button svg{width:20px;height:20px}.modal-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:15px}.modal-actions .quiet{flex:1;justify-content:center;font-size:11px}.help-text p{margin:12px 0;color:#becbbb;font-size:13px}.help-text strong{color:var(--text);font-weight:500}.modal-caption{font-size:11px;color:var(--muted);margin-top:10px;line-height:1.6}.modal-feedback{font-size:11px;color:var(--yellow);min-height:16px;margin-top:9px}.modal-avatar{display:flex;gap:12px;align-items:center;margin-bottom:15px}.modal-avatar .avatar{width:47px;height:47px;box-shadow:none;font-size:16px}.modal-avatar .muted{font-size:11px}.cancel-swap{color:var(--gold);font-size:11px;text-decoration:underline}.mode-badge{display:inline-flex;align-items:center;gap:7px;background:#233329;padding:6px 10px;border:1px solid #3b4e3b;border-radius:7px;color:#b5c9b2;font-size:9px;letter-spacing:1px}.storage-warning{color:var(--orange)}
@keyframes warningPulse{0%,100%{box-shadow:0 0 0 5px #15211b,0 0 0 6px #ffad7070}50%{box-shadow:0 0 0 5px #15211b,0 0 22px 5px #ffad703a}}@keyframes fadeIn{from{opacity:.2;filter:blur(2px)}to{opacity:1;filter:blur(0)}}@keyframes modalIn{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
@media(min-width:1500px){.board{height:530px}.shell{padding-top:10px}}
@media(max-width:1100px){.shell{padding-left:24px;padding-right:24px}.layout{grid-template-columns:minmax(0,1fr) 255px;gap:16px}.panel{padding:19px}.table-center{width:205px}.table-center h2{font-size:29px}.footer{padding-left:24px;padding-right:24px}.stage-card{min-width:160px}.count{padding:12px;min-width:100px}.hero-sub{max-width:430px}.table-bottom{align-items:flex-start}.table-bottom>span{max-width:230px}}
@media(max-width:820px){.layout{grid-template-columns:1fr}.sidebar{display:grid;grid-template-columns:1fr 1fr;gap:15px}.sidebar .panel{margin:0}.sidebar .journal-panel{grid-column:1/-1}.board{height:500px}.topbar{height:79px}.saved{display:none}.hero{padding:23px 0}.hero h1{font-size:33px}.count{min-width:90px;padding:10px;gap:9px}.count strong{font-size:27px}.count span{font-size:10px}.table-center{width:240px}.table-center h2{font-size:33px}.stage-card{min-width:130px}.footer-inner{gap:6px}.footer .primary{min-width:165px}.footer-info{gap:0}.stage-card{padding:6px 12px}.undo span{display:none}.shell{padding-bottom:145px}}
@media(max-width:540px){.shell{padding:0 15px 178px}.topbar{height:73px}.brand-title{font-size:18px;letter-spacing:3px}.brand-sub{font-size:8px;letter-spacing:1.4px}.brand-mark{width:32px;height:37px}.brand{gap:9px}.top-actions{gap:7px}.top-actions .quiet{padding:9px}.top-actions .quiet span{display:none}.hero{display:block;padding:24px 0 18px}.hero h1{font-size:34px;max-width:330px}.hero-sub{font-size:12px;max-width:330px}.counts{margin-top:18px}.count{flex:1;padding:11px 15px;justify-content:space-between;border-radius:10px}.count strong{font-size:26px}.count .role-label{font-size:11px}.steps{margin-bottom:13px;gap:1px}.step{padding:7px 8px;font-size:9px}.step svg{display:none}.table-top{padding:15px}.table-top .eyebrow{font-size:8px}.seat-count{font-size:10px}.board{height:460px}.avatar{width:56px;height:56px;font-size:16px}.player{width:86px;min-height:88px;gap:5px}.player-name{font-size:11px}.player-meta{font-size:8px}.table-center{width:165px}.table-center h2{font-size:27px;letter-spacing:-.7px}.center-icon svg{width:30px;height:30px}.center-icon{margin-bottom:9px}.center-description{font-size:10px;max-width:145px}.table-center .eyebrow{font-size:8px;letter-spacing:1.5px}.center-rule{margin:12px auto}.center-step{font-size:8px}.orbit{inset:58px 50px}.orbit:before{inset:19px}.table-bottom{padding:13px;gap:7px;align-items:center}.table-bottom>span{max-width:160px;font-size:10px}.table-bottom .quiet{font-size:10px;padding:8px}.table-bottom svg{width:15px}.legend{gap:9px 13px;font-size:9px;padding:14px 3px 20px}.sidebar{grid-template-columns:1fr}.sidebar .journal-panel{grid-column:auto}.panel{padding:21px}.footer{padding:12px 15px max(12px,env(safe-area-inset-bottom))}.footer-inner{flex-wrap:wrap;gap:8px}.footer .primary{min-width:0;width:calc(100% - 50px);min-height:46px;padding:13px;order:2}.undo{width:42px;height:46px;justify-content:center;order:3}.footer-info{order:1;flex-basis:100%;justify-content:space-between;margin-bottom:2px}.stage-card{width:49%;min-width:0;padding:0 10px}.stage-card small{font-size:8px;letter-spacing:1px;margin-bottom:2px}.stage-card strong{font-size:11px}.footer-arrow{display:none}.toast{bottom:151px}.modal-head{padding:20px 20px 12px}.modal-body{padding:0 20px 22px}.badge{width:21px;height:21px}.badge svg{width:11px;height:11px}}
/* Keep the table usable on laptop screens and keep labels clear of its centre. */
.center-icon{margin-bottom:10px}.center-rule{margin:13px auto}.center-step{margin-top:2px}.table-center .center-rule:last-of-type{display:none}.table-center .center-step{margin-top:16px}
@media(min-width:821px) and (max-height:920px){.topbar{height:65px}.hero{padding:17px 0}.hero h1{font-size:32px}.hero-sub{font-size:12px;margin-top:6px}.steps{margin-bottom:11px}.table-top{padding:12px 20px}.table-bottom{padding:11px 18px}.table-center h2{font-size:28px}.center-icon{display:none}.center-step{display:none}.center-description{font-size:11px}.legend{padding:11px 5px}.footer{padding-top:13px;padding-bottom:13px}}
@media(max-width:540px){.topbar{height:63px}.hero{padding:16px 0 12px}.hero h1{font-size:29px;margin-top:5px}.hero .eyebrow{font-size:8px;letter-spacing:1.8px}.hero-sub{display:none}.counts{margin-top:13px}.count{padding:8px 14px}.count strong{font-size:24px}.steps{margin-bottom:11px}.table-top{padding:12px 14px}.table-center{width:140px}.table-center h2{font-size:24px;line-height:1.15}.center-icon,.center-step{display:none}.center-description{font-size:10px;line-height:1.5}.center-rule{margin:10px auto}.table-center .center-rule:last-of-type{display:none}.table-bottom{min-height:57px}.legend{padding-top:12px}.player-meta{font-size:8px}}
@media(max-width:540px){.table-center .center-description,.table-center .center-rule{display:none}}
@media(max-width:380px){.player{width:72px}.avatar{width:48px;height:48px;font-size:15px}.player-name{font-size:10px}.table-center{width:128px}.table-center h2{font-size:22px}.table-center .eyebrow{font-size:7px}}
.center-description+.center-rule{display:none}
@media(min-width:821px) and (max-height:920px){.table-center .center-description,.table-center .center-rule{display:none}}
@media(max-width:540px){.player.old .avatar{width:28px;height:28px}}
@media(max-width:380px){.player.old .avatar{width:24px;height:24px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* v2: a compact table; the current decision is the primary control. */
.hero-sub:empty,.steps:empty{display:none}.hero{padding:22px 0}.hero h1{font-size:34px}.topbar{height:76px}.saved{font-size:10px}.layout{gap:20px}.in-game .layout{display:block}.in-game .layout>section{max-width:1120px;margin:auto}.in-game .sidebar{display:none}.in-game .steps{justify-content:center}.table-top{padding:13px 21px}.table-center{z-index:2;width:280px;padding:20px 8px;background:radial-gradient(ellipse,#1b2a24 45%,#1b2a24ec 59%,#1b2a2400 73%)}.table-center h2{font-size:32px;line-height:1.15;margin:9px 0 13px;letter-spacing:-.6px}.center-icon{display:flex!important;margin-bottom:13px}.center-icon svg{width:31px;height:31px}.turn-hint{font-size:11px;color:var(--muted);line-height:1.5;margin:8px 0 0;overflow-wrap:anywhere}.turn-hint.has-target{color:var(--gold)}.in-game .player{touch-action:manipulation}.in-game .player:hover .avatar{transform:none}.player:disabled{opacity:.72;cursor:default}.player.awaiting .avatar{animation:invite 1.8s ease-in-out infinite;animation-delay:var(--pulse-delay)}.player.chosen .avatar{animation:none;border-color:var(--action);background:#5a3d2a;color:var(--action);box-shadow:0 0 0 5px #15211b,0 0 0 7px var(--action),0 0 27px #ffae7035}.player.chosen .player-meta{color:var(--action)}body[data-phase=girl] .player.chosen .avatar{background:#514a28;box-shadow:0 0 0 5px #15211b,0 0 0 7px var(--action),0 0 28px #ebcf7040}body[data-phase=doctor] .player.chosen .avatar{background:#254a37;box-shadow:0 0 0 5px #15211b,0 0 0 7px var(--action),0 0 28px #81d5a540}.player.tap-pending .avatar{outline:2px solid #e9c78370;outline-offset:5px}.tracers{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:1}.tracers .trace{fill:none;stroke-width:1.9;stroke-dasharray:5 8;stroke-linecap:round;animation:traceFlow .9s linear infinite;opacity:.93}.tracers .trace-under{fill:none;stroke-width:7;opacity:.055}.transition-progress{width:52px;height:2px;margin:19px auto 0;background:#e9c78320;overflow:hidden;border-radius:2px}.transition-progress i{display:block;height:100%;width:100%;background:var(--gold);transform-origin:left;animation:progress linear forwards}.transitioning h2{animation:phaseEnter .35s ease-out}.next-copy{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;max-width:235px;min-width:90px}.next-copy b{font-size:14px}.next-copy small{font-size:10px;font-weight:400;line-height:1.4;white-space:normal;overflow-wrap:anywhere}.footer .primary{min-width:210px;justify-content:space-between;min-height:60px}.footer .primary:disabled{background:#27362c;color:#bac3b4;opacity:.8;border:1px solid #44503b;cursor:not-allowed}.footer{padding-top:14px;padding-bottom:max(14px,env(safe-area-inset-bottom))}.unknown-count{border:1px dashed #b49b654a;border-radius:10px;padding:8px 12px;font-size:10px;color:var(--gold)}.counts{align-items:center;flex-wrap:wrap}.roster-warning:empty{display:none}.roster-warning{margin:0 0 12px;text-align:center}.roster-warning button{color:var(--gold);display:inline-flex;align-items:center;gap:8px;border:1px solid #d7b67845;border-radius:10px;padding:9px 14px;font-size:11px}.day-controls{display:flex;align-items:center;gap:8px}.day-controls .on{border-color:var(--gold);color:var(--gold)}.role-count-row{display:flex;justify-content:space-between;font-size:11px;padding:15px 0;color:var(--muted);border-top:1px solid var(--line)}.role-count-row b{font-weight:400}.fill-civilians{width:100%;justify-content:center;font-size:11px}.setup-status{font-size:10px;color:var(--muted);margin-top:16px;display:flex;gap:6px;align-items:center}.setup-status.ready{color:var(--green)}.setup-status svg{width:14px;height:14px}.role-toggle small{color:var(--muted);font-size:10px}.role-swap-row{display:flex;gap:9px;align-items:center}.role-swap-row select{min-width:0;flex:1}.role-swap-row .icon-btn{height:45px;width:45px;flex-shrink:0}.modal-body .modal-feedback:empty{display:none}.modal-body form>.primary{margin-top:17px}.new-empty{margin-top:12px;width:100%;justify-content:center}.roster-item{display:flex;width:100%;justify-content:space-between;text-align:left;gap:12px;padding:13px 0;border-bottom:1px solid var(--line);font-size:12px}.roster-item b{color:var(--role);font-weight:400}.roster-item span{overflow-wrap:anywhere;min-width:0}.report-round{font-size:11px;color:var(--muted);margin:0 0 16px}.report-line{display:flex;gap:15px;padding:19px 0;border-bottom:1px solid var(--line)}.report-line svg{width:23px;height:23px;margin-top:6px;color:var(--orange)}.report-line.visit svg{color:var(--yellow)}.report-line.heal svg{color:var(--green)}.report-line small{font-size:9px;letter-spacing:1.2px;color:var(--muted);display:block;margin-bottom:5px}.report-line strong{font-family:Georgia,serif;font-size:25px;font-weight:400;overflow-wrap:anywhere;display:block}.report-line>div{min-width:0}.winner-line{display:flex;align-items:center;gap:10px;margin-top:20px;padding:17px;background:#e9c7830c;border:1px solid #e9c78330;color:var(--gold);border-radius:12px;font-size:17px}.victory-icon{text-align:center;padding:20px}.victory-icon svg{width:64px;height:64px;color:var(--gold);stroke-width:1}.victory-count{text-align:center;font-size:18px;color:var(--muted);padding-bottom:18px}.legend{justify-content:center}.in-game .table-bottom{min-height:55px}.in-game .table-bottom>span{max-width:none}
@keyframes invite{0%,100%{box-shadow:0 0 0 5px #14201b,0 0 0 6px #c8d7bb26;filter:brightness(1)}50%{box-shadow:0 0 0 5px #14201b,0 0 0 7px #c8d7bb88,0 0 19px #d2e6c51c;filter:brightness(1.27)}}
@keyframes traceFlow{to{stroke-dashoffset:-26}}
@keyframes progress{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes phaseEnter{from{opacity:.1;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:821px) and (max-height:850px){.topbar{height:62px}.hero{padding:15px 0}.hero h1{font-size:29px}.steps{margin-bottom:11px}.table-center h2{font-size:28px}.center-icon{display:none!important}.table-center{width:245px}.table-top{padding:11px 19px}.table-bottom{padding:10px 18px}}
@media(max-width:820px){.sidebar{display:block}.sidebar .panel{margin:0}.in-game .table-center{width:230px}.in-game .table-center h2{font-size:30px}.steps{justify-content:flex-start!important}.top-actions{gap:7px}.top-actions .quiet span{display:none}}
@media(max-width:540px){.shell{padding:0 13px 160px}.topbar{height:62px}.hero{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:15px 0}.hero .eyebrow{font-size:8px}.hero h1{font-size:25px;margin-top:4px}.counts{margin:0;gap:6px}.count{min-width:0;flex:0 0 auto;padding:9px 10px;gap:9px}.count .role-label{font-size:9px}.count strong{font-size:22px}.count .dot{width:5px;height:5px}.unknown-count{flex-basis:100%;padding:5px 10px}.steps{gap:0;margin-bottom:10px}.step{font-size:8px;padding:6px 7px}.table-top{padding:11px 13px}.table-center,.in-game .table-center{width:174px;padding:18px 7px}.table-center h2,.in-game .table-center h2{font-size:23px;line-height:1.15;letter-spacing:-.6px}.center-icon{display:none!important}.turn-hint{font-size:9px;margin-top:9px}.table-bottom{flex-wrap:wrap;padding:11px 12px;gap:9px}.table-bottom>span{font-size:9px;max-width:190px}.in-game .table-bottom>span{font-size:9px}.day-controls .quiet{font-size:10px;padding:8px 10px}.footer .primary{min-width:0;min-height:53px;padding:9px 14px}.next-copy{max-width:calc(100% - 25px)}.next-copy b{font-size:13px}.next-copy small{font-size:9px}.footer{padding:10px 13px max(10px,env(safe-area-inset-bottom))}.stage-card strong{font-size:10px}.stage-card{padding:0 8px}.footer-info{align-items:flex-start}.legend{font-size:8px;gap:8px 12px}.in-game .legend{padding:12px 3px}.brand-title{font-size:17px}.brand-sub{font-size:7px}.brand{gap:7px}.brand-mark{width:29px;height:33px}.top-actions{gap:5px}.top-actions .icon-btn{width:34px;height:34px}.top-actions .quiet{padding:7px}.transition-progress{width:40px;margin-top:13px}.player-meta{font-size:8px}.roster-warning{margin:0 0 10px}.roster-warning button{font-size:10px}.in-game .hero{flex-wrap:nowrap}.in-game .hero .counts{flex-wrap:wrap}.in-game .hero .unknown-count{display:none}}
@media(max-width:380px){.table-center,.in-game .table-center{width:140px}.table-center h2,.in-game .table-center h2{font-size:20px}.count{padding:8px;gap:6px}.count .role-label{font-size:8px}.hero h1{font-size:23px}.brand-sub{display:none}.player-name{font-size:10px}.topbar{gap:6px}}
@media(prefers-reduced-motion:reduce){.trace,.awaiting .avatar,.transitioning h2,.transition-progress i{animation:none!important}.transition-progress i{transform:none}}
.table-center{background:none}.table-center h2,.table-center .turn-hint{text-shadow:0 1px 5px #15241d,0 0 8px #15241d}.tracers .trace{opacity:.88}.board.is-dragging .table-center{opacity:.3}.player.dragging{opacity:.95;z-index:6;cursor:grabbing}.player.dragging .avatar{transform:none;box-shadow:0 0 0 5px #14201b,0 0 0 7px var(--gold),0 12px 25px #0005}body:not(.in-game) .player{cursor:grab}.is-dragging{cursor:grabbing}#resetLayout{font-size:10px}.setup-status.ready{color:var(--muted)}
dialog.victory-screen{inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0;background:radial-gradient(ellipse at 50% 32%,#314034 0%,#17231d 40%,#0e1714 80%);overflow:auto;animation:phaseEnter .4s ease-out}.victory-screen .modal-head{position:absolute;top:22px;right:26px;padding:0;z-index:2}.victory-screen .modal-head h2{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.victory-screen .modal-body{padding:32px;min-height:100%;}.victory-content{min-height:calc(100dvh - 64px);width:min(940px,100%);margin:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.victory-emblem{color:var(--gold);margin:10px 0 24px}.victory-emblem svg{width:65px;height:65px;stroke-width:1.1}.victory-heading span{display:block;font-size:clamp(20px,3vw,34px);font-family:Georgia,serif;color:#d1d6c7;margin-bottom:6px}.victory-heading strong{font-family:Georgia,serif;font-size:clamp(65px,11vw,160px);line-height:1.1;letter-spacing:-.035em;font-weight:400;color:var(--gold)}.victory-screen .victory-count{padding:0;margin:18px 0 0;font-size:16px}.victory-reason{font-size:12px;color:var(--muted);margin-top:12px}.victory-buttons{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:32px}.victory-screen .victory-buttons .primary{width:auto;margin:0;min-width:170px}.victory-buttons .quiet{min-width:100px;justify-content:center}.victory-report{width:min(410px,100%);text-align:left;margin-top:23px;padding:0 16px;border:1px solid #8ea77d25;border-radius:15px}.victory-report .report-line{padding:11px 0;gap:11px}.victory-report .report-line:last-child{border:0}.victory-report .report-line strong{font-size:20px}.victory-report .report-line small{font-size:8px}.victory-report .report-line svg{width:18px;height:18px}
@media(max-width:540px){.victory-screen .modal-body{padding:65px 20px 25px}.victory-content{min-height:calc(100dvh - 90px)}.victory-heading strong{font-size:clamp(54px,15vw,82px)}.victory-heading span{font-size:23px}.victory-emblem{margin:0 0 20px}.victory-emblem svg{width:50px;height:50px}.victory-buttons{margin-top:24px;gap:8px}.victory-screen .victory-buttons .primary{min-width:140px;padding:12px 18px}.victory-buttons .quiet{padding:11px 15px;font-size:11px}.victory-screen .modal-head{top:16px;right:16px}.victory-reason{max-width:280px;font-size:11px}.victory-screen .victory-count{font-size:13px}}
@media(prefers-reduced-motion:reduce){dialog.victory-screen{animation:none}}

/* Stable circular contour; side labels keep their role color in every player state. */
.orbit{inset:auto;left:50%;top:50%;width:var(--orbit-size);height:var(--orbit-size);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%}
.role-word{color:var(--role);font-family:Georgia,"Times New Roman",serif;font-weight:700}
.player,.in-game .player{width:188px;min-height:78px;flex-direction:row;justify-content:flex-start;gap:12px;touch-action:none;cursor:grab;padding:6px;border-radius:12px}
.player .avatar{flex:none}.player-copy{display:flex;flex-direction:column;gap:5px;min-width:0;text-align:left;flex:1}.player-name{font-size:12px;line-height:1.25}.player-meta,.player.chosen .player-meta,.player.old .player-meta{font-size:10px;line-height:1.2;color:var(--role)}
.player.old{justify-content:flex-start;min-height:48px}.player.old .player-copy{opacity:.65}.player.old .avatar{animation:none}.player:hover .avatar,.player:focus-visible .avatar{transform:none}.player.dragging{cursor:grabbing}.seat-num{display:none}
@media(max-width:540px){.player,.in-game .player{width:140px;min-height:64px;gap:8px;padding:4px}.player .avatar{width:48px;height:48px;font-size:15px}.player.old .avatar{width:24px;height:24px;font-size:10px}.player-name{font-size:10px}.player-meta,.player.chosen .player-meta,.player.old .player-meta{font-size:9px}.player-copy{gap:4px}.table-center,.in-game .table-center{width:138px}.table-center h2,.in-game .table-center h2{font-size:21px}.in-game .table-bottom>span{font-size:9px;line-height:1.6}}
@media(max-width:540px){.player,.in-game .player{width:110px;min-height:54px;gap:6px}.player .avatar{width:40px;height:40px;font-size:13px}.player.old .avatar{width:20px;height:20px;font-size:9px}.player-name{font-size:10px}.player-meta,.player.chosen .player-meta,.player.old .player-meta{font-size:8px}.table-center,.in-game .table-center{width:112px}.table-center h2,.in-game .table-center h2{font-size:18px}.turn-hint{font-size:8px}}
@media(max-width:380px){.table-center,.in-game .table-center{width:94px}.table-center h2,.in-game .table-center h2{font-size:15px;letter-spacing:-.3px}.turn-hint{font-size:7px}}
.table-center,.in-game .table-center{left:50%;top:50%;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center}.table-center h2{width:100%;text-wrap:balance}.table-center .turn-hint{max-width:100%}
.player,.player:active:not(:disabled){transform:translate(-50%,-50%) scale(var(--player-scale,1))}.player.awaiting .avatar{animation:none;box-shadow:0 0 0 5px #14201b,0 0 0 6px #90a58f17}.player.awaiting{animation:cardPulse 1.8s ease-in-out infinite}.player.dragging{animation:none!important}.player.acting:before{content:'Ходит';position:absolute;top:-13px;left:8px;color:var(--role);font-size:9px;font-weight:700;letter-spacing:.5px}.player.acting .avatar{border-width:3px}.player.protected .player-copy:after{content:'Защищён';color:var(--yellow);font-size:8px}.player.vote-eligible:not(.chosen) .avatar{outline:1px dashed #c7d5c57a;outline-offset:5px}.player.protected{opacity:.7}.player.collision{outline:2px dashed var(--orange)}.player.updated{outline:2px solid var(--gold)}.player-notice{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);background:#e9c783;color:#18221d;border-radius:7px;padding:7px 10px;font-size:10px;width:max-content;max-width:180px;white-space:normal;z-index:8;pointer-events:none}
@keyframes cardPulse{0%,100%{transform:translate(-50%,-50%) scale(var(--player-scale,1));opacity:1}50%{transform:translate(-50%,-50%) scale(calc(var(--player-scale,1)*1.035));opacity:.72}}
.zoom-controls{display:flex;align-items:center;justify-content:flex-end;gap:5px;padding:8px 15px;border-bottom:1px solid #ffffff08;color:var(--muted);font-size:10px}.zoom-controls>span{margin-right:auto}.zoom-controls button{border:1px solid var(--line);border-radius:7px;min-width:32px;height:30px}.zoom-controls #zoomReset{min-width:55px;color:var(--gold)}
.role-trigger,.role-option{display:flex;align-items:center;gap:12px;width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;color:var(--role);text-align:left}.role-trigger span:first-of-type,.role-option span{flex:1}.role-options{margin-top:7px;padding:5px;border:1px solid var(--line);border-radius:12px;background:#101b16}.role-options[hidden]{display:none}.role-option{border:0}.role-option:hover,.role-option[aria-pressed=true]{background:#ffffff0b}.role-option small{font-size:10px;color:var(--muted)}.role-picker svg{width:20px;height:20px}.saved-night{color:var(--green);margin-top:8px;font-size:18px}.undo-preview{padding:12px 0}.undo-preview small{color:var(--muted);font-size:9px;letter-spacing:1px}.undo-preview p{margin:8px 0 16px;line-height:1.6}.undo-preview svg{display:block;color:var(--gold);margin-bottom:16px}.resume-stage{font-family:Georgia,serif;font-size:23px;line-height:1.4;margin:10px 0 18px}.help-row{display:flex;gap:15px;padding:16px 0;border-bottom:1px solid var(--line)}.help-row>svg{color:var(--role);width:24px;height:24px}.help-row strong{color:var(--role);font-size:14px}.help-row p{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.6}
@media(prefers-reduced-motion:reduce){.player.awaiting{animation:none}}
.player.hit .avatar,.player.fresh .avatar{animation:none}.player.hit,.player.fresh{animation:cardPulse 1.8s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.player.hit,.player.fresh{animation:none}}
.in-game .shell{padding-bottom:0}.in-game .legend{padding:6px 3px}.in-game .table-bottom{min-height:38px;padding-top:6px;padding-bottom:6px}.table-center h2{white-space:normal;text-align:center;text-wrap:initial;margin-left:auto;margin-right:auto}.table-center h2 .role-word{display:inline}.exclusion-name{font-family:Georgia,serif;font-size:30px;margin:10px 0 15px}.undo:disabled{opacity:.3;cursor:not-allowed;pointer-events:none}
@media(max-height:750px){.in-game .topbar{height:48px}.in-game .hero{padding:8px 0}.in-game .hero h1{font-size:24px}.in-game .steps{margin-bottom:6px}.in-game .table-top{padding:6px 12px}.in-game .zoom-controls{padding:4px 12px}.in-game .table-center h2{font-size:22px}.in-game .center-icon{display:none!important}.in-game .turn-hint{margin-top:4px}.in-game .table-bottom{min-height:32px}.in-game .legend{display:none}}
@media(max-width:540px){.in-game .table-center h2{font-size:18px}.in-game .table-center{width:150px}.in-game .table-bottom>span{line-height:1.2}.in-game .table-center .turn-hint{font-size:8px}}
.table-top,.in-game .table-top{padding:8px 0;border:0;gap:14px;flex-wrap:wrap}.table-top>.eyebrow{display:none}.table-top .zoom-controls,.in-game .table-top .zoom-controls{padding:0;border:0;margin-left:auto}.zoom-controls>span{margin-right:6px}.table-bottom,.in-game .table-bottom{border:0;padding:8px 0;min-height:0;justify-content:flex-start;gap:8px}.table-bottom:has(#addBtn.hidden):has(.day-controls:empty){display:none}#tableHint{display:none}.table-bottom #addBtn{order:-1}.in-game .legend{padding:4px 0}.table-panel{overflow:hidden}.table-top .seat-count{white-space:nowrap}
.in-game .shell{padding-bottom:150px}@media(max-width:540px){.in-game .shell{padding-bottom:180px}}
.layout,.in-game .layout{display:block}.layout>section,.in-game .layout>section{width:100%;max-width:1120px;margin-left:auto;margin-right:auto}.sidebar{max-width:1120px;margin:20px auto 0}.sidebar .panel{max-width:480px}.board{height:688px}@media(max-width:820px){.board{height:592px}}@media(max-width:539px){.board{height:512px}}

@keyframes cardPulseMobile{0%,100%{opacity:1}50%{opacity:.62}}@media(max-width:540px){.player.awaiting,.player.hit,.player.fresh{animation:cardPulseMobile 1.8s ease-in-out infinite}}@media(max-width:540px) and (prefers-reduced-motion:reduce){.player.awaiting,.player.hit,.player.fresh{animation:none}}

.footer-info{flex-wrap:wrap}.no-vote-slot{flex-basis:100%;display:flex;justify-content:flex-end}.no-vote-slot:empty{display:none}.no-vote-button{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:11px;padding:5px 8px;border-radius:8px}.no-vote-button:hover,.no-vote-button.on{color:var(--gold)}.skip-check{width:17px;height:17px;border:1px solid var(--muted);border-radius:4px;display:grid;place-items:center;font-size:12px;line-height:1}.no-vote-button.on .skip-check{background:var(--gold);border-color:var(--gold);color:#172019}@media(max-width:540px){.no-vote-slot{justify-content:flex-start}.no-vote-button{font-size:10px;padding:4px 8px}}

