/* Gameplay overlay only. The approved 2.31 canvas, camera and world materials are untouched. */
body.stage3-game{color:#3d3427;font-family:"Trebuchet MS","Segoe UI",sans-serif}
body.stage3-game #prototype-caption,body.stage3-game #quality-status,body.stage3-game #instructions,body.stage3-game #bloom-controls,body.stage3-game #environment-controls{display:none!important}
body.stage3-game.show-environment #bloom-controls,body.stage3-game.show-environment #environment-controls{display:flex!important;z-index:65;background:#f5eddb;padding:9px;border-radius:6px;box-shadow:0 4px 12px #234a5966}
body.stage3-game.show-environment #bloom-controls{top:78px;left:50%;transform:translateX(-50%)}
body.stage3-game #dev-info-toggle{z-index:66;top:auto;bottom:12px;right:14px;font-size:10px}
body.stage3-game #debug-panel{z-index:67;top:60px}
body.stage3-game #gate{z-index:1000}
#game-hud{--p0:#a7474a;--p1:#2f698c;--pyramid-scale:1;--side-width:clamp(250px,19vw,470px);--ui-font:clamp(12px,.76vw,19px);position:absolute;inset:0;z-index:20;pointer-events:none;font-size:var(--ui-font);color:#3d3427}
#game-hud [hidden],#game-overlay [hidden],#game-world [hidden]{display:none!important}
#game-hud button,#game-overlay button,#game-world button,#game-view-toggle{font-family:inherit;font-size:inherit;line-height:1.25;cursor:pointer;margin:0;color:inherit;touch-action:manipulation}
#game-hud button,#game-overlay button{border:1px solid #baa17b;background:#eee3c7;border-radius:5px;min-height:34px;padding:7px 11px;transition:filter .12s,box-shadow .12s}
#game-hud button:hover:not(:disabled),#game-overlay button:hover:not(:disabled){filter:brightness(1.06);box-shadow:0 2px 5px #59422922}
#game-hud button:focus-visible,#game-overlay button:focus-visible,#game-world button:focus-visible{outline:3px solid #3e8098;outline-offset:3px}
#game-hud button:disabled,#game-overlay button:disabled{opacity:.48;cursor:not-allowed}
#game-hud .primary,#game-overlay .primary{background:#456d54;color:#fff9e9;border-color:#355540;font-weight:700}
#game-hud h2,#game-overlay h2,#game-hud h3,#game-overlay h3,#game-overlay h4{font-family:Georgia,"Times New Roman",serif;color:#3f3a2b}
#game-hud h2{font-size:1.12em;margin:0 0 10px;font-weight:600}
#game-hud p,#game-overlay p{line-height:1.5}
#game-hud .painted-panel,#game-overlay .painted-panel{border:16px solid transparent;border-image:url('../../assets/game/board_panel.webp') 82 fill /16px stretch;padding:7px 9px;color:#3d3427;filter:drop-shadow(0 4px 7px #1c3f4933)}
#game-hud img,#game-overlay img,#game-world img{user-select:none;pointer-events:none;object-fit:contain}
.coin-icon{display:inline-block;width:1.15em;height:1.15em;vertical-align:-.2em;margin-right:3px;object-fit:contain}
.stat-icon{display:inline-block;width:1.55em;height:1.55em;vertical-align:middle;margin-right:5px}
.type-icon{display:inline-block;width:1.35em;height:1.35em;vertical-align:middle;margin-right:2px}
.player-0{--player-color:#a7474a}.player-1{--player-color:#2f698c}
.player-dot{display:inline-block;width:.65em;height:.65em;border-radius:50%;background:var(--player-color);margin-right:6px;flex-shrink:0}
.game-top{position:absolute;top:12px;left:20px;right:20px;display:flex;align-items:flex-start;justify-content:space-between;gap:20px;pointer-events:none}
.game-brand{font:600 clamp(13px,1vw,25px) Georgia,serif;letter-spacing:.10em;color:#fbf4df;text-shadow:0 2px 4px #23434e;line-height:1.6;margin-top:3px}
.game-brand span{display:block;font:700 .62em/1.5 "Trebuchet MS",sans-serif;letter-spacing:.25em;color:#f0e9d5}
.turn-current{position:absolute;left:50%;top:0;transform:translateX(-50%);background:url('../../assets/game/plate_cream.webp') center/100% 100% no-repeat;min-width:clamp(280px,24vw,600px);padding:9px 32px 12px;text-align:center;font-size:1em;pointer-events:auto}
.turn-current strong{font:700 1.25em Georgia,serif;color:var(--player-color,#3d3427);display:block;margin:0 0 3px}
.turn-current>span{font-size:.85em}.game-toolbar{display:flex;gap:7px;pointer-events:auto}
.game-toolbar button{background:#f4ead0!important;color:#3f3a2b!important}
.draft-corner{position:absolute;left:18px;top:80px;width:max-content;pointer-events:none}
.draft-heading{display:flex;align-items:center;gap:14px;max-width:100%;height:87px;color:#f8f0db;text-shadow:0 2px 4px #23434e}
.draft-heading>img{width:112px;height:94px;filter:drop-shadow(0 3px 4px #23434e55)}
.draft-heading>div>strong{font-family:Georgia,serif;font-size:1.2em}.draft-heading p{font-size:.88em;margin:6px 0}
.draft-heading .fold-button{pointer-events:auto;min-width:32px;min-height:30px;padding:0;background:#f1e8d0;color:#3d3427;text-shadow:none}
#pyramid-scale-box{width:574px;height:272px;position:relative;margin-top:5px}
#pyramid{position:absolute;left:0;top:0;width:574px;height:272px;transform:scale(var(--pyramid-scale));transform-origin:top left;overflow:visible;background:none;pointer-events:none}
#game-hud .pcard{position:absolute;width:94px;height:74px;min-height:74px;padding:0;margin:0;border:none;border-radius:5px;background-position:center;background-size:100% 100%;background-color:transparent;overflow:hidden;pointer-events:auto;box-shadow:0 2px 3px #172f3d33;text-align:left;transition:transform .15s,filter .15s;line-height:1.1;isolation:isolate}
#game-hud .pcard:disabled{opacity:1;cursor:default}
#game-hud .pcard.covered{filter:saturate(.87) brightness(.96)}
#game-hud .pcard.open{filter:brightness(1.04);box-shadow:0 4px 7px #142a374d;cursor:pointer}
#game-hud .pcard.open:hover:not(:disabled){transform:translateY(-3px);filter:brightness(1.1);box-shadow:0 6px 8px #142a374d}
#game-hud .pcard.selected{outline:2px solid #efcb72;outline-offset:1px}
.card-art{position:absolute;top:10px;left:12px;width:26px;height:26px;border-radius:4px}
.card-type{position:absolute;top:15px;left:39px;width:13px;height:15px}
.card-cost{position:absolute;top:14px;right:11px;font-size:9px;font-weight:800;color:#795a21;display:flex;align-items:center;gap:1px}.card-cost .coin-icon{width:10px;height:10px;margin:0}
.card-name{position:absolute;top:39px;left:12px;right:10px;color:#3d3427;font:700 8.6px/1.12 "Trebuchet MS",sans-serif;max-height:21px;overflow:hidden}
.pyramid-help{font-size:.88em;max-width:560px;color:#faf3dc;text-shadow:0 2px 4px #193c4c;margin:3px 0 0 8px}.pyramid-help .coin-icon{width:13px;height:13px}
.draft-corner.folded #pyramid-scale-box,.draft-corner.folded .pyramid-help{display:none}
@keyframes openedCard{from{filter:brightness(1.5);transform:translateY(-4px)}to{filter:brightness(1.04);transform:none}}
.pcard.newly-open{animation:openedCard .6s ease-out}
.game-sidebar{position:absolute;right:12px;top:66px;width:var(--side-width);bottom:54px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#ab8c60 transparent;pointer-events:auto;display:flex;flex-direction:column;gap:7px}
.players-summary{flex-shrink:0}.ranch-summary{padding:9px 4px 10px;border-bottom:1px solid #b6a38188;position:relative}
.ranch-summary:last-child{border-bottom:0;padding-bottom:1px}.ranch-summary.active-player{background:#fff6d644;border-radius:5px}
.player-name{display:flex;align-items:center;gap:2px;color:var(--player-color);font-size:1.08em}
.player-name strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.player-name small{margin-left:auto;font:700 .60em "Trebuchet MS",sans-serif;letter-spacing:.05em;white-space:nowrap;opacity:.9}
.player-stats{display:grid;grid-template-columns:1fr 1.1fr;gap:7px 5px;margin:10px 0;font-size:.87em;color:#4f4634}
.player-stats>span{display:flex;align-items:center;white-space:nowrap}.player-stats .coin-icon{margin-right:6px}
.region-track{display:flex;justify-content:space-between;gap:4px;font-size:.72em;margin-bottom:8px;color:#65583e}
.region-track>span{display:flex;align-items:center;gap:1px;padding:2px}.region-track .complete{background:#e8d084;border-radius:4px;font-weight:800}
#game-hud .fortune-button{display:flex;align-items:center;width:100%;min-height:30px;padding:4px 7px;font-size:.83em;background:#ead8b58c;border:1px solid #bda984}
.fortune-button>b{margin-left:auto}.fortune-button:disabled{opacity:.45!important}
.shop-panel{flex-shrink:0}.shop-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
#game-hud .shop-grid button{display:flex;align-items:center;text-align:left;min-height:66px;padding:6px 5px;gap:4px;background:#f5ebd2bb;border-color:#c7b894;line-height:1.2;font-size:.84em}
.shop-icon{width:30px;height:34px;flex-shrink:0}.shop-grid small{display:block;font-size:.78em;margin-top:4px;opacity:.72}
.utility-links{display:flex;gap:4px;margin-top:7px;flex-wrap:wrap}#game-hud .utility-links button{font-size:.73em;min-height:28px;padding:5px 7px;flex:1;white-space:nowrap}
.game-log-panel{min-height:180px;flex:1}.game-log-panel h2{display:flex;align-items:center;justify-content:space-between}#game-hud .game-log-panel h2 button{min-height:24px;padding:1px 6px;font-size:11px}
#game-log{padding:0;margin:0;list-style:none;font-size:.78em;line-height:1.45;display:flex;flex-direction:column;gap:8px}
#game-log li{padding-bottom:7px;border-bottom:1px solid #cab99499}#game-log li:last-child{border-bottom:0}
.game-hands{position:absolute;left:12px;bottom:14px;width:min(53vw,1260px);height:clamp(158px,24vh,370px);display:grid;grid-template-columns:1fr 1fr;gap:9px;pointer-events:auto}
.hand-panel{min-width:0;height:100%;display:flex;flex-direction:column}.hand-panel h2{margin:1px 0 7px!important;display:flex;align-items:center;color:var(--player-color)!important;font-size:1em!important;flex-shrink:0}
.hand-panel h2 small{font:400 .65em "Trebuchet MS",sans-serif;margin-left:auto;white-space:nowrap;padding-left:7px;color:#7c6a50}
.hand-panel.active-player h2{border-bottom:2px solid var(--player-color);padding-bottom:7px}
.hand-scroll{overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b2976a transparent;flex:1;min-height:0}
.empty-hand{font-size:.88em;color:#897659;margin:18px 2px;font-style:italic}
.hand-deeds{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-bottom:7px}
#game-hud .hand-deed{display:flex;gap:4px;text-align:left;padding:5px 6px;border:1px solid #c7b793;font-size:.68em;min-height:40px;background:#f9efd799;overflow:hidden}
.hand-icon{width:23px;height:25px;flex-shrink:0}.hand-deed small{display:block;font-size:.88em;margin-top:3px;color:#847359}
.hand-creatures{display:flex;gap:6px;flex-wrap:wrap}
#game-hud .hand-critter{position:relative;flex:0 0 calc(25% - 5px);min-width:72px;max-width:135px;background:url('../../assets/game/board_cardframe.webp') center/100% 100%;border:0;padding:9px 7px 10px;display:flex;flex-direction:column;align-items:center;min-height:108px;font-size:.63em;text-align:center}
.hand-body{height:57px;max-width:70px;object-fit:contain}.hand-power{position:absolute;top:8px;right:9px;background:#eee2bd;color:#6b4c1c;border-radius:50%;width:18px;height:18px;display:grid;place-items:center;font-weight:800;font-size:12px}
.hand-critter strong{margin-top:3px;white-space:nowrap;font-size:1em}.hand-critter small{font-size:.9em;margin-top:3px;max-width:100%;color:#73624c}.hand-critter.recovering{filter:grayscale(.5)}.hand-critter .gear{font-size:.85em}
#game-overlay{position:absolute;inset:0;z-index:80;background:#13384769;display:grid;place-items:center;padding:20px;font:clamp(13px,.88vw,20px)/1.5 "Trebuchet MS","Segoe UI",sans-serif;color:#3d3427;overscroll-behavior:contain}
#game-overlay .game-dialog{width:min(740px,95vw);max-height:calc(100% - 36px);display:flex;flex-direction:column;padding:18px 25px 14px;border-width:25px;border-image-width:25px;position:relative}
.dialog-header{display:flex;align-items:center;gap:20px;flex-shrink:0;margin-bottom:8px}.dialog-art{width:78px;height:90px;object-fit:contain;flex-shrink:0}
.dialog-header h2{font:600 1.65em/1.15 Georgia,serif;margin:0 0 6px;outline:none}.dialog-eyebrow{font:700 .65em/1.4 "Trebuchet MS",sans-serif;letter-spacing:.1em;color:#8a7353;margin:0 0 6px}
.dialog-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b2976a transparent;padding:0 4px 0 0}.dialog-content p:first-child{margin-top:5px}
.dialog-footer{display:flex;flex-wrap:wrap;gap:8px;padding-top:16px;border-top:1px solid #c8b797;margin-top:12px;flex-shrink:0}.dialog-footer button{font-size:.92em!important;min-height:40px!important}
.dialog-options{display:flex;flex-direction:column;gap:7px}.dialog-options:empty{display:none}
#game-overlay .dialog-option{display:flex;gap:12px;align-items:center;padding:9px 12px;min-height:52px;text-align:left;background:#f5ecd7c9;border-color:#c8b99d;flex-shrink:0}
.dialog-option small{display:block;font-size:.8em;line-height:1.35;color:#7e6e55;margin-top:4px}.option-icon{width:38px;height:40px;flex-shrink:0}
#game-overlay.pick-world{background:transparent;pointer-events:none;display:flex;align-items:flex-start;justify-content:flex-end;padding:76px 17px 36px}
#game-overlay.pick-world .game-dialog{width:clamp(300px,27vw,560px);max-height:100%;pointer-events:auto;border-width:18px;border-image-width:18px;padding:10px 10px 12px;font-size:.91em;filter:drop-shadow(0 6px 12px #16384455)}
.pick-world .dialog-art{width:60px;height:70px}.pick-world .dialog-header{gap:11px}.pick-world .dialog-header h2{font-size:1.5em}
.reason{background:#eed0bb;color:#844330;border-left:3px solid #a96142;padding:9px 12px;border-radius:3px;font-size:.9em}.small-note{font-size:.82em;color:#7e6d53}.purchase-price{font-weight:700;font-size:1.05em}.purchase-price>span{font-weight:400;color:#847156;font-size:.85em}.empty-state{font-style:italic;color:#8a795c;padding:7px 0}
.name-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:20px 0}.name-fields label{font-weight:700;color:var(--player-color);font-size:.85em}.name-fields input{display:block;width:100%;margin-top:7px;min-height:42px;padding:8px 10px;font:inherit;color:#463a28;background:#fff9e9;border:1px solid #baa681;border-radius:4px}
.setup-lead{font:500 1.2em/1.4 Georgia,serif}.deploy-checks{display:flex;flex-direction:column;gap:8px}.deploy-checks>label{display:flex;align-items:center;gap:12px;border:1px solid #c5b18d;border-radius:5px;padding:7px 11px;background:#f8efd7}.deploy-checks input{margin-left:auto;width:19px;height:19px;accent-color:#537453;cursor:pointer}
.dice-display{width:85px;height:100px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:48px;background:#fff8e4;border:2px solid #b69b6c;border-radius:12px;margin:14px auto 25px;box-shadow:2px 3px 0 #a78c63;color:#5b4930;font-weight:700;line-height:1}.dice-display small{font-size:11px;opacity:.6;margin-top:7px}
.battle-sides{display:grid;grid-template-columns:1fr 30px 1fr;gap:12px;align-items:center;text-align:center}.battle-sides>div{display:flex;flex-direction:column;align-items:center}.battle-body{width:110px;height:110px}.battle-sides strong{font:700 34px/1.3 Georgia,serif}.battle-sides small{font-size:.77em;color:#836f54}.battle-verdict{font:700 1.2em Georgia,serif;text-align:center}.battle-equation{padding:12px;background:#eee0bf;border-radius:5px}
.vault-pool{font-size:1.3em;font-weight:700}.vault-health{height:13px;background:#cfbfa0;border-radius:7px;overflow:hidden}.vault-health>span{display:block;height:100%;background:#739466}.quarter-scores{display:flex;gap:25px;justify-content:center}.quarter-scores>span{text-align:center;color:var(--player-color)}.quarter-scores b{display:block;font-size:2em}
.score-table{font-size:.87em}.score-row{display:grid;grid-template-columns:1.4fr .6fr 1fr .8fr .7fr;gap:8px;padding:10px 0;border-bottom:1px solid #baa981;text-align:center}.score-row>:first-child{text-align:left;color:var(--player-color)}.score-row.heading{color:#89704d;font-size:.8em;font-weight:700}
.rules-copy h3{margin:23px 0 8px;font-size:1.2em}.rules-copy h3:first-child{margin-top:5px}.rules-copy h4{margin:0 0 4px;font-size:1.02em}.rules-copy p{font-size:.92em}.guide-card{display:flex;gap:15px;align-items:flex-start;padding:15px 0;border-bottom:1px solid #c8b99c}.guide-art{width:52px;height:56px;flex-shrink:0}.guide-card p{margin:3px 0}.type-ring{font-size:.84em;line-height:1.8}
.creature-catalog{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.creature-catalog article{display:flex;flex-direction:column;align-items:center;text-align:center;padding:10px 5px;background:#f6e9c988;border-radius:7px;font-size:.86em}.catalog-body{height:100px;width:100px}.creature-catalog small{font-size:.84em;color:#897455;margin-top:4px}.full-journal{padding-left:20px;font-size:.91em}.full-journal li{padding:8px 0;border-bottom:1px solid #c8b99c}
.turn-banner{position:absolute;left:50%;top:95px;transform:translateX(-50%);padding:13px 28px;background:#f8edd4;border:1px solid #ad956d;border-radius:6px;font:700 1.25em Georgia,serif;box-shadow:0 4px 14px #1e445255;color:var(--player-color);pointer-events:none;white-space:nowrap}
.game-toast{position:absolute;left:50%;bottom:34px;transform:translateX(-50%);background:#fff1d9;border:1px solid #c59966;padding:12px 20px;border-radius:6px;box-shadow:0 3px 12px #14364244;font-size:.95em;max-width:min(70vw,650px);pointer-events:none}
#game-view-toggle{position:absolute;z-index:70;bottom:12px;left:auto;right:120px;transform:none;padding:7px 14px;background:#f2e5c9e8;border:1px solid #b5a17b;border-radius:5px;min-height:32px;font:12px "Trebuchet MS",sans-serif;color:#59462d}
#game-world{position:absolute;inset:0;overflow:hidden;z-index:5;pointer-events:none}
.world-anchor{position:absolute;left:0;top:0;transform-origin:center;pointer-events:none;width:max-content}
#game-world button{pointer-events:auto;min-height:0;position:relative;border:0;background:none;padding:0;display:block;line-height:1.2;color:#453d2d}
#game-world .world-plate{background:url('../../assets/game/plate_cream.webp') center/100% 100% no-repeat;min-width:128px;max-width:185px;padding:8px 14px 9px;filter:drop-shadow(0 2px 2px #12344344);text-align:center}
.world-plate strong{display:block;font:700 13px Georgia,serif;white-space:nowrap}.world-plate span{display:block;font:10px "Trebuchet MS",sans-serif;margin-top:3px}.world-plate span>span{display:inline;margin:0}
.owner-0{--owner:#a7474a}.owner-1{--owner:#2f698c}.world-plate.owner-0 strong,.world-plate.owner-1 strong{color:var(--owner)}
#game-world .world-critter{width:69px;height:92px;filter:drop-shadow(0 2px 2px #12344366)}.world-body{width:64px;height:76px;object-fit:contain;display:block}.power-badge{position:absolute;top:2px;right:0;background:var(--owner);color:#fff7dd;border:2px solid #f6eace;border-radius:50%;width:22px;height:22px;display:grid;place-items:center;font:700 12px "Trebuchet MS",sans-serif}
.world-token-name{position:absolute;bottom:0;left:50%;transform:translateX(-50%);background:#f6edcf;border-radius:3px;padding:2px 5px;white-space:nowrap;font:700 10px "Trebuchet MS",sans-serif;color:var(--owner)}
.world-critter.evolved .power-badge{outline:2px solid #edc65c;outline-offset:1px}.world-structure{height:61px;width:66px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 2px 2px #1c394f66)}
#game-world .world-item{width:52px;height:44px}.guard-face{width:39px;height:39px}.prize-face{position:absolute;right:0;bottom:0;width:22px;height:22px;filter:drop-shadow(0 1px 1px #183542aa)}
/* Legal targets remain in the registry; no yellow selection boxes. */.world-anchor.focused button{filter:brightness(1.06)!important}
.world-anchor.legal-target::before{content:none;}
#game-world.input-blocked button{pointer-events:none}
@keyframes worldFlash{0%{filter:brightness(1.6)}100%{filter:brightness(1)}}.world-flash>button{animation:worldFlash .75s ease-out}
@media(min-width:2100px){.draft-corner{top:110px;left:28px}.draft-heading{height:110px}.draft-heading>img{width:142px;height:118px}.game-sidebar{top:82px;right:20px;bottom:60px}.game-top{top:18px;left:30px;right:26px}.game-hands{left:20px;bottom:18px;gap:14px}.hand-body{height:78px;max-width:88px}#game-hud .hand-critter{min-height:144px}.game-top .game-toolbar button{min-height:45px}#game-overlay .game-dialog{width:min(940px,90vw);padding:24px 32px;border-width:32px;border-image-width:32px}.dialog-art{width:100px;height:120px}}
@media(max-height:850px){.draft-corner{top:62px}.draft-heading{height:65px}.draft-heading>img{width:88px;height:73px}.draft-heading>div>strong{font-size:1em}.game-hands{height:190px}.game-sidebar{top:60px;gap:5px}.players-summary{padding-top:0!important}.ranch-summary{padding:6px 3px}.player-stats{margin:7px 0;gap:5px}.region-track{margin-bottom:5px}#game-hud .shop-grid button{min-height:57px}.game-log-panel{min-height:145px}.hand-panel h2 small{display:none}}
@media(max-width:1100px){#game-hud{--side-width:230px;--ui-font:11px}.game-top{left:14px;right:12px}.game-brand{font-size:11px}.turn-current{min-width:245px;left:50%;padding:8px 18px}.game-toolbar button{font-size:11px!important;padding:6px 8px!important}.draft-corner{left:10px}.draft-heading{height:66px}.draft-heading>img{width:82px;height:70px}.game-hands{width:61vw;gap:5px;left:6px}.hand-panel{border-width:11px!important;border-image-width:11px!important;padding:5px!important}#game-hud .hand-critter{min-width:62px}.hand-creatures{gap:4px}.hand-body{height:46px}#game-hud .shop-grid button{font-size:.88em;padding:5px 3px}.shop-icon{width:24px;height:29px}.shop-panel,.players-summary,.game-log-panel{border-width:12px!important;border-image-width:12px!important;padding:6px!important}.game-sidebar{right:7px}.utility-links{gap:2px}#game-hud .utility-links button{padding:4px;min-height:27px}}
@media(max-width:760px){#game-hud{--side-width:198px;--ui-font:10px}.game-brand{max-width:140px;font-size:10px;letter-spacing:.02em}.game-top{top:8px;left:8px;right:8px}.turn-current{top:40px;left:auto;right:0;transform:none;min-width:192px;max-width:210px}.game-sidebar{top:110px;bottom:215px}.game-toolbar button{min-height:30px}.draft-corner{top:50px;left:6px}.draft-heading{gap:5px}.draft-heading>div>strong{font-size:11px}.draft-heading p{font-size:9px}.draft-heading>img{width:68px;height:58px}.draft-heading .fold-button{min-width:24px;min-height:24px}.pyramid-help{max-width:300px;font-size:10px}.game-hands{left:6px;right:6px;bottom:46px;width:auto;height:158px}.game-log-panel{display:none}.game-sidebar{scrollbar-width:none}.player-name small{display:none}.player-stats{font-size:.91em}.region-track{font-size:.7em}.hand-panel h2{font-size:11px!important}.hand-scroll{max-height:100%}#game-view-toggle{font-size:10px;bottom:8px;left:50%;right:auto;transform:translateX(-50%)}#game-overlay{padding:8px;font-size:13px}#game-overlay .game-dialog{border-width:17px;border-image-width:17px;padding:10px 9px;max-height:calc(100% - 14px)}#game-overlay.pick-world{padding:95px 6px 46px}#game-overlay.pick-world .game-dialog{width:290px;font-size:12px}.dialog-header h2{font-size:1.4em}.dialog-art{width:55px;height:65px}.dialog-header{gap:12px}.name-fields{gap:10px}.dialog-footer{gap:5px}.dialog-footer button{font-size:12px!important}.creature-catalog{grid-template-columns:repeat(2,1fr)}.turn-banner{top:100px;font-size:12px;max-width:94vw}.game-toast{bottom:220px;max-width:85vw;font-size:12px}}
@media(prefers-reduced-motion:reduce){.pcard,.world-flash>button{animation:none!important;transition:none!important}}

#game-hud .draft-heading .fold-button{color:#4d3b2a}

/* Stage 3.2: source-art skin, bounded scrolling, and the final rope/deed fixes. */
html,body.stage3-game{margin:0;padding:0;overflow:hidden;width:100%;height:100%;}
#game-hud,#game-overlay,#game-world{box-sizing:border-box;}
#game-hud *,#game-overlay *{box-sizing:border-box;}
.vector-icon{display:inline-block;flex-shrink:0;vertical-align:middle;pointer-events:none;overflow:visible;}
#game-hud .painted-panel,#game-overlay .painted-panel{border-image-source:url('../../assets/game/board_panel_clean.webp');}
/* Each button has only two fixed-aspect original pins. The source's stray
   middle nail is absent from both derived plank images. No stretched pins. */
#game-hud button:not(.pcard):not(.hand-critter):not(.hand-deed),#game-overlay button{
 border:0;background-color:transparent;color:#51442e;border-radius:0;
 background-image:url('../../assets/game/button_pin.webp'),url('../../assets/game/button_pin.webp'),url('../../assets/game/plate_cream_clean.webp');
 background-size:6px 6px,6px 6px,100% 100%;background-position:7px center,calc(100% - 7px) center,center;background-repeat:no-repeat;
 padding:11px 18px;min-height:38px;filter:drop-shadow(0 2px 1px #3c301622);font-weight:600;
}
#game-hud button:not(.pcard):not(.hand-critter):not(.hand-deed):hover:not(:disabled),#game-overlay button:hover:not(:disabled){filter:brightness(1.08) drop-shadow(0 2px 2px #65472633);box-shadow:none;}
#game-hud .primary,#game-overlay .primary,#game-overlay .selected-preset{
 background-color:transparent;background-image:url('../../assets/game/button_pin.webp'),url('../../assets/game/button_pin.webp'),url('../../assets/game/plate_green_clean.webp');color:#405137;
}
#game-hud .game-toolbar button{background-color:transparent!important;color:#51442e!important;}
#game-hud .fold-button{padding:9px 13px!important;white-space:nowrap;min-width:85px!important;}
#game-overlay{position:fixed;inset:0;min-height:0;overflow:hidden;padding:24px;}
#game-overlay .game-dialog{max-height:calc(100dvh - 48px);min-height:0;width:min(900px,94vw);}
#game-overlay .dialog-content{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;}
#game-overlay .dialog-header,#game-overlay .dialog-footer{flex:0 0 auto;}
#game-overlay .dialog-option{padding:14px 24px;min-height:64px;gap:14px;}
#game-overlay .dialog-option small{font-weight:400;}
/* Timber itself is cream-coloured. No second cream/paper panel. */
#game-overlay .game-dialog.timber-dialog{
 border:42px solid transparent;border-image:url('../../assets/game/menu_timber.webp') 219 173 210 173 fill /42px 36px stretch;
 background:none;width:min(950px,94vw);padding:20px 24px 14px;overflow:visible;filter:drop-shadow(0 6px 10px #162b3544);
}
#game-overlay .timber-dialog[data-dialog=setup]{width:min(1240px,95vw);}
#game-overlay .timber-dialog[data-dialog=guide]{width:min(1120px,95vw);}
.timber-dialog .dialog-header{padding:0 10px;margin-bottom:16px;}
.timber-dialog:not([data-dialog=setup]):not([data-dialog=guide]) .dialog-header{justify-content:center;}
.timber-dialog:not([data-dialog=setup]):not([data-dialog=guide]) .dialog-eyebrow{display:none;}
.timber-dialog .dialog-footer{border-top:0;margin-top:18px;padding-top:8px;}
.timber-dialog[data-dialog=setup] .dialog-footer{justify-content:center;}
.timber-dialog[data-dialog=setup] .name-fields{grid-template-columns:1fr;gap:18px;margin:22px 0 10px;}
.timber-dialog .name-fields input{background:#99896229;border:0;border-radius:10px;box-shadow:inset 0 3px 8px #5d482544;color:#504630;text-align:center;min-height:50px;}
.timber-dialog .dialog-art{width:88px;height:94px;}
.timber-dialog[data-dialog=graphics] .dialog-option{min-height:84px;padding:17px 25px;font-size:1.22em;}
.timber-dialog[data-dialog=graphics] .dialog-option small{font-size:.74em;line-height:1.5;}
#game-overlay .selected-preset{outline:2px solid #ac985c;outline-offset:-3px;}
.corner-ivy{position:absolute;z-index:3;pointer-events:none!important;object-fit:contain;max-width:none;filter:drop-shadow(1px 3px 2px #39433133);}
.corner-ivy.ivy-tl{width:150px;height:150px;left:-32px;top:-32px;transform-origin:33% 20%;}
.corner-ivy.ivy-br{width:143px;height:143px;right:-30px;bottom:-32px;transform-origin:35% 20%;rotate:180deg;}
.clever-way{background:#e4cf9130;border:1px solid #e8d38a;border-radius:8px;padding:16px 18px;line-height:1.55;}
.clever-way>strong{color:#8b662b;}.rules-actions,.rules-bottom{display:flex;gap:12px;margin-top:14px;flex-wrap:wrap;}
.rules-copy h3{background:#9a86652b;border-radius:6px;padding:10px 12px;}
#game-overlay .sound-toggle{width:100%;text-align:left;font-size:1.2em;}.sound-toggle small{display:block;font-size:.76em;margin-top:5px;font-weight:400;}
.audio-control{display:block;padding:20px 22px;margin:16px 0;border:1px solid #e6d29a;border-radius:14px;font-size:1.15em;font-weight:600;background:transparent;}
.audio-control output{float:right;font-size:.85em;font-weight:400;color:#736c57;}
.audio-control input{display:block;width:100%;margin:24px 0;accent-color:#c29b51;cursor:pointer;}
.audio-control small{font-size:.74em;font-weight:400;display:block;color:#7b705c;}
/* Exactly two ropes across the entire scrolling sidebar, not per board. */
.sidebar-shell{position:absolute;right:12px;top:76px;bottom:54px;width:var(--side-width);pointer-events:auto;}
#game-hud .game-sidebar{position:relative;inset:auto;width:100%;height:100%;max-height:100%;padding:18px 0;overflow-x:hidden;overflow-y:auto;gap:12px;}
.sidebar-rope{position:absolute;left:18px;right:18px;height:15px;background:url('../../assets/game/rope_line.webp') center/auto 14px repeat-x;z-index:5;pointer-events:none;}
.rope-top{top:13px;}.rope-bottom{bottom:13px;}
.sidebar-rope::before,.sidebar-rope::after{content:'';position:absolute;top:-11px;width:43px;height:37px;background:url('../../assets/game/rope_corner.webp') center/contain no-repeat;}
.sidebar-rope::before{left:-24px;}.sidebar-rope::after{right:-24px;transform:scaleX(-1);}
.game-sidebar>.painted-panel{flex:0 0 auto;}
.game-sidebar>.players-summary{padding-top:14px!important;}
#game-hud .game-log-panel{display:flex;flex-direction:column;flex-shrink:0;min-height:310px;height:clamp(310px,38vh,520px);}
#game-log{display:block;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 2px 5px;font-size:.88em;line-height:1.6;}
#game-log li{padding:10px 0;overflow-wrap:anywhere;}
#game-hud .game-log-panel h2{flex:0 0 auto;padding-bottom:7px;margin-bottom:5px;}
#game-hud .game-log-panel h2 button{min-width:35px;min-height:34px;padding:5px 10px;}
.game-sidebar,.hand-scroll,.dialog-content,#game-log,.full-journal{scrollbar-width:none!important;-ms-overflow-style:none;}
.game-sidebar::-webkit-scrollbar,.hand-scroll::-webkit-scrollbar,.dialog-content::-webkit-scrollbar,#game-log::-webkit-scrollbar,.full-journal::-webkit-scrollbar{display:none;width:0;height:0;}
#game-hud .fortune-button{min-height:43px;padding:10px 17px;text-align:left;cursor:pointer;}
#game-hud .fortune-button b{margin-left:auto;padding-left:7px;}
.active-player .player-name small{opacity:1;font-size:.62em;background:url('../../assets/game/plate_green_clean.webp') center/100% 100% no-repeat;color:#3f5834;padding:8px 13px;font-weight:800;}
#game-hud .shop-grid button{padding:14px 15px;min-height:84px;gap:5px;}
#game-hud .utility-links button{padding:10px 11px;min-height:43px;white-space:normal;}
#game-hud .hide-info{position:absolute;right:12px;bottom:9px;pointer-events:auto;}
#game-hud .hide-hands{position:absolute;left:14px;bottom:calc(clamp(158px,24vh,370px) + 20px);pointer-events:auto;}
#game-hud.hands-hidden .game-hands,#game-hud.info-hidden .sidebar-shell{display:none;}
#game-hud.hands-hidden .hide-hands{bottom:14px;}
.game-hands{min-height:0;}.hand-scroll{min-height:0;padding:2px 1px 9px;}
/* Square acquired deeds, region artwork matches the exact pyramid frame. */
.hand-deeds{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
#game-hud .hand-deed.square-deed{width:100%;height:auto;aspect-ratio:1/1;min-height:0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;
 border:16px solid transparent;border-image:var(--deed-frame) 58 fill /16px stretch;background:none;border-radius:0;padding:11px 5px;font-size:clamp(10px,.83vw,18px);}
.deed-title{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;max-width:100%;}
.deed-title strong{font-weight:600;line-height:1.55;max-width:100%;overflow-wrap:anywhere;}
.deed-region-icon{width:27px;height:31px;flex:0 0 27px;}
#game-hud .hand-deed small{font-size:.82em;line-height:1.5;margin:0;}
.developer-tray{position:fixed;z-index:24;left:50%;top:83px;transform:translateX(-50%);display:flex;align-items:center;gap:7px;pointer-events:auto;}
.developer-tray>button,#game-view-toggle,.stage3-game .developer-tray>#dev-info-toggle{position:static!important;transform:none!important;font:10px 'Trebuchet MS',sans-serif!important;color:#ecede1;background:#435760b0!important;border:1px solid #b7beb688;border-radius:4px;padding:5px 8px!important;min-height:24px!important;}
#game-world .world-type{display:inline-block;width:15px;height:19px;vertical-align:middle;margin-right:5px;}
#game-world .world-plate{background-image:url('../../assets/game/plate_cream_clean.webp');min-width:160px;padding:8px 12px;}
#game-world .world-plate strong{font-size:13px;display:block;}
#game-world .world-plate span{font-size:10px;}
#game-world .world-plate .coin-icon{display:inline-block;width:12px;height:12px;}
#game-world .world-plate span>span{display:inline;}
#game-world .world-item{width:66px;height:84px;}
.guard-face{position:absolute;left:0;top:0;width:43px;height:44px;}.prize-face{right:0;bottom:0;width:34px;height:38px;}
#game-world.scene-sprites .world-critter>.world-body,#game-world.scene-sprites .world-item>*,#game-world.scene-sprites .world-structure{visibility:hidden;}
@media(min-width:2100px){.sidebar-shell{top:86px;right:20px;bottom:64px;}.sidebar-rope{height:21px;background-size:auto 20px;}.sidebar-rope::before,.sidebar-rope::after{width:58px;height:48px;top:-13px;}.game-hands{bottom:18px;}.developer-tray{top:97px;}}
@media(max-height:850px){.sidebar-shell{top:66px;}.game-hands{height:190px;}#game-hud .hide-hands{bottom:216px;}.developer-tray{top:75px;}#game-overlay{padding:16px;}#game-overlay .game-dialog{max-height:calc(100dvh - 32px);}#game-overlay .timber-dialog{border-width:32px;border-image-width:32px 30px;padding:10px 18px;}.timber-dialog .dialog-art{width:72px;height:72px;}.timber-dialog[data-dialog=setup] .name-fields{gap:12px;margin:14px 0;}.timber-dialog .dialog-header{margin-bottom:8px;}}
@media(max-width:1100px){.sidebar-shell{right:7px;}.developer-tray{top:78px;gap:3px;}.developer-tray>button{font-size:9px!important;padding:5px!important;}.corner-ivy.ivy-tl,.corner-ivy.ivy-br{width:115px;height:115px;}.game-sidebar{gap:8px!important;}.game-hands{width:61vw;}}
@media(max-width:760px){.sidebar-shell{top:124px;bottom:216px;right:6px;}#game-hud .game-sidebar{padding-top:17px;}.developer-tray{top:8px;left:49%;transform:translateX(-30%);gap:2px;}#game-hud .game-log-panel{display:flex;min-height:280px;height:280px;}.game-hands{width:auto;height:158px;bottom:46px;}#game-hud .hide-hands{bottom:208px;}.corner-ivy.ivy-tl,.corner-ivy.ivy-br{width:85px;height:85px;}.corner-ivy.ivy-tl{top:-23px;left:-20px;}.corner-ivy.ivy-br{bottom:-23px;right:-20px;}#game-overlay{padding:10px;}#game-overlay .game-dialog{max-height:calc(100dvh - 20px);}#game-overlay .game-dialog.timber-dialog{border-width:27px;border-image-width:27px 21px;padding:10px 5px;}.timber-dialog[data-dialog=setup] .dialog-header{padding:0;gap:10px;}.timber-dialog .name-fields input{min-height:40px;}.hand-deeds{gap:5px;}#game-hud .hand-deed.square-deed{border-width:10px;border-image-width:10px;padding:4px;font-size:10px;gap:4px;}.deed-region-icon{width:20px;height:22px;}.sidebar-rope::before,.sidebar-rope::after{width:36px;height:31px;top:-8px;}.timber-dialog[data-dialog=graphics] .dialog-option{min-height:72px;font-size:1em;}.audio-control{padding:12px;}}
@media(prefers-reduced-motion:reduce){.corner-ivy{animation:none!important;}}
/* Override old toolbar shorthand, retaining the source wooden plaque. */
#game-hud .game-top .game-toolbar button{background:url('../../assets/game/button_pin.webp') 7px center/6px 6px no-repeat,url('../../assets/game/button_pin.webp') calc(100% - 7px) center/6px 6px no-repeat,url('../../assets/game/plate_cream_clean.webp') center/100% 100% no-repeat!important;}
/* Full shorthands defeat inherited generic button background resets. */
#game-overlay .game-dialog button{background:url('../../assets/game/button_pin.webp') 7px center/6px 6px no-repeat,url('../../assets/game/button_pin.webp') calc(100% - 7px) center/6px 6px no-repeat,url('../../assets/game/plate_cream_clean.webp') center/100% 100% no-repeat;}
#game-overlay .game-dialog button.primary,#game-overlay .game-dialog button.selected-preset{background:url('../../assets/game/button_pin.webp') 7px center/6px 6px no-repeat,url('../../assets/game/button_pin.webp') calc(100% - 7px) center/6px 6px no-repeat,url('../../assets/game/plate_green_clean.webp') center/100% 100% no-repeat;}
.corner-ivy.ivy-br{transform-origin:center;}
.timber-dialog[data-dialog=setup] .dialog-header h2{font-size:clamp(24px,2vw,40px);}
#game-overlay .timber-dialog[data-dialog=graphics] .dialog-option{min-height:90px;font-size:20px;padding:18px 26px;}
#game-overlay .timber-dialog[data-dialog=graphics] .dialog-option small{font-size:14px;line-height:1.5;}
@media(max-height:700px){#game-overlay .timber-dialog[data-dialog=graphics] .dialog-option{min-height:72px;font-size:17px;padding:12px 22px;}#game-overlay .timber-dialog[data-dialog=graphics] .dialog-option small{font-size:12px;}}
/* Stage 3.3 final UI refinements; world and game rules stay unchanged. */
#game-hud{--sidebar-bottom:54px;--sidebar-edge:18px;--rope-height:14px;--rope-frame-inset:8px;}
.sidebar-shell{bottom:var(--sidebar-bottom);}
#game-hud .game-sidebar{padding:var(--sidebar-edge) 0;}
/* At first load, the rope centre is on the centre of the upper timber rail.
   The assemblies remain fixed at the two edges while the boards scroll. */
.sidebar-rope{height:var(--rope-height);background-size:auto var(--rope-height);}
.rope-top{top:calc(var(--sidebar-edge) + var(--rope-frame-inset) - var(--rope-height)/2);}
.rope-bottom{bottom:3px;}
#game-hud .hide-info{right:calc(var(--side-width) + 24px);bottom:calc(var(--sidebar-bottom) + 1px);z-index:6;}
#game-hud.info-hidden .hide-info{right:12px;}
#game-hud .game-sidebar>.painted-panel{position:relative;}
.sidebar-ivy{position:absolute;width:clamp(37px,3.1vw,64px);height:auto;z-index:2;pointer-events:none;object-fit:contain;filter:drop-shadow(0 1px 1px #39433133);}
.sidebar-ivy.leaves-tl{left:-11px;top:-13px;transform-origin:25% 20%;}
.sidebar-ivy.leaves-tr{right:-11px;top:-13px;transform:scaleX(-1);}
.sidebar-ivy.leaves-bl{left:-11px;bottom:-13px;transform:scaleY(-1);}
.game-hands{grid-template-rows:minmax(0,1fr);}
#game-hud .hand-panel{min-height:0;max-height:100%;height:100%;overflow:hidden;}
#game-hud .hand-panel h2{border-bottom:2px solid var(--p1);padding-bottom:7px;}
#game-hud .hand-panel .hand-scroll{flex:1 1 0;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:none;}
.hand-scroll:focus-visible{outline:2px solid #3e8098;outline-offset:-2px;}
#game-hud .hand-deed.square-deed{border:0;border-image:none;background:var(--deed-frame) center/100% 100% no-repeat;border-radius:0;box-shadow:none;padding:16% 12%;aspect-ratio:1/1;gap:9px;}
.deed-scroll-icon{width:33px;height:30px;object-fit:contain;flex:0 0 auto;}
#game-hud .hand-deed.square-deed .deed-region-icon{width:25px;height:29px;flex:0 0 auto;}
.deed-title strong{line-height:1.3;}
#game-show-ui{position:fixed;right:20px;top:12px;z-index:75;min-height:38px;padding:10px 17px;font:600 13px 'Trebuchet MS',sans-serif;border:0;color:#51442e;background:url('../../assets/game/plate_cream_clean.webp') center/100% 100% no-repeat;cursor:pointer;}
#game-overlay .selected-preset{outline:none;box-shadow:none;}
#game-overlay button.selected-preset:focus-visible{outline:2px solid #39728c;outline-offset:2px;}
#game-overlay .audio-control{border:0;border-radius:0;box-shadow:none;background:none;}
#game-overlay .timber-dialog[data-dialog=menu] .dialog-option{transform:none;rotate:0deg;}
#game-overlay .timber-dialog[data-dialog=menu] .dialog-option{background-image:url('../../assets/game/button_pin.webp'),url('../../assets/game/button_pin.webp'),url('../../assets/game/plate_cream_level.webp');}
#game-overlay .dialog-footer:empty{display:none;}
@media(min-width:2100px){#game-hud{--sidebar-bottom:64px;--rope-height:20px;}#game-hud .hide-info{right:calc(var(--side-width) + 33px);}}
@media(max-width:1100px){#game-hud .hide-info{right:calc(var(--side-width) + 17px);}}
@media(max-width:760px){#game-hud{--sidebar-bottom:216px;}#game-hud .hide-info{right:calc(var(--side-width) + 12px);font-size:10px;padding:8px 11px;}#game-hud.info-hidden .hide-info{right:6px;}.sidebar-ivy{width:34px;}#game-hud .hand-deed.square-deed{padding:16% 12%;gap:4px;}.deed-scroll-icon{width:22px;height:22px;}#game-hud .hand-deed.square-deed .deed-region-icon{width:19px;height:21px;}#game-show-ui{right:10px;}}
@media(prefers-reduced-motion:reduce){.sidebar-ivy{animation:none!important;}}

/* Preserve user-chosen card offset; browser anchor adjustment otherwise moves it after image decode. */
.hand-scroll{overflow-anchor:none;}
.hand-body{width:70px;flex-shrink:0;}

/* Stage 3.4: the two ropes ARE the clipping edges, not decorations inside
   the scroll view. No inset padding may create a visible strip above them. */
#game-hud{--hand-height:clamp(240px,31vh,540px);--hand-bottom:14px;--sidebar-top:64px;}
#game-hud .sidebar-shell{top:var(--sidebar-top);bottom:var(--sidebar-bottom);overflow:visible;}
#game-hud .game-sidebar{position:absolute;inset:0;width:100%;height:100%;max-height:100%;padding:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;}
#game-hud .rope-top{top:calc(var(--rope-height) / -2);bottom:auto;}
#game-hud .rope-bottom{bottom:calc(var(--rope-height) / -2);top:auto;}
#game-hud .sidebar-rope{filter:drop-shadow(0 1px 1px #263f4522);}
#game-hud .game-hands{height:var(--hand-height);bottom:var(--hand-bottom);}
#game-hud .hide-hands{bottom:calc(var(--hand-height) + var(--hand-bottom) + 8px);}
#game-hud.hands-hidden .hide-hands{bottom:var(--hand-bottom);}
#game-hud .hand-panel{container-type:inline-size;}
#game-hud .hand-panel h2{border-bottom-color:var(--player-color);}
#game-hud .hand-deeds{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:start;}
#game-hud .hand-deed.square-deed{padding:12% 9%;gap:4px;font-size:clamp(10px,2.8cqw,16px);overflow:hidden;}
#game-hud .hand-deed .deed-title{width:100%;gap:4px;flex-wrap:wrap;}
#game-hud .hand-deed .deed-title strong{flex-basis:100%;line-height:1.14;font-weight:700;overflow-wrap:normal;}
#game-hud .hand-deed.square-deed .deed-scroll-icon{width:clamp(16px,5.8cqw,30px);height:clamp(16px,5.8cqw,30px);}
#game-hud .hand-deed.square-deed .deed-region-icon{width:clamp(14px,4.8cqw,24px);height:clamp(17px,5.8cqw,29px);}
#game-hud .hand-deed.square-deed small{font-size:.84em;line-height:1.2;}
#game-hud .hand-scroll{scroll-padding:4px 0;}
/* Keep the centered turn plaque and Menu as the only persistent controls. */
#game-hud.all-hidden .draft-corner,#game-hud.all-hidden .sidebar-shell,#game-hud.all-hidden .game-hands,
#game-hud.all-hidden .hide-info,#game-hud.all-hidden .hide-hands,#game-hud.all-hidden .game-brand,
#game-hud.all-hidden .turn-banner,#game-hud.all-hidden .game-toast{display:none!important;}
#game-hud .game-toolbar{margin-left:auto;}
#game-hud .game-toolbar #game-show-ui{position:static;right:auto;top:auto;z-index:auto;font:inherit;}
#game-hud .game-top{z-index:10;}
/* Complete public card reference; it lives only at the bottom of How to play. */
.complete-card-guide{margin-top:24px;}
.card-category-nav{display:flex;flex-wrap:wrap;gap:8px;margin:15px 0 22px;}
#game-overlay .card-category-nav button{font-size:.85em;min-height:38px;padding:10px 18px;}
.card-guide-category{margin-top:22px;scroll-margin-top:8px;}
#game-overlay .card-guide-category>h4{font-size:1.18em;margin:0 0 10px;padding-bottom:8px;border-bottom:1px solid #857d6b55;}
.card-guide-category>h4 span{font-family:'Trebuchet MS',sans-serif;font-weight:400;font-size:.8em;}
.card-reference-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.card-reference-entry,.equipment-reference{display:grid;grid-template-columns:64px minmax(0,1fr);gap:12px;align-items:start;padding:14px 10px;border-bottom:1px solid #91857244;}
.reference-art{display:flex;flex-direction:column;align-items:center;gap:7px;}
.reference-card-art{width:64px;height:75px;object-fit:contain;}
.reference-type-icon{width:22px;height:26px;}
#game-overlay .card-reference-entry h5,#game-overlay .equipment-reference h5{font:700 1.05em Georgia,serif;margin:0 0 7px;color:#3f3a2b;}
#game-overlay .card-reference-entry p,#game-overlay .equipment-reference p{font-size:.88em;line-height:1.55;margin:8px 0;}
#game-overlay .card-reference-entry .reference-price{font-size:.8em;font-weight:700;color:#6e5b3d;}
#game-overlay .card-reference-entry .reference-note{color:#6e6048;font-size:.82em;}
@media(min-width:2100px){#game-hud{--sidebar-top:76px;--hand-bottom:18px;}}
@media(max-height:850px){#game-hud{--sidebar-top:60px;}}
@media(max-width:1100px){#game-hud .hand-deed.square-deed{font-size:clamp(9px,3.2cqw,12px);gap:3px;padding:12% 9%;}.card-reference-grid{grid-template-columns:1fr;}}
@media(max-width:760px){#game-hud{--hand-height:clamp(206px,30vh,290px);--hand-bottom:18px;--sidebar-bottom:calc(var(--hand-height) + var(--hand-bottom) + 20px);--sidebar-top:124px;}
 #game-hud .hand-deeds{gap:5px;}#game-hud .hand-deed.square-deed{font-size:9px;gap:2px;}
 #game-hud .turn-current{top:40px;left:50%;right:auto;transform:translateX(-50%);}
 .card-reference-entry,.equipment-reference{grid-template-columns:48px minmax(0,1fr);gap:10px;}.reference-card-art{width:48px;height:60px;}}
/* Anchor to the viewport, not the asymmetrically padded header at 4K. */
#game-hud .game-top .turn-current{position:fixed;top:12px;left:50%;right:auto;transform:translateX(-50%);}
@media(min-width:2100px){#game-hud .game-top .turn-current{top:18px;}}
@media(max-width:760px){#game-hud .game-top .turn-current{top:48px;}}

/* Stage 3.5: no game UI beneath Start or its Settings/Help submenus. The
   renderer and scene continue normally; these rules affect the HUD only. */
body.pre-game #game-hud,body.pre-game #game-world,body.pre-game .developer-tray,
body.pre-game #debug-panel,body.pre-game #dev-info-toggle{visibility:hidden!important;pointer-events:none!important;}

/* Remove the former quarter-sign space without changing pyramid geometry. */
#game-hud .draft-heading{height:54px;gap:12px;}
#game-hud .draft-corner{top:70px;}
@media(min-width:2100px){#game-hud .draft-corner{top:90px;}#game-hud .draft-heading{height:64px;}}
@media(max-width:760px){#game-hud .draft-corner{top:96px;}#game-hud .draft-heading{height:48px;gap:5px;}}

/* Ropes stay at the clipping boundaries. The toolbar has its own clear band
   above them. The lowest knot aligns with the bottom of the player panels. */
#game-hud{--rope-knot-height:38px;--rope-knot-width:46px;--sidebar-top:92px;--sidebar-bottom:calc(var(--hand-bottom) + var(--rope-knot-height)/2);}
#game-hud .sidebar-shell{top:var(--sidebar-top);bottom:var(--sidebar-bottom);}
#game-hud .sidebar-rope::before,#game-hud .sidebar-rope::after{top:50%;width:var(--rope-knot-width);height:var(--rope-knot-height);transform:translateY(-50%);}
#game-hud .sidebar-rope::after{transform:translateY(-50%) scaleX(-1);}
#game-hud .hide-info{bottom:calc(var(--sidebar-bottom) + 1px);}
@media(min-width:2100px){#game-hud{--sidebar-top:112px;--rope-knot-height:48px;--rope-knot-width:58px;}}
@media(max-width:1100px){#game-hud{--sidebar-top:86px;}}
/* Compact screens stack the card panels below the sidebar instead of allowing
   it to overlap them. Desktop/tablet layouts share the exact lower baseline. */
@media(max-width:760px){#game-hud{--sidebar-top:128px;--rope-knot-height:32px;--rope-knot-width:38px;--sidebar-bottom:calc(var(--hand-height) + var(--hand-bottom) + 28px);}
 #game-hud .hide-info{bottom:calc(var(--sidebar-bottom) - 12px);}}

/* Two labelled categories inside each independently scrolling inventory. */
#game-hud .hand-section{margin:0 0 14px;}
#game-hud .hand-category-title{font:700 .86em/1.25 'Trebuchet MS','Segoe UI',sans-serif;color:#78664b;letter-spacing:.065em;display:flex;align-items:center;gap:8px;margin:0 0 9px;}
#game-hud .hand-category-icon{width:26px;height:28px;object-fit:contain;flex:0 0 auto;}
#game-hud .empty-category{font-style:italic;color:#8b795a;font-size:.9em;margin:0 0 20px 3px;}
#game-hud .hand-deeds{margin-bottom:4px;}
#game-hud .hand-panel h2 small{display:none;}
@media(min-width:2100px){#game-hud .hand-category-icon{width:33px;height:34px;}#game-hud .hand-section{margin-bottom:18px;}}
@media(max-width:760px){#game-hud .hand-category-title{font-size:10px;gap:5px;margin-bottom:6px;}#game-hud .hand-category-icon{width:21px;height:22px;}}

/* Stage 3.6: return to the original unframed island plaques. Owner/type,
   price and vault information remain visible when interface panels are hidden. */
#game-world .island-plate{border:0;border-image:none;border-radius:0;background-color:transparent;background-image:url('../../assets/game/plate_cream_clean.webp');background-origin:padding-box;background-clip:border-box;padding:8px 12px;}
#game-world .island-plate.owner-0 .island-owner,#game-world .island-plate.owner-1 .island-owner{color:var(--owner);font-weight:700;}

/* Selectable creature catalogue and read-only rules-based profiles. */
.creature-catalog article{padding:0;background:none;min-width:0;}
#game-overlay .game-dialog .catalog-creature{display:flex;flex-direction:column;align-items:center;width:100%;height:100%;background:var(--catalog-frame) center/100% 100% no-repeat;padding:24px 16px 26px;gap:5px;font-weight:400;}
#game-overlay .catalog-creature strong{font:700 1.12em Georgia,serif;}
#game-overlay .catalog-creature>span{display:flex;align-items:center;justify-content:center;gap:3px;font-size:.85em;}
#game-overlay .catalog-creature .catalog-prompt{font-weight:700;color:#476c77;font-size:.8em;}
#game-overlay .catalog-creature .coin-icon{width:15px;height:15px;}
#game-overlay .creature-profile-stats{display:flex;align-items:stretch;gap:12px;flex-wrap:wrap;margin:20px 0;}
.creature-profile-stats>span{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;gap:5px;padding:12px;border-bottom:1px solid #9b8a634d;}
.creature-profile-stats small{text-transform:uppercase;font-size:.72em;letter-spacing:.07em;}
.creature-profile-stats b{font-size:1.3em;}.profile-type{width:28px;height:32px;}
.creature-profile h3{font-size:1.13em;margin:22px 0 8px;}
.creature-matchups{border-collapse:collapse;width:100%;font-size:.82em;}
.creature-matchups th,.creature-matchups td{padding:9px 6px;border-bottom:1px solid #ad9e7960;text-align:left;}
.creature-matchups thead th{font-size:.86em;}.creature-matchups tbody th{font-weight:400;}
#game-overlay [data-dialog=creature-detail] .dialog-art{width:110px;height:126px;}
@media(max-width:760px){#game-overlay .game-dialog .catalog-creature{padding:19px 12px 21px;}.catalog-body{width:78px;height:85px;}.creature-matchups{font-size:10px;}.creature-matchups th,.creature-matchups td{padding:7px 3px;}}

/* Stage 3.6: keep the original card and creature geometry. The former fourth
   text row is now a quiet action hint beside the price. An empty layout reserve
   occupies exactly its old line box, keeping every illustration and later row
   stationary while ALL visible text stays inside the painted parchment. */
#game-overlay .catalog-creature .catalog-price{white-space:nowrap;max-width:80%;}
#game-overlay .catalog-creature .catalog-prompt-inline{font:inherit;font-weight:600;color:#476c77;}
#game-overlay .catalog-creature::after{content:"";display:block;flex:0 0 auto;height:1em;margin-top:4px;}

/* A growing journal absorbs spare sidebar height. At the end of its scroll,
   the actual board reaches the rope; no transparent tail is left underneath. */
#game-hud .game-sidebar>.game-log-panel{height:auto;flex:1 0 clamp(310px,38vh,520px);min-height:310px;}
#game-hud .game-sidebar{scroll-padding:0;padding-bottom:0;}

/* The assembly never turns. Each source-textured leaf moves about its own
   petiole, with a staggered gust and a long rest. Static mirrors place blades
   on the intended corners without sliding the lower-left drape below its rail. */
#game-hud .leaf-assembly,#game-overlay .leaf-assembly{display:block;animation:none!important;transform:none;transform-origin:center;aspect-ratio:300/301;line-height:0;pointer-events:none!important;}
#game-hud .sidebar-ivy.leaf-assembly{height:auto;}
#game-hud .sidebar-ivy.leaves-tr{transform:scaleX(-1);--gust-duration:22s;--gust-phase:-10s;}
#game-hud .sidebar-ivy.leaves-bl{transform:scaleY(-1);--gust-duration:20s;--gust-phase:-13s;left:-13px;bottom:-10px;}
#game-hud .sidebar-ivy.leaves-tl{--gust-duration:19s;--gust-phase:-4s;}
#game-overlay .corner-ivy.ivy-br{--gust-duration:21s;--gust-phase:-7s;}
.leaf-assembly .ivy-stems{position:absolute;inset:0;width:100%;height:100%;}
.leaf-assembly .ivy-leaf{position:absolute;max-width:none;pointer-events:none;animation:leafBladeGust var(--gust-duration,18s) calc(var(--gust-phase,0s) - var(--leaf-lag,0s)) ease-in-out infinite;}
@keyframes leafBladeGust{
 0%,58%,90%,100%{transform:rotate(0deg) scaleX(1);}
 63%{transform:rotate(calc(var(--leaf-bend)*.25)) scaleX(.999);}
 67%{transform:rotate(calc(var(--leaf-bend)*-1)) scaleX(.98);}
 71%{transform:rotate(calc(var(--leaf-bend)*.55)) scaleX(.992);}
 75%{transform:rotate(calc(var(--leaf-bend)*-.8)) scaleX(.984);}
 79%{transform:rotate(calc(var(--leaf-bend)*.24)) scaleX(.998);}
 85%{transform:rotate(calc(var(--leaf-bend)*-.12)) scaleX(1);}
}
@media(prefers-reduced-motion:reduce){.leaf-assembly .ivy-leaf{animation:none!important;}}
/* Longer requested title retains the approved serif treatment without
   intruding on the fixed turn plaque on smaller desktops. */
#game-hud .game-brand{max-width:calc(50vw - 190px);line-height:1.28;}
#game-hud .game-brand span{margin-top:5px;}
@media(max-width:760px){#game-hud .game-brand{max-width:42vw;font-size:10px;}}

/* Stage 4.1 — creature clarity and compact startup. Scenery/graphics are untouched. */
#game-hud .hand-critter{background:var(--creature-frame) center/100% 100% no-repeat;padding:12px 9px 13px;}
#game-hud .hand-class-icon{position:absolute;top:9px;left:9px;width:16px;height:19px;object-fit:contain;}
#game-hud .hand-critter strong,#game-hud .hand-critter small{max-width:100%;white-space:normal;overflow-wrap:anywhere;}
#game-overlay .creature-owner{margin:0 0 10px;color:#756448;font-size:.9em;}
#game-overlay .creature-live-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;margin:8px 0 12px;}
#game-overlay .creature-stat{display:flex;align-items:center;gap:10px;min-width:0;border-bottom:1px solid #ad9e794d;padding:7px 0 10px;}
#game-overlay .creature-stat-icon{width:29px;height:33px;flex:0 0 29px;object-fit:contain;}
#game-overlay .creature-stat small{display:block;color:#806e50;font-size:.73em;line-height:1.35;}
#game-overlay .creature-stat b{font-size:.93em;line-height:1.35;overflow-wrap:anywhere;}
#game-overlay .creature-location{display:flex;align-items:center;gap:8px;font-size:.85em;}
#game-overlay .creature-location-icon{width:23px;height:25px;object-fit:contain;}
#game-overlay [data-dialog=creature-info] .dialog-eyebrow{display:none;}
/* Guarded treasure information is available even when no creature can reach it. */
#game-hud .game-sidebar>.game-log-panel{flex:0 0 clamp(250px,32vh,430px);min-height:250px;}
#game-hud .game-sidebar>.battle-chart-panel{flex:1 0 auto;padding:9px 5px 12px;min-height:0;}
#game-hud .battle-chart-panel h2{font-size:1.03em;line-height:1.3;}
#game-hud .battle-chart-panel h2 small{display:block;font:400 .76em/1.35 'Trebuchet MS',sans-serif;margin-top:4px;}
.battle-chart{width:100%;border-collapse:collapse;table-layout:fixed;font-size:clamp(8px,.66vw,15px);line-height:1.3;}
.battle-chart th,.battle-chart td{text-align:left;vertical-align:middle;padding:8px 3px;border-bottom:1px solid #9e8f6d80;}
.battle-chart thead th{text-transform:uppercase;font-weight:700;font-size:.84em;letter-spacing:.02em;}
.battle-chart tbody th{font-weight:700;}
.battle-chart-cell{display:flex;flex-wrap:wrap;align-items:center;gap:3px;}
.battle-chart-icon{width:1.35em;height:1.55em;object-fit:contain;flex:0 0 1.35em;}
#game-hud .battle-chart-note{font-size:.8em;line-height:1.5;color:#547c8a;margin:12px 0 0;}
#game-world .world-critter{width:64px;height:72px;overflow:visible;}
#game-world .world-critter>.world-body{position:absolute;width:54px;height:64px;left:50%;top:50%;transform:translate(-50%,-50%);}
#game-world .world-token-name{visibility:visible;position:absolute;left:50%;bottom:calc(50% + var(--actor-half-height,32px) + var(--label-lift,0px) + 2px);top:auto;
 transform:translateX(-50%);box-sizing:border-box;min-width:91px;max-width:104px;padding:5px 9px 6px;border:0;border-radius:0;
 background:url('../../assets/game/plate_cream_clean.webp') center/100% 100% no-repeat;white-space:normal;
 font:700 10px/1.15 'Trebuchet MS',sans-serif;color:var(--owner);text-align:center;filter:drop-shadow(0 1px 1px #17394944);}
#game-world .world-token-name strong{display:block;font:700 10px/1.14 Georgia,serif;overflow-wrap:anywhere;}
#game-world .world-token-stats{display:flex;justify-content:center;align-items:center;gap:2px;flex-wrap:wrap;color:#665438;font:400 9px/1.2 'Trebuchet MS',sans-serif;margin-top:3px;}
#game-world .world-token-stats img,#game-world .world-token-stats svg{width:10px;height:12px;object-fit:contain;flex:0 0 10px;}
#game-world .world-critter.evolved .world-token-name strong::after{content:' ★';color:#a57a33;}
#game-world button:focus:not(:focus-visible){outline:none;}
#game-hud.all-hidden .game-toast:not([hidden]){display:block!important;}
@media(max-width:1100px){.battle-chart{font-size:9px;}.battle-chart th,.battle-chart td{padding:7px 2px;}}
@media(max-width:760px){.battle-chart{font-size:8px;}.battle-chart-cell{display:block;}.battle-chart-icon{display:block;margin-bottom:3px;}#game-hud .battle-chart-note{font-size:9px;}#game-overlay .creature-live-stats{gap:6px 10px;}#game-overlay .creature-stat-icon{width:23px;height:27px;flex-basis:23px;}}

/* 4.2: engine journal is newest-first; prevent browser scroll anchoring from
   retaining an older row when a newly emitted event is inserted above it. */
#game-log{overflow-anchor:none;scroll-behavior:auto;}

/* Stage 6.1 signage only. The existing plaque now shows actual coloured
   timber cropped from the matching Pyramid frame's right rail. Original icons
   are unchanged and unfiltered. No map-view, zoom, geometry or HUD changes.
   See verification/stage6-1-signage/wood-sources.json for exact source pixels. */
#game-world .island-plate[data-region="midway"]{--sign-colour:#cfbb62;--sign-wood:url('../../assets/signage61/wood-midway.webp');}
#game-world .island-plate[data-region="volcano"]{--sign-colour:#d89850;--sign-wood:url('../../assets/signage61/wood-volcano.webp');}
#game-world .island-plate[data-region="meadow"]{--sign-colour:#84b179;--sign-wood:url('../../assets/signage61/wood-meadow.webp');}
#game-world .island-plate[data-region="cavern"]{--sign-colour:#919191;--sign-wood:url('../../assets/signage61/wood-cavern.webp');}
#game-world .island-plate[data-region="reef"]{--sign-colour:#31b1e3;--sign-wood:url('../../assets/signage61/wood-reef.webp');}
#game-world .island-plate{
 position:relative;isolation:isolate;box-sizing:border-box;
 min-width:148px;max-width:185px;padding:4px 12px;
 border:0;border-image:none;border-radius:0;background:none;color:#fff;
 /* A narrow dark edge keeps white glyphs legible on the source yellow/blue. */
 text-shadow:0 1px 1px #25332fc9,1px 0 1px #25332f80,-1px 0 1px #25332f80,0 -1px 1px #25332f80;
}
#game-world .island-plate::before{
 content:"";position:absolute;inset:0;pointer-events:none;z-index:-1;
 -webkit-mask:url('../../assets/game/plate_cream_clean.webp') center/100% 100% no-repeat;
 mask:url('../../assets/game/plate_cream_clean.webp') center/100% 100% no-repeat;
}
#game-world .island-plate::before{
 background-color:var(--sign-colour,#919191);
 background-image:var(--sign-wood);
 background-position:center;background-size:100% 100%;background-repeat:no-repeat;
}
#game-world .island-plate strong{font-size:13px;line-height:17px;color:#fff;}
#game-world .island-plate .world-type{
 width:14px;height:16px;margin-right:5px;vertical-align:-3px;
 filter:none;
}
#game-world .island-plate .island-owner,
#game-world .island-plate.owner-0 .island-owner,
#game-world .island-plate.owner-1 .island-owner{
 color:#fff;font-size:10px;font-weight:600;line-height:12px;margin-top:1px;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#game-world .island-plate .island-owner>span{color:inherit;font:inherit;margin:0;}
#game-world .island-plate .coin-icon{vertical-align:-2px;}
/* Only the world sign is reduced. Its clickable Bank Vault dialog still has
   the complete health display, links and actions; all vault rules are intact. */
#game-world .vault-plate{box-sizing:border-box;min-width:124px;max-width:144px;padding:4px 10px;}
#game-world .vault-plate strong{font-size:13px;line-height:17px;}
#game-world .vault-plate>span{font-size:10px;line-height:12px;margin-top:1px;white-space:nowrap;}
#game-world .vault-plate>span>span{font:inherit;margin:0;}
#game-world .vault-plate .coin-icon{vertical-align:-2px;}
