:root{--ink:#4b3524;--paper:#f4e5bf;--paper-light:#fff6db;--teal:#234f43;--gold:#d9af61;--warm:#bd7d3f;--shadow:#30201480;--header-height:58px;--elderan-ui-ready:1;color-scheme:light}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overscroll-behavior:none}body{font-family:Georgia,'Times New Roman',serif;background:#dcc38f;color:var(--ink)}button,input,select{font:inherit}button{touch-action:manipulation}[hidden]{display:none!important}button,a,select{ -webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #e9be62;outline-offset:3px}.game-shell{width:100%;height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:clip}.game-shell>*,.game-main,.world-scene,.game-scene{min-width:0;min-height:0}.game-header{z-index:5;display:flex;align-items:center;gap:9px;min-height:58px;padding:7px max(12px,env(safe-area-inset-left));background:linear-gradient(0deg,#153d34,#2d5948);border-bottom:3px solid #d8aa58;box-shadow:0 3px 9px #2c241b60;color:#ffedbc}.brand{display:flex;align-items:center;gap:8px;flex:none;text-decoration:none;color:#fff0c4;font-weight:bold;font-size:21px;white-space:nowrap;text-shadow:0 2px #132f29}.brand-mark{width:31px;height:34px;color:#f0c876;display:block}.brand-mark svg{width:100%;height:100%}.header-divider{width:1px;height:27px;background:#c7a35f70;flex:none}.gold-pill,.army-pill{display:flex;align-items:center;gap:5px;flex:none;font-weight:bold;font-size:19px;white-space:nowrap}.gold-pill .item-art{width:28px;height:28px;filter:drop-shadow(0 1px 1px #0005)}.header-actions{margin-left:auto;display:flex;align-items:center;gap:7px;min-width:0}.elderan-theme .gw-button{border:1px solid #956236;border-radius:12px;font-size:15px;min-height:36px;padding:7px 12px;background:linear-gradient(#fff4cf,#edcf91);box-shadow:inset 0 0 0 1px #fff7d3,0 2px 0 #79502b;color:#52351c;line-height:1.12}.elderan-theme .gw-button--primary{background:linear-gradient(#437d57,#25573e);color:#fff3c5;border-color:#d3a355;box-shadow:inset 0 0 0 1px #a5b875,0 2px 0 #6d4525;text-shadow:0 1px #173923}.elderan-theme .gw-button--danger{background:linear-gradient(#f5d2a6,#d59f72);color:#6d2f19}.elderan-theme .gw-button--icon{padding:7px;width:36px;min-width:36px;min-height:36px;font-size:17px}.header-actions .gw-button{background:#214b3d;color:#ffedbc;border:1px solid #bc9652;box-shadow:inset 0 0 0 1px #fff1b31a,0 2px 0 #112d25}.header-actions .gw-button:hover{background:#376550}.header-actions .gw-icon{width:20px;height:20px}.army-button{padding:5px 9px!important}.army-button .gw-button-label{font-size:17px;white-space:nowrap}.header-mobile-only{display:none}.game-main{position:relative}.world-scene{position:absolute;inset:0;background:#dfc693;isolation:isolate;overflow:clip}.world-viewport{position:absolute;inset:0;overflow:clip;touch-action:none;cursor:grab;user-select:none;background:#e9e6db;outline:none}.world-viewport.is-grabbing{cursor:grabbing}.world-paint{position:absolute;left:0;top:0;will-change:transform;transform-origin:0 0;pointer-events:none}.world-paint>svg{display:block;overflow:visible;pointer-events:auto}.region-contour{stroke:#ffe5a0;stroke-width:2;stroke-opacity:0;transition:stroke-opacity .16s,fill-opacity .16s;fill:#ffe5a0;fill-opacity:0;pointer-events:none}.region-contour.is-known.is-hover{stroke-opacity:.3;fill-opacity:.035}.site-contour{stroke:#fff4b4;stroke-width:2;stroke-opacity:0;cursor:pointer;transition:stroke-opacity .14s;pointer-events:all}.site-contour.is-hover{stroke-opacity:.86;fill:#ffda71;fill-opacity:.06}.site-contour.is-complete{stroke-width:1.5}.world-fog{pointer-events:none}.world-labels{position:absolute;inset:0;pointer-events:none}.map-label{position:absolute;left:0;top:0;max-width:min(215px,70vw);display:flex;align-items:center;gap:4px;min-height:26px;padding:3px 9px 3px 4px;border:1px solid #a17c3e;border-radius:7px;background:linear-gradient(#fff6d9,#ead6aa);box-shadow:0 2px 3px #38240c52,inset 0 0 0 1px #fff6d2b0;color:#3f2e20;font-weight:bold;font-size:12px;line-height:1.15;text-align:center;pointer-events:auto;cursor:pointer;transition:box-shadow .12s,background .12s;white-space:normal;overflow-wrap:normal}.map-label:hover,.map-label:focus-visible{background:#fff4c1;box-shadow:0 0 12px #ffe184c9,0 2px 3px #38240c52}.map-number{display:inline-grid;place-items:center;min-width:21px;height:21px;padding:0 3px;border:1px solid #a97b31;border-radius:50%;background:#ab7434;color:#fff5cb;box-shadow:inset 0 0 0 1px #eed097;font-family:Georgia,serif;font-size:12px;flex:none}.map-label.is-complete .map-number{background:#47704c}.map-label.is-locked{filter:saturate(.12);color:#716a58}.map-name{min-width:0}.map-more{min-width:142px;color:#644317;display:block;padding:7px 12px}.map-controls{position:absolute;right:max(12px,env(safe-area-inset-right));bottom:12px;display:flex;gap:7px;z-index:3}.map-control{width:36px;height:36px;border:2px solid #cfa65b;border-radius:50%;background:linear-gradient(#416554,#204739);color:#ffe9a7;font-size:25px;line-height:1;box-shadow:0 2px 4px #39271b60;cursor:pointer}.map-tooltip{z-index:4;position:absolute;max-width:240px;padding:8px 11px;border:1px solid #c5a064;border-radius:10px;background:#fff2d6f5;box-shadow:0 5px 18px #2f241c4d;white-space:pre-line;font:13px/1.35 system-ui,sans-serif;pointer-events:none}.world-roads{pointer-events:none}.world-road path{fill:none;stroke-linejoin:round;stroke-linecap:round}.road-edge{stroke:#835932;stroke-width:19;opacity:.48}.road-fill{stroke:#caa169;stroke-width:14}.world-road--boardwalk .road-edge{stroke:#60472d;stroke-width:19;opacity:.65}.world-road--boardwalk .road-fill{stroke:#a48255;stroke-width:15}.road-planks{stroke:#d7b785;stroke-width:13;stroke-dasharray:1.3 5;stroke-linecap:butt!important;opacity:.85}.world-road--snowpath .road-edge{stroke:#a0a4a0;opacity:.3}.world-road--snowpath .road-fill{stroke:#d8cdb1;opacity:.8}.travel-tip{min-height:0;max-height:28px;padding:4px 12px;background:#dec38f;color:#654f31;font-size:12px;text-align:center;line-height:1.3;border-top:1px solid #b894563d}.travel-tip:empty{display:none}.item-art{display:inline-flex;width:44px;height:44px;align-items:center;justify-content:center;flex:none}.item-art svg{width:100%;height:100%;display:block}.game-scene{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:8px;padding:12px;background:radial-gradient(ellipse at 35% 25%,#587450aa,#283f36bb),#345044}.game-scene[data-biome=mistfen]{background:radial-gradient(ellipse at 40% 30%,#397f76bb,#1f3e48e8)}.game-scene[data-biome=gloamwood]{background:radial-gradient(ellipse at 30% 20%,#48645c,#202b43)}.game-scene[data-biome=sunscar]{background:radial-gradient(ellipse at 30% 20%,#d1aa73,#926342)}.game-scene[data-biome=whitehold]{background:radial-gradient(ellipse at 30% 20%,#c1d5d5,#4f7286)}.match-heading{display:flex;align-items:center;gap:12px;min-width:0;color:#fff1ca}.match-place{margin:0;font-size:clamp(15px,2.2vw,25px);min-width:0;flex:1;line-height:1.12}.timer{white-space:nowrap;padding:5px 11px;border:1px solid #ddbd78;border-radius:12px;background:#203d35b8;color:#ffefc4;font:bold clamp(18px,2.5vw,27px)/1 Georgia,serif;font-variant-numeric:tabular-nums}.timer.is-urgent{color:#ffd8b5;background:#75452ce8}.match-layout{min-width:0;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,230px);gap:18px;align-items:center}.board-mount{position:relative;min-width:0;min-height:0;width:100%;height:100%;display:grid;place-items:center}.match-aside{min-width:0;min-height:0;align-self:center;padding:14px;border:1px solid #dfbd77;border-radius:15px;background:#f9ebcce8;box-shadow:0 7px 24px #162a2450}.match-aside h3{margin:0 0 8px;font-size:20px}.match-aside .loot-card{margin-top:8px;padding:7px;background:#fff8e280}.match-aside .loot-card .item-art{width:34px;height:34px}.match-aside .loot-card h3{font-size:15px}.match-aside .loot-card p{font-size:12px}.match-footer{display:flex;align-items:center;gap:10px;justify-content:space-between;color:#fff0cf;font-size:13px;min-height:30px}.earned-strip{display:flex;align-items:center;gap:6px;min-width:0;flex-wrap:wrap;max-width:75%}.earned-chip{display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border:1px solid #e3c68b80;border-radius:8px;background:#1a34266e;white-space:nowrap}.earned-chip .item-art{width:22px;height:22px}.match-help{flex:none}.goal-button{flex:none}.match-footer .gw-button{font-size:13px;min-height:31px;padding:5px 9px}.loading-layer{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:20px;background:radial-gradient(ellipse at center,#f4e5bd,#d7b67a);text-align:center}.loading-layer p{font-size:22px;margin:0}.loading-emblem{width:90px;height:90px;animation:emblem-breathe 2.2s ease-in-out infinite}.loading-emblem svg{width:100%;height:100%}.loading-layer button{border:1px solid #9f713e;border-radius:10px;padding:10px 18px;background:#345b43;color:#fff1c7}.toast{position:absolute;left:50%;bottom:40px;transform:translateX(-50%);max-width:min(480px,calc(100% - 24px));z-index:30;padding:10px 16px;border:1px solid #e2c888;border-radius:12px;background:#294b3ff5;color:#fff0cb;box-shadow:0 4px 18px #241a1c60;text-align:center;font:14px/1.35 system-ui,sans-serif;pointer-events:none}.elderan-theme .elderan-dialog{--dialog-width:660px;width:min(var(--dialog-width),calc(100% - 24px));height:min(530px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);grid-template-rows:auto minmax(0,1fr) auto;border:3px solid #b48748;border-radius:18px;padding:17px;gap:12px;background:radial-gradient(ellipse at top,#fff9df,#edd9ac);box-shadow:inset 0 0 0 2px #fff0c7,0 20px 80px #1f211ac9}.elderan-theme .elderan-dialog::backdrop{background:#15291fc2;backdrop-filter:blur(3px)}.elderan-theme .gw-modal-heading h2{font-size:clamp(21px,3.6vw,30px);line-height:1.12;color:#503820}.elderan-theme .gw-modal-heading{gap:12px}.elderan-theme .gw-modal-body{height:100%;min-height:0;display:grid}.dialog-content{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px}.dialog-tabs:empty{display:none}.dialog-tabs .gw-tabs{gap:5px}.elderan-theme .dialog-tabs .gw-button{font-family:system-ui,sans-serif;font-size:13px;padding:7px 10px;min-height:34px}.dialog-page{min-width:0;min-height:0;display:flex;flex-direction:column;gap:12px;justify-content:flex-start;outline:none;overflow:visible}.dialog-text{margin:0;line-height:1.48;font-family:system-ui,sans-serif;font-size:15px;overflow-wrap:break-word}.dialog-text.muted{color:#7a674d}.dialog-pager{display:flex;align-items:center;justify-content:center;gap:14px;padding-top:5px;flex:none}.page-counter{font:13px/1 system-ui,sans-serif;color:#7a6341;min-width:47px;text-align:center}.dialog-section{margin:0;min-width:0}.section-title{margin:0 0 6px;font-size:20px;line-height:1.15}.elderan-theme .gw-modal-actions{gap:8px;flex-wrap:wrap}.elderan-theme .gw-modal-actions .gw-button{font-size:15px;min-height:37px}.loot-card,.inventory-card,.recruit-card,.unit-card,.stat-card{display:flex;gap:12px;align-items:center;min-width:0;border:1px solid #c6a46d;border-radius:12px;padding:11px;background:linear-gradient(120deg,#fff6dc,#eddbb5);box-shadow:inset 0 1px #fff9e8,0 2px 3px #88674416}.card-copy{min-width:0;flex:1}.card-copy h3{margin:0 0 5px;line-height:1.14;font-size:18px;overflow-wrap:break-word}.card-copy p{margin:3px 0 0;font:13px/1.35 system-ui,sans-serif;overflow-wrap:break-word}.loot-percent{font:bold 20px/1 Georgia,serif;color:#276747;flex:none;white-space:nowrap}.loot-card.is-owned{opacity:.75}.inventory-card .gw-button,.recruit-card .gw-button,.unit-card .gw-button{font-size:13px;min-height:34px;padding:6px 9px;flex:none}.recruit-card .item-art,.unit-card .item-art{width:48px;height:48px}.stat-card{justify-content:space-between}.stat-card strong{font-size:27px;color:#295a41}.settings-line{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px;border:1px solid #c6a46d;border-radius:12px;background:#fff7df8c;font:15px/1.25 system-ui,sans-serif}.settings-line select{min-height:36px;max-width:60%;border:1px solid #a58554;border-radius:8px;background:#fff8df;color:#4c3c29;padding:6px 10px}.settings-toggle{min-width:80px}.battle-stage{display:grid;grid-template-columns:1fr auto 1fr;gap:13px;align-items:center;min-width:0}.battle-side{min-width:0;text-align:center}.battle-side h3{font-size:18px;margin:0 0 10px}.battle-hp{height:14px;border:1px solid #5b5336;border-radius:8px;overflow:hidden;background:#a49171}.battle-hp-fill{height:100%;background:linear-gradient(#73a75e,#3b7844);transition:width .12s linear;width:100%}.enemy .battle-hp-fill{background:linear-gradient(#d59167,#a95b3f)}.battle-numbers{font-size:14px;margin-top:6px;font-variant-numeric:tabular-nums}.battle-swords{font-size:30px;display:flex;color:#846339;animation:sword-fight .36s steps(8,end) infinite}.battle-swords svg{width:54px;height:54px}.battle-portraits{display:flex;flex-wrap:wrap;justify-content:center;gap:3px;margin-top:8px}.battle-portraits .item-art{width:29px;height:29px;transition:filter .2s,opacity .2s}.battle-portraits .is-dead{filter:grayscale(1);opacity:.3}.forecast{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;background:#355f43;border-radius:12px;color:#fff0bc}.forecast strong{font-size:32px;white-space:nowrap}.tutorial-demo{display:flex;align-items:center;justify-content:center;gap:7px;min-height:76px;border:1px solid #b2925b;border-radius:12px;background:#dde4c5;padding:10px}.tutorial-piece{width:42px;height:42px;display:grid;place-items:center;border-radius:9px;background:linear-gradient(#f9d17d,#d3983e);border:1px solid #b37d34;box-shadow:inset 0 0 0 3px #ffe7aa}.tutorial-piece .item-art{width:34px;height:34px}.tutorial-piece:nth-child(2){animation:tutorial-swap 2.4s steps(24,end) infinite}.tutorial-demo--down{height:98px;position:relative}.tutorial-demo--down .tutorial-piece{animation:tutorial-down 2.4s steps(24,end) infinite}.tutorial-arrows{font-size:26px;color:#5e8150;font-weight:bold}.goal-illustration{margin:auto;display:flex;justify-content:center}.goal-illustration .item-art{width:70px;height:70px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes emblem-breathe{50%{transform:translateY(-4px);filter:drop-shadow(0 4px 8px #99642850)}}@keyframes sword-fight{50%{transform:rotate(-7deg) scale(1.03)}}@keyframes tutorial-swap{0%,20%,100%{transform:translateY(0)}40%,70%{transform:translateY(-8px)}}@keyframes tutorial-down{0%,15%{transform:translateY(-20px)}60%,85%{transform:translateY(20px)}100%{transform:translateY(-20px)}}@media(max-width:850px){.brand{font-size:18px;gap:5px}.header-actions{gap:5px}.header-actions .gw-button{padding:6px 9px}.header-actions .gw-button-label{font-size:13px}.match-layout{grid-template-columns:minmax(0,1fr) minmax(135px,190px);gap:11px}.game-scene{padding:9px}.match-aside{padding:10px}.gold-pill{font-size:17px}.header-divider{display:none}}@media(max-width:620px){.game-header{display:grid;grid-template-columns:auto auto 1fr auto;gap:5px 8px;padding:6px 8px;min-height:82px}.brand{font-size:18px}.brand-mark{width:25px;height:28px}.header-actions{display:contents}.header-actions .nav-inventory{grid-column:1;grid-row:2}.header-actions .nav-journal{grid-column:2;grid-row:2}.header-actions .nav-about{grid-column:3;grid-row:2;justify-self:start}.header-actions .nav-settings{grid-column:4;grid-row:2;justify-self:end}.header-actions .nav-profile{grid-column:4;grid-row:1;justify-self:end}.army-button{grid-column:3;grid-row:1;justify-self:end}.gold-pill{grid-column:2;grid-row:1}.header-actions .gw-button{font-size:13px;min-height:31px;padding:5px 8px}.header-actions .nav-settings,.header-actions .nav-profile{width:32px;min-width:32px;min-height:31px}.header-actions .gw-icon{width:17px;height:17px}.header-actions .nav-about .gw-button-label{font-size:12px}.header-actions .nav-inventory,.header-actions .nav-journal{width:auto;min-width:65px}.gold-pill .item-art{width:23px;height:23px}.gold-pill{gap:3px;font-size:16px}.army-button .gw-button-label{font-size:15px}.travel-tip{font-size:11px;max-height:33px;padding:3px 9px}.match-layout{grid-template-columns:minmax(0,1fr)}.match-aside{display:none}.match-heading{gap:6px;flex-wrap:wrap}.match-place{flex-basis:calc(100% - 105px);font-size:16px}.timer{font-size:20px;padding:5px 8px}.goal-button{margin-left:auto;font-size:12px!important;min-height:28px!important;padding:4px 8px!important}.game-scene{gap:5px;padding:7px}.match-footer{min-height:30px;gap:5px}.match-footer .gw-button{font-size:12px}.earned-strip{gap:3px;font-size:12px;max-width:72%}.earned-chip{padding:2px 5px}.elderan-theme .elderan-dialog{width:calc(100% - 16px);height:min(510px,calc(100dvh - 16px));max-height:calc(100dvh - 16px);padding:12px;gap:9px;border-radius:15px}.elderan-theme .gw-modal-heading h2{font-size:23px}.elderan-theme .gw-modal-heading{gap:6px}.elderan-theme .gw-modal-close{width:32px;min-width:32px;min-height:32px}.dialog-content{gap:7px}.dialog-page{gap:8px}.dialog-text{font-size:14px;line-height:1.42}.card-copy h3{font-size:16px}.card-copy p{font-size:12px}.loot-card,.inventory-card,.recruit-card,.unit-card,.stat-card{padding:8px;gap:8px}.item-art{width:36px;height:36px}.inventory-card .gw-button,.recruit-card .gw-button,.unit-card .gw-button{min-height:31px;padding:5px 7px;font-size:12px}.elderan-theme .gw-modal-actions .gw-button{font-size:14px;padding:7px 10px;min-height:34px}.elderan-theme .dialog-tabs .gw-button{font-size:12px;padding:6px;min-height:31px}.battle-stage{gap:7px}.battle-side h3{font-size:15px}.battle-swords svg{width:38px;height:38px}.battle-portraits .item-art{width:24px;height:24px}.map-label{font-size:12px;max-width:170px}.settings-line{font-size:14px;padding:9px}}@media(max-height:440px) and (min-width:621px){.game-header{min-height:45px;padding:4px 9px}.brand{font-size:18px}.brand-mark{width:25px;height:28px}.header-actions .gw-button-label{font-size:13px}.header-actions .gw-button{min-height:31px;padding:5px 8px}.header-actions .gw-button--icon{width:31px;min-width:31px}.game-scene{gap:4px;padding:6px}.match-heading{gap:7px}.match-place{font-size:17px}.timer{font-size:20px}.match-layout{grid-template-columns:minmax(0,1fr) 180px;gap:10px}.match-aside{padding:8px}.match-aside h3{font-size:16px}.match-aside .loot-card{margin-top:5px}.match-aside .loot-card p{font-size:11px}.match-footer{min-height:25px;font-size:12px}.travel-tip{font-size:10px;padding:2px 8px;max-height:22px}}@media(max-height:440px){.elderan-theme .elderan-dialog{height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);padding:10px 14px;gap:7px}.elderan-theme .gw-modal-heading h2{font-size:22px}.elderan-theme .gw-modal-heading{gap:8px}.elderan-theme .gw-modal-close{width:31px;min-width:31px;min-height:31px}.dialog-text{font-size:13px;line-height:1.36}.dialog-content{gap:5px}.dialog-page{gap:7px}.dialog-pager{padding-top:2px;gap:12px}.dialog-pager .gw-button{min-height:29px;width:31px;min-width:31px;padding:5px}.elderan-theme .gw-modal-actions .gw-button{font-size:13px;min-height:31px;padding:5px 10px}.card-copy h3{font-size:16px}.card-copy p{font-size:12px}.loot-card,.inventory-card,.recruit-card,.unit-card,.stat-card{padding:7px 10px;gap:8px}.item-art{width:34px;height:34px}.recruit-card .item-art,.unit-card .item-art{width:39px;height:39px}.tutorial-demo{min-height:55px;padding:6px}.tutorial-piece{width:34px;height:34px}.tutorial-piece .item-art{width:28px;height:28px}.tutorial-demo--down{height:72px}.forecast{padding:8px}.forecast strong{font-size:26px}.battle-portraits .item-art{width:25px;height:25px}}@media(max-width:620px) and (max-height:440px) and (min-aspect-ratio:1/1){.game-header{min-height:42px;display:flex;gap:6px;padding:4px 7px}.brand{font-size:16px}.brand-mark{width:23px;height:26px}.header-actions{display:flex;gap:4px;margin-left:auto}.header-actions .gw-button{min-width:29px;min-height:29px;width:29px;padding:5px}.header-actions .gw-button-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.header-actions .gw-icon{width:17px;height:17px}.header-actions .army-button{width:auto;min-width:44px;padding:5px!important}.header-actions .army-button .gw-button-label{position:static;width:auto;height:auto;clip-path:none;overflow:visible;font-size:13px}.army-button .gw-icon{display:none}.gold-pill{font-size:15px}.gold-pill .item-art{width:22px;height:22px}.match-heading{flex-wrap:nowrap}.match-place{font-size:15px;flex-basis:auto}.timer{font-size:18px}.game-scene{padding:5px;gap:3px}.match-layout{grid-template-columns:minmax(0,1fr) 145px;gap:8px}.match-aside{display:block;padding:7px}.match-aside h3{font-size:15px;margin-bottom:4px}.match-aside .loot-card .item-art{width:25px;height:25px}.match-aside .loot-card h3{font-size:12px}.match-aside .loot-card p{font-size:10px}.match-aside .loot-card{padding:4px;gap:4px;margin-top:4px}.goal-button{font-size:11px!important;min-height:27px!important}.match-footer{font-size:11px;min-height:26px}.travel-tip{max-height:21px;font-size:10px;padding:2px 8px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.biome-name{position:absolute;left:0;top:0;z-index:0;pointer-events:none;color:#fff0be;text-shadow:0 1px 2px #22362b,0 2px 8px #25412a;font:italic 23px/1.1 Georgia,serif;text-align:center;max-width:220px;white-space:normal}.map-control svg{width:25px;height:25px;display:block;margin:auto}@media(max-width:620px){.biome-name{font-size:18px;max-width:175px}}

.dialog-tabs{grid-row:1}.dialog-page{grid-row:2}.dialog-pager{grid-row:3}
@media(max-width:620px) and (max-aspect-ratio:1/1){
 .game-header{position:relative;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:31px 32px;gap:6px;padding:6px 8px;min-height:81px}
 .brand{grid-row:1;grid-column:1;justify-self:start;font-size:17px;max-width:127px;gap:4px}
 .gold-pill{position:absolute;left:137px;top:10px;gap:2px;font-size:16px}
 .gold-pill .item-art{width:22px;height:22px}
 .header-actions{grid-row:2;grid-column:1;display:flex;margin:0;gap:6px;align-items:stretch}
 .header-actions .army-button{position:absolute;right:46px;top:6px;min-width:71px;min-height:31px;max-height:31px;width:auto;padding:4px 7px!important}
 .header-actions .nav-profile{position:absolute;right:8px;top:6px;width:32px;min-width:32px;min-height:31px;max-height:31px}
 .header-actions .nav-inventory,.header-actions .nav-journal{flex:1;min-width:0;width:auto;justify-self:auto;font-size:12px;padding:5px 8px}
 .header-actions .nav-inventory .gw-button-label,.header-actions .nav-journal .gw-button-label{font-size:12px;white-space:nowrap}
 .header-actions .nav-about,.header-actions .nav-settings{flex:none;width:32px;min-width:32px;min-height:31px;padding:5px}
 .header-actions .nav-about .gw-button-label{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
}
@media(max-width:620px) and (max-aspect-ratio:1/1){.gold-pill,.header-actions .army-button,.header-actions .nav-profile{grid-area:auto}}
@media(max-height:440px) and (min-aspect-ratio:1/1){.match-aside .loot-card{display:grid;grid-template-columns:28px minmax(0,1fr);gap:3px 7px}.match-aside .loot-card .card-copy{grid-column:1/-1;grid-row:1}.match-aside .loot-card .card-copy h3{overflow-wrap:normal;word-break:normal;font-size:12px;line-height:1.2}.match-aside .loot-card .item-art{grid-column:1;grid-row:2}.match-aside .loot-card .loot-percent{grid-column:2;grid-row:2;text-align:right;font-size:18px}.match-aside .loot-card:nth-of-type(n+2){display:none}}

.label-leaders{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.label-leader{stroke:#fff0b7;stroke-width:1.25;filter:drop-shadow(0 1px 1px #5e482a);pointer-events:none}.map-label{z-index:1}.biome-name{opacity:.8}
/* Place the item name on its own row; chance never squeezes words into fragments. */
.match-aside .loot-card{display:grid;grid-template-columns:34px minmax(0,1fr);gap:5px 9px}
.match-aside .loot-card .card-copy{grid-column:1/-1;grid-row:1}
.match-aside .loot-card .card-copy h3{overflow-wrap:normal;word-break:normal}
.match-aside .loot-card .item-art{grid-column:1;grid-row:2}
.match-aside .loot-card .loot-percent{grid-column:2;grid-row:2;text-align:right}

/* The outer world and unknown land share one camera-aligned parchment pattern. */
.world-viewport{background-color:#e9cc94;background-image:none}
.loot-card{display:grid;grid-template-columns:34px minmax(0,1fr);gap:5px 9px}
.loot-card .card-copy{grid-column:1/-1;grid-row:1}
.loot-card .card-copy h3{overflow-wrap:normal;word-break:normal}
.loot-card .item-art{grid-column:1;grid-row:2}
.loot-card .loot-percent{grid-column:2;grid-row:2;text-align:right}
.music-credit .credit-links{display:flex;flex-wrap:wrap;gap:5px 14px;margin-top:7px;font:14px/1.4 system-ui,sans-serif}
.music-credit a{color:#27634c;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}

.map-chunk-retry{max-width:180px;border:1px solid #a67938;border-radius:10px;background:#fff1c8;color:#4b3524;padding:5px 10px;font:13px/1.2 system-ui,sans-serif;cursor:pointer}

/* Visual v2: hover indicates only the real contour; information is available on activation. */
.world-viewport{background-color:#edc995}
.site-contour.is-hover{stroke:#fff0be;stroke-width:1.15;stroke-opacity:.24;fill:none;fill-opacity:0}
.region-contour.is-known.is-hover{stroke-opacity:.10;fill:none;fill-opacity:0}
.map-label:hover,.map-label:focus-visible{background:linear-gradient(#fff3d1,#e7c990);box-shadow:0 2px 4px #38240c52,inset 0 0 0 1px #fff1c788}

/* The map concept's wooden rail, emerald inlays and preserved painted ornament. */
.game-header{position:relative;isolation:isolate;--ribbon-height:58px;gap:8px;padding:6px 12px;background:repeating-linear-gradient(3deg,#6e43260a 0 2px,#341d0a20 3px 4px),linear-gradient(#81532f,#654025 35%,#4e301d 78%,#744c2b);border-bottom:3px solid #d6a14e;box-shadow:inset 0 2px #e7b967,inset 0 -1px #3b2214,0 2px 4px #4a29194d;color:#ffe6ac}
.game-header>*:not(.header-painted-art){z-index:1}
.brand{font-size:22px;font-weight:700;color:#ffe9ba;text-shadow:0 2px #352111,0 0 7px #e3bc6350}
.gold-pill{position:relative;--ribbon-height:42px;gap:7px;min-height:42px;padding:2px 14px;border:1px solid #dcab54;border-radius:24px;background:linear-gradient(#214e38,#143d30);box-shadow:inset 0 0 0 2px #2f624c,0 2px #3a2316;font-size:23px;font-weight:700;color:#ffe7ab}
.gold-pill>.item-art,.gold-pill>.gold-number,.painted-gold{position:relative;z-index:1}
.painted-gold{width:34px;height:34px}
.header-actions{gap:7px}
.header-actions .gw-button{position:relative;--ribbon-height:37px;min-height:37px;border:2px solid #d4a252;border-radius:21px;padding:5px 13px;background:linear-gradient(#244f36,#173b2c);box-shadow:inset 0 1px #97a66a80,inset 0 -2px #102a20,0 2px 2px #291b1280;color:#ffe7b3;font-size:16px;text-shadow:0 1px #1a291b}
.header-actions .gw-button:hover{background:linear-gradient(#345e40,#234731)}
.header-actions .gw-icon{color:#e4bd70}
.header-actions .nav-settings,.header-actions .nav-profile{width:38px;min-width:38px;padding:6px;border-radius:11px}
.header-actions .nav-profile{border-radius:50%}
.header-actions .nav-about{min-width:36px;width:36px;padding:7px;border-radius:50%}
.header-actions .nav-about .gw-button-label{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
.header-actions .army-button{padding:0 9px!important;--ribbon-height:42px;min-height:42px}
.army-portraits{display:flex;align-items:center;gap:12px;padding-right:12px;margin-right:7px;border-right:1px solid #d6ab5b80}
.class-count{display:inline-flex;align-items:center;gap:4px;font-size:18px;font-weight:bold;color:#ffe7af}
.painted-portrait{display:inline-flex;width:34px;height:38px;flex:none;align-items:center;justify-content:center}
.painted-portrait svg{display:block;width:100%;height:100%}
.class-count .item-art{width:36px;height:40px}
.army-button>.gw-icon{display:none}
.painted-ribbon{position:absolute;inset:-1px;display:grid;grid-template-columns:calc(var(--ribbon-height,36px)*var(--ribbon-ratio,.5)) minmax(0,1fr) calc(var(--ribbon-height,36px)*var(--ribbon-ratio,.5));pointer-events:none;z-index:0}
.painted-ribbon>svg{display:block;width:100%;height:100%;min-width:0;overflow:hidden}
.header-painted-art{inset:0;z-index:0}
.has-painted-ribbon{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
.has-painted-ribbon>.gw-icon,.has-painted-ribbon>.gw-button-label,.has-painted-ribbon>.army-portraits{position:relative;z-index:1}
@media(max-width:1120px){.army-portraits{display:none}.brand{font-size:20px}.header-actions .gw-button{font-size:14px;padding:5px 11px}.gold-pill{font-size:20px;padding:4px 11px}}
@media(max-width:620px) and (max-aspect-ratio:1/1){.game-header{--ribbon-height:81px;padding:6px 8px;gap:6px;min-height:81px}.brand{font-size:17px;max-width:127px}.gold-pill{--ribbon-height:30px;left:133px;top:6px;min-height:30px;max-height:31px;font-size:16px;padding:2px 7px;gap:2px}.gold-pill .item-art,.painted-gold{width:22px;height:22px}.header-actions{gap:6px}.header-actions .gw-button{--ribbon-height:31px;min-height:31px;padding:5px 8px}.header-actions .nav-about,.header-actions .nav-settings,.header-actions .nav-profile{width:32px;min-width:32px;padding:5px}.header-actions .army-button{--ribbon-height:31px;border-radius:18px;min-width:66px;right:46px;padding:4px 7px!important}.header-actions .nav-profile{right:8px}.army-button .gw-button-label{font-size:14px}}
@media(max-height:440px) and (min-aspect-ratio:1/1){.game-header{--ribbon-height:43px;min-height:43px;padding:4px 7px;gap:6px}.brand{font-size:16px}.gold-pill{--ribbon-height:31px;min-height:31px;font-size:16px;padding:2px 8px;gap:3px}.gold-pill .item-art,.painted-gold{width:23px;height:23px}.header-actions{gap:4px}.header-actions .gw-button{--ribbon-height:29px;min-height:29px;min-width:29px;padding:4px 7px}.header-actions .nav-settings,.header-actions .nav-profile,.header-actions .nav-about{width:29px;min-width:29px;padding:5px}}
@media(max-width:620px) and (max-aspect-ratio:1/1){
 .gold-pill{position:absolute}
 .header-actions .army-button{position:absolute}
 .header-actions .nav-profile{position:absolute;right:8px;top:6px}
}

/* Explicit scoped typography must override the shared button font reset. */
.elderan-theme .map-label{font:700 12px/1.15 Georgia,'Times New Roman',serif;max-width:185px}
.elderan-theme .map-control{font:700 24px/1 Georgia,'Times New Roman',serif}
@media(max-width:620px){.elderan-theme .map-label{max-width:145px}}
.world-scene[aria-busy=true] .world-viewport,.world-scene[aria-busy=true] .map-label{cursor:progress}

/* M3 collection is a separate left column; artwork retains its own proportions. */
.match-layout{grid-template-columns:clamp(112px,12vw,156px) minmax(0,1fr) minmax(150px,200px);gap:12px}
.collection-mount{min-width:0;min-height:0;width:100%;height:100%;max-height:680px;justify-self:start}
.game-scene .match-heading{padding:7px 12px;border:1px solid #e7c88288;border-radius:13px;background:#193e37d9;box-shadow:0 3px 10px #14251e35;color:#fff2c9}
.game-scene .match-place{color:#fff1c3;text-shadow:0 2px 2px #18271e}
.game-scene .match-footer{padding:4px 8px;border-radius:10px;background:#203f37dd;color:#fff2cb}
.collection-summary{display:grid;gap:8px}.collection-summary-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;min-width:0}.collection-summary-item{display:grid;place-items:center;gap:3px;padding:5px;border:1px solid #c9a367;border-radius:9px;background:#fff0c6;color:#395b36;font:700 19px/1 Georgia,serif}.collection-summary-icon{display:block;width:34px;height:34px}.collection-summary-icon .em3-gem-visual,.collection-summary-icon svg{display:block;width:100%;height:100%;overflow:hidden}
@media(max-width:850px){.match-layout{grid-template-columns:108px minmax(0,1fr) 150px;gap:8px}}
@media(max-width:620px){.match-layout{grid-template-columns:72px minmax(0,1fr);gap:7px}.match-aside{display:none!important}.collection-mount{max-height:none}.game-scene .match-heading{padding:5px 7px}.game-scene .match-footer{padding:3px 5px}.collection-summary-grid{gap:3px}.collection-summary-item{padding:3px;font-size:16px}.collection-summary-icon{width:28px;height:28px}}
@media(max-width:360px){.match-layout{grid-template-columns:66px minmax(0,1fr);gap:5px}}
@media(max-height:440px) and (min-aspect-ratio:1/1){.match-layout{grid-template-columns:116px minmax(0,1fr);gap:8px}.match-aside{display:none!important}.collection-mount{max-height:none}.game-scene .match-heading{padding:3px 7px}.game-scene .match-footer{padding:2px 5px}.collection-summary-icon{width:27px;height:27px}.collection-summary-item{font-size:16px}}

/* Whole clouds use one camera-synchronized viewport surface. */
.world-clouds{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}

/* Dense or compact map views keep each numbered target on its actual landmark. */
.world-labels.is-compact .map-label:not(.map-more){width:36px;height:36px;min-width:36px;min-height:36px;max-width:36px;padding:1px;gap:0;justify-content:center;border-radius:50%;}
.world-labels.is-compact .map-label:not(.map-more) .map-number{width:32px;height:32px;min-width:32px;padding:0;font-size:13px;line-height:1;}
.world-labels.is-compact .map-label:not(.map-more) .map-name{display:none;}

/* The map is a bounded native-resolution viewport, not an infinite canvas.
   Oversized displays get a centred atlas frame rather than enlarged artwork. */
.world-viewport{max-width:var(--map-native-width,1672px);max-height:var(--map-native-height,941px);margin:auto;box-shadow:0 0 0 2px #8b683b55,0 8px 40px #3b291733;}

/* Compact header: resources keep their natural width; navigation can form
   another row without pushing the profile beyond the right edge. */
@media(max-width:900px){
 .elderan-theme .game-header{--header-control:clamp(29px,8vw,36px);display:flex;align-items:flex-start;gap:3px;min-height:43px;height:auto;padding:7px 8px 4px}
 .elderan-theme .game-header .header-divider{display:none}
 .elderan-theme .game-header .brand{position:relative;flex:none;justify-content:center;gap:0;width:var(--header-control);height:var(--header-control);max-width:none;font-size:16px}
 .elderan-theme .game-header .brand-mark{width:calc(var(--header-control)*.79);height:calc(var(--header-control)*.87);flex:none}
 .elderan-theme .game-header .brand-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .elderan-theme .game-header .gold-pill{position:relative;inset:auto;flex:none;--ribbon-height:var(--header-control);height:var(--header-control);min-height:var(--header-control);max-height:var(--header-control);gap:2px;padding:2px 3px;font-size:16px;line-height:1;white-space:nowrap}
 .elderan-theme .game-header .gold-pill .item-art,.elderan-theme .game-header .painted-gold{width:calc(var(--header-control)*.7);height:calc(var(--header-control)*.7)}
 .elderan-theme .game-header .header-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(var(--header-control),1fr));grid-auto-flow:row dense;flex:1 1 0;align-items:center;align-self:flex-start;gap:2px;min-width:0;margin:0}
 .elderan-theme .game-header .header-actions .gw-button{position:relative;inset:auto;grid-area:auto;--ribbon-height:var(--header-control);width:var(--header-control);min-width:var(--header-control);max-width:var(--header-control);height:var(--header-control);min-height:var(--header-control);max-height:var(--header-control);padding:4px!important;justify-self:center;border:1px solid #d4a252!important;border-radius:9px;background:linear-gradient(#244f36,#173b2c)!important;box-shadow:inset 0 1px #97a66a80,inset 0 -2px #102a20,0 1px 2px #291b1280!important;font:700 15px/1 Georgia,'Times New Roman',serif}
 .elderan-theme .game-header .header-actions .gw-button:hover{background:linear-gradient(#345e40,#234731)!important}
 .elderan-theme .game-header .header-actions .painted-ribbon,.elderan-theme .game-header .army-portraits{display:none}
 .elderan-theme .game-header .header-actions .gw-icon{display:block;width:calc(var(--header-control)*.64);height:calc(var(--header-control)*.64);flex:none}
 .elderan-theme .game-header .header-actions .gw-button-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .elderan-theme .game-header .header-actions .army-button{grid-column:span 2;width:100%;max-width:none;min-width:0;border-radius:999px}
 .elderan-theme .game-header .header-actions .army-button>.gw-icon{display:none}
 .elderan-theme .game-header .header-actions .army-button .gw-button-label{position:static;width:auto;height:auto;overflow:visible;clip-path:none;font-size:15px;line-height:1}
 .elderan-theme .game-header .header-actions .nav-settings{grid-column:-3/-2;grid-row:1;justify-self:end}
 .elderan-theme .game-header .header-actions .nav-profile{grid-column:-2/-1;grid-row:1;justify-self:end;border-radius:50%}
 /* Native-ratio end caps follow the actual rail height, including wrapped rows. */
 .elderan-theme .game-header>.header-painted-art{display:flex}
 .elderan-theme .game-header>.header-painted-art>svg{width:auto;height:100%;flex:0 0 auto;aspect-ratio:var(--ribbon-ratio)}
 .elderan-theme .game-header>.header-painted-art>svg:nth-child(2){width:0;flex:1 1 0;aspect-ratio:auto}
}
@media(min-width:500px) and (max-width:900px){
 .elderan-theme .game-header .brand{width:auto;gap:6px}
 .elderan-theme .game-header .brand-title{position:static;width:auto;height:auto;overflow:visible;clip-path:none}
}
.elderan-theme .travel-tip{max-height:none;height:auto;font-size:12px;line-height:1.25;padding:3px 8px;overflow:visible}

/* Cards paginate at their natural height; compact actions leave the full
   localized name, health/damage and price readable beside the portrait. */
.elderan-theme .unit-card,.elderan-theme .recruit-card{flex:none}
@media(max-width:440px){
 .elderan-theme .unit-card,.elderan-theme .recruit-card{display:grid;grid-template-columns:36px minmax(0,1fr) 32px;gap:6px;padding:6px 7px}
 .elderan-theme .unit-card>.item-art,.elderan-theme .recruit-card>.item-art{width:36px;height:36px}
 .elderan-theme .unit-card .card-copy h3,.elderan-theme .recruit-card .card-copy h3{margin-bottom:4px;overflow-wrap:normal;font-size:16px}
 .elderan-theme .unit-card .card-copy p,.elderan-theme .recruit-card .card-copy p{font-size:12px;line-height:1.3;overflow-wrap:normal}
 .elderan-theme .recruit-card .card-copy{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:6px;align-items:baseline}
 .elderan-theme .recruit-card .card-copy>h3{grid-column:1;grid-row:1;margin:0}
 .elderan-theme .recruit-card .card-copy>p:first-of-type{grid-column:1/-1;grid-row:2;margin:3px 0 0}
 .elderan-theme .recruit-card .card-copy>p:last-of-type{grid-column:2;grid-row:1;margin:0;white-space:nowrap}
 .elderan-theme .unit-card-action{position:relative;min-width:32px;width:32px;min-height:32px;height:32px;padding:5px}
 .elderan-theme .unit-card-action>.gw-icon{width:20px;height:20px}
 .elderan-theme .unit-card-action>.gw-button-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}

/* Low windows retain every illustration, statistic and action in authored
   compact compositions. Rich source nodes remain live through pagination. */
@media(max-height:300px){
 .elderan-theme .elderan-dialog{padding:6px 10px;gap:6px}
 .elderan-theme .gw-modal-heading{gap:7px}
 .elderan-theme .gw-modal-heading h2{font-size:20px;line-height:1.12}
 .elderan-theme .dialog-content{gap:4px}
 .elderan-theme .dialog-page{gap:6px}
 .elderan-theme .section-title{font-size:16px;line-height:1.15;margin:0 0 4px}
 .elderan-theme .gw-modal-actions{gap:6px}
 .elderan-theme .gw-modal-actions .gw-button{padding:5px 8px}
 .elderan-theme .dialog-page>.loot-card{flex:none;grid-template-columns:32px minmax(0,1fr) max-content;align-items:center;gap:6px;padding:6px}
 .elderan-theme .dialog-page>.loot-card>.item-art{grid-column:1;grid-row:1;width:32px;height:32px}
 .elderan-theme .dialog-page>.loot-card>.card-copy{grid-column:2;grid-row:1}
 .elderan-theme .dialog-page>.loot-card>.loot-percent{grid-column:3;grid-row:1;font-size:16px;white-space:nowrap}
 .elderan-theme .dialog-page>.loot-card .card-copy h3{font-size:14px;line-height:1.15;margin:0;overflow-wrap:normal;word-break:normal}
 .elderan-theme .dialog-page>.loot-card .card-copy p{font-size:12px;line-height:1.3;margin:3px 0 0}
 .elderan-theme .tutorial-demo{flex:none;min-height:55px}
 .elderan-theme .tutorial-demo--down{height:76px;min-height:76px}
 .elderan-theme .collection-summary{flex:none;gap:4px}
 .elderan-theme .collection-summary>.section-title{font-size:16px;margin:0}
 .elderan-theme .collection-summary-grid{gap:3px}
 .elderan-theme .collection-summary-item{gap:2px;padding:2px 1px;font:700 12px/14px Georgia,serif}
 .elderan-theme .collection-summary-icon{width:20px;height:20px}
 .elderan-theme .forecast{flex:none;padding:6px;gap:8px;font-size:14px;line-height:1.2}
 .elderan-theme .forecast strong{font-size:22px}
 .elderan-theme .battle-stage{flex:none;grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);gap:6px}
 .elderan-theme .battle-side h3{margin:0 0 4px;font-size:14px;line-height:1.15}
 .elderan-theme .battle-hp{height:10px}
 .elderan-theme .battle-numbers{margin-top:3px;font-size:14px;line-height:1.2}
 .elderan-theme .battle-portraits{gap:2px;margin-top:4px}
 .elderan-theme .battle-portraits .item-art{width:20px;height:20px}
 .elderan-theme .battle-swords .item-art,.elderan-theme .battle-swords svg{width:28px;height:28px}
 .elderan-theme .music-credit>.section-title{font-size:16px;margin:0 0 3px}
 .elderan-theme .music-credit .credit-links{gap:4px 8px;margin-top:3px;font:12px/1.3 system-ui,sans-serif}
 .elderan-theme .dialog-page>.inventory-card .card-copy h3{font-size:14px}
}
@media(max-width:440px){
 .elderan-theme .dialog-page>.inventory-card{flex:none;display:grid;grid-template-columns:32px minmax(0,1fr) 32px;align-items:center;gap:6px;padding:6px}
 .elderan-theme .dialog-page>.inventory-card>.item-art{width:32px;height:32px}
 .elderan-theme .dialog-page>.inventory-card .card-copy h3{line-height:1.15;margin:0;overflow-wrap:normal}
 .elderan-theme .inventory-card-action{position:relative;width:32px;min-width:32px;height:32px;min-height:32px;padding:5px}
 .elderan-theme .inventory-card-action>.gw-icon{width:20px;height:20px}
 .elderan-theme .inventory-card-action>.gw-button-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
.brand-mark>svg{display:block}
/* Inventory/HUD v1: whole controls reflow; illustrations retain their aspect ratio. */
.game-scene{grid-template-rows:auto minmax(0,1fr)}
.round-toolbar{display:flex;align-items:center;gap:6px;flex:none;margin-left:auto;position:relative;z-index:1}
.round-toolbar .gw-button{width:36px;min-width:36px;height:36px;min-height:36px;padding:6px;flex:none;border:1px solid #c5a15d;background:linear-gradient(#fce7ab,#d4b371);color:#3e5638;border-radius:10px;box-shadow:inset 0 1px #fff9cf,0 2px 3px #28392066}
.round-toolbar .gw-icon{width:24px;height:24px}.hint-symbol{font:bold 26px/24px Georgia,serif}.round-toolbar .timer{font-size:22px;padding:6px 9px;background:#183c30;color:#fff0bb}
.is-in-round .game-header{gap:8px}.is-in-round .brand-title{display:none}.is-in-round .header-actions{margin-left:0}.is-in-round .header-actions .gw-button-label{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}.is-in-round .header-actions .nav-inventory,.is-in-round .header-actions .nav-journal{width:36px;min-width:36px;flex:none}.is-in-round .gold-pill{font-size:18px;flex:none}.is-in-round .gold-pill .item-art{width:25px;height:25px}
.elderan-theme .inventory-dialog{--inventory-edge:#ac7237;border:4px solid var(--inventory-edge);border-radius:22px;background:radial-gradient(ellipse at 20% 0,#fff7d3,#f1dfb1 65%,#d2ae6e);box-shadow:inset 0 0 0 2px #ffe9ae,inset 8px 0 12px #83572c20,inset -8px 0 12px #83572c20,0 20px 80px #151c16b8}
.inventory-dialog .gw-modal-heading{padding-bottom:9px;border-bottom:2px solid #c69b5866}.inventory-dialog .gw-modal-heading h2{color:#694321;text-shadow:0 1px #fff5ce}
.inventory-dialog .dialog-tabs .gw-button{border-radius:10px 10px 5px 5px;background:linear-gradient(#6b9164,#355a43);border:2px solid #bc9857;color:#fff0c9;font-family:Georgia,serif;font-weight:bold}.inventory-dialog .dialog-tabs [aria-selected=true]{background:linear-gradient(#ffe6a3,#d2a75e);color:#53381e;box-shadow:inset 0 0 0 1px #fff1ba}
.inventory-rate{padding:9px 12px;background:#41644e;color:#fff3cf;border:1px solid #d2b172;border-radius:10px;font-size:14px;line-height:1.35}
.inventory-treasure{display:flex;align-items:center;gap:14px;min-width:0;flex:none;min-height:94px;padding:8px 14px;border:2px solid #c49b5a;border-radius:15px;background:radial-gradient(ellipse at 15% 10%,#fff4cb,#e8cd93);box-shadow:inset 0 2px #fff8dd,0 3px 0 #946c3840}
.inventory-treasure-art{position:relative;width:74px;height:74px;flex:none;display:grid;place-items:center;background:radial-gradient(#fce8a1,#cda35e55 65%,transparent 70%)}
.inventory-treasure-art>.em3-gem-visual{position:absolute;inset:4px;width:66px;height:66px}.inventory-treasure-art .item-art{width:72px;height:72px}.inventory-treasure-copy{min-width:0;flex:1}.inventory-treasure-copy h3{margin:0 0 6px;font:bold 19px/1.15 Georgia,serif;color:#604021;overflow-wrap:anywhere}.inventory-quantity{font:bold 23px/1.1 Georgia,serif;color:#3e6340;font-variant-numeric:tabular-nums}.inventory-kind{font:13px/1.2 system-ui;color:#8b673c}.inventory-coin-value{display:flex;align-items:center;gap:3px;flex:none;font:700 22px/1 Georgia,serif;color:#875b1b}.inventory-coin-value .item-art{width:35px;height:35px}.inventory-read{padding:9px 12px;border:2px solid #ba8b46;border-radius:10px;background:linear-gradient(#5b895b,#32573e);color:#fff0bd;font:bold 15px/1.1 Georgia,serif;cursor:pointer}.inventory-read:hover{background:#4a774f}.inventory-read:focus-visible{outline:3px solid #8160b8;outline-offset:2px}.inventory-empty{min-height:120px;display:grid;place-items:center;gap:8px;text-align:center}.inventory-empty .item-art{width:84px;height:84px}.inventory-document .dialog-page>.item-art{width:90px;height:90px;align-self:center}
@media(max-width:620px){
 .match-layout{grid-template-columns:minmax(0,1fr)!important;gap:0}.collection-mount{display:none!important}.is-in-round .game-header{display:grid;grid-template-columns:1fr auto auto;min-height:84px;padding:5px 8px;gap:4px 7px}.is-in-round .brand{grid-row:1;grid-column:1}.is-in-round .round-toolbar{grid-row:1;grid-column:1 / 3;margin-left:35px;justify-self:start;gap:4px}.is-in-round .round-toolbar .timer{font-size:18px;padding:5px 7px}.is-in-round .round-toolbar .gw-button{width:31px;min-width:31px;min-height:31px;height:31px;padding:4px}.is-in-round .round-toolbar .gw-icon{width:21px;height:21px}.is-in-round .gold-pill{grid-row:1;grid-column:3;justify-self:end;font-size:16px}.is-in-round .header-actions{display:flex;grid-row:2;grid-column:1 / -1;justify-content:flex-end;gap:7px}.is-in-round .header-actions .nav-inventory{margin-right:auto}.is-in-round .header-actions .nav-profile{position:static}.is-in-round .header-actions .gw-button{width:31px;min-width:31px;min-height:31px;height:31px;flex:none}.is-in-round .army-button{display:none}.game-scene .match-heading{padding:4px 7px}.game-scene .match-place{font-size:15px;flex-basis:auto}.game-scene{padding:5px;gap:4px}
 .inventory-treasure{gap:9px;min-height:82px;padding:6px 9px}.inventory-treasure-art{width:58px;height:58px}.inventory-treasure-art>.em3-gem-visual{inset:3px;width:52px;height:52px}.inventory-treasure-art .item-art{width:58px;height:58px}.inventory-treasure-copy h3{font-size:16px}.inventory-quantity{font-size:20px}.inventory-coin-value{font-size:18px}.inventory-coin-value .item-art{width:27px;height:27px}.inventory-read{padding:8px;font-size:13px}.inventory-rate{font-size:13px;padding:8px}.inventory-dialog .gw-modal-heading{padding-bottom:5px}.elderan-theme .inventory-dialog{padding:10px}
}
@media(max-height:440px){.inventory-treasure{min-height:68px;padding:4px 9px;gap:9px}.inventory-treasure-art{width:54px;height:54px}.inventory-treasure-art>.em3-gem-visual{inset:2px;width:50px;height:50px}.inventory-treasure-art .item-art{width:54px;height:54px}.inventory-treasure-copy h3{font-size:16px;margin-bottom:3px}.inventory-quantity{font-size:18px}.inventory-rate{font-size:12px;line-height:1.2;padding:6px 8px}.inventory-dialog .gw-modal-heading{padding-bottom:3px}.is-in-round .game-header{min-height:42px;padding:3px 7px}.is-in-round .round-toolbar .gw-button{width:29px;min-width:29px;height:29px;min-height:29px}.is-in-round .round-toolbar .timer{font-size:18px;padding:5px 6px}}
@media(max-height:440px) and (pointer:coarse){.collection-mount{display:none!important}.match-layout{grid-template-columns:minmax(0,1fr)!important}}
@media(max-height:440px) and (min-aspect-ratio:1/1){
 .is-in-round .game-header{display:flex;flex-wrap:nowrap;min-height:42px;height:42px;padding:3px 7px;gap:6px}.is-in-round .brand{display:none}.is-in-round .round-toolbar{margin:0;justify-self:auto;gap:4px}.is-in-round .header-actions{display:flex;flex:1;justify-content:flex-end;gap:4px}.is-in-round .header-actions .nav-inventory{margin-right:0}.is-in-round .header-actions .gw-button,.is-in-round .header-actions .nav-inventory,.is-in-round .header-actions .nav-journal{width:29px;min-width:29px;min-height:29px;height:29px;padding:5px;flex:none}.is-in-round .gold-pill{font-size:15px}.is-in-round .gold-pill .item-art{width:22px;height:22px}.game-scene .match-place{font-size:14px}.game-scene .goal-button{font-size:11px!important;min-height:27px!important;padding:4px 7px!important}
}
@media(max-width:620px) and (min-height:441px){.is-in-round .header-actions .nav-profile{position:absolute;right:8px;top:6px}.is-in-round .gold-pill{margin-right:37px}.is-in-round .game-header{position:relative}.is-in-round .round-toolbar{margin-left:29px;gap:3px}.is-in-round .round-toolbar .timer{font-size:17px;padding:5px 6px}.is-in-round .header-actions{padding-right:1px}}

@media(max-height:300px){.inventory-empty{min-height:64px;gap:3px}.inventory-empty .item-art{width:44px;height:44px}.inventory-empty .dialog-text{font-size:12px;line-height:1.2}.inventory-document .dialog-page>.item-art{width:48px;height:48px}}
/* Short landscape reserves a complete card before paging: title, tabs,
   pager and action bar each have a compact but readable fixed footprint. */
@media(max-height:280px){
 .elderan-theme .inventory-dialog{padding:6px 9px;gap:4px;border-width:3px;border-radius:15px}
 .elderan-theme .inventory-dialog .gw-modal-heading{padding-bottom:0;gap:6px;border-bottom-width:1px;min-height:27px}
 .elderan-theme .inventory-dialog .gw-modal-heading h2{font-size:18px;line-height:1.15}
 .elderan-theme .inventory-dialog .gw-modal-close{width:27px;min-width:27px;height:27px;min-height:27px;padding:4px}
 .inventory-dialog .dialog-content{gap:4px}
 .elderan-theme .inventory-dialog .dialog-tabs .gw-button{min-height:27px;padding:3px 8px;font-size:12px;line-height:1.15}
 .inventory-dialog .dialog-page{gap:4px}
 .inventory-dialog .dialog-pager{padding-top:0;gap:10px;min-height:27px}
 .elderan-theme .inventory-dialog .dialog-pager .gw-button{width:27px;min-width:27px;height:27px;min-height:27px;padding:3px}
 .elderan-theme .inventory-dialog .gw-modal-actions .gw-button{min-height:28px;padding:4px 10px;font-size:13px;line-height:1.15}
 .inventory-dialog .inventory-rate{font-size:12px;padding:5px 7px;line-height:1.2}
}
@media(max-width:440px){
 .inventory-treasure[data-kind=quest]{display:grid;grid-template-columns:58px minmax(0,1fr);column-gap:10px;row-gap:5px;padding:8px 10px}
 .inventory-treasure[data-kind=quest]>.inventory-treasure-art{grid-column:1;grid-row:1 / 3;align-self:center}
 .inventory-treasure[data-kind=quest]>.inventory-treasure-copy{grid-column:2;grid-row:1}
 .inventory-treasure[data-kind=quest] .inventory-treasure-copy h3{overflow-wrap:normal;word-break:normal}
 .inventory-treasure[data-kind=quest]>.inventory-read{grid-column:2;grid-row:2;justify-self:start;padding:6px 10px;min-height:28px}
}

@media(max-width:620px),(pointer:coarse){.collection-mount,.match-aside{display:none!important}.match-layout{grid-template-columns:minmax(0,1fr)!important;gap:0}}

/* Fixed semantic inventory pages: six columns × six rows; only the collected tab. */
.elderan-theme .inventory-grid-dialog{width:min(740px,calc(100vw - 16px));height:min(740px,calc(100dvh - 16px));max-height:calc(100dvh - 16px);grid-template-rows:auto minmax(0,1fr) auto!important;gap:8px;padding:14px}
.inventory-grid-dialog .dialog-content{min-height:0;grid-template-rows:auto minmax(0,1fr) auto!important;gap:7px}
.inventory-grid-dialog .dialog-page{min-height:0;display:block}
.inventory-grid-page{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr);gap:7px;min-height:0}
.inventory-grid-dialog .inventory-rate{margin:0;padding:6px 9px;font-size:12px;line-height:1.2}
.inventory-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(6,minmax(0,1fr));gap:5px;aspect-ratio:1;max-width:100%;max-height:100%;width:auto;height:100%;justify-self:center;align-self:center;min-height:0}
.inventory-slot{position:relative;min-width:0;min-height:0;aspect-ratio:1;border:2px solid #c49b5a;border-radius:11px;background:radial-gradient(ellipse at 30% 15%,#fff7d4,#ead3a0 78%);box-shadow:inset 0 0 0 2px #fff2c2,0 2px 0 #a97b3b44;container-type:inline-size}
.inventory-slot.is-empty{background:#d9bd8155;border-color:#c6a46b88;box-shadow:inset 0 1px 4px #79562a22}
.inventory-slot-art{position:absolute;inset:3px;display:block}
.inventory-slot-art>.em3-gem-visual{position:absolute;inset:0;width:100%;height:100%}
.inventory-slot-quantity{position:absolute;right:1px;bottom:1px;max-width:calc(100% - 2px);padding:1px 3px;border:1px solid #e7c57d;border-radius:6px;background:linear-gradient(#355b43,#193b31);color:#fff4c5;font:bold clamp(10px,24cqw,19px)/1 Georgia,serif;white-space:nowrap;box-shadow:0 1px 2px #65431c66;text-shadow:0 1px #163126}
.inventory-grid-dialog .gw-modal-actions{margin:0}
@media(max-width:440px){
 .elderan-theme .inventory-grid-dialog{padding:9px;gap:6px;height:min(640px,calc(100dvh - 16px))}
 .inventory-grid-dialog .gw-modal-heading{padding-bottom:4px;min-height:30px}.inventory-grid-dialog .gw-modal-heading h2{font-size:22px}
 .inventory-grid-dialog .dialog-tabs .gw-button{padding:5px 7px;min-height:31px;font-size:13px}
 .inventory-grid-dialog .dialog-content,.inventory-grid-page{gap:5px}.inventory-grid{gap:4px}.inventory-slot{border-radius:8px}
 .inventory-grid-dialog .gw-modal-actions .gw-button{font-size:14px;min-height:33px;padding:5px 12px}
}
@media(max-height:470px) and (min-aspect-ratio:1/1){
 .elderan-theme .inventory-grid-dialog{width:min(740px,calc(100vw - 12px));height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,.9fr);grid-template-rows:auto auto minmax(0,1fr) auto auto!important;column-gap:12px;row-gap:5px;padding:8px}
 .inventory-grid-dialog .dialog-content,.inventory-grid-dialog .dialog-page,.inventory-grid-dialog .inventory-grid-page{display:contents}
 .inventory-grid-dialog .gw-modal-heading{grid-column:2;grid-row:1;min-height:27px;padding:0;border:0;gap:6px}.inventory-grid-dialog .gw-modal-heading h2{font-size:19px}
 .inventory-grid-dialog .gw-modal-close{width:27px;min-width:27px;height:27px;min-height:27px;padding:4px}
 .inventory-grid-dialog .dialog-tabs{grid-column:2;grid-row:2!important}.inventory-grid-dialog .dialog-tabs .gw-button{min-height:28px;font-size:12px;padding:4px 6px}
 .inventory-grid-dialog .inventory-rate{grid-column:2;grid-row:3;font-size:12px;align-self:center;padding:5px 7px}
 .inventory-grid-dialog .dialog-pager{grid-column:2;grid-row:4!important;padding:0;min-height:27px;gap:10px}
 .inventory-grid-dialog .gw-modal-actions{grid-column:2;grid-row:5;min-height:28px;justify-content:center}
 .inventory-grid-dialog .gw-modal-actions .gw-button{min-height:28px;font-size:13px;padding:4px 8px}
 .inventory-grid-dialog .inventory-grid{grid-column:1;grid-row:1 / 6;height:100%;width:auto;max-width:100%;max-height:100%;gap:4px}
 .inventory-slot{border-width:1px;border-radius:7px}.inventory-slot-quantity{font-size:clamp(10px,25cqw,15px);padding:1px 2px}
}
@media(max-height:470px) and (min-aspect-ratio:1/1){.inventory-grid-dialog>.gw-modal-body{display:contents}.inventory-grid-dialog .dialog-tabs .gw-button{font-size:11px;min-width:0}.inventory-grid-dialog .dialog-tabs .gw-button-label{min-width:0}}
.inventory-slot-art.is-loading::after{content:'✦';position:absolute;inset:0;display:grid;place-items:center;color:#ac8549;font-size:clamp(12px,45cqw,30px);animation:inventory-art-wait 1s ease-in-out infinite alternate}
@keyframes inventory-art-wait{to{opacity:.35;transform:scale(.75)}}
.inventory-art-retry{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:transparent;color:#725029;font:bold clamp(14px,55cqw,30px)/1 Georgia,serif;cursor:pointer}
/* Intrinsic item widths must not become a minimum for a resized grid page. */
.inventory-grid-dialog>.gw-modal-body,.inventory-grid-dialog .dialog-content,.inventory-grid-dialog .dialog-page,.inventory-grid-dialog .inventory-grid-page{min-width:0;max-width:100%}
.inventory-grid-dialog .inventory-grid-page{contain:inline-size}
.inventory-grid-dialog .inventory-grid{min-width:0;min-inline-size:0}
/* Font and box sizes change together; WebKit CQ font updates can otherwise
   precede the resize observer's grid measurement by one frame. */
.inventory-grid-dialog .inventory-slot-quantity{font-size:var(--inventory-count-size,10px);padding:1px 1px}
/* The available board area owns geometry. A single CSS side length preserves
   squares even in the frame before a JS resize observer runs (WebKit). */
.inventory-grid-area{container-type:size;display:grid;place-items:center;min-width:0;min-height:0;width:100%;height:100%}
.inventory-grid-dialog .inventory-grid{width:min(100cqi,100cqb);height:auto;aspect-ratio:1;max-width:none;max-height:none;min-width:0}
.inventory-grid-dialog .inventory-slot{container-type:normal}
.inventory-grid-dialog .inventory-slot-quantity{font-size:clamp(9px,calc((min(100cqi,100cqb) - 25px) / 6 * .24),19px);padding:1px 1px}
@media(max-height:470px) and (min-aspect-ratio:1/1){.inventory-grid-dialog .inventory-grid-area{grid-column:1;grid-row:1 / 6}.inventory-grid-dialog .inventory-grid{grid-column:auto;grid-row:auto}}
.inventory-grid-dialog .inventory-slot-art.is-loading::after,.inventory-grid-dialog .inventory-art-retry{font-size:clamp(10px,calc((min(100cqi,100cqb) - 25px) / 6 * .6),24px);line-height:1}
