/* One light blue palette for the game, sidebar and account dialogs. */
:root{--bg:#edf6ff;--ink:#193c60;--muted:#57728e;--line:#c9def1;--green:#2675bf;--orange:#2675bf;--sky:#2675bf;--sky-ink:#193c60;--sky-muted:#57728e;--sky-line:#c9def1}
body{background:#edf6ff;color:var(--sky-ink)}
button,input,select{accent-color:#2675bf}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline-color:#2675bf}
.topbar{background:#fff;border-color:var(--sky-line)}
.sidebar{background:#e0efff;color:var(--sky-ink);border-right:1px solid #c2daf1;scrollbar-color:#9abede #e0efff}
.sidebar .site-brand{color:#194e7f}.sidebar .site-brand small{color:#587c9f}
.sidebar .nav-item,.sidebar .profile-card button,.sidebar .profile-records{color:#426688}
.sidebar .profile-card{border-color:#c0d8ee}.sidebar .guest-badge{border-color:#adcbe5;color:#416789;background:#f3f9ff}
.sidebar .account-buttons .login-button{background:#fff;color:#245b8b;border:1px solid #bed7ee}
.sidebar .account-buttons .login-button:hover{background:#f2f8ff}
.sidebar .side-character-actions{border-color:#bdd6ed;background:#f4f9ff}
.sidebar .side-character-actions .nav-item{color:#315e87}
.sidebar .side-character-actions .nav-item:hover{background:#dbeeff;color:#164f83}
.sidebar .side-character-actions .nav-item small{color:#577c9d}
.sidebar #cash-review-open{border-color:#c3daf0;color:#185d9b}
.sidebar .gift-wallet-card,.sidebar .mf-media{background:#f7fbff;border-color:#bdd6ed;color:#284f73}
.sidebar .gift-wallet-card h3,.sidebar .mf-media h3{color:#19578d}
.sidebar .gift-wallet-card p,.sidebar .mf-media #mf-media-status{color:#55738e}
.sidebar .gift-wallet-card .acorn-owned strong{color:#1b659f}

.sidebar .mf-volume-controls label,.sidebar .mf-volume-controls output{color:#3c6589}
.sidebar .mf-volume-controls input{accent-color:#2675bf}
.sidebar .mf-media-gallery figure{background:#e4f0fb}.sidebar .mf-media-gallery figcaption{color:#315e87}
.mafia-view{--mf-line:#c9def1;--mf-muted:#58748f;--mf-accent:#2675bf;background:#fafdff;border-color:#c4dbf0;color:#193c60;box-shadow:0 8px 30px #4175a30a}
.mf-heading h1{color:#204f79}.mf-eyebrow{color:#577f9f}
.mf-intro{background:linear-gradient(125deg,#edf7ff,#dceeff);border-color:#bfd9ef}
.mf-intro p,.mf-create-settings label,.mf-setup,.mf-room-card p{color:#4e708f}
.mf-win-rule{color:#285f8d}.mf-first-guide{background:#ffffff87;border-color:#bdd7ee;color:#254f75}
.mf-first-guide strong{color:#286494}.mf-intro .mf-win-rule{color:#38688e}.mf-create-settings .mf-setup{color:#4e708f}
.mafia-view button,#mf-create{background:#2878bd;border-color:#2067a5;color:#fff;box-shadow:none}
.mafia-view button:not(:disabled):hover,#mf-create:not(:disabled):hover{background:#1e68aa}
.mafia-view .mf-quiet{background:#eaf4ff;border-color:#bdd7ef;color:#315e87}
.mafia-view .mf-quiet:not(:disabled):hover{background:#dceeff}
.mf-create-settings select,.mafia-view select{background:#fff;border-color:#accce6;color:#244f75}
.mf-room-card{background:#fff;border-color:#c5dcef}.mf-room-card.invited{border-color:#448ece}
.mf-empty{background:#f3f9ff;color:#63809b;border-color:#c1d8ec}
.mf-phase-bar{background:#e3f2ff;border-color:#a9cce9}.mf-phase-bar span{color:#4d7699}
.mf-phase-bar strong,.mf-phase-bar output{color:#1e639c}
.mafia-view[data-phase=night] .mf-phase-bar{background:#dfeafa;border-color:#a4bddc}
.mafia-view[data-phase=night] .mf-phase-bar strong,.mafia-view[data-phase=night] .mf-phase-bar output{color:#395b8d}
.mf-role-card{background:#eaf4ff;border-color:#b4d1ea}.mf-role-card>span,.mf-role-card h3{color:#246da8}
.mf-role-card p,.mf-role-card small{color:#4c7293}
.mf-role-card[data-role=doctor]{background:#e6f6f7;border-color:#add5d9}
.mf-role-card[data-role=detective]{background:#e7efff;border-color:#b3c9eb}
.mf-phase-help{background:#eaf4ff;border-color:#77aadd;color:#355e83}
.mafia-view .mf-player{background:#fff;border-color:#bdd5ea;color:#244d72}
.mafia-view .mf-player:not(:disabled):hover{background:#e7f3ff;border-color:#6fa6d2}
.mafia-view .mf-player[aria-pressed=true]{background:#dcedff;border-color:#2878bd}
.mf-player small,.mafia-view .mf-player-record{color:#577792}.mf-player-state{background:#eaf4ff;border-color:#bdd5ea;color:#416b90}
.mf-host-badge,.mf-operator-badge{background:#ddecff;border-color:#abc9e6;color:#275f95}
.mf-voted-badge{background:#e1f3ee;border-color:#add2c6;color:#356b5c}
.mf-vote-count{background:#dceeff;border-color:#9cc4e6;color:#155a92}
.mafia-view #mf-action-controls #mf-abstain{background:#d9edff;border-color:#83b3db;color:#205c8e;box-shadow:0 3px 10px #307cb315}
.mafia-view #mf-action-controls #mf-abstain:not(:disabled):hover{background:#c9e5ff;border-color:#4288c0}
.mafia-view #mf-abstain[aria-pressed=true]{outline-color:#438ac3}
.mf-action-controls span{color:#446f93}.mf-peer-menu-panel,.mf-peer-volume{background:#f3f9ff;border-color:#bad4eb;color:#365f83}
.mafia-view .mf-kick-button{background:#fff0f2;border-color:#e5b9c1;color:#9a4052}
.mf-character-portrait{background:#e6f2ff;border-color:#b7d2e9;color:#4d7da4}
.mf-investigations{background:#e7f1ff;border-color:#accbe8}.mf-log{background:#f1f8ff;border-color:#c3dcef}.mf-log ol{color:#587792}
.mf-chat,.mf-team-chat{background:#fff;border-color:#b9d3eb}
.mf-chat-heading,.mf-team-chat .mf-chat-heading,.mf-chat form{background:#eaf4ff;border-color:#c4daef}
.mf-chat-heading h3,.mf-team-chat .mf-chat-heading h3{color:#245f91}.mf-chat-heading span{color:#5c7c98}
.mf-message p{color:#294b6b}.mf-message strong{color:#23689f}
.mf-chat input{background:#fff;border-color:#b8d2e9;color:#254e73}.mf-chat input::placeholder{color:#7691a8}
.mf-chat-stack:fullscreen{background:#edf6ff;color:#244e73}
.mf-chat-stack:fullscreen>#mf-chat-exit{background:#2878bd;border-color:#2168a5;color:#fff}
.mf-footer{color:#63819b;border-color:#c6dcee}.mf-notice{background:#e3f1ff;border-color:#a6c9e7;color:#315e83}
#mf-error,#cash-error,#character-shop-error,#gift-error{color:#ac3b53}
dialog,.cash-dialog,#character-shop,.mf-result-dialog{background:#fafdff;color:#224c70;border-color:#abcce7;box-shadow:0 24px 80px #214e7833}
dialog::backdrop,#character-shop::backdrop,.mf-result-dialog::backdrop{background:#173f6266}
dialog h2,.cash-heading h2,.character-shop-heading h2,.mf-result-dialog h2,.mf-result-dialog[data-winner=citizens] h2{color:#1f639b}
dialog p,.cash-dialog p,.character-shop-heading p,.character-design-card p,.character-admin-order small{color:#52738e}
dialog label,.mf-result-eyebrow,.character-shop-heading small{color:#52799b}
dialog button,.cash-dialog button,#character-shop button,.mf-result-dialog button{background:#2878bd;border-color:#2067a5;color:#fff}
dialog .close-dialog{background:transparent;color:#507a9d;border-color:transparent}
dialog .primary-button{background:#2878bd;color:white}
.auth-tabs{background:#e6f2ff}.auth-tabs button{background:transparent;color:#52799b}.auth-tabs button.active{background:#fff;color:#24689e;box-shadow:0 2px 5px #31638b15}
dialog input:not([type=checkbox]):not([type=color]),.cash-dialog input:not([type=checkbox]),#character-shop input:not([type=checkbox]){background:#fff;border-color:#b7d2e9;color:#244e73}
.character-design-card,.character-admin-order{background:#edf6ff;border-color:#bdd6ec}.character-design-card strong{color:#1e649c}
.character-bank,.gift-wallet-summary>div,.gift-bank-details{background:#e8f4ff;border-color:#b9d5ec;color:#305e83}
.character-bank strong,.cash-contact-phone{color:#2067a1}
#character-payment-guide .character-payment-phone{background:#e1f1ff;border-color:#a3c9e7;color:#1b659f}
#character-payment-guide .character-payment-phone:hover{background:#d1eaff}
#character-checkout,#character-orders,#character-admin,.character-order-row,.cash-request{border-color:#c4daec}
#character-shop-status,#cash-message{color:#286998}.cash-request small{color:#5d7c97}
.acorn-ranking-scroll{border-color:#bfd8ed}.acorn-ranking th{background:#dfefff;color:#436d90}.acorn-ranking th,.acorn-ranking td{border-color:#d5e5f2}
.acorn-ranking tr[data-podium=true] td:first-child{color:#2066a0}.acorn-ranking tr.is-you{background:#e0f0ff}.mf-result-dialog #mf-result-winners,.mf-result-dialog #mf-result-record{color:#53738f}
.cash-dialog.is-admin .cash-request{padding:16px;background:#fff;border:1px solid #c2d9ed;border-radius:12px;margin:12px 0}
.cash-dialog.is-admin .cash-request>strong{display:block;font-size:19px;color:#245f90}
.cash-dialog.is-admin .cash-request>p{margin:7px 0}.cash-dialog.is-admin details{margin-top:12px;font-size:12px;color:#5b7892}
.cash-dialog.is-admin summary{cursor:pointer}.cash-dialog.is-admin .cash-approve{width:100%;font-size:16px;margin:8px 0 0;min-height:46px}

.human-builder{grid-column:1;display:grid;grid-template-columns:240px minmax(0,1fr);gap:20px;padding:20px;background:#edf6ff;border:1px solid #bcd5ec;border-radius:16px}.human-preview-card{text-align:center}.human-preview-card #human-preview{width:200px;height:220px;max-width:100%;margin:0 auto 12px;border-radius:20px;background-repeat:no-repeat}.human-preview-card>strong{display:block;font-size:21px;color:#2067a1}.human-preview-card p{font-size:12px}.human-preview-card small{display:block;font-size:11px;line-height:1.7;color:#55738e}.human-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px}.human-controls label{margin:0!important;font-size:12px!important;color:#375f82}.human-controls select{display:block;width:100%;padding:10px 7px;margin-top:6px;border:1px solid #accce5;border-radius:8px;background:white;color:#244e73;font:inherit}.human-controls select:focus-visible{outline:2px solid #2675bf}.cash-approval-delay{padding:10px 12px;background:#e8f4ff;border-radius:8px;color:#3f6c90;font-size:13px}

.premium-character.human-character{background-color:#e8f3ff!important}

.character-consent[hidden]{display:none!important}
/* Compact, readable table: room browser stays visible during every phase. */
body{font-size:15px}
main.mafia-active{padding-inline:10px;gap:6px}
body:has(main.mafia-active) .topbar{height:36px;min-height:36px;font-size:13px}
.mafia-view{font-size:15px;margin:6px 0;padding:14px}
.mf-heading{margin-bottom:10px}.mf-heading h1{font-size:28px;margin:0}
.mf-intro{padding:12px 16px;gap:16px}.mf-first-guide{padding:8px 12px}.mf-first-guide strong{font-size:16px}.mf-first-guide p,.mf-win-rule,.mf-setup{font-size:14px}
.mf-section-title{margin:12px 0 6px}.mf-section-title h2{font-size:20px}.mf-room-card{padding:10px 14px;gap:12px}.mf-room-card p{margin:3px 0;font-size:15px}
.mafia-view.mf-in-room{display:flex;flex-direction:column;min-height:calc(100dvh - 48px);margin:0;padding:8px;gap:5px}
.mf-in-room #mf-browser{display:block!important;flex:none;border-bottom:1px solid #c9def1;padding-bottom:5px}
.mf-in-room .mf-section-title{margin:0 0 3px!important}.mf-in-room .mf-section-title h2{font-size:16px!important}
.mf-in-room .mf-rooms{display:flex!important;max-height:64px;overflow:auto;gap:6px}
.mf-in-room .mf-room-card{grid-template-columns:auto auto auto!important;padding:4px 8px!important;gap:8px!important;min-width:280px}
.mf-in-room .mf-room-card h3,.mf-in-room .mf-room-card p{font-size:13px!important;margin:0}
.mf-in-room .mf-room-card button{font-size:12px!important;max-width:155px;line-height:1.25}
.mf-in-room #mf-game{display:flex;flex-direction:column;flex:1;gap:4px;min-height:0}
.mf-in-room .mf-room-toolbar{margin:0}.mf-in-room .mf-room-toolbar h2{font-size:18px}
.mafia-view.mf-in-room button{font-size:14px;min-height:32px;padding:5px 10px}
.mf-in-room .mf-phase-bar{padding:3px 12px;margin:0;min-height:41px}.mf-in-room .mf-phase-bar strong{font-size:23px}.mf-in-room .mf-phase-bar span{font-size:14px}.mf-in-room .mf-phase-bar output{font-size:30px}
.mf-in-room .mf-layout{flex:1;gap:5px;min-height:0}
.mf-in-room .mf-main{display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:4px 8px}
.mf-in-room .mf-lobby-controls,.mf-in-room .mf-players,.mf-in-room .mf-action-controls,.mf-in-room .mf-investigations,.mf-in-room .mf-log,#mf-vote-progress{grid-column:1/-1;margin:0}
.mf-in-room .mf-lobby-controls:has(button:not([hidden]),#mf-role-choice-field:not([hidden])){margin-bottom:2px}.mf-in-room .mf-lobby-controls:not(:has(button:not([hidden]),#mf-role-choice-field:not([hidden]))){display:none}
.mf-in-room .mf-role-card{padding:6px 12px;min-height:68px;gap:12px;margin:0;height:100%}
.mf-in-room .mf-role-card>span{font-size:38px}.mf-in-room .mf-role-card h3{display:block;font-size:32px;line-height:1.15;margin:0;font-weight:900}.mf-in-room .mf-role-card small{font-size:12px;letter-spacing:0}.mf-in-room .mf-role-card p{font-size:12px;line-height:1.4}
.mf-in-room .mf-phase-help{font-size:14px;line-height:1.5;margin:0;padding:7px 10px;align-self:stretch}
.mf-in-room .mf-players{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
.mafia-view.mf-in-room .mf-player{padding:5px!important;min-height:74px;gap:2px 4px;align-content:center}
.mafia-view.mf-in-room .mf-character-portrait{width:30px;height:33px;flex-shrink:0}
.mf-in-room .mf-player strong{font-size:14px;line-height:1.2;padding-right:0}.mf-in-room .mf-player small,.mf-in-room .mf-player-record{font-size:11px;line-height:1.25}
.mf-in-room .mf-player-state{position:static;font-size:10px}.mf-in-room .mf-player .mf-vote-count{flex:0 0 auto;font-size:24px;margin:0;padding:0 7px;order:0;margin-left:auto}
.mf-in-room .mf-host-badge,.mf-in-room .mf-operator-badge,.mf-in-room .mf-voted-badge{font-size:10px}
.mf-in-room .mf-peer-menu summary{font-size:11px;color:#416b90}.mf-in-room .mf-action-controls span{font-size:13px}
.mafia-view.mf-in-room #mf-action-controls #mf-abstain{min-height:40px;min-width:200px;font-size:21px;padding:4px 16px}
.mf-in-room .mf-log{padding:3px 8px;font-size:13px}.mf-in-room .mf-investigations{padding:5px 10px}.mf-in-room .mf-investigations h3,.mf-in-room .mf-investigations ul{font-size:13px}
.mf-in-room .mf-chat-stack{height:clamp(170px,25dvh,320px);min-height:170px;flex:1;scroll-margin-top:0}
.mf-in-room .mf-chat-stack .mf-chat-heading{padding:4px 10px;gap:6px}.mf-in-room .mf-chat-stack .mf-chat-heading h3{font-size:17px}.mf-in-room .mf-chat-stack .mf-chat-list{padding:7px 10px}.mf-in-room .mf-chat-stack .mf-message p{font-size:17px;line-height:1.4;margin:2px 0}.mf-in-room .mf-chat-stack .mf-message strong{font-size:13px}.mf-in-room .mf-chat-stack .mf-message{margin-bottom:6px}.mf-in-room .mf-chat-stack .mf-chat form{padding:5px}.mf-in-room .mf-chat-stack .mf-chat input{padding:7px;font-size:16px}.mf-in-room .mf-chat-stack #mf-team-roster{padding:3px 7px;font-size:12px;margin:0}
.mf-in-room .mf-chat-stack:fullscreen{height:100dvh;min-height:100dvh;padding:12px}
@media(min-height:850px){.mf-in-room .mf-players{grid-template-columns:repeat(4,minmax(0,1fr))}.mafia-view.mf-in-room .mf-player{min-height:88px}.mf-in-room .mf-chat-stack{min-height:240px}}
/* Character atelier: large preview, visual choices and a persistent wardrobe. */
#character-shop{width:1220px;padding:18px;border-radius:20px}
#character-shop[open]{grid-template-columns:minmax(0,1fr) 245px;gap:10px 16px}
#character-shop .character-shop-heading{gap:9px}.character-shop-heading>div{flex:1}.character-shop-heading h2{font-size:27px!important}.character-shop-heading p{font-size:14px!important;max-width:600px}
#character-shop .character-shop-heading button{font-size:14px;padding:9px 12px}
#character-shop-status{font-size:15px;font-weight:700}
#character-shop .human-builder{grid-template-columns:220px minmax(0,1fr);padding:14px;gap:16px;background:linear-gradient(135deg,#f9fcff,#e8f2fe);box-shadow:inset 0 1px 0 white}
#character-shop .human-preview-card #human-preview{width:200px;height:220px;border-radius:25px;border:1px solid #bcd1e7;box-shadow:0 12px 24px #33679920;margin-bottom:10px}
#character-shop .human-preview-card strong{font-size:23px}.human-preview-card p{font-size:15px;font-weight:700;margin:5px 0}.human-preview-card small{font-size:13px;line-height:1.6}
.human-editor{min-width:0}#human-tabs{display:flex;padding:4px;background:#dceafb;border-radius:12px;gap:4px;margin-bottom:12px}#character-shop #human-tabs button{flex:1;border:0;background:transparent;color:#43698e;padding:9px;font-size:15px}#character-shop #human-tabs button[aria-pressed=true]{background:white;color:#165e9a;box-shadow:0 2px 8px #37658c15}
#character-shop .human-controls{display:block;min-height:210px}#character-shop .human-controls label{font-size:15px!important;font-weight:700;margin:0 0 12px!important}#character-shop .human-controls label[hidden]{display:none}#character-shop .human-controls select{display:none}
.human-choices{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}#character-shop .human-choices button{background:#fff;color:#345b80;border-color:#bfd4e8;font-size:13px;padding:7px 9px}#character-shop .human-choices button[aria-pressed=true]{border:2px solid #2878bd;background:#dfedff;color:#174e7d;padding:6px 8px;box-shadow:0 0 0 2px #2878bd12}#character-shop .human-choices .human-swatch{width:33px;height:33px;border-radius:50%;padding:0;background:var(--swatch)}#character-shop .human-choices .human-swatch[aria-pressed=true]{background:var(--swatch);outline:2px solid #2878bd;outline-offset:2px;border:3px solid white}
.human-presets{border-top:1px solid #c1d8ec;padding-top:8px;font-size:14px;color:#365f83}.human-presets summary{cursor:pointer;font-weight:700}#human-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:8px;max-height:220px;overflow:auto}#character-shop #human-presets button{padding:5px;background:#fff;border-color:#c1d8ec;color:#335b7e;display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}.human-preset-portrait{display:block;width:68px;height:75px;border-radius:12px}#human-presets strong{font-size:12px}#human-presets small{font-size:11px}
.human-wardrobe{grid-column:1;min-width:0}.human-wardrobe>h3{font-size:19px;margin:3px 0}.human-wardrobe>p{font-size:13px;margin:0 0 8px;color:#58748d}
#character-shop .character-catalog{display:flex;overflow-x:auto;gap:9px;margin:0;padding:2px 2px 8px}#character-shop .character-design-card{flex:0 0 155px;padding:8px;border-radius:14px;background:white}.character-design-card .character-shop-portrait{width:100px;height:110px;border-radius:15px}.character-design-card h3{font-size:15px}.character-design-card p{font-size:12px}#character-shop .character-design-card button{font-size:13px;padding:7px;min-height:32px}#character-shop .character-design-card button+button{background:#eef5fd;color:#315d86;border-color:#bfd4e8}
#character-shop .character-shop-sidebar{grid-column:2;grid-row:4/7;max-height:calc(94dvh - 130px);padding:0}#character-shop .character-shop-sidebar h3{font-size:17px}#character-shop .character-shop-sidebar p,#character-shop .character-shop-sidebar label{font-size:13px;line-height:1.55}#character-shop .character-shop-sidebar button{font-size:15px;padding:10px!important;width:100%}#character-checkout{border:1px solid #adccea;border-radius:14px;padding:12px;background:#eaf4ff;margin:0 0 12px}#character-shop .character-shop-sidebar{display:flex;flex-direction:column}#character-checkout{order:-1}#character-payment-guide .character-payment-phone{font-size:23px;padding:9px 2px}.character-order-row p{font-size:12px!important}
#character-shop .character-consent input{flex:0 0 18px;width:18px!important;height:18px}
/* Readable type throughout, with strong hierarchy for roles and actions. */
.sidebar .nav-item,.sidebar .side-character-actions .nav-item{font-size:16px}.sidebar .profile-card strong{font-size:18px}.sidebar .gift-wallet-card p,.sidebar .mf-volume-controls label,.sidebar .mf-media #mf-media-status{font-size:13px}.sidebar .gift-wallet-card h3,.sidebar .mf-media h3{font-size:18px}.sidebar .account-buttons .login-button{font-size:14px}
.mafia-view{font-size:16px}.mafia-view button{font-size:16px}.mf-intro p,.mf-first-guide p,.mf-win-rule,.mf-setup{font-size:15px!important}.mf-create-settings label{font-size:15px}.mf-footer{font-size:13px}.mf-room-card h3{font-size:19px}
.mf-in-room .mf-room-card h3,.mf-in-room .mf-room-card p{font-size:14px!important}.mafia-view.mf-in-room button{font-size:15px}.mf-in-room .mf-player strong{font-size:16px}.mf-in-room .mf-player small,.mf-in-room .mf-player-record{font-size:12px}.mf-in-room .mf-player-state,.mf-in-room .mf-voted-badge{font-size:11px}.mf-in-room .mf-role-card h3{font-size:36px}.mf-in-room .mf-role-card p{font-size:13px}.mf-in-room .mf-role-card small{font-size:13px}.mf-in-room .mf-phase-help,.mf-in-room .mf-action-controls span{font-size:15px}.mf-in-room .mf-chat-stack .mf-message p{font-size:18px}.mf-in-room .mf-chat-stack .mf-message strong{font-size:14px}.mf-in-room .mf-chat-stack .mf-chat input{font-size:17px}
.mafia-view .mf-player .mf-vote-target{display:block;flex:0 0 100%;font-size:13px;font-weight:750;color:#20629a;overflow-wrap:anywhere;line-height:1.3}.mafia-view .mf-player .mf-vote-count{font-size:26px}
dialog p,dialog label{font-size:14px}dialog h2{font-size:27px}dialog input,dialog select,dialog button{font-size:15px}.cash-request>strong{font-size:18px}.cash-request small{font-size:13px}#toast{font-size:15px}
/* Every seat has the same height, including the host and empty status rows. */
.mf-in-room .mf-players{grid-auto-rows:116px;align-items:stretch}
.mf-in-room .mf-player-wrap{display:flex;flex-direction:column;position:relative;min-width:0;height:116px;padding-bottom:18px;gap:0}
.mafia-view.mf-in-room .mf-player{height:98px;min-height:98px;max-height:98px;width:100%;flex:1;overflow:auto;align-content:flex-start}
.mf-in-room .mf-player-wrap>.mf-peer-menu{position:absolute;bottom:0;left:0;right:0;height:18px}
.mf-in-room .mf-player-wrap>.mf-peer-menu>summary{line-height:18px}
/* Put usable space ahead of repeated helper copy. */
.mf-in-room .mf-role-card p{display:none}.mf-in-room .mf-role-card{min-height:66px;height:66px}.mf-in-room .mf-role-card h3{display:inline}.mf-in-room .mf-role-card small{display:block}
.mf-in-room .mf-players{grid-auto-rows:96px}.mf-in-room .mf-player-wrap{height:96px;padding-bottom:16px}.mafia-view.mf-in-room .mf-player{display:grid;grid-template-columns:26px minmax(0,1fr) auto;grid-template-areas:'portrait name name' 'record record count' 'role role count' 'target target target';gap:1px 4px;height:80px;min-height:80px;max-height:80px;overflow:hidden;align-content:center;position:relative}
.mf-in-room .mf-player .mf-character-portrait{grid-area:portrait;width:25px;height:27px}.mf-in-room .mf-player strong{grid-area:name;font-size:15px;line-height:1.2;padding:0 0 0 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mf-in-room .mf-player small{grid-area:role;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px}.mf-in-room .mf-player .mf-player-record{grid-area:record;font-size:11px}.mf-in-room .mf-player .mf-vote-count{grid-area:count;font-size:25px;padding:0 4px;margin:0}.mf-in-room .mf-player .mf-vote-target{grid-area:target;font-size:13px;line-height:1.25;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mf-in-room .mf-player-state,.mf-in-room .mf-voted-badge,.mf-in-room .mf-host-badge,.mf-in-room .mf-operator-badge{display:none}
.mf-in-room .mf-player-wrap>.mf-peer-menu{height:16px}.mf-in-room .mf-player-wrap>.mf-peer-menu>summary{line-height:16px;font-size:11px}
.mf-in-room .mf-log{position:relative}.mf-in-room .mf-log[open] ol{position:absolute;left:0;right:0;bottom:24px;z-index:6;max-height:160px;padding:12px 30px;background:#f1f8ff;border:1px solid #b9d5ec;border-radius:10px;box-shadow:0 6px 18px #193c6030}
.mf-in-room .mf-chat-stack{min-height:150px;height:150px}.mf-in-room #mf-action-controls{min-height:32px}.mafia-view.mf-in-room #mf-action-controls #mf-abstain{min-height:36px;font-size:21px}
.sidebar .site-brand{margin:0 0 4px;font-size:22px}.sidebar .site-brand small{font-size:10px}.sidebar nav>.nav-item{padding:4px 8px;min-height:26px;font-size:14px}.sidebar .profile-card{padding:4px 0;gap:6px}.sidebar .profile-card .avatar{width:38px;height:42px}.sidebar .profile-records{max-width:145px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px}.sidebar .account-buttons{display:grid;grid-template-columns:1fr 1fr;gap:3px;margin-top:5px}.sidebar .account-buttons #guest-button,.sidebar .account-buttons #login-button:first-child{grid-column:1/-1}.sidebar .account-buttons .login-button{font-size:13px;min-height:28px;padding:4px}.sidebar .side-character-actions .nav-item{font-size:16px;padding:4px 8px;min-height:28px}.sidebar .side-character-actions{margin-top:5px}.sidebar-tools{margin-top:5px;gap:5px}.sidebar .gift-wallet-card,.sidebar .mf-media{padding:7px}.sidebar .gift-wallet-card p{margin:2px 0;font-size:12px}.sidebar .gift-wallet-card .acorn-owned strong{font-size:20px}.sidebar .mf-media #mf-media-status{font-size:12px;line-height:1.4}.sidebar .mf-volume-controls{gap:4px}.sidebar .mf-volume-controls input{height:16px}
main.mafia-active>.mafia-view{order:1}main.mafia-active>.topbar{order:0}main.mafia-active>.partners-card,main.mafia-active>.yeongju-banner{order:2}
/* Bound the table to the viewport; conversation history scrolls inside its panel. */
.mafia-view.mf-in-room{height:calc(100dvh - 48px);min-height:660px;flex:none}
.mf-in-room #mf-browser{display:grid!important;grid-template-columns:190px minmax(0,1fr);gap:8px;padding:0 0 4px;align-items:center}.mf-in-room .mf-section-title{gap:4px}.mf-in-room .mf-section-title h2{font-size:15px!important}.mf-in-room .mf-room-card{min-width:270px}.mf-in-room .mf-rooms{max-height:42px}
.mf-in-room .mf-main{flex:none;grid-template-areas:'lobby lobby' 'role help' 'players players' 'action progress' 'investigations investigations';grid-template-columns:1fr 1fr}
.mf-in-room .mf-lobby-controls{grid-area:lobby}.mf-in-room .mf-role-card{grid-area:role;height:60px;min-height:60px}.mf-in-room #mf-phase-help{grid-area:help;font-size:14px;padding:5px 8px}.mf-in-room .mf-players{grid-area:players}.mf-in-room #mf-action-controls{grid-area:action}.mf-in-room #mf-vote-progress{grid-area:progress;font-size:13px;line-height:1.35;padding:4px 8px}.mf-in-room #mf-investigations{grid-area:investigations}
.mf-in-room .mf-room-toolbar .mf-log{padding:4px 8px;margin:0;font-size:13px;align-self:center}.mf-in-room .mf-room-toolbar .mf-log[open] ol{left:auto;right:0;bottom:auto;top:25px;width:400px}.mf-in-room .mf-room-toolbar>div{gap:5px}.mf-in-room .mf-room-toolbar h2{font-size:17px}.mf-in-room #mf-chat-jump{display:none}
.mf-in-room .mf-chat-stack{min-height:135px;flex:1 1 135px;height:135px;overflow:hidden}.mf-in-room .mf-chat{height:100%;min-height:0}.mf-in-room .mf-chat-list{overflow:auto;min-height:0}.mf-in-room .mf-chat-stack #mf-team-roster{max-height:38px;overflow:auto;flex-shrink:0}
.mafia-view[data-phase=lobby] #mf-phase-help,.mafia-view[data-phase=finished] #mf-phase-help{grid-column:1/-1}
.sidebar .gift-wallet-card .acorn-owned{display:flex;align-items:center;justify-content:space-between;gap:3px;flex-wrap:wrap}.sidebar .gift-wallet-card .acorn-owned strong{display:inline;margin:0;font-size:21px}.sidebar .gift-wallet-card{padding:6px 8px}.sidebar .gift-wallet-card p{line-height:1.4}.sidebar .mf-volume-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.sidebar .mf-volume-controls label{font-size:12px;display:flex;flex-wrap:wrap;gap:2px}.sidebar .mf-volume-controls input{flex:0 0 100%;width:100%;height:14px}.sidebar .mf-volume-controls output{font-size:11px}.sidebar .mf-media{padding:6px 8px}.sidebar .mf-media #mf-media-status{margin:0;font-size:12px;line-height:1.35}.sidebar .mf-media h3{font-size:17px}
@media(max-height:750px){.sidebar .site-brand small{font-size:9px}.sidebar .profile-card{margin:0}.sidebar nav>.nav-item{min-height:24px;padding:3px 8px}.sidebar .side-character-actions .nav-item{min-height:26px;padding:3px 8px}.sidebar .sidebar-tools{gap:4px;margin-top:4px}.mf-in-room .mf-phase-bar{min-height:36px}.mf-in-room .mf-room-toolbar{min-height:30px}.mf-in-room .mf-main{gap:3px 6px}.mf-in-room .mf-chat-stack .mf-chat form{padding:3px}.mf-in-room .mf-chat-stack .mf-chat input{padding:5px}.mf-in-room .mf-chat-stack .mf-chat-heading{padding:3px 8px}}
/* Camera control removed from the visible interface. */
.sidebar .mf-media-controls{display:none!important}
#character-shop .human-builder[hidden],#character-shop [hidden]{display:none!important}
.win-acorn-note{color:#23689f!important;font-size:13px!important;line-height:1.5}.win-acorn-note strong{font-weight:850}.mf-result-dialog #mf-result-reward{font-size:19px;font-weight:800;color:#20679f;padding:12px;border-radius:10px;background:#e1f1ff}

/* Deep red participant headers and room for independent listening controls. */
#mafia-view .mf-player-identity{background:#8b1e2d;color:#fff;border-color:#bd6170;flex-shrink:0;min-height:42px}
#mafia-view .mf-player-identity>strong{color:#fff;font-size:13px}
#mafia-view .mf-inline-volume{color:#fff1f3;font-size:11px}
#mafia-view .mf-inline-volume input{accent-color:#ffd1d8;min-height:28px}
#mafia-view .mf-inline-volume output{color:#fff;font-weight:750}
#mafia-view.mf-in-room .mf-players{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));grid-auto-rows:auto;align-items:stretch}
#mafia-view.mf-in-room .mf-player-wrap{height:auto;min-height:140px;padding-bottom:0;gap:4px}
#mafia-view.mf-in-room{height:auto;min-height:calc(100dvh - 48px)}

/* Death stays red and visible even when the participant button is disabled. */
#mafia-view .mf-player[data-alive=false]{filter:none;opacity:1!important}
#mafia-view .mf-player .mf-death-marker{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:12px;background:#fff4f4e8;color:#c4142e;border:2px solid #c4142e;border-radius:8px;pointer-events:none;z-index:2}
#mafia-view .mf-death-cross{font-size:58px;line-height:1;font-weight:900}
#mafia-view .mf-death-label{font-size:26px;line-height:1.2;font-weight:900}

/* Always-visible personal notes remain outside the voting button. */
#mafia-view .mf-role-note{display:block;width:100%;padding:6px 8px;background:#fff8dc;color:#664916;border:1px solid #d3b970;border-radius:7px;font-size:12px}
#mafia-view .mf-role-note>span{display:block;margin-bottom:4px;font-weight:700}
#mafia-view .mf-role-note textarea{display:block;box-sizing:border-box;width:100%;min-height:52px;max-height:150px;padding:6px 8px;border:1px solid #c2a45e;border-radius:5px;background:#fffdf3;color:#4c3612;font:14px/1.5 system-ui,sans-serif;resize:vertical}
#mafia-view .mf-role-note textarea::placeholder{color:#806b42;opacity:1}
#mafia-view .mf-player-wrap:has(.mf-role-note){padding-bottom:20px}
/* Ambient phase lighting; the transparent overlay never intercepts controls. */
body:has(#mafia-view.mf-in-room:not([hidden])[data-phase=discussion]){background:#f4faff}
#mafia-view.mf-in-room[data-phase=discussion]{background:#fafdff;border-color:#a8cbe7}
body:has(#mafia-view.mf-in-room:not([hidden])[data-phase=vote]){background:#e6edf4}
#mafia-view.mf-in-room[data-phase=vote]{background:#e9f0f6;border-color:#8ea8c0}
body:has(#mafia-view.mf-in-room:not([hidden])[data-phase=night]){background:#d4dee8}
#mafia-view.mf-in-room[data-phase=night]{background:#e1e9f1;border-color:#9eb1c5}
body:has(#mafia-view.mf-in-room:not([hidden]))::after{content:'';position:fixed;inset:0;z-index:1000;pointer-events:none;background:#102038;opacity:0;transition:opacity .5s ease}
body:has(#mafia-view.mf-in-room:not([hidden])[data-phase=vote])::after{opacity:.055}
body:has(#mafia-view.mf-in-room:not([hidden])[data-phase=night])::after{opacity:.12}
#mafia-view.mf-in-room{transition:background-color .5s ease,border-color .5s ease}
@media(prefers-reduced-motion:reduce){body:has(#mafia-view.mf-in-room:not([hidden]))::after,#mafia-view.mf-in-room{transition:none}}

/* List incoming voters immediately below the participant identity. */
#mafia-view .mf-received-votes{margin:0;padding:6px 8px;border:1px solid #b3cfe6;border-radius:7px;background:#eaf4ff;color:#184d78;font-size:13px;line-height:1.5;overflow-wrap:anywhere;max-height:80px;overflow:auto;flex-shrink:0}

/* Readable private investigation history. */
#mafia-view #mf-investigations{padding:12px 16px}
#mafia-view #mf-investigations h3{font-size:22px;line-height:1.4;margin:0 0 8px}
#mafia-view #mf-investigation-list{font-size:20px;line-height:1.65;font-weight:650;max-height:180px;margin:0;padding-left:26px;overflow:auto}
#mafia-view #mf-investigation-list li{margin:6px 0;overflow-wrap:anywhere}

/* Visual part choices: each option previews its silhouette and facial details. */
#character-shop .human-choices{gap:7px;max-height:none;overflow:visible;padding:3px 3px 8px}
#character-shop .human-choices button:has(.human-option-preview){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;flex:0 0 92px;min-height:110px;padding:6px;font-size:12px;line-height:1.3}
#character-shop .human-option-preview{display:block;width:66px;height:73px;border-radius:10px;background-color:#eef5ff}
#character-shop .human-choices .human-swatch{width:36px;height:36px;flex:0 0 36px}
#character-shop .human-controls{min-height:300px;max-height:460px;overflow:auto;padding-right:5px}
#character-shop #human-presets{max-height:300px}

/* The same full editor is available from character change on every device. */
#character-shop #human-tabs{flex-wrap:wrap}
#character-shop #human-tabs button{min-width:70px;white-space:nowrap}
#character-shop .human-choices button.human-skin-choice{display:flex;flex-direction:column;align-items:center;gap:7px;flex:0 0 100px;min-height:92px;padding:8px;background:#fff;color:#244866;border:1px solid #a8c4db;font-size:12px;line-height:1.3}
#character-shop .human-skin-chip{display:block;width:48px;height:48px;border:1px solid #a9a099;border-radius:50%;box-shadow:inset 0 1px 3px #ffffff55}
#character-shop .human-choices button.human-skin-choice[aria-pressed=true]{background:#e6f2ff;border:2px solid #2878bd;padding:7px;box-shadow:0 0 0 2px #2878bd20}


/* Show each feature surcharge before selection, including zero-cost defaults. */
#character-shop .human-part-price{display:block;font-size:11px;line-height:1.4;color:#22517a;font-weight:700;white-space:nowrap}
#character-shop .human-choices button:has(.human-part-price){flex-basis:112px;min-height:128px}
#character-shop .human-choices button.human-swatch:has(.human-part-price){width:112px;height:64px;flex:0 0 112px;min-height:64px;display:flex;align-items:flex-end;justify-content:center;padding:4px;background:linear-gradient(to bottom,var(--swatch) 0 30px,#fff 30px)}
#character-shop #human-price-breakdown,#character-shop .human-ear-price{font-size:13px;line-height:1.5;color:#244866}

/* Emphasize the acorn charging entry. */
.sidebar .side-character-actions #character-payment-open,.sidebar .side-character-actions #character-payment-open:hover{color:#123a61;font-weight:900}
#character-shop #character-charge-open,#gift-charge-open{font-weight:900}
#cash-dialog #cash-title{color:#123a61;font-weight:900}

/* Phones and computers share the desktop character collection. */


/* Make participants and the chosen action target easy to recognize. */
#mafia-view.mf-in-room .mf-player{grid-template-columns:88px minmax(0,1fr) auto;grid-template-areas:"portrait state state" "portrait record count" "portrait role role";height:124px;min-height:124px;max-height:none;padding:10px!important;gap:6px 10px;align-content:center}
#mafia-view.mf-in-room .mf-character-portrait{width:88px;height:96px;font-size:52px;border-radius:12px;margin:0}
#mafia-view .mf-player-state{position:static;grid-area:state;justify-self:end;font-size:12px}
#mafia-view .mf-player-wrap[data-selected=true]{background:#fff1a6;border-radius:12px;outline:4px solid #e89a00;outline-offset:1px;box-shadow:0 0 0 7px #ffc94744}
#mafia-view .mf-player-wrap[data-selected=true] .mf-player-identity{background:#985000;border-color:#e89a00}
#mafia-view .mf-player[aria-pressed=true],#mafia-view .mf-player[aria-pressed=true]:disabled{background:#ffe36b;color:#492b00;border:3px solid #c77b00;opacity:1;box-shadow:inset 0 0 0 2px #fff4b8}
#mafia-view .mf-player[aria-pressed=true] small{color:#492b00}
#mafia-view .mf-selection-badge{position:absolute;right:8px;top:7px;background:#673600;color:#fff;padding:4px 8px;border-radius:6px;font-size:15px;font-weight:900;z-index:1;pointer-events:none}
#mafia-view .mf-player[aria-pressed=true] .mf-player-state{visibility:hidden}
#character-shop .human-option-preview{width:88px;height:96px}
#character-shop .human-preset-portrait{width:88px;height:96px}
#character-shop .character-design-card .character-shop-portrait{width:120px;height:132px}
#mafia-view.mf-in-room .mf-player-wrap>.mf-player{flex:0 0 124px}

/* Give every participant a clear, full-width listening volume slider. */
#mafia-view .mf-player-identity{flex-wrap:wrap;gap:5px}
#mafia-view .mf-player-identity>strong{flex:1 0 100%;font-size:15px}
#mafia-view .mf-player-audio{flex:1 0 100%;width:100%}
#mafia-view .mf-inline-volume{grid-template-columns:80px minmax(65px,1fr) 34px;font-size:12px}
#mafia-view .mf-inline-volume input{min-height:32px}
#mf-connect-audio{width:100%;padding:10px;background:#246ca7;color:#fff;font-weight:800;border-radius:8px}

#mafia-view .mf-message .mf-message-time{display:inline-block;margin-left:10px;font-size:12px;font-weight:600;color:#476b8d;font-variant-numeric:tabular-nums;white-space:nowrap}

#mafia-view .mf-room-toolbar{flex-wrap:wrap}
#mafia-view .mf-room-summary{display:flex;align-items:center;gap:10px;flex:1;flex-wrap:wrap;min-width:0}
#mafia-view .mf-room-summary h2{flex-shrink:0}
#mafia-view .mf-room-role-line{margin:0;padding:5px 9px;border:1px solid #9abedc;border-radius:8px;background:#e4f1ff;color:#194c77;font-size:14px;font-weight:800;line-height:1.5}

/* The enabled join button covers its entire room card. */
#mafia-view .mf-room-card{position:relative}
#mafia-view .mf-room-card>button{position:static}
#mafia-view .mf-room-card>button:not(:disabled)::after{content:"";position:absolute;inset:0;z-index:1;border-radius:14px;cursor:pointer}
#mafia-view .mf-room-card:has(>button:not(:disabled)):hover{background:#e9f4ff;border-color:#397db6;box-shadow:0 0 0 2px #397db622}
#mafia-view .mf-room-card:has(>button:focus-visible){outline:3px solid #2675bf;outline-offset:3px}

.site-business-footer{margin:24px 0 0 var(--sidebar);padding:22px;border-top:1px solid #bcd2e5;background:#e8f2fc;color:#3d5d79;font-size:13px;line-height:1.8;overflow-wrap:anywhere}
.site-business-footer p{display:flex;flex-wrap:wrap;gap:4px 20px;margin:4px 0}
.site-business-footer strong{font-weight:800;color:#193c60}
.site-business-footer a{color:#244e73;text-decoration:underline;text-underline-offset:3px}

/* Large rooms keep chat beside the seats instead of below every participant. */
#mafia-view.mf-large-room .mf-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:12px;align-items:start}
#mafia-view.mf-large-room .mf-main{min-width:0}
#mafia-view.mf-large-room .mf-players{max-height:clamp(300px,calc(100dvh - 380px),680px);overflow:auto;align-content:start;padding:7px;scrollbar-gutter:stable;overscroll-behavior:contain}
#mafia-view.mf-large-room .mf-chat-stack:not(:fullscreen){position:sticky;top:12px;display:flex;flex-direction:column;width:100%;height:clamp(320px,calc(100dvh - 240px),760px);min-height:320px;flex:none;gap:8px;overflow:hidden}
#mafia-view.mf-large-room .mf-chat-stack:not(:fullscreen)>.mf-chat{display:flex;flex-direction:column;flex:1 1 0;min-height:0;height:auto;width:100%;align-self:stretch}
#mafia-view.mf-large-room .mf-chat-list{height:auto;flex:1 1 0;min-height:0;overflow:auto}
#mafia-view.mf-large-room .mf-chat-heading,#mafia-view.mf-large-room .mf-chat form{flex-shrink:0}
#mafia-view.mf-large-room .mf-chat-heading h3{font-size:16px}
#mafia-view.mf-large-room .mf-chat-stack:not(:fullscreen) .mf-message p{font-size:17px;line-height:1.5}

/* Eight and eleven seats form four-column rows beside the visible chat. */
#mafia-view.mf-in-room:is([data-capacity="8"],[data-capacity="11"]) .mf-layout{grid-template-columns:minmax(0,1fr) 300px}
#mafia-view.mf-in-room:is([data-capacity="8"],[data-capacity="11"]) .mf-players{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
#mafia-view.mf-in-room:is([data-capacity="8"],[data-capacity="11"]) .mf-player-wrap{min-width:0}
#mafia-view.mf-in-room:is([data-capacity="8"],[data-capacity="11"]) .mf-player-identity>strong{font-size:13px;white-space:normal;overflow-wrap:anywhere}
#mafia-view.mf-in-room:is([data-capacity="8"],[data-capacity="11"]) .mf-inline-volume{grid-template-columns:minmax(0,1fr) 30px;gap:0 3px;font-size:11px}
#mafia-view.mf-in-room:is([data-capacity="8"],[data-capacity="11"]) .mf-inline-volume>span{grid-column:1/-1}
#mafia-view.mf-in-room:is([data-capacity="8"],[data-capacity="11"]) .mf-inline-volume input{min-width:0}
#mafia-view.mf-in-room:is([data-capacity="8"],[data-capacity="11"]) .mf-player-wrap>.mf-player{grid-template-columns:88px minmax(0,1fr);grid-template-areas:"portrait count" "record record" "role role";height:154px;min-height:154px;flex:0 0 154px;padding:6px!important;gap:3px 4px}
#mafia-view.mf-in-room:is([data-capacity="8"],[data-capacity="11"]) .mf-player .mf-vote-count{font-size:21px;padding:0}
#mafia-view.mf-in-room:is([data-capacity="8"],[data-capacity="11"]) .mf-player .mf-player-record{font-size:10px}

/* Show all three eleven-player rows without an inner scrolling viewport. */
#mafia-view #mf-players[data-capacity="11"]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,auto);grid-auto-flow:row;max-height:none;height:auto;overflow:visible;scrollbar-gutter:auto;gap:8px}

/* A warm lobby with varied seat colors; colors never indicate hidden roles. */
:root{--bg:#faf5ed;--ink:#3d354b;--muted:#706579;--line:#ded3e4;--green:#287760;--orange:#b45e36;--sky:#7454a0;--sky-ink:#3d354b;--sky-muted:#706579;--sky-line:#ded3e4}
body,body:has(#mafia-view.mf-in-room:not([hidden])[data-phase=discussion]){background:#faf5ed}
body:has(#mafia-view.mf-in-room:not([hidden])[data-phase=vote]){background:#f8f0e6}
body:has(#mafia-view.mf-in-room:not([hidden])[data-phase=night]){background:#eae5f2}
.topbar{background:#fffaf2;border-color:#e3d9c9}
.sidebar{background:linear-gradient(180deg,#ede5f7,#e5f2eb);color:#49395f;border-color:#d2c3df;scrollbar-color:#ae9abc #eee7f5}
.sidebar .site-brand{color:#65418a}.sidebar .site-brand small{color:#7c628f}
.sidebar .side-character-actions{background:#f9f0e3;border-color:#e6cfaa}
.sidebar .gift-wallet-card{background:#fff3d6;border-color:#ddc183;color:#715525}
.sidebar .gift-wallet-card h3,.sidebar .gift-wallet-card .acorn-owned strong{color:#80531c}
.sidebar .gift-wallet-card p{color:#7c653f}
.sidebar .mf-media{background:#e4f4eb;border-color:#a8cfb8;color:#285d47}
.sidebar .mf-media h3,.sidebar .mf-volume-controls label,.sidebar .mf-volume-controls output{color:#285d47}
.sidebar .mf-volume-controls input{accent-color:#378766}
#mf-connect-audio{background:#347b60;color:#fff}
.mafia-view,#mafia-view.mf-in-room,#mafia-view.mf-in-room[data-phase=discussion],#mafia-view.mf-in-room[data-phase=vote]{--mf-line:#d9cde3;--mf-muted:#74647e;--mf-accent:#8055a0;background:#fffcf7;border-color:#d9cde3;color:#44374f}
#mafia-view.mf-in-room[data-phase=night]{background:#f2edf8;border-color:#bdabcd}
.mf-heading h1{color:#68428a}.mf-intro{background:linear-gradient(120deg,#f4e8fa,#fff0da);border-color:#d7bfdc}
.mf-first-guide{background:#fffcf8;border-color:#dbc7db}.mf-first-guide strong{color:#794c88}
.mafia-view button,#mf-create{background:#78519b;border-color:#654184;color:#fff}
.mafia-view button:not(:disabled):hover,#mf-create:not(:disabled):hover{background:#644087}
.mafia-view .mf-quiet{background:#f0e8f7;border-color:#ccb7df;color:#62437f}
.mafia-view .mf-quiet:not(:disabled):hover{background:#e7d8f2}
.mf-room-card{background:#f4edfb;border-color:#d4c0e2}.mf-room-card:nth-child(3n+2){background:#eaf6ef;border-color:#b7d7c3}.mf-room-card:nth-child(3n){background:#fff1e3;border-color:#e5c5a5}
#mafia-view .mf-room-card:has(>button:not(:disabled)):hover{background:#eee1f7;border-color:#9766b6;box-shadow:0 0 0 2px #9766b622}
#mafia-view .mf-room-role-line{background:#fff0d5;border-color:#dec18e;color:#785326}
.mf-phase-bar{background:#fff0ce;border-color:#dfbd72}.mf-phase-bar span{color:#87662f}.mf-phase-bar strong,.mf-phase-bar output{color:#8a5b19}
.mafia-view[data-phase=night] .mf-phase-bar{background:#e8def5;border-color:#b49acb}.mafia-view[data-phase=night] .mf-phase-bar strong,.mafia-view[data-phase=night] .mf-phase-bar output{color:#654187}
.mf-phase-help{background:#f2eafa;border-color:#af83c5;color:#654479}
.mf-role-card{background:#fff1df;border-color:#d9bb8a}.mf-role-card>span,.mf-role-card h3{color:#86592f}
.mf-role-card[data-role=doctor]{background:#e6f5ec;border-color:#a4cdb5}.mf-role-card[data-role=doctor] h3{color:#2c7053}
.mf-role-card[data-role=detective]{background:#e9effc;border-color:#a8bee4}.mf-role-card[data-role=detective] h3{color:#3e5f9c}
.mf-role-card[data-role=mafia]{background:#fce7e9;border-color:#dda6ad}.mf-role-card[data-role=mafia] h3{color:#a13b51}
#mafia-view .mf-player-wrap{--seat-dark:#785094;--seat-soft:#f4ebfa;--seat-edge:#d2b8e1}
#mafia-view .mf-player-wrap:nth-child(6n+2){--seat-dark:#34765c;--seat-soft:#eaf6ee;--seat-edge:#add2b9}
#mafia-view .mf-player-wrap:nth-child(6n+3){--seat-dark:#a95836;--seat-soft:#fff0e6;--seat-edge:#e6bfa5}
#mafia-view .mf-player-wrap:nth-child(6n+4){--seat-dark:#386c9e;--seat-soft:#eaf2fd;--seat-edge:#afc8e4}
#mafia-view .mf-player-wrap:nth-child(6n+5){--seat-dark:#a0446a;--seat-soft:#fcebf2;--seat-edge:#dfb3c7}
#mafia-view .mf-player-wrap:nth-child(6n){--seat-dark:#806518;--seat-soft:#fff6dc;--seat-edge:#d9c583}
#mafia-view .mf-player-wrap:not([data-selected=true]) .mf-player-identity{background:var(--seat-dark);border-color:var(--seat-dark)}
#mafia-view .mf-player-wrap .mf-player:not([aria-pressed=true]){background:var(--seat-soft);border-color:var(--seat-edge);color:#44374f}
#mafia-view .mf-player-wrap .mf-player:not(:disabled):not([aria-pressed=true]):hover{box-shadow:inset 0 0 0 2px var(--seat-dark)}
#mafia-view .mf-player-wrap .mf-character-portrait{background:var(--seat-soft);border-color:var(--seat-edge)}
#mafia-view .mf-player-wrap .mf-vote-count{background:#fffaf1;border-color:var(--seat-edge);color:var(--seat-dark)}
#mafia-view .mf-player-state{background:#fffcf6;border-color:#d8cbdc;color:#65566e}
#mafia-view .mf-chat:not(.mf-team-chat){background:#f7fcf8;border-color:#b0cfbb}
#mafia-view .mf-chat:not(.mf-team-chat) .mf-chat-heading,#mafia-view .mf-chat:not(.mf-team-chat) form{background:#e4f2e9;border-color:#bad6c4}
#mafia-view .mf-chat:not(.mf-team-chat) .mf-chat-heading h3{color:#31644c}
#mafia-view .mf-chat:not(.mf-team-chat) .mf-message strong{color:#337557}
#mafia-view .mf-chat:not(.mf-team-chat) form button{background:#347b60;border-color:#28634c}
#mafia-view .mf-team-chat{background:#fcf4f9;border-color:#d5adca}
#mafia-view .mf-team-chat .mf-chat-heading,#mafia-view .mf-team-chat form{background:#f4e3ef;border-color:#d7b4cc}
#mafia-view .mf-team-chat .mf-chat-heading h3{color:#923e75}
#mafia-view .mf-message p{color:#42394c}
#mafia-view #mf-action-controls #mf-abstain{background:#ffe6ab;border-color:#d6aa48;color:#704c12}
#mafia-view #mf-action-controls #mf-abstain:not(:disabled):hover{background:#ffda84;border-color:#bc8b2c}
.mf-investigations{background:#eef0fc;border-color:#bec2e2}.mf-log{background:#f4edf8;border-color:#d3bfdc}
dialog,.cash-dialog,#character-shop,.mf-result-dialog{background:#fffbf5;border-color:#c9b3d5;color:#493958}
dialog h2,.cash-heading h2,.character-shop-heading h2,.mf-result-dialog h2{color:#755097}
dialog button,.cash-dialog button,#character-shop button,.mf-result-dialog button,dialog .primary-button{background:#78519b;border-color:#654184;color:#fff}
.character-design-card:nth-child(3n+1){background:#f2eafb;border-color:#d3bee4}.character-design-card:nth-child(3n+2){background:#eaf6ef;border-color:#b5d3c0}.character-design-card:nth-child(3n){background:#fff0e2;border-color:#e5c3a3}
.character-bank,.gift-wallet-summary>div,.gift-bank-details{background:#fff2d6;border-color:#ddc18e;color:#785722}
.site-business-footer{background:#eee6f3;border-color:#d6c5df;color:#6b5878}.site-business-footer strong{color:#614277}.site-business-footer a{color:#724b8e}

/* Private, confirmed results sit beside the participant name. */
#mafia-view .mf-player-identity:has(.mf-known-side)>strong{flex:1 1 0;min-width:0}
#mafia-view .mf-known-side{display:inline-block;flex:0 0 auto;max-width:100%;padding:5px 8px;border:2px solid #fff;border-radius:8px;background:#fff1f1;color:#a31535;font-size:22px;font-weight:900;line-height:1.3;box-shadow:0 2px 7px #0002;white-space:nowrap}
#mafia-view .mf-known-side[data-side=citizens]{background:#eaffef;color:#185c35;border-color:#b5f0ca}

#mafia-view .mf-phase-bar .mf-clock-controls{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px}
#mafia-view #mf-extend,#mafia-view #mf-shorten{min-height:36px;padding:6px 12px;background:#78519b;border:1px solid #654184;color:#fff;font-size:14px;font-weight:800;white-space:nowrap}
#mafia-view #mf-extend:disabled,#mafia-view #mf-shorten:disabled{background:#eee5f5;border-color:#c9b5db;color:#6a527e;opacity:1;cursor:default}

/* Make privately identified mafia teammates easy to read. */
#mafia-view .mf-player .mf-mafia-ally-label{display:block;grid-area:role;font-size:22px;font-weight:900;line-height:1.35;color:#9a2247;background:#fff0f4;border:1px solid #dca2b3;border-radius:6px;padding:3px 6px;white-space:normal;overflow-wrap:anywhere}
#mafia-view .mf-chat-stack #mf-team-roster{font-size:20px;font-weight:800;line-height:1.5;max-height:none;overflow:visible;color:#842757;background:#fff0f7;border-color:#d6a8c4;padding:8px 10px}

#mafia-view.mf-in-room #mf-players .mf-player-wrap>.mf-player:has(.mf-mafia-ally-label){height:auto;min-height:154px;flex:0 0 auto;overflow:visible}

#mafia-view .mf-player .mf-police-confirmed-label{font-size:28px;font-weight:900;text-align:center;color:#a11635;background:#ffe6ec;border:2px solid #cd526d;padding:5px 8px}
#mafia-view .mf-known-side[data-side=mafia]{font-size:26px;color:#a11635;background:#ffe6ec;border-color:#ffcad5}

/* Use the table space for readable names, votes and conversation. */
#mafia-view.mf-in-room{padding:6px;gap:4px}
#mafia-view.mf-in-room .mf-room-toolbar h2{font-size:20px}
#mafia-view .mf-room-role-line{font-size:16px;padding:4px 7px}
#mafia-view.mf-in-room .mf-phase-bar{padding:4px 10px}
#mafia-view.mf-in-room .mf-phase-bar strong{font-size:25px}
#mafia-view.mf-in-room .mf-phase-bar output{font-size:68px}
#mafia-view.mf-in-room #mf-phase-help,#mafia-view.mf-in-room #mf-vote-progress{font-size:16px;line-height:1.4;padding:5px 7px}
#mafia-view.mf-in-room #mf-players{gap:6px;align-items:start;padding:3px}
#mafia-view.mf-in-room #mf-players>.mf-player-wrap{min-height:0;height:auto;padding-bottom:0;gap:3px}
#mafia-view.mf-in-room #mf-players .mf-player-identity{padding:5px 6px;gap:3px}
#mafia-view.mf-in-room #mf-players .mf-player-identity>strong{font-size:18px;line-height:1.3;font-weight:850;overflow-wrap:anywhere}
#mafia-view.mf-in-room #mf-players .mf-player-identity:has(.mf-known-side)>strong{flex:1 1 90px}
#mafia-view.mf-in-room #mf-players .mf-inline-volume{grid-template-columns:48px minmax(0,1fr) 32px;gap:2px;font-size:13px;line-height:1.2}
#mafia-view.mf-in-room #mf-players .mf-inline-volume>span{grid-column:auto}
#mafia-view.mf-in-room #mf-players .mf-inline-volume input{min-height:24px;height:24px}
#mafia-view.mf-in-room #mf-players .mf-player-wrap>.mf-player{height:auto;min-height:108px;max-height:none;flex:0 0 auto;grid-template-columns:64px minmax(0,1fr);grid-template-areas:'portrait state' 'portrait count' 'record record' 'role role';gap:3px 5px;padding:5px!important;overflow:visible;align-content:start}
#mafia-view.mf-in-room #mf-players .mf-character-portrait{width:64px;height:70px;border-radius:9px}
#mafia-view.mf-in-room #mf-players .mf-player-state{display:inline-block;grid-area:state;font-size:13px;padding:1px 4px;justify-self:end;visibility:visible}
#mafia-view.mf-in-room #mf-players .mf-player[aria-pressed=true] .mf-player-state{visibility:hidden}
#mafia-view.mf-in-room #mf-players .mf-vote-count{font-size:28px;line-height:1.2;padding:1px 4px}
#mafia-view.mf-in-room #mf-players .mf-player-record{font-size:13px;line-height:1.3;white-space:normal}
#mafia-view.mf-in-room #mf-players .mf-player small:not(.mf-player-record):not(.mf-mafia-ally-label){font-size:16px;line-height:1.3;white-space:normal}
#mafia-view.mf-in-room #mf-players .mf-role-note{padding:4px 6px;font-size:14px;line-height:1.3}
#mafia-view.mf-in-room #mf-players .mf-role-note>span{margin-bottom:3px}
#mafia-view.mf-in-room #mf-players .mf-role-note textarea{height:36px;min-height:36px;padding:3px 5px;font-size:16px;line-height:1.4}
#mafia-view.mf-in-room #mf-players .mf-received-votes{padding:4px 6px;font-size:14px;line-height:1.3}
#mafia-view.mf-in-room #mf-players .mf-peer-menu{position:relative;bottom:auto;height:auto;margin:0}
#mafia-view.mf-in-room #mf-players .mf-peer-menu>summary{font-size:14px;line-height:1.4}
#mafia-view .mf-chat-stack .mf-chat-heading h3{font-size:20px}
#mafia-view .mf-chat-stack .mf-message strong{font-size:16px}
#mafia-view.mf-large-room .mf-chat-stack:not(:fullscreen) .mf-message p,#mafia-view .mf-chat-stack .mf-message p{font-size:20px;line-height:1.45;margin:3px 0}
#mafia-view .mf-chat-stack .mf-message{margin-bottom:8px}
#mafia-view .mf-chat-stack .mf-chat input{font-size:18px;padding:7px}
#mafia-view .mf-chat-stack .mf-chat-list{padding:7px}
#mafia-view #mf-extend,#mafia-view #mf-shorten{font-size:16px;padding:5px 9px}
#mafia-view .mf-room-toolbar button{font-size:16px;min-height:34px}
#mafia-view #mf-invite,#mafia-view #mf-leave{font-size:36px;font-weight:800;line-height:1.3;min-height:90px;padding:20px 28px;white-space:normal;max-width:100%;overflow-wrap:anywhere}
#mafia-view .mf-intro p,#mafia-view .mf-setup{font-size:17px;line-height:1.5}
.sidebar .profile-card strong{font-size:18px}.sidebar .account-buttons .login-button{font-size:15px}.sidebar .gift-wallet-card p{font-size:14px}.sidebar .profile-records{font-size:13px}

#mafia-view.mf-in-room #mf-players{height:auto;max-height:none;overflow:visible;scrollbar-gutter:auto}

.sidebar #mf-audio-status{grid-column:1/-1;font-size:14px;line-height:1.5;margin:4px 0;color:#245b48;font-weight:700}

/* Game preferences and independently scrollable seat table. */
.mf-table-scroll{grid-area:players;min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-gutter:auto}
.mf-mobile-menu,.mf-mobile-tabs,.mf-mobile-table-hint,.mf-menu-backdrop{display:none}
#mafia-view .mf-preferences{margin:6px 0 10px;padding:9px 12px;border:1px solid #cbbddd;border-radius:10px;background:#fbf7ff;font-size:16px}
#mafia-view .mf-preferences summary{cursor:pointer;font-weight:700}
#mafia-view .mf-preferences>div{display:flex;gap:14px;flex-wrap:wrap;align-items:center;padding-top:10px}
#mafia-view .mf-preferences label{display:flex;gap:7px;align-items:center}
#mafia-view .mf-preferences input[type=range]{width:110px}
#mafia-view .mf-preferences p{width:100%;margin:0;font-size:14px}
#mafia-view #mf-game-status{position:sticky;top:0;z-index:15;border:1px solid #c9bfda;border-radius:9px;background:#fff8e8;color:#453450;padding:9px 12px;margin:5px 0 9px;font-size:calc(19px * var(--mf-font-scale,1));font-weight:800;box-shadow:0 2px 7px #42335418}
#mafia-view.mf-in-room #mf-players .mf-player-identity>strong{font-size:calc(18px * var(--mf-font-scale,1))}
#mafia-view.mf-in-room #mf-players .mf-role-note textarea{font-size:calc(16px * var(--mf-font-scale,1))}
#mafia-view.mf-in-room #mf-players .mf-known-side{font-size:calc(24px * var(--mf-font-scale,1))}
#mafia-view.mf-in-room #mf-players .mf-mafia-ally-label{font-size:calc(22px * var(--mf-font-scale,1))}
#mafia-view.mf-in-room .mf-chat-stack .mf-message p{font-size:calc(20px * var(--mf-font-scale,1))}
#mafia-view .mf-phase-help,#mafia-view #mf-role-help{font-size:calc(16px * var(--mf-font-scale,1))}

/* Keep conversation readable for every room size, including five-player lobbies. */
#mafia-view.mf-in-room #mf-game .mf-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;align-items:start}
#mafia-view.mf-in-room #mf-chat-stack:not(:fullscreen){position:sticky;top:12px;display:flex;flex-direction:column;gap:8px;width:100%;height:clamp(720px,calc(100dvh - 180px),960px);min-height:720px;flex:none;overflow:hidden}
#mafia-view.mf-in-room #mf-chat-stack:not(:fullscreen)>.mf-chat{display:flex;flex-direction:column;flex:1 1 0;height:auto;min-height:0;width:100%;align-self:stretch}
#mafia-view.mf-in-room #mf-chat-stack .mf-chat-list{height:auto;min-height:180px;flex:1 1 0;overflow:auto}
#mafia-view.mf-in-room #mf-chat-stack .mf-chat-heading,#mafia-view.mf-in-room #mf-chat-stack form{flex-shrink:0}
#mafia-view.mf-in-room #mf-players .mf-kick-button{display:block;width:100%;min-height:56px;margin-top:6px;padding:10px 14px;font-size:24px;line-height:1.3;font-weight:850;background:#a82e42;border:2px solid #812136;color:#fff;border-radius:10px}

#mafia-view .mf-player .mf-police-confirmed-label.mf-police-citizen-label{color:#185c35;background:#eaffef;border-color:#69b982}

.mf-first-guide .mf-setup-guide{margin-top:12px;padding-top:10px;border-top:1px solid #dbc7db}.mf-first-guide .mf-setup-guide p{margin:4px 0;line-height:1.7}.mf-first-guide .mf-setup-guide b{color:#794c88}

#mafia-view .mf-role-preferences{display:grid;gap:6px;padding:10px 14px;border:1px solid #c4add5;border-radius:10px;background:#f5eefb;color:#654184;font-size:16px;font-weight:750}#mafia-view .mf-role-preferences[hidden]{display:none}#mafia-view .mf-role-preferences select{min-width:180px;min-height:44px;padding:7px 12px;border:1px solid #b79aca;border-radius:8px;background:#fff;color:#493958;font:inherit}

#mafia-view .mf-role-preferences{max-width:480px}#mafia-view .mf-role-mode-buttons{display:flex;gap:8px;flex-wrap:wrap}#mafia-view .mf-role-mode-buttons button{min-height:44px;font-size:16px;padding:8px 14px;background:#fff;color:#654184;border-color:#c4add5}#mafia-view .mf-role-mode-buttons button[aria-pressed=true]{background:#78519b;color:#fff;border-color:#654184}#mafia-view .mf-role-preferences p{margin:0;font-size:15px}#mafia-view .mf-role-preferences small{font-size:13px;line-height:1.6}

#mafia-view #mf-start,#mafia-view #mf-leave{box-sizing:border-box;flex:0 0 340px;width:340px;max-width:100%;height:90px;min-height:90px;font-size:36px;font-weight:800;line-height:1.3;padding:20px 28px;white-space:normal;overflow-wrap:anywhere}

#mafia-view.mf-in-room .mf-room-summary{flex:1 1 450px;gap:15px}
#mafia-view.mf-in-room .mf-room-summary h2{font-size:30px}
#mafia-view .mf-room-role-line{font-size:24px;padding:6px 10.5px}

#mafia-view #mf-leave{white-space:nowrap;overflow-wrap:normal}
#mafia-view:is([data-phase="night"],[data-phase="discussion"],[data-phase="vote"]) #mf-leave{font-size:28px;padding-inline:12px}

#mafia-view.mf-in-room #mf-action-controls #mf-abstain{box-sizing:border-box;width:600px;min-width:0;max-width:100%;min-height:108px;font-size:63px;line-height:1.3;padding:12px 48px}
