@font-face{font-family:IBMPlexSansThai;src:url(assets/IBMPlexSansThai-Regular.ttf);font-display:swap}@font-face{font-family:IBMPlexSansThai;src:url(assets/IBMPlexSansThai-SemiBold.ttf);font-weight:600;font-display:swap}*{box-sizing:border-box}body{margin:0;color:white;font:17px IBMPlexSansThai,sans-serif;background:#333}button,input,select{font:inherit;color:inherit}button{border:0;background:#696969;border-radius:28px;padding:9px 16px;cursor:pointer;box-shadow:0 8px 12px #0004;text-shadow:1px 3px 4px #0005}button:active{transform:scale(.96)}button:disabled{opacity:.4;cursor:default}button:focus-visible{outline:2px solid white}input,select{width:100%;padding:9px 12px;border:1px solid #fff6;border-radius:25px;background:#555}h1,h2,p{margin:0 0 12px}h1{font-size:29px;font-weight:400}h2{font-size:23px;font-weight:400}img{display:block;max-width:100%;filter:drop-shadow(0 5px 5px #0005)}small{font-size:12px;color:#ddd}[hidden]{display:none!important}
#app{min-height:100svh;position:relative;isolation:isolate;text-shadow:1px 3px 4px #0005;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}#app:before{content:"";position:fixed;inset:0;background:linear-gradient(135deg,#5e5e5e,#414141 48%,#282828);z-index:-3}.sky{position:fixed;inset:0;overflow:hidden;z-index:-2;pointer-events:none}.cloud{position:absolute;width:110vw;max-width:none;opacity:.14;animation:drift 85s linear infinite}.c1{top:12%;animation-delay:-26s}.c2{top:70%;animation-duration:95s;transform:scaleX(-1)}.c3{top:42%;animation-duration:120s;animation-delay:-50s;opacity:.06}@keyframes drift{from{translate:-90vw 10px}to{translate:140vw -25px}}.brand{position:absolute;top:0;left:50%;translate:-50% 0;width:38%;max-width:180px;border-radius:0 0 22px 22px;overflow:hidden;transition:transform .7s}.logo{position:absolute;left:50%;top:23svh;translate:-50% 0;width:min(88%,475px);transition:top .75s,width .75s,transform .75s;pointer-events:none}.logo img{width:100%;animation:neon 9s infinite}@keyframes neon{0%,53%,55%,59%,62%,100%{opacity:1}54%,58%,61%{opacity:.2}}#app:not([data-view=splash]) .brand{transform:translateY(-130%)}#app[data-view=home] .logo{top:10svh;width:min(65%,350px)}#app:not([data-view=splash]):not([data-view=home]) .logo{transform:translateY(-90svh)}
#screen{max-width:560px;margin:auto;padding:28px 16px 36px;min-height:100svh}.splash-hit{position:absolute;inset:0;width:100%;background:transparent;box-shadow:none;display:flex;align-items:flex-end;justify-content:center;padding-bottom:22svh;font-size:14px;color:#ddd}.home-actions{padding-top:46svh;width:65%;max-width:330px;margin:auto;display:grid;gap:16px}.home-actions button{background:#7b4142;font-size:25px;padding:13px 0}.top{display:grid;grid-template-columns:40px 1fr 40px;align-items:center;text-align:center;gap:8px;margin-bottom:20px}.top h1{margin:0}.icon{background:transparent;box-shadow:none;padding:0;width:36px;height:36px;font-size:26px}.back{border:1px solid #eee8;line-height:1}.accent{color:#ff666b}.primary{background:#c65356}.pill{width:100%}.row{display:flex;gap:8px;align-items:center}.row>*{flex:1}.panel{padding:14px;background:#7b4142;border-radius:20px;box-shadow:0 9px 16px #0004;margin-bottom:14px}.panel h2{display:flex;justify-content:space-between;align-items:center}.group{border-radius:18px;padding:10px;margin-bottom:12px;background:#737373}.group.wolf{background:#7b4142}.group.village{background:#485576}.group-head{padding:0 5px;width:100%;text-align:left;background:none;box-shadow:none;font-size:20px}.group-head span{float:right}.search{margin:10px 0;font-size:14px;padding:6px 12px;background:transparent}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-top:10px}.card-wrap{position:relative;min-width:0}.card{padding:0;background:none;box-shadow:none;width:100%;border-radius:12px;touch-action:pan-y}.card img{width:100%;border-radius:12px}.badge{position:absolute;top:0;left:0;translate:-10% -10%;background:white;color:#7b4142;border-radius:50%;width:24px;height:24px;line-height:24px;text-align:center;text-shadow:none;z-index:2}.minus{position:absolute;right:0;bottom:0;padding:0;width:25px;height:25px;background:#999}.balance{text-align:center;font-size:14px;font-style:italic;margin:12px 0}.unbalanced{color:#ff7075}.muted{color:#ccc;font-size:13px}.error{font-size:13px;color:#ff9b9e}.preset{background:#676767;margin-bottom:12px;border-radius:20px;padding:12px}.preset-head{display:flex;align-items:center;gap:8px}.preset-head button:first-child{flex:1;text-align:left;background:none;padding:0;box-shadow:none}.preset-head button{padding:4px 9px}.carousel{height:240px;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}.slide{position:absolute;width:130px;padding:0;background:none;box-shadow:none;transition:transform .35s,opacity .35s}.slide img{border-radius:14px}.slide.side{opacity:.45;transform:translateX(-85px) scale(.83);z-index:1}.slide.other{transform:translateX(85px) scale(.83)}.slide.center{z-index:2}.carousel-nav{position:absolute;z-index:4;padding:3px 8px;background:#ffffff20;box-shadow:none}.prev{left:0}.next{right:0}.empty-card{border:1px solid #ddd;width:130px;height:210px;background:none;border-radius:18px;font-size:28px}.start{width:65%;margin:20px auto;display:block;font-size:24px;border:1px solid #ddd;background:#c65356}.setting{display:flex;justify-content:space-between;align-items:center;gap:14px;background:#575757;border-radius:25px;padding:9px 14px;margin:10px 0;font-size:14px}.setting input,.setting select{width:120px;padding:4px 8px}.setting input[type=checkbox]{width:24px;height:24px;accent-color:#c65356}.actions{display:flex;gap:8px;margin:20px 0}.actions>*{flex:1}.rules{font-size:13px;line-height:1.7;margin:16px 0}.rules summary{cursor:pointer;font-size:16px}.member{display:flex;justify-content:space-between;gap:10px;margin:10px 0}.ready{color:#ff8a8e}
dialog{border:0;max-width:min(94vw,520px);width:100%;max-height:90svh;padding:0;color:white;background:none;overflow:visible;text-shadow:1px 3px 4px #0005}dialog::backdrop{background:#0009}.modal-box{background:#686868;border-radius:20px;padding:22px;box-shadow:0 12px 35px #0008;max-height:88svh;overflow:auto;animation:pop .25s}.modal-box.red{background:#7b4142}dialog h2{text-align:center}.choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:18px 0}.choices button{padding:6px 5px;background:#7b4142;font-size:15px;overflow-wrap:anywhere}.selected{outline:1px solid white;background:#ac5557!important}.closeup{width:min(80vw,370px);margin:auto;animation:pop .3s}.closeup img{border-radius:20px}.choice{display:grid;gap:10px}.mode-row{display:flex;gap:10px;align-items:center;margin:14px 0}.mode-row>button:first-child{flex:1}.help{width:35px;height:35px;border:1px solid #ddd;box-shadow:none;border-radius:50%;padding:0;background:none}@keyframes pop{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}#toast{position:fixed;z-index:99;bottom:30px;left:50%;transform:translateX(-50%);background:#282828ef;border-radius:20px;padding:12px 20px;max-width:90vw;display:none;font-size:14px;text-align:center}#toast.show{display:block}
#app.day:before{background:#f8f8f8}#app.day{color:#444}.game-top{text-align:center;min-height:220px;padding-top:14px;position:relative}.game-top h1{font-size:34px;margin:0}.game-settings{position:absolute;top:0;right:0}.phase-label{font-size:18px;color:#ff6065;margin:4px 0 8px}.countdown{font-size:34px;font-weight:600;color:#7b4142}.cycle{position:absolute;bottom:-26px;width:180px;left:50%;translate:-50% 0;z-index:-1;transition:transform 1s}.cycle.day{transform:rotate(180deg)}.board{background:#7b4142;color:white;border-radius:20px 20px 0 0;padding:20px 12px;min-height:55svh}.board-head,.player-row{display:grid;grid-template-columns:43px 1fr 105px;gap:7px;align-items:center}.board-head{font-size:11px;margin-bottom:10px}.player-row{margin:9px 0}.player-row.dead{opacity:.38}.player-row.self{margin-bottom:18px}.role-icon{padding:0;width:37px;height:38px;background:none;box-shadow:none;border-radius:0}.role-icon img{width:100%;height:100%;object-fit:contain}.player-name{padding:6px 10px;background:#686868;text-align:left;font-size:14px;min-height:36px;overflow-wrap:anywhere}.statuses{display:flex;overflow-x:auto;gap:4px;max-width:105px}.statuses img{height:24px;width:20px;object-fit:contain}.task-banner{background:#686868;color:white;border-radius:18px;padding:14px;margin:14px 0;box-shadow:0 9px 16px #0004}.task-button{width:100%;text-align:left;margin:5px 0;font-size:14px;background:#555}.delivery{margin:24px auto;width:72%;max-width:300px}.delivery h2{text-align:center}.result{background:#7b4142;border-radius:20px;padding:24px;text-align:center}.result.positive{background:#465787}.result h2{font-size:29px;font-weight:600;color:#ff666b}.result.positive h2{color:#a9bdfa}.result-icon{width:90px;margin:15px auto}.journal{font-size:13px;line-height:1.7;margin:16px 0}.journal summary{cursor:pointer}.preview-label{position:fixed;bottom:3px;right:8px;font-size:10px;color:#ddd8;z-index:4}
@media(min-width:650px){#screen{border-left:1px solid #ffffff08;border-right:1px solid #ffffff08}.home-actions{width:330px}.cloud{width:70vw}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
.cycle{bottom:-90px}button{color:white}.game-settings{color:inherit}.carousel{height:205px}.carousel+.pill{font-size:12px;padding:4px}.logo:after{content:"";position:absolute;inset:0;background:url(assets/logo-off.png) center/contain no-repeat;opacity:0;animation:neon-off 9s infinite;pointer-events:none}@keyframes neon-off{0%,53%,55%,59%,62%,100%{opacity:0}54%,58%,61%{opacity:1}}


/* First edit: layout measured against supplied mobile screens. */
:root{--panel:#7b4142;--gray:#686868;--edge:18px;--hud-top:35svh}
body{font-size:17px}#screen{padding:34px 16px 28px}.top{margin:6px 0 15px;grid-template-columns:34px 1fr 34px}.top h1{font-size:27px}.icon svg{display:block;width:30px;height:30px;filter:drop-shadow(0 3px 3px #0004)}.icon img{width:30px;height:30px}.back{width:30px;height:30px;font-size:26px;line-height:27px;font-weight:300}.panel{border-radius:18px;padding:12px 14px;margin-bottom:16px}.panel h2{font-size:20px;margin:0 0 6px;font-weight:400}.panel h2 .icon{width:30px;height:30px}.roster-toggle{display:flex;align-items:center;justify-content:space-between;padding:5px 15px;text-align:left;font-style:italic;font-size:14px;height:34px}.roster-toggle svg{width:25px;height:25px}.bot-controls{display:flex;gap:7px;margin-top:9px;justify-content:flex-end}.bot-controls button{font-size:11px;padding:3px 10px;background:#ffffff16;box-shadow:none}.role-panel{padding-bottom:12px}.role-panel .carousel{height:210px;overflow:hidden}.empty-card{display:flex;align-items:center;justify-content:center;width:105px;height:182px;border:1px solid #fff;border-radius:17px;background:transparent!important;font-size:20px;box-shadow:none!important}.slide{width:120px;transform:translateX(calc(var(--step)*68px)) scale(calc(1 - max(var(--step),calc(-1*var(--step)))*.11));opacity:calc(1 - max(var(--step),calc(-1*var(--step)))*.24);z-index:calc(5 - max(var(--step),calc(-1*var(--step))))}.slide.side{transform:translateX(calc(var(--step)*68px)) scale(calc(1 - max(var(--step),calc(-1*var(--step)))*.11));opacity:calc(1 - max(var(--step),calc(-1*var(--step)))*.24)}.card-quantity{position:absolute;top:7px;left:7px;border-radius:50%;background:#fff;color:#7b4142;min-width:25px;line-height:25px;padding:0 4px;font-size:13px;text-shadow:none}.edit-deck{display:block;margin:0 auto;background:none;box-shadow:none;font-size:12px;padding:1px 8px}.balance{font-size:13px;line-height:1.15;margin:9px 0;font-style:italic}.unbalanced{color:#ff666b}.role-panel .row button{font-size:15px;padding:7px}.start{width:64%;margin:25px auto 15px;padding:3px 18px;font-size:28px;border-radius:30px}.start:disabled{opacity:.35}.ready-toggle{display:flex;align-items:center;gap:10px;font-weight:600;font-size:22px;padding:3px 8px 3px 16px;margin:22px auto 0;background:#7b4142}.ready-toggle.checked{background:#c65357}.ready-knob{display:block;width:26px;height:26px;background:#ddd;border-radius:50%;box-shadow:0 2px 5px #0004}.ready-toggle.checked .ready-knob{background:white}[data-room-clock]{text-align:center;font-size:11px;margin:8px}.error{line-height:1.4;text-align:center;margin:10px;font-size:12px}.deck-count{font-size:14px;color:#ddd;font-style:italic}.grid{gap:7px}.group{padding:10px 12px}.group-head{font-size:19px}.badge{top:3px;left:3px;translate:0 0;width:24px;height:24px;line-height:24px}.library-empty{margin:35vh 0;text-align:center}
dialog{max-width:min(calc(100vw - 24px),520px)}.modal-box{border-radius:18px;padding:18px}.roster-modal{background:#7b4142;padding:12px;min-height:60svh;display:flex;flex-direction:column}.roster-title{display:flex;align-items:center;justify-content:space-between}.roster-title h2{font-size:20px;text-align:left;font-weight:400;margin:0}.roster-modal #seat-list{background:#686868;border-radius:18px;padding:15px 8px;flex:1;min-height:43svh}.member{display:flex;align-items:center;gap:6px;margin:8px 0;font-size:14px}.seat-name{flex:1;overflow-wrap:anywhere}.seat-grip{width:15px;height:25px;touch-action:none}.seat-grip svg{width:15px;height:25px}.seat-move{display:flex;gap:2px}.seat-move button{padding:0;width:23px;height:24px;box-shadow:none;background:#ffffff12}.seat-hint{font-size:12px;font-style:italic;text-align:center;margin:8px 0}.roster-modal .pill{font-size:14px;padding:6px}.ready{color:#ff666b}
/* The board stays attached to the viewport while only its rows scroll. */
#app.game-layout #screen{padding:0;max-width:560px;position:relative;height:100svh;min-height:100svh;overflow:hidden}#app.game-layout .sky{opacity:.75}.game-top{padding:25px 20px 0;min-height:0;height:var(--hud-top);position:relative}.game-top h1{font-size:34px;line-height:1;font-weight:400;margin:0}.game-settings{top:18px;right:15px}.phase-label{font-size:16px;line-height:1.1;margin:4px 0 0;color:#ff666b}#app.day .phase-label{color:#444}.countdown{font-size:33px;line-height:1.3;font-weight:600;color:#7b4142;background:none;box-shadow:none;padding:5px 10px;text-shadow:0 3px 4px #0005}.countdown:disabled{opacity:1;cursor:default}.board{position:absolute;inset:var(--hud-top) 0 0;min-height:0;background:var(--panel);padding:0;border-radius:20px 20px 0 0;overflow:visible}.cycle-anchor{position:absolute;bottom:100%;left:50%;width:180px;height:94px;translate:-50% 0;overflow:hidden;pointer-events:none}.cycle-anchor .cycle{position:absolute;width:180px;left:0;bottom:-88px;translate:0 0;z-index:auto;transform:rotate(0deg);transition:transform .9s}.cycle-anchor .cycle.day{transform:rotate(180deg)}.cycle-pin{position:absolute;left:50%;bottom:-14px;translate:-50% 0;background:#686868;width:32px;height:32px;border-radius:50%;box-shadow:0 3px 5px #0005;z-index:2}.board-tools{height:30px;display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:4px 13px 0}.board-tools .icon{width:22px;height:24px;font-size:25px}.board-tools svg{width:20px;height:22px}.board-scroll{padding:0 12px 20px;height:calc(100% - 32px);overflow:auto;overscroll-behavior:contain}.board-head,.player-row{grid-template-columns:40px minmax(95px,1fr) minmax(100px,40%);gap:5px}.board-head{font-size:10px;margin:2px 0 10px;color:#fff9}.board-head span:nth-child(2){text-align:center}.player-row{position:relative;margin:8px 0;min-height:37px}.player-name{border-radius:22px;padding:5px 10px;min-height:35px;text-align:center;font-size:15px;font-weight:400;position:relative;background:#686868}.role-icon{position:relative;z-index:2;width:41px;height:41px;margin-right:-9px}.role-secret{font-size:25px;text-align:center}.self .role-icon{width:49px;height:49px}.self.player-row{margin-top:4px;margin-bottom:14px}.statuses{max-width:100%;height:35px;align-items:center;gap:5px}.statuses img{width:27px;height:30px;flex:0 0 27px;filter:drop-shadow(0 2px 2px #0003)}.target-mark{position:absolute;right:3px;top:4px;width:24px;height:24px;border-radius:50%;background:#fff;color:#7b4142;text-shadow:none;line-height:24px}.day-power-button{position:absolute;right:10px;bottom:8px;font-size:11px;padding:4px 10px;background:#ffffff1a}.command-window{position:absolute;top:115px;left:8px;right:8px;z-index:6;background:#686868;box-shadow:0 8px 15px #0005;border-radius:18px;padding:18px;color:#fff}.ability-command{display:flex;align-items:center;gap:12px;min-height:118px}.ability-command>img{width:95px;height:105px;object-fit:contain;flex:none}.ability-command>div{flex:1;text-align:center;font-size:16px;line-height:1.3}.ability-command strong{display:block;font-size:25px;font-weight:600;line-height:1.15;margin:2px 0 6px}.ability-command p{font-size:14px;margin:3px 0}.command-actions{display:flex;gap:8px;margin-top:12px}.command-actions button{flex:1;padding:5px 8px;font-size:14px}.command-next{display:block;min-width:155px;padding:5px 16px;margin:12px auto 0;background:#bdbdbd;color:white;font-size:15px}.command-modal{background:#686868;padding:24px 18px;color:#fff}.command-modal h2{font-size:23px;font-weight:600}.eye-command{display:flex;align-items:center;gap:18px;min-height:120px}.eye-command>img{width:43%;max-height:120px;object-fit:contain}.eye-command>div{flex:1;text-align:center;font-size:16px;line-height:1.3}.eye-command strong{display:block;color:#ff666b;font-size:30px;font-weight:600;line-height:1.2;margin:2px}.team-call-icon{width:90px;height:100px;object-fit:contain;margin:0 auto 8px}.team-members span{padding:5px 10px;border:1px solid #fff;border-radius:20px;background:#7b4142;text-align:center;box-shadow:0 4px 7px #0004}.command-modal .choices{margin:16px 0}.outcome{background:#7b4142;text-align:center}.outcome.positive{background:#48577b}.outcome h2{font-size:28px;line-height:1.15;font-weight:600;color:#ff666b}.outcome.positive h2{color:#94b0ee}.result-icon{width:110px;height:110px;object-fit:contain;margin:14px auto 5px}.victim-names{display:block;font-size:27px;color:#ff666b}.outcome.positive .victim-names{color:#9bb6f1}.outcome p{margin:8px 0}.delivery{position:fixed;inset:0;background:linear-gradient(135deg,#5e5e5e,#282828);width:100%;max-width:none;margin:0;padding:13svh 15%;z-index:7}.delivery .card{max-width:330px;margin:auto}.delivery h2{font-size:32px;margin-bottom:30px}.game-layout .logo,.game-layout .brand{display:none}.cloud{opacity:.22;width:135vw}.c1{top:3%}.c2{top:63%;opacity:.17}.c3{top:35%;opacity:.11}#app:before{background:linear-gradient(135deg,#686868,#484848 45%,#292929)}
@media(min-width:650px){#app.game-layout #screen{max-width:560px;margin:auto}.cloud{width:90vw}}
@media(max-height:700px){:root{--hud-top:36svh}.command-window{top:90px;padding:12px}.ability-command{min-height:95px}.ability-command>img{height:85px;width:78px}.ability-command strong{font-size:23px}.game-top{padding-top:20px}}
@media(prefers-reduced-motion:reduce){.cloud,.cycle{animation:none!important;transition:none!important}}
.fake-call{opacity:.55}.cycle-anchor{height:90px}.cycle-anchor .cycle{bottom:-90px}.cycle-pin{display:none}.board:before{content:"";position:absolute;top:-16px;left:50%;translate:-50% 0;width:32px;height:32px;border-radius:50%;background:#686868;box-shadow:0 3px 5px #0005;z-index:2;pointer-events:none}.game-top .game-settings{color:inherit}.roster-modal{opacity:1!important}.modal-box.command-modal{opacity:1!important}.cloud.c1{animation-delay:-12s}.cloud.c2{animation-delay:-60s}.cloud.c3{animation-delay:-65s}.preview-label{pointer-events:none}.command-window .ability-command strong{line-height:1.25}
.cloud.c4{top:-18%;width:120vw;opacity:.14;animation-duration:110s;animation-delay:-38s;transform:scaleX(-1)}.cloud.c5{top:20%;width:100vw;opacity:.12;animation-duration:125s;animation-delay:-34s}.cloud.c6{top:55%;width:145vw;opacity:.15;animation-duration:140s;animation-delay:-52s;transform:scaleX(-1)}

/* Second edit: preserve the fixed board, expand controls and correct the cycle halves. */
.edit-deck{font-size:18px;min-height:44px;padding:8px 20px;border:1px solid #fff8;border-radius:25px;margin:5px auto}.role-panel .carousel{height:205px}
.cycle-anchor{width:200px;height:99px}.cycle-anchor .cycle{width:200px;height:200px;max-width:none;bottom:-101px;transform:rotate(180deg);transition:none;filter:none}.cycle-anchor .cycle.day{transform:rotate(0deg)}
.countdown{font-size:46px;line-height:1.15;padding:6px 0}.meeting-next{margin:0 auto;min-width:100px;font-size:15px}.game-top:has(.meeting-next:not([hidden])) .countdown{font-size:42px}
.game-top:has(+.command-window) .phase-label{font-size:15px}.game-top:has(~.board .vote-window) .phase-label{font-size:46px}.game-layout:has(.vote-modal) .phase-label{font-size:46px}
.ability-command{display:grid;grid-template-columns:78px minmax(0,1fr);align-items:center;text-align:center;gap:10px;min-height:105px}.ability-command>img{width:78px;height:90px;margin:auto}.ability-command>div{text-align:center}.ability-command p{font-size:16px}.ability-result{display:block}.ability-result>img{width:96px;height:96px}.ability-result-text{font-size:26px!important;line-height:1.4;margin:12px 0!important}.initial-knowledge,.wolf-victims{text-align:center;line-height:1.5;font-size:16px}.initial-knowledge{max-height:20svh;overflow:auto}.nm-tasks{max-height:30svh;overflow:auto;text-align:center}.nm-tasks h2{margin-bottom:8px;font-size:20px}.nm-tasks .task-button{min-height:44px}.power-badge{position:absolute;right:-3px;top:-3px;width:20px;height:20px;background:white;color:#7b4142;line-height:20px;border-radius:50%;font-size:14px;text-shadow:none}.team-icon{display:block}.outcome>img:not(.result-icon){width:100px;height:100px;object-fit:contain;margin:10px auto}.reveal-text{font-size:24px;line-height:1.5}.wait-host{margin:15px 0 0;font-size:14px}
.vote-modal{text-align:center;background:#686868}.vote-modal h2{font-size:32px}.vote-modal [data-vote-progress]{font-size:18px;margin:8px 0}.vote-modal .choices{grid-template-columns:repeat(2,minmax(0,1fr))}.vote-modal .choices button{width:100%;min-height:44px}.target-count{display:block;margin-top:5px}.confirm-count{display:flex;align-items:center;justify-content:center;gap:18px;margin:12px 0}.confirm-count button,.vote-row button{width:44px;height:44px;padding:0;font-size:24px;box-shadow:none}.confirm-count strong{font-size:24px}.vote-row{display:grid;grid-template-columns:minmax(0,1fr) 44px 28px 44px;gap:5px;align-items:center;margin:8px 0}.vote-row>span{text-align:left;overflow-wrap:anywhere}.nun-hint{font-size:14px;color:#eee;margin-top:15px}.vote-modal .actions{flex-wrap:wrap}.vote-modal .actions button{font-size:15px;min-height:44px;padding:8px}.preset{margin-top:16px}.preset-head small{display:block}.preset-head>button{min-height:44px}.preset-details{padding-top:12px}.preset-details .grid{grid-template-columns:repeat(4,minmax(0,1fr))}.edit-info{margin-bottom:12px;font-size:14px}.library-empty{margin:20svh 0}
@media(max-height:700px){.countdown{font-size:40px}.cycle-anchor{width:170px;height:84px}.cycle-anchor .cycle{width:170px;height:170px;bottom:-86px}.command-window .ability-command>img{width:62px;height:72px}.command-window .ability-command{grid-template-columns:62px minmax(0,1fr);min-height:80px}.nm-tasks{max-height:30svh}}

.game-top .phase-label.vote-phase{font-size:46px;font-weight:600;line-height:1.15}

:root{--meeting-size:46px}.countdown,.game-top .phase-label.vote-phase,.game-top:has(.meeting-next:not([hidden])) .countdown{font-size:var(--meeting-size)}@media(max-height:700px){:root{--meeting-size:40px}}
.nm-night-hint{text-align:center;color:#f2d7d8;font-size:16px;margin:8px 0}.settings-modes{display:flex;gap:10px;margin-bottom:20px}.settings-modes button{flex:1}.settings-modes .selected{background:#c65356}#ghost{display:grid;gap:10px}#ghost input{margin-top:8px}.nm-night-hint+.nm-tasks{margin-top:0}

/* Third edit: separate selection/confirmation and visible phase transitions. */
.time-inputs{display:flex;align-items:center;gap:5px;flex:none}.setting .time-inputs input{width:48px;min-width:0;text-align:center;padding:6px 2px;font-variant-numeric:tabular-nums}.time-inputs input::-webkit-inner-spin-button{appearance:none}
.phase-transition,.command-modal{text-align:center}.phase-graphic{display:block;width:100px;height:100px;margin:5px auto 20px}.phase-graphic.sun{color:#ff666b}.phase-graphic.moon{color:#ff666b}.phase-transition h2{font-size:28px}.transition-deaths{font-size:18px}
.ability-command strong{font-size:29px!important;line-height:1.25;color:#ff666b!important;text-shadow:0 2px 3px #0005}.ability-command>div{text-align:center;align-self:center}.command-window:has(.ability-command){text-align:center}.signal-instruction{color:#ff666b}
.vote-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}.vote-chip-row{display:flex;align-items:center;gap:4px;min-width:0}.vote-chip{display:flex;align-items:center;justify-content:center;gap:6px;position:relative;min-height:44px;width:100%;min-width:0;border-radius:24px;background:#914344;border:2px solid transparent;padding:7px 8px;font-size:15px}.vote-chip.selected{border-color:white}.vote-chip>span:last-child{overflow-wrap:anywhere}.vote-number{display:flex;align-items:center;justify-content:center;flex:0 0 29px;width:29px;height:29px;border-radius:50%;background:#fff;color:#914344;text-shadow:none;font-size:18px;font-weight:600;font-variant-numeric:tabular-nums}.vote-chip:not(.selected) .vote-number:empty{display:none}.vote-remove{flex:0 0 27px;width:27px;height:34px;padding:0;font-size:22px;border-radius:18px;background:#888;box-shadow:none}.confirmation-actions{display:flex;align-items:center;gap:8px;margin:18px 0}.confirmation-window .vote-chip-row{justify-content:center}.confirmation-window .vote-chips:has(.vote-chip-row:only-child){grid-template-columns:1fr}.confirmation-window [data-action=confirmed-target]{opacity:1}.outcome.neutral{background:#686868}.outcome.neutral h2,.outcome.neutral .victim-names{color:#fff}.outcome.neutral>img{width:86px;height:86px;object-fit:contain}
.game-top .phase-countdown{font-size:26px;line-height:1.1;padding:4px 0}.game-top:has(.phase-countdown)+.nm-tasks{top:120px;max-height:calc(var(--hud-top) - 130px);padding:8px}.game-top:has(.phase-countdown)+.nm-tasks h2{font-size:18px;line-height:1.3;margin:0 0 3px}.game-top:has(.phase-countdown)+.nm-tasks .nm-night-hint{font-size:14px;line-height:1.4;margin:3px 0}.game-top:has(.phase-countdown)+.nm-tasks .task-button{font-size:14px;min-height:40px;padding:4px 8px;margin:3px 0}
@media(max-width:370px){.vote-chips{gap:8px 6px}.vote-chip{font-size:14px;padding:6px}.vote-number{flex-basis:25px;width:25px;height:25px;font-size:16px}.vote-remove{flex-basis:24px;width:24px}}

.ability-command:not(.ability-result){grid-template-columns:50px minmax(0,1fr) 50px;gap:8px}.ability-command:not(.ability-result)>img{width:50px;height:60px}.ability-command:not(.ability-result)>div{grid-column:2;text-align:center}

@media(max-height:700px){.game-top:has(.phase-countdown)+.nm-tasks{top:110px;max-height:calc(var(--hud-top) - 120px)}.game-top:has(.phase-countdown)+.nm-tasks h2{margin-bottom:1px}.game-top:has(.phase-countdown)+.nm-tasks .task-button{margin:1px 0}}

/* NM selects ability targets on the same board as WM. */
#app.game-layout:has(.nm-tasks){--hud-top:max(40svh,310px)}
.nm-tasks .nm-power-title,.nm-tasks .nm-target-hint{font-size:14px;line-height:1.35;margin:4px 0}
.nm-tasks .command-actions{margin-top:6px}.nm-tasks .command-actions button{min-height:36px}
.nm-power-switches{display:flex;gap:5px;flex-wrap:wrap}.nm-power-switches .task-button{flex:1;font-size:12px!important;min-height:30px!important}.nm-power-switches .selected{outline:1px solid white;background:#914344}
.player-name[aria-pressed=true]{outline:2px solid white}.player-name[disabled]{opacity:.5}

/* Fourth edit: clear hierarchy, red emphasis and consistent role reveal cards. */
.modal-box.command-modal{padding:24px 20px}.command-modal h2{font-size:28px;line-height:1.25;margin-bottom:16px}.command-modal p{font-size:18px;line-height:1.5;margin:10px 0}.command-modal .important,.signal-instruction,.death-line strong,.intro-role-name{color:#ff666b;font-weight:600}.command-modal .command-next{font-size:17px;min-height:42px;margin-top:18px}.command-modal .ability-command p{font-size:17px;line-height:1.45}.death-line{font-size:25px!important;line-height:1.5;margin:12px 0!important}.intro-role-card{width:min(220px,45svh);height:auto;margin:0 auto 14px;border-radius:14px}.intro-role-name{display:block;font-size:25px}.inspected-role-card{width:160px;max-height:35svh;object-fit:contain;margin:18px auto 0}.winner-list{list-style:none;padding:0;margin:18px 0}.winner-list li{display:flex;align-items:center;gap:12px;text-align:left;border-radius:16px;padding:10px;background:#ffffff0d;margin:8px 0}.winner-list img{width:44px;height:50px;object-fit:contain}.winner-list strong{font-size:22px;display:block;color:#ff666b}.winner-list span{display:block;font-size:17px}.ghost-reminder form{display:grid;gap:12px}.role-intro h2{font-size:32px}.phase-graphic.sun,.phase-graphic.moon{color:#ff666b}
@media(max-height:700px){.modal-box.command-modal{padding:18px 16px}.intro-role-card{width:180px;max-height:42svh;object-fit:contain}.command-modal h2{font-size:26px}.command-modal p{font-size:17px}.command-modal .command-next{margin-top:12px}}

.ability-command .important{display:inline;font-size:inherit!important;line-height:inherit;margin:0;text-shadow:none}

/* Latest role themes use catalog colors; highlights are brightened for contrast. */
.role-theme{--role-color:#686868;--role-light:#ffaaaa}.role-colored,.outcome.role-colored{background:var(--role-color)!important}.role-theme .important,.role-colored h2,.role-colored .victim-names,.role-colored .reveal-text strong,.role-colored .winner-list strong,.role-theme .ability-command strong{color:var(--role-light)!important}.role-theme .ability-command .important{color:var(--role-light)!important}.role-theme p{line-height:1.5}.role-history{display:flex;align-items:center;justify-content:center;gap:3px}.role-history>img{width:30px;height:36px;object-fit:contain;flex-shrink:0}.role-history .old-role{filter:brightness(.55) drop-shadow(0 2px 2px #0007)}.role-icon:has(.old-role){width:58px;margin-left:-5px}.self .role-icon:has(.old-role){width:62px}.winner-list .role-history{flex:0 0 auto}.manual-vote{padding:16px 6px;text-align:center;background:#ffffff0b;border-radius:16px;margin:6px 0 18px}.manual-vote .vote-title{font-size:24px}.manual-vote p{font-size:14px}.manual-vote .vote-chips{margin:12px 0}.manual-vote .command-next{background:#c65356}.mod-instruction{font-size:17px!important;line-height:1.5!important}.pack-selections{font-size:14px;line-height:1.5}.fake-call{opacity:1}.role-theme .inspected-role-card{max-height:27svh}.reaction-window .choices{grid-template-columns:repeat(2,minmax(0,1fr))}.role-colored .important{color:var(--role-light)!important}

.nm-tasks .command-actions{position:sticky;bottom:-12px;background:#686868;padding:8px 0 3px;z-index:1}.night-queue-label{font-size:16px;font-weight:600;color:#fff}.winner-list li{border-left:3px solid var(--role-light)}

.pack-vote-count{position:absolute;left:5px;top:50%;transform:translateY(-50%);min-width:24px;height:24px;padding:0 4px;border-radius:50%;background:#c65356;color:white;font-size:15px;font-weight:600;line-height:24px;text-shadow:none}.player-name.has-pack-votes{padding-left:32px;padding-right:32px}

.closeup [data-action=close-preview]{display:block;margin:12px auto 0;background:#c65356;color:#fff;min-width:120px}.command-modal.role-colored>img{display:block;width:100px;height:100px;object-fit:contain;margin:16px auto}

.bot-controls{flex-wrap:wrap}.bot-controls .test-role-button{border:1px solid #ff7279}.test-role-hint{font-size:12px;text-align:right;margin:8px 0 0}.test-role-hint strong{color:#ff7279}.test-role-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0;max-height:55svh;overflow:auto}.test-role-choices button{display:flex;align-items:center;gap:8px;text-align:left;font-size:15px;padding:10px}.test-role-choices button:first-child{grid-column:1/-1;justify-content:center}.test-role-choices img{width:34px;height:38px;object-fit:contain}.test-role-choices .selected{background:#b83a48;border:1px solid #ff7279}
/* Atmosphere and interaction motion. Keep the board and game data untouched. */
:root{--h2n-ease:cubic-bezier(.18,.7,.22,1)}
html,.board-scroll{scroll-behavior:smooth}
button:not(:disabled){transition:background-color .2s var(--h2n-ease),box-shadow .2s var(--h2n-ease),filter .2s var(--h2n-ease),transform .16s var(--h2n-ease)}
@media(hover:hover){button:not(:disabled):hover{filter:brightness(1.12);box-shadow:0 10px 22px #0007,0 0 0 1px #fff3}button.card:hover,button.slide:hover,button.icon:hover{filter:brightness(1.16);box-shadow:none}button.card:hover img{transform:translateY(-3px) scale(1.015)}}
button:not(:disabled):active{transform:scale(.96);filter:brightness(1.2)}
button.card img{transition:transform .2s var(--h2n-ease)}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #ffb6b8;outline-offset:3px}
.group,.panel,.preset{transition:box-shadow .25s var(--h2n-ease),background-color .25s var(--h2n-ease)}
.group:focus-within,.panel:focus-within,.preset:focus-within{box-shadow:0 12px 25px #0006,0 0 0 1px #ffb6b855}
dialog[open]{animation:h2n-dialog-in .3s var(--h2n-ease) both}
dialog[open]::backdrop{animation:h2n-backdrop-in .3s ease-out both}
@keyframes h2n-dialog-in{from{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes h2n-backdrop-in{from{background:#0000}to{background:#0009}}
.modal-box{box-shadow:0 22px 65px #000b,0 0 0 1px #fff2}
#toast.show{animation:h2n-toast-in .25s var(--h2n-ease) both}
@keyframes h2n-toast-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
.player-name.selected,.player-name[aria-pressed=true],.vote-chip.selected,.test-role-choices .selected{box-shadow:0 0 0 2px #ffc8ca,0 0 16px #d04e5a66}
.command-modal.phase-transition{animation:h2n-event-in .4s var(--h2n-ease) both}
@keyframes h2n-event-in{from{opacity:.45;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.outcome.negative h2,.death-line strong{text-shadow:0 0 13px #f35c6799}
@supports(animation-timeline:view()){#app:not(.game-layout) .group,#app:not(.game-layout) .preset{animation:h2n-scroll-reveal linear both;animation-timeline:view();animation-range:entry 0% entry 25%}@keyframes h2n-scroll-reveal{from{opacity:.45;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}}
@media(max-width:600px){dialog{max-width:min(94vw,520px);max-height:88svh}.modal-box{max-height:88svh;overflow-y:auto;overscroll-behavior:contain}button{min-height:40px}.icon,.minus,.seat-move button{min-height:36px}}
@media(prefers-reduced-motion:reduce){html,#screen{scroll-behavior:auto!important}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}dialog[open],.command-window:has(.ability-command),.command-modal.phase-transition{animation:none!important}}

/* Larger readable controls and denser use of the available mobile space. */
#screen{padding-inline:clamp(14px,4vw,24px)}
.top{grid-template-columns:44px minmax(0,1fr) 44px;gap:10px;margin-bottom:20px}
.top h1{font-size:clamp(27px,7vw,34px);line-height:1.2;overflow-wrap:anywhere}
.top .icon,.top .back{width:44px;height:44px}
.top .icon svg,.top .icon img{width:32px;height:32px;margin:auto}
.panel{padding:clamp(16px,4vw,22px)}
.panel h2,.preset-head{font-size:clamp(20px,5.5vw,25px)}
.roster-toggle{height:auto;min-height:48px;font-size:clamp(16px,4.2vw,18px);padding:8px 15px}
.roster-toggle svg{width:30px;height:30px;flex:none}
.bot-controls button{font-size:14px;min-height:40px;padding:7px 12px}
.edit-deck,.carousel+.pill{font-size:clamp(15px,4vw,18px);min-height:44px;padding:8px 14px}
.balance{font-size:clamp(15px,4vw,18px);line-height:1.35}
[data-room-clock],.error,.muted,.test-role-hint{font-size:clamp(14px,3.8vw,16px);line-height:1.45}
.role-panel .row{flex-wrap:wrap}
.role-panel .row button{font-size:clamp(15px,4vw,18px);min-height:48px}
.start{width:min(82%,320px);min-height:56px;padding:8px 18px}
.group-head{font-size:clamp(20px,5.5vw,24px);min-height:46px}
.search{font-size:16px;min-height:44px}
.preset-head{flex-wrap:wrap}
.preset-head button{font-size:16px;min-height:44px}
.setting{font-size:clamp(15px,4vw,17px);min-height:52px;flex-wrap:wrap}
.setting input,.setting select{min-height:38px}
.rules,.journal{font-size:16px}
.rules summary,.journal summary{font-size:18px}
.modal-box{width:100%;padding:clamp(20px,5vw,30px);border-radius:24px}
.modal-box h2{font-size:clamp(24px,6.5vw,32px);line-height:1.25}
.modal-box p,.modal-box label{font-size:clamp(16px,4.5vw,19px);line-height:1.45}
.modal-box .actions{flex-wrap:wrap}
.modal-box .actions button,.modal-box .choice button,.modal-box .choices button{min-height:48px;font-size:clamp(16px,4vw,18px)}
.modal-box .choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.modal-box .choices button{padding:10px 8px}
.phase-graphic{width:clamp(110px,33vw,150px);height:clamp(110px,33vw,150px)}
.team-call-icon,.result-icon{width:clamp(112px,32vw,145px);height:clamp(112px,32vw,145px)}
.modal-box.command-modal{padding:clamp(20px,5vw,30px)}
.command-modal .command-next{min-height:50px;font-size:18px}
.game-top h1{font-size:clamp(36px,9vw,46px)}
.game-top .phase-label{font-size:clamp(19px,5vw,24px);line-height:1.2}
.game-top .game-settings{width:44px;height:44px}
.board-tools{height:48px;padding:5px 14px}
.board-tools .icon{width:40px;height:40px;font-size:28px}
.board-tools svg{width:30px;height:30px}
.board-scroll{height:calc(100% - 50px);padding:0 14px 22px}
.board-head,.player-row{grid-template-columns:52px minmax(0,1fr) minmax(94px,34%);gap:8px}
.board-head{font-size:clamp(13px,3.4vw,15px);margin:3px 0 12px}
.player-row{min-height:52px;margin:9px 0}
.player-name{min-height:46px;font-size:clamp(16px,4.1vw,19px);line-height:1.25;padding:9px 8px;display:flex;align-items:center;justify-content:center}
.role-icon{width:50px;height:50px;margin-right:0}
.self .role-icon{width:55px;height:55px}
.role-icon:has(.old-role){width:55px;margin-left:0}
.self .role-icon:has(.old-role){width:58px}
.role-history>img{width:35px;height:42px}
.statuses{height:46px;gap:5px}
.statuses img{width:34px;height:38px;flex:0 0 34px}
.role-secret{font-size:30px}
.command-window{left:12px;right:12px;padding:18px;box-shadow:0 18px 42px #0009}
.command-window .ability-command p{font-size:18px}
.command-window .command-actions button,.nm-tasks .command-actions button{font-size:16px;min-height:44px}
.nm-tasks .nm-power-title,.nm-tasks .nm-target-hint{font-size:16px;line-height:1.4}
.nm-power-switches .task-button{font-size:14px!important;min-height:40px!important}
.test-role-choices button{font-size:16px;min-height:50px}
.test-role-choices img{width:42px;height:46px}
#toast{font-size:16px;line-height:1.4}
@media(max-width:370px){.board-head,.player-row{grid-template-columns:46px minmax(0,1fr) minmax(86px,32%);gap:5px}.role-icon{width:46px;height:46px}.statuses img{width:30px;height:34px;flex-basis:30px}.player-name{font-size:15px}.board-scroll{padding-inline:9px}.modal-box .choices{gap:7px}}
@media(max-height:700px){.game-top h1{font-size:34px}.game-top .phase-label{font-size:18px}.command-window{padding:12px}.modal-box{padding:18px}.phase-graphic{width:100px;height:100px}}
/* One entrance for the whole window; content changes animate only when the window is already open. */
.modal-box,.closeup{animation:none}
dialog[open]{animation:h2n-dialog-in .38s cubic-bezier(.18,.75,.2,1) both}
dialog[open]::backdrop{animation:h2n-backdrop-in .38s ease-out both}
@media(prefers-reduced-motion:reduce){dialog[open],dialog[open]::backdrop{animation:none!important}}

/* Countdown, called ability artwork, and role icons in the player list. */
:root{--meeting-size:clamp(48px,12vw,60px)}
.game-top .phase-countdown{font-size:clamp(44px,12vw,58px);line-height:1.05;font-variant-numeric:tabular-nums;min-width:150px;margin:8px auto 0;padding:4px 12px}
.game-top:has(.phase-countdown)+.nm-tasks{top:clamp(145px,19svh,175px);max-height:calc(var(--hud-top) - clamp(155px,20svh,185px))}
.board-head,.player-row{grid-template-columns:62px minmax(0,1fr) minmax(88px,30%)}
.role-icon,.self .role-icon{width:58px;height:58px}
.role-icon:has(.old-role),.self .role-icon:has(.old-role){width:62px;height:58px}
.role-history{width:100%;max-width:100%;justify-content:flex-start;overflow-x:auto;scrollbar-width:none}
.role-history::-webkit-scrollbar{display:none}
.role-history>img{width:31px;height:43px;flex:0 0 31px}
.self .role-history>img:only-child,.role-history>img:only-child{width:52px;height:54px;flex-basis:52px}
.player-row{min-height:60px}
.statuses{max-width:100%;min-width:0;overflow-x:auto}
.command-window .ability-command:not(.ability-result){grid-template-columns:72px minmax(0,1fr) 72px;min-height:118px;gap:10px}
.command-window .ability-command:not(.ability-result)>img{width:72px;height:82px}
.command-window .ability-command strong{font-size:clamp(24px,6vw,31px)!important}
.command-window .ability-result>img{width:118px;height:118px}
.eye-command>img{width:clamp(110px,38%,160px);max-height:160px}
@media(max-width:370px){.board-head,.player-row{grid-template-columns:52px minmax(0,1fr) minmax(80px,28%);gap:5px}.role-icon,.self .role-icon{width:50px;height:50px}.role-icon:has(.old-role),.self .role-icon:has(.old-role){width:52px;height:50px}.role-history>img{width:26px;height:38px;flex-basis:26px}.role-history>img:only-child{width:47px;height:48px;flex-basis:47px}.game-top .phase-countdown{font-size:38px}.command-window .ability-command:not(.ability-result){grid-template-columns:58px minmax(0,1fr) 58px}.command-window .ability-command:not(.ability-result)>img{width:58px;height:68px}}
@media(max-height:700px){:root{--meeting-size:42px}.game-top .phase-countdown{font-size:36px;margin-top:4px}.game-top:has(.phase-countdown)+.nm-tasks{top:138px;max-height:calc(var(--hud-top) - 148px)}}

/* Day and night atmosphere: crossfade the sky while the visible cycle turns left. */
#app:before,#app.day:before{background:radial-gradient(ellipse at 50% 8%,#66636b 0%,#45424a 48%,#24232a 100%)}
#app:after{content:"";position:fixed;inset:0;z-index:-3;pointer-events:none;background:radial-gradient(ellipse at 50% 6%,#fff 0%,#fbfbfb 52%,#f3f3f3 100%);opacity:0;transition:opacity 1.25s cubic-bezier(.22,.62,.17,1)}
#app.day:after{opacity:1}
#app.game-layout .sky{transition:opacity 1.25s cubic-bezier(.22,.62,.17,1)}
#app.game-layout.day .sky{opacity:.2}
#app{transition:color .65s ease}
#app.game-layout .cycle-anchor{filter:drop-shadow(0 8px 12px #0009) drop-shadow(0 0 8px #df7a7659)}
#app.game-layout .cycle-anchor .cycle,#app.game-layout .cycle-anchor .cycle.day{transform:rotate(var(--cycle-angle,0deg));filter:drop-shadow(0 3px 6px #0007);transition:none}
@media(prefers-reduced-motion:reduce){#app:after,#app{transition:none!important}}

/* Keep the cycle's shadow above the platform edge. */
#app.game-layout .cycle-anchor{
 filter:drop-shadow(0 -4px 6px #0005);
 clip-path:inset(-18px -18px 0 -18px);
}
#app.game-layout .cycle-anchor .cycle,
#app.game-layout .cycle-anchor .cycle.day{filter:none}

/* Victory rows: the roster icon uses only its own column, leaving room for text. */
.winner-list{width:100%;min-width:0}
.winner-list li{width:100%;min-width:0;max-width:100%;overflow:hidden}
.winner-list .role-history{width:auto;max-width:86px;flex:0 0 auto}
.winner-list li>div{min-width:0;flex:1 1 auto;overflow-wrap:anywhere}
.winner-list li strong,.winner-list li span{max-width:100%;white-space:normal;overflow-wrap:anywhere}

/* Keep lower target rows in place on selection and center the selection mark. */
.board-scroll{scroll-behavior:auto}
.player-name.selected{padding-right:40px}
.player-name .target-mark{top:50%;right:8px;transform:translateY(-50%);display:grid;place-items:center;width:28px;height:28px;line-height:1;font-size:21px}

/* Keep the Home logo centered by layout while its size and vertical position animate. */
#app .logo{left:0;right:0;margin-inline:auto;translate:none;transform:none}
#app:not([data-view=splash]):not([data-view=home]) .logo{transform:translateY(-90svh)}

/* Keep every panel scrollable without showing a scrollbar over the game art. */
html,body,#app,#modal,#modal-content,#app * ,#modal *{scrollbar-width:none}
html::-webkit-scrollbar,body::-webkit-scrollbar,#app::-webkit-scrollbar,#modal::-webkit-scrollbar,#modal-content::-webkit-scrollbar,#app *::-webkit-scrollbar,#modal *::-webkit-scrollbar{display:none}

/* Readable role accents and natural sentence wrapping in WM windows. */
.command-window .role-theme .mod-instruction,.command-window .role-theme .ability-command strong,.command-modal.role-colored .mod-instruction,.command-modal.role-colored .ability-command strong,.command-modal.role-colored .ability-result-text,.command-modal.role-colored .reveal-text strong,.command-modal.role-colored .death-line strong,.command-modal.role-colored .victim-names,.winner-list li strong,.winner-list li span{color:var(--role-light)!important}
.command-window .role-theme p,.command-modal p,.command-modal h2,.command-modal .ability-command>div,.winner-list li>div{text-wrap:pretty;line-break:loose;overflow-wrap:break-word}

/* Forest sits at the bottom of the scenery and never takes pointer input. */
.sky::after{content:"";position:absolute;inset:auto 0 0;height:min(37svh,360px);background:url(assets/forest.png) center bottom/cover no-repeat;pointer-events:none}
#app.game-layout .sky::after{content:none}
#app.game-layout .board{background-color:var(--panel);background-image:url(assets/forest.png);background-position:center bottom;background-size:100% auto;background-repeat:no-repeat}
#app.game-layout .board::before{content:none}
#app.game-layout .board-tools,#app.game-layout .board-scroll{position:relative;z-index:1}
#app.game-layout .cycle-anchor{z-index:2}

.pack-caption{font-size:14px;text-align:center;color:#fff;margin:0;text-shadow:0 2px 4px #0009}.pack-switch{display:block;color:#ff9398;text-align:center;font-size:14px;padding:6px;text-decoration:underline;text-underline-offset:4px}.home-actions{padding-top:41svh;gap:13px}

/* Show every role in Beginner; a light shadow marks roles available in Advance. */
.card-wrap.pack-locked .card:disabled{opacity:1;cursor:not-allowed}.card-wrap.pack-locked::after{content:"";position:absolute;inset:0;background:rgba(0,0,0,.24);border-radius:12px;pointer-events:none}.card-lock{position:absolute;right:7px;bottom:7px;z-index:1;width:25px;height:25px;display:grid;place-items:center;background:#2229;border:1px solid #ffffff55;border-radius:8px;pointer-events:none}.card-lock svg{width:17px;height:17px;fill:none;stroke:#fff;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* Reserve thumbnail space and keep decoded images/effects bounded while scrolling. */
.card img{width:100%;height:auto;aspect-ratio:320/453}.slide img{height:auto;aspect-ratio:320/453}.card-wrap{contain:layout style}.card img,.slide img{filter:none;box-shadow:0 5px 5px #0004}
#connection-state{position:fixed;z-index:100;top:max(8px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);max-width:92vw;padding:7px 14px;border-radius:14px;background:#292929ed;color:#fff;font-size:13px;text-align:center;box-shadow:0 3px 12px #0005;pointer-events:none}
