*{box-sizing:border-box}html{max-width:100%;overflow-x:hidden}body{margin:0;max-width:100%;overflow-x:hidden;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;background:#eef1f4;color:#17202a;line-height:1.5}button,select{font:inherit}button{min-height:44px;border:1px solid #aeb7c1;background:#fff;border-radius:9px;padding:10px 14px;cursor:pointer;font-weight:700;touch-action:manipulation}button:hover{filter:brightness(.97)}button:disabled{opacity:.45;cursor:not-allowed}.primary{background:#24384c;color:#fff;border-color:#24384c}.secondary{background:#fff;color:#344554}.danger{color:#8a1b1b}.topbar{min-height:56px;padding:10px max(14px,env(safe-area-inset-right)) 10px max(14px,env(safe-area-inset-left));background:#18222d;color:#fff;display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.brand-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}.proto-badge{font-size:11px;line-height:1.2;padding:4px 7px;border:1px solid #8795a4;border-radius:999px;white-space:nowrap}.save-meta{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.autosave-status{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border:1px solid #6f8090;border-radius:999px;font-size:10px;font-weight:850;white-space:nowrap;background:#223140;color:#dbe8f2}.autosave-status[data-state="saved"]{background:#244b34;border-color:#5f9b70;color:#effff3}.autosave-status[data-state="error"]{background:#652d2d;border-color:#b06a6a;color:#fff0f0}.save-summary{font-size:12px;overflow-wrap:anywhere}.screen{display:none;padding:18px;min-width:0}.screen.active{display:block}.panel{max-width:1050px;margin:0 auto;background:#fff;border:1px solid #d7dde4;border-radius:14px;padding:20px;box-shadow:0 4px 16px rgba(0,0,0,.06);min-width:0}.hero-panel{max-width:620px;text-align:center;margin-top:6vh}.stack-buttons{display:grid;gap:10px;max-width:330px;margin:24px auto}.notice{background:#fff5cf;border:1px solid #ead889;border-radius:8px;padding:8px 10px}.technical-notice{font-size:12px;color:#53606c;line-height:1.45}.message{min-height:24px;margin-top:12px}.job-grid,.grade-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.job-card,.grade-card,.stage-card{border:1px solid #d4dae1;border-radius:12px;padding:14px;background:#fafbfc;text-align:left;min-width:0}.job-card h3,.grade-card h3,.stage-card h3{margin:0 0 6px;overflow-wrap:anywhere}.job-card button,.grade-card button,.stage-card button{width:100%;margin-top:10px}.grade-panel{max-width:800px}.grade-grid{grid-template-columns:repeat(3,1fr);margin:18px 0}.grade-card{text-align:center}.grade-card .grade-progress{font-weight:800;margin-top:4px}.grade-card .small{margin-top:3px}.section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.section-head h2{margin:.15rem 0 .35rem}.eyebrow{font-size:10px;font-weight:800;letter-spacing:.09em;color:#697785}.head-actions{display:flex;gap:8px;flex-wrap:wrap}.grade-progress-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0}.grade-badge{display:inline-flex;align-items:center;min-height:34px;padding:5px 10px;border-radius:999px;background:#24384c;color:#fff;font-weight:850}.grade-summary{font-weight:800;color:#41505e}.player-summary{display:flex;gap:8px;flex-wrap:wrap;padding:12px 0 4px}.status-chip{display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:5px 9px;border:1px solid #d7dde4;border-radius:999px;background:#fff;font-size:13px}.status-chip strong{font-size:11px;color:#60707f}.mode-box{display:flex;gap:10px;flex-wrap:wrap;padding:10px;background:#f4f6f8;border-radius:10px;margin:12px 0}.mode-box label{display:flex;align-items:center;gap:6px;min-height:44px;padding:7px 10px;border-radius:8px;background:#fff;border:1px solid #dde2e7;font-weight:500;cursor:pointer}.mode-box input{width:18px;height:18px}.mode-title{font-weight:850;color:#273849}.mode-box label>span:last-child{color:#596674;font-size:12px}.subject-nav-wrap{margin:14px 0 18px}.subject-nav-label{font-size:12px;font-weight:800;color:#5d6a76;margin-bottom:6px}.subject-filter{display:flex;gap:8px;overflow-x:auto;max-width:100%;padding:2px 2px 8px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}.subject-tab{flex:0 0 auto;min-height:44px;padding:8px 12px;border-radius:999px;white-space:nowrap;background:#fff}.subject-tab[aria-selected="true"]{background:#24384c;color:#fff;border-color:#24384c}.tab-count{font-size:11px;opacity:.8;margin-left:4px}.stage-list{display:grid;gap:18px;min-width:0}.subject-group{border-top:1px solid #e0e5ea;padding-top:12px;min-width:0}.subject-group:first-child{border-top:0}.subject-group>h3{margin:0 0 10px;display:flex;align-items:center;gap:7px;flex-wrap:wrap}.subject-stage-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;min-width:0}.stage-card{position:relative;display:flex;flex-direction:column;min-height:205px}.stage-card.is-cleared{border-width:2px}.stage-title-row{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.stage-title-row h3{font-size:17px;line-height:1.35}.difficulty-badge,.clear-badge{display:inline-flex;align-items:center;justify-content:center;min-height:27px;padding:3px 7px;border-radius:999px;font-size:11px;font-weight:900;white-space:nowrap}.difficulty-badge{background:#e7edf2;color:#33475a}.clear-badge{background:#e3f1e8;color:#24633b;border:1px solid #9bc7aa}.stage-primary-meta{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0;font-size:13px}.stage-progress{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 7px}.stage-progress span{padding:4px 7px;border-radius:7px;background:#f0f3f6;font-size:12px;font-weight:750}.stage-dev{font-size:10px;color:#6e7a85;overflow-wrap:anywhere;margin-top:auto}.stage-card button{margin-top:10px}.empty-filter{padding:18px;border:1px dashed #c5ccd4;border-radius:10px;color:#5d6a76;text-align:center}.battle-screen{padding-bottom:max(18px,env(safe-area-inset-bottom))}.battle-wrap{max-width:1180px;margin:0 auto;min-width:0}.battle-top{min-height:235px;background:linear-gradient(#dce8ef,#edf1d9);border:1px solid #b9c4cc;border-radius:14px;padding:12px;display:grid;grid-template-columns:minmax(0,1fr) minmax(135px,.62fr) minmax(0,1fr);gap:10px;align-items:center;overflow:hidden}.combatant{min-width:0}.combatant-head{display:flex;justify-content:space-between;gap:8px;min-width:0}.combatant-head strong{overflow-wrap:anywhere}.sprite-box,.player-placeholder,.player-sprite-box{height:135px;display:flex;align-items:center;justify-content:center;position:relative}.sprite-box img{display:block;max-width:116px;max-height:116px;width:auto;height:auto;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 8px 5px rgba(0,0,0,.18))}.player-placeholder,.player-sprite-box{margin:8px auto;width:112px;height:112px;border:3px solid #35485b;border-radius:18px;background:#f7fafc;flex-direction:column;font-weight:900;text-align:center}.player-placeholder small,.player-sprite-box small{font-weight:600;margin-top:7px;max-width:100%;overflow-wrap:anywhere}.hp-line{height:14px;background:#cad1d8;border-radius:10px;overflow:hidden;margin-top:6px}.hp-fill{height:100%;width:100%;transition:width .25s}.enemy-hp{background:#a83d3d}.player-hp{background:#35784c}.hp-text,.status-line{font-size:12px;margin-top:3px;min-height:18px;overflow-wrap:anywhere}.battle-center{text-align:center;align-self:stretch;display:flex;flex-direction:column;justify-content:center;gap:4px;min-width:0}.battle-stage-label{font-weight:850;line-height:1.35;overflow-wrap:anywhere}.battle-segment{font-size:12px;font-weight:800}.timer-label{font-size:12px;min-height:18px;overflow-wrap:anywhere}.battle-mode-label{font-size:10px;color:#53616d}.battle-log{font-size:11px;line-height:1.35;min-height:30px;max-height:2.8em;overflow:hidden;overflow-wrap:anywhere}.question-panel{margin-top:12px}.question-meta{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;color:#60707f;font-size:13px}.question-prompt{font-size:20px;line-height:1.65;margin:12px 0;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.action-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0;min-width:0}.action-row label{min-width:0}.action-row select{max-width:100%}.choice-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;min-width:0}.choice{display:flex;align-items:flex-start;gap:10px;text-align:left;min-height:64px;height:auto;min-width:0;overflow-wrap:anywhere;word-break:break-word;white-space:normal}.choice>span:last-child{min-width:0;overflow-wrap:anywhere;word-break:break-word}.choice-key{display:inline-flex;flex:0 0 30px;width:30px;height:30px;align-items:center;justify-content:center;border-radius:7px;background:#e9eef3;font-weight:900}.choice.correct{outline:3px solid #4c9b65}.choice.incorrect{outline:3px solid #be5555}.feedback{margin-top:12px;padding:10px 0;min-height:0;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.feedback.good{color:#176a35}.feedback.bad{color:#8f2828}.question-actions{display:flex;justify-content:space-between;gap:10px;margin-top:10px}.question-actions button{min-height:48px}.question-actions .primary{min-width:120px}.damage-pop{position:absolute;font-weight:900;font-size:24px;opacity:0;pointer-events:none}.damage-pop.show{animation:damagepop .7s ease}.shake{animation:shake .28s}.lunge{animation:lunge .3s}.flash{animation:flash .3s}@keyframes damagepop{0%{opacity:0;transform:translateY(12px)}25%{opacity:1}100%{opacity:0;transform:translateY(-28px)}}@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-7px)}75%{transform:translateX(7px)}}@keyframes lunge{50%{transform:translateX(-14px)}}@keyframes flash{50%{filter:brightness(1.8)}}.result-panel{max-width:650px;margin-top:6vh}.result-meta{display:grid;gap:4px;margin:8px 0 14px;padding:10px;border-radius:9px;background:#f4f6f8}.reward-list{display:grid;gap:6px;background:#f5f7f9;border-radius:10px;padding:12px}.small{font-size:12px;color:#62707d}.hidden{display:none!important}
@media(max-width:720px){.screen{padding:8px}.panel{padding:13px;border-radius:11px}.topbar{font-size:13px;padding-top:max(9px,env(safe-area-inset-top));align-items:flex-start}.brand-row{max-width:100%}.save-summary{width:100%;color:#d8e1e8}.hero-panel{margin-top:3vh}.grade-grid{grid-template-columns:1fr}.section-head{flex-direction:column}.head-actions{width:100%}.head-actions button{flex:1}.player-summary{gap:6px}.status-chip{font-size:12px;padding:4px 8px}.mode-box{display:grid;grid-template-columns:1fr;gap:7px}.mode-box label{align-items:flex-start}.subject-nav-wrap{margin:12px -2px 14px}.subject-filter{padding-bottom:6px}.subject-stage-grid{grid-template-columns:1fr}.stage-card{min-height:0}.battle-top{min-height:205px;grid-template-columns:minmax(0,1fr) minmax(86px,.5fr) minmax(0,1fr);padding:7px;gap:4px}.sprite-box,.player-placeholder,.player-sprite-box{height:98px}.sprite-box img{max-width:82px;max-height:82px}.player-placeholder,.player-sprite-box{width:82px;height:82px;font-size:11px;border-width:2px}.combatant-head{font-size:11px}.hp-text,.status-line{font-size:10px}.battle-center{font-size:10px;gap:3px}.battle-stage-label{font-size:10px}.battle-log{font-size:9px;max-height:2.7em}.question-panel{margin-top:8px}.question-prompt{font-size:16px;line-height:1.62;margin:10px 0}.action-row{align-items:flex-start;flex-direction:column}.choice-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px}.choice{padding:9px 8px;min-height:72px;font-size:13px;gap:7px}.choice-key{flex-basis:27px;width:27px;height:27px}.question-actions{align-items:stretch}.question-actions button{flex:1;padding-left:8px;padding-right:8px}.technical-notice{font-size:11px}.proto-badge{font-size:10px}.result-panel{margin-top:2vh}}
@media(max-width:360px){.screen{padding:6px}.panel{padding:11px}.battle-top{grid-template-columns:minmax(0,1fr) 78px minmax(0,1fr)}.sprite-box img{max-width:74px;max-height:74px}.player-placeholder,.player-sprite-box{width:74px;height:74px}.choice{font-size:12px;padding:8px 6px}.question-prompt{font-size:15px}.question-actions{gap:6px}.question-actions button{font-size:12px}.subject-tab{padding:7px 10px}.status-chip{font-size:11px}}
@media(min-width:1100px){.stage-panel{max-width:1120px}.subject-stage-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.question-prompt{font-size:21px}}


/* Feature UI 01: status / inventory / bestiary */
.feature-menu{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin:10px 0 14px}.feature-menu button{min-height:46px;background:#f8fafb}.feature-panel{max-width:1080px}.feature-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}.feature-head h2{margin:.15rem 0}.feature-head>button{min-height:44px}.feature-notice{margin:8px 0 14px}.status-overview{display:grid;gap:12px;margin:8px 0 18px}.status-identity{display:flex;align-items:baseline;gap:10px;padding:12px;border-radius:10px;background:#f4f6f8}.status-identity strong{font-size:21px}.status-overview-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.status-overview-grid>span,.detail-fields>span{display:flex;flex-direction:column;gap:2px;min-width:0;padding:10px;border:1px solid #dce2e7;border-radius:9px;background:#fff}.status-overview-grid small,.detail-fields small{color:#687681}.status-overview-grid strong,.detail-fields strong{overflow-wrap:anywhere}.stat-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:8px 0 20px}.stat-card{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px;border-radius:9px;background:#24384c;color:#fff}.stat-card strong{font-size:20px}.equipment-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.equipment-card{display:flex;flex-direction:column;gap:5px;padding:13px;border:1px solid #d9e0e6;border-radius:10px;background:#fafbfc;min-width:0}.equipment-card span,.equipment-card small{overflow-wrap:anywhere}.feature-filter{display:flex;gap:8px;overflow-x:auto;max-width:100%;padding:2px 2px 10px;-webkit-overflow-scrolling:touch;scrollbar-width:thin}.feature-tab{flex:0 0 auto;min-height:44px;padding:8px 12px;border-radius:999px;white-space:nowrap;background:#fff}.feature-tab[aria-selected="true"]{background:#24384c;color:#fff;border-color:#24384c}.inventory-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px}.inventory-card{padding:13px;border:1px solid #d9e0e6;border-radius:10px;background:#fafbfc;min-width:0}.item-card-head{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.item-card-head strong,.inventory-card p{overflow-wrap:anywhere}.item-count{flex:0 0 auto;font-weight:900}.item-badges{display:flex;gap:6px;flex-wrap:wrap;margin:7px 0}.item-badges span{padding:3px 7px;border-radius:999px;background:#e9eef3;font-size:11px;font-weight:800}.inventory-card p{margin:7px 0;line-height:1.55}.feature-empty{grid-column:1/-1;padding:22px;border:1px dashed #c4ccd4;border-radius:10px;text-align:center;color:#5f6e7b}.bestiary-progress{font-weight:850;color:#40505f;margin-top:4px}.bestiary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}.bestiary-card{display:flex;flex-direction:column;align-items:stretch;text-align:center;gap:5px;min-height:220px;padding:11px;border:1px solid #d9e0e6;border-radius:11px;background:#fafbfc;overflow:hidden}.bestiary-card.is-known{cursor:pointer}.bestiary-card.is-unknown{justify-content:center;background:#f2f4f6;color:#687681}.bestiary-image{height:110px;display:flex;align-items:center;justify-content:center}.bestiary-image img{max-width:100px;max-height:100px;width:auto;height:auto;object-fit:contain;image-rendering:pixelated}.unknown-mark{display:flex;align-items:center;justify-content:center;width:72px;height:72px;margin:0 auto;border:2px dashed #9ba7b2;border-radius:14px;font-size:38px;font-weight:900}.bestiary-card strong,.bestiary-card span,.bestiary-card small{overflow-wrap:anywhere}.bestiary-detail{margin-top:16px;padding:14px;border:1px solid #cfd7df;border-radius:12px;background:#fff}.detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.detail-head h3{margin:.2rem 0}.bestiary-detail-grid{display:grid;grid-template-columns:180px minmax(0,1fr);gap:14px;margin-top:10px}.bestiary-detail-image{display:flex;align-items:center;justify-content:center;min-height:180px;background:#f5f7f9;border-radius:10px}.bestiary-detail-image img{max-width:150px;max-height:150px;width:auto;height:auto;object-fit:contain;image-rendering:pixelated}.detail-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.bestiary-description{line-height:1.6;overflow-wrap:anywhere}.feature-menu,.feature-panel,.status-overview-grid,.stat-grid,.equipment-grid,.inventory-grid,.bestiary-grid,.bestiary-detail-grid,.detail-fields{min-width:0}
@media(max-width:720px){.feature-menu{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.feature-menu button{font-size:12px;padding:8px 5px}.feature-head{flex-direction:column}.feature-head>button{width:100%}.status-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.equipment-grid{grid-template-columns:1fr}.inventory-grid{grid-template-columns:1fr}.bestiary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.bestiary-card{min-height:190px;padding:8px}.bestiary-image{height:86px}.bestiary-image img{max-width:78px;max-height:78px}.bestiary-detail-grid{grid-template-columns:1fr}.bestiary-detail-image{min-height:130px}.detail-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:360px){.feature-menu{grid-template-columns:1fr}.status-overview-grid{grid-template-columns:1fr 1fr}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bestiary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bestiary-card{font-size:12px;min-height:180px}.detail-fields{grid-template-columns:1fr}}


/* Feature Craft 01: craft / equipment acquisition / equip / upgrade */
.feature-inline-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.feature-inline-actions button{min-height:44px}
.feature-summary{font-weight:800;color:#40505f;margin-top:4px}.feature-message{min-height:1.6em;margin:8px 0 10px;font-weight:800;overflow-wrap:anywhere}.feature-message.good{color:#176a35}.feature-message.bad{color:#8f2828}
.craft-grid,.owned-equipment-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px;min-width:0}.craft-card,.owned-equipment-card{display:flex;flex-direction:column;gap:8px;min-width:0;padding:13px;border:1px solid #d9e0e6;border-radius:10px;background:#fafbfc}.craft-card h3,.owned-equipment-card h3{margin:0;overflow-wrap:anywhere}.craft-result-row,.equipment-title-row{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.craft-meta,.equipment-meta{display:flex;gap:6px;flex-wrap:wrap}.craft-meta span,.equipment-meta span,.availability-badge{padding:3px 7px;border-radius:999px;background:#e9eef3;font-size:11px;font-weight:800}.availability-badge.ready{background:#e4f2e8;color:#176a35}.availability-badge.blocked{background:#f6e5e5;color:#8f2828}.cost-list{display:grid;gap:5px;padding:9px;border-radius:8px;background:#fff}.cost-row{display:flex;justify-content:space-between;gap:8px;min-width:0}.cost-row span:first-child{overflow-wrap:anywhere}.cost-ok{color:#176a35}.cost-lack{color:#8f2828;font-weight:800}.craft-card button,.owned-equipment-card button{min-height:44px}.craft-card button:disabled,.owned-equipment-card button:disabled{opacity:.55;cursor:not-allowed}
.equipment-current-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:18px}.current-equip-card{display:flex;flex-direction:column;gap:6px;padding:12px;border:1px solid #d9e0e6;border-radius:10px;background:#fff;min-width:0}.current-equip-card strong,.current-equip-card span,.current-equip-card small{overflow-wrap:anywhere}.equipment-stats{display:flex;gap:6px;flex-wrap:wrap}.equipment-stats span{padding:3px 7px;border-radius:7px;background:#eef2f5;font-size:12px;font-weight:800}.upgrade-box{display:grid;gap:6px;padding:9px;border-radius:8px;background:#f4f6f8}.upgrade-next{font-weight:900}.upgrade-actions{display:flex;gap:7px;flex-wrap:wrap}.upgrade-actions button{flex:1 1 110px}.equipped-badge{padding:3px 7px;border-radius:999px;background:#24384c;color:#fff;font-size:11px;font-weight:900}.instance-id{font-size:10px;color:#73808b;overflow-wrap:anywhere}
@media(max-width:720px){.craft-grid,.owned-equipment-grid{grid-template-columns:1fr}.equipment-current-grid{grid-template-columns:1fr}.feature-inline-actions{display:grid;grid-template-columns:1fr 1fr}.craft-result-row,.equipment-title-row{align-items:flex-start}.cost-row{font-size:13px}}
@media(max-width:360px){.feature-menu{grid-template-columns:1fr 1fr}.feature-inline-actions{grid-template-columns:1fr}.craft-card,.owned-equipment-card{padding:10px}.craft-meta,.equipment-meta{gap:4px}}


/* Feature Job 01: job progression */
.jobchange-current,.jobchange-target{min-width:0}.jobchange-panel{max-width:980px}.jobchange-card{display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid #d9e0e6;border-radius:12px;background:#fff;min-width:0}.jobchange-card.target{background:#fafbfc}.jobchange-title{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.jobchange-title h3{margin:4px 0 0;font-size:21px}.jobchange-title small,.jobchange-card p,.jobchange-meta span{overflow-wrap:anywhere}.tier-badge{display:inline-flex;padding:3px 8px;border-radius:999px;background:#e9eef3;font-size:11px;font-weight:900}.jobchange-meta{display:flex;gap:7px;flex-wrap:wrap}.jobchange-meta span{padding:3px 7px;border-radius:7px;background:#f0f3f6;font-size:12px}.jobchange-arrow{text-align:center;font-weight:900;color:#53616d;padding:12px}.job-stat-preview,.job-stat-diff{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.job-stat-preview span,.job-stat-diff span{display:flex;flex-direction:column;gap:2px;padding:8px;border-radius:9px;background:#f3f6f8;min-width:0}.job-stat-preview small,.job-stat-diff small{font-size:11px;color:#687681}.job-stat-preview strong,.job-stat-diff strong{font-size:14px;overflow-wrap:anywhere}.job-stat-diff em{font-style:normal;font-weight:900;color:#40505f}.job-action-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:0;padding:0;list-style:none}.job-action-preview li{display:flex;justify-content:space-between;gap:8px;padding:8px 9px;border-radius:8px;background:#f0f3f6;min-width:0}.job-action-preview li strong{overflow-wrap:anywhere}.job-action-preview li.is-new{outline:2px solid #8fb99b;background:#eef7f0}.jobchange-condition{padding:8px 10px;border-radius:8px;font-weight:900}.jobchange-condition.ready{background:#e4f2e8;color:#176a35}.jobchange-condition.blocked{background:#f6e5e5;color:#8f2828}.jobchange-card button{min-height:44px}.jobchange-terminal{display:flex;flex-direction:column;gap:6px;padding:24px;border:1px dashed #aeb8c2;border-radius:12px;text-align:center;background:#f6f8fa}.jobchange-terminal.bad{color:#8f2828;background:#fbf3f3}
@media(max-width:720px){.job-stat-preview,.job-stat-diff{grid-template-columns:repeat(3,minmax(0,1fr))}.job-action-preview{grid-template-columns:1fr}.jobchange-title{flex-direction:column;gap:6px}}
@media(max-width:360px){.job-stat-preview,.job-stat-diff{grid-template-columns:repeat(2,minmax(0,1fr))}.jobchange-card{padding:10px}}


/* Recovery runtime integration */
.recovery-panel{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0;padding:12px 14px;border:1px solid #cbd5e1;border-radius:12px;background:#f8fafc;min-width:0}
.recovery-panel>div{min-width:0}.recovery-state{margin-left:8px;font-weight:800}.recovery-state.defeated{color:#991b1b}.recovery-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.free-badge{display:inline-flex;align-items:center;min-height:28px;padding:0 9px;border-radius:999px;border:1px solid #94a3b8;background:#fff;font-weight:800;font-size:12px}.recovery-message{flex-basis:100%;margin:0;min-height:1.4em}.result-recovery-panel{margin-top:16px}.stage-card button[disabled]{opacity:.48;cursor:not-allowed}.stage-card.hp-blocked{border-style:dashed}.stage-card .hp-block-note{font-size:12px;font-weight:800;color:#991b1b;margin:6px 0}
@media(max-width:720px){.recovery-panel{align-items:stretch}.recovery-actions{width:100%}.recovery-actions button{flex:1 1 auto;min-height:44px}}
@media(max-width:360px){.recovery-panel{padding:10px}.recovery-actions{flex-direction:column;align-items:stretch}.free-badge{justify-content:center}}

.variant-panel{max-width:760px}.variant-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0}.variant-card{border:1px solid #d4dae1;border-radius:12px;padding:16px;background:#fafbfc;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}.variant-preview{width:96px;height:96px;object-fit:contain;image-rendering:pixelated}.variant-card strong{font-size:18px}.variant-card button{width:100%}.player-sprite-box{display:flex;align-items:center;justify-content:center;position:relative;flex-direction:column;background:transparent;border:0}.player-sprite-box img{display:block;width:96px;height:96px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 8px 5px rgba(0,0,0,.18))}.player-sprite-box small{margin-top:-6px;padding:1px 5px;border-radius:999px;background:rgba(247,250,252,.88)}
@media(max-width:720px){.variant-grid{gap:8px}.variant-card{padding:11px}.variant-preview{width:78px;height:78px}.player-sprite-box img{width:76px;height:76px}}
@media(max-width:360px){.variant-card{padding:8px}.variant-preview{width:68px;height:68px}.player-sprite-box img{width:68px;height:68px}}
\n\n/* Google account / cloud save */\n.cloud-account{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.cloud-save-status{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border:1px solid #6f8090;border-radius:999px;font-size:10px;font-weight:850;white-space:nowrap;background:#223140;color:#dbe8f2}.cloud-save-status[data-state="online"],.cloud-save-status[data-state="synced"]{background:#244b34;border-color:#5f9b70;color:#effff3}.cloud-save-status[data-state="syncing"]{background:#4a4020;border-color:#a89855;color:#fff8d2}.cloud-save-status[data-state="error"]{background:#652d2d;border-color:#b06a6a;color:#fff0f0}.cloud-button{min-height:30px;padding:4px 9px;border-radius:8px;font-size:11px;background:#fff;color:#1f2d3a}.cloud-conflict{margin:16px auto 0;max-width:540px;text-align:left;padding:14px;border:1px solid #d9b85a;border-radius:10px;background:#fff7d7}.cloud-conflict p{margin:.45rem 0 .8rem;white-space:pre-line}.cloud-conflict-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.cloud-conflict-actions button{min-height:44px}@media(max-width:720px){.save-meta{width:100%;justify-content:flex-start}.cloud-account{width:100%;justify-content:flex-start}.cloud-button{flex:1 1 auto}.cloud-conflict-actions{grid-template-columns:1fr}}\n
/* Multi-provider account login / linking */
.cloud-provider-status{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border:1px solid #6f8090;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap;background:#223140;color:#dbe8f2}.facebook-button{border-color:#8198be}.facebook-button:not(.hidden){background:#fff;color:#214f96}
