/* Each value belongs to a real layout cell; no percentage positioning over baked text boxes. */
#game-screen .topbar{display:grid;grid-template-columns:minmax(190px,2.4fr) minmax(48px,.6fr) minmax(52px,.7fr) minmax(100px,1.3fr) minmax(74px,1fr) repeat(3,minmax(52px,.7fr));align-items:center;gap:clamp(4px,.65vw,12px);padding:1px clamp(6px,1.1vw,20px);min-width:760px;overflow:hidden}
#game-screen .topbar .date-window{position:relative;inset:auto;width:auto;height:calc(100% - 2px);min-width:0;display:flex;gap:7px;align-items:center;justify-content:flex-start;padding:0 6px;background:#28261e;border:1px solid #d6c493;box-shadow:inset 0 0 0 1px #514633;font-size:clamp(11px,.82vw,14px);font-weight:500;line-height:1.15;white-space:nowrap;overflow:hidden;color:#fff3d5}
#game-screen .topbar #date{flex:none}#game-screen .topbar #place{overflow:hidden;text-overflow:ellipsis;min-width:0}
#game-screen .topbar .resource{display:grid;position:relative;grid-template-columns:calc(15px * var(--s)) minmax(0,1fr);align-items:center;gap:4px;min-width:0;height:calc(100% - 2px)}
#game-screen .topbar .resource canvas{width:calc(15px * var(--s));height:calc(15px * var(--s));display:block}
#game-screen .topbar .resource b{position:static;inset:auto;width:auto;min-width:0;height:100%;display:flex;align-items:center;justify-content:flex-end;padding:0 5px;overflow:hidden;white-space:nowrap;line-height:1.1;background:#28261e;border:1px solid #d6c493;box-shadow:inset 0 0 0 1px #514633;color:#fff3d5;font-size:clamp(11px,.85vw,14px);font-weight:500;font-variant-numeric:tabular-nums}
#game-screen .original-footer button{min-width:calc(61px * var(--s))}#game-screen .original-footer #layout-options{min-width:22px}
.chat-color-0{color:#655e55}.chat-color-1{color:#171717}.chat-color-2{color:#b52924}.chat-color-3{color:#934502}.chat-color-4{color:#ffe35d;text-shadow:0 1px 1px #584517,1px 0 1px #584517}.chat-color-5{color:#176c2b}.chat-color-6{color:#176a86}.chat-color-7{color:#733b89}.chat-color-8{color:#24499c}.chat-color-9{color:#fff;text-shadow:0 1px 2px #4c463c,1px 0 1px #4c463c}
#panel.help-book{width:min(920px,calc(100vw - 32px));max-height:88dvh}#panel.help-book #panel-content{padding:0;max-height:calc(88dvh - 82px)}
.help-search{display:flex;align-items:center;gap:12px;padding:14px 20px;background:#d8c49c;border-bottom:1px solid #927951}.help-search label{font-size:13px;font-weight:600;white-space:nowrap}.help-search input{width:100%;padding:9px 12px;border:1px solid #958464;background:#f7eedb!important;color:#29241b!important}
.help-layout{display:grid;grid-template-columns:170px minmax(0,1fr);min-height:350px}.help-topics{display:flex;flex-direction:column;gap:3px;padding:12px;background:#b7a17a;border-right:1px solid #927951}.help-topics button{padding:10px 12px!important;text-align:left;border:0;border-left:3px solid transparent;background:transparent;box-shadow:none;color:#352b1b;font-size:14px!important}.help-topics button[aria-selected=true]{background:#efe1c0;color:#233c30;border-left-color:#345342}.help-content{padding:20px 25px;background:#ede1c6;min-width:0;overflow:auto;max-height:calc(88dvh - 160px)}
#panel .help-content article{margin:0 0 24px;padding-bottom:20px;border-bottom:1px solid #b4a183}#panel .help-content article:last-child{border-bottom:0}#panel .help-content h3{font-size:20px;margin:0 0 12px;color:#273d31;font-weight:600}#panel .help-content p,#panel .help-content li{font-size:14px;line-height:1.85;color:#352f24}#panel .help-content p{margin:8px 0}#panel .help-content ol,#panel .help-content ul{padding-left:20px;margin:10px 0}.help-content table{border-collapse:collapse;width:100%;font-size:13px;margin:12px 0}.help-content th,.help-content td{padding:8px 10px;border-bottom:1px solid #c1ae8a;text-align:left}.help-content th{background:#dccba6;color:#47371e}.help-content kbd{display:inline-block;min-width:24px;text-align:center;border:1px solid #ac9b78;border-bottom-width:2px;border-radius:3px;background:#faf2df;padding:0 5px;font-family:var(--font-ui);font-size:12px;color:#332c20}.help-note{padding:10px 13px;background:#ddcfaf;border-left:3px solid #9a7740}.help-empty{padding:24px;color:#493b29}.help-colors{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.help-colors span{border:1px solid #af9b76;padding:5px 8px;font-size:13px;background:#d0bd96}
#game-screen #side-controls .arms-slider{height:18px;accent-color:#705527;padding:0;background:transparent;margin:0}#game-screen #side-controls .arms-hint{font-size:11px;line-height:1.3;margin:2px 0 5px}#game-screen #side-controls #dock-arms-form label{margin:3px 0}
@media(max-width:850px){.help-layout{grid-template-columns:135px minmax(0,1fr)}.help-content{padding:15px}.help-topics{padding:7px}.help-topics button{font-size:12px!important;padding:8px!important}.help-colors{grid-template-columns:repeat(2,1fr)}}
.macro-list{display:grid;gap:6px;margin:16px 0}.macro-list form{display:grid;grid-template-columns:34px minmax(120px,1fr) 95px 46px 46px;gap:7px;align-items:center}.macro-list kbd{font-family:var(--font-ui);font-size:13px;font-weight:600}.macro-list input[name=text]{min-width:0;height:31px;padding:4px 7px}.macro-list label{display:flex;align-items:center;gap:4px;font-size:12px;white-space:nowrap}.macro-list input[type=checkbox]{width:14px;height:14px;margin:0}.macro-list button{padding:4px;font-size:12px}.round-result{font-size:17px!important;color:#2e4933!important}
.entry-screen[data-stage=scenarios] .scenario-grid{grid-template-columns:repeat(3,minmax(0,1fr));width:min(980px,100%);max-width:none}.entry-screen[data-stage=scenarios] .scenario{min-width:0;padding:16px}.entry-screen[data-stage=scenarios] .scenario h3{font-size:20px}
.world-layout{display:flex;gap:12px;align-items:stretch}#world-roster{width:clamp(170px,16vw,240px);max-height:65dvh;overflow:auto;border-left:1px solid #927951;padding:8px 10px 8px 14px;scrollbar-width:thin;flex:none}#world-roster section{padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid #98815866}#world-roster header{display:flex;justify-content:space-between;gap:8px;color:#2b4434;font-size:14px}#world-roster small{font-size:12px;color:#4b3d26}#world-roster p{font-size:13px;line-height:1.7;margin:7px 0 0;color:#342b1e;overflow-wrap:anywhere}
@media(max-width:780px){.entry-screen[data-stage=scenarios] .scenario-grid{grid-template-columns:1fr}.world-layout{gap:6px}#world-overview{width:min(65vw,calc(60dvh * 1.25))}#world-roster{width:145px;padding-left:8px}}
.room-list{width:min(900px,100%);border-collapse:collapse;background:#544c34e8;border:3px ridge #c4a974;box-shadow:0 8px 30px #10120944;color:#f1e4c6}.room-list th,.room-list td{padding:8px 16px;border-bottom:1px solid #b9a17455;text-align:left;font-size:14px}.room-list thead th{font-size:12px;color:#d7c49a;background:#3e3d2c}.room-list tbody th{font-weight:600}.room-list tr:nth-child(3n) td,.room-list tr:nth-child(3n) th{border-bottom:2px solid #baa171}.room-list td:last-child{text-align:right;width:130px}.room-list button{width:100%;padding:6px 12px;font-size:13px}.room-note{font-size:13px;color:#ddc9a2;line-height:1.6;max-width:900px}
@media(max-width:780px){.room-list th,.room-list td{padding:8px;font-size:12px}.room-list td:last-child{width:90px}}
