@charset "UTF-8";
@import url("./art-tokens.css");
:root{font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;color:#202b40;background:#f4f5f8;font-synthesis:none;--blue:#235dc7;--muted:#747e8e;--line:#e3e7ee;--tile:27px}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed}button,input,select,summary{outline-offset:4px}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #86afff}h1,h2,h3,p{margin:0}h2{font-size:23px;letter-spacing:-.5px}h3{font-size:15px}p{line-height:1.7}button{transition:background .15s,border-color .15s,box-shadow .15s}button:hover:not(:disabled){filter:brightness(.97)}.topbar{height:80px;border-bottom:1px solid var(--line);padding:0 3%;display:flex;align-items:center;justify-content:space-between;background:#fff}.brand,.top-actions{display:flex;align-items:center;gap:14px}.brand h1{font-size:25px;letter-spacing:2px}.brand-icon{background:var(--blue);color:white;border-radius:10px;width:37px;height:37px;display:grid;place-items:center;font-size:25px}.brand-subtitle{color:var(--muted);font-size:14px;border-left:1px solid var(--line);padding-left:14px}.edition{color:var(--muted);font-size:13px}.button{border:1px solid #d9dfeb;border-radius:8px;background:white;color:#34425a;padding:10px 17px;font-weight:600;font-size:13px}.primary{background:var(--blue);color:white;border-color:var(--blue)}.primary:disabled{background:#b0bdd2;border-color:#b0bdd2;color:#edf1f8}.subtle{background:transparent;border-color:transparent}.danger{background:#a4353d;color:white;border-color:#a4353d}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:700;color:var(--blue);margin-bottom:10px}.muted{color:var(--muted)}.small{font-size:12px}.panel{background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:0 3px 9px #26395c03}.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.section-head h2{font-size:17px}footer{padding:22px;text-align:center;color:#8a93a1;font-size:11px}.notice{max-width:1440px;margin:15px auto;padding:12px 18px;background:#fff0dc;border:1px solid #e8c991;border-radius:8px;display:flex;justify-content:space-between;align-items:center;font-size:13px}.setup-layout{max-width:1030px;margin:65px auto 30px;display:grid;grid-template-columns:1.15fr 1fr;gap:55px 80px;padding:0 25px}.setup-intro{padding-top:24px}.setup-intro h2{font-size:38px;line-height:1.45;white-space:pre-line;letter-spacing:-1px}.intro-text{font-size:14px;color:#6a7689;max-width:350px;margin-top:18px}.intro-mosaic{display:grid;grid-template-columns:repeat(5,42px);gap:7px;transform:rotate(-5deg);margin:35px 0 30px 20px}.intro-mosaic .tile{width:42px;height:42px;font-size:27px;border-radius:7px}.setup-intro>.muted{font-size:11px}.setup-card{background:white;border:1px solid var(--line);padding:30px;border-radius:17px;box-shadow:0 14px 45px #25304b08}.setup-card h2{margin-bottom:24px}.field-label{display:block;font-size:12px;font-weight:600;margin:18px 0 9px}.segmented{display:flex;gap:8px;margin-bottom:20px}.segmented button{flex:1;border:1px solid var(--line);background:#f6f7fa;border-radius:7px;padding:10px;color:#606e83}.segmented .active{color:var(--blue);border-color:var(--blue);background:#eff4ff}.name-field{display:flex;align-items:center;gap:16px;font-size:12px;color:#6e7b8f;margin:10px 0}.name-field input{min-width:0;flex:1}.setup-card input,.setup-card select{border:1px solid #dfe4ed;border-radius:7px;background:#fff;padding:10px;color:#283750;width:100%;font-size:13px}.setup-card select{display:block;margin-top:9px}.start-button{width:100%;margin-top:23px;padding:13px}.setup-layout>.help{grid-column:1/-1}.help,.history{border-top:1px solid var(--line);font-size:12px;color:#606e82}.help summary,.history summary{padding:15px 0;cursor:pointer;font-weight:600}.help-body{padding:0 0 15px}.help-body p{margin-bottom:10px}.game-layout{max-width:1510px;margin:auto;padding:25px 3% 0}.game-status{display:flex;align-items:center;gap:28px;margin-bottom:22px}.game-status .eyebrow{margin-bottom:5px}.game-status h2{font-size:25px}.status-copy{font-size:14px;font-weight:600;border-left:1px solid #d6dce6;padding-left:25px;overflow-wrap:anywhere}.save-note{margin-left:auto;font-size:11px;color:#829083;white-space:nowrap}.play-area{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}.supply{padding:21px}.factories{display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));gap:9px}.factory{border:1px solid #e5e8ef;border-radius:10px;background:#f8f9fc;min-height:144px;padding:10px 8px}.factory-number{color:#808da2;font-size:10px;font-weight:500;letter-spacing:1px;text-align:center;margin-bottom:9px}.factory-colors{display:flex;align-content:center;justify-content:center;flex-wrap:wrap;gap:4px;min-height:97px}.color-choice{border:1px solid transparent;border-radius:6px;background:transparent;padding:3px 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#5f6c81;min-width:44px}.color-choice:hover:not(:disabled){background:#e9eef8}.color-choice.selected{border-color:var(--blue);background:#eaf1ff;box-shadow:0 0 0 1px var(--blue)}.choice-tiles{display:flex;flex-wrap:wrap;gap:3px;justify-content:center;max-width:62px}.choice-label{font-size:9px;white-space:nowrap}.tile{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--tile);height:var(--tile);background:var(--tile-color);border:1px solid #00000016;border-radius:4px;color:white;text-shadow:0 1px 1px #0003;font-size:18px;line-height:1;box-shadow:inset 0 -2px 0 #0000000e}.tile[data-color="1"],.tile[data-color="4"]{color:#554923;text-shadow:none}.tile.ghost{opacity:.2;box-shadow:none}.tile.marker{color:#273b60;border:1px solid #9ca9ba;font-size:15px;font-weight:800;text-shadow:none;border-radius:50%;box-shadow:none}.empty-tile{background:#f1f3f7;border:1px dashed #d9dee7;box-shadow:none}.empty-source{font-size:11px;color:#a1a9b6;align-self:center}.factory.empty{background:#fcfcfd;border-style:dashed;min-height:144px}.center{margin-top:16px;padding-top:15px;border-top:1px solid var(--line)}.center-heading{display:flex;align-items:center;gap:16px;margin-bottom:9px}.center-heading h3{font-size:13px}.marker-label{display:flex;align-items:center;gap:7px;font-size:11px;color:#7f725a}.marker-label .tile{width:22px;height:22px;font-size:12px}.center-colors{display:flex;flex-wrap:wrap;gap:9px;min-height:43px;align-items:center}.center-colors .color-choice{flex-direction:row;gap:8px;padding:5px 9px;border-color:var(--line);background:#fafbfe}.center-colors .choice-label{font-size:11px}.move-panel{padding:20px;border-top:3px solid var(--blue)}.move-panel h2{font-size:18px;overflow-wrap:anywhere;margin-bottom:15px}.move-panel>.muted{font-size:12px;white-space:pre-line;line-height:2.2}.legend{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}.legend-item{display:flex;align-items:center;gap:5px;font-size:10px;color:#8490a2}.legend-item .tile{width:18px;height:18px;font-size:12px}.selection-summary{display:flex;gap:8px;align-items:center;margin-bottom:13px;font-size:12px;flex-wrap:wrap}.selection-summary .muted{font-size:10px}.target-options{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}.target-option{border:1px solid var(--line);background:#fafbfe;padding:9px 7px;border-radius:7px;text-align:left;color:#36455f}.target-option strong{display:block;font-size:12px;margin-bottom:4px}.target-option span{display:block;font-size:10px;line-height:1.4}.target-option.selected{border-color:var(--blue);background:#edf3ff;color:var(--blue)}.target-option:disabled{color:#9aa3b1;background:#f7f7f8}.preview{background:#f0f5ff;border-radius:8px;padding:11px;margin-top:12px;font-size:11px;line-height:1.5}.preview strong{font-size:12px}.preview p{margin-top:4px;line-height:1.5}.preview .small{font-size:10px}.move-actions{display:flex;gap:8px;margin-top:12px}.move-actions .primary{flex:1}.boards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:18px}.player-board{padding:15px 18px}.player-board.current{border-color:#83a8ec;box-shadow:0 0 0 1px #83a8ec}.board-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.player-identity{display:flex;align-items:center;gap:9px;min-width:0}.player-identity h3{font-size:14px;overflow-wrap:anywhere}.seat{font-size:11px;color:#7c89a0;background:#eff2f7;width:24px;height:24px;display:grid;place-items:center;flex-shrink:0;border-radius:50%}.current .seat{color:white;background:var(--blue)}.turn-tag{font-size:9px;white-space:nowrap;color:var(--blue);background:#eef4ff;padding:4px 6px;border-radius:4px}.score{font-size:25px;font-weight:700;color:#243b61;padding-left:10px}.score:after{content:'分';font-size:10px;color:#8490a1;margin-left:5px;font-weight:400}.board-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 17px;max-width:440px;margin:auto}.board-label{font-size:9px;color:#8a95a5;padding-bottom:5px;letter-spacing:1px}.board-label:first-child{text-align:right}.pattern-line{display:flex;justify-content:flex-end;gap:4px;position:relative}.row-number{font-size:9px;color:#98a1b0;margin-right:auto;align-self:center}.wall-row{display:flex;gap:4px}.floor{display:flex;align-items:center;justify-content:center;gap:5px;border-top:1px solid #eef0f5;padding-top:12px;margin-top:12px}.floor-title{font-size:10px;color:#8b95a4;margin-right:8px}.floor-slot{display:flex;align-items:center;flex-direction:column;gap:3px;color:#9a8890;font-size:9px}.floor-slot .tile{width:23px;height:23px;font-size:15px}.bottom-info{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin-top:22px}.history-list{max-height:280px;overflow:auto;margin:0;padding:0 0 12px 20px;font-size:11px;line-height:1.9}.round-summary{padding:24px;margin-bottom:18px}.round-summary h2{margin-bottom:12px}.winner{font-size:22px;color:var(--blue);font-weight:700;overflow-wrap:anywhere}.round-summary>.muted{font-size:12px}.bonus-list{background:#f3f6fc;border-radius:8px;padding:12px 15px;margin-top:14px;font-size:12px}.round-scores{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:18px 0}.round-score{padding:14px;border:1px solid var(--line);border-radius:8px}.round-score h3{margin-bottom:9px;overflow-wrap:anywhere}.round-score strong{display:block;margin-top:7px}.play-area:has(>.supply:only-child){grid-template-columns:1fr}.confirm-dialog{border:1px solid var(--line);border-radius:14px;padding:26px;max-width:460px;color:#26344b;box-shadow:0 15px 70px #14254f30}.confirm-dialog::backdrop{background:#17203970}.confirm-dialog h2{margin-bottom:12px}.confirm-dialog p{font-size:13px;color:#758097}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}@media(min-width:1650px){.boards{grid-template-columns:repeat(4,minmax(0,1fr))}.player-board{padding:15px 12px}.board-grid{gap:4px 10px;--tile:24px}.floor{gap:4px}.floor-title{margin-right:3px}.factories{grid-template-columns:repeat(5,minmax(128px,1fr))}}@media(max-width:1050px){.factories{grid-template-columns:repeat(3,minmax(100px,1fr))}.play-area{grid-template-columns:minmax(0,1fr) 270px}.supply{padding:16px}.section-head{gap:10px}.section-head .small{font-size:10px}.setup-layout{gap:35px}.edition{display:none}}@media(max-width:720px){:root{--tile:26px}.topbar{height:65px;padding:0 16px}.brand{gap:9px}.brand h1{font-size:21px}.brand-subtitle{font-size:11px;padding-left:9px}.brand-icon{width:31px;height:31px;font-size:21px}.top-actions .button{padding:8px}.game-layout{padding:20px 12px 0}.game-status{gap:14px;flex-wrap:wrap}.status-copy{padding-left:14px}.save-note{margin-left:0;width:100%}.play-area{display:flex;flex-direction:column;gap:12px}.supply,.move-panel{width:100%}.move-panel{position:relative}.target-options{grid-template-columns:repeat(3,1fr)}.boards{grid-template-columns:1fr;gap:12px}.board-grid{max-width:375px}.factories{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.factory{padding:8px 4px}.color-choice{min-width:38px;padding:3px}.choice-tiles{max-width:57px}.factory-colors{gap:2px}.bottom-info{grid-template-columns:1fr;gap:0}.setup-layout{display:flex;flex-direction:column;margin:20px auto;max-width:460px;gap:25px;padding:0 18px}.setup-intro{padding-top:10px}.setup-intro h2{font-size:28px}.intro-mosaic{display:none}.setup-intro>.muted{margin-top:12px}.setup-card{padding:24px}.setup-layout>.help{width:100%}.notice{margin:12px;font-size:12px}.round-summary{padding:18px}.round-scores{grid-template-columns:1fr}.center-heading{flex-wrap:wrap;gap:9px}.dialog-actions{flex-wrap:wrap}}

.save-note.save-failed{color:#a15c29;font-weight:600}
/* Supply on the left; active player gets the largest working board. */
.game-layout{max-width:1920px;padding:18px 22px 0}.topbar{height:64px}.game-status{margin-bottom:16px}.play-area{display:grid;grid-template-columns:300px minmax(0,1fr);gap:18px;align-items:start}.supply{padding:15px}.supply .section-head{display:block}.supply .section-head .muted{display:block;margin-top:5px}.factories{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.factory,.factory.empty{min-height:114px;padding:8px 4px}.factory-colors{min-height:76px}.supply .tile{--tile:32px;font-size:21px}.choice-tiles{max-width:72px}.choice-label{font-size:11px}.center-heading{flex-wrap:wrap;gap:8px}.player-workspace{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:16px;min-width:0}.active-area,.opponent-boards{min-width:0}.primary-board{padding:20px}.primary-board .board-grid{--tile:clamp(32px,3.4vw,62px);max-width:760px;gap:7px 16px;grid-template-columns:1fr 1fr}.primary-board .tile{font-size:calc(var(--tile)*.65)}.primary-board .board-label{font-size:13px}.primary-board .pattern-line,.primary-board .wall-row{gap:5px}.primary-board .row-number{font-size:13px}.primary-board .floor-slot .tile{width:34px;height:34px;font-size:23px}.primary-board .floor-slot{font-size:12px}.primary-board .player-identity h3{font-size:21px}.primary-board .score{font-size:30px}.primary-board .floor{flex-wrap:wrap}.line-target{border:1px solid #aec3e8;border-radius:5px;background:#f6f9ff;padding:3px;margin:-3px;min-width:0;color:inherit}.line-target:hover:not(:disabled),.line-target.selected{background:#dceaff;outline:2px solid var(--blue)}.line-target:disabled{border-color:transparent;background:transparent;opacity:.6}.floor-target{font-size:12px;padding:8px}.floor-target.selected{outline:2px solid var(--blue);background:#edf3ff}.active-area .move-panel{margin-top:12px;padding:15px;border-top:0}.move-panel h2{font-size:16px;margin-bottom:8px}.move-panel .eyebrow{display:none}.move-panel .legend{display:none}.move-panel>.muted{line-height:1.6;white-space:normal}.move-actions{justify-content:flex-end}.move-actions .primary{flex:0 1 240px}.preview{font-size:13px}.preview .small{font-size:12px}.end-hint{font-size:12px;line-height:1.6;color:#637189;padding:12px 4px}.opponent-heading{font-size:13px;color:#748099;margin:0 0 10px}.opponent-boards .player-board{padding:12px;margin-bottom:12px}.opponent-boards .board-grid{--tile:18px;gap:4px 8px;grid-template-columns:1fr 1fr}.opponent-boards .tile{font-size:12px}.opponent-boards .pattern-line,.opponent-boards .wall-row{gap:3px}.opponent-boards .floor{gap:3px}.opponent-boards .floor-slot .tile{width:19px;height:19px;font-size:12px}.opponent-boards .score{font-size:22px}.opponent-boards .turn-tag{display:none}
@media(max-width:1400px){.player-workspace{grid-template-columns:minmax(0,1fr)}.opponent-boards{display:grid;grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:10px}.opponent-heading{grid-column:1/-1;margin:0}.opponent-boards .player-board{margin:0}.primary-board .board-grid{--tile:clamp(34px,4.3vw,56px)}}
@media(max-width:850px){.game-layout{padding:14px 12px}.play-area{grid-template-columns:220px minmax(0,1fr);gap:12px}.supply{padding:10px}.supply .tile{--tile:27px}.primary-board{padding:12px}.primary-board .board-grid{--tile:27px;gap:5px 10px}.primary-board .pattern-line,.primary-board .wall-row{gap:3px}}
@media(max-width:620px){.play-area{display:flex}.factories{grid-template-columns:repeat(3,minmax(0,1fr))}.player-workspace{width:100%}.primary-board .board-grid{--tile:clamp(22px,6vw,35px)}.primary-board .floor-slot .tile{width:27px;height:27px}.game-status{gap:10px}.opponent-boards{grid-template-columns:1fr}}
@media(min-width:1401px){.player-workspace{grid-template-columns:minmax(0,1fr) 310px}}
.opponent-boards .board-grid{--tile:24px}.opponent-boards .tile{font-size:16px}.opponent-boards .floor-slot .tile{width:24px;height:24px;font-size:16px}
@media(min-width:621px) and (max-width:1400px){.opponent-boards{grid-template-columns:repeat(auto-fit,minmax(295px,1fr))}}
@media(max-width:850px) and (min-width:621px){.opponent-boards{grid-template-columns:1fr}}

/* Confirmed event feedback: decoration only, never an input or scoring gate. */
.feedback-controls{display:flex;gap:5px;flex-wrap:wrap}
.feedback-toggle{border:1px solid #dfe5ed;border-radius:6px;background:#f8f9fc;color:#66748a;font-size:11px;padding:7px 8px;white-space:nowrap}
.feedback-toggle[aria-pressed="true"]{background:#eaf1ff;border-color:#a9bfe7;color:#235dc7}
.feedback-status{margin:-4px 0 14px;padding:10px 13px;border-left:3px solid #235dc7;background:#eaf1ff;border-radius:0 7px 7px 0;font-size:12px;line-height:1.7;color:#344f75;overflow-wrap:anywhere}
.feedback-status[hidden]{display:none}
.player-board,.board-head,.wall-row .tile{position:relative}
.player-board.feedback-active{outline:2px solid #709bd9;outline-offset:2px}
.factory.feedback-active,.center.feedback-active{box-shadow:inset 0 0 0 2px #709bd9}
.pattern-line.feedback-active{background:#e3edff;border-radius:5px}
.pattern-line.feedback-active .tile:not(.empty-tile){animation:feedback-land .3s ease-out}
.pattern-line.feedback-full{outline:2px solid #bc943b;outline-offset:2px;background:#fff2ce}
.floor.feedback-spill{background:#fff0e6;border-radius:6px;box-shadow:inset 0 -2px 0 #c88b60;animation:feedback-floor .3s ease-out}
.tile.feedback-wall{outline:3px solid #c49632;outline-offset:2px;z-index:2;animation:feedback-wall .42s ease-out}
.feedback-score{background:#fff4d4!important;color:#795816!important;border-radius:5px;animation:feedback-score .45s ease-out}
.feedback-badge{position:absolute;right:-8px;top:-12px;background:#845e12;color:white;border-radius:4px;font:700 11px/1.4 "Segoe UI","Microsoft YaHei",sans-serif;padding:1px 4px;white-space:nowrap;z-index:3;pointer-events:none;text-shadow:none}
.feedback-badge.actor-feedback{right:0;top:100%;font-size:9px;background:#235dc7}
[data-feedback-motion="fast"] .feedback-active .tile,[data-feedback-motion="fast"] .feedback-wall,[data-feedback-motion="fast"] .feedback-score,[data-feedback-motion="fast"] .feedback-spill{animation-duration:.12s}
[data-feedback-motion="reduced"] .feedback-active .tile,[data-feedback-motion="reduced"] .feedback-wall,[data-feedback-motion="reduced"] .feedback-score,[data-feedback-motion="reduced"] .feedback-spill{animation:none!important;transition:none!important}
@keyframes feedback-land{0%{transform:translateY(-5px);opacity:.65}70%{transform:translateY(1px)}100%{transform:translateY(0);opacity:1}}
@keyframes feedback-floor{0%{box-shadow:inset 0 -4px 0 #c88b60}100%{box-shadow:inset 0 -2px 0 #c88b60}}
@keyframes feedback-wall{0%{transform:scale(.85)}60%{transform:scale(1.08)}100%{transform:scale(1)}}
@keyframes feedback-score{0%{box-shadow:0 0 0 3px #dfc16b}100%{box-shadow:0 0 0 0 transparent}}
@media(max-width:1150px){.topbar .edition{display:none}}
@media(max-width:720px){.topbar{height:auto;min-height:94px;flex-wrap:wrap;gap:9px;padding:12px 16px}.top-actions{gap:7px;flex-wrap:wrap;justify-content:flex-end}.feedback-toggle{font-size:10px;padding:6px}.brand-subtitle{white-space:nowrap}}

/* Direct board actions and landscape worktable. */
.board-target{position:relative;padding:2px;margin:-2px;border:1px solid #a8bde3;border-radius:5px;background:#f0f5ff;color:inherit;min-width:0}
.board-target.selected{outline:2px solid var(--blue);background:#dceaff}.board-target:disabled{border-color:#dce0e7;background:#f4f4f5;opacity:.65}
.row-tip{display:none;position:absolute;right:0;bottom:100%;z-index:8;background:#263b5b;color:white;padding:4px 7px;border-radius:4px;font-size:11px;white-space:nowrap;pointer-events:none}
.board-target:hover .row-tip,.board-target:focus-visible .row-tip{display:block}
.board-action{border-top:1px solid var(--line);margin-top:10px;padding-top:10px;display:flex;gap:10px;align-items:center;justify-content:space-between;font-size:12px;line-height:1.6;min-height:58px}
.board-action p{flex:1}.board-actions{display:flex;gap:6px;flex-shrink:0}.floor .button{padding:6px 9px;font-size:11px}.floor .selected{outline:2px solid var(--blue)}
@media(min-width:1000px) and (orientation:landscape){
 .topbar{height:52px;padding:0 18px}.game-layout{padding:10px 16px 0;max-width:1920px}.game-status{margin-bottom:10px;gap:16px}.game-status .eyebrow{display:none}.game-status h2{font-size:22px}.status-copy{padding-left:15px}.edition{display:none}
 .play-area{grid-template-columns:330px minmax(0,1fr);gap:12px}.player-workspace{grid-template-columns:minmax(0,1fr) 276px;gap:12px}.supply{padding:12px}.factories{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.factory,.factory.empty{min-height:100px;padding:6px 3px}.factory-number{margin-bottom:4px}.factory-colors{min-height:72px;gap:0}.supply .tile{--tile:27px;font-size:18px}.choice-tiles{max-width:60px}.color-choice{min-width:32px;padding:2px}.choice-label{font-size:10px}.center{margin-top:10px;padding-top:10px}.center-colors{gap:5px}.center-colors .color-choice{padding:4px 6px}.center-heading{margin-bottom:6px}
 .primary-board{padding:14px}.primary-board .board-grid{--tile:clamp(30px,3.2vw,54px);gap:7px 12px;max-width:650px}.primary-board .pattern-line,.primary-board .wall-row{gap:3px}.primary-board .board-head{margin-bottom:10px}.primary-board .floor{margin-top:10px;padding-top:10px;gap:4px}.primary-board .floor-slot .tile{width:27px;height:27px;font-size:18px}.primary-board .floor-slot{font-size:10px}.primary-board .floor-title{margin-right:3px}
 .opponent-boards{display:flex;flex-direction:column;gap:8px}.opponent-heading{margin:0;font-size:12px}.opponent-boards .player-board{padding:8px;margin:0}.opponent-boards .board-grid{--tile:clamp(16px,2.5vh,23px);gap:3px 7px}.opponent-boards .board-head{margin-bottom:5px}.opponent-boards .tile{font-size:13px}.opponent-boards .floor{padding-top:5px;margin-top:5px;gap:3px}.opponent-boards .floor-slot .tile{width:18px;height:18px;font-size:12px}.opponent-boards .board-label{padding-bottom:2px}.opponent-boards .score{font-size:20px}.opponent-boards .player-identity h3{font-size:12px}
 .end-hint{padding:7px 2px;font-size:11px}.bottom-info{margin-top:8px;gap:18px}.bottom-info summary{padding:7px 0}.feedback-status{margin:0 0 8px;padding:6px 10px;font-size:11px;line-height:1.4}body:has(.game-layout) footer{display:none}
}
@media(min-width:1600px) and (orientation:landscape){.play-area{grid-template-columns:370px minmax(0,1fr)}.player-workspace{grid-template-columns:minmax(0,1fr) 320px}.supply .tile{--tile:32px}.choice-tiles{max-width:70px}.factory,.factory.empty{min-height:112px}.factory-colors{min-height:84px}.opponent-boards .board-grid{--tile:clamp(22px,2.6vh,28px)}}
@media(max-width:620px){.board-action{flex-wrap:wrap}.board-actions{margin-left:auto}.primary-board .floor{gap:3px}}
@media(min-width:1000px) and (orientation:landscape){
.factory-colors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;min-height:76px}.factory,.factory.empty{min-height:102px}.factory .color-choice{gap:1px;padding:1px}.factory .choice-tiles{flex-wrap:nowrap}.factory .empty-source{grid-column:1/-1;text-align:center}.factory .tile{width:27px;height:27px}
.opponent-boards .board-grid{grid-template-columns:1fr 1fr;grid-auto-rows:auto;--tile:18px;gap:2px 7px}.opponent-boards .wall-row .tile,.opponent-boards .pattern-line .tile{width:18px;height:18px}.opponent-boards .board-label{font-size:9px;line-height:12px}.opponent-boards .floor-slot{line-height:11px}.opponent-boards .board-head{height:25px}.opponent-boards .player-board{padding:7px}.opponent-boards .floor{padding-top:4px;margin-top:4px}
}
@media(min-width:1600px) and (min-height:900px){.opponent-boards .wall-row .tile,.opponent-boards .pattern-line .tile{width:26px;height:26px}}
@media(min-width:1000px) and (max-height:850px) and (orientation:landscape){.opponent-boards .player-board{padding:5px}.opponent-boards .board-head{height:20px;margin-bottom:3px}.opponent-boards .seat{width:20px;height:20px}.opponent-boards .score{font-size:18px}.opponent-boards .floor-slot{gap:1px;font-size:8px;line-height:9px}.opponent-boards .floor{padding-top:3px;margin-top:3px}.opponent-boards .floor-slot .tile{height:16px;width:16px}.opponent-boards{gap:6px}.bottom-info{margin-top:4px}}
.settlement-dialog{width:min(1080px,94vw);max-height:90dvh;border:1px solid var(--line);border-radius:16px;padding:16px;color:#202b40;background:#fff;overflow:auto;box-shadow:0 20px 80px #17203944}.settlement-dialog::backdrop{background:#18243c80}.settlement-dialog .round-summary{margin:0;border:0;box-shadow:none;padding:12px}.summary-close{display:block;margin-left:auto}.settlement-dialog .round-scores{grid-template-columns:repeat(2,minmax(0,1fr))}.settlement-dialog .round-summary>.primary{position:sticky;bottom:0;box-shadow:0 0 0 6px white}.pattern-line .tile.feedback-new{outline:3px solid #d49e28;outline-offset:1px;background-image:linear-gradient(#ffffff28,#ffffff08);box-shadow:0 0 10px #d49e2855}.floor .tile.feedback-new{outline:3px solid #cf8357;outline-offset:1px}
@media(max-width:620px){.settlement-dialog .round-scores{grid-template-columns:1fr}}
.score-info-button{border:1px solid #8b9ebd;color:#345d99;background:#f0f5ff;border-radius:50%;width:26px;height:26px;flex-shrink:0;font:italic 700 19px Georgia,serif;display:inline-grid;place-items:center;padding:0}.score-info-button:disabled{opacity:.5}.scoring-help{width:min(900px,94vw);padding:24px}.scoring-help p{font-size:13px;line-height:1.7}.score-guide-intro{margin:8px 0 18px}.score-examples{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.score-example{background:#f6f8fc;border:1px solid var(--line);border-radius:10px;padding:14px}.score-demo-grid{display:grid;grid-template-columns:repeat(3,34px);gap:4px;margin:16px auto;width:max-content}.score-demo-cell{width:34px;height:34px;border:1px dashed #ccd4e1;border-radius:4px;background:white;display:grid;place-items:center}.score-demo-cell.occupied{background:#5687b6;color:white;border-style:solid;border-color:#5687b6}.score-demo-cell.fresh{outline:3px solid #c99931;outline-offset:1px;background:#ffe7a6;color:#513b10;font-weight:700}.demo-points{display:block;text-align:center;font-size:22px;color:#2c568d;margin-bottom:8px}.score-legend{margin:14px 0;color:#64748b}.score-guide-section{border-top:1px solid var(--line);padding-top:16px;margin-top:16px}.score-guide-section h3{margin-bottom:10px}.penalty-demo{display:flex;gap:6px;margin:12px 0;flex-wrap:wrap}.penalty-demo span{padding:9px 12px;border:1px solid #dfe3ea;border-radius:5px;color:#7e8795}.penalty-demo .used{background:#fff0df;color:#8e502a;border-color:#d7a67c}.bonus-diagrams{display:flex;justify-content:space-around;gap:12px;margin:18px 0;text-align:center}.bonus-mini{display:grid;grid-template-columns:repeat(5,16px);gap:3px;width:max-content;margin:0 auto 8px}.bonus-mini span{width:16px;height:16px;background:#e7ebf2;border-radius:2px}.bonus-mini .lit{background:#5687b6}.bonus-diagrams strong{color:#2c568d}.scoring-help .section-head{position:sticky;top:-24px;background:white;padding:10px 0;z-index:2}@media(max-width:650px){.score-examples{grid-template-columns:1fr}.scoring-help{padding:16px}.score-example{display:grid;grid-template-columns:120px 1fr;gap:8px}.score-example h3{grid-column:1/-1}.score-example p{grid-column:1/-1}.score-demo-grid{margin:8px auto}.demo-points{align-self:center}}

/* Local placement preview and confirmation */
.placement-preview{opacity:.5;outline:2px dashed #4268bc;outline-offset:-2px}.primary-board .board-action{min-height:0;border:0;margin:0;padding:3px 0;gap:10px;justify-content:flex-end;background:transparent}.inline-row-action{grid-column:1/-1}.board-action p{margin:0;font-size:12px;color:#44618d}.board-action .button,.pick-hint .button{padding:6px 12px;min-height:30px}.primary-board .floor{flex-wrap:wrap}.floor>.board-action,.floor-preview-note{flex-basis:100%}.floor-preview-note{margin:2px 0 0;text-align:center;font-size:12px;color:#a05b37}.pick-hint{display:flex;align-items:center;gap:8px;font-size:12px;color:#44618d;margin-left:auto}.primary-board .board-head{flex-wrap:wrap;height:auto;min-height:30px}.primary-board .board-grid{grid-auto-rows:auto}
/* Actual supply quantities: small stones, large working board. */
.supply .choice-tiles{display:flex;flex-wrap:wrap;gap:3px;max-width:100%;justify-content:center}
.supply .color-choice{min-width:0}.supply .tile{width:22px;height:22px;font-size:15px}
.factory .choice-tiles{display:grid;grid-template-columns:repeat(2,22px);gap:2px}
.factory .choice-tiles .tile:only-child{grid-column:1/-1;justify-self:center}
.factory .color-choice{padding:2px}.factory-colors{align-items:start}
.center-colors{align-items:start;max-height:220px;overflow:auto}
.center-colors .color-choice{max-width:100%}.center-colors .choice-tiles{max-width:120px}
.settlement-replay{border:1px solid #dbe2ef;background:#f6f8fd;border-radius:12px;padding:16px;margin:12px 0}
.replay-heading{display:flex;justify-content:space-between;gap:12px}
.replay-body{display:flex;align-items:center;justify-content:center;gap:36px;margin:16px 0}
.replay-wall{display:grid;grid-template-columns:repeat(5,38px);gap:5px;flex-shrink:0}
.replay-cell{width:38px;height:38px;display:grid;place-items:center;border-radius:5px;background:#e7ebf2;color:#cbd1db;font-size:24px}
.replay-cell.occupied{background:var(--stone);color:white}
.replay-cell.linked{outline:3px solid #dcac3a;outline-offset:1px;animation:chain-flash .6s ease-out both;animation-delay:calc(var(--order)*35ms)}
.replay-cell.fresh{outline-color:#4769c3;animation:stone-land .45s ease-out}
.replay-copy{max-width:440px;min-width:220px}.replay-kicker{font-weight:700;color:#98701c}
.replay-points{display:block;font-size:50px;line-height:1.15;color:#bd7a18;animation:score-impact .45s ease-out}
.replay-points.powerful{font-size:62px;color:#c1651c;text-shadow:0 3px 0 #ffe6a5}
.replay-formula{font-size:21px;font-weight:700;margin:8px 0}.replay-copy .muted{font-size:13px;line-height:1.5}
.replay-total{font-size:18px;font-weight:700;color:#355799;margin-top:12px}
.replay-controls{display:flex;justify-content:center;gap:8px}.replay-controls .button{padding:6px 12px}
.settlement-details{margin:12px 0}.settlement-details summary{cursor:pointer;padding:8px}
@keyframes stone-land{from{transform:translateY(-18px) scale(1.15);opacity:.3}to{transform:none;opacity:1}}
@keyframes chain-flash{0%{filter:brightness(1)}45%{filter:brightness(1.5);transform:scale(1.08)}100%{filter:brightness(1);transform:none}}
@keyframes score-impact{from{opacity:0;transform:scale(.65)}65%{transform:scale(1.14)}to{opacity:1;transform:none}}
[data-motion=reduced] .replay-cell,[data-motion=reduced] .replay-points{animation:none}
@media(max-width:650px){.replay-body{gap:14px}.replay-wall{grid-template-columns:repeat(5,26px);gap:3px}.replay-cell{width:26px;height:26px;font-size:18px}.replay-copy{min-width:0}.replay-formula{font-size:16px}.replay-points,.replay-points.powerful{font-size:36px}}
.room-lobby{max-width:760px;margin:30px auto;padding:0 18px}.lobby-card{padding:28px}.lobby-card h1{margin:8px 0 20px}.lobby-card>.button{margin:8px 8px 8px 0}.lobby-seats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.lobby-seat{border:1px dashed #cbd4e3;border-radius:10px;padding:18px;color:#8b97a9}.lobby-seat.occupied{background:#f0f4ff;border-style:solid;color:#30476e}.room-code{letter-spacing:3px;font-weight:700}.invitation-text{display:block;width:100%;min-height:82px;padding:10px;border:1px solid #d8dfeb;border-radius:8px;resize:vertical;font:13px sans-serif}.dice-round{font-size:20px;background:#fff3d8;padding:12px;border-radius:10px}.victory-stage{position:relative;overflow:hidden;text-align:center;background:radial-gradient(ellipse at top,#fff0ba 0, #f6f8ff 65%);border:1px solid #e4cd83;border-radius:16px;padding:22px;margin:16px 0}.victory-crown{font-size:48px;color:#c88b17;text-shadow:0 0 30px #ffd25b;animation:champion-enter .75s ease-out}.victory-label{font-size:13px;letter-spacing:6px;color:#926015}.victory-stage .victory-name{font-size:34px;margin:8px;color:#233e74;animation:champion-enter .65s ease-out}.victory-reason{font-size:13px;color:#718099}.victory-standings{max-width:680px;margin:20px auto 0;display:grid;gap:8px}.victory-standing{display:grid;grid-template-columns:30px 1fr auto;gap:8px;text-align:left;align-items:center;padding:12px 16px;border-radius:10px;background:#ffffffcc;border:1px solid #e0e5ef}.victory-standing.champion{border-color:#dcae45;background:#fff8e6}.victory-rank{font-size:22px;color:#ad7f21}.victory-score{font-size:26px;color:#25477b}.victory-breakdown{grid-column:2/-1;font-size:12px;color:#78859a}.victory-stage.reduced *{animation:none}@keyframes champion-enter{from{opacity:0;transform:translateY(12px) scale(.8)}70%{transform:scale(1.06)}to{opacity:1;transform:none}}@media(max-width:600px){.lobby-seats{grid-template-columns:1fr}.victory-stage .victory-name{font-size:26px}}

/* Opening: one visible decision at a time. */
.room-lobby{max-width:1040px;margin:18px auto}.lobby-card{padding:24px 30px}.lobby-card h1{font-size:28px;margin:6px 0 14px}.room-code{font-size:12px;color:#8390a4;letter-spacing:1px;margin:8px 0}.opening-steps{display:flex;gap:8px;border-bottom:1px solid #e3e7ef;padding-bottom:14px}.opening-steps span{flex:1;padding:9px 12px;color:#8792a2;background:#f4f6fa;border-radius:8px}.opening-steps .active{color:#3559aa;background:#eaf0ff;font-weight:700}.opening-status h2{margin:18px 0 6px;font-size:24px}.opening-status p{margin:0 0 16px}.dice-players{display:flex;justify-content:center;gap:16px;margin:24px 0}.dice-player{flex:1;max-width:190px;text-align:center;border:1px solid #e1e6ed;border-radius:14px;padding:20px 8px;background:#f8f9fc}.dice-player.me{border:2px solid #5574c8;background:#f1f5ff}.dice-player strong{display:block;overflow-wrap:anywhere}.stone-die{font-size:80px;color:#4262b7;line-height:1.4}.roll-button{display:block;min-width:210px;margin:0 auto 22px;padding:14px}.opening-choice{display:grid;grid-template-columns:1fr 1fr;gap:28px;align-items:center}.seat-table{display:grid;grid-template-columns:1fr 1.3fr 1fr;grid-template-rows:85px 90px 85px;gap:8px;align-items:stretch}.seat-1{grid-area:1/2}.seat-2{grid-area:2/3}.seat-3{grid-area:3/2}.seat-4{grid-area:2/1}.seat-center{grid-area:2/2;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;color:#8090aa;font-size:12px}.seat-center strong{font-size:18px;color:#415b82}.seat-choice{border:2px dashed #cbd4e2;border-radius:12px;background:#fafbfe;cursor:pointer;color:#2d4464;display:flex;flex-direction:column;justify-content:center;gap:7px;padding:8px}.seat-choice strong{font-size:19px}.seat-choice span{font-size:12px;overflow-wrap:anywhere}.seat-choice.occupied{background:#edf1f7;border-style:solid}.seat-choice:disabled{opacity:.65;cursor:default}.seat-choice.selected,.faction-card.selected{border:2px solid #4262bb;background:#eef2ff;box-shadow:0 0 0 3px #4262bb18}.faction-picker h3{margin:0 0 5px}.faction-picker>p{font-size:12px}.faction-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px}.faction-card{border:2px solid #e0e5ec;border-radius:12px;padding:12px;background:#fafbf9;display:grid;grid-template-columns:40px 1fr;text-align:left;align-items:center;gap:4px 8px;cursor:pointer}.faction-symbol{grid-row:span 2;width:40px;height:48px;border-radius:6px;background:#e4eee6;color:#34756e;font-size:28px;text-align:center;line-height:48px}.faction-1 .faction-symbol{color:#b14d3e;background:#f6e4de}.faction-2 .faction-symbol{color:#7e765e;background:#edeade}.faction-3 .faction-symbol{color:#4c5263;background:#e1e4ec}.faction-card small{color:#8490a2;font-size:11px}.faction-card:disabled{opacity:.5;cursor:default}.choice-queue{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 18px}.queue-person{padding:7px 10px;font-size:12px;background:#f4f6f9;border-radius:20px;color:#7b879a}.queue-person.active{background:#fff0d4;color:#925e16}.opening-confirm{margin-top:18px;padding:14px 0 0;border-top:1px solid #e4e8ef;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px}.opening-history{font-size:12px;color:#8a95a5;margin-top:14px}.opening-history summary{cursor:pointer}.opening-history p{margin:8px 0}.lobby-card>.field-label{font-size:12px}.lobby-card>.field-label select{margin:0 10px}.room-lobby .name-field{margin:12px 0}.room-lobby>.button{margin:8px 8px 0 0}
@media(max-width:700px){.opening-choice{grid-template-columns:1fr}.room-lobby{padding:0 10px}.lobby-card{padding:18px}.dice-players{gap:6px}.stone-die{font-size:52px}.dice-player{font-size:12px}.opening-steps span{font-size:12px;padding:8px}.opening-confirm{flex-wrap:wrap}}
@media(min-width:900px){
 .room-lobby:has(.opening-stage){margin:10px auto}
 .lobby-card:has(.opening-stage){padding:18px 24px}
 .lobby-card:has(.opening-stage)>h1,.lobby-card:has(.opening-stage)>.eyebrow{display:none}
 .opening-steps{padding-bottom:9px}.opening-status h2{margin-top:12px;font-size:22px}
 .opening-status p{margin-bottom:10px}.choice-queue{margin:8px 0 12px}
 .seat-table{grid-template-rows:68px 76px 68px}
 .opening-confirm{margin-top:12px;padding-top:10px}.opening-history{margin-top:8px}
 .lobby-card:has(.opening-stage)>.button{margin-bottom:0;padding:6px 12px}
}

/* Keep confirmation below all five rows, including floor placements. */
.primary-board .board-action-dock{min-height:42px;padding-top:6px;width:100%}
.primary-board .board-action-dock .board-action{width:100%;justify-content:flex-end}
.primary-board .board-action-dock .board-actions{margin-left:auto}
.opponent-boards .board-action-dock{display:none}

/* Opponent cards: fit both five-cell rows inside the actual card width. */
.opponent-boards .player-board{min-width:0}
.opponent-boards .board-head{height:auto;min-height:32px;gap:6px;align-items:center;margin-bottom:6px}
.opponent-boards .player-identity{flex:1;min-width:0}
.opponent-boards .score{flex-shrink:0}
.opponent-boards .board-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);width:100%;max-width:100%;--opponent-tile:18px}
.opponent-boards .pattern-line,.opponent-boards .wall-row{min-width:0;align-items:center;gap:3px}
.opponent-boards .pattern-line{padding-left:10px}
.opponent-boards .wall-row .tile,.opponent-boards .pattern-line .tile{width:min(var(--opponent-tile),calc((100% - 12px)/5));height:auto;aspect-ratio:1;flex-shrink:0}
.opponent-boards .floor{flex-wrap:wrap}
@media(min-width:1600px) and (min-height:900px){.opponent-boards .board-grid{--opponent-tile:26px}}
@media(min-width:1000px) and (max-height:850px) and (orientation:landscape){.opponent-boards .board-grid{--opponent-tile:16px;row-gap:1px}.opponent-boards .board-head{margin-bottom:4px}}

/* Follow the active player without shrinking their board or implying a committed move. */
.watch-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.watch-toolbar .button{min-height:36px;padding:7px 12px}
.attention-status{min-height:24px;margin:4px 0 10px;padding:8px 12px;background:#f4efe2;border-left:3px solid #4d8077;color:#315b53;font-size:14px;line-height:1.5}
.watch-hover{outline:3px dashed #388b83!important;outline-offset:3px;box-shadow:0 0 0 5px #388b8320!important;position:relative;z-index:2}
.self-label{font-size:12px;border-radius:4px;padding:2px 5px;background:#e8eee8;color:#315b53}
.primary-board .turn-tag{display:inline-block}
@media(max-width:620px){.watch-toolbar{position:sticky;top:0;background:#f8f3e8;z-index:5;padding:6px 0}.watch-toolbar .button{flex:1;font-size:12px}.attention-status{font-size:13px}.active-area{min-width:0}}

/* Native room actions stay discoverable without changing the game artwork. */
.room-action-reason{margin:10px 0;padding:8px 10px;border-left:3px solid var(--seal);font-size:14px;line-height:1.5;color:var(--ink,#4f5144)}
.top-actions .leave-shortcut{white-space:nowrap}
@media(max-width:760px){.topbar:has(.leave-shortcut){align-items:center;gap:8px}.topbar:has(.leave-shortcut) .top-actions{width:100%;justify-content:flex-end;flex-wrap:nowrap}.topbar:has(.leave-shortcut) .top-actions>.button{min-height:40px;padding:8px 10px;font-size:13px}}

.settlement-tools{display:flex;justify-content:flex-end;gap:8px;position:sticky;top:0;z-index:3;background:#faf5e9;margin-bottom:8px;padding-bottom:6px}.compact-settlement .settlement-tools .summary-close{position:static;margin:0}.compact-settlement:has(.settlement-tools) .round-summary>.eyebrow{margin-right:0}

/* Load decorative backdrops after the game has installed usable controls. */
html:not([data-game-ui-ready]) body{background-image:none!important}
