@font-face{font-family:DM;src:url('../design/fonts/DMSans.ttf');font-weight:100 1000;font-display:swap}@font-face{font-family:Nunito;src:url('../design/fonts/Nunito.ttf');font-weight:200 1000;font-display:swap}*{box-sizing:border-box}body{margin:0;color:#252d37;background:#e8e7e4;font:14px/1.55 DM,system-ui,sans-serif}a{color:inherit}button,input,select,textarea{font:inherit;color:inherit}button,a.button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;border:1px solid #d5d2ca;border-radius:9px;padding:9px 14px;background:#fbf8f1;cursor:pointer;text-decoration:none}button:hover,a.button:hover{background:#efede5}button:disabled{opacity:.45;cursor:default}button.primary{background:#252d37;color:white;border-color:#252d37}button.danger{color:#9c3e29;border-color:#c5a397}input,select,textarea{min-height:44px;padding:10px 12px;border:1px solid #d5d2ca;border-radius:9px;background:#fdfbf6}textarea{width:100%;min-height:90px;resize:vertical}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #285fca;outline-offset:3px}.app-header{max-width:1280px;margin:auto;padding:24px 30px 18px;display:flex;justify-content:space-between;align-items:center;gap:20px}.brand{font:900 29px/1 Nunito,system-ui;letter-spacing:-1px;display:flex;align-items:center;gap:9px;text-decoration:none}.brand svg{width:22px;height:27px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}.brand span{font:500 13px DM,system-ui;letter-spacing:0;color:#70736c;margin-left:12px}.header-tools{display:flex;gap:10px;align-items:center}.header-tools label{color:#70736c;font-size:12px}.header-tools select{font-size:12px;min-width:165px}.demo-banner{width:calc(100% - 60px);max-width:1220px;margin:0 auto 20px;padding:12px 16px;background:#f1eadb;border:1px solid #d9caae;border-radius:10px;display:flex;gap:14px;font-size:12px;color:#675a43}.demo-banner strong{white-space:nowrap}.layout{max-width:1280px;margin:auto;padding:0 30px 40px;display:grid;grid-template-columns:185px minmax(0,1fr);gap:24px}#navigation{display:flex;flex-direction:column;gap:6px}#navigation a{display:flex;gap:10px;align-items:center;text-decoration:none;min-height:48px;padding:10px 14px;border-radius:10px;color:#656a62}#navigation svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}#navigation a[aria-current=page]{background:#252d37;color:#fbf8f1}#navigation .nav-note{font-size:11px;line-height:1.6;color:#73766e;padding:16px 14px}main{background:#fbf8f1;border:1px solid #d5d2ca;border-radius:18px;padding:26px 28px;min-width:0;min-height:660px}h1{font-size:27px;font-weight:600;letter-spacing:-.65px;line-height:1.25;margin:0 0 8px}h2{font-size:16px;font-weight:600;margin:0 0 12px}h3{font-size:14px;font-weight:500;margin:20px 0 10px}p{margin:0 0 16px}.muted{color:#70736c;font-size:13px}.page-heading{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:24px}.page-heading p{margin:0}.tag{display:inline-flex;align-items:center;border-radius:6px;padding:4px 7px;background:#efede5;font-size:11px;white-space:nowrap}.tag.good{color:#3d5e3d;background:#e4ecdf}.tag.warn{color:#8a5832;background:#f1e5d6}.tag.bad{color:#98432d;background:#f4e1d9}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0 26px}.metric{background:#f0ede5;padding:16px;border-radius:12px}.metric strong{display:block;font-size:27px;line-height:1.2;font-weight:600;margin:7px 0}.metric span{color:#70736c;font-size:12px}.metric small{font-size:11px;color:#70736c}.grid-two{display:grid;grid-template-columns:1fr 1fr;gap:22px}.box{border:1px solid #dedbd3;border-radius:12px;padding:18px;margin-bottom:18px}.box p:last-child{margin:0}.list-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #e1ded6;padding:12px 0}.list-row:first-of-type{border-top:0}.list-row small{display:block;color:#73766e;font-size:11px}.text-link{font-size:12px;color:#285fca;min-height:44px;display:inline-flex;align-items:center;gap:6px}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:20px 0}.toolbar input{flex:1;min-width:180px}.toolbar label{font-size:12px;color:#70736c}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:12px}th{text-align:left;font-size:11px;color:#70736c;font-weight:500;white-space:nowrap}th,td{padding:12px 10px;border-bottom:1px solid #e1ded6;vertical-align:middle}th:first-child,td:first-child{padding-left:0}td small{display:block;color:#73766e;font-size:11px}.row-button{border:0;padding:0;text-align:left;justify-content:flex-start;background:transparent;font-size:13px}.pagination{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:20px;font-size:12px;color:#70736c}.pagination div{display:flex;gap:8px}.empty{padding:36px 0;text-align:center;color:#70736c}.actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.note{font-size:12px;color:#70736c;background:#f0ede5;border-radius:9px;padding:12px 14px;margin:20px 0}.bar-row{margin:12px 0}.bar-label{display:flex;justify-content:space-between;font-size:12px;margin-bottom:7px}.bar{height:8px;background:#e8e4da;border-radius:5px;overflow:hidden}.bar span{height:100%;display:block;background:#285fca;border-radius:5px}.status-dot{width:7px;height:7px;border-radius:50%;background:#647f57;display:inline-block;margin-right:6px}.status-dot.warn{background:#ba6a32}.chart{display:flex;align-items:flex-end;gap:5px;height:100px;border-bottom:1px solid #d5d2ca;padding-top:5px;margin:20px 0 10px}.chart div{flex:1;background:#859abd;border-radius:3px 3px 0 0;min-width:3px}.chart-labels{display:flex;justify-content:space-between;font-size:11px;color:#70736c}.audit{font-size:12px}.audit small{color:#73766e;display:block}.audit p{font-size:12px;margin:5px 0 0}.report{padding:16px 0;border-top:1px solid #e1ded6}.report:first-of-type{border-top:0}.report p{font-size:12px;margin:8px 0;color:#70736c}.report .actions{margin:8px 0 0}dialog{padding:0;background:#fbf8f1;color:#252d37;border:1px solid #d5d2ca;border-radius:18px;width:min(580px,calc(100% - 32px));max-height:90dvh;box-shadow:0 20px 80px #252d3726}dialog::backdrop{background:#252d3766}.dialog-header{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid #dedbd3;gap:16px}.dialog-header h2{margin:0;font-size:19px}.icon-button{border:0;font-size:25px;width:44px;padding:0;background:transparent}#dialog-body{padding:22px 24px;overflow-wrap:anywhere}dialog label{display:block;font-size:12px;font-weight:500;margin:14px 0 6px}dialog select{width:100%}.confirm{display:flex!important;align-items:flex-start;gap:10px;font-weight:400!important;margin:18px 0!important}.confirm input{min-height:0;margin-top:4px;width:auto}.error{color:#9c3e29;font-size:12px;margin:12px 0}.error:empty{display:none}.detail-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}.detail-stats div{text-align:center;padding:12px;background:#f0ede5;border-radius:10px}.detail-stats strong{display:block;font-size:20px}.detail-stats small{font-size:11px;color:#70736c}.game-board{width:100%;height:auto}.game-board text{font-family:DM,system-ui}.storage-warning{position:fixed;bottom:12px;left:12px;right:12px;background:#f4e1d9;padding:12px;border-radius:10px;font-size:12px;z-index:5}#toast{position:fixed;bottom:20px;right:24px;background:#252d37;color:white;padding:12px 18px;border-radius:10px;box-shadow:0 8px 30px #252d3726;max-width:calc(100% - 40px);font-size:13px;z-index:6}.role-note{font-size:11px;color:#70736c;margin:20px 0}.section-title{display:flex;justify-content:space-between;gap:14px;align-items:center}.fine-print{font-size:11px;color:#73766e;margin-top:24px}.kpi-value{font-variant-numeric:tabular-nums}.mobile-cards{display:none}@media(max-width:1000px){.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.layout{grid-template-columns:160px minmax(0,1fr);gap:18px}.grid-two{grid-template-columns:1fr}}@media(max-width:700px){.app-header{padding:18px 16px;flex-wrap:wrap;gap:16px}.brand{font-size:26px}.brand span{font-size:12px}.header-tools{width:100%;justify-content:space-between}.demo-banner{width:calc(100% - 32px);margin:0 16px 16px;display:block;padding:12px}.demo-banner span{display:block;margin-top:4px}.layout{display:block;padding:0 16px 24px}#navigation{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-bottom:16px}#navigation a{font-size:12px;padding:8px;justify-content:center;gap:6px}#navigation svg{width:15px;flex-shrink:0}#navigation .nav-note{display:none}main{padding:22px 16px;border-radius:14px;min-height:500px}.page-heading{gap:10px}h1{font-size:25px}.metrics{gap:8px}.metric{padding:12px}.metric strong{font-size:23px}.toolbar{align-items:stretch}.toolbar input{min-width:100%;width:100%}.toolbar select{flex:1;min-width:0}.desktop-table{display:none}.mobile-cards{display:grid;gap:8px}.mobile-card{border:1px solid #dedbd3;border-radius:10px;padding:12px}.mobile-card .list-row{padding:6px 0;border:0}.mobile-card small{font-size:11px;color:#70736c}.pagination{flex-wrap:wrap}.pagination button{padding:8px 12px}.box{padding:14px}.dialog-header{padding:16px}#dialog-body{padding:18px 16px}.page-heading .tag{font-size:10px}.fine-print{font-size:10px}}@media(prefers-reduced-motion:no-preference){button,a.button{transition:background .15s}}

/* Keep native select behavior, with a consistently inset chevron. */
select{appearance:none;-webkit-appearance:none;padding-right:44px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23252d37' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;background-size:16px 16px}
@media(forced-colors:active){select{appearance:auto;-webkit-appearance:auto;background-image:none}}
.live-layout{display:block;max-width:1100px}.live-layout .list-row{flex-wrap:wrap}.live-layout .list-row small{overflow-wrap:anywhere}

.live-admin .game-board{max-height:42dvh}.live-admin #dialog-body .actions{align-items:center;justify-content:space-between}

.admin-tabs{justify-content:flex-start;gap:8px;flex-wrap:wrap;margin:16px 0}.admin-tabs button[aria-pressed=true]{background:#252e39;color:#fff}#admin-action-dialog textarea{display:block;width:100%;box-sizing:border-box;font:inherit;padding:12px;border:1px solid #cbc8bf;border-radius:10px;margin:10px 0;min-height:110px}#admin-action-dialog .actions{margin-top:20px;flex-wrap:wrap}#admin-action-error{color:#9b3d23}#admin-action-error:empty,#admin-action-feedback:empty{display:none}#admin-control-content .list-row{gap:16px}#admin-control-content p{overflow-wrap:anywhere}@media(max-width:500px){#admin-control-content .list-row{flex-wrap:wrap}.admin-tabs button{flex:1 1 110px}}

/* Consistent select arrows: reserve text space and inset the chevron from the frame. */
select:not([multiple]):not([size]){
 appearance:none!important;-webkit-appearance:none!important;
 padding-right:40px!important;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23252d37' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
 background-repeat:no-repeat!important;background-position:right 12px center!important;background-size:16px 16px!important;
}
select#language{width:76px;min-width:76px;padding-left:12px;flex-shrink:0}
@media(forced-colors:active){select:not([multiple]):not([size]){appearance:auto!important;-webkit-appearance:auto!important;background-image:none!important;padding-right:12px!important}}

/* Keep the longer wordmark clear of the admin section label on small screens. */
.brand{flex-wrap:wrap;row-gap:8px}.brand svg{flex-shrink:0}@media(max-width:500px){.brand span{flex-basis:100%;margin-left:0}}

.history-search{display:grid;grid-template-columns:minmax(200px,1fr) auto auto auto;gap:12px;align-items:end;margin:24px 0 12px}.history-search label{display:block;font-size:12px;color:#70736c;margin-bottom:6px}.history-search input{width:100%;min-width:0}.game-code{font:inherit;overflow-wrap:anywhere;user-select:text}.parti-code-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.parti-code-row .game-code{display:block;font-size:13px}.parti-code-row>div{min-width:0}.parti-code-row button{flex-shrink:0}@media(max-width:1000px){.history-search{grid-template-columns:1fr 1fr}.history-query{grid-column:1/-1}.history-search>button{grid-column:1/-1;justify-self:start}}@media(max-width:500px){.history-search{grid-template-columns:1fr}.history-query{grid-column:auto}.parti-code-row{align-items:flex-start;flex-direction:column}}
.admin-main-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 24px;padding:6px;background:#efede5;border-radius:14px}.admin-main-tabs button{border:0;background:transparent;color:#656a62;border-radius:10px;padding:10px 14px;min-height:44px}.admin-main-tabs button[aria-selected=true]{background:#fbf8f1;color:#252d37;box-shadow:0 2px 6px #252d3712;font-weight:650}.admin-panel[hidden],#admin-control-box[hidden],.admin-tabs[hidden],.admin-tabs button[hidden]{display:none!important}.admin-panel{min-width:0}.admin-panel:focus-visible{outline:3px solid #285fca;outline-offset:5px}.admin-panel #metrics .metrics{margin-top:0}@media(max-width:600px){.admin-main-tabs{gap:4px}.admin-main-tabs button{flex:1 1 auto;padding:10px}}
