:root{--paper:#f3f5f3;--ink:#252f2b;--muted:#5e6d64;--line:#d8dfd9;--yellow:#f8d84f}
*{box-sizing:border-box;letter-spacing:0}
body{margin:0;background:var(--paper);color:var(--ink);font:14px "Segoe UI",Arial,sans-serif}
button,textarea{font:inherit;color:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:default}
button:focus-visible,a:focus-visible,textarea:focus-visible{outline:3px solid #357961;outline-offset:3px}
[hidden]{display:none!important}
.topbar{max-width:1600px;margin:auto;padding:12px 24px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line)}
.brand{display:flex;gap:10px;align-items:center;color:inherit;text-decoration:none;font-weight:900;font-size:16px;line-height:1}
.brand-icon{display:none}.brand-dot{color:#357961}.edition{font-size:11px;color:var(--muted)}
.tools{display:flex;gap:8px}.icon-button{border:1px solid var(--line);border-radius:6px;background:white;min-height:40px;padding:8px 12px;display:flex;gap:8px;align-items:center}
.icon-button span{font-size:12px}main{max-width:1600px;margin:auto;padding:16px 24px}
.resource-nav{display:flex;gap:20px;align-items:center;margin-bottom:16px}.resource-nav a{color:#35644c;text-decoration:none;font-weight:600}.resource-nav h1{font-size:20px;margin:0}
.workspace{display:grid;grid-template-columns:280px minmax(0,1fr);gap:20px;align-items:start}
.panel{min-width:0}.roster-panel{padding:16px 0}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:18px}
h2{font-size:18px;margin:0}.pill{font-size:12px;color:var(--muted);white-space:nowrap}
label{display:flex;justify-content:space-between;font-weight:600;margin-bottom:8px}label span{font-weight:400;color:var(--muted);font-size:12px}
textarea{width:100%;height:190px;resize:vertical;min-height:90px;padding:12px;border:1px solid #b6c4b9;border-radius:6px;background:white;line-height:1.6}
.input-meta{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:11px;color:var(--muted);margin:8px 0 16px}
.text-button{background:none;border:0;padding:4px 0;font-size:12px;text-decoration:underline;text-underline-offset:3px}
#error{color:#a33232;font-size:12px}.primary{width:100%;border:1px solid #ddbf41;border-radius:6px;background:var(--yellow);padding:13px 16px;font-weight:700;display:flex;justify-content:space-between}
.primary:hover{background:#ffe377}.privacy{font-size:11px;color:var(--muted);line-height:1.5}
.roster-caption{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);gap:8px}
.selected-box{border-top:1px solid var(--line);padding-top:16px;margin-top:20px}
#history{max-height:160px;overflow:auto}.empty-history{font-size:12px;color:var(--muted)}
.history-item{display:flex;gap:10px;padding:8px 0;font-size:12px;border-bottom:1px solid var(--line)}.history-name{flex:1;overflow-wrap:anywhere}.history-item small{white-space:nowrap}
.arena-panel{overflow:hidden;border:1px solid #b7c4b3;border-radius:8px;background:white}
.arena-top{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;padding:10px 16px;font-size:11px}
.arena-top>div{display:flex;align-items:center;gap:10px}.live-dot{width:6px;height:6px;background:#518367;border-radius:50%}.muted{color:var(--muted)}#timer{font-size:18px;font-variant-numeric:tabular-nums}
.arena-wrap{position:relative;aspect-ratio:1120/730;max-height:calc(100dvh - 230px);min-height:0;background:#e9e5ce}
canvas{display:block;width:100%;height:100%;object-fit:contain}
.welcome{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);padding:10px 18px;background:#fffffff0;border:1px solid var(--line);border-radius:6px;pointer-events:none}
.welcome h2{font-size:18px;white-space:nowrap}
.arena-bottom{display:flex;align-items:center;gap:16px;padding:12px 16px;min-height:60px;border-top:1px solid var(--line)}
.cat-status{display:flex;gap:10px;align-items:center}.cat-status>span{font-size:24px}.cat-status b{display:block;font-size:12px}.cat-status div>span{font-size:11px;color:var(--muted)}
.cat-meter{margin-left:auto;width:100px;height:5px;background:#e5e9df;overflow:hidden;border-radius:3px}.cat-meter div{height:100%;background:#9baa73}.exit-legend{font-size:11px}
#mice-list{max-height:300px;overflow:auto;margin:8px 0 16px}
.mouse-row{display:flex;gap:9px;align-items:center;padding:9px 0;border-bottom:1px solid var(--line)}
.mouse-dot{width:28px;height:28px;display:grid;place-items:center;background:var(--mouse-color);border-radius:50%;flex-shrink:0}
.mouse-info{flex:1;min-width:0}.mouse-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.hp-track{height:3px;background:#e5e9df;margin-top:5px}.hp-track i{display:block;height:100%;background:#9dac83}.mouse-stats{font-size:11px;text-align:right}.mouse-stats span{display:block;color:var(--muted);font-size:10px}
.secondary{border:1px solid var(--line);background:white;border-radius:6px;padding:11px;font-size:12px;font-weight:600}.full{width:100%;margin-bottom:10px}
#paused-overlay{position:absolute;inset:0;background:#f3f5f3ed;display:grid;align-content:center;justify-items:center;text-align:center;padding:16px}
#paused-overlay>span{font-size:32px}#paused-overlay h2{margin-top:12px}#paused-overlay p{color:var(--muted);font-size:12px}
dialog{padding:0;border:1px solid var(--line);border-radius:8px;width:420px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);background:white;color:var(--ink)}
dialog::backdrop{background:#172b2377}.result-card{padding:24px;text-align:center}.eyebrow{font-size:10px;color:var(--muted)}.result-card h2{font-size:24px;margin:8px 0}.result-card p{font-size:13px;line-height:1.6;color:var(--muted)}
.result-card .primary{margin:20px 0 16px}#result-art{font-size:48px;margin:12px 0}#winner-name{font-size:28px;font-weight:800;overflow-wrap:anywhere;color:#35644c;line-height:1.2;margin:12px 0}#result-stats{font-size:11px;color:var(--muted)}
@media(max-width:1000px){.workspace{grid-template-columns:240px minmax(0,1fr);gap:16px}.muted,.cheese-count{display:none}}
@media(max-width:760px){.topbar{padding:10px 16px}.edition{display:none}main{padding:12px 16px}.workspace{grid-template-columns:1fr}.roster-panel{order:2;padding-top:0}.arena-wrap{max-height:none}.arena-bottom{padding:10px}.cat-meter,.exit-legend{display:none}#names{height:120px}.resource-nav{margin-bottom:12px}.icon-button span{display:none}.icon-button{min-width:40px;justify-content:center}.arena-top{padding:10px}.arena-top b{font-size:10px}.welcome{bottom:8px;padding:6px 12px}.welcome h2{font-size:14px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
