/* Moonlit Werewolf: lobby, private actions, and compact table layout. */
.werewolf-shell{width:100%!important;max-width:1010px}.werewolf-seat:before{z-index:0}.werewolf-seat>*{position:relative;z-index:1}
.werewolf-feature .game-art{background:#111824}.werewolf-art{isolation:isolate;background:radial-gradient(circle at 68% 30%,#f6e7b5 0 11%,#d5c687 12%,#6f6680 13%,transparent 31%),linear-gradient(152deg,#1e3147,#172033 50%,#100f1f)}.werewolf-art:before{content:'';position:absolute;inset:0;z-index:-1;opacity:.5;background:repeating-linear-gradient(103deg,transparent 0 11%,#b1bad31a 12% 13%,transparent 14% 23%);animation:werewolf-mist 9s linear infinite}.werewolf-moon{position:absolute;width:126px;height:126px;right:16%;top:20px;border-radius:50%;background:#f7e9be;box-shadow:0 0 20px #f4dfa9,0 0 60px #a8c9ff66;animation:werewolf-moon 3.8s ease-in-out infinite}.werewolf-moon:after{content:'';position:absolute;width:27px;height:27px;left:22px;top:31px;border-radius:50%;background:#d3c48e8c;box-shadow:43px 23px #d3c48e70,66px 56px #d3c48e7a}.werewolf-silhouette{position:absolute;z-index:1;left:20%;bottom:19px;width:180px;height:125px}.werewolf-silhouette i{position:absolute;bottom:0;width:42px;height:98px;background:#0b1020;clip-path:polygon(50% 0,71% 25%,88% 22%,83% 39%,100% 59%,70% 100%,30% 100%,0 59%,17% 39%,12% 22%,29% 25%);filter:drop-shadow(0 0 9px #77a8ff9c);animation:werewolf-howling 2.5s ease-in-out infinite}.werewolf-silhouette i:nth-child(1){left:0;height:75px;animation-delay:.4s}.werewolf-silhouette i:nth-child(2){left:38px}.werewolf-silhouette i:nth-child(3){left:83px;height:67px;animation-delay:.8s}.werewolf-silhouette i:nth-child(4){left:123px;height:82px;animation-delay:1.2s}
.werewolf-shell{width:min(1010px,calc(100vw - 44px));margin:0 auto;padding:8px 0 3px;color:#e8edf3}.game-modal:has(.werewolf-shell){width:min(1090px,calc(100vw - 36px));padding:28px 34px;background:#101722;border-color:#3b4b5e}.werewolf-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:0 4px 19px;border-bottom:1px solid #334252}.werewolf-head h2{margin:3px 0 2px;font:800 28px var(--display);color:#f2e7c6}.werewolf-head span{color:#98a9bb;font-size:11px}.werewolf-head>svg{width:48px;height:48px;color:#f3d67a;filter:drop-shadow(0 0 11px #f4d6738f)}.werewolf-timer{display:flex;align-items:center;gap:8px;color:#f5dc85}.werewolf-timer svg{width:18px}.werewolf-timer strong{font:800 23px var(--display)}
.werewolf-lobby-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:14px;margin-top:17px}.werewolf-panel{display:grid;align-content:start;gap:14px;padding:18px;border:1px solid #354555;background:#172230}.werewolf-panel label{display:grid;gap:7px;color:#c5d0d9;font-size:12px}.werewolf-panel select,.werewolf-panel input:not([type="checkbox"]){height:39px;border:1px solid #405264;background:#0d141d;color:#f0f5f7;padding:0 11px;font:600 13px var(--font)}.werewolf-panel-title{display:flex;align-items:center;gap:10px}.werewolf-panel-title>svg{width:25px;color:#f3d67a}.werewolf-panel-title span{display:grid;gap:3px}.werewolf-panel-title small{font:700 8px var(--display);letter-spacing:1.3px;color:#8597aa}.werewolf-panel-title b{font:800 19px var(--display)}.werewolf-join{background:#141d28}.werewolf-join p{margin:2px 0;color:#95a4b2;font-size:12px;line-height:1.75}.werewolf-win-rule{margin:-5px 0 0;padding:10px 11px;border-left:3px solid #d8b74f;background:#111b27;color:#cbd5dc;font-size:11px;line-height:1.7}.werewolf-field-label{display:flex;justify-content:space-between;color:#c5d0d9;font-size:12px}.werewolf-field-label small{color:#eacb72;font:700 10px var(--display)}
.werewolf-god-choices{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.werewolf-god-choices label{display:block;position:relative}.werewolf-god-choices input{position:absolute;opacity:0}.werewolf-god-choices span{display:block;border:1px solid #415161;background:#101824;padding:8px;text-align:center;color:#aebdca;font:700 11px var(--display);cursor:pointer}.werewolf-god-choices input:checked+span{border-color:#e3c56d;color:#f4e4ad;background:#3a3220}.werewolf-god-choices input:disabled+span{opacity:.48;cursor:not-allowed}.werewolf-toggle{display:flex!important;grid-template-columns:30px auto;align-items:center;gap:9px!important}.werewolf-toggle input{position:absolute;opacity:0}.werewolf-toggle>span{height:17px;border-radius:17px;background:#566470;position:relative}.werewolf-toggle>span:after{content:'';position:absolute;width:13px;height:13px;left:2px;top:2px;border-radius:50%;background:#dce6ea;transition:transform .18s}.werewolf-toggle input:checked+span{background:#d8b74f}.werewolf-toggle input:checked+span:after{transform:translateX(13px)}.werewolf-rule-strip{display:flex;align-items:center;gap:8px;margin:14px 0 0;color:#99a8b5;font-size:11px}.werewolf-rule-strip svg{width:16px;color:#75d5b1}
.werewolf-table{margin-top:16px;border:1px solid #354555;background:#151f2b}.werewolf-room-meta{display:flex;flex-wrap:wrap;gap:9px 19px;padding:11px 14px;border-bottom:1px solid #334250;color:#a8b6c3;font-size:10px}.werewolf-room-meta span{display:flex;align-items:center;gap:5px}.werewolf-room-meta svg{width:13px;color:#e6cd79}.werewolf-room-meta b{color:#f2e5bd;font:800 12px var(--display);letter-spacing:1px}.werewolf-seat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:13px}.werewolf-seat{position:relative;min-height:58px;display:flex;align-items:center;gap:8px;padding:7px 8px 7px 10px;border:1px solid #3a4a5a;background:#1b2734;overflow:hidden}.werewolf-seat:before{content:'';position:absolute;inset:0 0 0 3px;background:#6e88a3}.werewolf-seat.me:before{background:#e2c467}.werewolf-seat.dead{filter:grayscale(.9);opacity:.62}.werewolf-seat.vacant{border-style:dashed;background:#131c27;color:#6f8191}.werewolf-seat.vacant>svg{width:20px}.werewolf-seat-num{position:relative;z-index:1;width:22px;color:#cbd8e0;font:800 17px var(--display);text-align:center}.werewolf-seat img{width:34px;height:34px;object-fit:cover;border-radius:50%;background:#0b1219}.werewolf-seat>div:not(.werewolf-seat-num){display:grid;min-width:0;gap:2px}.werewolf-seat b{overflow:hidden;color:#e9eef2;font:700 11px var(--font);text-overflow:ellipsis;white-space:nowrap}.werewolf-seat small{color:#91a0ae;font-size:9px}.werewolf-seat>svg{position:absolute;right:7px;top:6px;width:14px;color:#ffd761}.werewolf-lobby-actions{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:0 14px 14px;color:#9aaabb;font-size:11px}
.werewolf-phase{display:grid;grid-template-columns:180px minmax(0,1fr);gap:1px;border-top:1px solid #344351;background:#344351}.werewolf-role{display:grid;align-content:center;justify-items:start;gap:2px;min-height:122px;padding:17px;background:#121b26}.werewolf-role>svg{width:22px;color:#e1c875}.werewolf-role span{color:#8d9cab;font-size:9px}.werewolf-role b{font:800 19px var(--display);color:#f5e8bb}.werewolf-role small{color:#af7f85;font-size:9px}.werewolf-action{display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:122px;padding:16px;background:#182433}.werewolf-action>div:first-child{display:flex;align-items:center;gap:11px}.werewolf-action>div:first-child>svg{width:24px;color:#e6cd77}.werewolf-action small{display:block;margin-bottom:4px;color:#96a8b9;font:700 9px var(--display);letter-spacing:.6px}.werewolf-action b{display:block;color:#edf3f5;font-size:12px;line-height:1.6}.werewolf-action.wait{justify-content:flex-start}.werewolf-action.wait>svg{width:25px;color:#8191a1}.werewolf-action.wait span{display:block;margin-top:5px;color:#8fa0af;font-size:10px}.werewolf-action.identity{background:linear-gradient(115deg,#1b2e3d,#2e281d)}.werewolf-action.identity>svg{width:35px;color:#f5dc81}.werewolf-action-buttons{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.werewolf-target-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:11px}.target-action{display:block}.target-action>div:first-child{display:flex}.werewolf-target{display:flex;align-items:center;gap:6px;min-width:68px;padding:6px 8px;border:1px solid #45596b;background:#101a24;color:#dce8ef}.werewolf-target b{display:grid;place-items:center;width:18px;height:18px;background:#d9bd68;color:#131820;font:800 11px var(--display)}.werewolf-target span{font-size:10px}.werewolf-target:hover{border-color:#f1d875;background:#233243}.werewolf-skip{margin-top:10px;padding:0;border:0;background:transparent;color:#9cacb8;font-size:10px;text-decoration:underline}.werewolf-seer-result{display:block;margin-top:6px;color:#6be0b2;font:800 12px var(--display)}.werewolf-empty-target{color:#9cabb7;font-size:11px}
.werewolf-log{margin-top:14px;border-left:3px solid #cba952;background:#121b25}.werewolf-log header{display:flex;justify-content:space-between;align-items:center;min-height:36px;padding:0 13px;border-bottom:1px solid #2f4050;color:#d5e0e6;font:700 10px var(--display)}.werewolf-log header span{display:flex;align-items:center;gap:7px}.werewolf-log header svg{width:15px;color:#dfc068}.werewolf-log header b{color:#f0d368}.werewolf-log>div{max-height:122px;overflow:auto;padding:4px 13px}.werewolf-log p{margin:0;padding:5px 0;border-bottom:1px solid #243341;color:#aab8c3;font-size:10px}.werewolf-log p:last-child{border-bottom:0}.werewolf-result{display:flex;align-items:center;gap:11px;margin-top:14px;padding:13px;border:1px solid #516374;background:#192534}.werewolf-result.won{border-color:#d4bb61;background:#2e2a1d}.werewolf-result.lost{border-color:#91525e;background:#2a1d24}.werewolf-result>svg{width:32px;height:32px;color:#f2d76d}.werewolf-result>div{display:grid;gap:3px}.werewolf-result small{color:#b9c5cd;font:700 9px var(--display)}.werewolf-result b{color:#eef3f5;font:800 15px var(--display)}.werewolf-result span{color:#c4d2d9;font-size:10px}
.werewolf-sheriff-setting{display:grid;gap:7px}.werewolf-toggle{display:grid!important;grid-template-columns:46px auto 1fr;align-items:center;gap:9px!important;min-height:44px;padding:0 11px;border:1px solid #dbbd57;background:#312b1d;cursor:pointer}.werewolf-toggle input{position:absolute;opacity:0}.werewolf-toggle>.werewolf-switch{width:40px;height:22px;border-radius:14px;background:#64727d;position:relative;box-shadow:inset 0 0 0 1px #9dacb744}.werewolf-toggle>.werewolf-switch:after{content:'';position:absolute;width:16px;height:16px;left:3px;top:3px;border-radius:50%;background:#f4f7f8;box-shadow:0 1px 4px #0008;transition:transform .18s}.werewolf-toggle input:checked+.werewolf-switch{background:#e3bd42;box-shadow:0 0 14px #e9c85266}.werewolf-toggle input:checked+.werewolf-switch:after{transform:translateX(18px)}.werewolf-toggle strong{color:#f2e7c3;font:800 12px var(--display);letter-spacing:0}.werewolf-toggle em{justify-self:end;color:#ffe37a;font:800 11px var(--display);font-style:normal}.werewolf-toggle.off{border-color:#3d4f5c;background:#17222d}.werewolf-toggle.off strong{color:#b1c0ca}.werewolf-toggle.off em{color:#93a4b0}.werewolf-action.wolf-team{background:linear-gradient(112deg,#271b35,#1b2536)}.werewolf-action.wolf-team svg{color:#d8a2ff}.werewolf-team-members{display:block;margin-top:6px;color:#f0d6ff;font:800 13px var(--display);letter-spacing:.3px}
.werewolf-rule-strip>span{min-width:0}.werewolf-rule-help,.werewolf-icon-button{flex:0 0 auto;width:32px;height:32px;display:grid;place-items:center;border:1px solid #536675;background:#172430;color:#e7ce73}.werewolf-rule-help:hover,.werewolf-icon-button:hover{border-color:#e7ce73;background:#243343;color:#fff0aa}.werewolf-rule-help svg,.werewolf-icon-button svg{width:17px}.werewolf-choice-controls{display:grid;justify-items:end;gap:9px}.werewolf-action-buttons .selected{border-color:#f0d15d;background:#443817;color:#fff0aa;box-shadow:inset 0 0 0 1px #f0d15d66}.werewolf-confirm-action{min-height:38px;margin-top:10px;padding:0 16px}.werewolf-confirm-action svg{width:16px}.werewolf-target.selected{border-color:#f1d34f;background:#4a3b16;color:#fff5c7;box-shadow:0 0 0 2px #f1d34f88,inset 0 0 0 1px #ffe98a}.werewolf-skip.selected{display:inline-flex;min-height:30px;align-items:center;margin-top:9px;padding:0 11px;border:1px solid #f1d34f;background:#3c3218;color:#fff0a5;text-decoration:none}.werewolf-target:disabled,.werewolf-skip:disabled{cursor:not-allowed;opacity:.5}.werewolf-rules-overlay{position:fixed;inset:0;z-index:1200;display:none;align-items:center;justify-content:center;padding:22px;background:#05080bd9}.werewolf-rules-overlay.open{display:flex}.werewolf-rules-dialog{width:min(820px,calc(100vw - 30px));max-height:min(780px,calc(100vh - 32px));display:grid;grid-template-rows:auto minmax(0,1fr);border:1px solid #526372;background:#111a24;box-shadow:0 24px 80px #000c;color:#e9eef1}.werewolf-rules-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;border-bottom:1px solid #344452;background:#182430}.werewolf-rules-dialog>header small{display:block;color:#e1c663;font:800 9px var(--display)}.werewolf-rules-dialog h3{margin:3px 0 0;font:800 24px var(--display);letter-spacing:0}.werewolf-rules-content{overflow:auto;padding:4px 22px 24px}.werewolf-rules-content>section{padding:18px 0;border-bottom:1px solid #2d3d4b}.werewolf-rules-content>section:last-child{border-bottom:0}.werewolf-rules-content h4{margin:0 0 10px;color:#efd679;font:800 16px var(--display);letter-spacing:0}.werewolf-rules-content p,.werewolf-rules-content li,.werewolf-rules-content dd{color:#bbc7ce;font-size:12px;line-height:1.85}.werewolf-rules-content p{margin:8px 0}.werewolf-rules-content ol,.werewolf-rules-content ul{margin:0;padding-left:21px}.werewolf-rules-content li+li{margin-top:5px}.werewolf-rules-content dl{display:grid;grid-template-columns:58px minmax(0,1fr);gap:8px 12px;margin:0}.werewolf-rules-content dt{color:#f1dc94;font:800 12px var(--display)}.werewolf-rules-content dd{margin:0}.werewolf-rule-table{display:grid;grid-template-columns:52px 150px minmax(0,1fr);border-top:1px solid #354654;border-left:1px solid #354654}.werewolf-rule-table>*{margin:0;padding:9px 10px;border-right:1px solid #354654;border-bottom:1px solid #354654}.werewolf-rule-table b{color:#f0d66f;font:800 13px var(--display)}.werewolf-rule-table span{color:#e5eaed;font-size:11px}.werewolf-rule-table em{color:#aebbc3;font-size:11px;font-style:normal;line-height:1.65}
@keyframes werewolf-moon{50%{transform:translateY(5px) scale(1.025);box-shadow:0 0 28px #f4dfa9,0 0 70px #a8c9ff7a}}@keyframes werewolf-mist{to{background-position:260px 0}}@keyframes werewolf-howling{50%{transform:translateY(-5px) scaleY(1.04);filter:drop-shadow(0 0 13px #b3d5ff)}}
@media(max-width:760px){.game-modal:has(.werewolf-shell){width:calc(100vw - 16px);padding:22px 12px}.werewolf-shell{width:100%}.werewolf-lobby-grid{grid-template-columns:1fr}.werewolf-head h2{font-size:24px}.werewolf-seat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px}.werewolf-seat{min-height:55px;padding:6px}.werewolf-seat-num{width:17px;font-size:14px}.werewolf-seat img{width:29px;height:29px}.werewolf-seat b{font-size:10px}.werewolf-phase{grid-template-columns:1fr}.werewolf-role{min-height:64px;grid-template-columns:22px auto;grid-template-rows:auto auto;padding:10px 13px}.werewolf-role>svg{grid-row:1/-1}.werewolf-role small{grid-column:2}.werewolf-action{min-height:105px;padding:12px;align-items:flex-start;flex-direction:column}.werewolf-action>div:first-child{align-items:flex-start}.werewolf-action-buttons{justify-content:flex-start}.werewolf-choice-controls{width:100%;justify-items:stretch}.werewolf-choice-controls .werewolf-action-buttons{display:grid;grid-template-columns:1fr 1fr}.werewolf-choice-controls .werewolf-confirm-action,.target-action>.werewolf-confirm-action{width:100%}.werewolf-target-list{margin-top:9px}.werewolf-lobby-actions{padding:0 10px 11px;align-items:flex-start;flex-direction:column}.werewolf-lobby-actions button{width:100%}.werewolf-room-meta{gap:7px;padding:9px}.werewolf-rule-strip{align-items:flex-start;line-height:1.5}.werewolf-rule-help{margin-top:-7px}.werewolf-rules-overlay{padding:8px}.werewolf-rules-dialog{width:100%;max-height:calc(100vh - 16px)}.werewolf-rules-dialog>header{padding:14px}.werewolf-rules-dialog h3{font-size:20px}.werewolf-rules-content{padding:2px 14px 18px}.werewolf-rule-table{grid-template-columns:46px minmax(0,1fr)}.werewolf-rule-table em{grid-column:1/-1}.werewolf-rules-content dl{grid-template-columns:48px minmax(0,1fr)}}

/* Keep the rules in a separate top layer so the game dialog cannot clip it. */
.werewolf-rules-overlay{box-sizing:border-box;width:100vw;max-width:none;height:100vh;height:100dvh;max-height:none;margin:0;border:0;overflow:hidden;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
.werewolf-rules-overlay[open].open{display:flex}
.werewolf-rules-overlay::backdrop{background:transparent}
.werewolf-rules-dialog{max-height:100%;min-height:0}
.werewolf-rules-dialog>header{flex:0 0 auto}
.werewolf-rules-content{min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
@media(max-width:760px){.werewolf-rules-overlay{padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}.werewolf-rules-dialog{max-height:100%}}

.werewolf-mobile-vote-callout{display:none}
@media(max-width:760px){.werewolf-vote-announcement .werewolf-log{display:none}.werewolf-mobile-vote-callout{display:block;margin:12px 0 0;padding:12px 14px;border:1px solid #735f2b;border-left:3px solid #e0c35d;background:#211d15;color:#e8edf0}.werewolf-mobile-vote-callout small{display:block;color:#f0d36e;font:800 10px var(--display);letter-spacing:.5px}.werewolf-mobile-vote-callout p{margin:6px 0 0;color:#f1e7c4;font-size:12px;line-height:1.8;overflow-wrap:anywhere}}
