/* Local atlas extension: old map and complete card art stay untouched. */
@font-face{font-family:AtlasDisplay;src:url('./assets/cinzel-beta.ttf') format('truetype');font-display:swap}
body.edge-to-edge-map{--atlas-ink:#f5e8ce;--atlas-muted:#cfbea0;--atlas-bronze:#aa8550;--atlas-parchment:#e4c68d;--atlas-leather:#28241c;--atlas-floor:#151f19}
.edge-to-edge-map ::selection{background:#ead09a;color:#1b241d}
.edge-to-edge-map :is(.collection-dialog,.squad-picker-dialog,.market-dialog,.potion-dialog,.scout-dialog,.quest-reveal-dialog,.quest-arrival-dialog){color:var(--atlas-ink);scrollbar-color:var(--atlas-bronze) var(--atlas-floor);scrollbar-width:thin;text-underline-offset:4px}
.edge-to-edge-map :is(.collection-dialog,.squad-picker-dialog,.market-dialog,.potion-dialog,.scout-dialog,.quest-reveal-dialog,.quest-arrival-dialog):focus-visible,
.edge-to-edge-map :is(.collection-dialog,.squad-picker-dialog,.market-dialog,.potion-dialog,.scout-dialog,.expedition-result) :is(button,a,summary):focus-visible{outline:3px solid #ffe0a0;outline-offset:4px}
.edge-to-edge-map dialog:is(.collection-dialog,.squad-picker-dialog,.market-dialog,.potion-dialog,.scout-dialog,.quest-reveal-dialog,.quest-arrival-dialog){border:3px double var(--atlas-bronze);border-radius:16px;background:var(--atlas-floor);padding:24px}
.edge-to-edge-map dialog>.dialog-header{border-bottom:1px solid #836c44;padding-bottom:18px;margin-bottom:20px;background:var(--atlas-floor)}
.edge-to-edge-map dialog:not(.restart-dialog)>.dialog-header h2{font-family:AtlasDisplay,Georgia,serif;color:var(--atlas-parchment);font-size:26px;line-height:1.25}
.edge-to-edge-map dialog:not(.restart-dialog) .icon-button{border:1px solid var(--atlas-bronze);color:var(--atlas-parchment);background:#302c22}
.edge-to-edge-map dialog:not(.restart-dialog) .button.primary,
.edge-to-edge-map :is(.equipment-equip,.shop-buy){background:linear-gradient(#f1d6a0,#c5a166);color:#252216;border:1px solid #f3d394;min-height:46px;border-radius:7px;font-weight:700}
.edge-to-edge-map dialog:not(.restart-dialog) .button.primary:hover:not(:disabled),
.edge-to-edge-map :is(.equipment-equip,.shop-buy):hover:not(:disabled){background:#f1d6a0}
.edge-to-edge-map dialog:not(.restart-dialog) .button.primary:disabled{background:#3a382c;border-color:#786b51;color:#bcb39e;opacity:1}
.edge-to-edge-map .map-hud-resources{background:#20261dee;border:3px double #bc975d;padding:3px 5px;border-radius:12px}
.edge-to-edge-map .map-hud-resource{padding-inline:11px;color:#f7e2b8}
.edge-to-edge-map .map-hud-resource .icon{width:25px;height:25px;color:#eac37e;padding:3px;background:#3c3423;border:1px solid #967447;border-radius:50%;box-sizing:content-box}
.edge-to-edge-map .map-hud-resource small{color:#d3c5ab}
.edge-to-edge-map .hud-squad-slot{background:#212920f5;border:3px double #b89b62;padding:3px 3px 10px}
.edge-to-edge-map .hud-squad-slot.is-filled{border-color:var(--slot-rarity)}
.edge-to-edge-map .hud-slot-plus{display:grid;place-items:center;width:38px;height:38px;border:1px solid #8a774f;border-radius:50%;background:#332f22}
.edge-to-edge-map .hud-slot-plus .icon{color:#e5c789}
.edge-to-edge-map .hud-fighter-health{height:4px}
.edge-to-edge-map .button.hud-inventory{width:60px;height:60px;border:3px double #be995c;border-radius:12px 12px 18px 18px;background:#483525;position:relative}
.edge-to-edge-map .button.hud-inventory::before{content:"";position:absolute;top:5px;left:7px;right:7px;height:9px;border-bottom:1px solid #c49a5d}
.edge-to-edge-map .button.hud-inventory>.icon{height:28px;width:28px;color:#f0d29c}
.edge-to-edge-map .button.hud-quests{background:#342f23;border:3px double #bc995e;color:#f7e4bd}
.edge-to-edge-map .button.hud-quests>.icon{width:25px;height:25px;color:#e8c287}
.edge-to-edge-map dialog.squad-picker-dialog{width:min(1220px,calc(100vw - 32px))}
.squad-picker-heading{flex-wrap:wrap;margin:24px 0 16px;color:var(--atlas-muted)}
.squad-picker-heading p{margin-right:auto}
.squad-synergies h3{margin:0 0 14px;font-size:20px;color:#e8cca0}
.selected-formation{display:grid;grid-template-columns:repeat(3,minmax(0,150px));gap:10px;margin-bottom:22px}
.formation-seat{font:inherit;color:#eddbb3;background:#242a20;border:1px solid #8d784f;border-radius:10px;padding:8px;display:grid;justify-items:center;gap:4px;cursor:pointer}
.formation-seat.is-editing{border:3px double #f2d28e;padding:6px;background:#383524}
.formation-seat img{width:50px;height:75px;object-fit:contain}
.formation-seat-label,.formation-role{font-size:12px;line-height:1.3}
.formation-editing{font-size:11px;min-height:14px;color:#f2d28e}
.formation-empty{display:grid;place-items:center;width:50px;height:75px}
.synergy-tracks{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.synergy-track{padding:8px;background:#22291f;border:1px solid #716747;border-radius:12px;color:#eee1c6}
.synergy-track summary{min-height:72px;cursor:pointer;display:grid;justify-items:center;gap:6px;text-align:center;font-size:12px}
.synergy-name{font-weight:700;font-size:14px}
.synergy-gems{display:flex;gap:6px}.synergy-gems svg{width:19px;height:23px}
.synergy-gems path:first-child{fill:#1b231c;stroke:#918365;stroke-width:1.5}
.synergy-gems path+path{fill:none;stroke:#776b55;stroke-width:.8}
.synergy-gems .is-lit path:first-child{fill:var(--gem-color);stroke:#efdab7}
.synergy-gems .is-lit path+path{stroke:#fff6d2}
.synergy-gems .is-lit{animation:gem-arrival .32s ease-out}
@keyframes gem-arrival{from{filter:brightness(.6)}to{filter:brightness(1)}}
.synergy-track.is-active{border-color:var(--gem-color);background:#293625}
.synergy-track p{font-size:13px;line-height:1.5;margin:12px 0 0}
.synergy-hint{display:block;margin-top:12px;color:var(--atlas-muted);font-size:12px;line-height:1.5}
.synergy-builds{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}
.synergy-builds p{max-width:44ch;font-size:13px;margin:0}
.synergy-builds small{display:block;color:var(--atlas-muted);line-height:1.5}
.archetype-section{margin-top:30px;padding:18px;border:1px solid #87704c;border-radius:12px;background:#20291f}
.archetype-heading{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;border-bottom:1px solid #6f6044;padding-bottom:14px}
.archetype-heading h3{font-family:AtlasDisplay,Georgia,serif;font-size:23px;margin:0;color:#eed5a0}
.archetype-heading>span{color:#d1bc91;font-variant-numeric:tabular-nums}
.archetype-heading p{flex-basis:100%;color:#d1c3a9;margin:0;font-size:13px;line-height:1.5}
.archetype-section>.fighter-card-grid{grid-template-columns:repeat(auto-fill,minmax(175px,1fr));align-items:start;margin-bottom:0;gap:20px}
.archetype-section .fighter-card{max-width:275px}
.archetype-section .fighter-card-controls{padding:12px 0 0}
.auto-collection>.fighter-card-grid:has(.archetype-section){display:block}
.recruit-decline{color:#d6c5a5;background:transparent;border:0;text-decoration:underline;text-underline-offset:4px}
.edge-to-edge-map dialog.equipment-dialog{width:min(1320px,calc(100vw - 32px));background:#29251d;padding:28px}
.edge-to-edge-map dialog.equipment-dialog>.dialog-header{background:#29251d}
.equipment-loadout{gap:32px;grid-template-columns:minmax(300px,.9fr) minmax(360px,1.1fr)}
.equipment-board{padding:20px;width:min(100%,430px);background:#342e21;border:3px double #9d7e4d;border-radius:16px}
.equipment-slot-button{background:#20251d;border:3px double #aa8955;width:128px;height:128px}
.equipment-slot-button:disabled{border-style:double}
.equipment-detail{grid-template-columns:155px minmax(0,1fr);padding-left:24px;border-color:#8e754b}
.equipment-bag{border-color:#8e754b;padding-top:24px}
.equipment-grid{grid-template-columns:repeat(auto-fill,minmax(132px,1fr));max-height:410px;gap:16px;padding:8px}
.equipment-item{background:#20251c;border:1px solid #8b784e;padding:5px;border-radius:10px}
.equipment-item-name{font-size:12px;color:#f0dfbb}
.equipment-supplies{border-color:#8e754b}
.equipment-personal-fighter>strong,.equipment-item>small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.edge-to-edge-map :is(.quest-reward-footer,.quest-unopened,.shop-card-info){background:#242a20;border-color:#8f784c;color:#eddfc0}
.edge-to-edge-map .quest-unopened{border:1px solid #9c8256}
.edge-to-edge-map .game-toast{background:#272c21;color:#f0dfba;border:1px solid #a48b56;border-radius:10px}
.potion-target{display:grid;grid-template-columns:50px minmax(0,1fr) auto;gap:14px;align-items:center;padding:18px 0;border-top:1px solid #756646}
.potion-target>img{width:50px;height:75px;object-fit:contain;border-radius:5px}
.potion-target strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.potion-target span{white-space:nowrap}
.potion-target .button{max-width:145px}
.potion-target>div{display:grid;gap:6px}.potion-target span{color:#d7c49f;font-variant-numeric:tabular-nums}
.potion-picker>p{line-height:1.5;color:#d6c6a8}
.potion-picker>small,.scouted-enemy>small{display:block;color:#cfbea0;line-height:1.5}
.edge-to-edge-map dialog:is(.potion-dialog,.scout-dialog){width:min(580px,calc(100vw - 24px))}
.scout-stats{color:#ecd092;font-size:16px;font-variant-numeric:tabular-nums}
.scouted-enemy dl{margin:20px 0;line-height:1.5}
.scouted-enemy dt{font-weight:700;color:#efdcad;margin-top:14px}
.scouted-enemy dd{margin:4px 0 0;color:#e0d4bc;font-size:14px}
.battle-time-note{padding:10px 24px;background:#2c291f;color:#edd5a0;margin:0;font-size:13px;line-height:1.5}
details.battle-time-note summary{cursor:pointer;min-height:30px;align-content:center}
.battle-time-note p{max-width:72ch;margin:8px 0}
.autobattle-scene:not(.battle-atlas) .enemy-info-button{min-height:36px;padding:5px 12px!important;border:1px solid #b69561!important;color:#f0d6a5!important;background:#342e22!important}
.edge-to-edge-map .auto-fighter-inspector{position:fixed;z-index:60;right:24px;bottom:24px;width:min(510px,calc(100vw - 48px));max-height:65dvh;overflow:auto;overscroll-behavior:contain;border:3px double #b89b61;border-radius:14px;background:#21271d}
.edge-to-edge-map .auto-fighter-inspector>header{position:sticky;top:-20px;background:#21271d;padding-block:8px;border-bottom:1px solid #86734f}
.edge-to-edge-map .auto-fighter-inspector .auto-abilities{grid-template-columns:1fr}
.edge-to-edge-map .auto-fighter-inspector :is(button,a):focus-visible{outline:3px solid #ffe0a0;outline-offset:3px}
.scout-hover{position:fixed;z-index:38;left:50%;top:88px;transform:translateX(-50%);width:min(350px,calc(100vw - 32px));padding:14px 18px;background:#20291ff5;color:#f4dfb6;border:2px solid #bd975d;border-radius:12px;pointer-events:none}
.scout-hover p{margin:4px 0;font-size:13px;line-height:1.4}
.edge-to-edge-map .final-main{position:fixed;inset:88px 24px 24px;z-index:30;display:grid;place-items:center;width:auto;max-width:none;padding:0;margin:0;pointer-events:none}
.edge-to-edge-map .final-main::before{content:"";position:fixed;inset:0;z-index:-1;background:#0a181a66;pointer-events:auto}
.expedition-result{position:relative;width:min(920px,100%);max-height:100%;overflow:auto;overscroll-behavior:contain;scrollbar-color:#b89b61 #14251f;border:3px double #b89b61;border-radius:16px;background:#14251f;color:#f5e6c3;pointer-events:auto}
.victory-landscape{display:block;width:100%;height:clamp(200px,40dvh,440px);object-fit:cover}
.victory-story{position:absolute;top:28px;left:30px;right:30px;text-align:center}
.victory-story h1{font-family:AtlasDisplay,Georgia,serif;font-size:clamp(34px,5vw,60px);color:#fff0c9;margin:0;text-shadow:0 3px 12px #142216}
.victory-footer{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:20px 30px;padding:24px 32px;background:#1e2b20}
.victory-party{display:flex;gap:10px;grid-row:1/3;align-items:center}
.victory-party img{width:min(29%,110px);height:auto;aspect-ratio:2/3;object-fit:contain;border-radius:9px}
.victory-reward strong{display:block;color:#f6d68c;font-family:AtlasDisplay,Georgia,serif;font-size:38px;margin:4px 0}
.victory-actions{display:flex;flex-wrap:wrap;gap:8px}
.victory-actions .button.primary{background:#e4c68d;color:#252216;border-color:#f3d394}
.victory-restart{grid-column:1/-1;display:flex;justify-content:center;min-width:0;padding-top:4px}
.expedition-result .button.result-restart{box-sizing:border-box;flex:none;width:min(100%,300px);min-height:58px;padding:12px 24px;border:3px double #94713d;border-radius:12px;background:linear-gradient(#f5dfa9,#e4c68d);color:#183b30;font:700 24px/1.2 AtlasLoot,Georgia,serif;text-align:center;white-space:normal;box-shadow:none;transition:background-color 150ms ease-out}
.expedition-result .button.result-restart:hover:not(:disabled){background:#f5dfa9;color:#183b30;filter:none}
.expedition-result .button.result-restart:active:not(:disabled){background:#d9b574;color:#183b30}
.expedition-result .button.result-restart:disabled{background:#b9ad8d;color:#394332;border-color:#8a7958;opacity:1;cursor:default}
.expedition-result.is-defeat .victory-footer{grid-template-columns:minmax(0,1fr)}
.expedition-result.is-defeat .victory-party{grid-row:auto;justify-content:center}
.expedition-result .victory-party:empty{display:none}
#share-feedback{grid-column:1/-1;line-height:1.5;color:#cfc3a9;font-size:12px}
#share-feedback:empty{display:none}
@media(max-width:700px){
 .edge-to-edge-map .map-hud-resource{font-size:16px;padding-inline:6px;gap:4px}
 .edge-to-edge-map .map-hud-resource .icon{width:17px;height:17px;padding:2px}
 .edge-to-edge-map .map-hud-resources{padding:1px}
 .edge-to-edge-map .button.hud-inventory{width:44px;height:48px;min-height:44px}
 .edge-to-edge-map .button.hud-quests{width:44px;height:48px}
 .edge-to-edge-map dialog:is(.collection-dialog,.squad-picker-dialog,.market-dialog,.potion-dialog,.scout-dialog,.quest-reveal-dialog,.quest-arrival-dialog){padding:16px;max-height:calc(100dvh - 24px)}
 .edge-to-edge-map dialog:not(.restart-dialog)>.dialog-header h2{font-size:23px}
 .synergy-tracks{grid-template-columns:repeat(3,minmax(0,1fr))}
 .selected-formation{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:18px}
 .formation-seat img,.formation-empty{width:40px;height:60px}
 .synergy-track summary{display:flex;min-height:44px;flex-wrap:wrap;justify-content:center;font-size:12px}
 .synergy-name{flex-basis:100%;font-size:13px}
 .synergy-gems svg{width:15px;height:18px}
 .archetype-section{padding:12px;margin-top:24px}
 .archetype-section>.fighter-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .archetype-section .fighter-card-action button{font-size:12px;padding:10px 6px}
 .equipment-loadout{grid-template-columns:1fr}
 .equipment-board{padding:16px}
 .equipment-diagram{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
 .equipment-board .equipment-slot-button{width:100%;height:78px}
 .equipment-board .equipment-slot-name{font-size:10px;min-height:28px;display:grid;place-items:center}
 .equipment-board .equipment-slot-button .item-art--card{width:min(100%,40px);height:60px;max-width:100%;margin:auto}
 .equipment-board .equipment-slot>small{display:none}
 .equipment-detail.has-whole-card>.equipment-detail-art{width:min(100%,250px)}
 .equipment-detail{grid-template-columns:120px minmax(0,1fr);padding:18px 0 0;border-left:0;border-top:1px solid #8e754b}
 .equipment-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 .equipment-item-name{font-size:11px}
 .potion-target{grid-template-columns:50px minmax(0,1fr);gap:10px}
 .potion-target>.button{grid-column:1/-1;max-width:none}
 .potion-target>div{display:grid;gap:8px}
 .edge-to-edge-map .final-main{inset:76px 12px max(12px,env(safe-area-inset-bottom))}
 .victory-landscape{height:clamp(170px,32dvh,300px);object-position:45% center}
 .victory-story{left:12px;right:12px;top:20px}
 .victory-footer{grid-template-columns:1fr;padding:20px;gap:18px}
 .victory-party{grid-row:auto;justify-content:center}
 .victory-party img{width:75px}
 .victory-reward{text-align:center}.victory-reward strong{font-size:32px}
 .victory-actions{justify-content:center}.victory-actions .button{flex:1 1 130px}
 .battle-time-note{padding:8px 14px}
 .edge-to-edge-map .auto-fighter-inspector{right:12px;bottom:12px;width:calc(100vw - 24px);max-height:60dvh}
 .scout-hover{top:72px}
}
@media(prefers-reduced-motion:reduce){.synergy-gems,.victory-story,.archetype-section,.expedition-result .button.result-restart{animation:none;transition:none}}
