:root{font-family:"Hiragino Maru Gothic ProN","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;color:#203e39;background:#f4efdF;font-size:20px;line-height:1.6;--ink:#203e39;--mint:#d6e7c4;--gold:#efc55e;--paper:#fffdf4;--dark:#163b3b}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,summary{touch-action:manipulation}button{min-height:64px;font-size:24px;border:2px solid #28463e;border-radius:18px;padding:10px 18px;color:var(--ink);background:var(--paper);font-weight:700;cursor:pointer;box-shadow:0 3px 0 #28463e;transition:transform .12s,background .12s}button:hover{background:#edf4dc}button:active{transform:translateY(3px);box-shadow:none}button:disabled{opacity:.42;cursor:default;box-shadow:none}button:focus-visible,a:focus-visible,summary:focus-visible{outline:4px solid #d17538;outline-offset:4px}.primary{background:var(--gold)}.primary:hover{background:#ffd478}h1,h2,h3,p{margin:0 0 .65em}h1{font-size:clamp(28px,4vw,46px);line-height:1.3;letter-spacing:.025em}h2{font-size:28px;line-height:1.4}h3{font-size:24px}.eyebrow{font-size:16px;letter-spacing:.14em;font-weight:800;text-transform:uppercase}small,.small{font-size:16px}img{max-width:100%;object-fit:contain}.topbar{background:var(--dark);color:#fff9e8;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px max(20px,calc((100vw - 1140px)/2));flex-wrap:wrap}.brand{font-size:26px;letter-spacing:.12em;font-weight:bold}.purse{display:flex;gap:16px;flex-wrap:wrap;font-size:20px}.shell{max-width:1180px;margin:auto;padding:24px 24px 44px}.section-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.section-top h1{margin:0}.layout{display:grid;grid-template-columns:1.5fr 1fr;gap:24px}.panel{background:var(--paper);border:2px solid #d9dcc8;border-radius:24px;padding:24px;box-shadow:0 6px 0 #dedecb}.hero{background:var(--dark);color:#fff9e8;min-height:310px;position:relative;overflow:hidden;display:flex;align-items:center;padding:32px;border-radius:28px;gap:16px}.hero .copy{flex:1;z-index:1}.hero img{width:42%;max-height:260px;filter:drop-shadow(0 10px 0 #092f3420)}.hero .eyebrow{color:#e8cc89}.hero .star{position:absolute;right:20px;top:5px;opacity:.3}.star{font-size:100px;color:var(--gold)}.hero:after{content:'';position:absolute;width:240px;height:240px;right:-60px;bottom:-140px;background:#457257;border-radius:50%}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.card{background:var(--paper);border:2px solid #d9dcc8;border-radius:24px;padding:20px;text-align:center;min-width:0}.card.selected{border-color:#225f52;background:#f2f6e4}.card img{height:140px;width:100%;display:block;margin:auto}.card p{margin:.4em 0}.card button{width:100%}.card .badge{margin-bottom:8px}.badge{display:inline-block;border-radius:100px;padding:3px 14px;background:var(--mint);font-weight:bold}.muted{color:#5c6d60}.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.stack{display:grid;gap:16px}.mt{margin-top:24px}.nav{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:24px}.nav button{font-size:22px}.quest{display:grid;grid-template-columns:60px 1fr auto;gap:12px;align-items:center;padding:18px;border-bottom:2px dashed #daddc9}.quest:last-child{border-bottom:0}.quest-icon{font-size:40px}.quest p{margin:0}.battle-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}.arena{display:grid;grid-template-columns:1.1fr 1fr;gap:20px;align-items:center;background:#e5eed9 url('../../assets/art/stages/stage_grass_v01.webp') center/cover;border:2px solid #ced8c0;border-radius:26px;padding:22px;min-height:235px}.enemy{display:grid;grid-template-columns:150px 1fr;gap:14px;align-items:center}.enemy img{width:150px;height:180px;transform:scaleX(-1)}.intent{background:#fffdf4eb;border-radius:20px;padding:18px;border:2px solid #9cae88}.intent-icon{font-size:40px}.meter{height:15px;border:2px solid var(--ink);background:#e6e4d7;border-radius:10px;overflow:hidden}.meter i{display:block;height:100%;background:#4a8e69;transition:width .2s}.meter.enemy-meter i{background:#d99b54}.hptext{font-size:20px;font-variant-numeric:tabular-nums}.fighter img{height:100px}.fighter .role{font-size:16px;font-weight:bold}.fighter h3{font-size:21px}.actions{display:flex;gap:6px;margin-top:14px}.actions button{padding:8px 4px;font-size:24px;flex:1;min-width:0}.actions button span{display:block;font-size:24px}.fighter.used{background:#e8e9df}.battle-footer{display:grid;grid-template-columns:1fr auto;gap:16px;align-items:center;margin-top:18px}.gauge{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.pip{font-size:30px;color:#b6bdae}.pip.filled{color:#aa7616}.log{font-size:20px;padding:14px 20px;margin-top:18px;background:#e8eddf;border-radius:16px}.log p{margin:0}.notice{background:#ffedba;border:2px solid #ba8228;border-radius:18px;padding:16px;margin-bottom:20px}.footnote{font-size:16px;text-align:center;color:#607068;margin-top:30px}.save-status{font-size:16px;color:#cde1ce}.center{text-align:center}.result-art{height:220px;width:260px}.reward-chips{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}.reward-chips span{border-radius:18px;background:#ecedcd;padding:14px 20px}.reveal{animation:unfold 1s ease-out}.reveal img{width:240px;height:240px;animation:float 3s ease-in-out infinite}.envelope{background:#e6edda;border:3px dashed #91a77d;border-radius:26px;padding:24px;text-align:center}.envelope-symbol{font-size:90px;line-height:1.2}.rates{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.rate{display:flex;gap:10px;align-items:center}.rate img{width:60px;height:60px}.rate p{font-size:18px;margin:0}.album-card{transform:rotate(-1deg);border:10px solid white;box-shadow:0 3px 12px #19362918;padding:12px;background:#e7ecd8;border-radius:4px;text-align:center}.album-card:nth-child(even){transform:rotate(1deg)}.album-card img{height:150px;width:100%}.album-card p{margin:0}.slots{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.slots button{padding:8px;font-size:20px}.slots img{height:80px;display:block;width:100%}.fact{background:#eef1e5;border-left:5px solid #669275;padding:14px;border-radius:10px}.fiction{background:#fff0cf;border-left:5px solid #d5a044;padding:14px;border-radius:10px}.loading{text-align:center;padding:12vh 20px}.file-label{display:block;padding:16px;border:2px dashed #708a70;border-radius:16px}.file-label input{font-size:16px;max-width:100%;margin-top:8px}details{margin-top:18px}summary{cursor:pointer;min-height:64px;padding:14px 0;font-weight:bold}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.speech{min-width:64px}.source-line{overflow-wrap:anywhere;font-size:16px}.separator{height:2px;background:#dedfcd;margin:24px 0}a{color:#235d59}.empty{padding:30px;text-align:center}.flash{animation:unfold .25s ease-out}@keyframes unfold{from{opacity:0;transform:translateY(12px) scale(.95)}to{opacity:1;transform:none}}@keyframes float{50%{transform:translateY(-8px)}}@media(max-width:760px){.shell{padding:16px 14px 32px}.layout{grid-template-columns:1fr}.hero{padding:24px;min-height:270px}.cards{gap:10px}.card{padding:12px}.card img{height:100px}.card button{font-size:20px;padding:10px 6px}.panel{padding:18px}.nav{grid-template-columns:repeat(2,1fr)}.arena{grid-template-columns:1fr;padding:14px;gap:12px}.enemy{grid-template-columns:100px 1fr}.enemy img{height:110px;width:100px}.intent{padding:12px}.intent-icon{font-size:28px}.battle-footer{grid-template-columns:1fr}.battle-footer button{width:100%}.fighter{padding:10px 7px}.fighter h3{font-size:18px;line-height:1.4;min-height:50px}.fighter img{height:75px}.fighter .role{font-size:15px}.actions{flex-direction:column;gap:8px}.actions button{font-size:20px;min-height:64px}.actions button span{display:inline;font-size:22px}.quest{grid-template-columns:40px 1fr;padding:16px 0}.quest button{grid-column:2}.rates{grid-template-columns:repeat(2,1fr)}.section-top{align-items:flex-start}.section-top button{font-size:20px;padding:8px 12px}.topbar{padding:10px 16px}.purse{font-size:18px;gap:10px}.gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.roster{grid-template-columns:1fr 1fr}.roster .card button{font-size:22px}.slots button{font-size:18px}.hptext{font-size:18px}.album-card{border-width:6px;font-size:18px}.album-card img{height:110px}}@media(max-width:420px){.hero{display:block}.hero img{position:absolute;right:12px;bottom:0;width:35%;opacity:.8}.hero .copy{position:relative;max-width:80%}.hero h1{font-size:30px}.hero p{font-size:20px;max-width:220px}.cards.starter{grid-template-columns:1fr}.starter .card{display:grid;grid-template-columns:100px 1fr;gap:12px;align-items:center;text-align:left}.starter .card img{grid-row:1/3}.starter .card p{margin:0}.starter .card button{grid-column:2}.rates{grid-template-columns:1fr}.fighter h3{font-size:17px}.actions button{font-size:18px}.fighter .badge{padding:2px 6px;font-size:16px}.gauge{font-size:18px}.slots button{font-size:16px}.roster{grid-template-columns:1fr}.gallery{grid-template-columns:1fr 1fr}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.enemy>div{background:#fffdf4eF;padding:12px;border-radius:14px}.fx-attack .enemy img{animation:bump .4s ease-out}.fx-enemy{animation:bump .4s ease-out}.fx-guard{box-shadow:inset 0 0 0 7px #68a4ac}.fx-help{box-shadow:inset 0 0 0 7px #81b773}.combo-scene{display:flex;align-items:center;justify-content:center;background:#f5cd73;border-radius:22px;padding:8px;gap:12px;margin-top:12px;animation:unfold .5s ease-out}.combo-scene img{height:70px;width:70px}.combo-scene strong{font-size:24px}.letter-burst{font-size:60px;letter-spacing:10px;color:#a97914;animation:unfold .6s ease-out}.reveal{overflow:hidden}.reveal img{animation:letter-reveal 1.2s ease-out,float 3s 1.2s ease-in-out infinite}@keyframes bump{40%{transform:translateX(7px)}}@keyframes letter-reveal{0%{opacity:0;transform:translateY(50px) scale(.5)}45%{opacity:0;transform:translateY(30px) scale(.7)}100%{opacity:1;transform:none}}
@media(min-width:761px){body[data-view=battle] .topbar{padding-top:6px;padding-bottom:6px}body[data-view=battle] .save-status{display:none}body[data-view=battle] .shell{padding-top:12px}body[data-view=battle] .section-top{margin-bottom:8px}body[data-view=battle] .section-top h1{font-size:30px}body[data-view=battle] .eyebrow{margin:0}body[data-view=battle] .arena{min-height:140px;padding:10px 16px}body[data-view=battle] .enemy img{height:112px}body[data-view=battle] .intent{padding:10px 16px}body[data-view=battle] .intent-icon{font-size:24px}body[data-view=battle] .cards.mt{margin-top:12px}body[data-view=battle] .fighter{padding:10px}body[data-view=battle] .fighter img{height:66px}body[data-view=battle] .fighter h3{margin:0}body[data-view=battle] .fighter .badge{font-size:17px;margin:0;padding:0 10px}body[data-view=battle] .actions{margin-top:8px}body[data-view=battle] .actions button span{display:inline;font-size:22px}body[data-view=battle] .battle-footer{margin-top:12px}body[data-view=battle] .combo-scene{position:fixed;top:20%;left:25%;width:50%;z-index:2;pointer-events:none;animation:combo-away 1.3s forwards}}@keyframes combo-away{0%{opacity:0;transform:scale(.7)}20%,65%{opacity:1;transform:scale(1)}100%{opacity:0;visibility:hidden}}@media(prefers-reduced-motion:reduce){.combo-scene{position:static!important;width:auto!important;animation:none!important}.reveal img{animation:none!important}}
@media(min-width:761px){body[data-view=battle] .actions{gap:3px}body[data-view=battle] .actions button{font-size:24px;letter-spacing:-.045em;line-height:1.25;padding:7px 0}body[data-view=battle] .actions button span{display:block;line-height:1;font-size:22px;margin-bottom:4px}}
@media(max-width:420px){.actions button{font-size:20px}}

.section-top>button{flex-shrink:0;white-space:nowrap}.section-top>div{min-width:0}
@media(max-width:760px){.topbar{display:grid;grid-template-columns:92px 1fr;padding:10px 14px}.brand{font-size:22px;white-space:nowrap}.save-status{font-size:12px;display:block}.purse{justify-content:flex-end;gap:8px;font-size:16px}.purse span{white-space:nowrap}.speech{padding:8px;min-width:64px}.section-top .eyebrow{font-size:13px;letter-spacing:.07em}.cards:has(.fighter){grid-template-columns:1fr}.fighter{display:grid;grid-template-columns:86px 1fr;gap:2px 10px;text-align:left;padding:12px}.fighter>img{grid-column:1;grid-row:1/6;height:100px}.fighter .role,.fighter h3,.fighter .meter,.fighter .hptext,.fighter .badge{grid-column:2}.fighter h3{font-size:22px;min-height:0}.fighter .role{font-size:16px}.fighter .hptext{font-size:20px}.fighter .badge{font-size:18px;justify-self:start}.fighter .actions{grid-column:1/-1;flex-direction:row}.fighter .actions button{font-size:22px;min-height:64px;padding:8px 0;letter-spacing:-.04em}.fighter .actions button span{display:block;font-size:22px;line-height:1}.combo-scene{flex-wrap:wrap}.combo-scene img{width:60px;height:60px}}

.save-json{width:100%;min-height:180px;font-family:monospace;font-size:14px;resize:vertical;border:2px solid #6f8c74;border-radius:12px;padding:12px}
@media(min-width:761px) and (max-width:950px){body[data-view=battle] .actions{flex-direction:column;gap:8px}body[data-view=battle] .actions button{min-height:64px;white-space:nowrap}body[data-view=battle] .actions button span{display:inline;margin-right:6px}}

/* v2: one shared open field, with paper edges and warm soil. Album colors stay intact. */
body[data-view=battle]{background:#e2f2ed}
body[data-view=battle] .shell{max-width:1120px;padding-bottom:18px}
.battlefield{position:relative;isolation:isolate;overflow:hidden;border:3px solid #9b815f;border-radius:28px;background:linear-gradient(#b9e6f5 0%,#daf3fa 43%,#9dc882 44%,#6daa68 73%,#b2d988 100%);padding:14px 20px 10px;box-shadow:0 5px 0 #8d7658}
.battlefield:before{content:'';position:absolute;z-index:-1;left:-8%;top:30%;width:118%;height:40%;border-radius:50% 60% 0 0;background:#83b878;transform:rotate(-3deg)}
.battlefield:after{content:'';position:absolute;z-index:-1;right:-10%;top:38%;width:85%;height:24%;border-radius:50%;background:#aacd8b;transform:rotate(6deg)}
.battlefield .intent{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:4px 16px;border:0;border-radius:14px;padding:8px 12px;background:#fffdf4f5;font-size:18px;color:#203e39}
.enemy-row{display:flex;justify-content:center;align-items:center;gap:14px;padding:8px 0}.enemy-row>img{width:160px;height:136px;transform:scaleX(-1);filter:drop-shadow(0 8px 3px #28524335)}.enemy-row>div{width:230px;background:#fffdf4e8;border-radius:15px;padding:10px 16px}.enemy-row h2{font-size:24px;margin:0 0 6px}
.team-row{display:flex;align-items:flex-end;justify-content:space-evenly;gap:14px;max-width:780px;margin:0 auto}.field-actor{width:30%;min-width:0;display:flex;align-items:center;flex-direction:column;background:transparent;border:3px solid transparent;border-radius:22px;box-shadow:none;padding:4px 8px 8px;font-size:20px;line-height:1.35;color:#173e32}.field-actor:hover{background:#ffffff50}.field-actor.selected-actor{border-color:#224e40;background:#faffebaa;box-shadow:0 3px 0 #487048}.field-actor>img{height:128px;width:160px;filter:drop-shadow(0 6px 3px #315a4135)}.field-actor .role{font-size:15px;background:#fffdf4cf;border-radius:20px;padding:1px 10px}.field-actor strong{max-width:100%;font-size:21px}.field-actor .meter{width:100%;max-width:160px;height:12px;margin-top:5px}.field-actor .hptext{font-size:16px;background:#fffdf4bf;border-radius:8px;padding:0 6px;margin-top:3px}.actor-mark{font-size:15px}.resting>img{opacity:.55}
.command-dock{background:#fffdf4;border:2px solid #b1c6a8;border-radius:20px;margin-top:14px;padding:14px 18px}.command-title{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px;margin-bottom:10px}.command-title>strong{font-size:24px}.command-title>span{font-size:18px}.main-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.main-actions>button{font-size:24px;padding:10px 4px}.personal-special{display:grid;grid-template-columns:auto 1fr;gap:4px 18px;align-items:center;margin-top:14px}.personal-special p{font-size:16px;margin:0}.personal-special button{font-size:24px;min-height:64px}.personal-special button>span,.move-options button>span,.battle-controls button>span{display:block;font-size:18px;font-weight:500}.special-button{background:#e5dbfa;border-color:#644589}.special-button:hover{background:#f1e8ff}.special-description{grid-column:1/-1}.move-options{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}.move-options button{font-size:24px;line-height:1.4}.move-menu>p{font-size:18px}.move-menu>button{font-size:22px;min-height:64px}.move-menu h2{margin-bottom:8px}.battle-controls{position:sticky;bottom:0;z-index:3;display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#fffdf4f5;padding:10px 12px max(10px,env(safe-area-inset-bottom));border:2px solid #97b093;border-radius:18px;margin-top:18px;box-shadow:0 -3px 14px #193e391a}.battle-controls button{font-size:24px;line-height:1.35;min-height:70px;padding:8px}.battle-controls button:disabled{opacity:1;color:#627264;background:#e5e8db;border-color:#869185}.battle-controls button strong{font-size:24px}.skill-scene{position:fixed;z-index:4;top:25%;left:15%;width:70%;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:10px;padding:16px;background:#fff0a5;border:3px solid #ad8025;border-radius:24px;pointer-events:none;animation:combo-away 1.4s forwards}.skill-scene img{width:100px;height:100px}.skill-scene strong{font-size:30px}.fx-special .enemy-row>img,.fx-attack .enemy-row>img{animation:bump .4s ease-out}
@media(max-width:760px){body[data-view=battle] .section-top h1{font-size:24px}body[data-view=battle] .section-top{margin-bottom:10px}body[data-view=battle] .save-status{display:none}body[data-view=battle] .topbar{padding-top:5px;padding-bottom:5px}.battle-head{font-size:16px}.battlefield{padding:8px 6px 6px;border-radius:18px}.battlefield .intent{font-size:16px;line-height:1.4;gap:2px 8px}.battlefield .intent strong{font-size:18px}.enemy-row{gap:8px;padding:6px 0}.enemy-row>img{width:120px;height:110px}.enemy-row>div{width:180px;padding:7px 10px}.enemy-row h2{font-size:20px}.enemy-row .hptext{font-size:18px}.team-row{gap:3px}.field-actor{width:33%;padding:3px 2px 6px;border-width:2px;border-radius:14px}.field-actor>img{width:100px;height:100px}.field-actor strong{font-size:18px;min-height:48px;display:flex;align-items:center}.field-actor .role,.actor-mark{font-size:13px}.field-actor .hptext{font-size:14px;white-space:nowrap;padding:0 2px}.command-dock{padding:12px 8px}.command-title>span{font-size:16px}.main-actions{gap:4px}.main-actions>button{font-size:24px;line-height:1.3;padding:8px 0;overflow-wrap:normal}.personal-special{grid-template-columns:1fr;gap:8px}.personal-special>div{display:flex;align-items:center;justify-content:space-between;gap:8px}.personal-special button{font-size:24px}.move-options{grid-template-columns:1fr}.move-options button{padding:10px 8px}.battle-controls{gap:6px;padding:8px 6px max(8px,env(safe-area-inset-bottom));margin-left:-6px;margin-right:-6px}.battle-controls button,.battle-controls button strong{font-size:22px}.battle-controls button{padding:6px 2px;min-height:82px}.battle-controls button>span{font-size:17px}.skill-scene{left:5%;width:90%}.skill-scene img{width:70px;height:70px}.skill-scene strong{font-size:24px}}
@media(max-height:500px) and (min-width:761px){.battle-controls{padding:6px 10px}.battle-controls button{min-height:64px}.team-row .field-actor>img{height:110px}}
@media(prefers-reduced-motion:reduce){.skill-scene{position:static;width:100%;animation:none;left:auto;top:auto;margin:12px 0}.field-actor>img{filter:none}}
.command-dock,.move-menu{scroll-margin-bottom:120px}.battlefield .field-actor{scroll-margin-bottom:120px}
.music-toggle{font-size:18px;white-space:nowrap}.volume-control{display:grid;gap:8px;margin:16px 0}.volume-control input{width:100%;min-height:48px}
.stage-oblique{background:#a2c971 url('../../assets/rpg/stages/grassland-oblique-v02.png') center 65%/cover;padding:10px 14px 0;box-shadow:0 5px 0 #887253}.stage-oblique:before,.stage-oblique:after{display:none}.stage-space{position:relative;height:330px;transform-origin:50% 55%}.stage-oblique .enemy-row{position:absolute;top:2%;left:50%;transform:translateX(-50%);padding:0;gap:6px;flex-direction:column;z-index:1}.stage-oblique .enemy-figure{position:relative;isolation:isolate}.stage-oblique .enemy-figure:before{content:'';position:absolute;width:100px;height:22px;border-radius:50%;background:#244c3c55;filter:blur(3px);bottom:0;left:10px;z-index:-1}.stage-oblique .enemy-figure>img{width:125px;height:110px;transform:scaleX(-1);filter:drop-shadow(2px 5px 2px #26413530)}.stage-oblique .enemy-row>div:not(.enemy-figure){width:190px;border:0;padding:5px 9px;background:#fffdf4e8;border-radius:10px}.stage-oblique .enemy-row h2{font-size:18px;margin:0}.stage-oblique .enemy-row .hptext{font-size:15px;line-height:1.25}.stage-oblique .enemy-row .meter{height:10px}
.stage-oblique .team-row{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);width:85%;max-width:780px;align-items:flex-end;z-index:2}.stage-oblique .field-actor{position:relative;isolation:isolate;background:none;border-color:transparent;padding:2px 5px;box-shadow:none;width:30%;line-height:1.15}.stage-oblique .field-actor:before{content:'';position:absolute;z-index:-1;top:115px;left:15%;width:70%;height:26px;border-radius:50%;background:#26442b60;filter:blur(3px)}.stage-oblique .field-actor.selected-actor:after{content:'';position:absolute;top:108px;left:12%;width:76%;height:33px;border:3px solid #ffeeb0;border-radius:50%;z-index:-1;box-shadow:0 0 8px #fbed9ab3}.stage-oblique .field-actor>img{width:170px;height:132px;filter:drop-shadow(1px 5px 2px #29463235);transform-origin:50% 90%}.stage-oblique .field-actor .role{position:absolute;top:0;left:0;font-size:13px;z-index:1}.stage-oblique .field-actor strong{font-size:19px;min-height:0;background:#fffdf4eF;border-radius:8px;padding:3px 6px}.stage-oblique .field-actor .hptext{font-size:15px;background:#fffdf4eF}.stage-oblique .field-actor .meter{max-width:145px;margin-top:3px}.stage-oblique .actor-mark{display:none}.stage-oblique .field-actor:nth-child(2){margin-bottom:24px}.stage-oblique .field-actor:nth-child(1){--step-x:35px}.stage-oblique .field-actor:nth-child(2){--step-x:0px}.stage-oblique .field-actor:nth-child(3){--step-x:-35px}
.stage-oblique.fx-attack .acting>img{animation:step-in .5s ease-out}.stage-oblique.fx-attack .enemy-figure>img{animation:impact .5s ease-out}.stage-oblique.fx-special .stage-space,.stage-oblique.fx-combo .stage-space{animation:skill-camera .85s ease-out}.stage-oblique.fx-special .enemy-figure>img,.stage-oblique.fx-combo .enemy-figure>img{animation:impact .85s ease-out}.stage-oblique.fx-enemy .enemy-figure>img{animation:enemy-step .5s ease-out}.stage-oblique.fx-guard .acting:after{border-color:#a9efff;box-shadow:0 0 18px 10px #78dbee80}.stage-oblique.fx-help .acting>img{animation:healing .7s ease-out}.stage-oblique.fx-combo:after,.stage-oblique.fx-special:after{display:block;content:'✦';position:absolute;z-index:3;left:50%;top:30%;font-size:130px;color:#fff5b8;pointer-events:none;animation:spark-burst .7s ease-out forwards}
@keyframes step-in{35%{transform:translate(var(--step-x),-65px) scale(.8)}60%{transform:translate(var(--step-x),-75px) scale(.85)}100%{transform:none}}@keyframes impact{25%,55%{filter:brightness(1.9);transform:scaleX(-1) translateX(7px) rotate(-4deg)}75%{transform:scaleX(-1) translateX(-4px)}}@keyframes enemy-step{40%{transform:scaleX(-1) translateY(45px) scale(1.1)}}@keyframes skill-camera{25%{transform:scale(1.08) translateY(6px)}55%{transform:scale(1.04) translateX(-3px)}70%{transform:scale(1.04) translateX(3px)}}@keyframes healing{50%{filter:drop-shadow(0 0 18px #c4fff0) brightness(1.25)}}@keyframes spark-burst{0%{opacity:0;transform:translate(-50%,-50%) scale(.2)}35%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.5)}}
@media(max-width:760px){.stage-oblique{padding:8px 6px 0;background-position:center 60%}.stage-space{height:340px}.stage-oblique .team-row{width:100%;bottom:12px;gap:0}.stage-oblique .field-actor{width:33.3%;padding:2px}.stage-oblique .field-actor>img{width:116px;height:116px}.stage-oblique .field-actor:before{top:102px;height:18px;left:8%;width:84%}.stage-oblique .field-actor.selected-actor:after{top:96px;left:3%;width:94%;height:25px}.stage-oblique .field-actor .role{font-size:11px;padding:2px 5px}.stage-oblique .field-actor strong{font-size:16px;min-height:42px;justify-content:center;width:100%;padding:3px 1px}.stage-oblique .field-actor .hptext{font-size:13px}.stage-oblique .enemy-row{top:8px}.stage-oblique .enemy-figure>img{height:105px;width:120px}.stage-oblique .enemy-row>div:not(.enemy-figure){width:165px}.stage-oblique .field-actor:nth-child(2){margin-bottom:14px}}
@media(prefers-reduced-motion:reduce){.stage-space,.stage-oblique *,.stage-oblique:after{animation:none!important}.stage-oblique.fx-combo:after,.stage-oblique.fx-special:after{display:none}}
@media(min-width:761px){.battlefield{padding:10px 16px 6px}.enemy-row>img{height:104px}.field-actor>img{height:104px}.field-actor{padding:2px 8px 5px}.field-actor .actor-mark{display:none}.command-dock{display:grid;grid-template-columns:1.25fr 1fr;gap:8px 18px;padding:12px 16px}.command-title{grid-column:1/-1;margin:0}.main-actions{align-self:center}.personal-special{grid-template-columns:1fr;gap:4px;margin:0}.personal-special>div{display:flex;justify-content:space-between;gap:6px}.personal-special button{padding:6px}.personal-special .special-description{font-size:14px}.move-menu{grid-column:1/-1}.move-menu+.personal-special{grid-column:1/-1;grid-template-columns:1fr 1fr}.move-menu+.personal-special .special-description{grid-column:1/-1}}
/* Japan opening and expandable atlas. All dialogue remains ordinary readable text. */
.map-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}.map-tabs button[aria-pressed=true]{background:#eed287;border-color:#916d35}.map-panel{position:relative;background:#fffaf0;border:2px solid #bdae8a;border-radius:24px;padding:22px}.map-panel>svg{display:block;width:100%;max-height:320px;margin:auto}.map-places{display:flex;gap:14px;margin-top:16px;flex-wrap:wrap}.map-places>button{flex:1;min-width:220px;text-align:left}.map-places span{display:block;font-size:18px;font-weight:400}.map-places button:disabled{opacity:1;color:#738172;background:#e8eadf;border-color:#b8bfad}.team-summary>.slots{margin-bottom:16px}.team-summary .slots img{height:100px}.region-quests{scroll-margin-top:16px}
body[data-view=story]{background:#e6e4d6}.story-view{max-width:940px;margin:auto}.story-heading{display:flex;justify-content:space-between;gap:16px;font-size:18px}.story-stage{height:280px;position:relative;overflow:hidden;border-radius:24px 24px 0 0;background:#a6c98b url('../../assets/rpg/stages/grassland-oblique-v02.png') center 55%/cover;display:flex;align-items:flex-end;justify-content:center;isolation:isolate}.story-stage>img{width:240px;height:230px;position:relative;z-index:2;filter:drop-shadow(0 10px 5px #192f4066);margin-bottom:10px}.story-stage.story-night{background:radial-gradient(ellipse at 70% 10%,#365a86,#102b4b 62%,#183e44 63%,#496b5e)}.star-road{position:absolute;top:18px;right:15%;color:#ffecb7;font-size:40px;letter-spacing:10px;transform:rotate(-15deg)}.path-closed .star-road{opacity:.4;text-decoration:line-through;text-decoration-color:#183552}.story-stage>.far-friend{position:absolute;right:9%;top:62px;width:100px;height:115px;opacity:.85;z-index:1}.rival-sign{position:absolute;right:12%;top:20%;background:#f0df9f;color:#213f50;padding:12px;border-radius:18px;font-size:24px;z-index:3}.story-dialogue{padding:22px 28px;background:#fffdf4;border:3px solid #aa9670;border-top:0;border-radius:0 0 24px 24px;box-shadow:0 5px 0 #d0c7b0;font-size:26px;line-height:1.8}.story-dialogue>.speaker{display:inline-block;color:#f9efd8;background:#285252;border-radius:12px;padding:1px 14px;font-size:18px;font-weight:700;margin-bottom:12px}.story-dialogue>p:not(.speaker){margin-bottom:6px}.story-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:18px}.story-skip{display:flex;gap:10px;flex-wrap:wrap;margin:22px 0 14px}.story-skip>button{font-size:18px;min-height:64px;padding:8px 12px}.story-heading>p{margin:0 0 12px}.story-view .small{font-size:16px}
@media(max-width:760px){.map-tabs{gap:6px}.map-tabs button{font-size:21px;padding:8px 4px}.map-panel{padding:16px 12px}.map-panel>svg{max-height:240px}.map-places{gap:10px}.map-places>button{min-width:100%;font-size:22px}.story-stage{height:225px}.story-stage>img{height:190px;width:200px}.story-stage>.far-friend{width:80px;height:90px;right:5%}.story-dialogue{font-size:23px;padding:18px 16px;line-height:1.75}.story-actions{flex-direction:column}.story-actions>button{width:100%;font-size:24px}.story-skip{display:grid;grid-template-columns:1fr;gap:10px}.story-heading{font-size:15px}.star-road{right:5%;font-size:30px;letter-spacing:5px}.story-heading span{white-space:nowrap}}
.brand{display:flex;align-items:center;gap:10px;font-size:24px;letter-spacing:.08em}.brand-icon{width:42px;height:42px;border-radius:10px}.title-hero{background:radial-gradient(ellipse at 65% 10%,#26568a,#102452);padding:26px;gap:26px;min-height:330px}.hero .title-logo{position:static;width:280px;max-height:none;height:auto;flex-shrink:0;opacity:1;filter:none}.title-hero>.copy{flex:1}.title-hero>.copy h1{font-size:34px}.title-hero>img:not(.title-logo){width:20%;max-width:180px}.title-hero>.star{display:none}
@media(max-width:760px){.topbar{grid-template-columns:minmax(0,1fr) auto}.brand{font-size:19px;gap:6px;letter-spacing:0}.brand-icon{width:32px;height:32px}.purse{gap:6px;font-size:14px}.music-toggle{font-size:16px}.title-hero{display:flex;flex-wrap:wrap;justify-content:center;padding:22px;gap:14px;text-align:center}.hero .title-logo{width:200px;max-width:90%;height:auto}.title-hero>.copy{max-width:100%;flex-basis:100%}.title-hero>.copy h1{font-size:28px}.title-hero>.copy p{max-width:none}.title-hero>img:not(.title-logo){display:none}.title-hero .eyebrow{font-size:14px}.story-view .story-heading{font-size:14px}}
@media(max-width:380px){.purse>span{font-size:12px}.purse{gap:4px}.brand{font-size:17px}.brand-icon{width:27px;height:27px}.topbar{padding-left:10px;padding-right:10px}}
.save-confirm{color:var(--ink);background:var(--paper);max-width:min(600px,calc(100vw - 28px));border:3px solid #9f8658;border-radius:22px;padding:24px;font-size:20px}.save-confirm::backdrop{background:#122c45b0}.save-confirm .row{justify-content:flex-end}.save-confirm button{font-size:22px}
/* Keep the enemy's feet on the same ground; only its HP label has a paper backing. */
.stage-oblique .enemy-row{left:66%;flex-direction:column-reverse;top:3px;gap:0}.stage-oblique .enemy-row>.enemy-figure{background:none;padding:0;width:auto;border-radius:0}.stage-oblique .enemy-figure>img{display:block}.stage-oblique .field-actor:nth-child(2){margin-bottom:0}.stage-space{height:350px}
@media(max-width:760px){.stage-space{height:350px}.stage-oblique .enemy-row{left:66%;top:8px}.stage-oblique .enemy-row>div:not(.enemy-figure){width:150px}.stage-oblique .enemy-row h2{font-size:17px}.stage-oblique .enemy-figure>img{height:95px;width:105px}}
.phone-break{display:none}@media(max-width:760px){.phone-break{display:block}.title-hero>.copy h1{font-size:24px}.title-hero>.copy p:not(.eyebrow){font-size:20px}}
@media(min-width:761px){.stage-space{height:265px}.command-dock{margin-top:10px;padding:8px 12px;gap:4px 16px}.personal-special button{line-height:1.25;min-height:64px}.command-title{line-height:1.25}.battle-controls{margin-top:10px}.field-actor.resting>img{opacity:.75}}
@media(min-width:761px){.stage-space{height:320px}.battle-title .battle-head{display:flex;flex-direction:column;align-items:center;gap:0;margin:0;font-size:16px}.battle-title .badge{font-size:18px}.battle-title>div:first-child{flex:1}.battle-title h1{font-size:27px!important}.battle-title{gap:16px}.battle-title .eyebrow{font-size:14px}}
@media(max-width:760px){.battle-title{display:grid;grid-template-columns:1fr auto;gap:8px}.battle-title>.battle-head{grid-column:1/-1;grid-row:2;margin:0;gap:2px;font-size:14px}.battle-title>.battle-head .badge{font-size:16px}.battle-title>button{grid-column:2;grid-row:1}.battle-title>.battle-head>span:last-child{font-size:14px}}
.map-tabs button,.section-top h1{word-break:keep-all;overflow-wrap:normal}

/* Morning: motion layer only; broad layout redesign is awaiting research. */
.arena .motion-label{position:absolute;z-index:8;left:8%;right:8%;top:24%;text-align:center;background:#163b3bf2;color:#fff5cb;border:2px solid #d6be78;border-radius:16px;padding:10px 18px;font-size:22px;pointer-events:none}.arena .motion-label:empty{display:none}.arena.is-performing .field-actor{opacity:1}.arena .unit-performing{z-index:6!important}.arena .unit-performing .unit-sprite{transform-origin:50% 88%}.arena .unit-charged .unit-sprite{filter:drop-shadow(0 0 16px #fff39d) brightness(1.18)}.arena .unit-guarded{filter:drop-shadow(0 0 16px #79e6ff)}.arena .unit-healed{filter:drop-shadow(0 0 20px #9fffbe)}.arena .power-wave{position:absolute;pointer-events:none;z-index:7;left:35%;top:30%;width:65px;height:65px;border:5px solid #fff2b0;border-radius:50%;box-shadow:0 0 15px #ffcf5b,inset 0 0 14px #fff2b0}.arena .wave-help{border-color:#adffd3}.arena .contact-burst{position:absolute;z-index:8;pointer-events:none;left:20%;top:25%;width:75%;height:70%;background:radial-gradient(ellipse,#fffbea 0 6%,#ffe28cbb 7% 16%,transparent 55%);clip-path:polygon(50% 0,59% 34%,90% 8%,68% 42%,100% 50%,67% 59%,92% 95%,56% 68%,48% 100%,40% 66%,0 82%,30% 54%,0 30%,38% 40%)}.arena .burst-jump{transform:scale(1.3,.8)}.arena .burst-special,.arena .burst-combo{transform:scale(1.5);background:radial-gradient(ellipse,#fffbea,#ffe28c77 30%,transparent 60%)}
@media(prefers-reduced-motion:reduce){.arena .power-wave,.arena .contact-burst{display:none}}
/* Research-led morning UI. Independent SVG vocabulary and short labels. */
.ui-icon{width:24px;height:24px;flex:0 0 24px;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;display:inline-block;margin-right:6px}button .ui-icon{pointer-events:none}ruby{ruby-align:center;white-space:nowrap}rt{font-size:.48em;font-weight:500;letter-spacing:.03em}body[data-ruby=off] rt{display:none}button{min-height:48px;font-size:20px;line-height:1.4}h1 .ui-icon,h2 .ui-icon{width:28px;height:28px}button.quiet,.quiet{background:#f6f7ed;border-color:#c1cab5;box-shadow:none;font-size:18px;padding:8px 12px}.profile-top{display:flex;align-items:center;justify-content:space-between}.profile-hero{display:grid;grid-template-columns:minmax(140px,35%) 1fr;gap:24px;align-items:center;margin:20px 0;padding:20px;background:radial-gradient(ellipse at 22% 45%,#e8ddb2,#f4f0e3 70%);border-radius:24px}.profile-hero>img{height:250px;width:100%}.profile-hero h1{font-size:34px;line-height:1.9}.profile-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:18px 0}.profile-tabs button{padding:12px 5px}.profile-tabs button[aria-pressed=true]{background:#d9e8cf;border-color:#315844}.profile-body{line-height:1.9}.profile-body h2{margin-top:18px;font-size:25px}.profile-body h2:first-child{margin-top:0}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.stat-grid>div{background:#ecf0e4;border-radius:16px;padding:16px;display:flex;flex-direction:column}.stat-grid span{font-size:17px}.stat-grid strong{font-size:32px}.skill-list{display:grid;grid-template-columns:1fr 1fr;gap:12px}.skill-list article{background:#f1f1e4;padding:16px;border-radius:16px}.skill-list h3{font-size:22px}.profile-footer{display:flex;justify-content:flex-end;gap:12px;margin:18px 0}.growth-table>div{display:grid;grid-template-columns:1fr 1fr auto;padding:10px;border-bottom:1px solid #d7dacc;gap:10px}.growth-table em{font-style:normal;color:#1e7159}.growth-cost{background:#eef0e5;padding:16px;border-radius:16px;margin:18px 0}.growth-success{background:#d7efdf;padding:14px;border-radius:14px;font-weight:700}.fact-entry{padding:18px 0;border-bottom:1px solid #d4dace}.fact-entry a{overflow-wrap:anywhere}.memory-line{padding:14px;border-bottom:1px solid #d6dec8}.codex-filter{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:18px 0}.codex-filter label{display:flex;align-items:center;gap:8px;font-size:18px}.codex-filter input[type=text],.codex-filter input:not([type]){min-height:48px;padding:8px;border:2px solid #8caa95;border-radius:12px;min-width:150px}.codex-filter input[type=checkbox]{width:22px;height:22px}.codex-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.codex-card{min-width:0;background:#fffdf5;border-color:#d4dac9;display:flex;flex-direction:column;align-items:center;padding:12px}.codex-card img{width:100%;height:145px}.codex-card strong{font-size:21px;line-height:2.1}.codex-card>span{font-size:16px;font-weight:400}.draw-lobby{text-align:center;padding:30px;background:radial-gradient(ellipse at 50% 20%,#fff1c5,#e7efd9);border-radius:28px}.letter-mark .ui-icon{width:100px;height:100px;stroke-width:1;fill:#fffaf1;margin:0}.draw-lobby h2{font-size:30px}.draw-balance{display:flex;justify-content:center;gap:28px;margin:24px 0}.draw-balance span{display:flex;flex-direction:column}.draw-balance strong{font-size:28px}.draw-button{min-width:250px;font-size:26px;padding:15px}.draw-lobby .small{margin-top:18px}.draw-roster{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:20px}.draw-roster article{display:flex;align-items:center;flex-direction:column;min-width:0}.draw-roster img{height:120px}.draw-roster strong{font-size:21px;line-height:2.1}.draw-roster span{font-size:17px}.draw-result{position:relative;isolation:isolate;overflow:hidden;border-radius:28px;background:linear-gradient(#e0edf0,#fcf6df 72%);padding:22px;text-align:center}.draw-creature{width:min(340px,80%);height:300px;display:block;margin:0 auto;filter:drop-shadow(0 12px 6px #35515533)}.draw-result h1{font-size:34px;line-height:2;margin:0}.result-kind{display:inline-block;background:#264f59;color:#fff7d9;padding:5px 18px;border-radius:20px;font-weight:700}.draw-role{font-size:21px}.draw-obtained{display:flex;flex-direction:column;padding:12px;margin:12px auto;max-width:400px;border-radius:16px;background:#fffdf5}.draw-obtained strong{font-size:25px}.result-actions{display:flex;justify-content:center;gap:14px;margin:20px 0}.result-actions button{min-width:160px;font-size:22px}.result-actions button:first-child{background:#edc75e;border-color:#866a31}.arrival-halo{position:absolute;z-index:-1;top:5%;left:5%;width:90%;height:66%;border-radius:50%;background:radial-gradient(ellipse,#fffaf1,#ffe29d55 38%,transparent 65%)}.arrival .draw-creature{animation:friend-arrives 1.7s ease-out both}.arrival h1,.arrival .draw-role,.arrival .draw-obtained{animation:friend-name 1.7s both}.arrival-skip{position:absolute;right:12px;top:12px;font-size:15px!important}.story-skip{gap:8px}.story-skip button{min-height:48px;font-size:18px}.story-log article{border-bottom:1px solid #bcc9b1;padding:15px 0}.story-log h3{font-size:18px}.story-log p{font-size:20px}.story-actions button{min-height:56px}
@keyframes friend-arrives{0%,22%{opacity:0;transform:translateY(32px) scale(.82)}62%{opacity:1;transform:translateY(-5px) scale(1.04)}100%{opacity:1;transform:none}}@keyframes friend-name{0%,50%{opacity:0;transform:translateY(12px)}100%{opacity:1;transform:none}}
body[data-view=battle]{background:#e5ebe1}body[data-view=battle] .topbar{min-height:40px;padding-top:3px;padding-bottom:3px;flex-wrap:nowrap}body[data-view=battle] .topbar .purse>span,body[data-view=battle] .save-status{display:none}body[data-view=battle] .brand{font-size:17px}body[data-view=battle] .brand-icon{width:28px;height:28px}body[data-view=battle] .music-toggle{min-height:34px;font-size:15px;padding:3px 10px}body[data-view=battle] .shell{padding:8px 16px;max-width:1180px}.combat-top{display:flex;align-items:center;gap:12px;margin-bottom:8px}.combat-top h1{font-size:22px;flex:1}.combat-top>span{font-size:17px}.combat-top button{font-size:16px;min-height:40px;padding:5px 10px}.battle-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr);gap:14px;align-items:start}.stage-composed{padding:0;border:0;border-radius:22px;box-shadow:none;min-height:535px;background:linear-gradient(#cfe6e6 0%,#e9ecd0 30%,#b7cc99 31%,#9ab581 65%,#aec68d 100%);isolation:isolate}.stage-composed:before{display:block;content:'';position:absolute;left:-10%;top:21%;width:110%;height:30%;z-index:-1;background:#8fab8255;border-radius:65% 65% 0 0;transform:rotate(-3deg)}.stage-composed:after{display:block;content:'';position:absolute;left:-10%;bottom:-8%;top:auto;width:120%;height:27%;border-radius:50%;background:#6a915a44;z-index:-1;transform:none}.stage-composed .intent{position:absolute;left:10px;right:10px;top:8px;padding:6px 10px;font-size:16px;line-height:1.4;justify-content:space-between;z-index:5;background:#fbfbeeeb}.stage-composed .intent strong{font-size:17px}.stage-composed .stage-space{position:absolute;inset:50px 0 12px;height:auto;transform-origin:center}.stage-composed .enemy-row{position:absolute;left:calc(52% - 58px);top:calc(29% - 105px);width:116px;height:105px;display:block;padding:0;z-index:1}.stage-composed .enemy-row>div{width:auto;padding:0;background:none}.stage-composed .enemy-figure{position:relative;width:116px;height:105px}.stage-composed .enemy-figure>img{width:100%;height:100%;transform:none;filter:drop-shadow(2px 3px 2px #334a3433)}.stage-composed .enemy-figure:before{content:'';position:absolute;left:17%;bottom:0;width:66%;height:14px;background:#304b3455;border-radius:50%;z-index:-1;filter:blur(3px)}.stage-composed .enemy-hud{position:absolute;top:106px;left:50%;transform:translateX(-50%);min-width:144px;text-align:center;border-radius:10px;background:#fffdf2dc!important;padding:3px 7px!important}.stage-composed .enemy-hud strong{font-size:15px}.stage-composed .meter{height:7px;margin-top:3px}.stage-composed .hptext{font-size:12px}.stage-composed .team-row{position:absolute;inset:0;width:100%;max-width:none;display:block;margin:0}.stage-composed .field-actor{position:absolute;left:calc(var(--foot-x) - var(--unit-size)/2);top:calc(var(--foot-y) - var(--unit-size));width:var(--unit-size);height:var(--unit-size);padding:0;border:0;background:none!important;box-shadow:none;display:block;line-height:1.2;z-index:2;overflow:visible}.stage-composed .field-actor:first-child{z-index:3}.stage-composed .field-actor:before{content:'';position:absolute;left:16%;bottom:0;width:68%;height:18px;background:#304b3455;z-index:-1;border-radius:50%;filter:blur(3px)}.stage-composed .field-actor.selected-actor:after{content:'';position:absolute;left:10%;bottom:-2px;width:80%;height:21px;border:2px solid #fff2a5;border-radius:50%;z-index:-1;box-shadow:0 0 6px #fff2a580}.stage-composed .field-actor>img{width:100%;height:100%;filter:drop-shadow(2px 3px 2px #334a3433);transform:scale(var(--body-scale));transform-origin:50% 100%}.stage-composed .role{position:absolute;top:7%;left:3%;padding:2px 5px;background:#244e43df;color:#fffbe4;border-radius:6px;font-size:11px;z-index:4}.stage-composed .unit-caption{position:absolute;top:100%;left:50%;transform:translateX(-50%);min-width:110px;background:#fffdf2e8;border-radius:10px;padding:4px 6px;display:block}.stage-composed .unit-caption strong{font-size:14px;line-height:1.4;white-space:nowrap}.stage-composed .actor-mark{font-size:10px}.stage-material-note{position:absolute;bottom:3px;right:8px;font-size:10px;color:#36583e}.combat-panel{background:#fbfcf4;border:1px solid #c5d2bc;border-radius:20px;padding:14px}.ap-strip{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dce1d2;padding-bottom:8px}.ap-strip b{font-size:19px}.ap-strip>span{color:#bd8a23;font-size:23px;letter-spacing:3px}.selected-name{display:flex;align-items:center;justify-content:space-between;margin:12px 0 0}.selected-name strong{font-size:22px;line-height:2}.selected-name .quiet{font-size:15px;min-height:40px;padding:4px 10px}.action-reason{font-size:14px;min-height:36px;margin:0 0 8px;line-height:1.4}.combat-actions,.combat-specials{display:grid;grid-template-columns:1fr 1fr;gap:8px}.combat-actions button{min-height:72px;padding:8px 5px;font-size:21px;line-height:1.55}.combat-actions button>span:last-child,.combat-specials button>span:last-child{display:block;font-size:14px;font-weight:500}.combat-actions button .ui-icon{width:20px;height:20px;margin-right:3px}.combat-actions button>strong{font-size:19px;display:inline}.combat-specials{margin-top:10px}.combat-specials button{min-height:64px;font-size:20px;padding:7px 4px;line-height:1.5}.combat-specials button .ui-icon{width:21px;height:21px}.combat-end{display:flex;justify-content:space-between;margin-top:10px;gap:10px}.combat-end button{font-size:15px;min-height:44px;padding:5px 9px}.battle-note{font-size:16px;padding:10px 3px;line-height:1.5}.combat-help{font-size:17px;margin:8px 0}.arena .motion-label{font-size:18px;top:34%;left:4%;right:4%;padding:8px 12px}.stage-composed .field-actor.unit-performing{z-index:6}.stage-composed .enemy-figure.unit-performing{z-index:6}.stage-composed .field-actor:active{transform:none}
@media(max-width:760px){.profile-hero{grid-template-columns:42% 1fr;gap:12px;padding:12px}.profile-hero>img{height:170px}.profile-hero h1{font-size:24px;line-height:2}.profile-hero p{font-size:17px}.profile-tabs{gap:4px}.profile-tabs button{font-size:17px;padding:8px 2px}.profile-tabs .ui-icon{display:block;margin:0 auto 2px;width:20px;height:20px}.profile-body{padding:18px 14px}.stat-grid{grid-template-columns:1fr 1fr}.skill-list{grid-template-columns:1fr}.growth-table{font-size:17px}.growth-table>div{gap:5px;padding:8px 0}.codex-filter{display:grid;grid-template-columns:1fr 1fr}.codex-filter label:first-child{grid-column:1/-1;display:block}.codex-filter input:not([type]){width:100%}.codex-grid{grid-template-columns:1fr 1fr;gap:10px}.codex-card strong{font-size:18px}.codex-card img{height:112px}.draw-roster{grid-template-columns:1fr 1fr}.draw-roster strong{font-size:18px}.draw-lobby{padding:20px 14px}.draw-lobby h2{font-size:24px}.draw-result{padding:18px 12px}.draw-result h1{font-size:29px}.draw-creature{height:260px}.result-actions{gap:8px}.result-actions button{min-width:0;flex:1;font-size:20px}.draw-result>p{font-size:17px}.draw-obtained strong{font-size:23px}.arrival-skip{position:static;font-size:16px!important}.story-skip{display:grid;grid-template-columns:repeat(4,1fr)}.story-skip button{font-size:14px;padding:6px 3px}.story-skip .ui-icon{display:block;margin:auto;width:20px;height:20px}body[data-view=battle] .shell{padding:6px}.combat-top{gap:6px;margin-bottom:6px}.combat-top h1{font-size:17px}.combat-top>span{font-size:13px}.combat-top button{font-size:14px;min-height:36px}.combat-top .ui-icon{width:18px;height:18px;margin-right:2px}.battle-layout{display:block}.stage-composed{min-height:0;height:54svh;max-height:495px;border-radius:16px}.stage-composed .stage-space{inset:46px 0 8px}.stage-composed .field-actor{--unit-size:95px!important}.stage-composed .field-actor:first-child{--unit-size:125px!important}.stage-composed .enemy-row{left:calc(52% - 45px);top:calc(29% - 80px);width:90px;height:80px}.stage-composed .enemy-figure{width:90px;height:80px}.stage-composed .enemy-hud{top:80px;min-width:124px}.stage-composed .enemy-hud strong{font-size:13px}.stage-composed .intent{font-size:12px;gap:4px;padding:5px 7px}.stage-composed .intent strong{font-size:14px}.stage-composed .unit-caption{min-width:100px;padding:3px}.stage-composed .unit-caption strong{font-size:12px}.stage-composed .hptext{font-size:11px}.stage-composed .actor-mark{display:none}.combat-panel{padding:8px;margin-top:7px;border-radius:14px}.ap-strip{padding-bottom:4px}.ap-strip b{font-size:16px}.ap-strip>span{font-size:17px}.selected-name{margin:3px 0 0}.selected-name strong{font-size:18px;line-height:1.8}.selected-name .quiet{font-size:13px;min-height:30px}.action-reason{font-size:12px;min-height:0;margin:0 0 5px;line-height:1.4}.combat-actions{grid-template-columns:repeat(4,1fr);gap:5px}.combat-actions button{min-height:64px;padding:4px 2px;font-size:17px;line-height:1.6}.combat-actions button>strong{font-size:15px;display:block;line-height:1.3}.combat-actions button .ui-icon{display:none}.combat-actions button>span:last-child{font-size:11px;white-space:nowrap}.combat-specials{margin-top:6px;gap:5px}.combat-specials button{min-height:48px;font-size:17px;padding:4px;display:flex;align-items:center;justify-content:center;gap:2px;flex-wrap:wrap}.combat-specials button>span:last-child{font-size:12px}.combat-end{margin-top:5px}.combat-end button{min-height:36px;font-size:13px}.combat-end .ui-icon{width:17px;height:17px}.battle-note{font-size:13px;padding:6px 3px}.arena .motion-label{font-size:15px}.footnote{font-size:12px}}
@media(max-height:500px) and (min-width:700px){body[data-view=battle] .topbar{display:none}.combat-top{margin:0 0 5px}.battle-layout{display:grid;grid-template-columns:1.2fr 1fr;gap:8px}.stage-composed{height:310px;min-height:310px}.stage-composed .stage-space{inset:42px 0 8px}.stage-composed .field-actor{--unit-size:85px!important}.stage-composed .field-actor:first-child{--unit-size:110px!important}.stage-composed .enemy-row{top:calc(29% - 67px);left:calc(52% - 40px);width:80px;height:67px}.stage-composed .enemy-figure{width:80px;height:67px}.stage-composed .enemy-hud{top:67px;min-width:110px}.stage-composed .enemy-hud strong{font-size:12px}.stage-composed .unit-caption{min-width:92px}.stage-composed .unit-caption strong{font-size:12px}.stage-composed .actor-mark{display:none}.combat-panel{padding:7px}.ap-strip{padding:0}.ap-strip b{font-size:15px}.ap-strip>span{font-size:16px}.selected-name{margin-top:2px}.selected-name strong{font-size:18px;line-height:1.8}.selected-name .quiet{min-height:30px}.action-reason{font-size:12px;min-height:0;margin-bottom:5px}.combat-actions{gap:5px}.combat-actions button{min-height:52px;padding:2px 3px;font-size:17px}.combat-actions button>strong{font-size:15px}.combat-actions button>span:last-child{font-size:12px}.combat-specials{margin-top:5px}.combat-specials button{min-height:48px;font-size:16px;padding:2px}.combat-specials button>span:last-child{font-size:12px}.combat-end{margin-top:5px}.combat-end button{min-height:32px}.draw-creature{height:190px}.draw-result{display:grid;grid-template-columns:45% 55%;gap:4px;text-align:left}.draw-result .draw-creature{grid-column:1;grid-row:1/7;width:100%}.draw-result .arrival-halo{left:0;width:50%}.draw-result h1{font-size:24px;line-height:1.8}.draw-result .result-kind{justify-self:start;font-size:15px}.draw-result .draw-role,.draw-result>p{font-size:16px;margin:0}.draw-result .draw-obtained{margin:0;padding:6px}.draw-result .draw-obtained strong{font-size:20px}.draw-result .result-actions{margin:5px 0}.draw-result .result-actions button{font-size:17px;min-width:0}.arrival-skip{position:static}.profile-hero>img{height:170px}}
@media(prefers-reduced-motion:reduce){.arrival .draw-creature,.arrival h1,.arrival .draw-role,.arrival .draw-obtained{animation:none}}
body[data-reduced=true] .arrival *{animation:none!important}
/* Pose sprites are registered to a stable floor anchor; only this body layer travels. */
.unit-body{position:absolute;inset:0;display:block;pointer-events:none;transform-origin:50% 100%}
.stage-composed .unit-body>.unit-sprite{position:absolute;width:100%;height:100%;left:0;top:0;object-fit:contain;transform:none;max-width:none;filter:drop-shadow(2px 3px 2px #334a341a)}
.stage-composed .unit-body>.registered-pose{object-fit:fill}
.stage-composed .resting .unit-body{opacity:.65}
.selected-name .quiet,.combat-top button,.combat-end button{min-height:44px!important}
.stage-composed .unit-performing .unit-caption{opacity:.75}

.stage-composed .motion-label{top:43px;bottom:auto;left:8px;right:8px;padding:5px 9px;font-size:16px;line-height:1.4;border-width:1px;pointer-events:none}
.stage-composed .field-actor,.stage-composed .enemy-figure{isolation:isolate}

.stage-composed .field-actor:before,.stage-composed .enemy-figure:before{display:none}
.unit-shadow{position:absolute;left:16%;bottom:-1px;width:68%;height:12%;border-radius:50%;background:#334f32;opacity:.35;filter:blur(2px);z-index:-1;pointer-events:none}
@media(max-height:500px) and (min-width:700px){
body[data-view=reveal] .topbar{padding:4px 16px;min-height:42px}body[data-view=reveal] .brand{font-size:22px}body[data-view=reveal] .brand-icon{width:30px;height:30px}body[data-view=reveal] .save-status{display:none}body[data-view=reveal] .purse{font-size:16px}body[data-view=reveal] .music-toggle{min-height:36px;padding:3px 12px}
body[data-view=reveal] .shell{padding:8px 18px}body[data-view=reveal] .section-top{margin-bottom:8px}body[data-view=reveal] .section-top h1{font-size:24px}body[data-view=reveal] .section-top .eyebrow{display:none}body[data-view=reveal] .section-top button{font-size:17px;min-height:44px;padding:4px 10px}
.draw-result{grid-template-columns:35% 65%;padding:10px;gap:2px}.draw-result .draw-creature{height:206px;grid-row:1/8}.draw-result h1{font-size:22px;line-height:1.6;margin:0}.draw-result .draw-role,.draw-result>p{font-size:14px;line-height:1.3}.draw-result .draw-obtained{padding:4px 8px}.draw-result .draw-obtained strong{font-size:17px}.draw-result .draw-obtained span{font-size:15px}.draw-result .result-kind{font-size:13px;padding:3px 10px;margin:0}.draw-result .result-actions button{min-height:44px;padding:3px 10px}.draw-result>p.small{display:none}.draw-result .arrival-skip{position:absolute;left:14px;bottom:12px;min-height:40px;font-size:14px}.draw-result .result-actions{margin:3px 0}
}
@media(min-width:761px) and (min-height:501px){.draw-result{display:grid;grid-template-columns:43% 57%;gap:8px;text-align:left;padding:26px}.draw-result .draw-creature{grid-column:1;grid-row:1/8;width:100%;height:360px}.draw-result .result-kind{justify-self:start;margin:0}.draw-result h1{font-size:38px;margin:8px 0}.draw-result .draw-role{margin:0}.draw-result .draw-obtained{margin:6px 0;max-width:440px}.draw-result>p{margin:4px 0}.draw-result .result-actions{justify-content:flex-start;margin:6px 0}.draw-result .arrival-skip{position:static;justify-self:start}.draw-result>p.small{grid-column:2}}
/* Override legacy arena sizing explicitly in the composed RPG battlefield. */
body[data-view=battle] .arena.stage-composed{height:535px;min-height:0;padding:0}
@media(max-width:760px){body[data-view=battle] .arena.stage-composed{height:54svh;max-height:495px}}
@media(max-height:500px) and (min-width:700px){body[data-view=battle] .arena.stage-composed{height:310px;max-height:none}}
.stage-composed .unit-caption .hptext{white-space:nowrap;font-size:12px;line-height:1.35}
/* Status cards live above the whole animated scene, not inside moving actors. */
.stage-actors,.stage-huds{position:absolute;inset:0}
.stage-actors{z-index:0}
.stage-huds{z-index:2;pointer-events:none}
.stage-composed .stage-huds .enemy-hud{top:3%;left:22%;width:124px;min-width:124px;background:#fffdf2!important}
.stage-composed .stage-huds .unit-caption{top:var(--foot-y);left:var(--foot-x);background:#fffdf2}
@media(max-height:500px) and (min-width:700px){
  .stage-composed .stage-huds .enemy-hud{top:3%;left:22%;width:124px}
  .combat-specials button{height:52px;min-height:52px;display:grid;grid-template-rows:25px 17px;align-content:center;padding:2px;gap:0;line-height:1}
  .combat-specials button>.ui-icon{display:none}
  .combat-specials button>span:last-child{line-height:1;font-size:12px}
}
@media(max-width:760px) and (min-height:501px){
  body[data-view=battle] .arena.stage-composed{height:47svh}
  .combat-specials button{height:60px;min-height:60px;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center;gap:1px;line-height:1.25}
  .combat-specials button>.ui-icon{display:none}
  .combat-specials button>span:last-child{font-size:12px;line-height:1.25}
}
@media(max-height:500px) and (min-width:700px){.combat-actions button{min-height:58px;height:58px;padding:3px;line-height:1.1}.combat-actions button>strong{font-size:15px;line-height:1.1}.combat-actions button>span:last-child{font-size:12px;line-height:1.2;margin-top:3px}.combat-specials button{min-height:48px;height:48px;line-height:1.2}.combat-specials button>span:last-child{line-height:1.1}.action-reason{line-height:1.2}.stage-composed .unit-caption{padding:2px}.stage-composed .unit-caption strong{line-height:1.25;font-size:12px}}
@media(max-height:500px) and (min-width:700px){.combat-actions button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}.combat-actions button>.ui-icon{display:none}.combat-actions button>strong{display:block;line-height:1}.combat-actions button>span:last-child{margin-top:0}}

.stage-composed .motion-label{left:44%;font-size:14px}
.stage-composed [data-locomotion=swim] .unit-body{translate:0 -9px;animation:ready-swim 2.8s ease-in-out infinite}
.stage-composed [data-locomotion=swim] .unit-shadow{opacity:.18;scale:.75}
@keyframes ready-swim{50%{translate:0 -14px}}
body[data-reduced=true] [data-locomotion=swim] .unit-body{animation:none}
/* Keep the complete control panel on short landscape screens, including ruby. */
@media(max-height:500px) and (min-width:700px){
 .selected-name .quiet{min-height:36px!important;padding:3px 9px}
 .selected-name{line-height:1.4}
 .combat-panel{padding:6px}
 .combat-end{margin-top:4px}
}
.growth-success{padding:14px;background:#e6f3d9;border:2px solid #609849;border-radius:14px;margin-bottom:24px}
.growth-success h2{font-size:21px}.growth-success p{margin:6px 0;font-size:16px}
/* The action label replaces intent text; it must not cover an animal's head. */
.stage-composed .motion-label{top:8px;left:8px;right:8px;padding:9px;font-size:15px}
.stage-composed.is-performing .intent{visibility:hidden}
/* Square source sprites retain their proportions inside the enemy slot. */
.stage-composed .enemy-figure .unit-body{height:auto;aspect-ratio:1;top:auto;bottom:0}
@media(max-width:760px){
 .combat-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
 .combat-actions button{min-width:0}
 .combat-actions button>span:last-child{font-size:10px;letter-spacing:-.025em}
}
@media(max-height:500px) and (min-width:700px){.stage-composed .enemy-row{margin-top:14px}}
/* Native file controls must shrink inside the responsive save/settings grid. */
body[data-view=settings] .layout>.panel,
body[data-view=settings] .stack,
body[data-view=settings] .stack>*{min-width:0}
body[data-view=settings] .file-label input{width:100%;min-width:0;max-width:100%}
/* First-field polish: restore the approved continuous meadow and keep HUDs separate. */
.stage-composed{background:#a7cb7d url('../../assets/rpg/stages/grassland-oblique-v02.png') center top/cover no-repeat}
.stage-composed:before,.stage-composed:after{display:none}
.stage-composed .unit-shadow{background:#253f24;opacity:.3;height:9%;bottom:-2px;filter:blur(2px)}
.stage-composed .unit-body>.unit-sprite{filter:drop-shadow(1px 2px 1px #334a3422)}
.stage-composed .unit-body>.pose-ghost{pointer-events:none}
.stage-composed [data-locomotion=fly] .unit-body{translate:0 -7px;animation:ready-fly 3.2s ease-in-out infinite}
.stage-composed [data-locomotion=fly] .unit-shadow{opacity:.2;scale:.8}
@keyframes ready-fly{50%{translate:0 -11px}}
body[data-reduced=true] [data-locomotion=fly] .unit-body{animation:none}
.stage-composed .unit-performing .unit-body,.stage-composed .unit-reacting .unit-body{animation-play-state:paused}
.stage-composed .power-wave{display:block;width:30px;height:30px;border-width:3px;z-index:1;box-shadow:0 0 8px #fff5ae88;opacity:0}
.stage-composed .wave-water{border-color:#92e6ff;background:#defaff66}
.stage-composed .wave-help{border-color:#8de6af;background:#daffea66}
.stage-composed .wave-stomp{border-color:#dfc188;background:#f0d8a133}
.stage-composed .contact-burst{display:block;width:38%;height:35%;left:31%;top:32%;z-index:5;opacity:0}
.stage-composed .unit-healed .unit-body{filter:drop-shadow(0 0 7px #8adb9b)}
.stage-composed .unit-guarded .unit-body{filter:drop-shadow(0 0 6px #b4dfec)}
.stage-composed .unit-healed,.stage-composed .unit-guarded{filter:none}
.combat-actions .move-word{white-space:nowrap}
@media(prefers-reduced-motion:reduce){.stage-composed [data-locomotion] .unit-body{animation:none}}
body[data-reduced=true] .stage-composed .power-wave,body[data-reduced=true] .stage-composed .contact-burst{display:none}
@media(prefers-reduced-motion:reduce){.stage-composed .power-wave,.stage-composed .contact-burst{display:none}}
.stage-composed[data-place=water]{background-image:url('../../assets/rpg/stages/waterfront-oblique-v01.png')}
.stage-composed[data-place=rock]{background-image:url('../../assets/rpg/stages/rocky-oblique-v01.png')}
.hero-portrait{position:relative;flex:none;aspect-ratio:2/3;min-width:0}
.hero-portrait canvas{display:block;width:100%;height:auto;max-width:100%;filter:drop-shadow(0 3px 2px #1539321a)}
.hero-portrait [data-hero-error]{position:absolute;inset:20% 0;font-size:14px;background:#fff8e2;padding:10px}
.hero-summary{display:flex;align-items:center;gap:24px;margin-top:18px;background:#fffdf1}
.hero-summary>.hero-portrait{width:108px}.hero-summary h2{margin:4px 0 12px}
.wardrobe{display:grid;grid-template-columns:minmax(210px,.8fr) minmax(300px,1.2fr);gap:30px;align-items:start}
.wardrobe-preview{position:sticky;top:12px;text-align:center;background:radial-gradient(ellipse,#fffce4,#e9efdc);border-radius:22px;padding:12px}
.wardrobe-preview .hero-portrait{width:min(100%,290px);margin:auto}.wardrobe-preview p{font-size:15px;margin:4px}
.wardrobe-options fieldset{border:0;padding:0;margin:0 0 14px}.wardrobe-options legend{font-weight:800;font-size:18px;margin-bottom:6px}
.wardrobe-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}.wardrobe-choices button{min-height:52px;font-size:18px;padding:8px}
.wardrobe-choices button[aria-pressed=true],.map-places button[aria-pressed=true]{background:#e5efd9;border-color:#60884b;box-shadow:inset 0 0 0 2px #60884b}
.wardrobe-options>.primary{width:100%;min-height:48px}.map-places small{display:block;line-height:1.6}
.story-stage .story-traveler{position:absolute;left:5%;bottom:5%;width:24%;max-width:180px;height:auto;z-index:1}
.story-stage .story-traveler canvas{height:auto;object-fit:contain}
@media(max-width:760px){
 .hero-summary{gap:14px;padding:12px}.hero-summary>.hero-portrait{width:82px}.hero-summary h2{font-size:23px}
 .wardrobe{grid-template-columns:minmax(95px,.62fr) minmax(185px,1fr);gap:10px;padding:12px}
 .wardrobe-preview{padding:4px;top:8px}.wardrobe-preview p{font-size:11px}
 .wardrobe-choices{gap:5px}.wardrobe-choices button{font-size:15px;padding:5px 2px;min-height:49px}
 .wardrobe-options legend{font-size:16px}.wardrobe-options fieldset{margin-bottom:10px}.wardrobe-options .small{font-size:12px}
 .story-stage .story-traveler{width:23%;left:2%;bottom:2%}
}
@media(max-height:500px) and (min-width:700px){.wardrobe{grid-template-columns:180px 1fr;gap:20px;padding:12px}.wardrobe-preview .hero-portrait{width:140px}.wardrobe-options{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px}.wardrobe-options fieldset{margin:0}.wardrobe-options .small,.wardrobe-options>.primary{grid-column:1/-1}.wardrobe-choices button{min-height:42px;font-size:15px}.wardrobe-options legend{font-size:15px}.story-stage .story-traveler{height:85%;width:auto}}

.release-panel{margin-bottom:20px}.release-panel .small{overflow-wrap:anywhere}.release-panel .row{flex-wrap:wrap}

/* Keep complete ruby names readable in progression recruitment cards. */
.recruit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:650px){.recruit-grid{grid-template-columns:minmax(0,1fr)}}
