/* v0.7.14 — Dedicated generated game UI assets, never reuse summon rarity frames for ordinary cards. */
:root{
  --zp-card-normal:url('../assets/ui/game/card_normal.png');
  --zp-card-selected:url('../assets/ui/game/card_selected.png');
  --zp-card-empty:url('../assets/ui/game/card_empty.png');
  --zp-stage-frame:url('../assets/ui/game/stage_frame.png');
  --zp-warning:url('../assets/ui/game/boss_warning.png');
}
/* Main camp navigation: real illustrated icons, accessible text labels remain HTML. */
#home.camp-mode .home-head{min-height:0;align-items:center;padding:4px clamp(5px,1.2vw,18px);gap:clamp(5px,1.3vw,18px)}
#home.camp-mode .home-nav{align-items:center;justify-content:center;gap:clamp(5px,2vw,32px)}
#home.camp-mode .home-nav button,#home.camp-mode .home-nav #go{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-width:0;max-width:135px;min-height:0;padding:0 2px 2px;background:none!important;border:0;box-shadow:none;color:#fff4d1;font-weight:900;text-shadow:0 2px 3px #101e29;line-height:1.1;white-space:nowrap;font-size:clamp(10px,1.4vw,16px)}
#home.camp-mode .home-nav button::before{content:'';display:block;flex:none;width:clamp(44px,6.4vw,90px);height:clamp(44px,6.4vw,90px);max-height:12vh;aspect-ratio:1;background:var(--nav-art) center/contain no-repeat;filter:drop-shadow(0 3px 2px #09161d99);transition:filter .15s,transform .15s}
#home.camp-mode #go{--nav-art:url('../assets/ui/game/nav_adventure.png');order:-1}
#home.camp-mode #shardGo{--nav-art:url('../assets/ui/game/nav_heroes.png');order:0}
#home.camp-mode #scoutGo{--nav-art:url('../assets/ui/game/nav_summon.png');order:1}
#home.camp-mode #bookGo{--nav-art:url('../assets/ui/game/nav_archive.png');order:2}
#home.camp-mode #missionGo{--nav-art:url('../assets/ui/game/nav_missions.png');order:3}
#home.camp-mode .home-nav #go::before{filter:drop-shadow(0 0 5px #ffd35b88) drop-shadow(0 3px 2px #09161d99)}
#home.camp-mode .home-nav #go strong{color:#ffe59d}
#home.camp-mode .home-nav button:hover::before{filter:brightness(1.13) drop-shadow(0 3px 2px #09161d99)}
#home.camp-mode .home-nav button:active::before{transform:scale(.94)}
#home.camp-mode #missionCount:not([hidden]){position:absolute;right:1px;top:1px;min-width:1.4em;line-height:1.4;border-radius:50%;background:#af3b38;border:1px solid #ffdfa0;color:#fff;box-shadow:0 2px 3px #0007}
/* Transparent frames over the portraits. The images never cover character faces or labels. */
.party-card,.party-slot,#wachaDialog .wacha-choice,#heroDetails .detail-tab{position:relative;isolation:isolate;border:0!important;border-radius:0!important;box-shadow:none!important;background:none!important;--card-art:var(--zp-card-normal);overflow:hidden}
.party-card::before,.party-slot::before,#wachaDialog .wacha-choice::before,#heroDetails .detail-tab::before{content:'';position:absolute;z-index:-2;inset:9% 8% 8%;background:radial-gradient(ellipse at 50% 35%,#557e7b,#1d333f 80%);border-radius:9px;pointer-events:none}
.party-card::after,.party-slot::after,#wachaDialog .wacha-choice::after,#heroDetails .detail-tab::after{content:'';position:absolute;z-index:2;inset:0;background:var(--card-art) center/100% 100% no-repeat;pointer-events:none}
.party-card[aria-pressed=true],.party-slot:not(:disabled),#wachaDialog .wacha-choice[aria-pressed=true],#heroDetails .detail-tab[aria-pressed=true]{--card-art:var(--zp-card-selected)}
.party-slot:disabled{--card-art:var(--zp-card-empty);opacity:1!important;background:none!important;place-items:center}
.party-slot:disabled::before{background:#142731}
.party-card,.party-slot{aspect-ratio:4/5;padding:17% 11% 11%;grid-template-rows:minmax(0,1fr) auto auto;min-height:0}
.party-slot:not(:disabled){grid-template-rows:minmax(0,1fr) auto}
.party-card:disabled{opacity:.45;filter:saturate(.45)}
.party-mark{z-index:3;top:15%;right:11%;width:clamp(14px,2vw,24px);height:clamp(14px,2vw,24px);font-size:clamp(9px,1.2vw,14px);background:#253e47;border:1px solid #dfb25a}
.party-card b,.party-slot span{position:relative;z-index:1;color:#fff6dd}
.party-card small{color:#edd7aa}
#partySlots{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
#partyGrid{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
#wachaDialog .wacha-choice,#heroDetails .detail-tab{padding:10% 9% 8%;padding:8px 6px 6px;opacity:1}
#wachaDialog .wacha-choice:not([aria-pressed=true]){opacity:.66}
/* Stage artwork and text are framed by a nine-sliced generated image. No distorted corner art. */
#stageSelect .stage-card{border:0;border-radius:0;background:none;box-shadow:none;padding:clamp(7px,1.1vw,16px);isolation:isolate;min-width:0;--stage-border:clamp(10px,1.8vw,22px)}
#stageSelect .stage-card::before{content:'';position:absolute;inset:5% 4%;z-index:-1;background:linear-gradient(#334e56,#152b3a);border-radius:10px;pointer-events:none}
#stageSelect .stage-card::after{content:'';position:absolute;inset:0;z-index:2;border:var(--stage-border) solid transparent;border-image:var(--zp-stage-frame) 65 75 65 75 stretch;pointer-events:none}
#stageSelect .stage-thumb{border-radius:5px;aspect-ratio:16/10;object-fit:cover}
#stageSelect .stage-body{padding:5px 3px 8px}
#stageSelect .stage-card:disabled{opacity:.6;filter:saturate(.5)}
/* Reuse existing painted UI buttons in the other game views. */
#heroDetails .detail-header button,#missionDialog button.secondary,#bookDialog button.secondary,#partyBack,#stageBack,#guideGo,#stageMode,#battle .controls button,#battle .battlebar button{background:var(--game-button) center/100% 100% no-repeat;border:0;box-shadow:none;color:#17313c;font-weight:900}
#battle .controls button.primary,#missionDialog button[aria-pressed=true],#bookDialog button[aria-pressed=true],#stageMode[aria-pressed=true]{background-image:var(--game-confirm);color:#352718}
#battle .controls button:disabled,#battle .battlebar button:disabled{opacity:.48}
#heroDetails .detail-portrait{border:0;border-radius:8px;background:radial-gradient(ellipse at 50% 60%,#79998a,#263c4b 75%)}
#heroDetails .detail-portrait::after{content:'';position:absolute;inset:0;border:22px solid transparent;border-image:var(--zp-stage-frame) 65 75 65 75 stretch;pointer-events:none;z-index:3}
/* A true boss warning art plate, with live Japanese/English text and no pointer interception. */
#bossWarning:not([hidden]){inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(86%,780px);height:auto;aspect-ratio:832/256;display:grid;align-content:center;justify-items:center;gap:0;padding:6% 16%;background:var(--zp-warning) center/contain no-repeat;border:0;filter:drop-shadow(0 8px 8px #13080ba8);animation:zp-warning-in .24s ease-out both;box-sizing:border-box}
#bossWarning span{font-size:clamp(12px,2.7vw,28px);line-height:1;letter-spacing:.12em;color:#ffe7a0;text-shadow:0 2px 3px #421111,0 0 3px #1a0707}
#bossWarning strong{font-size:clamp(11px,2.8vw,30px);line-height:1.1;white-space:nowrap;text-shadow:0 2px 3px #421111,0 0 3px #1a0707}
#bossWarning small{font-size:clamp(8px,1.3vw,15px);line-height:1.1;color:#fff4da}
@keyframes zp-warning-in{from{opacity:0;transform:translate(-50%,-50%) scale(.90)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@media(prefers-reduced-motion:reduce){#bossWarning:not([hidden]){animation:none}#home.camp-mode .home-nav button::before{transition:none}}
@media(orientation:landscape) and (max-height:600px){
 #home.camp-mode .home-head{padding:2px 5px;gap:5px}
 #home.camp-mode .home-nav{gap:clamp(3px,1vw,10px)}
 #home.camp-mode .home-nav button::before{width:clamp(32px,9vh,53px);height:clamp(32px,9vh,53px);max-height:none}
 #home.camp-mode .home-nav button{font-size:clamp(8px,2.8vh,12px)}
 #partySlots{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}
 #partyGrid{gap:3px}
 .party-card,.party-slot{padding:15% 11% 11%;max-height:105px}
 .party-card b,.party-slot span{font-size:clamp(8px,1.3vw,11px)}
 .party-card small{font-size:clamp(7px,1vw,9px)}
 #wachaDialog .wacha-choice,#heroDetails .detail-tab{padding:6px 5px 4px}
 #stageSelect .stage-card{padding:8px;--stage-border:10px}
 #stageSelect .stage-body{padding:2px 0 3px}
 #bossWarning:not([hidden]){width:min(88%,560px);padding:4% 15%}
 #bossWarning strong{font-size:clamp(10px,2.3vw,22px)}
 #bossWarning span{font-size:clamp(10px,2.1vw,20px)}
 #bossWarning small{font-size:clamp(8px,1.2vw,11px)}
}
/* Visual QA corrections: reserve real space for the stage grid and mode selector. */
#stageSelect .stage-grid{flex:0 0 auto;min-height:min-content;grid-auto-rows:auto;align-items:stretch;overflow:visible}
#stageSelect .stage-mode-row{display:flex;align-items:center;gap:8px;min-width:0;width:100%;max-width:1000px;align-self:center;flex:none}
#stageSelect .stage-mode-row .world-tabs{flex:1 1 0;min-width:0;width:auto;max-width:none}
#stageSelect .stage-mode-row #stageMode{flex:none;min-width:65px;margin:0}
#stageSelect .stage-card{height:auto}
#stageSelect .future{max-width:100%;white-space:normal;overflow-wrap:anywhere}
#home.camp-mode #missionCount:empty{display:none!important}
#home.camp-mode #missionCount:not(:empty){padding:2px 5px;border-radius:12px;font-size:9px;white-space:nowrap}
.party-card,.party-slot{padding:17% 12% 17%}
.party-card small{line-height:1.15}
/* Keep battle HUD in the same blue-green and gold family. */
#battle .battlebar,#battle .bottombar{background:linear-gradient(#2e4853,#1c303d);color:#fff1d4;border-color:#bca064}
#battle .battlebar .stat{background:#182e3b;color:#ffedc7;border-color:#897b53}
#battle .controls #battleHint,#battle .role-filter-bar{color:#f9e7c0}
#battle .battle-roster button{background:var(--zp-card-normal) center/100% 100% no-repeat,#253b45;border:0;border-radius:5px;color:#fff4d8;padding:5px 5px 7px}
#battle .battle-roster button.on{background-image:var(--zp-card-selected);background-color:#3a504a}
#battle .battle-roster .mini{position:relative;z-index:1}
@media(orientation:landscape) and (max-height:600px){
 #stageSelect .stage-mode-row{gap:4px}
 #stageSelect .stage-mode-row #stageMode{min-width:58px;padding:4px 5px;font-size:10px;min-height:28px}
 #stageSelect .world-tab{min-height:28px;font-size:10px;padding:3px 1px}
 #stageSelect .stage-head .ribbon{font-size:clamp(12px,2vw,18px)}
 #stageSelect .stage-thumb{max-height:23vh;aspect-ratio:16/9}
 #partySlots{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}
 #partySlots .party-slot{max-width:96px;width:100%;justify-self:center}
 .party-card,.party-slot{padding:15% 11% 17%}
 #battle .battle-roster button{padding:5px 3px 6px}
}
@media(orientation:landscape) and (max-height:350px){
 #stageSelect .stage-head button{min-height:27px;font-size:9px;padding:3px 5px}
 #stageSelect .stage-head .ribbon{padding:3px 6px}
 #stageSelect .stage-body strong{min-height:1.2em}
 #stageSelect .stage-thumb{max-height:20vh}
 #stageSelect .stage-meta,#stageSelect .stage-status{font-size:8px}
 #partySlots .party-slot{max-height:80px;max-width:64px}
}
/* Header uses the new horizontal frame at its own aspect ratio. */
#stageSelect .stage-head .ribbon{background:var(--zp-stage-frame) center/contain no-repeat;color:#fff1d0;text-shadow:0 2px 3px #081a22;font-weight:900;flex:1;max-width:clamp(140px,25vw,310px);min-height:clamp(34px,5vw,70px);display:grid;place-items:center;line-height:1.1;padding:5px 12px}
@media(orientation:landscape) and (max-height:600px){
 #stageSelect .stage-head .ribbon{min-height:32px;max-width:200px;padding:3px 10px}
 #partySlots .party-slot{max-height:84px;max-width:67px}
}
@media(orientation:landscape) and (max-height:350px){
 #stageSelect .stage-head .ribbon{min-height:28px;max-width:150px}
 #partySlots{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}
 #partySlots .party-slot{max-height:65px;max-width:50px}
}
