:root{--purple:#5b2a86;--green:#4e9f6f;--pink:#c74d8d;--indigo:#3949ab;--ink:#241c2b;--muted:#6f6675;--paper:#fffafc;--panel:#ffffff;--line:#ded5e3;--gold:#d7a928;--danger:#a93855;--shadow:0 10px 28px rgba(53,28,70,.12)}
*{box-sizing:border-box}html,body{height:auto;min-height:0;overflow:visible;margin:0;padding:0}body{font-family:Montserrat,Arial,sans-serif;color:var(--ink);background:#f3eef6;line-height:1.45}.hero{display:grid;grid-template-columns:auto 1fr auto;gap:18px;align-items:center;max-width:1180px;margin:18px auto 10px;background:rgba(255,255,255,.94);padding:18px;border-radius:22px}.shell-edge{border:3px solid transparent;background-image:linear-gradient(#fff,#fff),linear-gradient(90deg,var(--purple),var(--green),var(--pink));background-origin:border-box;background-clip:padding-box,border-box}.brand-logo{width:86px;height:auto}.hero h1{margin:.1rem 0;font-size:clamp(1.6rem,4vw,2.8rem)}.hero p{margin:.2rem 0}.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:.78rem;color:var(--purple);font-weight:700}.tabs{max-width:1180px;margin:0 auto;display:flex;gap:8px;flex-wrap:wrap;padding:8px}.tabs button,button{border:0;border-radius:999px;padding:10px 15px;font:inherit;font-weight:700;cursor:pointer;background:#eee6f2;color:var(--ink)}.tabs button.active,button.primary{background:var(--purple);color:#fff}.secondary{background:#f0e8f4}.danger{background:#f7dbe3;color:#7a2039}.app-shell{max-width:1180px;margin:0 auto 50px;padding:10px}.panel{background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:20px;padding:18px;margin:12px 0;box-shadow:var(--shadow)}.dashboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.metric{background:#fbf8fc;border:1px solid var(--line);padding:14px;border-radius:16px}.metric strong{display:block;font-size:1.65rem;color:var(--purple)}.actions{display:flex;gap:10px;flex-wrap:wrap}.card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.game-card{background:linear-gradient(180deg,#fff,#faf4fb);border:3px solid var(--purple);border-radius:22px;padding:10px;box-shadow:0 8px 18px rgba(52,27,68,.13);min-height:420px;position:relative}.game-card[data-rarity="Rare"]{border-color:var(--gold)}.game-card.locked{filter:grayscale(1);opacity:.55}.card-topline,.card-footer{display:flex;justify-content:space-between;gap:10px;font-size:.78rem;font-weight:700}.art-frame{height:180px;border-radius:15px;overflow:hidden;background:#e8dcef;margin:8px 0;border:1px solid #cbb9d3}.art-frame svg{width:100%;height:100%;display:block}.card-name{margin:7px 0 2px;font-size:1.25rem}.card-subtitle{margin:0 0 8px;color:var(--muted);font-size:.9rem}.stats{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.stat,.tag{display:inline-flex;border-radius:999px;padding:4px 8px;background:#eee6f2;font-size:.76rem;font-weight:700}.tags{display:flex;gap:5px;flex-wrap:wrap}.card-effect{font-size:.9rem}.pack{max-width:330px;margin:20px auto;text-align:center;padding:28px;border-radius:24px;background:linear-gradient(145deg,var(--purple),#2f1c4e);color:#fff;border:4px solid var(--gold);box-shadow:var(--shadow)}.pack-icon{font-size:4rem}.battle-layout{display:grid;grid-template-columns:320px 1fr;gap:18px}.resource-row{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.resource{padding:10px;border-radius:14px;background:#f7f2f9;text-align:center;border:1px solid var(--line)}.resource strong{display:block;font-size:1.35rem}.hand{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.hand-card{border:1px solid var(--line);background:#fff;border-radius:14px;padding:12px;text-align:left}.hand-card h4{margin:0 0 4px}.hand-card small{color:var(--muted)}.log{max-height:230px;overflow:auto;background:#251b2c;color:#f8eefb;padding:12px;border-radius:14px;font-family:ui-monospace,monospace;font-size:.85rem}.progress{height:12px;background:#eadfed;border-radius:999px;overflow:hidden}.progress>span{display:block;height:100%;background:var(--purple)}.notice{padding:12px;border-left:5px solid var(--purple);background:#f2eaf6;border-radius:10px}.trade-row{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center}.monster-face{transform-origin:center;animation:bob 3.2s ease-in-out infinite}.accessibility-reduce-motion *{animation:none!important;transition:none!important}@keyframes bob{50%{transform:translateY(-6px) rotate(1deg)}}@media(max-width:780px){.hero{grid-template-columns:1fr;text-align:center}.brand-logo{margin:auto}.dashboard{grid-template-columns:repeat(2,1fr)}.battle-layout{grid-template-columns:1fr}.resource-row{grid-template-columns:repeat(3,1fr)}.trade-row{grid-template-columns:1fr}.trade-arrow{text-align:center}}@media(max-width:430px){.dashboard{grid-template-columns:1fr}.game-card{min-height:390px}.art-frame{height:150px}}
.art-frame img{width:100%;height:100%;display:block;object-fit:cover;object-position:center top}.monster-battle-art{height:360px}.monster-battle-art img{object-fit:contain;background:#211a28}@media(max-width:780px){.monster-battle-art{height:300px}}

/* Full collectible card presentation */
.monster-card{
  min-height:0;
  padding:8px;
  display:flex;
  flex-direction:column;
}
.monster-card .full-card-art{
  width:100%;
  height:auto;
  margin:0;
  border:0;
  border-radius:15px;
  background:#211a28;
  overflow:hidden;
}
.monster-card .full-card-art img{
  width:100%;
  height:auto;
  object-fit:contain;
  object-position:center;
  display:block;
}
.monster-card .card-topline,
.monster-card .card-name,
.monster-card .card-subtitle,
.monster-card .stats,
.monster-card .tags,
.monster-card .card-effect{
  display:none;
}
.monster-card .card-footer{
  margin-top:8px;
  padding:0 2px 2px;
}
.monster-card.locked .full-card-art img{
  filter:grayscale(1) brightness(.35);
}

/* Battle card frame locked to the supplied card artwork */
.battle-monster-card{
  min-height:0;
  padding:0;
  overflow:hidden;
  align-self:start;
  background:#211a28;
  border-radius:22px;
}
.battle-monster-card .monster-battle-art{
  width:100%;
  height:auto;
  margin:0;
  border:0;
  border-radius:18px 18px 0 0;
  background:#211a28;
  overflow:hidden;
}
.battle-monster-card .monster-battle-art img{
  width:100%;
  height:auto;
  object-fit:contain;
  object-position:center;
  display:block;
}
.battle-monster-status{
  padding:12px 14px 14px;
  background:#fff;
}
.battle-monster-status h3{
  margin:0 0 4px;
}
.battle-monster-status p{
  margin:.45rem 0;
}

@media(max-width:780px){
  .battle-monster-card{max-width:420px;margin:0 auto;width:100%}
}

/* Sliding collection album */
.album-slider{background:#3a2449;padding:16px;border-radius:24px;overflow:hidden}
.album-toolbar{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;background:#fffaf2;border-radius:16px 16px 0 0;padding:14px;text-align:center}
.album-toolbar h2,.album-toolbar p{margin:.15rem 0}.album-count{color:var(--muted)}
.album-tabs{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;background:#eadfed;padding:10px}
.album-tabs button{font-size:.86rem;padding:8px 12px}.album-tabs button.active{background:var(--purple);color:#fff}
.album-slider-viewport{overflow:hidden;background:#24182d;padding:12px;transition:height .35s ease}
.album-slider-track{display:flex;width:100%;transition:transform .42s cubic-bezier(.22,.75,.25,1);will-change:transform;align-items:flex-start}
.album-slide{flex:0 0 100%;min-width:0;background:#fffaf2;border-radius:10px;padding:20px;box-shadow:inset 12px 0 20px rgba(76,51,35,.06),inset -12px 0 20px rgba(76,51,35,.04)}
.album-page-head{border-bottom:2px solid #d5c8b8;margin-bottom:16px;padding-bottom:10px}.album-page-head h3{margin:0}.album-page-head p{margin:.3rem 0 0;color:var(--muted)}
.page-number{color:#fff;text-align:center;margin:10px 0 0;font-weight:700}
.accessibility-reduce-motion .album-slider-track{transition:none!important}.accessibility-reduce-motion .album-slider-viewport{transition:none!important}
@media(max-width:620px){.album-toolbar{grid-template-columns:1fr 1fr}.album-toolbar>div{grid-column:1/-1;grid-row:1}.album-slide{padding:12px}.album-tabs{justify-content:flex-start}}

/* Barry legendary ally artwork and battle states */
.ally-image-card[data-rarity="Legendary"]{border-color:var(--gold);background:linear-gradient(180deg,#fffdf4,#f7effb)}
.ally-art-frame{height:auto;aspect-ratio:3 / 2;background:#eee6f2}
.ally-art-frame img{width:100%;height:100%;object-fit:contain;object-position:center;display:block}
.barry-battle-panel{display:grid;grid-template-columns:minmax(180px,280px) 1fr;gap:16px;align-items:center;border:2px solid var(--gold);background:linear-gradient(135deg,#fffaf0,#f3e8fa)}
.barry-battle-panel img{width:100%;height:auto;aspect-ratio:3 / 2;object-fit:cover;border-radius:16px;border:2px solid var(--purple)}
.barry-battle-panel h3,.barry-battle-panel p{margin:.25rem 0}
.barry-battle-panel.is-battling{animation:barryCharge .85s ease both}
@keyframes barryCharge{0%{transform:scale(.98)}35%{transform:scale(1.02) rotate(-.4deg)}70%{transform:scale(1.01) rotate(.4deg)}100%{transform:scale(1)}}
.accessibility-reduce-motion .barry-battle-panel.is-battling{animation:none!important}
@media(max-width:620px){.barry-battle-panel{grid-template-columns:1fr}.barry-battle-panel img{max-width:420px;margin:auto}}

/* v0.4.2 battle guide and collection-driven encounter picker */
.battle-intro-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(300px,.95fr);gap:16px;align-items:start}
.how-to-battle-card{background:rgba(255,255,255,.97);border-radius:22px;padding:20px;box-shadow:var(--shadow)}
.how-to-battle-card h2{margin:.2rem 0 .7rem}
.how-to-battle-card ol{margin:.4rem 0 1rem;padding-left:1.35rem}
.how-to-battle-card li{margin:.55rem 0}
.battle-key{display:flex;flex-wrap:wrap;gap:7px}
.battle-key span{display:inline-flex;padding:6px 9px;border-radius:999px;background:#eee6f2;font-size:.8rem;font-weight:700}
.encounter-picker{margin-top:0}
.encounter-list{display:grid;gap:10px}
.encounter-choice{display:grid;grid-template-columns:64px 1fr;gap:11px;align-items:center;text-align:left;border-radius:16px;padding:8px;width:100%}
.encounter-choice img{width:64px;height:84px;display:block;object-fit:contain;border-radius:10px;background:#211a28}
.encounter-choice span{display:grid;gap:2px}
.encounter-choice small{font-weight:600;color:var(--muted)}
.encounter-choice.primary small{color:#efe7f5}
@media(max-width:820px){.battle-intro-grid{grid-template-columns:1fr}}

/* v0.5.2 restored two-column battle arena */
.battle-layout{
  display:grid;
  grid-template-columns:minmax(280px,390px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.battle-monster-card{width:100%;max-width:390px;margin:0 auto;position:sticky;top:12px}
.battle-layout>div{width:100%;min-width:0}
@media(max-width:820px){.battle-layout{grid-template-columns:1fr}.battle-monster-card{position:static;max-width:460px}}

/* v0.4.4 separate battle hub and battle arena */
.arena-heading{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:16px}
.arena-heading h2,.arena-heading p{margin:.2rem 0}
.arena-heading button{flex:0 0 auto}
@media(max-width:700px){.arena-heading{align-items:stretch;flex-direction:column}.arena-heading button{align-self:flex-start}}

/* v0.5.0 full supplied ally and attack-card artwork */
.full-image-card{min-height:0;padding:8px;display:flex;flex-direction:column}
.full-image-card .full-card-art{width:100%;height:auto;aspect-ratio:1050 / 1498;margin:0;border:0;border-radius:15px;background:#211a28;overflow:hidden}
.full-image-card .full-card-art img{width:100%;height:100%;object-fit:contain;object-position:center;display:block}
.full-image-card .card-topline,.full-image-card .card-name,.full-image-card .card-subtitle,.full-image-card .stats,.full-image-card .tags,.full-image-card .card-effect{display:none}
.full-image-card .card-footer{margin-top:8px;padding:0 2px 2px}
.full-image-card.locked .full-card-art img{filter:grayscale(1) brightness(.35)}

/* v0.5.1 future monster album slots */
.future-monster-slot{width:100%;aspect-ratio:2/3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.45rem;border:2px dashed rgba(91,42,134,.55);border-radius:18px;background:linear-gradient(145deg,rgba(91,42,134,.14),rgba(26,19,35,.08));color:var(--ink);text-align:center;padding:1rem}
.future-slot-number{font-size:clamp(2.4rem,8vw,4.2rem);font-weight:900;line-height:1;color:#5b2a86;opacity:.65}
.future-monster-slot strong{font-size:1.05rem}.future-monster-slot small{opacity:.75}
.game-card.locked .future-monster-slot{filter:none;opacity:1}


/* v0.5.4 expanded album capacities and pre-battle monster profile */
.battle-guide-stack{display:grid;gap:22px;align-content:start}
.monster-profile-placeholder{display:grid;grid-template-columns:minmax(120px,180px) minmax(0,1fr);gap:18px;align-items:start;margin:0}
.monster-profile-placeholder.is-empty{grid-template-columns:82px 1fr;min-height:210px;align-items:center}
.profile-placeholder-art{border-radius:16px;background:#211a28;padding:6px}
.profile-placeholder-art img{display:block;width:100%;height:auto;object-fit:contain;border-radius:12px}
.profile-placeholder-copy h2,.monster-profile-placeholder h2{margin:.15rem 0 .55rem}
.profile-stats{display:flex;flex-wrap:wrap;gap:7px;margin:.45rem 0 .7rem}
.profile-stats span{display:inline-flex;padding:6px 9px;border-radius:999px;background:#eee6f2;font-size:.82rem;font-weight:800}
.profile-coming-soon{margin:14px 0;padding:12px;border:1px dashed #9d86af;border-radius:14px;background:#f6f0f8}
.profile-coming-soon p{margin:.3rem 0 0;color:var(--muted)}
.profile-placeholder-icon{display:grid;place-items:center;width:72px;height:96px;border:2px dashed #7b5794;border-radius:16px;background:#eee6f2;color:#5b2a86;font-size:2.6rem;font-weight:900}
@media(max-width:560px){.monster-profile-placeholder,.monster-profile-placeholder.is-empty{grid-template-columns:1fr}.profile-placeholder-art{max-width:220px;margin:auto}.profile-placeholder-icon{margin:auto}}


/* v0.5.6 zoom, battle hit values, counterstrike and victory reports */
.zoomable-image{cursor:zoom-in}.zoomable-image:focus{outline:3px solid var(--purple);outline-offset:3px}.modal-open{overflow:hidden!important}.app-modal[hidden]{display:none}.app-modal{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;padding:20px}.modal-backdrop{position:absolute;inset:0;background:rgba(20,12,27,.78)}.modal-card{position:relative;z-index:1;width:min(900px,96vw);max-height:90vh;overflow:auto;background:#fff;border-radius:22px;padding:20px;border:3px solid var(--purple);box-shadow:0 24px 80px rgba(0,0,0,.35)}.modal-close{position:absolute;right:10px;top:10px;width:42px;height:42px;padding:0;font-size:1.7rem}.lightbox-card{width:min(1100px,96vw);background:#211a28;color:#fff;text-align:center}.lightbox-card img{display:block;width:100%;max-height:78vh;object-fit:contain;border-radius:14px}.lightbox-card p{margin:.7rem 2.5rem 0}.damage-report{width:min(620px,94vw)}.counter-event{font-size:1.15rem;padding:12px;border-radius:14px;background:#f3ecf7}.damage-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px;margin:16px 0}.damage-chip{padding:12px;border-radius:14px;text-align:center;background:#edf5ef;border:1px solid #bfd5c5}.damage-chip.bad{background:#f9e6eb;border-color:#e3bac5}.damage-chip span{display:block;font-size:.8rem}.damage-chip strong{font-size:1.4rem}.hand-card-head{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.hand-card-head h4{margin:0}.hit-badge{display:inline-flex;align-items:center;justify-content:center;min-width:56px;padding:5px 8px;border-radius:999px;background:#5b2a86;color:#fff;font-weight:900;font-size:.78rem}.effect-values{display:flex;flex-wrap:wrap;gap:5px;margin:7px 0}.effect-values span{font-size:.72rem;font-weight:700;background:#eee6f2;border-radius:999px;padding:4px 7px}.victory-card{width:min(900px,96vw)}#victoryVisual img{display:block;width:100%;max-height:62vh;object-fit:contain;border-radius:14px;background:#211a28}.victory-placeholder{min-height:320px;display:grid;place-items:center;align-content:center;gap:12px;text-align:center;border-radius:18px;border:2px dashed #805aa0;background:linear-gradient(145deg,#2c193c,#5b2a86);color:#fff;padding:30px}.victory-placeholder strong{font-size:clamp(1.6rem,5vw,3rem)}.victory-placeholder-web{font-size:4rem}.victory-placeholder small{opacity:.82}.monster-profile-placeholder img{cursor:zoom-in}
@media(max-width:560px){.app-modal{padding:10px}.modal-card{padding:16px}.damage-grid{grid-template-columns:repeat(2,1fr)}}


/* v0.5.7 Support Sprite cards */
.full-image-card .full-card-art img{width:100%;height:auto;display:block;object-fit:contain}
.full-image-card .full-card-art{padding:0;background:transparent;overflow:hidden}

.discovery-pack-cover{position:relative;max-width:520px;margin:20px auto 10px;border-radius:26px;overflow:hidden;box-shadow:var(--shadow);background:#171219}.discovery-pack-cover img{display:block;width:100%;height:auto}.pack-overlay-button{position:absolute;left:50%;bottom:7%;transform:translateX(-50%);min-width:150px;padding:13px 24px;box-shadow:0 8px 20px rgba(0,0,0,.35);border:2px solid rgba(255,255,255,.8)}.pack-overlay-button:disabled{opacity:.55;cursor:not-allowed}.pack-note{text-align:center;color:var(--muted);margin:.5rem 0 1.5rem}.accessibility-reduce-motion .pack-overlay-button{transform:translateX(-50%)!important}

/* v0.6.2 cleaner discovery pack action */
.discovery-pack-cover{position:relative;max-width:520px;margin:20px auto 10px;border-radius:26px;overflow:hidden;box-shadow:var(--shadow);background:#171219}
.discovery-pack-cover img{display:block;width:100%;height:auto}
.pack-action{display:flex;justify-content:center;margin:14px 0 6px}
.pack-action .primary{min-width:170px;padding:13px 26px;box-shadow:0 7px 16px rgba(75,40,94,.18)}
.pack-overlay-button{position:static!important;transform:none!important;box-shadow:none}

/* v0.6.2 polished battle dashboard */
.battle-dashboard{gap:24px}
.battle-control-stack{display:grid;gap:18px;min-width:0}
.battle-dashboard-panel{position:relative;background:rgba(255,255,255,.97);border:1px solid var(--line);border-radius:20px;padding:20px 20px 20px 24px;box-shadow:0 8px 22px rgba(52,27,68,.10);overflow:hidden}
.battle-dashboard-panel::before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:4px;border-radius:0 8px 8px 0;background:linear-gradient(180deg,var(--purple),var(--green),var(--pink))}
.resources-panel{padding-top:16px;padding-bottom:16px}
.resource-row{gap:10px}.resource{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;text-align:left;padding:11px 12px;background:linear-gradient(145deg,#fff,#f4edf7);box-shadow:inset 0 1px 0 #fff,0 3px 8px rgba(52,27,68,.07)}
.resource strong{font-size:1.2rem}.resource-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:linear-gradient(145deg,#fff,#ddd2e4);box-shadow:3px 3px 7px rgba(65,42,78,.16),-2px -2px 5px #fff;font-size:1.05rem}
.battle-section-heading,.battle-title-row{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.battle-section-heading h3,.battle-title-row h3{margin:.1rem 0}
.token-chip,.chaos-orb,.energy-cost{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:7px 10px;font-size:.8rem;font-weight:900;background:linear-gradient(145deg,#fff,#e9dfef);box-shadow:2px 3px 7px rgba(52,27,68,.12);white-space:nowrap}
.chaos-orb{background:linear-gradient(145deg,#6b3296,#492064);color:#fff}
.energy-cost{background:linear-gradient(145deg,#fff6cc,#ead779);color:#4b3b00;padding:5px 9px}
.hand{gap:12px;margin:14px 0}.hand-card{padding:14px;border-left:4px solid var(--purple);box-shadow:0 5px 13px rgba(52,27,68,.08);transition:transform .15s ease,box-shadow .15s ease}.hand-card:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 17px rgba(52,27,68,.13)}.hand-card p{margin:.55rem 0 0}.hand-card small,.hit-badge,.effect-values{display:none!important}
.battle-actions{margin-top:14px}.log-panel .log{margin-top:10px}
.battle-monster-status{padding:8px 4px 2px}.battle-monster-status .progress{margin:12px 0 4px;height:14px;box-shadow:inset 0 1px 4px rgba(0,0,0,.12)}
.barry-battle-panel{margin:0;padding:18px 18px 18px 22px;border:1px solid #dac8a1;background:linear-gradient(135deg,#fffdf4,#f5ecfa)}
@media(max-width:980px){.resource-row{grid-template-columns:repeat(2,minmax(0,1fr))}.resource:last-child{grid-column:1/-1}}
@media(max-width:520px){.battle-dashboard-panel{padding:16px 16px 16px 20px}.resource-row{grid-template-columns:1fr}.resource:last-child{grid-column:auto}.battle-section-heading,.battle-title-row{align-items:stretch;flex-direction:column}.token-chip,.chaos-orb{align-self:flex-start}}


/* v0.6.3 token purse and exchange */
.token-purse{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;min-width:min(100%,520px)}
.token-purse.is-compact{grid-template-columns:repeat(4,minmax(0,1fr));min-width:0}
.purse-token{display:flex;align-items:center;gap:9px;padding:10px 11px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(145deg,#fff,#f3edf6);box-shadow:inset 0 1px 0 #fff,0 4px 10px rgba(52,27,68,.08)}
.purse-coin,.reward-coin{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-weight:900;font-size:1.1rem;color:#fff;border:2px solid rgba(255,255,255,.7);box-shadow:inset -3px -4px 7px rgba(0,0,0,.18),inset 3px 3px 6px rgba(255,255,255,.35),0 3px 7px rgba(52,27,68,.22)}
.purse-tame .purse-coin,.reward-tame .reward-coin{background:linear-gradient(145deg,#9b65c8,#56247f)}
.purse-insight .purse-coin,.reward-insight .reward-coin{background:linear-gradient(145deg,#6876d8,#303f9f)}
.purse-support .purse-coin,.reward-support .reward-coin{background:linear-gradient(145deg,#70bd89,#357d50)}
.purse-trade .purse-coin,.reward-trade .reward-coin{background:linear-gradient(145deg,#efb85c,#b5731e)}
.purse-copy{display:grid;line-height:1.05}.purse-copy small{font-size:.7rem;color:var(--muted);font-weight:800}.purse-copy strong{font-size:1.25rem;color:var(--ink)}
.purse-panel-heading,.trade-header,.market-heading,.home-purse{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.purse-panel-heading h3,.trade-header h2,.market-heading h2,.home-purse h2{margin:.15rem 0}.purse-help{margin:.8rem 0 0;color:var(--muted);font-size:.86rem}.purse-trade-link{white-space:nowrap}
.trade-hub .trade-header{margin-bottom:18px}.token-market{margin-top:18px}.market-note{align-self:center;background:#f0e8f4;padding:7px 11px;border-radius:999px;font-size:.8rem;font-weight:800;color:var(--purple)}
.market-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin:18px 0}.market-card{display:flex;flex-direction:column;justify-content:space-between;gap:14px;border:1px solid var(--line);border-left:4px solid var(--purple);border-radius:16px;padding:15px;background:linear-gradient(145deg,#fff,#faf6fb);box-shadow:0 5px 14px rgba(52,27,68,.07)}.market-card h3{margin:.25rem 0}.market-card p{margin:.35rem 0;color:var(--muted);font-size:.9rem}.market-type{font-size:.72rem;text-transform:uppercase;letter-spacing:.1em;color:var(--purple);font-weight:900}.market-cost{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.mini-token{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:5px 8px;font-size:.72rem;font-weight:900;background:#eee6f2}.mini-tame{background:#eee2f7}.mini-insight{background:#e6e8fb}.mini-support{background:#e5f4ea}.mini-trade{background:#faefd9}
.token-reward-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.reward-token{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:999px;padding:6px 10px;background:#fff}.reward-coin{width:25px;height:25px;font-size:.8rem}.reward-heading{display:block;margin-top:12px;color:var(--purple)}
.home-purse{align-items:center}.home-purse .token-purse{max-width:570px;flex:1}
@media(max-width:760px){.trade-header,.market-heading,.home-purse,.purse-panel-heading{flex-direction:column}.token-purse,.token-purse.is-compact{grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.purse-trade-link{white-space:normal}}
@media(max-width:420px){.token-purse,.token-purse.is-compact{grid-template-columns:1fr}.purse-token{padding:8px 10px}}


/* v0.6.5 profile cards, battle spacing and Trading Post polish */
.monster-profile-card{margin:0;padding:18px;overflow:hidden}
.profile-card-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:12px}
.profile-card-heading h2{margin:.12rem 0 0}.profile-card-heading p{margin:0}
.profile-zoom-hint{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:#eee6f2;color:var(--purple);font-size:.76rem;font-weight:800;white-space:nowrap}
.profile-card-visual{width:100%;border-radius:18px;background:linear-gradient(145deg,#2b2033,#171219);padding:10px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.profile-card-visual img{display:block;width:100%;height:auto;max-height:none;object-fit:contain;border-radius:12px;cursor:zoom-in}
.profile-enter-battle{display:block;margin:14px auto 0;min-width:min(100%,280px)}
.profile-card-placeholder{aspect-ratio:3/2;min-height:230px;display:grid;place-items:center;align-content:center;gap:9px;text-align:center;padding:28px;border-radius:14px;background:radial-gradient(circle at 30% 20%,rgba(142,96,174,.36),transparent 36%),linear-gradient(145deg,#2b2033,#171219);color:#fff;border:2px dashed rgba(255,255,255,.34)}
.profile-card-placeholder strong{font-size:clamp(1.35rem,4vw,2.1rem)}.profile-card-placeholder small{opacity:.78}.profile-card-placeholder.neutral{min-height:270px}
.profile-placeholder-badge{padding:5px 9px;border-radius:999px;background:#6b3296;color:#fff;font-size:.72rem;font-weight:900;letter-spacing:.08em}

/* Give the left battle card the same comfortable inset as the dashboard panels. */
.battle-dashboard>.battle-monster-card{padding:16px 16px 18px;border-radius:22px}
.battle-dashboard>.battle-monster-card .monster-battle-art{margin:0 0 14px;border-radius:16px}
.battle-dashboard>.battle-monster-card .battle-monster-status{padding:4px 4px 2px}
.battle-dashboard>.battle-monster-card .battle-monster-status>p{margin:.65rem 0 0;line-height:1.55}
.battle-dashboard>.battle-monster-card .battle-title-row{gap:14px}

/* Battle state: intentionally two rows so values never collide. */
.resources-panel .resource-row{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.resources-panel .resource:nth-child(-n+3){grid-column:span 2}
.resources-panel .resource:nth-child(n+4){grid-column:span 3}
.resources-panel .resource{min-width:0}
.resources-panel .resource span:not(.resource-icon){overflow:hidden;text-overflow:ellipsis}
@media(max-width:680px){.resources-panel .resource-row{grid-template-columns:repeat(2,minmax(0,1fr))}.resources-panel .resource:nth-child(n){grid-column:auto}.resources-panel .resource:last-child{grid-column:1/-1}}
@media(max-width:430px){.resources-panel .resource-row{grid-template-columns:1fr}.resources-panel .resource:last-child{grid-column:auto}}

/* Trading Post selectors */
.trade-row{grid-template-columns:minmax(0,1fr) 56px minmax(0,1fr);gap:18px;align-items:end;margin:18px 0 10px}
.trade-select-field{display:grid;gap:8px;min-width:0;font-weight:800;color:var(--ink)}
.trade-select-label{font-size:.82rem;text-transform:uppercase;letter-spacing:.075em;color:var(--purple)}
.trade-select-wrap{position:relative;display:block}
.trade-select-wrap::after{content:"⌄";position:absolute;right:14px;top:50%;transform:translateY(-54%);pointer-events:none;color:var(--purple);font-size:1.25rem;font-weight:900;line-height:1}
.trade-select-wrap select{appearance:none;-webkit-appearance:none;width:100%;min-height:52px;padding:12px 44px 12px 14px;border:1px solid #cbb9d3;border-radius:14px;background:linear-gradient(145deg,#fff,#f6f0f8);color:var(--ink);font:inherit;font-weight:700;box-shadow:inset 0 1px 0 #fff,0 4px 12px rgba(52,27,68,.07);cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.trade-select-wrap select:hover{border-color:#9d7caf;box-shadow:inset 0 1px 0 #fff,0 6px 15px rgba(52,27,68,.10)}
.trade-select-wrap select:focus{outline:none;border-color:var(--purple);box-shadow:0 0 0 4px rgba(91,42,134,.13),0 6px 15px rgba(52,27,68,.10)}
.trade-select-wrap select:disabled{cursor:not-allowed;opacity:.62;background:#f1edf3}
.trade-arrow{display:grid;place-items:center;width:50px;height:50px;align-self:end;margin:0 auto 1px;border-radius:50%;background:linear-gradient(145deg,#6c3691,#4c2268);color:#fff;font-size:1.4rem;font-weight:900;box-shadow:inset 2px 2px 4px rgba(255,255,255,.18),0 5px 12px rgba(52,27,68,.18)}
.trade-submit{margin:16px 0 12px}.trade-submit button{min-width:190px}
@media(max-width:780px){.trade-row{grid-template-columns:1fr;gap:12px}.trade-arrow{transform:rotate(90deg);width:42px;height:42px;margin:0 auto}.trade-submit{text-align:center}}

/* v0.6.6 readable profile-card zoom viewer */
.lightbox-card{width:min(1380px,98vw);max-height:96vh;overflow:hidden;padding:16px;display:flex;flex-direction:column}
.lightbox-toolbar{display:flex;align-items:center;justify-content:center;gap:8px;padding:2px 48px 10px;flex:0 0 auto}
.lightbox-toolbar button{min-width:42px;padding:8px 12px;border-radius:12px}
.lightbox-toolbar #lightboxZoomReset{min-width:92px}
#lightboxZoomValue{min-width:58px;text-align:center;font-weight:900;color:#fff}
.lightbox-viewport{width:100%;height:min(78vh,900px);overflow:auto;overscroll-behavior:contain;border-radius:14px;background:#151018;display:block;scrollbar-gutter:stable both-edges}
.lightbox-card .lightbox-viewport img{display:block;width:100%;max-width:100%;height:auto;max-height:none;object-fit:contain;border-radius:10px;margin:0 auto;transform-origin:top left}
.lightbox-card p{flex:0 0 auto;margin:.6rem 2.5rem 0}
@media(max-width:720px){.lightbox-card{width:98vw;padding:10px}.lightbox-viewport{height:76vh}.lightbox-toolbar{padding-right:42px;gap:5px}.lightbox-toolbar button{padding:7px 9px}.lightbox-card p{margin:.45rem .5rem 0;font-size:.82rem}}

/* v0.6.7 album seam cleanup, fitted card viewer and encounter carousel */
.album-slider-viewport{padding:12px 0;overflow:hidden}
.album-slider-track{gap:0}
.album-slide{border-radius:0;box-shadow:none;padding:20px 18px;overflow:hidden}
.album-slide .card-grid{width:100%;min-width:0}
.album-slide .game-card{min-width:0;overflow:hidden}
.album-slide .full-card-art,.album-slide .full-card-art img{max-width:100%}

/* Full card pop-ups fit the viewer at rest; scrolling is only introduced after zooming. */
.lightbox-viewport{height:min(78vh,900px);overflow:hidden;display:flex;align-items:center;justify-content:center;scrollbar-gutter:auto}
.lightbox-card .lightbox-viewport img{width:auto;max-width:100%;max-height:100%;height:auto;margin:auto;transform-origin:top left}
.lightbox-viewport.is-zoomed{overflow:auto;display:block;scrollbar-gutter:stable both-edges}
.lightbox-viewport.is-zoomed img{margin:0 auto;max-height:none}

/* Keep adjacent album slides visually independent, including Allies. */
.album-slide[role="tabpanel"]{border-left:0;border-right:0}
.album-slide .ally-image-card{margin-left:0;margin-right:0}

/* Encounter carousel + equal-height battle prep columns */
.battle-intro-grid{align-items:stretch}
.battle-guide-stack{height:100%;grid-template-rows:auto 1fr}
.monster-profile-card{height:100%;display:flex;flex-direction:column}
.monster-profile-card .profile-card-visual{flex:1 1 auto;display:flex;align-items:center;justify-content:center}
.monster-profile-card .profile-enter-battle{margin-top:14px}
.encounter-picker{height:100%;display:flex;flex-direction:column;margin:0}
.encounter-picker-head{flex:0 0 auto}
.encounter-carousel{flex:1 1 auto;display:flex;flex-direction:column;justify-content:space-between;gap:14px;margin-top:14px}
.encounter-carousel-viewport{overflow:hidden;border-radius:18px;background:linear-gradient(145deg,#f8f3fa,#eee6f2);border:1px solid var(--line);padding:12px}
.encounter-carousel-track{display:flex;width:100%;transition:transform .38s cubic-bezier(.22,.75,.25,1);will-change:transform}
.encounter-slide{flex:0 0 100%;min-width:0;padding:2px;display:flex;align-items:center;justify-content:center}
.encounter-choice{width:min(100%,430px);min-height:190px;grid-template-columns:minmax(110px,150px) 1fr;gap:18px;padding:14px 16px;border-radius:18px;background:#fff;box-shadow:0 8px 20px rgba(52,27,68,.08);border:2px solid transparent}
.encounter-choice:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(52,27,68,.12)}
.encounter-choice.primary{border-color:var(--purple)}
.encounter-choice img{width:100%;height:160px;object-fit:contain;border-radius:12px;background:#211a28}
.encounter-choice strong{font-size:1.08rem}
.encounter-carousel-controls{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center}
.encounter-carousel-controls button:disabled{opacity:.45;cursor:not-allowed}
.encounter-dots{display:flex;gap:7px;justify-content:center;align-items:center;flex-wrap:wrap}
.encounter-dot{width:10px;height:10px;min-width:10px;padding:0;border-radius:50%;background:#cbb9d3;box-shadow:none}
.encounter-dot.active{background:var(--purple);transform:scale(1.25)}
.accessibility-reduce-motion .encounter-carousel-track{transition:none!important}
@media(max-width:820px){.battle-guide-stack{grid-template-rows:auto auto}.monster-profile-card{height:auto}.encounter-picker{height:auto}.encounter-choice{grid-template-columns:96px 1fr;min-height:150px}.encounter-choice img{height:130px}}
@media(max-width:560px){.encounter-carousel-controls{grid-template-columns:1fr 1fr}.encounter-dots{grid-column:1/-1;grid-row:1}.encounter-choice{grid-template-columns:82px 1fr;gap:12px;padding:10px}.encounter-choice img{height:112px}.encounter-carousel-controls button{width:100%}}

/* v0.6.8 — normalize every monster album card to the same artwork footprint. */
.album-slide .monster-card .full-card-art{
  aspect-ratio:18 / 25;
  height:auto;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#211a28;
}
.album-slide .monster-card .full-card-art img{
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  object-position:center center;
  display:block;
}
.album-slide .monster-card{
  align-self:stretch;
}
.album-slide .monster-card .card-footer{
  margin-top:8px;
}


/* v0.6.9 — external Enemy Cards + dual Special Enemy Bosses */
.enemy-battle-hub{margin-top:24px}.enemy-hub-heading{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.enemy-progress{min-width:130px;text-align:center;padding:12px 16px;border-radius:16px;background:#f2eafa;border:1px solid #d4c0e8}.enemy-progress strong{display:block;font-size:1.8rem;color:#5b2a86}.enemy-progress span{font-size:.8rem}.enemy-card-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px;margin-top:18px}.enemy-encounter,.boss-encounter{background:#fffaf4;border:1px solid #d9c8ba;border-radius:18px;padding:12px;display:flex;flex-direction:column;gap:10px;box-shadow:0 8px 24px rgba(38,22,46,.08)}.enemy-encounter img,.boss-encounter img{width:100%;aspect-ratio:2/3;object-fit:contain;background:#17121b;border-radius:12px}.enemy-encounter.is-defeated{outline:2px solid #4e9f6f}.boss-zone{margin-top:28px;padding-top:20px;border-top:1px solid #dbcbdc}.boss-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.boss-encounter img{aspect-ratio:3/2;object-fit:contain}.locked-bosses{display:grid;grid-template-columns:1fr 1fr;gap:14px}.locked-bosses>div{min-height:120px;display:grid;place-items:center;border:2px dashed #8e77a1;border-radius:16px;background:#f2edf5;color:#5b2a86;font-weight:800}.locked-bosses p{grid-column:1/-1}.album-slide .game-card[data-rarity="Enemy"]{border-color:#b64232}.album-slide .game-card[data-rarity="Boss"]{border-color:#c69c2d;box-shadow:0 0 0 3px rgba(198,156,45,.18),0 10px 28px rgba(75,40,15,.18)}
@media(max-width:760px){.enemy-hub-heading{display:block}.enemy-progress{margin-top:12px}.boss-grid,.locked-bosses{grid-template-columns:1fr}}

/* v0.7.4 — Enemy Cards now mirror Monster collection behaviour. */
.enemy-encounter.is-uncollected{opacity:.72;background:#f4eff1}
.enemy-encounter.is-uncollected img{filter:grayscale(.72) brightness(.72)}
.enemy-encounter button:disabled{opacity:.6;cursor:not-allowed}
.enemy-progress strong+span+strong{margin-top:8px}


/* v0.7.5 — separate Internal / External battle routes */
.battle-mode-hub{padding:clamp(16px,3vw,28px)}
.battle-mode-heading{max-width:780px;margin-bottom:18px}
.battle-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.battle-mode-card{display:flex;flex-direction:column;gap:10px;min-height:260px}
.battle-mode-card .primary{margin-top:auto;align-self:flex-start}
.battle-mode-stat{display:flex;align-items:baseline;gap:10px;margin-top:8px}
.battle-mode-stat strong{font-size:2rem}
.battle-screen-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}
.battle-screen-heading>div{max-width:760px}
.arena-heading.internal-arena{border-color:rgba(133,104,255,.55)}
.arena-heading.external-arena{border-color:rgba(244,80,100,.6)}
@media (max-width:760px){.battle-mode-grid{grid-template-columns:1fr}.battle-screen-heading{align-items:flex-start;flex-direction:column}}

/* v0.7.7 — six-up collected Monster encounter carousel. */
.encounter-carousel-track{align-items:stretch}
.encounter-slide{flex:0 0 100%;width:100%;padding:2px;display:block}
.encounter-page{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,190px);gap:12px;width:100%}
.encounter-page .encounter-choice{width:100%;height:190px;min-height:190px;max-height:190px;grid-template-columns:1fr;grid-template-rows:112px minmax(0,1fr);gap:7px;padding:9px;border-radius:16px;overflow:hidden;align-content:start;text-align:left}
.encounter-page .encounter-choice img{width:100%;height:112px;min-height:112px;object-fit:contain;border-radius:10px;background:#211a28}
.encounter-page .encounter-choice span{display:grid;gap:1px;align-content:start;min-width:0}
.encounter-page .encounter-choice strong{font-size:.92rem;line-height:1.08;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.encounter-page .encounter-choice small{font-size:.72rem;line-height:1.15}
.encounter-empty-slot{border:2px dashed #c5b1cd!important;background:#f3edf6!important;box-shadow:none!important;color:#766480;cursor:default}
.encounter-empty-art{height:112px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(145deg,#e5d9eb,#f7f2f9);font-size:2.4rem;font-weight:900;color:#a58caf}
.encounter-empty-slot strong{color:#6d5876}
@media(max-width:1100px){.encounter-page{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,190px)}}
@media(max-width:560px){.encounter-page{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,190px);gap:8px}.encounter-page .encounter-choice{height:190px;min-height:190px;max-height:190px;grid-template-columns:1fr;grid-template-rows:112px minmax(0,1fr);gap:7px;padding:8px}.encounter-page .encounter-choice img{height:112px;min-height:112px}.encounter-empty-art{height:112px}}

/* v0.7.9 — consistent Enemy Card alignment + battle priority stack. */
.enemy-card-strip{align-items:stretch}
.enemy-encounter{height:100%;min-height:0}
.enemy-encounter>img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:2 / 3;
  object-fit:contain;
  object-position:center center;
  flex:0 0 auto;
}
.enemy-encounter>div{
  display:grid;
  grid-template-rows:minmax(2.55em,auto) minmax(3.05em,auto) auto;
  align-content:start;
  gap:8px;
  flex:1 1 auto;
}
.enemy-encounter h3{
  margin:0;
  min-height:2.55em;
  line-height:1.22;
  display:flex;
  align-items:flex-start;
}
.enemy-encounter p{
  margin:0;
  min-height:3.05em;
  line-height:1.35;
}
.enemy-encounter button{align-self:end;width:100%;margin-top:auto}

/* Tokens lead the control column. Battle State sits immediately above Battle Arena Actions. */
.battle-purse-top{order:0}
.battle-state-actions{order:1;display:grid;gap:12px;min-width:0}
.battle-state-actions .resources-panel,
.battle-state-actions .action-panel{margin:0}
.battle-state-actions .resources-panel{padding-top:14px;padding-bottom:14px}
.battle-state-actions .action-panel{padding-top:16px}
.battle-state-actions .hand{margin:10px 0;gap:10px}
.battle-state-actions .hand-card{padding:11px 12px}
.battle-state-actions .hand-card p{margin:.4rem 0 0;font-size:.86rem;line-height:1.35}
.battle-control-stack>.barry-battle-panel{order:2}
.battle-control-stack>.log-panel{order:3}
@media(min-width:821px){
  .battle-state-actions{position:relative}
  .battle-purse-top .token-purse.is-compact{gap:8px}
  .battle-purse-top{padding-top:14px;padding-bottom:14px}
}

/* v0.8.0 — encounter selectors use stacked list cards rather than grids. */
.encounter-page{
  display:flex;
  flex-direction:column;
  gap:10px;
  width:100%;
}
.encounter-page .encounter-choice{
  width:100%;
  height:190px;
  min-height:190px;
  max-height:190px;
  grid-template-columns:minmax(110px,150px) minmax(0,1fr);
  grid-template-rows:1fr;
  gap:14px;
  padding:12px 14px;
  align-items:center;
  text-align:left;
}
.encounter-page .encounter-choice img{
  width:100%;
  height:160px;
  min-height:160px;
  object-fit:contain;
}
.encounter-page .encounter-choice span{align-content:center}
.encounter-page .encounter-choice strong{font-size:1rem;line-height:1.2}
.encounter-empty-art{width:100%;height:160px}
@media(max-width:560px){
  .encounter-page{gap:8px}
  .encounter-page .encounter-choice{
    height:170px;
    min-height:170px;
    max-height:170px;
    grid-template-columns:92px minmax(0,1fr);
    grid-template-rows:1fr;
    gap:10px;
  }
  .encounter-page .encounter-choice img,.encounter-empty-art{height:142px;min-height:142px}
}

.enemy-card-strip{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:18px;
}
.enemy-encounter{
  width:100%;
  min-height:260px;
  height:auto;
  display:grid;
  grid-template-columns:160px minmax(0,1fr);
  align-items:stretch;
  gap:16px;
  padding:12px;
}
.enemy-encounter>img{
  width:160px;
  height:240px;
  aspect-ratio:2 / 3;
  object-fit:contain;
  object-position:center center;
  align-self:center;
}
.enemy-encounter>div{
  display:grid;
  grid-template-rows:auto auto 1fr;
  align-content:center;
  gap:8px;
  min-width:0;
}
.enemy-encounter h3{min-height:0;align-items:center;font-size:1.18rem}
.enemy-encounter p{min-height:0}
.enemy-encounter button{width:min(220px,100%);margin-top:8px;align-self:end}
@media(max-width:560px){
  .enemy-encounter{grid-template-columns:105px minmax(0,1fr);min-height:190px;gap:10px;padding:10px}
  .enemy-encounter>img{width:105px;height:158px}
  .enemy-encounter h3{font-size:1rem}
  .enemy-encounter p{font-size:.82rem}
}

/* v0.8.1 — reliable encounter carousel navigation. */
.encounter-carousel-viewport{touch-action:pan-y;outline-offset:4px}
.encounter-carousel-nav{display:grid;gap:8px;min-width:0}
.encounter-slider-label{display:grid;grid-template-columns:auto minmax(100px,1fr) auto;align-items:center;gap:8px;font-size:.78rem;font-weight:700;color:var(--muted)}
.encounter-slider-label input[type="range"]{width:100%;min-width:0;accent-color:var(--purple)}
.encounter-slider-label output{font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink)}
@media(max-width:560px){.encounter-carousel-nav{grid-column:1/-1;grid-row:1}.encounter-slider-label{grid-template-columns:1fr auto}.encounter-slider-label span{grid-column:1/-1}.encounter-slider-label input[type="range"]{grid-column:1}.encounter-slider-label output{grid-column:2}}


/* v0.8.2 — restore selected Monster profiles and lock encounter/profile bottom alignment. */
.battle-intro-grid{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(300px,.95fr);
  grid-template-rows:auto minmax(0,1fr);
  grid-template-areas:
    "guide picker"
    "profile picker";
  gap:16px;
  align-items:stretch;
}
.battle-intro-grid>.how-to-battle-card{grid-area:guide;align-self:start}
.battle-intro-grid>.monster-profile-card{grid-area:profile;align-self:stretch;height:auto;min-height:0}
.battle-intro-grid>.encounter-picker{grid-area:picker;align-self:stretch;height:auto;min-height:0;margin:0}
.monster-profile-card .profile-card-visual.has-profile{
  flex:0 0 auto;
  aspect-ratio:3 / 2;
  min-height:0;
}
.monster-profile-card .profile-card-visual.has-profile img{
  width:100%;
  height:100%;
  max-height:100%;
  object-fit:contain;
}
.monster-profile-card .profile-enter-battle{margin-top:14px}
@media(max-width:820px){
  .battle-intro-grid{
    grid-template-columns:1fr;
    grid-template-rows:auto auto auto;
    grid-template-areas:"guide" "profile" "picker";
  }
  .battle-intro-grid>.monster-profile-card,.battle-intro-grid>.encounter-picker{height:auto}
}

/* v0.8.3 — battle actions are collected Supports, Adjustments, Allies and Powers. */
.battle-state-actions .hand{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:12px;
  align-items:stretch;
}
.battle-state-actions .hand-card.battle-action-card{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:9px;
  min-height:270px;
  border-left:1px solid var(--line);
  overflow:hidden;
  text-align:left;
}
.battle-action-art{
  display:block;
  width:100%;
  aspect-ratio:2 / 3;
  max-height:205px;
  border-radius:11px;
  overflow:hidden;
  background:#eee6f2;
  border:1px solid var(--line);
}
.battle-action-art>img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  background:#f7f2f9;
}
.battle-action-placeholder{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:12px;
  text-align:center;
  background:linear-gradient(145deg,#f5eef8,#e9deef);
  color:var(--ink);
}
.battle-action-placeholder>span{
  font-size:.72rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--purple);
}
.battle-action-placeholder>strong{font-size:.92rem;line-height:1.2}
.battle-action-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.battle-action-copy>strong{font-size:.9rem;line-height:1.2}
.battle-action-meta{display:flex;justify-content:space-between;gap:6px;align-items:center;font-size:.69rem;font-weight:800;color:var(--muted)}
.battle-action-card:disabled{opacity:.58;cursor:not-allowed}
.battle-action-empty{grid-column:1/-1;display:flex;flex-direction:column;gap:4px}
@media(max-width:780px){
  .battle-state-actions .hand{grid-template-columns:repeat(2,minmax(0,1fr))}
  .battle-state-actions .hand-card.battle-action-card{min-height:240px}
}
@media(max-width:430px){
  .battle-state-actions .hand{grid-template-columns:1fr 1fr}
  .battle-action-art{max-height:180px}
}


/* v0.8.4 — compact selectable encounter carousel; range slider removed. */
.encounter-carousel{gap:10px;margin-top:10px}
.encounter-carousel-viewport{padding:9px;touch-action:auto}
.encounter-page{gap:7px}
.encounter-page .encounter-choice{
  height:92px;
  min-height:92px;
  max-height:92px;
  grid-template-columns:72px minmax(0,1fr);
  gap:10px;
  padding:7px 10px;
  cursor:pointer;
}
.encounter-page .encounter-choice img,
.encounter-empty-art{
  width:72px;
  height:76px;
  min-height:76px;
  object-fit:contain;
}
.encounter-page .encounter-choice span{gap:2px;align-content:center}
.encounter-page .encounter-choice strong{font-size:.92rem;line-height:1.12}
.encounter-page .encounter-choice small{font-size:.71rem;line-height:1.15}
.encounter-carousel-controls{gap:8px}
.encounter-carousel-nav{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
.encounter-page-status{font-size:.72rem;font-weight:800;color:var(--muted);white-space:nowrap}
.encounter-slider-label{display:none!important}
@media(max-width:820px){
  .encounter-page .encounter-choice{height:88px;min-height:88px;max-height:88px;grid-template-columns:68px minmax(0,1fr)}
  .encounter-page .encounter-choice img,.encounter-empty-art{width:68px;height:72px;min-height:72px}
}
@media(max-width:560px){
  .encounter-page{gap:6px}
  .encounter-page .encounter-choice{height:82px;min-height:82px;max-height:82px;grid-template-columns:60px minmax(0,1fr);gap:8px;padding:6px 8px}
  .encounter-page .encounter-choice img,.encounter-empty-art{width:60px;height:68px;min-height:68px}
  .encounter-carousel-controls{grid-template-columns:1fr 1fr}
  .encounter-carousel-nav{grid-column:1/-1;grid-row:1}
}

/* v0.8.5 — Enemy grid restored; Enemy and Ally card geometry normalised. */
.enemy-card-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  align-items:stretch;
  margin-top:18px;
}
.enemy-encounter{
  width:100%;
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px;
  align-items:stretch;
}
.enemy-encounter>img{
  width:100%;
  height:auto;
  aspect-ratio:2 / 3;
  object-fit:contain;
  object-position:center center;
  align-self:stretch;
  flex:0 0 auto;
  background:#17121b;
}
.enemy-encounter>div{
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1 1 auto;
  min-width:0;
}
.enemy-encounter h3{
  margin:0;
  min-height:2.55em;
  line-height:1.22;
  display:flex;
  align-items:flex-start;
  font-size:1.08rem;
}
.enemy-encounter p{
  margin:0;
  min-height:3.05em;
  line-height:1.35;
}
.enemy-encounter button{
  width:100%;
  margin-top:auto;
  align-self:stretch;
}
@media(max-width:1000px){.enemy-card-strip{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.enemy-card-strip{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:460px){.enemy-card-strip{grid-template-columns:1fr}}

/* Album cards: Enemy and Ally rows share a common outer height and baseline. */
.album-slide .card-grid{align-items:stretch;grid-auto-rows:1fr}
.album-slide .game-card[data-rarity="Enemy"],
.album-slide .ally-image-card{
  height:100%;
  min-height:470px;
  align-self:stretch;
}
.album-slide .ally-image-card{
  display:flex;
  flex-direction:column;
}
.album-slide .ally-image-card .ally-art-frame{
  height:250px;
  aspect-ratio:auto;
  flex:0 0 250px;
  margin:8px 0;
}
.album-slide .ally-image-card .ally-art-frame img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center center;
}
.album-slide .ally-image-card .card-name{
  min-height:2.5em;
  line-height:1.2;
  display:flex;
  align-items:flex-start;
}
.album-slide .ally-image-card .card-subtitle{
  min-height:2.8em;
}
.album-slide .ally-image-card .card-effect{
  flex:1 1 auto;
}
.album-slide .ally-image-card .card-footer{
  margin-top:auto;
}
.album-slide .game-card[data-rarity="Enemy"]{
  display:flex;
  flex-direction:column;
}
.album-slide .game-card[data-rarity="Enemy"] .full-card-art{
  flex:1 1 auto;
  min-height:0;
  aspect-ratio:auto;
}
.album-slide .game-card[data-rarity="Enemy"] .full-card-art img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center center;
}
.album-slide .game-card[data-rarity="Enemy"] .card-footer{
  margin-top:auto;
}
@media(max-width:430px){
  .album-slide .game-card[data-rarity="Enemy"],
  .album-slide .ally-image-card{min-height:430px}
  .album-slide .ally-image-card .ally-art-frame{height:220px;flex-basis:220px}
}

/* v0.8.6 — larger pack cards, fuller monster profiles and card-sized zoom viewer. */
#reveal.card-grid{
  grid-template-columns:repeat(auto-fit,minmax(270px,320px));
  justify-content:center;
  align-items:stretch;
  gap:20px;
}
#reveal .game-card{
  width:100%;
  min-height:470px;
  height:100%;
  align-self:stretch;
}
#reveal .game-card .art-frame:not(.full-card-art){
  height:auto;
  aspect-ratio:18 / 25;
  display:flex;
  align-items:center;
  justify-content:center;
}
#reveal .game-card .art-frame:not(.full-card-art) img,
#reveal .game-card .art-frame:not(.full-card-art) svg{
  width:100%;
  height:100%;
  object-fit:contain;
}
#reveal .full-image-card,
#reveal .monster-card{
  min-height:470px;
}
#reveal .full-image-card .full-card-art,
#reveal .monster-card .full-card-art{
  width:100%;
  aspect-ratio:18 / 25;
  flex:1 1 auto;
  min-height:0;
}
#reveal .full-image-card .full-card-art img,
#reveal .monster-card .full-card-art img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
}
@media(max-width:720px){#reveal.card-grid{grid-template-columns:minmax(260px,340px)}}

.monster-profile-card .profile-card-visual.has-profile{
  aspect-ratio:3 / 2;
  padding:3px;
  min-height:320px;
  width:100%;
}
.monster-profile-card .profile-card-visual.has-profile img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  border-radius:14px;
}
@media(min-width:821px){.monster-profile-card .profile-card-visual.has-profile{min-height:360px}}

.game-card[data-card-lightbox="true"]{cursor:zoom-in}
.game-card[data-card-lightbox="true"]:focus{outline:3px solid var(--purple);outline-offset:3px}
.lightbox-card{
  width:auto;
  max-width:calc(100vw - 24px);
  max-height:calc(100vh - 24px);
  padding:14px;
  overflow:hidden;
}
.lightbox-toolbar{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  margin:0 44px 10px 0;
}
.lightbox-toolbar button{padding:8px 12px}
.lightbox-toolbar span{min-width:58px;text-align:center;font-weight:800}
.lightbox-viewport{
  max-width:92vw;
  max-height:78vh;
  overflow:auto;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:4px;
  border-radius:14px;
  background:#171219;
}
.lightbox-viewport img{
  display:block;
  width:auto;
  height:auto;
  max-width:88vw;
  max-height:76vh;
  object-fit:contain;
  border-radius:12px;
  transform-origin:top center;
}
.lightbox-card-clone{
  width:min(420px,84vw);
  max-width:none;
  margin:0 auto;
  transform-origin:top center;
}
.lightbox-card-clone .game-card{width:100%;height:auto;min-height:0;cursor:default}
.lightbox-viewport.is-zoomed{justify-content:flex-start}
.lightbox-card p{margin:.6rem .5rem 0;text-align:center}
@media(max-width:560px){.lightbox-card{padding:10px}.lightbox-toolbar{margin-right:38px}.lightbox-viewport{max-width:94vw;max-height:76vh}}


/* v0.8.7 — start-page hero placeholder and quick-start guide. */
.home-hero-placeholder{margin:14px 0;background:rgba(255,255,255,.96);border-radius:22px;padding:14px;box-shadow:var(--shadow)}
.home-hero-placeholder-inner{min-height:250px;aspect-ratio:16/6;display:flex;align-items:center;justify-content:center;gap:22px;text-align:left;border:2px dashed #c7b3d2;border-radius:16px;background:linear-gradient(135deg,#f7f0fa,#eef5f0);padding:28px}
.home-hero-placeholder-inner h2,.home-hero-placeholder-inner p{margin:.25rem 0}
.home-hero-icon{display:grid;place-items:center;flex:0 0 86px;width:86px;height:86px;border:2px solid var(--purple);border-radius:22px;color:var(--purple);font-size:3rem;background:#fff}
.home-howto{padding:22px}
.home-howto-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}
.home-howto-heading h2{margin:.15rem 0}
.home-howto-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.home-howto-step{display:grid;grid-template-columns:44px 1fr;gap:12px;align-items:start;border:1px solid var(--line);border-radius:16px;background:#fbf8fc;padding:14px;min-height:126px}
.home-howto-step>span{display:grid;place-items:center;width:40px;height:40px;border-radius:999px;background:var(--purple);color:#fff;font-weight:800;font-size:1.05rem}
.home-howto-step h3{margin:.1rem 0 .3rem;font-size:1.02rem}
.home-howto-step p{margin:0;color:var(--muted);font-size:.92rem}
@media(max-width:720px){.home-howto-heading{flex-direction:column}.home-howto-grid{grid-template-columns:1fr}.home-hero-placeholder-inner{aspect-ratio:auto;min-height:220px;flex-direction:column;text-align:center}.home-hero-icon{flex-basis:72px;width:72px;height:72px}}

/* v0.9.0 enemy expansion */
.enemy-encounter-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto}
.enemy-encounter-actions button{flex:1 1 120px;margin-top:0!important;width:auto!important}
.album-slide .game-card[data-rarity="Special Enemy"]{border-color:#7b2f92;box-shadow:0 0 0 3px rgba(123,47,146,.14),0 10px 28px rgba(55,24,67,.15)}
.boss-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.boss-encounter img{aspect-ratio:2/3;object-fit:contain}
@media(max-width:760px){.boss-grid{grid-template-columns:1fr}}

/* v1.1.0 support/sprite deck */
.card-profile-btn{margin-top:10px;width:100%}.card-linked-sprite{margin:.55rem 0;font-size:.82rem;font-weight:800;color:var(--purple);background:#f3eaf7;border-radius:10px;padding:7px 9px}.sprite-link{display:block;margin-top:7px;font-size:.72rem;font-weight:900;color:var(--muted)}.sprite-link.is-active{color:#2f7648}.battle-action-support-sprite,.battle-action-leader-support{border-left:4px solid var(--green)}


/* v1.3 earned attack + Fatality layer */
.game-card[data-rarity="Earned"] .card-rarity{font-weight:800;letter-spacing:.04em}
.game-card[data-rarity="Fatality"]{box-shadow:0 0 0 2px rgba(20,20,20,.5),0 10px 28px rgba(0,0,0,.22)}
.earned-card-toast{position:fixed;right:22px;bottom:22px;z-index:1200;display:flex;flex-direction:column;gap:3px;max-width:min(360px,calc(100vw - 44px));padding:14px 18px;border-radius:16px;background:#17151b;color:#fff;box-shadow:0 14px 45px rgba(0,0,0,.32);border:2px solid rgba(255,255,255,.7)}
.earned-card-toast[hidden],.fatality-flash[hidden]{display:none!important}
.earned-card-toast strong{font-size:1rem}.earned-card-toast span{font-size:.9rem;opacity:.9}
.fatality-flash{position:fixed;inset:0;z-index:1000000;display:grid;place-items:center;background:rgba(5,5,8,.78);pointer-events:none;text-align:center;overflow:hidden}
.fatality-flash-inner{display:flex;flex-direction:column;gap:.25em;align-items:center;justify-content:center;padding:28px 34px;text-transform:uppercase;filter:drop-shadow(0 8px 18px rgba(0,0,0,.8))}
.fatality-flash-inner span{font-size:clamp(3.5rem,13vw,10rem);line-height:.8;font-weight:1000;letter-spacing:.055em;color:#f4f0e6;text-shadow:0 0 8px #fff,3px 3px 0 #231f2a,-3px -3px 0 #231f2a}
.fatality-flash-inner strong{font-size:clamp(1rem,3vw,2rem);color:#fff;letter-spacing:.09em}
.fatality-flash.is-live{animation:fatality-screen-flash .18s steps(2,end) 4 alternate}
.fatality-flash.is-live .fatality-flash-inner{animation:fatality-slam 1.1s cubic-bezier(.2,.9,.2,1) both}
@keyframes fatality-screen-flash{from{background:rgba(5,5,8,.9)}to{background:rgba(70,10,20,.72)}}
@keyframes fatality-slam{0%{transform:scale(2.2) rotate(-2deg);opacity:0}24%{transform:scale(.94) rotate(1deg);opacity:1}40%{transform:scale(1.03)}100%{transform:scale(1);opacity:1}}
@media (prefers-reduced-motion:reduce){.fatality-flash.is-live,.fatality-flash.is-live .fatality-flash-inner{animation:none!important}}

/* v1.4 collectible set album */
.collectible-set-grid{display:grid;gap:22px}.collectible-set-group{padding:16px;border:1px solid rgba(91,65,128,.28);border-radius:18px;background:rgba(255,255,255,.82)}.collectible-set-group.special-set{background:linear-gradient(135deg,rgba(235,225,255,.9),rgba(255,242,220,.9))}.collectible-set-group.is-complete{box-shadow:0 0 0 2px rgba(102,70,150,.18)}.collectible-set-heading{display:flex;justify-content:space-between;gap:12px;align-items:end;margin-bottom:12px}.collectible-set-heading h4{margin:.1rem 0;font-size:1.25rem}.collectible-set-heading p{margin:.15rem 0}.collectible-set-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.collectible-set-cards .game-card{min-width:0}.collectible-set-cards .art-frame img{width:100%;height:auto;object-fit:contain}.full-image-card .art-frame img{object-fit:contain}@media(max-width:1000px){.collectible-set-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.collectible-set-cards{grid-template-columns:1fr}}


/* v1.4.2 album and progression corrections */
/* Premium cards reveal no artwork silhouette until genuinely collected. */
.game-card.secure-locked-card{filter:none!important;opacity:1!important;background:linear-gradient(180deg,#fff,#f7f2fb);border-color:#7b5aa6}
.game-card.secure-locked-card .full-card-art{background:transparent!important;aspect-ratio:2/3;display:grid;place-items:center;overflow:visible}
.premium-card-lock{width:100%;height:100%;min-height:250px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border-radius:18px;background:linear-gradient(145deg,#f8e7ff,#e7f7ef 34%,#fff0cf 68%,#f8dbea);border:3px solid transparent;background-image:linear-gradient(145deg,#f9f1ff,#fff8ed),linear-gradient(135deg,#7143a0,#56a36f,#df4f87,#e0ad3b);background-origin:border-box;background-clip:padding-box,border-box;box-shadow:inset 0 0 30px rgba(105,67,151,.09)}
.premium-lock-icon{font-size:clamp(3.8rem,8vw,6rem);line-height:1;filter:saturate(1.35) drop-shadow(0 5px 8px rgba(65,36,91,.18))}
.premium-card-lock strong{font-size:1.05rem;letter-spacing:.14em;color:#5d3485}.premium-card-lock small{font-weight:700;color:#6f6674;text-align:center;padding:0 12px}

/* Enemy album artwork is a true 2:3 card: no letterbox strips. */
.album-slide .enemy-album-card{display:flex;flex-direction:column;height:auto;min-height:0}
.album-slide .enemy-album-card .full-card-art{flex:0 0 auto!important;width:100%;height:auto!important;aspect-ratio:2 / 3!important;background:transparent!important;margin:8px 0;overflow:hidden}
.album-slide .enemy-album-card .full-card-art img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;display:block}
.album-slide .enemy-album-card .card-footer{margin-top:auto}

/* Collectibles: two complete sets across, with each four-card set using a 2x2 card grid. */
.collectible-set-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.collectible-set-group{min-width:0}
.collectible-set-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px}
.collectible-set-cards .game-card{min-height:0;height:auto}
.collectible-set-cards .full-card-art{aspect-ratio:1/1!important;height:auto!important;background:transparent!important}
.collectible-set-cards .full-card-art img{width:100%!important;height:100%!important;object-fit:contain!important}
@media(max-width:850px){.collectible-set-grid{grid-template-columns:1fr}}
@media(max-width:520px){.collectible-set-cards{grid-template-columns:1fr!important}}


/* v1.4.3 — dedicated battle arenas and matched Monster/Enemy encounter layouts */
.arena-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.arena-mode-grid .battle-mode-card{min-height:0;padding:16px}
.arena-hero-placeholder{aspect-ratio:16/7;width:100%;border:2px dashed rgba(91,42,134,.38);border-radius:16px;background:linear-gradient(135deg,rgba(103,63,147,.09),rgba(70,155,112,.10),rgba(225,73,143,.08));display:grid;place-items:center;align-content:center;gap:3px;text-align:center;color:#5b2a86;margin-bottom:4px;overflow:hidden}
.arena-hero-placeholder>span{font-size:1.75rem;line-height:1}.arena-hero-placeholder>strong{font-size:.9rem}.arena-hero-placeholder>small{font-size:.72rem;color:var(--muted)}
.battle-mode-card.is-locked{background:linear-gradient(145deg,rgba(247,244,249,.98),rgba(238,233,242,.98));border-style:dashed}.battle-mode-card.is-locked .arena-hero-placeholder{filter:saturate(.75);opacity:.78}.battle-mode-card.is-locked button{cursor:not-allowed}
.battle-mode-card.boss-mode.is-open{box-shadow:0 0 0 2px rgba(198,156,45,.22),var(--shadow)}
.monster-battle-hub .monster-card-strip{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.monster-encounter img{aspect-ratio:2/3;object-fit:contain;background:#17121b}
.monster-encounter.is-uncollected img,.enemy-encounter.is-uncollected img{filter:grayscale(1);opacity:.48}
.boss-arena-panel{margin-top:18px}.boss-arena-panel .boss-encounter.is-defeated{outline:2px solid #4e9f6f}
@media(max-width:760px){.arena-mode-grid{grid-template-columns:1fr}.arena-hero-placeholder{aspect-ratio:16/6}}

/* v1.4.6 — full-frame Enemy and Ally artwork in Discovery Packs and Album. */
/* Enemy cards use their native 2:3 frame rather than the generic monster reveal ratio. */
#reveal .enemy-album-card .full-card-art,
.album-slide .enemy-album-card .full-card-art{
  width:100%!important;
  height:auto!important;
  aspect-ratio:2 / 3!important;
  flex:0 0 auto!important;
  margin:0 0 8px!important;
  padding:0!important;
  background:transparent!important;
  overflow:hidden!important;
}
#reveal .enemy-album-card .full-card-art img,
.album-slide .enemy-album-card .full-card-art img{
  width:100%!important;
  height:100%!important;
  display:block!important;
  object-fit:cover!important;
  object-position:center!important;
}

/* Ally artwork is 1054 x 1492 (527:746). Keep the entire printed card at full width. */
#reveal .ally-image-card .ally-art-frame,
.album-slide .ally-image-card .ally-art-frame{
  width:100%!important;
  height:auto!important;
  aspect-ratio:527 / 746!important;
  flex:0 0 auto!important;
  margin:0 0 8px!important;
  padding:0!important;
  background:transparent!important;
  overflow:hidden!important;
}
#reveal .ally-image-card .ally-art-frame img,
.album-slide .ally-image-card .ally-art-frame img{
  width:100%!important;
  height:100%!important;
  display:block!important;
  object-fit:cover!important;
  object-position:center!important;
}

/* Do not force Enemy/Ally album cards taller than their artwork needs. */
.album-slide .enemy-album-card,
.album-slide .ally-image-card{
  height:auto!important;
  min-height:0!important;
  align-self:start!important;
}

/* v1.4.7 — native card proportions across Discovery Packs and Album */
/* Monsters already render at their natural artwork height. Enemies and Allies now do the same. */
#reveal .enemy-album-card .full-card-art,
.album-slide .enemy-album-card .full-card-art,
#reveal .ally-image-card .full-card-art,
.album-slide .ally-image-card .full-card-art,
#reveal .ally-image-card .ally-art-frame,
.album-slide .ally-image-card .ally-art-frame{
  width:100%!important;
  height:auto!important;
  aspect-ratio:auto!important;
  flex:0 0 auto!important;
  margin:0 0 8px!important;
  padding:0!important;
  background:transparent!important;
  overflow:hidden!important;
}
#reveal .enemy-album-card .full-card-art img,
.album-slide .enemy-album-card .full-card-art img,
#reveal .ally-image-card .full-card-art img,
.album-slide .ally-image-card .full-card-art img,
#reveal .ally-image-card .ally-art-frame img,
.album-slide .ally-image-card .ally-art-frame img{
  width:100%!important;
  height:auto!important;
  max-width:none!important;
  display:block!important;
  object-fit:contain!important;
  object-position:center!important;
}
#reveal .enemy-album-card,
#reveal .ally-image-card,
.album-slide .enemy-album-card,
.album-slide .ally-image-card{
  min-height:0!important;
  height:auto!important;
  align-self:start!important;
}

/* Collectible artwork is landscape. Show it at its native ratio, not inside portrait/square slots. */
.album-slide .collectible-set-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:22px!important;
  align-items:start!important;
}
.album-slide .collectible-set-group{
  min-width:0!important;
  padding:16px!important;
}
.album-slide .collectible-set-cards{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
}
.album-slide .collectible-set-cards .game-card{
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  padding:7px!important;
}
.album-slide .collectible-set-cards .full-card-art{
  width:100%!important;
  height:auto!important;
  aspect-ratio:auto!important;
  margin:0!important;
  background:transparent!important;
  overflow:hidden!important;
}
.album-slide .collectible-set-cards .full-card-art img{
  width:100%!important;
  height:auto!important;
  max-width:none!important;
  display:block!important;
  object-fit:contain!important;
  object-position:center!important;
}
.album-slide .collectible-set-cards .card-footer{
  margin-top:6px!important;
}
@media(max-width:900px){
  .album-slide .collectible-set-grid{grid-template-columns:1fr!important}
}
@media(max-width:560px){
  .album-slide .collectible-set-cards{grid-template-columns:1fr!important}
}

/* ===== Story Mode v1.5.0 ===== */
.story-hero{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr);gap:22px;align-items:stretch;margin-bottom:18px;background:#f8f4fb;border:1px solid #ded4e7;border-radius:24px;overflow:hidden}
.story-hero>img{width:100%;height:100%;min-height:360px;object-fit:cover;display:block}
.story-hero-copy{padding:24px;display:flex;flex-direction:column;justify-content:center;gap:10px}
.story-hero-copy h2{margin:0;font-size:clamp(2rem,4vw,3.4rem)}
.story-world-stats{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.story-world-stats span,.story-status{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;background:#eee6f4;font-size:.82rem;font-weight:800}
.story-map-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:20px}
.story-location-card{display:grid;grid-template-columns:auto 1fr;gap:14px;background:#fff;border:2px solid #ddd0e8;border-radius:20px;padding:18px;position:relative;align-items:start}.story-location-card>button{grid-column:1/-1}.story-location-number{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#5b2a86;color:#fff;font-weight:900;font-size:1.1rem}.story-location-card h3{margin:.15rem 0 .35rem}.story-location-card p{margin:.25rem 0 .75rem}.story-location-card.state-locked{filter:saturate(.35);opacity:.72}.story-location-card.state-completed{border-color:#6a9f77}.story-location-card.state-mastered{border-color:#8b5ab3;background:#fbf7ff}.story-location-card.secret-card{border-style:dashed}.story-location-card.state-hidden{opacity:.55}.story-location-card.state-hinted{border-color:#bb8bcf}
.story-capacities{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.story-capacities span{display:inline-flex;align-items:center;gap:3px;opacity:.28;filter:grayscale(1)}.story-capacities span.found{opacity:1;filter:none}.story-capacities small{font-size:.72rem}
.story-event-alert{display:flex;justify-content:space-between;gap:18px;align-items:center;border-left:6px solid #c74d8d}.story-event-alert h2{margin:.1rem 0}.story-event-alert p{margin:.25rem 0}
.story-completion{display:grid;grid-template-columns:minmax(260px,.9fr) 1fr;gap:18px;align-items:center}.story-completion img{width:100%;border-radius:16px}.story-completion h2{margin:.2rem 0}
.story-token-guide{margin-top:20px}.token-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.token-guide-grid article{border:1px solid #ded4e7;border-radius:16px;padding:16px;background:#fff;display:flex;flex-direction:column;gap:6px}.token-guide-grid article strong{font-size:1rem}.token-guide-grid article p,.token-guide-grid article small{margin:0}.token-guide-grid article em{font-style:normal;font-weight:800;margin-top:6px}
.story-mission-head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:18px;margin-bottom:14px}.story-mission-head h2{margin:.1rem 0}.story-run-status{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:14px}.story-run-status>div{background:#fff;border:1px solid #ddd0e8;border-radius:14px;padding:12px;display:flex;justify-content:space-between;gap:8px;align-items:center}.story-run-status span{font-size:.82rem}.story-run-status strong{font-size:1.2rem}
.story-node{max-width:980px;margin-inline:auto}.story-node-type{text-transform:uppercase;letter-spacing:.09em;font-size:.72rem;font-weight:900;color:#6d4a83}.story-node-copy{font-size:1.08rem;line-height:1.65;margin:12px 0 18px}.story-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.story-choice,.story-reflection-choice{display:flex;flex-direction:column;gap:6px;text-align:left;align-items:flex-start;padding:15px;border-radius:16px;min-height:92px}.story-choice small,.story-reflection-choice span{font-size:.78rem;opacity:.78}.story-battle-start{width:100%;font-size:1.08rem;padding:15px}
.story-kit{margin-top:14px}.story-kit-items{display:flex;flex-wrap:wrap;gap:10px}.story-kit-items button{display:flex;flex-direction:column;align-items:flex-start;gap:3px}.story-kit-items button.active{outline:3px solid #7b45a0}.muted{opacity:.7}
.story-profile-panel{background:#fff;border:1px solid #ded4e7;border-radius:18px;padding:18px;margin-top:14px}.story-profile-panel h3{margin:.1rem 0}.story-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.profile-bit{border:1px dashed #c9bbd4;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:4px;background:#f8f5fa}.profile-bit strong{text-transform:capitalize}.profile-bit.known{border-style:solid;background:#f2faf4}.profile-bit.partial{background:#fff9e9}
.story-reflection{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.story-reflection-choice{background:#fff;border:1px solid #d9cee2;color:inherit}
.supply-hut-hero>img{object-position:center}.story-supply-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.story-supply-grid article{border:1px solid #ded4e7;border-radius:16px;padding:15px;background:#fff}.story-supply-grid h3{margin:.1rem 0}.story-supply-grid button{width:100%;margin-top:10px}
.story-event-screen{max-width:820px;margin:24px auto}.story-event-screen.serious{border-left:6px solid #5b2a86}.secret-route-screen{max-width:760px;margin:24px auto;text-align:center}.secret-route-screen .notice{text-align:left;margin:18px 0}
.story-event-hero-placeholder{width:100%;min-height:250px;margin-bottom:20px;border:2px dashed rgba(255,255,255,.62);border-radius:20px;display:grid;place-items:center;align-content:center;gap:6px;text-align:center;padding:22px;overflow:hidden;background:radial-gradient(circle at 25% 18%,rgba(214,113,171,.42),transparent 32%),linear-gradient(145deg,#2d1b3b,#68407c);color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.14)}
.story-event-hero-placeholder span{font-size:3.25rem;line-height:1}.story-event-hero-placeholder strong{font-size:1.2rem;letter-spacing:.1em}.story-event-hero-placeholder small{opacity:.86}
.story-battle-token-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}.story-battle-token-actions button{font-size:.78rem;padding:8px 9px}
@media(max-width:900px){.story-hero{grid-template-columns:1fr}.story-hero>img{min-height:0}.story-map-grid,.token-guide-grid,.story-choice-grid,.story-reflection,.story-profile-grid{grid-template-columns:1fr}.story-completion{grid-template-columns:1fr}.story-supply-grid{grid-template-columns:1fr 1fr}.story-run-status{grid-template-columns:repeat(3,minmax(0,1fr))}.story-mission-head{grid-template-columns:1fr}.story-mission-head>.token-purse{justify-self:start}}
@media(max-width:560px){.story-map-grid,.story-supply-grid{grid-template-columns:1fr}.story-run-status{grid-template-columns:repeat(2,minmax(0,1fr))}.story-battle-token-actions{grid-template-columns:1fr}.story-event-alert{align-items:flex-start;flex-direction:column}}


/* ===== v1.5.1 compact token dashboards ===== */
/* Compact purse is the status-counter treatment used on dashboards, Story screens, battles, Supply Hut and Trade. */
.token-purse.is-compact{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  min-width:0;
  width:auto;
}
.token-purse.is-compact .purse-token{
  display:inline-flex;
  align-items:center;
  gap:5px;
  flex:0 0 auto;
  padding:4px 7px 4px 4px;
  min-width:0;
  border-radius:999px;
  box-shadow:none;
}
.token-purse.is-compact .purse-coin{
  width:22px;
  height:22px;
  flex:0 0 22px;
  border-width:1px;
  font-size:.68rem;
  box-shadow:inset -1px -2px 3px rgba(0,0,0,.14),inset 1px 1px 2px rgba(255,255,255,.35);
}
.token-purse.is-compact .purse-copy{
  display:block;
  line-height:1;
}
.token-purse.is-compact .purse-copy small{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.token-purse.is-compact .purse-copy strong{
  font-size:.82rem;
  line-height:1;
}
.home-purse .token-purse.is-compact,
.story-mission-head .token-purse.is-compact,
.story-hero-copy .token-purse.is-compact,
.battle-purse-top .token-purse.is-compact,
.trade-header .token-purse.is-compact{
  max-width:none;
  flex:0 1 auto;
}
.home-purse{align-items:center}
.compact-purse-open{margin-top:8px}

/* The dedicated Token Purse screen is the only place that deliberately uses the full-size purse treatment. */
.token-purse-screen{display:grid;gap:20px}
.token-purse-screen-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.token-purse-screen>.token-purse:not(.is-compact){
  width:100%;
  max-width:920px;
  grid-template-columns:repeat(4,minmax(145px,1fr));
  gap:16px;
}
.token-purse-screen>.token-purse:not(.is-compact) .purse-token{
  min-height:94px;
  padding:16px;
}
.token-purse-screen>.token-purse:not(.is-compact) .purse-coin{
  width:58px;
  height:58px;
  flex:0 0 58px;
  font-size:1.55rem;
}
.token-purse-screen>.token-purse:not(.is-compact) .purse-copy small{font-size:.82rem}
.token-purse-screen>.token-purse:not(.is-compact) .purse-copy strong{font-size:1.8rem}
@media(max-width:760px){
  .token-purse.is-compact,.token-purse.is-compact{grid-template-columns:none;width:auto}
  .token-purse-screen-head{flex-direction:column}
  .token-purse-screen>.token-purse:not(.is-compact){grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:420px){
  .token-purse.is-compact,.token-purse.is-compact{grid-template-columns:none}
  .token-purse.is-compact .purse-token{padding:3px 6px 3px 3px}
  .token-purse-screen>.token-purse:not(.is-compact){grid-template-columns:1fr}
}

/* v1.5.2 visual integration: front hero + supplied token artwork */
.home-hero-visual{margin:14px 0;border-radius:22px;overflow:hidden;background:#171022;box-shadow:var(--shadow)}
.home-hero-visual>img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;background:#171022}
.home-hero-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--line)}
.home-hero-actions>div{background:rgba(255,255,255,.98);padding:18px 20px}
.home-hero-actions h2,.home-hero-actions p{margin:.25rem 0 .65rem}
@media(max-width:720px){.home-hero-actions{grid-template-columns:1fr}.home-hero-visual>img{aspect-ratio:auto}}

/* Real token art: compact everywhere except the dedicated purse screen. */
.purse-coin{overflow:visible;background:transparent!important;border:0!important;box-shadow:none!important}
.purse-coin img{display:block;width:100%;height:100%;object-fit:contain}
.token-purse.is-compact .purse-coin{width:26px!important;height:26px!important;flex:0 0 26px!important}
.token-purse.is-compact .purse-token{min-height:32px!important;padding:3px 7px 3px 3px!important;gap:4px!important}
.mini-token-art{width:18px;height:18px;object-fit:contain;vertical-align:middle;margin-right:3px}
.reward-coin img{width:22px;height:22px;object-fit:contain;display:block}

.token-purse-hero{display:block;width:100%;max-width:1040px;margin:0 auto;height:auto;object-fit:contain;background:transparent}
.full-token-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:6px}
.full-token-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:14px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.88)}
.full-token-card>img{display:block;width:min(100%,230px);height:auto;aspect-ratio:1/1;object-fit:contain}
.full-token-card h3{margin:.1rem 0}.full-token-card strong{display:block;font-size:2rem;line-height:1;color:var(--purple);margin:.2rem 0}.full-token-card p{margin:.35rem 0 0;color:var(--muted);font-size:.88rem}
@media(max-width:850px){.full-token-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:470px){.full-token-grid{grid-template-columns:1fr}.full-token-card>img{width:min(70%,220px)}}

/* Collectible artwork now carries transparency; never introduce a white strip behind it. */
.collectible-set-cards .full-card-art,.collectible-set-cards .art-frame,.collectible-set-cards .art-frame img{background:transparent!important}
.collectible-set-cards .art-frame{overflow:hidden!important}
.collectible-set-cards .art-frame img{display:block!important;margin:0!important;border:0!important}

/* v1.5.3 Player characters + pin badge cabinet */
.home-meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.home-player-card,.home-badge-card{display:flex;align-items:center;gap:18px}.home-player-card>img{width:118px;height:145px;object-fit:contain;object-position:center bottom;flex:0 0 auto}.home-badge-card{justify-content:space-between}.pinned-badges{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.pinned-badges img{width:52px;height:52px;object-fit:contain;background:transparent}.pinned-badges span{font-size:.82rem;color:var(--muted)}
.character-header{display:flex;align-items:center;justify-content:space-between;gap:20px}.character-rank{display:flex;align-items:center;gap:10px;text-align:center}.character-rank img{width:70px;height:70px;object-fit:contain}.character-rank span,.character-rank strong{display:block}.character-selected{display:grid;grid-template-columns:minmax(280px,.72fr) 1fr;gap:24px;align-items:center}.character-card-art{width:100%;max-height:720px;object-fit:contain;border-radius:18px;background:#22192c}.player-roster{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.player-roster-card{display:grid;grid-template-columns:100px 1fr auto;gap:14px;align-items:center;background:#fff;border:2px solid #d9cee2;border-radius:18px;padding:12px}.player-roster-card.selected{border-color:var(--purple);background:#fbf7ff}.player-roster-card.locked{background:#f4f1f5}.player-roster-card>img{width:100px;height:128px;object-fit:contain;object-position:center bottom}.player-roster-card h3,.player-roster-card p{margin:.15rem 0}.player-lock{width:84px;height:108px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(145deg,#6a3f8f,#294f61);font-size:2.2rem;color:#fff}.story-hero{position:relative}.story-player-avatar{position:absolute!important;left:16px;bottom:0!important;width:auto!important;height:43%!important;min-height:0!important;max-height:260px;object-fit:contain!important;object-position:left bottom!important;filter:drop-shadow(0 5px 6px rgba(0,0,0,.28));z-index:2;pointer-events:none}.story-player-chip{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.story-player-chip button{padding:6px 10px;font-size:.78rem}
.badge-reference{margin:12px 0;border-radius:22px;overflow:hidden;background:#fff}.badge-reference>img{width:100%;height:auto;display:block}.badge-summary{display:flex;justify-content:space-between;align-items:center;gap:18px}.badge-tier-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:12px 0}.badge-tier-strip article{background:#fff;border:1px solid var(--line);border-radius:16px;padding:10px;text-align:center}.badge-tier-strip img{width:72px;height:72px;object-fit:contain;margin:auto}.badge-tier-strip strong,.badge-tier-strip span,.badge-tier-strip small{display:block}.badge-tier-strip span{font-size:.82rem;color:var(--muted)}.badge-cabinet{display:grid;gap:16px}.badge-category{background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:20px;padding:16px}.badge-category h3{margin:.1rem 0 12px}.badge-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.badge-card{display:grid;grid-template-columns:82px 1fr;gap:12px;align-items:start;border:1px solid #ddd2e4;background:#f8f5fa;border-radius:16px;padding:10px;opacity:.72}.badge-card.earned{background:#fff;opacity:1;border-color:#b890cc}.badge-card.mystery{border-style:dashed}.badge-card>img{width:82px;height:82px;object-fit:contain;background:transparent}.badge-card h4,.badge-card p{margin:.15rem 0}.badge-card p{font-size:.86rem}.badge-card small{display:block;margin-top:5px;color:var(--muted)}.badge-card button{margin-top:7px;padding:6px 9px;font-size:.76rem}.mystery-pin{width:82px;height:82px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#4f306c,#2d2137);color:#fff;font-size:2rem;font-weight:900}.badge-earned-label,.badge-progress-label{font-size:.74rem;font-weight:800}.badge-earned-label{color:#397850}.badge-progress{height:7px;border-radius:99px;background:#e5dce9;overflow:hidden;margin-top:4px}.badge-progress span{display:block;height:100%;background:var(--purple)}.badge-earned-toast{position:fixed;right:20px;bottom:20px;z-index:10050;display:flex;gap:12px;align-items:center;width:min(390px,calc(100vw - 40px));padding:12px 14px;background:#251b2c;color:#fff;border:2px solid #d6a64b;border-radius:18px;box-shadow:0 14px 36px rgba(0,0,0,.25)}.badge-earned-toast[hidden]{display:none}.badge-earned-toast img{width:72px;height:72px;object-fit:contain}.badge-earned-toast small,.badge-earned-toast strong,.badge-earned-toast span{display:block}.badge-earned-toast small{color:#efc56d;font-weight:900;letter-spacing:.08em}.badge-earned-toast span{font-size:.86rem;color:#f3eaf7}
@media(max-width:850px){.home-meta-grid,.character-selected{grid-template-columns:1fr}.player-roster{grid-template-columns:1fr}.badge-tier-strip{grid-template-columns:repeat(3,minmax(0,1fr))}.story-player-avatar{height:34%!important;max-height:180px}.character-selected .character-card-art{max-height:620px}}
@media(max-width:560px){.home-player-card,.home-badge-card,.character-header,.badge-summary{align-items:flex-start;flex-direction:column}.player-roster-card{grid-template-columns:76px 1fr}.player-roster-card>button{grid-column:1/-1}.player-roster-card>img{width:76px;height:102px}.badge-tier-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.badge-grid{grid-template-columns:1fr}.story-player-avatar{height:29%!important;max-height:130px;left:6px}.badge-earned-toast{right:10px;bottom:10px;width:calc(100vw - 20px)}}


/* v1.5.4 unlockable player avatar artwork */
.player-avatar-wrap{position:relative;width:100px;height:128px;display:grid;place-items:end center;overflow:hidden;border-radius:14px}
.player-avatar-wrap>img{width:100%;height:100%;object-fit:contain;object-position:center bottom}
.player-avatar-wrap.is-locked>img{opacity:.5;filter:saturate(.65) brightness(.85)}
.player-avatar-wrap .avatar-lock{position:absolute;inset:auto 7px 7px auto;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:linear-gradient(145deg,#8c56b5,#315e6f);border:2px solid #fff;color:#fff;font-size:1.05rem;box-shadow:0 2px 6px rgba(0,0,0,.24)}
@media(max-width:560px){.player-avatar-wrap{width:76px;height:102px}}

/* v1.5.6 badge locked/grey states */
.badge-card.unearned-grey{opacity:.68;background:#f2f0f2;border-color:#d5d0d8}.badge-card.unearned-grey>img{filter:grayscale(1) saturate(0) contrast(.82);opacity:.34}.badge-card.unearned-grey h4,.badge-card.unearned-grey p,.badge-card.unearned-grey small{color:#77717a}.badge-card.special-locked{opacity:1;background:linear-gradient(145deg,#f6f1f7,#eee7f1);border:2px solid #c9bdce}.special-badge-lock{width:82px;height:82px;border-radius:20px;display:grid;place-items:center;background:linear-gradient(145deg,#6f36a1,#d04a91 48%,#e9a82f);box-shadow:inset 0 0 0 4px rgba(255,255,255,.28),0 4px 12px rgba(65,35,78,.16);font-size:2.45rem}.special-badge-lock span{filter:drop-shadow(0 2px 2px rgba(0,0,0,.2))}.badge-card.special-locked h4{color:#46354f}.badge-card.special-locked p{color:#75697a;font-style:italic}.badge-card.mystery{opacity:1}.badge-card.mystery .mystery-pin{box-shadow:inset 0 0 0 3px rgba(255,255,255,.1)}

/* v1.5.8 Inbox Island location artwork */
.story-world-hero>img:first-child{object-fit:contain;height:auto;min-height:0;align-self:center;background:#21162d}
.story-location-thumb{grid-column:1/-1;width:100%;aspect-ratio:16/10;object-fit:contain;border-radius:14px;background:#24182e;display:block}
.story-location-mission-hero{margin-bottom:16px;border-radius:22px;overflow:hidden;background:#24182e;border:1px solid #ded4e7}
.story-location-mission-hero img{display:block;width:100%;height:auto;max-height:none;object-fit:contain}
@media(max-width:900px){.story-world-hero>img:first-child{width:100%;height:auto}.story-location-thumb{aspect-ratio:auto}}

/* ===== v1.5.9 Inbox Island visual state, badge album, token guide and cache refresh ===== */
.story-world-hero>img:first-child{object-fit:contain!important;background:#17101d;min-height:0!important}
.story-location-thumb{grid-column:1/-1;width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:14px;display:block;background:#eee8f0;margin-bottom:2px}
.supply-hut-map-thumb.is-locked{filter:grayscale(1) saturate(0);opacity:.42}
.story-location-card.state-hidden .supply-hut-map-thumb{filter:grayscale(1) saturate(0);opacity:.38}
.story-secret-image-lock{grid-column:1/-1;width:100%;aspect-ratio:16/10;border-radius:14px;display:grid;place-items:center;align-content:center;gap:6px;background:linear-gradient(145deg,#3d234f,#6c3887 48%,#b44c89);box-shadow:inset 0 0 0 4px rgba(255,255,255,.16);color:#fff}
.story-secret-image-lock span{font-size:2.5rem;filter:drop-shadow(0 3px 3px rgba(0,0,0,.3))}.story-secret-image-lock small{font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.token-guide-title{display:flex;align-items:center;gap:9px;min-height:40px}.token-guide-title img{width:38px;height:38px;object-fit:contain;flex:0 0 38px}.token-guide-grid article{padding:14px!important;gap:4px!important}.token-guide-grid article em{margin-top:4px!important}
.home-badge-album-thumb{display:block;width:min(180px,100%);height:auto;margin-top:10px;border-radius:10px;cursor:pointer;border:1px solid #d6c8dc}
.badge-album-grid{display:block!important}.badge-album-wrap{width:100%}.badge-album-board{position:relative;width:100%;overflow:hidden;border-radius:18px;background:#f3e3bd}.badge-album-base{display:block;width:100%;height:auto}.badge-album-pin{position:absolute;height:auto;transform:translate(-50%,-50%);object-fit:contain;filter:drop-shadow(0 4px 5px rgba(39,23,20,.32));z-index:2;transform-origin:center}.badge-album-pin-monster{width:12.15%}.badge-album-pin-ally{width:11.15%}.badge-album-progress{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#fff}.badge-album-progress span{flex:1;min-width:240px;color:var(--muted)}
@media(max-width:650px){.badge-album-pin-monster{width:12.3%}.badge-album-pin-ally{width:11.3%}.badge-album-progress{align-items:flex-start;flex-direction:column}.token-guide-title img{width:34px;height:34px;flex-basis:34px}}

/* ===== v1.5.10 sizing alignment + Story event spacing ===== */
/* Collectible sets: identical two-column geometry and card dimensions in every set. */
.album-slide .collectible-set-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:start!important;
}
.album-slide .collectible-set-group{
  width:100%!important;
  box-sizing:border-box!important;
}
.album-slide .collectible-set-cards{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:start!important;
}
.album-slide .collectible-set-cards .game-card{
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.album-slide .collectible-set-cards .full-card-art{
  width:100%!important;
  aspect-ratio:1.48 / 1!important;
  height:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.album-slide .collectible-set-cards .full-card-art img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
}

/* Discovery Pack: all three result cards share one outer size and one artwork viewport. */
#reveal.card-grid{
  grid-template-columns:repeat(3,minmax(0,240px))!important;
  align-items:stretch!important;
  justify-content:center!important;
}
#reveal .game-card,
#reveal .full-image-card,
#reveal .monster-card,
#reveal .enemy-album-card,
#reveal .ally-image-card{
  width:100%!important;
  min-height:410px!important;
  height:410px!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
}
#reveal .game-card .art-frame,
#reveal .game-card .full-card-art,
#reveal .ally-image-card .ally-art-frame,
#reveal .enemy-album-card .full-card-art{
  width:100%!important;
  height:300px!important;
  min-height:300px!important;
  max-height:300px!important;
  aspect-ratio:auto!important;
  flex:0 0 300px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  background:transparent!important;
}
#reveal .game-card .art-frame img,
#reveal .game-card .full-card-art img,
#reveal .ally-image-card .ally-art-frame img,
#reveal .enemy-album-card .full-card-art img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  display:block!important;
}
#reveal .game-card .card-footer{
  margin-top:auto!important;
}
@media(max-width:900px){
  #reveal.card-grid{grid-template-columns:repeat(auto-fit,minmax(230px,280px))!important}
}
@media(max-width:620px){
  #reveal.card-grid{grid-template-columns:minmax(250px,340px)!important}
  #reveal .game-card,#reveal .full-image-card,#reveal .monster-card,#reveal .enemy-album-card,#reveal .ally-image-card{height:auto!important;min-height:410px!important}
}

/* Unexpected event: keep option pills comfortably separated from the final action. */
.story-event-screen .story-choice-grid{
  margin-bottom:22px!important;
}
.story-event-screen #eventLater,
.story-event-screen .story-event-complete,
.story-event-screen [data-event-complete]{
  margin-top:6px!important;
}

/* ===== v1.5.11 visual polish: mission containers, rounded media, alignment ===== */
/* Mission hero artwork should sit cleanly on the page without a second framed container. */
.story-location-mission-hero{
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:hidden!important;
  border-radius:18px!important;
}
.story-location-mission-hero img{
  border-radius:18px!important;
}

/* Consistent softened corners for visual media throughout the app. */
.app-shell img,
.game-card img,
.art-frame,
.full-card-art,
.ally-art-frame,
.profile-card-visual,
.arena-hero-placeholder,
.story-location-thumb,
.story-world-hero>img,
.story-completion img,
.badge-reference>img,
.badge-album-base,
.home-badge-album-thumb,
.character-card-art,
.player-roster-card>img,
.lightbox-viewport img{
  border-radius:14px!important;
}
.game-card .art-frame,
.game-card .full-card-art,
.ally-art-frame,
.profile-card-visual,
.lightbox-viewport{
  overflow:hidden!important;
}

/* Keep the two collectible groups in each row visually aligned. */
.album-slide .collectible-set-grid{
  align-items:stretch!important;
}
.album-slide .collectible-set-group{
  height:100%!important;
}
/* System Survival is the second launch set; trim the small excess vertical padding. */
.album-slide .collectible-set-grid>.collectible-set-group:nth-child(2){
  padding-bottom:8px!important;
}

/* Unexpected event: force a clear visual break before Return/Complete controls. */
.story-event-screen .story-choice-grid{
  margin-bottom:24px!important;
}
.story-event-screen .story-choice-grid~button,
.story-event-screen .story-choice-grid~.button-row,
.story-event-screen .story-choice-grid~.actions,
.story-event-screen .story-choice-grid+button{
  margin-top:18px!important;
}


/* ===== v1.5.12 Discovery Pack character-card consistency ===== */
/* Monsters, Enemies and Allies use the same portrait result treatment as Support Sprites. */
#reveal .game-card.discovery-character-card{
  height:410px!important;
  min-height:410px!important;
  max-height:410px!important;
  padding:10px!important;
}
#reveal .game-card.discovery-character-card .full-card-art,
#reveal .game-card.discovery-character-card .ally-art-frame{
  width:100%!important;
  height:300px!important;
  min-height:300px!important;
  max-height:300px!important;
  flex:0 0 300px!important;
  aspect-ratio:auto!important;
  margin:0!important;
  padding:0!important;
  border-radius:14px!important;
  overflow:hidden!important;
  background:#211a28!important;
}
#reveal .game-card.discovery-character-card .full-card-art img,
#reveal .game-card.discovery-character-card .ally-art-frame img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:14px!important;
}
/* Full-art character cards do not repeat their printed title/details below the artwork. */
#reveal .game-card.discovery-character-card .card-name,
#reveal .game-card.discovery-character-card .card-subtitle,
#reveal .game-card.discovery-character-card .stats,
#reveal .game-card.discovery-character-card .tags,
#reveal .game-card.discovery-character-card .card-effect,
#reveal .game-card.discovery-character-card .card-linked-sprite{display:none!important;}
#reveal .game-card.discovery-character-card .card-profile-btn{
  width:100%!important;
  min-height:42px!important;
  margin:10px 0 6px!important;
  flex:0 0 42px!important;
}
#reveal .game-card.discovery-character-card .card-footer{margin-top:auto!important;}
@media(max-width:620px){
  #reveal .game-card.discovery-character-card{height:410px!important;min-height:410px!important;max-height:410px!important;}
}


/* ===== v1.6.0 Practice-first battle system ===== */
.battle-approach-panel{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(260px,1.2fr);gap:20px;align-items:center}
.approach-bars{display:grid;gap:10px}.approach-bars>div{display:grid;grid-template-columns:1fr auto;gap:6px 12px;align-items:center}.approach-bars i{grid-column:1/-1;height:9px;border-radius:999px;background:#eee7f1;overflow:hidden}.approach-bars i b{display:block;height:100%;border-radius:inherit;background:currentColor}.approach-bars>div:first-child{color:#496a63}.approach-bars>div:last-child{color:#7b3fa0}.round-limit{margin:.2rem 0 0;font-weight:800;color:#66566e}.battle-action-card:disabled{opacity:.48;filter:grayscale(.55)}.victory-approach{margin:.45rem 0 1rem;padding:.7rem 1rem;border-radius:12px;background:#f2eafb;font-weight:800}.battle-action-adjustment .sprite-link.is-active{background:#e8f7ee;color:#245b39}.battle-action-attack{outline:2px solid rgba(123,63,160,.18)}
@media(max-width:760px){.battle-approach-panel{grid-template-columns:1fr}}


/* ===== v1.6.1 Legal Literacy specialist CPD tokens ===== */
.specialist-token-panel{margin-top:22px}.specialist-token-heading{display:flex;justify-content:space-between;gap:24px;align-items:flex-start}.legal-balance{min-width:190px;padding:14px 16px;border-radius:16px;background:#eee8f5;text-align:right}.legal-balance span,.legal-balance small{display:block;color:#675b6d}.legal-balance strong{display:block;font-size:1.8rem;color:#4d276e;margin:.15rem 0}.legal-token-tier-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0}.legal-token-tier-grid article{display:flex;gap:12px;align-items:center;padding:12px;border:1px solid #dccfe5;border-radius:16px;background:#fffaf3}.legal-token-tier-grid img{width:92px;height:92px;object-fit:contain;flex:0 0 92px;background:transparent!important}.legal-token-tier-grid h3,.legal-token-tier-grid p{margin:.15rem 0}.legal-claim-box{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(300px,1.2fr);gap:20px;padding:18px;border-radius:16px;background:#f5f0f7}.legal-claim-box label{display:block;font-weight:800;margin-bottom:6px}.legal-claim-row{display:flex;gap:8px}.legal-claim-row input{min-width:0;flex:1;padding:11px 12px;border:1px solid #bbaac8;border-radius:12px;font:inherit;text-transform:uppercase}.legal-claim-status{min-height:1.4em;margin:.55rem 0 0;font-weight:700}.legal-claim-status.success{color:#24603d}.legal-claim-status.error{color:#9c2f3e}.legal-claim-log{margin-top:15px}.legal-claim-log summary{cursor:pointer;font-weight:800}.legal-claim-history{display:grid;gap:8px;margin-top:10px}.legal-claim-history>div{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;align-items:center;padding:9px 10px;border-radius:12px;background:#faf7fb}.legal-claim-history small{grid-column:2}.legal-history-tier{font-weight:900;border-radius:999px;padding:4px 8px;background:#e8e0ec}.compact-specialist-note{font-size:.82rem;color:#6d6171;margin:.2rem 0 .5rem}.legal-battle-panel{display:grid;grid-template-columns:minmax(190px,.7fr) minmax(300px,1.3fr);gap:18px;align-items:center}.legal-battle-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.legal-battle-actions button{min-height:44px}.legal-battle-panel h3{margin:.15rem 0}.legal-battle-panel p{margin:.2rem 0}.legal-bronze{color:#8b4d28}.legal-silver{color:#666}.legal-gold{color:#9d6a00}
@media(max-width:760px){.specialist-token-heading{display:block}.legal-balance{text-align:left;margin-top:12px}.legal-token-tier-grid{grid-template-columns:1fr}.legal-claim-box,.legal-battle-panel{grid-template-columns:1fr}.legal-battle-actions{grid-template-columns:1fr}}

/* ===== v1.6.2 — supplied Monster / Enemy battle arena artwork ===== */
.arena-hero-art,
.battle-arena-art-wrap{
  width:100%;
}
.arena-hero-art{
  aspect-ratio:16 / 9;
  border-radius:18px;
  overflow:hidden;
  background:#1f1724;
  box-shadow:0 8px 22px rgba(39,24,49,.12);
}
.arena-hero-art img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  border-radius:18px;
}
.arena-hero-art.is-locked{
  filter:grayscale(1) saturate(.35);
  opacity:.64;
}
.battle-mode-card .arena-hero-art{
  margin:0 0 12px;
  border-radius:16px;
  box-shadow:none;
}
.battle-mode-card .arena-hero-art img{
  border-radius:16px;
}
.battle-arena-art-wrap{
  margin:0 0 18px;
  border-radius:20px;
  overflow:hidden;
}
.battle-arena-art-wrap .arena-hero-art{
  max-width:1280px;
  margin:0 auto;
  border-radius:20px;
}
.battle-arena-art-wrap .arena-hero-art img{
  border-radius:20px;
}
@media(max-width:700px){
  .arena-hero-art,.arena-hero-art img{border-radius:14px}
  .battle-arena-art-wrap{margin-bottom:14px;border-radius:14px}
}

/* ===== v1.6.3 supplied badge art + starter character variants ===== */
.player-variant-choice{margin:16px 0;padding:14px;border:1px solid var(--line);border-radius:16px;background:#faf7fc}
.player-variant-choice>.eyebrow{margin:0 0 9px}
.player-variant-options{display:grid;grid-template-columns:repeat(2,minmax(0,150px));gap:10px;margin-bottom:8px}
.player-variant-option{display:grid;grid-template-columns:54px 1fr;gap:8px;align-items:center;text-align:left;padding:7px 9px;border:2px solid #d9cee2;border-radius:14px;background:#fff;color:inherit}
.player-variant-option img{width:54px;height:74px;object-fit:contain;object-position:center bottom;background:transparent;border-radius:10px}
.player-variant-option span{font-size:.78rem;font-weight:850}
.player-variant-option.selected{border-color:var(--purple);background:#f2eaf8;box-shadow:0 0 0 2px rgba(103,44,143,.08)}
.player-variant-choice small{display:block;color:var(--muted)}
.badge-tier-strip img{width:100%;height:118px;object-fit:contain;margin:auto;border-radius:10px;background:transparent}
@media(max-width:560px){.player-variant-options{grid-template-columns:repeat(2,minmax(0,1fr))}.player-variant-option{grid-template-columns:44px 1fr}.player-variant-option img{width:44px;height:62px}.badge-tier-strip img{height:105px}}


/* ===== v1.6.5 — locked Boss arenas conceal artwork until unlocked ===== */
.arena-hero-art.arena-locked-art{
  filter:none!important;
  opacity:1!important;
  min-height:0;
  aspect-ratio:16 / 9;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:20px;
  text-align:center;
  background:
    radial-gradient(circle at 28% 22%,rgba(212,74,145,.16),transparent 30%),
    radial-gradient(circle at 74% 74%,rgba(233,168,47,.17),transparent 32%),
    linear-gradient(145deg,#f5eff8,#eee5f2);
  border:2px dashed #9271aa;
  box-shadow:inset 0 0 0 4px rgba(255,255,255,.5);
}
.arena-colour-lock{
  width:92px;
  height:92px;
  border-radius:25px;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,#6f36a1,#d04a91 48%,#e9a82f);
  box-shadow:inset 0 0 0 5px rgba(255,255,255,.28),0 7px 18px rgba(65,35,78,.2);
  font-size:3.2rem;
}
.arena-colour-lock span{filter:drop-shadow(0 3px 3px rgba(0,0,0,.24))}
.arena-locked-art strong{font-size:1.05rem;color:#492e5b}
.arena-locked-art small{max-width:290px;color:#75677c;line-height:1.35}
.battle-mode-card.is-locked .arena-hero-art{filter:none!important;opacity:1!important}
@media(max-width:600px){.arena-colour-lock{width:72px;height:72px;border-radius:20px;font-size:2.5rem}.arena-locked-art small{font-size:.78rem}}

/* ===== v1.7.0 Skills Practice, achievement sheets, Resource Monster ===== */
.tabs{flex-wrap:wrap}.tabs button[data-view="achievements"]{white-space:nowrap}
.skills-arena-head,.achievement-skills-head{display:flex;justify-content:space-between;align-items:center;gap:20px}.skills-arena-grid,.skills-album-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}.skill-card{display:grid;grid-template-columns:110px 1fr;gap:14px;align-items:start;background:#fff;border:1px solid var(--line);border-radius:20px;padding:14px;box-shadow:0 6px 18px rgba(49,28,57,.06)}.skill-card>img{width:110px;height:150px;object-fit:contain;border-radius:14px}.skill-card-art{width:110px;height:150px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(145deg,#dfeada,#f7f0d8);border:2px dashed #86a276}.skill-card-art span{font-size:2.1rem}.skill-card-art strong{font-size:1.8rem;color:#4b3861}.skill-card h3,.skill-card p{margin:.2rem 0}.skill-card small{display:block;margin:.55rem 0;color:var(--muted)}.skill-card button{margin-top:8px}.skill-card.is-complete{border-color:#72a36d;background:#fbfff9}.skill-card.is-locked{filter:saturate(.35);opacity:.72}.skill-tags{display:flex;gap:5px;flex-wrap:wrap;margin:.5rem 0}.skill-tags span{padding:3px 7px;border-radius:999px;background:#ede5f3;font-size:.72rem;font-weight:800}.skills-mode .skills-arena-icon{height:170px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(145deg,#e5efd9,#efe2f3);font-size:4rem}
.skill-practice-modal{position:fixed;inset:0;z-index:15000;background:rgba(25,18,29,.7);padding:18px;overflow:auto}.skill-practice-modal[hidden]{display:none}.skill-modal-shell{width:min(1200px,100%);min-height:min(850px,calc(100vh - 36px));margin:auto;background:#fff;border-radius:24px;overflow:hidden;box-shadow:0 22px 70px rgba(0,0,0,.35);display:grid;grid-template-rows:auto 1fr auto}.skill-modal-head,.skill-modal-foot{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 18px;background:#f4eff6}.skill-modal-head h2{margin:.1rem 0}.skill-modal-foot{border-top:1px solid var(--line)}#skillModalBody{min-height:600px;background:#ede7ef}.skill-embed{width:100%;height:min(72vh,760px);border:0;display:block;background:#fff}.resource-negotiation{display:grid;grid-template-columns:minmax(240px,360px) 1fr;gap:24px;align-items:center;padding:24px;background:linear-gradient(145deg,#eaf3e4,#f2eaf5)}.resource-negotiation>img{width:100%;max-height:650px;object-fit:contain;border-radius:18px}.negotiation-options{display:grid;gap:10px}.skill-placeholder-practice{max-width:760px;margin:30px auto;background:#fff;padding:24px;border-radius:20px}.skill-placeholder-practice textarea{width:100%;min-height:220px;padding:12px;border-radius:12px;border:1px solid var(--line)}
.resource-monster-story{display:grid;grid-template-columns:1fr minmax(180px,280px);gap:22px;align-items:center}.resource-monster-story img{width:100%;max-height:390px;object-fit:contain;border-radius:18px}.resource-monster-album-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:12px}.resource-monster-album-card>img{width:100%;aspect-ratio:1054/1492;object-fit:contain;border-radius:14px}.resource-monster-album-card.locked{display:grid;place-items:center;min-height:420px}.resource-monster-album-card .premium-card-lock{min-height:320px}
.player-tier-chip{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #d9cde0;border-radius:16px;padding:8px 12px;width:max-content;max-width:100%}.player-tier-chip img{width:54px;height:54px;object-fit:contain;border-radius:10px}.player-tier-chip small,.player-tier-chip strong{display:block}.player-tier-chip small{color:var(--muted);font-size:.72rem}.story-hero-copy .player-tier-chip{margin:10px 0;background:rgba(255,255,255,.92)}.battle-control-stack>.player-tier-chip{margin:0 0 12px}
.badge-sheet{background:#e8d0a5;border:8px solid #8b5d32;border-radius:24px;padding:20px;box-shadow:inset 0 0 0 3px #c99e66,0 8px 24px rgba(67,39,26,.13);margin:18px 0}.badge-sheet-head{text-align:center;color:#49341f}.badge-sheet-head h2{margin:.15rem 0}.badge-sheet-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.badge-sheet-slot{min-height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:9px;border-radius:18px;background:radial-gradient(circle at 50% 35%,#d9bd8b,#c39a66);box-shadow:inset 0 3px 10px rgba(87,48,26,.25);border:1px solid rgba(94,57,29,.35)}.badge-sheet-slot img{width:104px;height:104px;object-fit:contain;filter:drop-shadow(0 4px 5px rgba(55,34,22,.25));transition:.2s}.badge-sheet-slot.locked img{filter:grayscale(1) saturate(0) contrast(.75);opacity:.28}.badge-sheet-slot strong{font-size:.82rem}.badge-sheet-slot small{font-size:.7rem;color:#66503c}.compact-milestones{padding:14px;border-width:5px}.compact-milestones .badge-sheet-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.compact-milestones .badge-sheet-slot{min-height:130px}.compact-milestones .badge-sheet-slot img{width:76px;height:76px}.character-selected .compact-milestones{grid-column:1/-1}.battle-skills-panel{margin-top:12px}.battle-skill-buttons{display:flex;gap:7px;flex-wrap:wrap}.battle-skill-buttons button{font-size:.82rem;padding:7px 9px}
.story-location-card .story-location-thumb,.story-location-mission-hero img,.supply-hut-hero>img{border-radius:18px}.secret-route-screen+*{border-radius:18px}
/* Neuroinclusive ally pins: slightly oversize the transparent pin art so it fully covers the embossed ally silhouettes. */
.badge-album-pin-ally{width:12.6%!important}
@media(max-width:760px){.skills-arena-head,.achievement-skills-head,.skill-modal-head,.skill-modal-foot{align-items:flex-start;flex-direction:column}.resource-negotiation,.resource-monster-story{grid-template-columns:1fr}.badge-sheet-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.compact-milestones .badge-sheet-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.skill-card{grid-template-columns:88px 1fr}.skill-card>img,.skill-card-art{width:88px;height:122px}.badge-album-pin-ally{width:12.75%!important}}
.story-skills{display:flex;justify-content:space-between;align-items:center;gap:18px}.story-skill-buttons{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.story-skill-buttons button{font-size:.82rem}@media(max-width:700px){.story-skills{align-items:flex-start;flex-direction:column}.story-skill-buttons{justify-content:flex-start}}


/* ===== v1.7.1 Skills layout, tier display and rounded Story/Battle polish ===== */
/* Skills Practice and Skills Album: two cards per row on normal screens, one on compact screens. */
.skills-arena-grid,
.skills-album-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:stretch;
  gap:18px!important;
}
.skill-card{
  height:100%;
  border-radius:20px!important;
  overflow:hidden;
}
.skill-card>img,
.skill-resource-placeholder{
  border-radius:14px!important;
}
.skill-resource-placeholder{
  min-height:150px;
  align-content:center;
  justify-items:center;
  text-align:center;
  padding:10px;
  background:linear-gradient(145deg,#e4eddc,#f3ebf5)!important;
  border:2px dashed #8aa17d!important;
  color:#49355d;
}
.skill-resource-placeholder .skill-placeholder-icon{font-size:2.1rem;line-height:1}
.skill-resource-placeholder strong{font-size:.88rem!important;letter-spacing:.07em}
.skill-resource-placeholder small{font-size:.68rem;color:#70647a;margin:0}
/* Give all Skills Practice controls some breathing room without enlarging the panels. */
.skills-arena-head{margin-bottom:20px!important}
.skills-arena-head>button{margin:10px 0!important}
.skill-card button{margin-top:14px!important;margin-bottom:6px!important}
.skills-mode .section-heading button,
.achievement-skills-head button,
[data-open-skills-arena]{margin-top:10px!important;margin-bottom:10px!important}

/* Achievements & Skills uses the full tier badge/card; player and character profiles retain shield art. */
.player-tier-badge-card img{
  width:126px!important;
  height:92px!important;
  object-fit:contain!important;
  border-radius:12px!important;
  background:transparent!important;
}

/* Round the OUTER Story and Battle card/arena containers as well as the artwork itself. */
.battle-mode-card,
.arena-heading,
.battle-arena-art-wrap,
.battle-arena-art-wrap .arena-hero-art,
.story-world-hero,
.story-location-card,
.story-location-mission-hero,
.story-node.panel,
.story-event-screen,
.story-skills,
.secret-route-screen,
.resource-monster-story{
  border-radius:20px!important;
}
.battle-mode-card,
.battle-arena-art-wrap,
.story-location-mission-hero{
  overflow:hidden!important;
}
.battle-mode-card .arena-hero-art,
.battle-mode-card .arena-hero-art img,
.battle-arena-art-wrap .arena-hero-art,
.battle-arena-art-wrap .arena-hero-art img,
.story-location-thumb,
.story-location-mission-hero img{
  border-radius:18px!important;
}

/* Inbox Island map art: introduce a small inset from the left edge of its container. */
.story-world-hero>img:first-child{
  margin-left:12px!important;
  width:calc(100% - 12px)!important;
  border-radius:18px!important;
}

@media(max-width:760px){
  .skills-arena-grid,
  .skills-album-grid{grid-template-columns:1fr!important}
  .story-world-hero>img:first-child{margin-left:8px!important;width:calc(100% - 8px)!important}
}

/* ===== v1.8.0 Story clues, side quest, Skills profiles, Reflection Arena ===== */
/* Gradient borders must follow the same curve as their containers. */
.shell-edge{border-radius:22px!important;background-clip:padding-box,border-box!important}
.story-map-grid.shell-edge,.battle-mode-hub.shell-edge,.skills-arena-grid.shell-edge,.reflection-arena-grid.shell-edge{border-radius:22px!important;overflow:hidden}
.story-location-card,.battle-mode-card,.story-location-mission-hero,.story-event-screen,.secret-route-screen,.story-skills,.resource-monster-story{border-radius:20px!important}
.story-location-card>img,.story-location-thumb-frame,.story-location-mission-hero>img,.battle-mode-card .arena-hero-art,.battle-mode-card .arena-hero-art img{border-radius:18px!important}

/* Supply Hut map thumbnail: keep the entire location image inside its frame. */
.story-location-thumb-frame{width:100%;overflow:hidden;background:#17121b;aspect-ratio:3/2;display:grid;place-items:center}
.story-location-thumb-frame .supply-hut-map-thumb{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;aspect-ratio:auto!important;margin:0!important;border-radius:16px!important}

.barrry-clue-found,.barry-clue-found{display:block;margin:.45rem 0;color:#4b6e34;font-weight:800}.story-collect-label{display:block;margin:.4rem 0 .15rem;color:#5d347b;font-weight:800}.barry-sidequest-complete{font-weight:800;color:#386c42;margin-top:14px}

/* Skills now use the same portrait-card rhythm as Monsters and Allies. */
.skills-arena-grid,.skills-album-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px!important;padding:18px}
.skill-card.game-card-style{display:flex!important;flex-direction:column!important;gap:10px!important;padding:12px!important;border:2px solid #d5c6dd!important;border-radius:22px!important;background:linear-gradient(180deg,#fff,#faf6fb)!important;min-width:0;box-shadow:0 8px 20px rgba(49,28,57,.09)}
.skill-card.game-card-style.is-complete{border-color:#78a86d!important}.skill-card.game-card-style.is-locked{filter:saturate(.35);opacity:.7}
.skill-card-visual{width:100%;aspect-ratio:2/3;max-height:520px;border-radius:16px;overflow:hidden;background:#17121b;display:grid;place-items:center}
.skill-card-visual>img{width:100%;height:100%;object-fit:contain;border-radius:16px;background:#17121b}
.skill-card-visual .skill-card-art{width:100%!important;height:100%!important;min-height:0!important;border-radius:16px!important}
.skill-card-copy{display:flex;flex-direction:column;flex:1}.skill-card-copy h3{font-size:1.18rem;margin:.3rem 0}.skill-card-copy p{margin:.2rem 0}.skill-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:auto;padding-top:12px}.skill-card-actions button{margin:0!important;min-height:44px}.skills-album-grid .skill-card-actions{grid-template-columns:1fr}
.skill-profile-shell{width:min(1040px,100%);margin:4vh auto;background:#fff;border-radius:24px;padding:18px;box-shadow:0 22px 70px rgba(0,0,0,.35);position:relative}.skill-profile-close{position:absolute;right:18px;top:18px;z-index:2}.skill-profile-card{display:grid;grid-template-columns:minmax(260px,42%) 1fr;gap:24px;align-items:center;padding-top:40px}.skill-profile-art img{width:100%;max-height:74vh;object-fit:contain;border-radius:18px}.skill-profile-art .skill-card-art{width:100%;aspect-ratio:2/3;height:auto!important;min-height:360px}.skill-profile-card h2{margin:.15rem 0}.skill-profile-card h3{margin:1rem 0 .25rem}

/* Story-mode Skills are selectable action cards, not decorative pills. */
.story-skills{display:block!important}.story-skill-buttons{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px!important;margin-top:12px}.story-skill-buttons button{text-align:left!important;border-radius:14px!important;display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:58px;padding:10px 12px!important}.story-skill-buttons button strong{font-size:.86rem}.story-skill-buttons button small{font-size:.7rem;opacity:.75}.story-skill-buttons button.used{opacity:.55}.story-skill-feedback{margin:.5rem 0 0;color:#4c6e39;font-weight:700}

/* Reflection Arena / Milo placeholder. */
.reflection-arena-grid{padding:18px;background:linear-gradient(145deg,#f0e9f5,#e7f0df);display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,.55fr);gap:18px}.reflection-card{max-width:560px}.reflection-lock-note{align-self:start}.reflection-hero-placeholder{width:100%;aspect-ratio:3/2;border-radius:18px;display:grid;place-items:center;align-content:center;text-align:center;gap:5px;padding:18px;background:radial-gradient(circle at 30% 20%,rgba(117,70,150,.28),transparent 34%),linear-gradient(145deg,#253829,#5a336f);color:#fff;border:2px dashed rgba(255,255,255,.55)}.reflection-hero-placeholder span{font-size:3.2rem}.reflection-hero-placeholder strong{font-size:1.15rem;letter-spacing:.08em}.reflection-hero-placeholder small{opacity:.85}.reflection-hero-placeholder.large{min-height:320px}.reflection-hero-placeholder.arena-placeholder{height:170px;aspect-ratio:auto}.reflection-story-card .reflection-hero-placeholder{grid-column:1/-1;aspect-ratio:3/2}.reflection-modal-body{display:grid;grid-template-columns:minmax(250px,.8fr) minmax(320px,1.2fr);gap:22px;padding:22px;background:#f3eef6}.reflection-prompts label{font-weight:800}.reflection-prompts textarea{display:block;width:100%;min-height:180px;margin-top:8px;padding:12px;border:1px solid var(--line);border-radius:14px;font:inherit}.reflection-quick-picks{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.reflection-quick-picks button{text-align:left;border-radius:14px}.reflection-mode.is-locked .reflection-hero-placeholder{filter:grayscale(1);opacity:.5}

/* Token detail popups. */
.token-more{display:block;margin:auto 0 0;padding:6px 9px!important;font-size:.74rem!important;background:#eee6f2!important;color:#4d276e!important}.token-detail-shell{width:min(900px,100%);margin:5vh auto;background:#fff;border-radius:24px;padding:22px;box-shadow:0 22px 70px rgba(0,0,0,.35);position:relative}.token-detail-close{position:absolute;right:18px;top:18px}.token-detail-head{display:grid;grid-template-columns:112px 1fr;gap:18px;align-items:center;padding-right:70px}.token-detail-head img{width:112px;height:112px;object-fit:contain}.token-detail-head h2{margin:.1rem 0}.token-detail-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}.token-detail-columns>div{background:#faf7fb;border:1px solid var(--line);border-radius:16px;padding:16px}.token-detail-columns li{margin:.45rem 0}

@media(max-width:760px){.skills-arena-grid,.skills-album-grid{grid-template-columns:1fr!important;padding:10px}.skill-card-actions,.story-skill-buttons,.reflection-quick-picks{grid-template-columns:1fr!important}.skill-profile-card,.reflection-modal-body,.token-detail-columns,.reflection-arena-grid{grid-template-columns:1fr}.token-detail-head{grid-template-columns:76px 1fr}.token-detail-head img{width:76px;height:76px}.reflection-hero-placeholder.large{min-height:220px}}

/* v1.8.0 QA polish: Barry side-quest preview and consistent curved external frames. */
.barrry-sidequest-preview,.barry-sidequest-preview{margin:14px 0;border-radius:18px;overflow:hidden;border:1px solid var(--line);background:#f4eff6}
.barrry-sidequest-preview img,.barry-sidequest-preview img{display:block;width:100%;height:auto;max-height:430px;object-fit:contain;border-radius:18px}
.story-map-grid.shell-edge,.battle-mode-hub.shell-edge,.skills-arena-grid.shell-edge,.reflection-arena-grid.shell-edge,.story-world-hero.shell-edge,.story-location-mission-hero.shell-edge{background-clip:padding-box,border-box!important;border-radius:22px!important}

/* ===== v1.8.2 Three-card rows, fitted artwork and arena heroes ===== */
.arena-feature-hero{margin:12px 0 18px;border-radius:22px;overflow:hidden;background:#17121b}
.arena-feature-hero img{display:block;width:100%;height:auto;max-height:660px;object-fit:contain;object-position:center;border-radius:19px!important;background:#17121b}
.reflection-modal-art{width:100%;min-height:0;border-radius:18px;overflow:hidden;background:#17121b;display:grid;place-items:center}
.reflection-modal-art img{display:block;width:100%;height:100%;max-height:560px;object-fit:contain;object-position:center;border-radius:18px!important}

/* Game-card collections use the same three-column rhythm as encounter cards. */
.album-slide .card-grid,
.album-slide .collectible-set-cards,
.skills-arena-grid,
.skills-album-grid,
.enemy-card-strip,
.monster-battle-hub .monster-card-strip,
.badge-sheet-grid,
.compact-milestones .badge-sheet-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
.album-slide .game-card .art-frame,
.skills-arena-grid .skill-card-visual,
.skills-album-grid .skill-card-visual{
  overflow:hidden!important;
  background:#17121b!important;
}
.album-slide .game-card .art-frame img,
.skills-arena-grid .skill-card-visual img,
.skills-album-grid .skill-card-visual img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
}
.skill-card.game-card-style{height:100%;min-width:0}
.skill-card-visual{aspect-ratio:2/3;max-height:none}

@media(max-width:900px){
  .album-slide .card-grid,
  .album-slide .collectible-set-cards,
  .skills-arena-grid,
  .skills-album-grid,
  .enemy-card-strip,
  .monster-battle-hub .monster-card-strip,
  .badge-sheet-grid,
  .compact-milestones .badge-sheet-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:560px){
  .album-slide .card-grid,
  .album-slide .collectible-set-cards,
  .skills-arena-grid,
  .skills-album-grid,
  .enemy-card-strip,
  .monster-battle-hub .monster-card-strip,
  .badge-sheet-grid,
  .compact-milestones .badge-sheet-grid{grid-template-columns:1fr!important}
  .arena-feature-hero img{max-height:none}
}
.achievements-album-page{display:block!important}
.album-achievement-sheets{width:100%;display:block}
.album-achievement-sheets .badge-sheet{width:100%}
.home-badge-album-thumb{display:none!important}

/* ===== v1.8.6 Collectibles: two sets per row, four cards in a 2 × 2 grid ===== */
.album-slide .collectible-set-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:18px!important;
  align-items:stretch!important;
}
.album-slide .collectible-set-group{
  min-width:0!important;
  height:100%!important;
}
.album-slide .collectible-set-group .collectible-set-cards{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:stretch!important;
}
.album-slide .collectible-set-group .collectible-set-cards .game-card{
  width:100%!important;
  min-width:0!important;
  height:100%!important;
}
@media(max-width:820px){
  .album-slide .collectible-set-grid{grid-template-columns:1fr!important}
}
@media(max-width:480px){
  .album-slide .collectible-set-group .collectible-set-cards{grid-template-columns:1fr!important}
}

/* ===== v1.8.7 Battle hub artwork for Skills and Reflection ===== */
.battle-mode-arena-image{
  width:100%;
  aspect-ratio:16/9;
  border-radius:16px;
  overflow:hidden;
  background:#17121b;
}
.battle-mode-arena-image img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  border-radius:16px!important;
}
.battle-mode-card.reflection-mode.is-locked .battle-mode-arena-image img{
  filter:grayscale(.75);
  opacity:.72;
}

/* ===== v1.8.8 Moving Story Mode player marker ===== */
.story-map-stage{
  position:relative;
  width:100%;
  min-width:0;
  align-self:stretch;
  overflow:hidden;
  background:#17101d;
}
.story-map-stage>img:first-child{
  display:block;
  width:100%!important;
  height:100%!important;
  min-height:360px!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#17101d;
}
.story-map-stage .story-player-avatar{
  left:var(--map-x,12%)!important;
  top:var(--map-y,78%)!important;
  bottom:auto!important;
  width:auto!important;
  height:30%!important;
  max-height:190px!important;
  transform:translate(-50%,-88%);
  transform-origin:center bottom;
  transition:left .72s cubic-bezier(.22,.8,.3,1),top .72s cubic-bezier(.22,.8,.3,1),transform .18s ease;
  object-fit:contain!important;
  object-position:center bottom!important;
  z-index:3;
}
.story-map-stage .story-player-avatar.is-travelling{animation:story-avatar-hop .36s ease-in-out 2}
@keyframes story-avatar-hop{50%{transform:translate(-50%,-100%) scale(1.04)}}
@media(max-width:900px){
  .story-map-stage>img:first-child{min-height:0!important;height:auto!important}
  .story-map-stage .story-player-avatar{height:27%!important;max-height:150px!important}
}
.accessibility-reduce-motion .story-map-stage .story-player-avatar{transition:none!important;animation:none!important}
@media(prefers-reduced-motion:reduce){.story-map-stage .story-player-avatar{transition:none!important;animation:none!important}}

/* ===== v1.8.9 Clean contained artwork inside every Skills card frame ===== */
.skills-arena-grid .skill-card.game-card-style,
.skills-album-grid .skill-card.game-card-style{
  overflow:hidden!important;
  isolation:isolate;
}
.skills-arena-grid .skill-card-visual,
.skills-album-grid .skill-card-visual{
  position:relative;
  width:100%!important;
  aspect-ratio:2/3!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:16px!important;
  overflow:hidden!important;
  background:#17121b!important;
  line-height:0;
  contain:paint;
}
.skills-arena-grid .skill-card-visual>img,
.skills-album-grid .skill-card-visual>img{
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#17121b!important;
}
.skills-arena-grid .skill-card-visual>.skill-card-art,
.skills-album-grid .skill-card-visual>.skill-card-art{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  border-radius:0!important;
  overflow:hidden!important;
}

/* ===== v1.8.10 Consistent arena return buttons ===== */
#backToBattleModes,
#skillsBack,
#reflectionBack{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  width:auto!important;
  max-width:100%;
  white-space:nowrap!important;
  flex-wrap:nowrap!important;
  color:#fff!important;
  background:linear-gradient(135deg,#7437a6,#502070)!important;
  border:1px solid #a66cce!important;
  border-radius:999px!important;
  font-size:0!important;
  font-weight:800;
  line-height:1.15;
  text-decoration:none;
}
#backToBattleModes::after,
#skillsBack::after,
#reflectionBack::after{
  content:"Back to Battle Arena";
  color:#fff;
  font-size:.95rem;
  white-space:nowrap;
}
#backToBattleModes:hover,
#skillsBack:hover,
#reflectionBack:hover{
  color:#fff!important;
  background:linear-gradient(135deg,#8646b9,#602984)!important;
}

/* ===== v1.8.11 Reflection card placeholders and responsive rows ===== */
.reflection-arena-grid{
  grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))!important;
  align-items:stretch;
}
.reflection-arena-grid .reflection-card{
  width:100%;
  max-width:none;
  min-width:0;
}
.reflection-arena-grid .skill-card-visual{
  position:relative;
  width:100%;
  aspect-ratio:2/3;
  overflow:hidden;
}
.reflection-card-art-placeholder{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  align-content:center;
  gap:8px;
  padding:20px;
  overflow:hidden;
  text-align:center;
  color:#fff;
  background:radial-gradient(circle at 30% 20%,rgba(190,143,220,.42),transparent 34%),linear-gradient(145deg,#253829,#5a336f);
  border:2px dashed rgba(255,255,255,.5);
}
.reflection-card-art-placeholder span{font-size:clamp(2.2rem,7vw,4rem);line-height:1}
.reflection-card-art-placeholder strong{font-size:clamp(.85rem,2vw,1.15rem);letter-spacing:.08em}
.reflection-card-art-placeholder small{font-size:.72rem;opacity:.86}
.reflection-card-placeholder{opacity:.82}
.reflection-arena-grid .reflection-lock-note{grid-column:1/-1}
@media(max-width:620px){
  .reflection-arena-grid{grid-template-columns:1fr!important;padding:10px!important}
}

/* ===== v1.8.13 Match Story decision cards to the mission card width ===== */
.story-node.panel{
  width:100%!important;
  max-width:none!important;
  margin-inline:0!important;
  box-sizing:border-box;
}

/* ===== v1.8.14 Align Supply Hut resource actions across every row ===== */
.story-supply-grid{
  align-items:stretch;
}
.story-supply-grid article{
  display:flex;
  flex-direction:column;
  height:100%;
  min-width:0;
  box-sizing:border-box;
}
.story-supply-grid article>p{
  flex:1 1 auto;
}
.story-supply-grid [data-buy-resource]{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:48px;
  height:48px;
  margin-top:auto!important;
  line-height:1.15;
}

/* ===== v1.8.15 Story collectible reveal popup ===== */
.story-collectible-card{
  width:min(560px,96vw)!important;
  text-align:center;
  overflow:hidden!important;
  background:linear-gradient(180deg,#fff,#f5edf9)!important;
}
.story-collectible-card h2{margin:.15rem 0 1rem;font-size:clamp(1.8rem,5vw,2.8rem);color:#5b2a86}
#storyCollectibleVisual{
  width:min(330px,82vw);
  aspect-ratio:2/3;
  margin:0 auto;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:18px;
  background:#211a28;
  box-shadow:0 14px 34px rgba(48,25,57,.24);
}
#storyCollectibleVisual img{display:block;width:100%;height:100%;object-fit:contain;cursor:zoom-in}
#storyCollectibleName{display:grid;gap:3px;margin:14px 0}
#storyCollectibleName strong{font-size:1.25rem;color:#35233f}
#storyCollectibleName span{font-size:.84rem;color:var(--muted)}
.story-collectible-card .actions{justify-content:center}
.story-collectible-fallback{display:grid;place-items:center;align-content:center;gap:10px;color:#fff;padding:20px}
.story-collectible-fallback span{font-size:3.5rem}
@media(max-height:760px){#storyCollectibleVisual{width:min(230px,68vw)}}

/* ===== v1.8.16 Keep mission-end reflection and profile controls prominent ===== */
.story-mission-head>div>p:last-child{
  display:block!important;
  margin:.55rem 0 0!important;
  color:#35233f!important;
  font-size:1.08rem!important;
  font-weight:800!important;
  line-height:1.45!important;
}
.story-reflection{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  width:100%;
}
.story-profile-panel [data-complete-profile]{
  position:relative;
  z-index:1;
}
@media(max-width:760px){.story-reflection{grid-template-columns:1fr}}

/* ===== v1.8.17 Inbox Island return buttons and Supply Hut order ===== */
#backStoryMap{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  width:auto!important;
  max-width:100%;
  white-space:nowrap!important;
  color:#fff!important;
  background:linear-gradient(135deg,#7437a6,#502070)!important;
  border:1px solid #a66cce!important;
  border-radius:999px!important;
  font-size:0!important;
  font-weight:800;
  line-height:1.15;
}
#backStoryMap::after{
  content:"Back to Inbox Island";
  color:#fff;
  font-size:.95rem;
  white-space:nowrap;
}
#backStoryMap:hover{
  color:#fff!important;
  background:linear-gradient(135deg,#8646b9,#602984)!important;
}
#app:has(.supply-hut-hero){
  display:flex;
  flex-direction:column;
}
#app:has(.supply-hut-hero)>section{order:6}
#app:has(.supply-hut-hero)>.supply-hut-hero{order:1}
#app:has(.supply-hut-hero)>section:has(.market-heading){order:2}
#app:has(.supply-hut-hero)>.story-prep{order:3}
#app:has(.supply-hut-hero)>.resource-monster-story{order:4}
#app:has(.supply-hut-hero)>section:has(#hutRest){order:5}

/* ===== v1.8.18 Select collected Skills before the mission activity ===== */
#app:has(.story-location-mission-hero){
  display:flex;
  flex-direction:column;
}
#app:has(.story-location-mission-hero)>section{order:6}
#app:has(.story-location-mission-hero)>.story-location-mission-hero{order:1}
#app:has(.story-location-mission-hero)>.story-mission-head{order:2}
#app:has(.story-location-mission-hero)>.story-run-status{order:3}
#app:has(.story-location-mission-hero)>.story-skills{order:4}
#app:has(.story-location-mission-hero)>.story-node{order:5}
#app:has(.story-location-mission-hero)>.story-kit{order:6}
#app:has(.story-location-mission-hero)>.story-profile-panel{order:7}

/* ===== v1.8.19 Contain the unlocked Barry route artwork ===== */
.story-location-card.secret-card:not(.state-hidden):not(.state-hinted){
  overflow:hidden!important;
}
.story-location-card.secret-card:not(.state-hidden):not(.state-hinted)>.story-location-thumb{
  display:block!important;
  width:100%!important;
  height:auto!important;
  aspect-ratio:16/10!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:0 0 2px!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:18px!important;
  background:#17121b!important;
}

/* ===== v1.8.20 Align Supply Hut with the Barry route card ===== */
.story-location-card:has(#openSupplyHut)>.story-location-number{
  display:grid!important;
  visibility:hidden!important;
}
.story-location-card:has(#openSupplyHut)>.story-location-thumb-frame{
  grid-column:1/-1!important;
  width:100%!important;
  aspect-ratio:16/10!important;
  margin:0 0 2px!important;
  border-radius:18px!important;
}
.story-location-card:has(#openSupplyHut)>.story-location-thumb-frame img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
}
.story-location-card:has(#openSupplyHut)>div:not(.story-location-thumb-frame):not(.story-location-number){grid-column:auto}
.story-map-grid>.story-location-card{
  display:grid;
  grid-template-rows:auto 1fr auto;
  height:100%;
}
.story-map-grid>.story-location-card>button{
  align-self:end;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:48px;
  height:48px;
  line-height:1.15;
}

/* v1.8.21: Supply Hut now follows the Barry card's exact internal grid. */
.story-location-card:has(#openSupplyHut){
  grid-template-columns:auto 1fr!important;
  grid-template-rows:auto 1fr auto!important;
  align-items:start!important;
}

/* ===== v1.8.22 Balanced outer margins around Inbox Island cards ===== */
.story-map-grid.shell-edge{
  width:calc(100% + 16px);
  max-width:calc(100% + 16px);
  margin-left:-8px;
  margin-right:-8px;
  padding:18px!important;
  column-gap:16px!important;
  box-sizing:border-box;
}
@media(max-width:620px){
  .story-map-grid.shell-edge{
    width:100%;
    max-width:100%;
    margin-left:0;
    margin-right:0;
    padding:12px!important;
  }
}

/* ===== v1.8.23 Match Barry side-quest panel to its hero width ===== */
#app:has(.secret-route-screen)>.story-location-mission-hero,
#app:has(.secret-route-screen)>.secret-route-screen{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box;
}

/* ===== v1.8.24 Play-style badge assets ===== */
.play-style-badge{display:inline-block;width:34px;height:34px;object-fit:contain;vertical-align:middle;flex:0 0 auto;cursor:zoom-in}
.play-style-badge-large{width:clamp(92px,12vw,150px);height:clamp(92px,12vw,150px)}
.home-play-style-guide{padding:22px!important;margin:16px 0!important}
.home-play-style-guide>div:first-child{text-align:center;max-width:760px;margin:0 auto 18px}
.home-play-style-guide h2{margin:.15rem 0}.home-play-style-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.home-play-style-grid article{display:flex;flex-direction:column;align-items:center;text-align:center;padding:18px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(180deg,#fff,#f7f2f9)}
.home-play-style-grid h3{margin:.55rem 0 .2rem}.home-play-style-grid p{margin:.2rem 0}
.approach-bars>div>span{display:flex!important;align-items:center;gap:8px}
.play-style-result-row,.victory-approach{display:flex!important;flex-wrap:wrap;gap:14px;align-items:center}
.play-style-result-row>span,.victory-approach>span{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:14px;background:#f3edf6}
#usePlayerSpecial{display:inline-flex;align-items:center;justify-content:center;gap:8px}
#usePlayerSpecial .play-style-badge{width:28px;height:28px}
@media(max-width:720px){.home-play-style-grid{grid-template-columns:1fr}.home-play-style-grid article{padding:14px}.play-style-badge-large{width:110px;height:110px}}

/* ===== v1.8.25 The Study knowledge area ===== */
.knowledge-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,300px);gap:24px;align-items:center;padding:24px;border-radius:22px;background-image:linear-gradient(135deg,#fff,#f2edf7),linear-gradient(90deg,var(--purple),var(--green),var(--pink))}
.knowledge-hero h2{margin:.15rem 0;font-size:clamp(2rem,5vw,3.4rem)}.knowledge-progress{padding:18px;border-radius:18px;background:#fff;border:1px solid var(--line)}.knowledge-progress>strong{display:block;font-size:2rem;color:var(--purple)}.knowledge-progress>span{display:block;margin-bottom:10px}.knowledge-how{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.knowledge-how>div{display:grid;gap:3px;padding:12px;border-radius:14px;background:#f7f2f9}.knowledge-how span{font-size:.82rem;color:var(--muted)}
.knowledge-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:18px;border-radius:22px}.knowledge-card{display:grid;grid-template-columns:minmax(130px,34%) 1fr;gap:15px;padding:14px;border:2px solid #d7c8df;border-radius:20px;background:#fff;box-shadow:0 8px 20px rgba(49,28,57,.08)}.knowledge-card.is-complete{border-color:#78a86d}.knowledge-card.is-locked{filter:saturate(.35);opacity:.68}.knowledge-card-art{aspect-ratio:1/1;display:grid;place-items:center;align-content:center;gap:5px;text-align:center;border-radius:16px;color:#fff;background:radial-gradient(circle at 30% 20%,rgba(150,99,180,.55),transparent 36%),linear-gradient(145deg,#243a2a,#5a2d76)}.knowledge-card-art>span{font-size:2.6rem;line-height:1}.knowledge-card-art>strong{font-size:.78rem;letter-spacing:.08em}.knowledge-card-art>small{font-size:.7rem}.knowledge-card-copy{display:flex;flex-direction:column;min-width:0}.knowledge-card-copy h3{margin:.35rem 0}.knowledge-card-copy p{margin:.2rem 0 .7rem}.knowledge-card-copy>button{margin-top:auto;min-height:46px}
.knowledge-modal-card{width:min(760px,96vw)!important}.knowledge-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}.knowledge-modal-head h2{margin:.1rem 0}.knowledge-question-progress{display:flex;justify-content:space-between;gap:12px;margin:18px 0 10px;padding:10px 12px;border-radius:12px;background:#f3edf6}.knowledge-question{padding:18px;border:1px solid var(--line);border-radius:18px}.knowledge-question h3{margin-top:0}.knowledge-answers{display:grid;gap:10px}.knowledge-answers button{text-align:left;border-radius:14px}.knowledge-answers button.is-correct{background:#dcefdc;color:#244b2b;border:2px solid #67a16c}.knowledge-answers button.is-wrong{background:#f6dfe5;color:#73243a;border:2px solid #c9768b}.knowledge-feedback{margin-top:14px;padding:14px;border-radius:14px;background:#f5eff8}.knowledge-feedback p{margin:.3rem 0 .8rem}.knowledge-complete{text-align:center;padding:28px}.knowledge-complete>span{display:grid;place-items:center;width:76px;height:76px;margin:auto;border-radius:50%;background:#5b2a86;color:#fff;font-size:2.5rem}.knowledge-complete h3{font-size:1.8rem;margin:.7rem 0}
@media(max-width:820px){.knowledge-grid{grid-template-columns:1fr}.knowledge-hero{grid-template-columns:1fr}.knowledge-how{grid-template-columns:1fr}}
@media(max-width:520px){.knowledge-grid{padding:10px}.knowledge-card{grid-template-columns:1fr}.knowledge-card-art{max-width:180px;width:100%;margin:auto}}

/* ===== v1.8.26 Full-width responsive Skills card grids ===== */
.skills-arena-grid,
.skills-album-grid{
  display:grid!important;
  width:100%!important;
  max-width:none!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:16px!important;
  align-items:stretch;
  padding:18px!important;
}
.skills-arena-grid>.skill-card,
.skills-album-grid>.skill-card{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  height:100%;
}
@media(max-width:1080px){
  .skills-arena-grid,.skills-album-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:820px){
  .skills-arena-grid,.skills-album-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:14px!important}
}
@media(max-width:520px){
  .skills-arena-grid,.skills-album-grid{grid-template-columns:1fr!important;padding:10px!important}
}

/* ===== v1.8.27 Start-page feature instructions ===== */
.home-feature-guide>div{display:flex;flex-direction:column;min-width:0}
.home-feature-guide>div>button{align-self:flex-start;margin-top:auto;min-height:44px;background:#5b2a86;color:#fff}
.home-feature-guide>div>button:hover{background:#713a98;color:#fff}

/* ===== v1.8.28 Side Quest hub and start-page guide ===== */
.home-side-quest-guide{grid-column:1/-1}.home-side-quest-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:.55rem 0}.home-side-quest-list span{padding:8px 10px;border-radius:12px;background:#f2eaf6;font-size:.8rem;font-weight:700}.home-side-quest-guide small{color:var(--muted)}
.side-quest-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(190px,270px);gap:22px;align-items:center;padding:24px;border-radius:22px}.side-quest-hero h2{margin:.15rem 0;font-size:clamp(2rem,5vw,3.2rem)}.side-quest-progress{padding:18px;border:1px solid var(--line);border-radius:18px;background:#fff}.side-quest-progress strong{display:block;font-size:2rem;color:var(--purple)}.side-quest-progress span{font-size:.84rem;color:var(--muted)}
.side-quest-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;padding:18px;margin-top:16px;border-radius:22px}.side-quest-card{display:flex;flex-direction:column;gap:10px;min-width:0;padding:12px;border:2px solid #d5c6dd;border-radius:22px;background:linear-gradient(180deg,#fff,#faf6fb);box-shadow:0 8px 20px rgba(49,28,57,.09)}.side-quest-card.is-complete{border-color:#78a86d}.side-quest-card.is-locked{filter:saturate(.35);opacity:.68}.side-quest-card-art{width:100%;aspect-ratio:2/3;display:grid;place-items:center;align-content:center;gap:7px;text-align:center;border-radius:16px;color:#fff;background:radial-gradient(circle at 30% 20%,rgba(161,106,192,.5),transparent 35%),linear-gradient(145deg,#263b2b,#5c2f76)}.side-quest-card-art>span{font-size:3rem}.side-quest-card-art>strong{font-size:.78rem;letter-spacing:.08em}.side-quest-card-art>small{font-size:.68rem}.side-quest-card-copy{display:flex;flex-direction:column;flex:1;min-width:0}.side-quest-card-copy h3{margin:.35rem 0}.side-quest-card-copy p{margin:.2rem 0 .8rem}.side-quest-card-copy button{width:100%;min-height:46px;margin-top:auto}
@media(max-width:1050px){.side-quest-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){.side-quest-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.side-quest-hero{grid-template-columns:1fr}}
@media(max-width:520px){.side-quest-grid{grid-template-columns:1fr;padding:10px}.home-side-quest-list{grid-template-columns:1fr}}

/* ===== v1.8.29 Unsquashed responsive Pin Badge Cabinet sets ===== */
.badge-cabinet .badge-category{
  width:100%;
  min-width:0;
}
.badge-cabinet .badge-grid{
  display:grid!important;
  width:100%!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch;
}
.badge-cabinet .badge-card{
  width:100%;
  min-width:0;
  height:100%;
}
@media(max-width:1080px){
  .badge-cabinet .badge-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:820px){
  .badge-cabinet .badge-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:520px){
  .badge-cabinet .badge-grid{grid-template-columns:1fr!important}
}

/* ===== v1.8.30 Align Pin to profile pills across badge rows ===== */
.badge-cabinet .badge-card>div{
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:100%;
}
.badge-cabinet .badge-card>div>button[data-pin-badge]{
  align-self:flex-start;
  min-height:36px;
  margin-top:auto!important;
  white-space:nowrap;
}

/* ===== v1.8.31 Tiered Battle, Story and Superpower approach achievements ===== */
.home-play-style-grid article:nth-child(1),.battle-approach-panel .approach-bars>div:nth-child(1),.approach-defensive{background-color:#f8e5f2!important;border-color:#cf4c91!important}
.home-play-style-grid article:nth-child(2),.battle-approach-panel .approach-bars>div:nth-child(2),.approach-proactive{background-color:#e8f3e6!important;border-color:#659a61!important}
.home-play-style-grid article:nth-child(3),.approach-superpower{background-color:#eee4f7!important;border-color:#71409c!important}
.approach-achievement-sheet{padding:20px!important;margin:18px 0}.approach-sheet-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.approach-sheet-head h2{margin:.15rem 0}.approach-tier-head,.approach-sheet-row{display:grid;grid-template-columns:150px repeat(5,minmax(0,1fr));gap:10px;align-items:stretch}.approach-tier-head{margin:18px 0 8px}.approach-tier-head strong{text-align:center;text-transform:uppercase;font-size:.78rem;color:#5b2a86}.approach-sheet-row{margin-bottom:12px}.approach-row-label{display:flex;flex-direction:column;justify-content:center;padding:14px;border-radius:16px;text-transform:capitalize}.approach-row-label small{margin-top:4px}.approach-badge-slot{display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0;padding:9px;border:1px solid var(--line);border-radius:16px;background:#fff}.approach-badge-art{position:relative;width:100%;aspect-ratio:1;display:grid;place-items:center}.approach-badge-art img{width:100%;height:100%;object-fit:contain}.approach-badge-art span{display:none;position:absolute;inset:auto 8px 8px auto;width:30px;height:30px;place-items:center;border-radius:50%;background:#3b2b42;color:#fff}.approach-badge-slot.locked img{filter:grayscale(1) saturate(0);opacity:.24}.approach-badge-slot.locked .approach-badge-art span{display:grid}.approach-badge-slot.tier-locked{opacity:.62}.approach-badge-slot>strong{font-size:.78rem}.approach-badge-slot>small{font-size:.67rem;color:var(--muted)}.approach-badge-slot.earned{border-color:#75a36d;background:#fbfff9}.approach-cabinet-placeholder>.approach-achievement-sheet{border:0!important;margin:0!important;box-shadow:none!important}.approach-cabinet-placeholder .approach-sheet-head>div>p:first-child{display:none}
.player-approach-rank{margin-top:16px;padding:16px;border:2px solid;border-radius:18px}.player-approach-rank h3{margin:.15rem 0}.player-approach-rank button{margin-top:7px}.approach-feedback-card{width:min(650px,96vw)!important}.approach-feedback-rank{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:14px;border:2px solid;border-radius:16px;text-transform:capitalize}.approach-feedback-rank strong{font-size:1.25rem}.approach-feedback-scores{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:14px 0}.approach-feedback-scores span{padding:11px;text-align:center;border-radius:13px;background:#f4eff6}.approach-feedback-scores strong{display:block;font-size:1.35rem}.approach-feedback-card li{margin:.5rem 0}
@media(max-width:900px){.approach-tier-head{display:none}.approach-sheet-row{grid-template-columns:repeat(2,minmax(0,1fr))}.approach-row-label{grid-column:1/-1}.approach-sheet-head{flex-direction:column}}
@media(max-width:520px){.approach-sheet-row{grid-template-columns:1fr}.approach-feedback-scores{grid-template-columns:1fr}}

/* ===== v1.8.32 Separate ND Superpower badge sheet (Badge Cabinet only) ===== */
.superpower-badge-sheet{padding:20px!important;margin:0!important}.superpower-sheet-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.superpower-sheet-head h2{margin:.15rem 0}.superpower-sheet-head>strong{padding:10px 14px;border-radius:999px;background:#5b2a86;color:#fff;white-space:nowrap}.superpower-badge-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}.superpower-badge-card{display:flex;flex-direction:column;align-items:center;min-width:0;padding:14px;text-align:center;border:2px solid #d6c7df;border-radius:20px;background:#fff}.superpower-badge-card h3{margin:.45rem 0 .1rem;font-size:1rem}.superpower-badge-card p{margin:.15rem 0 .55rem;font-size:.82rem}.superpower-badge-card small{margin-top:auto}.superpower-badge-card button{min-height:38px;margin-top:10px;background:#5b2a86;color:#fff}.superpower-badge-art{position:relative;width:100%;aspect-ratio:1;display:grid;place-items:center}.superpower-badge-art img{width:100%;height:100%;object-fit:contain;cursor:zoom-in}.superpower-badge-art span{position:absolute;right:8px;bottom:8px;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#38283e;color:#fff}.superpower-badge-card.locked img{filter:grayscale(1) saturate(0);opacity:.24}.superpower-badge-card.earned{border-color:#7a4ca0;background:linear-gradient(180deg,#fff,#f6effb)}.superpower-cabinet-category>.superpower-badge-sheet{border:0!important;box-shadow:none!important}
@media(max-width:900px){.superpower-badge-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.superpower-sheet-head{flex-direction:column}}
@media(max-width:680px){.superpower-badge-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:430px){.superpower-badge-grid{grid-template-columns:1fr}}

/* ===== v1.8.33 The Study arena hero + Legal Literacy embedded side quest ===== */
.knowledge-hero{grid-template-columns:minmax(0,1.55fr) minmax(0,.9fr) minmax(210px,300px)!important}.knowledge-arena-hero{grid-row:1;grid-column:1;overflow:hidden;border-radius:20px;background:#eef1f2}.knowledge-arena-hero img{display:block;width:100%;aspect-ratio:1.245/1;object-fit:contain;cursor:zoom-in}.knowledge-hero>div:not(.knowledge-arena-hero):not(.knowledge-progress){grid-column:2}.knowledge-progress{grid-column:3}.legal-literacy-card-art{padding:0!important;overflow:hidden;background:#eef1f2!important}.legal-literacy-card-art img{width:100%;height:100%;object-fit:cover}.side-quest-image-art{padding:0!important;overflow:hidden}.side-quest-image-art img{width:100%;height:100%;object-fit:cover;cursor:zoom-in}.legal-literacy-modal-card{width:min(1240px,97vw)!important;overflow:hidden}.legal-literacy-modal-card header,.legal-literacy-modal-card footer{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 18px;background:#f4eff6}.legal-literacy-modal-card h2{margin:.1rem 0}.legal-literacy-embed{display:block;width:100%;height:min(76vh,820px);border:0;background:#fff}.legal-literacy-modal-card footer{border-top:1px solid var(--line)}.legal-literacy-modal-card a.button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
@media(max-width:1000px){.knowledge-hero{grid-template-columns:1fr 1fr!important}.knowledge-arena-hero{grid-column:1/-1}.knowledge-hero>div:not(.knowledge-arena-hero):not(.knowledge-progress){grid-column:1}.knowledge-progress{grid-column:2}}
@media(max-width:620px){.knowledge-hero{grid-template-columns:1fr!important}.knowledge-arena-hero,.knowledge-hero>div:not(.knowledge-arena-hero):not(.knowledge-progress),.knowledge-progress{grid-column:1}.legal-literacy-modal-card header,.legal-literacy-modal-card footer{align-items:stretch;flex-direction:column}.legal-literacy-modal-card header button,.legal-literacy-modal-card footer>*{width:100%}}

/* ===== v1.8.36 Updated start-page How to guide ===== */
.home-howto-step:has([data-home-guide-view="badges"]),.home-howto-step:has([data-home-guide-view="achievements"]){border-color:#b99bc9}.home-howto-step:has([data-home-guide-view="knowledge"]){border-color:#789b61}.home-howto-step:has([data-home-guide-view="sidequests"]){border-color:#8a5ca3}.home-side-quest-guide button{align-self:flex-start;margin-top:10px;background:#5b2a86;color:#fff}

/* ===== v1.8.37 Equal-height Supply Hut resource buttons ===== */
.story-supply-grid article{display:flex;flex-direction:column;min-width:0;height:100%;box-sizing:border-box}.story-supply-grid article>p{flex:1}.story-supply-grid article>button[data-buy-resource]{display:flex;align-items:center;justify-content:center;width:100%;min-height:52px;height:52px;margin-top:12px;padding:8px 12px;line-height:1.15}

/* ===== v1.8.38 Supply Hut Legal Literacy redemption infrastructure ===== */
.legal-redemption-card{display:grid;grid-template-columns:minmax(180px,280px) 1fr;gap:24px;align-items:center;background:linear-gradient(135deg,#fffaf0,#f1eaf7)}.legal-redemption-icons{display:flex;justify-content:center;align-items:center;min-height:180px}.legal-redemption-icons img{width:clamp(92px,10vw,132px);height:clamp(92px,10vw,132px);object-fit:contain;margin:0 -18px}.legal-redemption-card h2{margin:.15rem 0}.legal-redemption-card>div:last-child{display:flex;flex-direction:column;align-items:flex-start}.legal-redemption-card button{min-height:48px;margin-top:12px}.legal-redemption-card small{margin-top:8px;color:var(--muted)}.legal-redemption-balance{display:flex;align-items:center;gap:12px;margin-top:10px;padding:10px 14px;border-radius:14px;background:#fff}.legal-redemption-balance strong{font-size:1.5rem;color:#5b2a86}.legal-redemption-modal-card{width:min(760px,96vw)!important}.legal-redemption-modal-balance{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-radius:16px;background:#eee8f5}.legal-redemption-modal-balance strong{font-size:1.7rem;color:#5b2a86}.legal-redemption-empty{text-align:center;margin-top:16px;padding:28px;border:2px dashed #cbb9d6;border-radius:18px;background:#faf7fb}.legal-redemption-empty>span{display:block;font-size:3rem}.legal-redemption-empty h3{margin:.4rem 0}.legal-redemption-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.legal-redemption-options article{display:flex;flex-direction:column;padding:14px;border:1px solid var(--line);border-radius:16px}.legal-redemption-options button{margin-top:auto}.legal-redemption-status{min-height:1.4em;font-weight:800}.legal-redemption-status.success{color:#24603d}.legal-redemption-status.error{color:#9c2f3e}
@media(max-width:680px){.legal-redemption-card{grid-template-columns:1fr}.legal-redemption-icons{min-height:auto}.legal-redemption-options{grid-template-columns:1fr}}

/* ===== v1.8.39 Story Monster Discovery Pack reward ===== */
.story-pack-reward{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;margin:12px 0;padding:13px 15px;border:2px solid #8c60a5;border-radius:16px;background:linear-gradient(135deg,#f5edf9,#fff9e8)}.story-pack-reward>span{font-size:2rem}.story-pack-reward strong,.story-pack-reward small{display:block}.story-pack-reward button{min-height:42px;background:#5b2a86;color:#fff}
@media(max-width:560px){.story-pack-reward{grid-template-columns:auto 1fr}.story-pack-reward button{grid-column:1/-1;width:100%}}

/* ===== v1.8.40 Enemy Boss Special Enemy reward and rare pack pool ===== */
.special-enemy-award{display:grid;grid-template-columns:minmax(120px,190px) 1fr;gap:18px;align-items:center;margin:0 0 16px;padding:14px;border:2px solid #ad6db7;border-radius:18px;background:linear-gradient(135deg,#f2e3f6,#fff4dc)}.special-enemy-award img{width:100%;max-height:260px;object-fit:contain;border-radius:14px;cursor:zoom-in}.special-enemy-award h3{margin:.15rem 0}.special-enemy-pack-notice{margin:14px 0;border-color:#ad6db7!important;background:#f7edf9!important}.special-enemy-pack-notice strong{color:#5b2a86}
@media(max-width:560px){.special-enemy-award{grid-template-columns:1fr}.special-enemy-award img{max-height:300px}}

/* ===== v1.8.41 Story world Special Support reward popup ===== */
.world-reward-modal-card{width:min(620px,96vw)!important;text-align:center;background:linear-gradient(145deg,#fff,#f4eaf8)}.world-reward-modal-card>div>img{display:block;width:min(360px,82%);max-height:520px;margin:12px auto;object-fit:contain;border-radius:18px;cursor:zoom-in;box-shadow:0 12px 30px rgba(53,26,66,.18)}.world-reward-modal-card h2{margin:.15rem 0}.world-reward-modal-card h3{font-size:1.5rem;margin:.55rem 0}.world-reward-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}.world-reward-actions button{min-height:48px}
@media(max-width:480px){.world-reward-actions{grid-template-columns:1fr}}

/* ===== v1.8.42 Focused Trade visit and Barry advice ===== */
.focused-trade-hub{position:relative}.focused-trade-head{display:flex;justify-content:space-between;align-items:flex-start;gap:22px}.focused-trade-head h2{margin:.15rem 0}.trade-visit-status{display:flex;justify-content:space-between;gap:16px;margin:16px 0;padding:12px 16px;border-radius:14px;background:#f1e9f5}.trade-visit-status strong{color:#5b2a86}.barry-trade-advice-button{display:flex;align-items:center;gap:9px;min-height:52px;margin:0 0 14px;padding:5px 15px 5px 6px;border-radius:999px;background:#5b2a86;color:#fff}.barry-trade-advice-button img{width:42px;height:42px;object-fit:cover;border-radius:50%;background:#fff}.focused-market-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.focused-market-card{display:flex;flex-direction:column;min-width:0;overflow:hidden;border:2px solid #d7c7df;border-radius:20px;background:#fff}.focused-market-card.attack{border-color:#a75c89}.focused-market-art{aspect-ratio:2/3;overflow:hidden;background:#241c29}.focused-market-art img{width:100%;height:100%;object-fit:cover;cursor:zoom-in}.focused-market-art>span{display:grid;place-items:center;height:100%;color:#fff}.focused-market-copy{display:flex;flex-direction:column;flex:1;padding:13px}.focused-market-copy h3{margin:.35rem 0}.focused-market-copy p{font-size:.82rem}.focused-market-copy button{width:100%;min-height:48px;margin-top:auto}.barry-trade-modal-card{width:min(650px,96vw)!important}.barry-trade-advice-head{display:grid;grid-template-columns:100px 1fr;gap:16px;align-items:center}.barry-trade-advice-head img{width:100px;height:100px;object-fit:cover;border-radius:50%;background:#f2eafa}.barry-trade-advice-head h2{margin:.15rem 0}.barry-trade-modal-card li{margin:.55rem 0}
@media(max-width:1050px){.focused-market-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.focused-trade-head,.trade-visit-status{flex-direction:column}.focused-market-grid{grid-template-columns:1fr}.focused-market-art{max-height:480px}.barry-trade-advice-head{grid-template-columns:72px 1fr}.barry-trade-advice-head img{width:72px;height:72px}}

/* ===== v1.8.34 Separate Study arena hero from Legal Literacy card art ===== */
.knowledge-arena-hero img{aspect-ratio:4/3!important;object-fit:contain!important;background:#172016}

/* ===== v1.8.45 Skills grid width repair =====
   Keep four comfortable cards across the full Skills container on desktop,
   then let the grid reflow from the container's available width rather than
   forcing four narrow columns into embedded/narrow layouts. */
.skills-arena-grid,
.skills-album-grid{
  display:grid!important;
  width:100%!important;
  max-width:none!important;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr))!important;
  gap:16px!important;
  padding:18px!important;
  align-items:stretch!important;
}
.skills-arena-grid>.skill-card,
.skills-album-grid>.skill-card{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
}
@media(max-width:820px){
  .skills-arena-grid,.skills-album-grid{padding:14px!important}
}
@media(max-width:520px){
  .skills-arena-grid,.skills-album-grid{padding:10px!important;gap:12px!important}
}


/* ===== v1.8.46 Supplied Side Quest and Milo Reflection artwork ===== */
.reflection-card-art{overflow:hidden;background:#17121b!important}
.reflection-card-art img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;cursor:zoom-in}
.reflection-story-card>.reflection-story-card-art{grid-column:1/-1;display:block;width:100%;max-height:460px;object-fit:contain;object-position:center;border-radius:18px;background:#17121b;cursor:zoom-in}
@media(max-width:760px){.reflection-story-card>.reflection-story-card-art{max-height:none}}

/* v1.8.47 approach badge/icon wiring */
.approach-style-icon{width:42px;height:42px;object-fit:contain;flex:0 0 auto}
.approach-row-label{display:flex!important;flex-direction:row!important;align-items:center;gap:10px}
.approach-row-label>div{display:flex;flex-direction:column;min-width:0}
.approach-feedback-scores span,.approach-rank-scores span{display:flex;align-items:center;gap:7px}
.approach-feedback-scores .approach-style-icon,.approach-rank-scores .approach-style-icon{width:34px;height:34px}
.approach-rank-scores{display:flex;flex-wrap:wrap;gap:8px 14px;margin:.55rem 0}
.approach-rank-scores span{padding:7px 10px;border-radius:14px;background:rgba(255,255,255,.72);font-weight:800}
.approach-badge-art img{cursor:zoom-in}
@media(max-width:520px){.approach-row-label{justify-content:flex-start}.approach-style-icon{width:38px;height:38px}}


/* v1.8.48 — one-line primary navigation + Album-hosted achievement collections */
.tabs{display:grid!important;grid-template-columns:repeat(10,minmax(0,1fr));gap:6px;flex-wrap:nowrap!important;align-items:stretch}
.tabs button{min-width:0;padding:10px 7px;font-size:clamp(.72rem,1vw,.88rem);white-space:nowrap}
@media(max-width:900px){.tabs{grid-template-columns:repeat(5,minmax(0,1fr))}.tabs button{font-size:.84rem}}
@media(max-width:560px){.tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.tabs button{white-space:normal;min-height:44px}}
.achievements-album-page{display:block!important}
.achievements-album-content>.panel,.achievements-album-content>.badge-sheet,.achievements-album-content>.player-approach-rank,.achievements-album-content>.approach-badge-sheet,.achievements-album-content>.superpower-badge-sheet{margin:14px 0}
.achievement-set-section{margin:14px 0 20px;padding:18px;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:var(--shadow)}
.achievement-set-heading h2,.achievement-set-heading p{margin:.25rem 0}
.achievement-set-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:16px}
.achievement-set-card{display:flex;flex-direction:column;min-width:0;overflow:hidden;border:2px solid #d9cee2;border-radius:20px;background:linear-gradient(180deg,#fff,#faf6fc);box-shadow:0 8px 18px rgba(52,27,68,.10)}
.achievement-set-card-art{aspect-ratio:3/2;overflow:hidden;background:#f2edf3;border-bottom:1px solid var(--line)}
.achievement-set-card-art img{display:block;width:100%;height:100%;object-fit:contain;cursor:zoom-in}
.achievement-set-card-copy{padding:15px;display:flex;flex-direction:column;gap:7px;flex:1}
.achievement-set-card-copy h3,.achievement-set-card-copy p{margin:0}
.achievement-set-card-copy>small{color:var(--muted);margin-top:auto}
.achievement-set-progress{display:flex;align-items:baseline;gap:8px;background:#f0e8f4;border-radius:14px;padding:10px 12px}
.achievement-set-progress strong{font-size:1.35rem;color:var(--purple)}
.achievement-set-progress span{font-size:.82rem;color:var(--muted)}
@media(max-width:900px){.achievement-set-card-grid{grid-template-columns:1fr}}

/* ===== v1.8.49 Image frame repair: fill frames cleanly without letterboxing ===== */
/* Hero and feature artwork is always proportionally cropped to the frame. The frame contains the crop. */
.story-world-hero,
.story-location-mission-hero,
.supply-hut-hero,
.arena-feature-hero,
.knowledge-arena-hero,
.side-quest-card-art,
.barrry-sidequest-preview,
.barry-sidequest-preview,
.story-location-thumb-frame,
.story-location-card{
  overflow:hidden!important;
}
.story-world-hero>img:first-child,
.story-location-mission-hero>img,
.supply-hut-hero>img,
.arena-feature-hero>img,
.knowledge-arena-hero>img,
.side-quest-image-art>img,
.barrry-sidequest-preview>img,
.barry-sidequest-preview>img,
.story-location-thumb-frame>img,
.story-location-card>.story-location-thumb{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  background:transparent!important;
  margin:0!important;
}
/* Stable hero proportions; crop rather than black/empty bars. */
.story-location-mission-hero,
.supply-hut-hero,
.arena-feature-hero,
.knowledge-arena-hero{aspect-ratio:16/9!important;}
.story-world-hero>img:first-child{min-height:100%!important;}
.story-location-mission-hero>img,
.supply-hut-hero>img,
.arena-feature-hero>img,
.knowledge-arena-hero>img{aspect-ratio:auto!important;max-height:none!important;}
.story-location-card>.story-location-thumb,
.story-location-thumb-frame{aspect-ratio:16/10!important;}
.side-quest-card-art{aspect-ratio:4/3!important;background:#eef1f2!important;}
.side-quest-image-art>img{border-radius:16px!important;}
.barrry-sidequest-preview,
.barry-sidequest-preview{aspect-ratio:16/9!important;background:#eef1f2!important;}
/* Barry hidden-route card: specifically remove the old dark letterbox treatment. */
.story-location-card.secret-card:not(.state-hidden):not(.state-hinted)>.story-location-thumb{
  height:100%!important;
  aspect-ratio:16/10!important;
  object-fit:cover!important;
  background:transparent!important;
}
@media(max-width:700px){
  .story-location-mission-hero,.supply-hut-hero,.arena-feature-hero,.knowledge-arena-hero{aspect-ratio:4/3!important;}
  .side-quest-card-art{aspect-ratio:16/10!important;}
}

/* v1.8.51 — supplied Monster Knowledge Check artwork */
.knowledge-card-art.has-image{position:relative;overflow:hidden;padding:0;min-height:180px;background:#eee7dc}
.knowledge-card-art.has-image>img{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover;object-position:center}
.knowledge-card-art.has-image>strong,.knowledge-card-art.has-image>small{position:absolute;z-index:2;left:12px;background:rgba(255,255,255,.9);padding:4px 8px;border-radius:999px}
.knowledge-card-art.has-image>strong{top:12px}.knowledge-card-art.has-image>small{bottom:12px}

/* ===== v1.8.51 Skills grid repair: three cards per row ===== */
.skills-arena-grid,
.skills-album-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;
  align-items:stretch!important;
  width:100%!important;
}
.skills-arena-grid .skill-card,
.skills-album-grid .skill-card{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
}
.skills-arena-grid .skill-card-visual,
.skills-album-grid .skill-card-visual{
  width:100%!important;
  aspect-ratio:4/5!important;
  min-height:0!important;
}
.skills-arena-grid .skill-card-copy h3,
.skills-album-grid .skill-card-copy h3{font-size:1.05rem!important}
.skills-arena-grid .skill-card-copy p,
.skills-album-grid .skill-card-copy p{font-size:.9rem!important}

/* Keep three across in the narrower portal/embed layout; only reflow when genuinely compact. */
@media(max-width:500px){
  .skills-arena-grid,
  .skills-album-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:10px!important;gap:10px!important}
}
@media(max-width:360px){
  .skills-arena-grid,
  .skills-album-grid{grid-template-columns:1fr!important}
}


/* ===== v1.8.52 Navigation, Study image and Reflection card layout ===== */
/* Two centred desktop navigation rows: gameplay first, collection/economy second. */
.tabs{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  max-width:1180px!important;
  margin:0 auto!important;
  padding:8px!important;
}
.tabs-row{
  width:100%;
  display:flex;
  flex-wrap:nowrap;
  align-items:stretch;
  justify-content:center;
  gap:8px;
}
.tabs-row-primary button{flex:0 1 150px}
.tabs-row-collection button{flex:0 1 150px}
/* 2pt rainbow gradient border follows the pill shape. */
.tabs button,
.album-tabs button{
  position:relative;
  border:2px solid transparent!important;
  border-radius:999px!important;
  background:
    linear-gradient(#eee6f2,#eee6f2) padding-box,
    linear-gradient(90deg,var(--purple),var(--pink),var(--green),var(--indigo,#3F51B5),var(--purple)) border-box!important;
  color:var(--ink)!important;
  background-origin:border-box!important;
  background-clip:padding-box,border-box!important;
  min-height:42px;
}
.tabs button.active,
.album-tabs button.active{
  background:
    linear-gradient(var(--purple),var(--purple)) padding-box,
    linear-gradient(90deg,var(--purple),var(--pink),var(--green),#3F51B5,var(--purple)) border-box!important;
  color:#fff!important;
}
.tabs button:hover,
.album-tabs button:hover{transform:translateY(-1px)}
@media(max-width:760px){
  .tabs-row{flex-wrap:wrap}
  .tabs-row-primary button,.tabs-row-collection button{flex:1 1 calc(50% - 8px);max-width:240px}
}
@media(max-width:420px){
  .tabs-row-primary button,.tabs-row-collection button{flex:1 1 100%;max-width:none}
}

/* The Study location hero must show the complete supplied artwork: no crop. */
.knowledge-arena-hero{
  width:100%!important;
  aspect-ratio:auto!important;
  min-height:0!important;
  overflow:hidden!important;
  display:grid!important;
  place-items:center!important;
  background:#f5efe5!important;
}
.knowledge-arena-hero>img{
  position:static!important;
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important;
  margin:0!important;
}
/* Monster Knowledge Check artwork has no floating Study/Quiz pills. */
.knowledge-card-art.has-image>strong,
.knowledge-card-art.has-image>small{display:none!important}

/* Reflection Arena: exactly three cards per row on desktop, responsive below that. */
.reflection-arena-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:18px!important;
  align-items:stretch!important;
  padding:18px!important;
}
.reflection-arena-grid .reflection-card{
  display:flex!important;
  flex-direction:column!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  height:100%!important;
}
.reflection-arena-grid .reflection-card .skill-card-copy{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
}
.reflection-arena-grid .reflection-card .skill-card-actions{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:9px!important;
  margin-top:auto!important;
  padding-top:14px!important;
  align-items:stretch!important;
}
/* Match arena encounter-card actions: equal height, bottom aligned and full width. */
.reflection-arena-grid .reflection-card .skill-card-actions button{
  width:100%!important;
  min-height:46px!important;
  margin:0!important;
  padding:10px 12px!important;
  border-radius:999px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  font-weight:800!important;
}
.reflection-arena-grid .reflection-card .skill-card-actions .primary{
  background:linear-gradient(135deg,#7437a6,#502070)!important;
  color:#fff!important;
  border:1px solid #a66cce!important;
}
.reflection-arena-grid .reflection-card .skill-card-actions .secondary{
  background:#f0e8f4!important;
  color:var(--ink)!important;
  border:1px solid #cbb9d6!important;
}
@media(max-width:900px){
  .reflection-arena-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:600px){
  .reflection-arena-grid{grid-template-columns:1fr!important;padding:10px!important}
  .reflection-arena-grid .reflection-card .skill-card-actions{grid-template-columns:1fr!important}
}

/* ===== v1.8.53 Inbox Island reflection hero artwork ===== */
.reflection-story-card{
  overflow:hidden;
}
.reflection-story-card>.reflection-story-card-art{
  grid-column:1/-1;
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:1456/1024;
  max-height:none;
  object-fit:cover;
  object-position:center;
  background:transparent;
  border-radius:18px;
  overflow:hidden;
}
@media(max-width:760px){
  .reflection-story-card>.reflection-story-card-art{
    aspect-ratio:1456/1024;
    max-height:none;
  }
}


/* ===== v1.8.54 Hidden-route image fit + three-across Skills ===== */
/* Hidden route: use the supplied artwork at its natural ratio. No crop, no letterbox bars. */
.secret-route-hero{
  width:100%!important;
  min-height:0!important;
  aspect-ratio:auto!important;
  padding:0!important;
  overflow:hidden!important;
  display:block!important;
  background:transparent!important;
}
.secret-route-hero>img,
.barrry-sidequest-preview>img,
.barry-sidequest-preview>img{
  position:static!important;
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-width:100%!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  border-radius:16px!important;
}
.barrry-sidequest-preview,.barry-sidequest-preview{
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  padding:0!important;
  overflow:hidden!important;
  background:transparent!important;
}
.secret-route-screen{text-align:center}
.secret-route-screen>.notice{text-align:left}
.secret-route-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:center!important;
  align-items:stretch!important;
  gap:10px!important;
  margin:14px auto 0!important;
}
.secret-route-actions button{
  margin:0!important;
  min-height:44px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
}

/* Skills use the same three-card rhythm, equal-height card structure and bottom-aligned actions as Reflection. */
.skills-arena-grid,
.skills-album-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:18px!important;
  align-items:stretch!important;
  padding:18px!important;
}
.skills-arena-grid .skill-card.game-card-style,
.skills-album-grid .skill-card.game-card-style{
  display:flex!important;
  flex-direction:column!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  height:100%!important;
}
.skills-arena-grid .skill-card-copy,
.skills-album-grid .skill-card-copy{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
}
.skills-arena-grid .skill-card-actions,
.skills-album-grid .skill-card-actions{
  margin-top:auto!important;
  padding-top:14px!important;
  align-items:stretch!important;
}
.skills-arena-grid .skill-card-actions button,
.skills-album-grid .skill-card-actions button{
  width:100%!important;
  min-height:46px!important;
  margin:0!important;
  padding:10px 12px!important;
  border-radius:999px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  font-weight:800!important;
}
/* Keep three across at normal portal/embed widths; step down only when the cards genuinely need it. */
@media(max-width:700px){
  .skills-arena-grid,.skills-album-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:12px!important}
}
@media(max-width:460px){
  .skills-arena-grid,.skills-album-grid{grid-template-columns:1fr!important;padding:10px!important}
  .secret-route-actions{flex-direction:column!important}
  .secret-route-actions button{width:100%!important}
}


/* ===== v1.8.55 dedicated Skills/Reflection screens + UI refinements ===== */
/* Keep the primary navigation in the requested order and centred as one gameplay row. */
.tabs-row-primary{justify-content:center!important}
.tabs-row-collection{justify-content:center!important}

/* Home information cards 10–14: visible breathing room before their action buttons. */
.home-howto-step button,.home-feature-guide button{margin-top:12px!important}

/* Player selection: separate Pause/Reflect ability copy from the special action. */
.character-selected #usePlayerSpecial{margin-top:16px!important}
.character-selected .notice + #usePlayerSpecial{margin-top:18px!important}

/* Badge cabinet tier cards keep the tactile card shape rather than square corners. */
.badge-tier-strip article{border-radius:22px!important;overflow:hidden}
.badge-tier-strip article img{border-radius:16px!important}

/* Small help action beneath compact token cards in Story/Battle. */
.play-style-help-button{display:block;width:max-content;max-width:100%;margin:10px auto 0!important;padding:8px 13px!important;font-size:.82rem!important}
.play-style-modal-card{width:min(820px,calc(100vw - 32px))!important}
.play-style-explain-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0}
.play-style-explain-grid article{padding:16px;border:1px solid var(--line);border-radius:18px;background:#fbf8fc;text-align:center}
.play-style-explain-grid h3{margin:.5rem 0 .25rem}.play-style-explain-grid p{margin:0;color:var(--muted)}
@media(max-width:680px){.play-style-explain-grid{grid-template-columns:1fr}}

/* ===== v1.8.56 Barry hidden-route hero artwork ===== */
/* Show the dedicated Barry hidden-route hero without chopping or letterbox strips. */
.story-location-card.secret-card:not(.state-hidden):not(.state-hinted)>.story-location-thumb{
  width:100%!important;
  height:auto!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important;
  border-radius:18px!important;
}
.secret-route-hero{
  aspect-ratio:auto!important;
  background:transparent!important;
}
.secret-route-hero>img{
  width:100%!important;
  height:auto!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important;
}

/* ===== v1.8.57 Album Skills grid containment repair ===== */
/* The Skills album section inherits .card-grid from the Album renderer. Make the
   Skills wrapper a full-width block so its own three-column grid is not trapped
   inside a single generic Album card column. */
.card-grid.skills-album-page{
  display:block!important;
  grid-template-columns:none!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}
.card-grid.skills-album-page>.skills-album-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  gap:18px!important;
  padding:18px!important;
  box-sizing:border-box!important;
}
.card-grid.skills-album-page>.skills-album-grid>.skill-card{
  min-width:0!important;
  width:100%!important;
  max-width:none!important;
}
@media(max-width:700px){
  .card-grid.skills-album-page>.skills-album-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    padding:12px!important;
  }
}
@media(max-width:460px){
  .card-grid.skills-album-page>.skills-album-grid{
    grid-template-columns:1fr!important;
    padding:10px!important;
  }
}

/* ===== v1.8.59 Supply Hut Resource Monster negotiation mission / audit fixes ===== */
.supply-negotiation-hero{display:grid;grid-template-columns:minmax(230px,.62fr) minmax(0,1.38fr);gap:22px;align-items:stretch}
.supply-negotiation-hero-art{min-height:310px;border-radius:18px;overflow:hidden;background:linear-gradient(145deg,#efe6f4,#dfe9df);display:grid;place-items:center}
.supply-negotiation-hero-art img{width:100%;height:100%;object-fit:contain;max-height:420px}
.supply-manager-read{display:grid;grid-template-columns:180px 1fr;gap:10px;margin-top:16px}.supply-manager-read span{padding:11px 13px;border-radius:14px;background:#f3eef5}.supply-manager-read strong{display:block;color:#5b2a86;font-size:.76rem;text-transform:uppercase;letter-spacing:.05em;margin-bottom:3px}
.supply-negotiation-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:18px;align-items:start}.supply-negotiation-layout>main{min-width:0}.supply-negotiation-panel{min-width:0}.supply-neg-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(240px,.65fr);gap:20px}.supply-neg-grid blockquote{margin:18px 0;padding:15px 17px;border-left:4px solid #7a4a9a;background:#f5f0f7;border-radius:0 14px 14px 0;font-weight:700}.case-brief{font-size:1.02rem;line-height:1.62}.supply-monster-dialogue{padding:18px;border-radius:18px;background:#2c2231;color:#fff;align-self:start}.supply-monster-dialogue .eyebrow,.supply-monster-dialogue small{color:#e8d7ef}.supply-monster-dialogue h3{color:#fff}
.supply-negotiation-art-placeholder{aspect-ratio:16/9;margin:0 0 18px;display:grid;place-items:center;align-content:center;gap:5px;text-align:center;border:2px dashed #9b86a7;border-radius:18px;background:linear-gradient(135deg,#f1ecf4,#e7eee9);color:#4c3c55}.supply-negotiation-art-placeholder span{font-size:.7rem;font-weight:900;letter-spacing:.14em}.supply-negotiation-art-placeholder strong{font-size:1.25rem}.supply-negotiation-art-placeholder small{max-width:350px}
.supply-lifelines{position:sticky;top:12px;display:grid;gap:10px}.supply-lifelines button{display:grid;grid-template-columns:54px 1fr;gap:10px;align-items:center;text-align:left;min-height:72px;padding:8px;border-radius:18px;background:#fff;border:2px solid #d4c5dc;color:#392b40}.supply-lifelines button:hover:not(:disabled){border-color:#7a4a9a;transform:translateY(-1px)}.supply-lifelines img{width:54px;height:54px;border-radius:50%;object-fit:cover;background:#eee}.supply-lifelines strong,.supply-lifelines small{display:block}.supply-lifelines small{margin-top:2px;color:#6d6073}.supply-lifeline-message{grid-column:2}.supply-lifeline-message.barry{border-left:5px solid #6b3d87}.supply-lifeline-message.milo{border-left:5px solid #5d8a58}
.supply-neg-resource-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}.supply-neg-resource{display:flex;flex-direction:column;align-items:flex-start;min-height:118px;padding:13px;text-align:left;border:2px solid #ded3e3;border-radius:16px;background:#fff;color:#372d3b}.supply-neg-resource.selected{border-color:#6b3d87;background:#f3ebf7;box-shadow:0 0 0 2px rgba(107,61,135,.08)}.supply-neg-resource span,.supply-neg-resource strong,.supply-neg-resource small{display:block}.supply-neg-resource span{font-size:.72rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em}.supply-neg-resource strong{margin:.35rem 0;font-size:.98rem}.supply-neg-resource small{margin-top:auto;color:#6d6073}
.supply-argument-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}.supply-argument-card{display:flex;flex-direction:column;align-items:flex-start;min-height:155px;padding:14px;text-align:left;border:2px solid #ded3e3;border-radius:17px;background:#fff;color:#372d3b}.supply-argument-card.selected{border-color:#5f397a;background:#f4eef7;box-shadow:0 0 0 2px rgba(95,57,122,.08)}.supply-argument-card span{font-size:.76rem;font-weight:900;text-transform:uppercase}.supply-argument-card strong{margin:.45rem 0}.supply-argument-card small{line-height:1.42;color:#615768}.supply-synergy-note{padding:12px 14px;border-radius:14px;background:#eef3ef;font-weight:700}
.supply-neg-footer{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-top:18px}.resource-monster-objection{display:grid;grid-template-columns:90px 1fr;gap:15px;align-items:center;padding:15px;border-radius:18px;background:#2d2431;color:#fff;margin:18px 0}.resource-monster-objection img{width:90px;height:90px;object-fit:contain;border-radius:16px;background:#f3eef5}.resource-monster-objection p{margin:0;font-weight:750}.supply-response-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.supply-response-grid button{min-height:120px;padding:14px;text-align:left;border:2px solid #ded3e3;border-radius:16px;background:#fff;color:#372d3b}.supply-response-grid button.selected{border-color:#6b3d87;background:#f3ebf7}.supply-response-grid strong,.supply-response-grid small{display:block}.supply-response-grid small{margin-top:7px;line-height:1.45;color:#615768}
.supply-outcome.success{border-top:6px solid #568553}.supply-outcome.mixed{border-top:6px solid #b58b30}.supply-outcome.warning{border-top:6px solid #9f5e56}.alternative-package{display:flex;flex-wrap:wrap;gap:8px;padding:14px;border-radius:14px;background:#f4f0e2;margin:15px 0}.alternative-package strong{width:100%}.alternative-package span{padding:7px 10px;border-radius:999px;background:#fff}.negotiation-reveal,.supply-reflection{margin:18px 0;padding:16px;border-radius:17px;background:#f4f1f6}.supply-reflection{background:#edf3ee}.supply-negotiation-complete{display:block;margin-top:10px;font-weight:800;color:#5b2a86}
@media(max-width:900px){.supply-negotiation-hero,.supply-negotiation-layout,.supply-neg-grid{grid-template-columns:1fr}.supply-lifelines{position:static;grid-template-columns:1fr 1fr}.supply-lifeline-message{grid-column:1}.supply-neg-resource-grid,.supply-argument-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.supply-manager-read,.supply-lifelines,.supply-neg-resource-grid,.supply-argument-grid,.supply-response-grid{grid-template-columns:1fr}.supply-neg-footer{align-items:stretch;flex-direction:column}.supply-neg-footer button{width:100%}.supply-negotiation-hero-art{min-height:230px}}


/* ===== v1.8.62 Inbox Island stacked hero + complete artwork fit/zoom ===== */
.story-world-hero.story-hero{
  display:flex!important;
  flex-direction:column!important;
  gap:0!important;
  align-items:stretch!important;
  overflow:hidden!important;
  background:#f8f4fb!important;
}
.story-world-hero .story-hero-top{
  order:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:26px 28px 18px;
  background:#f8f4fb;
}
.story-world-hero .story-hero-heading{min-width:0;display:flex;flex-direction:column;gap:7px}
.story-world-hero .story-hero-heading .eyebrow{margin:0}
.story-world-hero .story-hero-heading h2{margin:0;font-size:clamp(2.35rem,5vw,4.1rem);line-height:.98}
.story-world-hero .story-player-chip{margin-top:2px}
.story-world-hero .story-hero-top .player-tier-chip{margin:0!important;flex:0 0 auto}
.story-world-hero .story-map-stage{
  order:2;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:1536/1024!important;
  background:transparent!important;
  overflow:hidden!important;
  border-radius:0!important;
}
.story-world-hero .story-map-stage>img:first-child{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important;
  margin:0!important;
  border-radius:0!important;
}
.story-world-hero .story-hero-bottom{
  order:3;
  padding:20px 28px 26px;
  display:flex;
  flex-direction:column;
  gap:14px;
  background:#f8f4fb;
}
.story-world-hero .story-hero-bottom>p{margin:0;max-width:960px;font-size:1.02rem;line-height:1.55}
.story-world-hero .story-hero-bottom .token-purse{margin:0}
.story-world-hero .story-hero-bottom .story-world-stats{margin:0}
.story-world-hero .story-map-stage .story-player-avatar{max-height:190px!important}

/* Location card art uses each supplied image's natural framing so nothing important is cropped. */
.story-location-thumb-frame{
  aspect-ratio:1519/1036!important;
  background:#f3eff5!important;
}
.story-location-thumb-frame .supply-hut-map-thumb{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important;
}
.story-location-card.secret-card:not(.state-hidden):not(.state-hinted)>.story-location-thumb{
  width:100%!important;
  height:auto!important;
  aspect-ratio:1448/1086!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#f3eff5!important;
  align-self:start!important;
}
.story-location-card.secret-card{overflow:hidden!important}
.story-location-card.secret-card>.story-location-thumb,
.story-location-card.secret-card>.story-secret-image-lock{grid-column:1/-1;max-width:100%!important}
.secret-route-hero,.secret-route-hero>img,
.barrry-sidequest-preview,.barry-sidequest-preview,
.barrry-sidequest-preview>img,.barry-sidequest-preview>img{
  max-width:100%!important;
  overflow:hidden!important;
}
.secret-route-hero>img,.barrry-sidequest-preview>img,.barry-sidequest-preview>img{
  width:100%!important;height:auto!important;object-fit:contain!important;object-position:center!important;
}
/* Visual artwork that opens in the image viewer should advertise that affordance. */
.story-map-stage>img:first-child,
.story-location-card>.story-location-thumb,
.story-location-thumb-frame>img,
.story-location-mission-hero img,
.supply-hut-hero img,
.secret-route-hero img,
.barrry-sidequest-preview img,.barry-sidequest-preview img,
.reflection-story-card-art,.story-completion img{cursor:zoom-in}

@media(max-width:760px){
 .story-world-hero .story-hero-top{align-items:flex-start;flex-direction:column;padding:20px 18px 14px}
 .story-world-hero .story-hero-top .player-tier-chip{width:100%;max-width:360px}
 .story-world-hero .story-hero-bottom{padding:16px 18px 20px}
 .story-world-hero .story-map-stage .story-player-avatar{height:25%!important;max-height:125px!important}
}


/* ===== v1.8.64 Cabinet, Side Quest and Inbox Island interactive-map amendments ===== */
/* Tier cards: clip the actual card images to rounded corners. */
.badge-tier-strip article{border-radius:22px!important;overflow:hidden!important}
.badge-tier-strip article img{border-radius:18px!important;overflow:hidden!important;clip-path:inset(0 round 18px)}

/* Approach achievement row labels: icon above the title, with fully rounded containers. */
.approach-row-label{flex-direction:column!important;justify-content:center!important;align-items:center!important;text-align:center!important;border-radius:20px!important;overflow:hidden!important}
.approach-row-label>div{align-items:center!important;text-align:center!important}
.approach-row-label>.approach-style-icon{width:48px!important;height:48px!important;margin:0 auto 4px!important}
.approach-badge-slot{border-radius:20px!important;overflow:hidden!important}
.approach-badge-art{border-radius:16px!important;overflow:hidden!important}
.approach-badge-art img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important}

/* Hidden & Curious is intentionally a three-across responsive cabinet. */
.badge-category-hidden-curious .badge-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.badge-category-hidden-curious .badge-card{grid-template-columns:72px minmax(0,1fr)!important;border-radius:20px!important;overflow:hidden!important}
.badge-category-hidden-curious .badge-card>img,.badge-category-hidden-curious .mystery-pin{width:72px!important;height:72px!important;object-fit:contain!important}
@media(max-width:900px){.badge-category-hidden-curious .badge-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:560px){.badge-category-hidden-curious .badge-grid{grid-template-columns:1fr!important}}

/* All relevant cabinet/achievement art snaps cleanly to its frame. */
.badge-tier-strip img,.badge-card>img,.approach-badge-art img,.superpower-badge-art img,.side-quest-card-art img{
  object-position:center!important;background:transparent!important;max-width:100%!important;
}
.side-quest-card-art,.badge-card,.approach-badge-slot{overflow:hidden!important}
.side-quest-card-art img{width:100%!important;height:100%!important;object-fit:contain!important;border-radius:16px!important}

/* Side Quest hero artwork slot between header and quest cards. */
.side-quest-hero-placeholder{margin-top:16px;aspect-ratio:16/6;min-height:190px;display:grid;place-items:center;align-content:center;gap:6px;text-align:center;border:2px dashed #9d88aa;border-radius:22px;background:linear-gradient(135deg,#f3edf6,#e7eee8);color:#4c3c55}
.side-quest-hero-placeholder span{font-size:2.5rem}.side-quest-hero-placeholder strong{font-size:1.35rem;letter-spacing:.08em}.side-quest-hero-placeholder small{color:var(--muted)}

/* Inbox Island map is now an interactive board. */
.story-world-hero .story-map-stage{position:relative!important;isolation:isolate}
.story-map-hit-layer{position:absolute;inset:0;z-index:4;pointer-events:none}
.story-map-hotspot{position:absolute!important;left:var(--hx)!important;top:var(--hy)!important;width:var(--hw)!important;height:var(--hh)!important;padding:0!important;margin:0!important;border:0!important;border-radius:18px!important;background:transparent!important;box-shadow:none!important;pointer-events:auto;cursor:pointer;color:transparent!important;outline-offset:-3px}
.story-map-hotspot span{position:absolute;left:50%;bottom:5px;transform:translateX(-50%);padding:5px 8px;border-radius:999px;background:rgba(33,24,39,.88);color:#fff;font-size:.7rem;font-weight:800;white-space:nowrap;opacity:0;transition:opacity .15s ease}
.story-map-hotspot:hover:not(:disabled),.story-map-hotspot:focus-visible:not(:disabled){outline:3px solid rgba(255,255,255,.92)!important;background:rgba(255,255,255,.06)!important}
.story-map-hotspot:hover:not(:disabled) span,.story-map-hotspot:focus-visible:not(:disabled) span{opacity:1}
.story-map-hotspot:disabled{cursor:not-allowed;pointer-events:none}
.story-world-hero .story-map-stage .story-player-avatar{z-index:7!important;pointer-events:none!important;transition:left .72s cubic-bezier(.22,.8,.24,1),top .72s cubic-bezier(.22,.8,.24,1),transform .72s cubic-bezier(.22,.8,.24,1)!important}

/* Cover the printed static progress plaque with a live game-state plaque. */
.story-map-live-progress{position:absolute;z-index:6;left:2.2%;bottom:2.5%;width:31%;min-width:210px;padding:9px 12px;border-radius:12px;background:rgba(245,224,179,.95);border:1px solid rgba(91,52,46,.35);box-shadow:0 3px 8px rgba(32,23,20,.18);display:grid;grid-template-columns:1fr auto;gap:2px 10px;color:#2c1e28;font-size:clamp(.55rem,.82vw,.76rem);line-height:1.2;pointer-events:none}
.story-map-live-progress>strong{grid-column:1/-1;color:#4d2474;font-size:.72rem;letter-spacing:.05em;margin-bottom:2px}.story-map-live-progress span{display:contents}.story-map-live-progress b{text-align:right}
.story-next-world-highlight{animation:story-next-world-pulse .55s ease-in-out 2}
@keyframes story-next-world-pulse{50%{transform:scale(1.012);box-shadow:0 0 0 5px rgba(117,75,151,.18)}}
.story-reflection-unlock-note{grid-column:1/-1;display:flex;flex-direction:column;gap:3px;margin-bottom:12px;padding:12px 14px;border-radius:15px;background:#f2eaf6;border-left:5px solid #6b3d87}
.story-reflection-unlock-note span{font-size:.82rem;color:var(--muted)}
@media(max-width:700px){
  .story-map-live-progress{left:2%;bottom:2%;width:39%;min-width:0;padding:6px 8px;font-size:.55rem}
  .story-map-live-progress>strong{font-size:.58rem}
  .story-map-hotspot span{display:none}
}

/* ===== v1.8.65 Supply Hut stacked hero ===== */
.supply-hut-stack{
  display:flex!important;
  flex-direction:column!important;
  gap:0!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:24px!important;
  background:#fff!important;
}
.supply-hut-stack-title{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:16px!important;
  padding:20px 22px 16px!important;
}
.supply-hut-stack-title>div{min-width:0!important;flex:1!important}
.supply-hut-stack-title .eyebrow{margin:0 0 5px!important}
.supply-hut-stack-title h2{margin:0!important}
.supply-hut-stack-art{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:20px!important;
  background:transparent!important;
  line-height:0!important;
}
.supply-hut-stack-art img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-width:100%!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:0!important;
  padding:0!important;
  border-radius:20px!important;
  background:transparent!important;
  cursor:zoom-in!important;
}
.supply-hut-stack-info{
  display:flex!important;
  flex-direction:column!important;
  gap:14px!important;
  padding:18px 22px 22px!important;
}
.supply-hut-stack-info>p{margin:0!important;max-width:980px!important;line-height:1.55!important}
.supply-hut-stack-info .token-purse{margin:0!important}
@media(max-width:700px){
  .supply-hut-stack-title{flex-direction:column!important;padding:16px 16px 13px!important}
  .supply-hut-stack-art,.supply-hut-stack-art img{border-radius:16px!important}
  .supply-hut-stack-info{padding:15px 16px 18px!important}
}

/* ===== v1.8.66 Inbox Island live progress plaque alignment ===== */
/* Fully masks the baked-in Island Progress artwork while retaining the same plaque footprint. */
.story-world-hero .story-map-stage .story-map-live-progress{
  left:.8%!important;
  bottom:1.65%!important;
  width:44.6%!important;
  height:11.25%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  padding:clamp(5px,.72vw,11px) clamp(9px,1.05vw,16px)!important;
  border-radius:clamp(9px,1vw,15px)!important;
  background:
    linear-gradient(90deg,rgba(239,214,165,.99),rgba(246,226,187,.99) 48%,rgba(236,210,160,.99))!important;
  border:1px solid rgba(94,57,35,.48)!important;
  box-shadow:inset 0 0 0 1px rgba(255,248,222,.5),0 2px 7px rgba(32,23,20,.2)!important;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto!important;
  align-content:center!important;
  column-gap:clamp(5px,.65vw,11px)!important;
  row-gap:clamp(1px,.18vw,3px)!important;
  font-size:clamp(.48rem,.72vw,.72rem)!important;
  line-height:1.12!important;
  overflow:hidden!important;
}
.story-world-hero .story-map-stage .story-map-live-progress>strong{
  grid-column:1/-1!important;
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  color:#4b246d!important;
  font-size:clamp(.54rem,.76vw,.78rem)!important;
  letter-spacing:.045em!important;
  margin:0 0 clamp(1px,.2vw,3px)!important;
}
.story-world-hero .story-map-stage .story-map-live-progress>strong::after{
  content:'LIVE';
  display:inline-block;
  padding:1px 5px;
  border-radius:999px;
  background:#4b246d;
  color:#fff;
  font-size:.72em;
  letter-spacing:.06em;
}
.story-world-hero .story-map-stage .story-map-live-progress span{
  display:contents!important;
}
.story-world-hero .story-map-stage .story-map-live-progress b{
  text-align:right!important;
  white-space:nowrap!important;
}
@media(max-width:700px){
  .story-world-hero .story-map-stage .story-map-live-progress{
    left:.7%!important;
    bottom:1.55%!important;
    width:44.8%!important;
    height:11.4%!important;
    padding:4px 7px!important;
    column-gap:4px!important;
    font-size:clamp(.38rem,1.35vw,.55rem)!important;
  }
  .story-world-hero .story-map-stage .story-map-live-progress>strong{
    font-size:clamp(.42rem,1.5vw,.58rem)!important;
    gap:4px!important;
  }
}


/* ===== v1.8.67 Inbox Island invisible hotspots + Supply Hut/location image QA ===== */
/* Keep the mapped interactive areas but never draw a hotspot square over the artwork. */
.story-map-hotspot,
.story-map-hotspot:hover:not(:disabled),
.story-map-hotspot:focus-visible:not(:disabled){
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  color:transparent!important;
  -webkit-tap-highlight-color:transparent!important;
}
.story-map-hotspot{overflow:visible!important;}
.story-map-hotspot span{
  display:block!important;
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  bottom:auto!important;
  transform:translate(-50%,-50%) translateY(6px)!important;
  min-width:max-content!important;
  max-width:220px!important;
  padding:7px 11px!important;
  border-radius:999px!important;
  background:rgba(36,24,43,.94)!important;
  border:1px solid rgba(255,255,255,.72)!important;
  box-shadow:0 5px 14px rgba(23,15,29,.28)!important;
  color:#fff!important;
  font-size:clamp(.68rem,.85vw,.82rem)!important;
  line-height:1.1!important;
  font-weight:850!important;
  letter-spacing:.01em!important;
  white-space:nowrap!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transition:opacity .14s ease,transform .14s ease,visibility .14s ease!important;
  z-index:20!important;
}
.story-map-hotspot:hover span,
.story-map-hotspot:focus-visible span{
  opacity:1!important;
  visibility:visible!important;
  transform:translate(-50%,-50%) translateY(0)!important;
}
/* Locked areas remain non-selectable but may still explain themselves on hover. */
.story-map-hotspot:disabled{pointer-events:auto!important;cursor:not-allowed!important;opacity:1!important;}
.story-map-hotspot:disabled span::after{content:' · locked';opacity:.78;font-weight:650;}
@media(max-width:700px){
  .story-map-hotspot span{font-size:.68rem!important;padding:6px 9px!important;}
}

/* Location-card frames: no top/bottom crop and no visible letterbox strips.
   The supplied art is allowed a tiny stretch so the whole image fills its frame. */
.story-location-card>.story-location-thumb,
.story-location-thumb-frame>img,
.story-location-thumb-frame .supply-hut-map-thumb,
.story-location-card.secret-card:not(.state-hidden):not(.state-hinted)>.story-location-thumb{
  width:100%!important;
  height:100%!important;
  object-fit:fill!important;
  object-position:center!important;
  background:transparent!important;
  margin:0!important;
  border-radius:16px!important;
}
.story-location-card>.story-location-thumb,
.story-location-thumb-frame{
  aspect-ratio:16/10!important;
  overflow:hidden!important;
  border-radius:16px!important;
  background:transparent!important;
}
/* Campaign/select hero should show its complete Supply Hut artwork rather than crop it. */
.supply-negotiation-hero>img{
  width:100%!important;
  height:100%!important;
  object-fit:fill!important;
  object-position:center!important;
  background:transparent!important;
}

/* v1.8.67 final Inbox Island plaque nudge: fully cover the baked-in label edge. */
.story-world-hero .story-map-stage .story-map-live-progress{
  transform:translateY(-3px)!important;
}

/* v1.8.68: supplied Supply Hut negotiation crop must never be stretched. */
.story-hero.supply-negotiation-hero>img{
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:620px!important;
  object-fit:contain!important;
  object-position:center!important;
  border-radius:20px!important;
}

/* ===== v1.8.70 Side Quest Monster, equal Inbox Island utility cards, Zen Garden ===== */
.side-quest-hero-art{
  overflow:hidden;
  border-radius:22px;
  background:transparent;
  margin:0 0 18px;
}
.side-quest-hero-art img{
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
  object-position:center;
  border-radius:22px;
  cursor:zoom-in;
}
.side-quest-card-art.side-quest-image-art{
  aspect-ratio:16/9;
  overflow:hidden;
  border-radius:18px;
  background:transparent;
}
.side-quest-card-art.side-quest-image-art img{
  width:100%;height:100%;display:block;object-fit:contain;object-position:center;border-radius:18px;cursor:zoom-in;
}
.side-quest-card-art.image-fallback{
  min-height:180px;
  background:linear-gradient(145deg,#efe8f3,#e4efdf);
}
.sidequest-monster-quest{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(300px,1.1fr);gap:22px;align-items:center;padding:20px}
.sidequest-monster-quest>img{width:100%;height:auto;max-height:520px;object-fit:contain;border-radius:20px;cursor:zoom-in}
.sidequest-monster-encounter{outline:2px solid rgba(108,64,139,.28);outline-offset:-2px}
.sidequest-monster-encounter::before{content:'SIDE QUEST';display:inline-flex;align-self:flex-start;padding:5px 9px;border-radius:999px;background:#6c408b;color:#fff;font-size:.68rem;font-weight:850;letter-spacing:.06em;margin:10px 10px 0}

/* Supply Hut and Barry Was Here are peer utility cards: same geometry, same image frame, full artwork. */
.story-map-grid>.story-location-card:has(#openSupplyHut),
.story-map-grid>.story-location-card.secret-card{
  grid-template-columns:auto 1fr!important;
  grid-template-rows:auto 1fr auto!important;
  min-height:100%!important;
  align-self:stretch!important;
}
.story-map-grid>.story-location-card:has(#openSupplyHut)>.story-location-thumb-frame,
.story-map-grid>.story-location-card.secret-card:not(.state-hidden):not(.state-hinted)>.story-location-thumb{
  grid-column:1/-1!important;
  width:100%!important;
  aspect-ratio:16/10!important;
  height:auto!important;
  min-height:0!important;
  overflow:hidden!important;
  border-radius:18px!important;
  background:transparent!important;
  margin:0 0 2px!important;
}
.story-map-grid>.story-location-card:has(#openSupplyHut)>.story-location-thumb-frame img,
.story-map-grid>.story-location-card.secret-card:not(.state-hidden):not(.state-hinted)>.story-location-thumb{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  border-radius:18px!important;
  background:transparent!important;
  cursor:zoom-in!important;
}
.story-map-grid>.story-location-card:has(#openSupplyHut)>button,
.story-map-grid>.story-location-card.secret-card>button{margin-top:auto!important}

@media(max-width:760px){
  .sidequest-monster-quest{grid-template-columns:1fr;padding:14px}
}

/* ===== v1.8.71 Barry Was Here rounded artwork ===== */
.story-map-grid>.story-location-card.secret-card>.story-location-thumb{
  border-radius:20px!important;
  overflow:hidden!important;
  clip-path:inset(0 round 20px)!important;
}
.secret-route-hero{
  overflow:hidden!important;
  border-radius:20px!important;
}
.secret-route-hero>img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  object-fit:contain!important;
  border-radius:20px!important;
  clip-path:inset(0 round 20px)!important;
}


/* ===== v1.8.72 Side Quest presentation polish ===== */
.side-quest-hero + .side-quest-hero-art{margin-top:18px!important;}
.side-quest-hero-art{
  border:1px solid var(--line)!important;
  border-radius:22px!important;
  overflow:hidden!important;
  background:#fff!important;
}
.side-quest-hero-art img{
  width:100%!important;
  height:auto!important;
  object-fit:contain!important;
  object-position:center!important;
  border-radius:21px!important;
}


/* ===== v1.8.73 Skills Practice Skill 02 unlock + card-frame fit ===== */
.skill-card-visual{
  width:110px;
  aspect-ratio:1054/1492;
  border-radius:14px;
  overflow:hidden;
  align-self:start;
  background:transparent;
}
.skill-card-visual>img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  border-radius:14px;
}
.skill-card-visual>.skill-card-art{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  border-radius:14px!important;
}
.skill-unlock-note{display:block;margin:.45rem 0;color:#6e5778;font-weight:800;line-height:1.35}
@media(max-width:760px){
  .skill-card-visual{width:88px}
}

/* ===== v1.8.74 Inbox utility-card alignment + Side Quest Monster frame polish ===== */
/* Supply Hut and Barry Was Here use identical image footprints on Inbox Island. */
.story-map-grid>.story-location-card:has(#openSupplyHut)>.story-location-thumb-frame,
.story-map-grid>.story-location-card.secret-card:not(.state-hidden):not(.state-hinted)>.story-location-thumb{
  grid-column:1/-1!important;
  width:100%!important;
  height:auto!important;
  aspect-ratio:16/10!important;
  min-height:0!important;
  margin:0 0 2px!important;
  overflow:hidden!important;
  border-radius:20px!important;
  background:transparent!important;
}
.story-map-grid>.story-location-card:has(#openSupplyHut)>.story-location-thumb-frame>img,
.story-map-grid>.story-location-card.secret-card:not(.state-hidden):not(.state-hinted)>.story-location-thumb{
  display:block!important;
  width:100%!important;
  height:100%!important;
  aspect-ratio:auto!important;
  object-fit:fill!important;
  object-position:center!important;
  margin:0!important;
  padding:0!important;
  border-radius:20px!important;
  clip-path:inset(0 round 20px)!important;
  background:transparent!important;
  cursor:zoom-in!important;
}

/* Side Quest Monster collectible card uses the supplied native card ratio, with no dark letterbox strips. */
.album-slide .monster-card[data-rarity="Side Quest"] .full-card-art,
#reveal .monster-card[data-rarity="Side Quest"] .full-card-art{
  width:100%!important;
  height:auto!important;
  aspect-ratio:1054/1492!important;
  min-height:0!important;
  overflow:hidden!important;
  background:transparent!important;
  border-radius:16px!important;
}
.album-slide .monster-card[data-rarity="Side Quest"] .full-card-art img,
#reveal .monster-card[data-rarity="Side Quest"] .full-card-art img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:cover!important;
  object-position:center!important;
  background:transparent!important;
}

/* Side Quest Monster arena card snaps to its frame using the same native card ratio. */
.monster-encounter.sidequest-monster-encounter img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  aspect-ratio:1054/1492!important;
  object-fit:cover!important;
  object-position:center!important;
  background:transparent!important;
  border-radius:12px!important;
}

/* Side Quests screen hero: DCC-i 2px rainbow gradient edge with curved corners. */
.side-quest-hero-art{
  padding:0!important;
  border:2px solid transparent!important;
  border-radius:22px!important;
  overflow:hidden!important;
  background-image:linear-gradient(#fff,#fff),linear-gradient(90deg,var(--purple),var(--green),var(--pink))!important;
  background-origin:border-box!important;
  background-clip:padding-box,border-box!important;
}
.side-quest-hero-art>img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  margin:0!important;
  border-radius:20px!important;
  object-fit:contain!important;
  object-position:center!important;
}


/* v1.8.95 — Gate 3E Inbox Island finale */
.inbox-island-finale{grid-template-columns:minmax(260px,.78fr) minmax(0,1.35fr);padding:22px;overflow:hidden;position:relative}
.inbox-finale-art{position:relative;align-self:stretch}.inbox-finale-art>img{height:100%;min-height:360px;object-fit:cover}
.inbox-finale-stamp{position:absolute;left:16px;bottom:16px;padding:8px 12px;border-radius:999px;background:rgba(44,25,70,.92);color:#fff;font-weight:800;letter-spacing:.08em;font-size:.78rem}
.inbox-finale-copy>h2{font-size:clamp(1.8rem,4vw,2.7rem)}
.inbox-finale-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:16px 0}
.inbox-finale-stats>div{background:#f7f2fa;border:1px solid var(--line);border-radius:14px;padding:10px;text-align:center}
.inbox-finale-stats strong{display:block;color:var(--purple);font-size:1.45rem}.inbox-finale-stats span{font-size:.78rem;font-weight:700}
.inbox-finale-mastery,.inbox-finale-next,.inbox-finale-optional{margin:12px 0;padding:12px 14px;border-radius:14px;background:#f7f2fa;border:1px solid var(--line)}
.inbox-finale-mastery strong,.inbox-finale-mastery span{display:block}.inbox-finale-mastery span{margin-top:4px;font-size:.88rem}.inbox-finale-mastery.is-mastered{background:#f1faf5;border-color:#92c8aa}
.inbox-finale-reward{display:grid;grid-template-columns:104px 1fr;gap:14px;align-items:center;margin:14px 0;padding:12px;border-radius:16px;background:#fff8e6;border:1px solid #e3c46c}
.inbox-finale-reward img{width:104px;max-height:145px;object-fit:contain;border-radius:12px}.inbox-finale-reward h3{margin:.1rem 0}.inbox-finale-reward p{margin:.25rem 0}
.inbox-finale-optional{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.inbox-finale-optional span{padding:5px 8px;border-radius:999px;background:#eee6f2;font-size:.8rem;font-weight:700}.inbox-finale-optional span.done{background:#e8f6ed;color:#215f3e}.inbox-finale-optional small{width:100%}
.inbox-finale-next h3{margin:.1rem 0}.inbox-finale-actions{margin-top:14px}
.inbox-island-finale.is-first-finale{animation:inboxFinaleArrive .6s ease-out both}
@keyframes inboxFinaleArrive{from{opacity:0;transform:translateY(18px) scale(.99)}to{opacity:1;transform:none}}
@media(max-width:900px){.inbox-island-finale{grid-template-columns:1fr}.inbox-finale-art>img{min-height:0;max-height:420px}.inbox-finale-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.inbox-finale-reward{grid-template-columns:72px 1fr}.inbox-finale-reward img{width:72px}.inbox-finale-actions button{width:100%}}
@media(prefers-reduced-motion:reduce){.inbox-island-finale.is-first-finale{animation:none}}

/* v1.8.99 — Gate 4B Player Progress/Profile hub */
.progress-profile-hero{display:grid;grid-template-columns:110px minmax(0,1fr) auto;gap:18px;align-items:center}
.progress-profile-avatar{width:110px;height:110px;object-fit:contain;border-radius:20px;background:#f4eef8;padding:6px}
.progress-profile-copy h2{margin:.1rem 0}.progress-profile-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.progress-tier{display:inline-flex;gap:8px;align-items:center;margin-top:8px}.progress-tier img{width:44px;height:44px;object-fit:contain}.progress-tier span{display:grid}.progress-tier small{color:var(--muted)}
.progress-next{display:flex;justify-content:space-between;gap:18px;align-items:center}.progress-next h2{margin:.1rem 0}
.progress-resume{display:flex;justify-content:space-between;align-items:center;gap:12px}.progress-saved-chip{padding:5px 10px;border-radius:999px;background:#e7f5ec;color:#236943;font-weight:700}
.progress-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:12px 0}.progress-stat-grid .metric small{display:block;color:var(--muted);margin-top:4px}
.progress-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.progress-detail-grid>.panel{margin:0}.progress-detail-grid h3{margin:.15rem 0 .5rem}
.progress-bar{height:12px;background:#eadfed;border-radius:999px;overflow:hidden;margin:.8rem 0}.progress-bar span{display:block;height:100%;background:var(--purple);border-radius:999px}
.progress-token-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:10px 0}.progress-token-row span{display:grid;justify-items:center;text-align:center;padding:8px;border:1px solid var(--line);border-radius:14px;background:#fbf8fc}.progress-token-row img{width:42px;height:42px;object-fit:contain}.progress-token-row small{font-size:.72rem}
.progress-pinned{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0}.progress-pinned span{display:grid;justify-items:center;text-align:center}.progress-pinned img{width:54px;height:54px;object-fit:contain}.progress-pinned small{font-size:.7rem}
@media(max-width:820px){.progress-stat-grid{grid-template-columns:repeat(2,1fr)}.progress-profile-hero{grid-template-columns:90px 1fr}.progress-profile-avatar{width:90px;height:90px}.progress-profile-actions{grid-column:1/-1;justify-content:flex-start}.progress-detail-grid{grid-template-columns:1fr}}
@media(max-width:480px){.progress-stat-grid{grid-template-columns:1fr}.progress-next{align-items:flex-start;flex-direction:column}.progress-next button{width:100%}.progress-token-row{grid-template-columns:repeat(2,1fr)}}

/* v1.9.00 Gate 4C — safe recovery/reset controls */
.progress-recovery-card{grid-column:1/-1}
.progress-recovery-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 8px}
.progress-recovery-card>small{display:block;color:var(--muted);line-height:1.45}
@media(max-width:560px){.progress-recovery-actions{display:grid;grid-template-columns:1fr}.progress-recovery-actions button{width:100%;min-height:44px}}


/* v1.9.01 — safe return choice after reload */
.resume-choice{display:grid;grid-template-columns:110px minmax(0,1fr) auto;gap:20px;align-items:center;max-width:920px;margin:34px auto;padding:24px}
.resume-choice-avatar{width:110px;height:110px;object-fit:contain;border-radius:20px;background:#f4eef8;padding:6px}
.resume-choice-copy h2{margin:.15rem 0 .4rem}.resume-choice-copy p{margin:.3rem 0}.resume-choice-note{color:var(--muted)}
.resume-choice-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.resume-choice-actions button{min-width:150px}
@media(max-width:760px){.resume-choice{grid-template-columns:82px 1fr}.resume-choice-avatar{width:82px;height:82px}.resume-choice-actions{grid-column:1/-1;justify-content:flex-start}}
@media(max-width:480px){.resume-choice{grid-template-columns:1fr}.resume-choice-actions{grid-column:auto}.resume-choice-actions button{width:100%}}

/* v1.9.02 Gate 4 sync-conflict quarantine */
.sync-conflict{max-width:900px;margin:18px auto}.sync-conflict-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0}.sync-conflict-grid article{border:1px solid var(--line);border-radius:16px;padding:16px;background:#fbf8fc}.sync-conflict-grid h3{margin-top:0}.sync-conflict-grid ul{padding-left:1.2rem}@media(max-width:680px){.sync-conflict-grid{grid-template-columns:1fr}}


/* v1.9.06 Gate 5B safe navigation shell */
.tabs{position:relative}
.tabs-more-panel{max-width:1180px;margin:0 auto 8px;padding:10px;display:flex;gap:8px;flex-wrap:wrap;background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow)}
.tabs-more-panel[hidden]{display:none}
.tabs-more-panel button{flex:0 1 auto}
@media(max-width:700px){
 .tabs-row-primary{display:grid;grid-template-columns:repeat(3,1fr);width:100%}
 .tabs-row-primary button{width:100%}
 .tabs-more-panel{display:grid;grid-template-columns:repeat(2,1fr)}
 .tabs-more-panel[hidden]{display:none}
}

/* v1.9.06 Inbox Island completion art: full-width, uncropped */
.inbox-finale-layout{display:grid!important;grid-template-columns:1fr!important}
.inbox-finale-art{grid-column:1/-1!important;width:100%!important;max-width:none!important}
.inbox-finale-art>img{display:block;width:100%;height:auto!important;min-height:0!important;max-height:none!important;object-fit:contain!important;object-position:center!important}

/* v1.9.06 header utility buttons: visible separation + restrained rainbow edge */
.hero-utilities{
 display:flex!important;
 align-items:center!important;
 justify-content:flex-end!important;
 flex-wrap:wrap!important;
 gap:18px!important;
 column-gap:18px!important;
 row-gap:10px!important;
}
.hero-utilities #tutorialBtn,
.hero-utilities #resetBtn{
 margin:0!important;
 border:2px solid transparent!important;
 background:linear-gradient(#f4eef8,#f4eef8) padding-box,linear-gradient(90deg,#6f2c91,#3f51b5,#27ae60,#f39c12,#e91e63) border-box!important;
 color:#17111f!important;
}
.hero-utilities #tutorialBtn:hover,.hero-utilities #resetBtn:hover,
.hero-utilities #tutorialBtn:focus-visible,.hero-utilities #resetBtn:focus-visible{
 background:linear-gradient(#fff,#fff) padding-box,linear-gradient(90deg,#6f2c91,#3f51b5,#27ae60,#f39c12,#e91e63) border-box!important;
}

/* Gate 5C — predictable contextual help */
.context-help-slot{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:0 0 12px;min-width:0}
.context-help-slot>span{font-size:.78rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.context-help-button{display:inline-flex;align-items:center;gap:7px;min-height:42px}
.context-help-button>span{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#f2eafb;color:var(--purple);font-weight:900}
.context-help-dialog{width:min(620px,calc(100% - 28px));max-width:620px;border:0;padding:0;background:transparent;color:inherit}
.context-help-dialog::backdrop{background:rgba(31,20,45,.48)}
.context-help-card{position:relative;background:#fff;border:1px solid var(--line);border-radius:22px;padding:24px;box-shadow:0 22px 60px rgba(31,20,45,.22)}
.context-help-card h2{margin:.1rem 2.2rem .55rem 0}.context-help-card>p{line-height:1.55}
.context-help-card ul{margin:.8rem 0 1.1rem;padding-left:1.25rem}.context-help-card li{margin:.48rem 0;line-height:1.48}
.context-help-close{position:absolute;right:14px;top:12px;width:42px;height:42px;padding:0;border-radius:50%;font-size:1.35rem}
.context-help-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;margin-top:16px}
@media(max-width:560px){.context-help-slot{justify-content:space-between}.context-help-slot>span{display:none}.context-help-button{width:100%;justify-content:center}.context-help-card{padding:20px}.context-help-actions{display:grid;grid-template-columns:1fr}.context-help-actions button{width:100%}}

/* v1.9.14 Gate 5F — calm presentation / progressive disclosure */
.calm-heading-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:flex-end}
.calm-guide-summary{margin:12px 0 0;color:var(--muted);line-height:1.5}
.calm-disclosure-button{min-height:42px}
.home-howto-grid[hidden],.home-play-style-grid[hidden]{display:none!important}
.home-play-style-guide .calm-inline-toggle{margin-top:10px}
.calm-status-panel{padding-block:14px}
.calm-status-panel h2{font-size:1.08rem;margin:.05rem 0 .25rem}
.calm-status-panel p{margin:0;color:var(--muted);line-height:1.45}
.calm-details{margin-top:14px;padding:0;overflow:hidden}
.calm-details>summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;list-style:none}
.calm-details>summary::-webkit-details-marker{display:none}
.calm-details>summary::after{content:'+';display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#f2eafb;color:var(--purple);font-weight:900;flex:0 0 auto}
.calm-details[open]>summary::after{content:'−'}
.calm-details>summary span{margin-left:auto;color:var(--muted);font-size:.8rem;text-align:right}
.calm-details>.progress-detail-grid{padding:0 14px 14px}
.calm-specialist-details>.specialist-token-panel{margin:0 14px 14px}
.story-location-card.story-location-optional{background:#faf8fb;border-style:dashed}
.story-location-card.story-location-optional .story-location-number{opacity:.72}
/* Increase separation between major tasks without enlarging every nested card. */
.app-shell>section+section{margin-top:16px}
@media(max-width:620px){
 .calm-heading-actions{width:100%;justify-content:stretch}.calm-heading-actions button{flex:1 1 180px}
 .calm-details>summary{align-items:flex-start;flex-wrap:wrap}.calm-details>summary span{order:3;width:100%;margin:0;text-align:left}
 .calm-details>.progress-detail-grid{padding-inline:10px}.calm-specialist-details>.specialist-token-panel{margin-inline:10px}
}

/* v1.9.14 — Resource Challenge support rail + full-width Inbox Island completion summary */
.supply-negotiation-side{position:sticky;top:12px;align-self:start;display:flex;flex-direction:column;gap:12px;min-width:0}
.supply-negotiation-side .supply-lifelines{position:static;top:auto}
.supply-negotiation-side .supply-lifeline-message{grid-column:auto;margin:0;width:100%;box-sizing:border-box}
.story-completion.inbox-island-finale{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:18px!important;align-items:start!important;width:100%!important;max-width:none!important}
.story-completion.inbox-island-finale>.inbox-finale-art,.story-completion.inbox-island-finale>.inbox-finale-copy{grid-column:1/-1!important;width:100%!important;max-width:none!important;min-width:0!important}
.story-completion.inbox-island-finale .inbox-finale-art>img{display:block;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;object-fit:contain!important;object-position:center!important}
@media(max-width:900px){.supply-negotiation-side{position:static;top:auto}}
\n\n/* ===== v1.9.14 Gate 5 polish: full location art + equal Inbox utility cards ===== */
/* Story location screens show the complete supplied location artwork. */
.story-location-mission-hero{
  aspect-ratio:auto!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  background:transparent!important;
}
.story-location-mission-hero>img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important;
}
/* The two optional Inbox Island map cards use exactly the same geometry. */
.story-map-grid>.story-location-card.story-utility-card{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  grid-template-rows:auto 1fr 48px!important;
  align-items:start!important;
  align-self:stretch!important;
  height:100%!important;
  min-height:100%!important;
}
.story-map-grid>.story-location-card.story-utility-card>.story-location-thumb-frame,
.story-map-grid>.story-location-card.story-utility-card>.story-location-thumb,
.story-map-grid>.story-location-card.story-utility-card>.story-secret-image-lock{
  grid-column:1/-1!important;
  width:100%!important;
  height:auto!important;
  aspect-ratio:16/10!important;
  min-height:0!important;
  margin:0 0 2px!important;
  overflow:hidden!important;
  border-radius:20px!important;
  background:#f3eff5!important;
}
.story-map-grid>.story-location-card.story-utility-card>.story-location-thumb-frame>img,
.story-map-grid>.story-location-card.story-utility-card>.story-location-thumb{
  display:block!important;
  width:100%!important;
  height:100%!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:0!important;
  padding:0!important;
  background:#f3eff5!important;
}
.story-map-grid>.story-location-card.story-utility-card>div:not(.story-location-thumb-frame):not(.story-location-number):not(.story-secret-image-lock){
  min-width:0!important;
}
.story-map-grid>.story-location-card.story-utility-card>button{
  grid-column:1/-1!important;
  width:100%!important;
  height:48px!important;
  min-height:48px!important;
  margin-top:0!important;
  align-self:end!important;
}

/* v1.9.17 — Story / Side Quest UX corrections */
.context-help-button{
  border:2px solid transparent!important;
  background:linear-gradient(#fff,#fff) padding-box,linear-gradient(90deg,#6b2aa5,#d84b8a,#e2a62b,#36a36c,#4d71c8,#6b2aa5) border-box!important;
}
.story-event-alert-prominent{border:2px solid transparent!important;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(90deg,#6b2aa5,#d84b8a,#e2a62b,#36a36c,#4d71c8) border-box!important;margin-bottom:16px!important}
.story-event-alert-prominent .eyebrow::before{content:'⚡ ';}
.story-event-outcome{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px;background:#fbf8fc!important}
.story-event-outcome h2{margin:.15rem 0 .4rem}.story-event-reward-list{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.story-event-reward-list span{padding:6px 10px;border-radius:999px;background:#f0e7f7;border:1px solid #d7c3e5;font-weight:750;font-size:.86rem}
.pack-return-row{display:flex;justify-content:flex-start;margin-bottom:12px}
/* Supply Hut spans both columns and reads horizontally. Barry then naturally sits beside Pause for Thought. */
.story-map-grid>.story-location-card.story-utility-card:has(#openSupplyHut){grid-column:1/-1!important;display:grid!important;grid-template-columns:minmax(220px,.72fr) minmax(0,1.7fr) auto!important;grid-template-rows:1fr!important;gap:18px!important;align-items:center!important;min-height:250px!important;height:auto!important}
.story-map-grid>.story-location-card.story-utility-card:has(#openSupplyHut)>.story-location-thumb-frame{grid-column:1!important;grid-row:1!important;height:auto!important;aspect-ratio:16/10!important;margin:0!important}
.story-map-grid>.story-location-card.story-utility-card:has(#openSupplyHut)>.story-location-number{position:absolute!important;top:14px!important;left:14px!important}
.story-map-grid>.story-location-card.story-utility-card:has(#openSupplyHut)>div:not(.story-location-thumb-frame):not(.story-location-number){grid-column:2!important;grid-row:1!important}
.story-map-grid>.story-location-card.story-utility-card:has(#openSupplyHut)>button{grid-column:3!important;grid-row:1!important;width:auto!important;min-width:150px!important;margin:0!important;align-self:center!important}
.story-map-grid>.story-location-card.secret-card,.story-map-grid>.reflection-story-card{align-self:stretch!important;height:100%!important}
.story-map-grid>.story-location-card.secret-card>.story-location-thumb,.story-map-grid>.reflection-story-card>.reflection-story-card-art{width:100%!important;aspect-ratio:16/10!important;height:auto!important;object-fit:contain!important;background:#f3eff5!important}
/* Do not overwrite the contextual Reflection return label. */
#reflectionBack::after{content:none!important}
#reflectionBack{font-size:.95rem!important}
/* Fullscreen/expanded Side Quest embeds */
.sidequest-fullscreen-button{margin-left:auto}
.skill-modal-head,.legal-literacy-modal-card>header{gap:10px;flex-wrap:wrap}
.skill-modal-shell:fullscreen,.legal-literacy-modal-card:fullscreen{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;border-radius:0!important;background:#f5f0f7!important;overflow:auto!important;padding:18px!important}
.skill-modal-shell:fullscreen .skill-embed,.legal-literacy-modal-card:fullscreen .legal-literacy-embed{min-height:calc(100% - 180px)!important;height:calc(100% - 180px)!important}
.skill-practice-modal.sidequest-expanded{position:fixed!important;inset:8px!important;z-index:1000000!important;padding:0!important}
.skill-practice-modal.sidequest-expanded>.skill-modal-shell,.app-modal.sidequest-expanded>.legal-literacy-modal-card{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;border-radius:16px!important;overflow:auto!important}
.skill-practice-modal.sidequest-expanded .skill-embed,.app-modal.sidequest-expanded .legal-literacy-embed{min-height:calc(100% - 190px)!important;height:calc(100% - 190px)!important}
@media(max-width:760px){.story-event-outcome{align-items:flex-start;flex-direction:column}.story-map-grid>.story-location-card.story-utility-card:has(#openSupplyHut){grid-template-columns:1fr!important;grid-template-rows:auto auto auto!important}.story-map-grid>.story-location-card.story-utility-card:has(#openSupplyHut)>.story-location-thumb-frame,.story-map-grid>.story-location-card.story-utility-card:has(#openSupplyHut)>div:not(.story-location-thumb-frame):not(.story-location-number),.story-map-grid>.story-location-card.story-utility-card:has(#openSupplyHut)>button{grid-column:1!important;grid-row:auto!important;width:100%!important}}

/* v1.9.20 Discovery Pack Strategy/Power simplification.
   Pack reveals intentionally show only the visual placeholder and title;
   full metadata remains available in the Album. */
.pack-reveal-card.pack-reveal-simple{
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  align-content:start;
  overflow:hidden;
  min-height:0;
}
.pack-reveal-card.pack-reveal-simple .art-frame{
  margin:0;
  min-height:0;
}
.pack-reveal-card.pack-reveal-simple .card-name{
  margin:.75rem .75rem 1rem;
  text-align:center;
  line-height:1.2;
  overflow-wrap:anywhere;
}


/* Gate 5B rerun repair — compact Home orientation */
.home-quick-start{display:flex;justify-content:space-between;gap:18px;align-items:center}
.home-howto-compact summary{cursor:pointer;display:flex;justify-content:space-between;gap:12px;align-items:center}
.home-howto-compact summary span{font-size:.8rem;color:var(--muted)}
.home-howto-compact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.home-howto-compact-grid article{padding:12px;border:1px solid var(--line);border-radius:14px;background:#fbf8fc}
.home-howto-compact-grid p{margin:.35rem 0 0}
@media(max-width:700px){
 .home-quick-start{align-items:flex-start;flex-direction:column}
 .home-howto-compact-grid{grid-template-columns:1fr}
}
