/* The menus share the illustrated game's palette and stay inside its viewport. */
.game-icon{width:22px;height:22px;display:inline-block;vertical-align:middle;flex-shrink:0}
.hero-portrait{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;user-select:none;pointer-events:none}
.game-overlay{background:#f7f0df;border:2px solid #cfb578;box-shadow:0 0 0 3px #213559,0 18px 60px #15264780;backdrop-filter:none}
.overlay-head{background:linear-gradient(100deg,#203a67,#375786);border-bottom:3px solid #d3b270;letter-spacing:.04em;padding:8px 20px}
.overlay-head b:before{content:'✦';color:#edcf84;margin-right:10px}
.overlay-body{padding:0;background:radial-gradient(ellipse at 0 0,#fffdf7,transparent 70%),#f5eedf;scrollbar-color:#c4ae85 #efe6d4;scrollbar-width:thin}
.menu-page{padding:22px 28px 28px;max-width:1200px;margin:0 auto;color:#243c5d}
.menu-intro{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}
.menu-intro small,.codex-banner small,.recruitment-copy>small,.map-banner>small{font-size:10px;letter-spacing:.2em;color:#9b7c42;font-weight:800}
.menu-intro h2,.codex-banner h2{font-size:27px;letter-spacing:-1px;line-height:1.25;margin:6px 0}
.menu-intro p,.codex-banner p{font-size:12px;line-height:1.6;margin:0;color:#6c7b88}
.collection-count{display:flex;gap:7px;align-items:baseline;white-space:nowrap}
.collection-count strong{font-size:38px;color:#3d5d83}
.collection-count span{font-size:12px;color:#758493}
.formation-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:16px;background:linear-gradient(120deg,#293f65,#426086);border:1px solid #d1b576;border-radius:16px;box-shadow:inset 0 0 0 5px #ffffff0b,0 5px 12px #233b5712}
.formation-slot{position:relative;display:flex;align-items:center;min-width:0;gap:6px;min-height:106px;color:#fff7de;border:1px solid #a8bed540;background:radial-gradient(ellipse at bottom,#819cb473,#22345455);border-radius:11px;padding:0 12px}
.formation-slot>.hero-portrait{height:110px;width:110px;filter:drop-shadow(0 8px 6px #142d5280);transition:transform .2s}
.formation-slot:hover>.hero-portrait{transform:translateY(-5px)}
.formation-slot>span:last-child{text-align:left;white-space:nowrap}
.formation-slot b{font-size:16px;display:block}
.formation-slot small{display:block;font-size:10px;color:#c9d8e8;margin-top:5px}
.slot-number{position:absolute;left:8px;top:7px;font-size:10px;font-weight:800;color:#c5d6e688}
.collection-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:17px 0}
.role-tabs{display:flex;gap:5px;flex-wrap:wrap;margin:16px 0}
.role-tabs button{display:flex;align-items:center;gap:5px;padding:8px 12px;min-height:40px;background:#eee5d4;border:1px solid #d8c7a9;border-radius:8px;color:#7d786e;font-size:11px;font-weight:800}
.role-tabs .game-icon{width:16px;height:16px}
.role-tabs button[aria-pressed=true]{background:#314e7b;color:#fff3cf;border-color:#314e7b;box-shadow:0 3px 0 #1d3559}
.collection-toolbar .role-tabs{margin:0}
.text-button{background:transparent;color:#41658f;padding:5px 8px;min-height:40px;font-size:11px;font-weight:800;text-decoration:none;display:inline-flex;gap:5px;align-items:center;justify-content:center}
.text-button:disabled{opacity:.45}
.text-button .game-icon{width:18px;height:18px}
.hero-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:13px}
.hero-card{min-width:0;position:relative;overflow:hidden;display:flex;align-items:center;flex-direction:column;padding:0;background:linear-gradient(145deg,#fdf8e9,#e3d4b8);border:2px solid #c6b496;border-radius:14px;box-shadow:0 4px 0 #cbbb9e,0 7px 14px #6a5a4312;color:#253d5d;transition:transform .16s,box-shadow .16s}
.hero-card:hover{transform:translateY(-4px);box-shadow:0 6px 0 #bba786,0 10px 18px #6a5a4325}
.hero-card:focus-visible{outline:3px solid #4b7dd1;outline-offset:3px}
.hero-card:before{content:'';position:absolute;inset:0 0 30%;background:radial-gradient(ellipse at 50% 65%,#fff9db 10%,color-mix(in srgb,var(--hero-color) 35%,#eaf0f1) 65%);opacity:.8}
.hero-card-top{position:absolute;inset:8px 9px auto;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:3px;color:#344d6b}
.hero-card-top>.game-icon{width:23px;height:23px;background:#fff7dfd9;padding:3px;border-radius:6px;box-shadow:0 2px 4px #36382122}
.hero-card-top small{font-size:10px;font-weight:800;background:#273e60e6;color:white;padding:3px 6px;border-radius:5px}
.hero-card>.hero-portrait{position:relative;z-index:1;margin:17px 0 -3px;width:96%;filter:drop-shadow(0 8px 4px #46453925)}
.hero-card-name{position:relative;z-index:2;font-size:15px;font-weight:900;padding:6px 3px 3px;width:100%;background:linear-gradient(transparent,#fff7e0)}
.hero-card-foot{width:100%;position:relative;z-index:2;background:#fff7e0;padding:4px 2px 9px;font-size:10px;color:#7a806d}
.hero-card.deployed{border-color:#557ba2;box-shadow:0 4px 0 #436181}
.hero-card.deployed .hero-card-foot{color:#436d98;font-weight:800}
.hero-card.unowned{border-color:#c2c6c7;box-shadow:0 4px 0 #adb6bc}
.hero-card.unowned:before{background:radial-gradient(#d9e0e2,#aebbc4)}
.hero-card.unowned>.hero-portrait{filter:brightness(0) saturate(0);opacity:.22}
.hero-card.unowned .hero-card-name,.hero-card.unowned .hero-card-foot{background:#dce1e2;color:#677784}
.hero-card.unowned .hero-card-top small{background:#657b8c80}
.hero-card-foot .game-icon{width:10px;height:10px;margin-right:4px}
.menu-footnote{font-size:11px;line-height:1.65;color:#87909a;text-align:center;margin:18px 0 0}
.codex-banner{display:flex;align-items:center;gap:18px;padding:24px;background:linear-gradient(110deg,#f0e4c5,#fffaf0 60%,#e7d9b9);border:1px solid #ccb984;border-radius:14px 14px 0 0;position:relative}
.codex-emblem{border:2px solid #ccb377;border-radius:50%;width:72px;height:72px;display:grid;place-items:center;background:#fff7db;box-shadow:inset 0 0 0 5px #eadcaa,0 4px 8px #6a55391a;color:#9f7d39;flex-shrink:0}
.codex-emblem .game-icon{width:37px;height:37px}
.codex-percent{margin-left:auto;display:flex;flex-direction:column;text-align:right;white-space:nowrap}
.codex-percent strong{font-size:40px;color:#577869;line-height:1.2}.codex-percent strong small{font-size:16px;margin-left:2px}.codex-percent>span{font-size:11px;color:#85836d;margin-top:4px}
.collection-track{height:7px;background:#d9d6c2;border-radius:0 0 8px 8px;overflow:hidden}
.collection-track i{height:100%;display:block;background:linear-gradient(90deg,#71996b,#a5c082)}
.milestone-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin:20px 0}
.milestone{position:relative;display:flex;align-items:center;flex-direction:column;background:#fffaf0;border:1px solid #ddcfb2;border-radius:12px;padding:15px 8px 10px;gap:7px;text-align:center;box-shadow:0 3px 0 #e3d5b8}
.milestone.unlocked{background:#fffae7;border-color:#d5b465}
.milestone-badge{height:53px;width:53px;display:grid;place-items:center;border-radius:50%;background:#f5e7bb;color:#a07c33;border:3px solid #c8b17f;box-shadow:0 3px 5px #b0a08450}
.milestone-badge .game-icon{width:27px;height:27px}.milestone>b{font-size:16px}.milestone>small{font-size:10px;color:#8f826e}
.reward-items{display:flex;gap:7px;justify-content:center;flex-wrap:wrap}
.reward-item{display:inline-flex;align-items:center;gap:3px;border-radius:6px;padding:4px 6px;background:#f4e6bd;color:#a77826;font-size:12px;white-space:nowrap}
.reward-item .game-icon{width:16px;height:16px}.reward-item small{font-size:9px}.reward-item.starlight{color:#9065a3;background:#eee2f1}.reward-item.cosmetic{background:#e1edf1;color:#6688a3}
.claim-button{background:linear-gradient(#4e79aa,#3b5c8c);box-shadow:0 3px 0 #273f65;border:1px solid #476891;border-radius:8px;color:#fff8e8;min-height:38px;padding:6px 14px;font-size:11px;font-weight:800;white-space:nowrap}
.claim-button.ready{background:linear-gradient(#f4d48b,#dfaf59);box-shadow:0 3px 0 #b78a45;border-color:#cfa65f;color:#664d28}
.claim-button:disabled{background:#e6e4dc;color:#a1a598;box-shadow:none;border-color:#d9dcd3;opacity:1}.claim-button .game-icon{width:13px;height:13px;margin-right:3px}
.wardrobe{border:1px solid #d5c5a8;background:#fff9ee;border-radius:10px;padding:0 14px;margin:12px 0}
.wardrobe summary{cursor:pointer;min-height:46px;display:flex;align-items:center;gap:8px;font-size:12px;font-weight:800}.wardrobe summary>span{margin-left:auto;color:#9a8a6e;font-size:11px}
.wardrobe p{font-size:12px;color:#7a8290;line-height:1.6}.wardrobe-options{display:flex;gap:8px;flex-wrap:wrap;padding:5px 0 16px}.wardrobe-options button{display:flex;align-items:center;gap:5px;font-size:10px;border:2px solid #bbc7cd;border-radius:8px;background:#f2f5f6;padding:7px 10px;min-height:42px}.wardrobe-options button[aria-pressed=true]{outline:2px solid #456a96;outline-offset:2px}.wardrobe-options button:disabled{filter:grayscale(1);opacity:.4}
.frame-sprout{border-color:#83aa7f!important;box-shadow:0 0 0 2px #d7e7b9,inset 0 0 12px #a0ce7750!important}
.frame-tide{border-color:#76b7cd!important;box-shadow:0 0 0 2px #c7eaf1,inset 0 0 12px #70c8ed50!important}
.frame-blossom{border-color:#c895b6!important;box-shadow:0 0 0 2px #f3d4e9,inset 0 0 12px #dd98c250!important}
.frame-crown{border-color:#d4b25c!important;box-shadow:0 0 0 2px #f6e2a3,inset 0 0 15px #edc97160!important}
.intro-seal{display:grid;place-items:center;width:60px;height:60px;border-radius:50%;border:3px double #c4ae7d;color:#b39149;background:#f6e8bc}.intro-seal>.game-icon{width:32px;height:32px}
.goal-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:3px;border-bottom:3px solid #c5b082;padding:0 4px;margin-bottom:20px}
.goal-tabs button{position:relative;background:#e7ddc8;color:#8a806e;border-radius:9px 9px 0 0;min-height:43px;font-size:12px;font-weight:800;border:1px solid #d3c4a4;border-bottom:0}
.goal-tabs button[aria-selected=true]{background:#38557c;color:#fff5d8;border-color:#38557c}.notification-dot{width:6px;height:6px;background:#e17657;border-radius:50%;display:inline-block;margin-left:5px;vertical-align:top}
.quest-prize{display:flex;align-items:center;gap:20px;padding:20px 24px;border:1px solid #d4bb79;border-radius:13px;background:radial-gradient(ellipse at 0 0,#fff0b9,transparent),#fffaf0;box-shadow:inset 0 0 0 4px #eee0b640}
.prize-chest{display:grid;place-items:center;width:75px;height:75px;flex-shrink:0;border-radius:18px;background:linear-gradient(145deg,#567aaa,#25416b);border:3px solid #d5b05d;color:#f7db8b;box-shadow:0 5px 0 #b99b5e;transform:rotate(-5deg)}
.prize-chest>.game-icon{width:45px;height:45px}.quest-prize>div{flex:1;min-width:0}.quest-prize b{font-size:16px}.quest-prize p{font-size:11px;margin:5px 0;color:#93866a}.quest-prize .reward-items{justify-content:flex-start;margin-top:9px}
.quest-progress{height:6px;background:#e0e3dd;border-radius:5px;overflow:hidden;margin:8px 0 5px}.quest-progress i{display:block;height:100%;background:linear-gradient(90deg,#78a286,#a9c595);border-radius:5px}.quest-prize .quest-progress{max-width:350px}
.goal-toolbar{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:10px 0}.goal-toolbar>span{font-size:10px;color:#89908c}
.quest-list{display:flex;flex-direction:column;gap:9px}.quest-card{display:grid;grid-template-columns:46px minmax(0,1fr) auto auto;align-items:center;gap:14px;background:#fffaf0;border:1px solid #e0d4bc;border-radius:12px;padding:14px;box-shadow:0 3px 0 #e2d6be80}
.quest-emblem{width:46px;height:46px;background:#e5e8e3;border:2px solid #c5cec5;border-radius:13px;display:grid;place-items:center;color:#98a397;box-shadow:inset 0 0 0 3px #ffffff55}.quest-emblem.earned{background:linear-gradient(#faeabb,#dfc78e);color:#a37e34;border-color:#c8a863}.quest-emblem>.game-icon{width:25px;height:25px}
.quest-info{min-width:0}.quest-info>b{font-size:13px}.quest-info>p{font-size:11px;line-height:1.55;color:#899286;margin:5px 0}.quest-info>small{font-size:10px;color:#7a9579;display:block;text-align:right}.quest-card.claimed{opacity:.62}.quest-card.ready{border-color:#d1b578;background:#fffbee}
.quest-card .reward-item small{display:none}.achievement-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.achievement-grid .quest-card{display:flex;flex-direction:column;align-items:center;gap:9px;text-align:center;padding:18px 14px}.achievement-grid .quest-emblem{width:58px;height:58px;border-radius:50%;border-width:3px;box-shadow:inset 0 0 0 4px #ffffff55,0 3px 0 #bfc8bd50}.achievement-grid .quest-info{width:100%}.achievement-grid .quest-info>p{min-height:34px}.achievement-grid .quest-info>small{text-align:center}.achievement-grid .claim-button{width:100%}.achievement-grid .reward-items{margin-top:auto}
.trophy-overview{display:flex;align-items:center;gap:20px;background:linear-gradient(110deg,#284267,#496d95);border:2px solid #c6ac75;border-radius:14px;padding:18px 25px;color:#f6e1a7}.trophy-overview>span{color:#edd58e}.trophy-overview>span .game-icon{width:60px;height:60px}.trophy-overview strong{font-size:34px}.trophy-overview strong small{font-size:18px;color:#bccadb}.trophy-overview p{font-size:12px;color:#cbd6e6;margin:4px 0}
.attendance-card{display:flex;align-items:center;gap:15px;background:#eaf0e7;border:1px solid #c3d2bd;border-radius:12px;padding:15px;margin-top:18px}.attendance-card>span{color:#769475}.attendance-card>span .game-icon{width:36px;height:36px}.attendance-card>div{flex:1}.attendance-card b{font-size:13px}.attendance-card p{font-size:11px;color:#80977f;margin:5px 0}
.recruitment-menu{padding:0;max-width:none}.recruitment-art{position:relative;min-height:330px;height:40vh;max-height:480px;background:url('/dice/assets/recruit-pavilion.webp') center 48% / cover;overflow:hidden}
.recruitment-art:before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#f6ecdfee,transparent 65%)}
.recruitment-copy{position:absolute;top:15%;left:6%;z-index:2}.recruitment-copy h2{font-size:42px;line-height:1.25;letter-spacing:-1.5px;color:#284e78;margin:12px 0;text-shadow:0 2px 4px #fff8e9}.recruitment-copy>p{font-size:13px;line-height:1.8;color:#6c7e86}.recruit-collection{display:inline-flex;gap:6px;align-items:center;background:#fff8e9df;border:1px solid #d5bd86;border-radius:7px;padding:6px 10px;color:#8f784a;font-size:11px;font-weight:800}
.recruitment-character{position:absolute;width:30%;max-width:300px;right:22%;bottom:3%;filter:drop-shadow(0 10px 10px #51513566)}
.recruitment-caption{position:absolute;bottom:0;left:0;right:0;text-align:center;padding:9px;background:linear-gradient(90deg,transparent,#173b67cc,transparent);color:#fff6da;font-size:11px;font-weight:700;letter-spacing:.06em}
.recruitment-controls{max-width:950px;margin:auto;padding:20px 24px}.guarantee{display:flex;align-items:center;gap:12px}.guarantee>span{display:grid;place-items:center;color:#c79938;background:#f3e7c3;border:1px solid #d5bf87;border-radius:50%;width:44px;height:44px}.guarantee>div{flex:1}.guarantee b{font-size:14px}.guarantee small{display:block;font-size:10px;color:#8e958e;margin-top:5px}.guarantee>.text-button{font-size:10px}
.recruitment-buttons{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:20px}.summon-button{border-radius:12px;border:2px solid #46658f;background:linear-gradient(#5c83b1,#355581);color:#fff8de;box-shadow:0 5px 0 #263f64;display:flex;align-items:center;justify-content:center;gap:18px;padding:15px;min-height:78px}.summon-button>.game-icon{width:35px;height:35px}.summon-button span{display:flex;flex-direction:column;gap:5px}.summon-button b{font-size:18px}.summon-button small{font-size:11px}.summon-button small .game-icon{width:13px;height:13px;margin-right:5px}.summon-button.ten{background:linear-gradient(#f7d995,#dfb564);color:#71552c;border-color:#d6b16c;box-shadow:0 5px 0 #b38a45}.summon-button:disabled{filter:saturate(.45);opacity:.65}
.recruit-links{display:grid;grid-template-columns:1fr 1fr 1fr;margin-top:18px;border:1px solid #dcd1b9;border-radius:9px;overflow:hidden}.recruit-links button{padding:8px;background:#f8f2e4;color:#7d8da0;font-size:11px;min-height:45px;border-right:1px solid #ddd3bd;display:flex;gap:6px;align-items:center;justify-content:center}.recruit-links button:last-child{border:0}.recruit-links .game-icon{width:17px;height:17px}
.welcome-gift{display:flex;gap:20px;justify-content:space-between;align-items:center;background:linear-gradient(110deg,#e1ecde,#f8f3db);border:1px solid #bbcfaf;border-radius:14px;padding:15px 20px;margin:22px 0}.welcome-gift small{font-size:8px;letter-spacing:.15em;color:#729675}.welcome-gift h3{font-size:17px;margin:8px 0}.welcome-gift p{font-size:11px;color:#81917d}.gift-heroes{display:flex;gap:8px}.gift-heroes button{width:90px;min-width:0;display:flex;flex-direction:column;align-items:center;background:#fffaf080;border:1px solid #ccdbc0;border-radius:9px;padding:4px 6px;font-size:11px}
.recruit-history{margin-top:24px}.recruit-history>b{font-size:12px}.recruit-history>div{display:flex;gap:9px;flex-wrap:wrap;margin-top:9px}.recruit-history button{width:70px;min-width:0;background:#efe4cd;border:1px solid #d4c39e;border-radius:9px;position:relative;padding:3px}.recruit-history small{display:block;font-size:8px;color:#9c8253}.recruit-history p{color:#a49d8e;font-size:12px}
dialog:has(.hero-detail),dialog:has(.summon-results){padding:0;border:2px solid #d9c187;border-radius:18px;width:min(850px,calc(100vw - 40px));max-width:850px;background:#fcf5e5}
dialog:has(.hero-detail) .close-dialog,dialog:has(.summon-results) .close-dialog{background:#fffaf0b3;border:1px solid #d6c9aa;border-radius:50%;top:10px;right:10px;z-index:5;color:#3d5574}
.hero-detail{display:grid;grid-template-columns:42% 58%;min-height:420px}
.detail-portrait{display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 60%,#fffcf4 10%,color-mix(in srgb,var(--hero-color) 40%,#ede9e0));padding:20px;position:relative;overflow:hidden}
.detail-portrait:before{content:'✦';position:absolute;font-size:280px;color:#ffffff55}.detail-portrait>.hero-portrait{position:relative;filter:drop-shadow(0 12px 7px #33392c25)}.detail-portrait>span{display:flex;align-items:center;gap:6px;padding:5px 15px;border-radius:20px;color:#4f6380;background:#fff8e4d9;font-size:12px;border:1px solid #fff8e9}
.detail-content{padding:35px 26px 24px}.detail-content>small{color:#9c8c70;font-size:11px}.detail-content h2{font-size:32px;margin:6px 0 10px}.detail-content h2 span{font-size:13px;color:#9b8c72;font-weight:500;margin-left:12px}.hero-story{font-size:12px;line-height:1.9;color:#7a8490}.hero-stats{display:flex;gap:15px;margin:16px 0;color:#7e8994;font-size:11px}.hero-stats .game-icon{width:15px;height:15px;margin-right:3px}.hero-stats b{color:#405d7b;margin-left:5px}.detail-skills{display:flex;flex-direction:column;gap:8px}.detail-skills article{display:flex;align-items:center;gap:10px;background:#eee8d9;border-radius:9px;padding:10px}.detail-skills article>span{display:grid;place-items:center;background:#fff9e7;border:1px solid #d9c895;color:#947e45;border-radius:8px;width:37px;height:37px}.detail-skills b{font-size:12px;display:block}.detail-skills small{display:block;font-size:10px;color:#939485;margin-top:5px}.detail-skills i{font-size:18px;font-weight:900;font-style:normal;color:#c5bca4;margin-left:auto}.passive-trait{font-size:11px;line-height:1.7;color:#8e8d80;background:#f3efdf;border-left:3px solid #a8b894;padding:10px}.passive-trait b{display:block;color:#719079}.detail-actions{display:flex;gap:8px}.detail-actions .primary{font-size:11px;min-width:0;flex:1;padding:10px}.detail-hint{display:block;font-size:10px!important;margin-top:12px;line-height:1.6}.acquisition{background:#e8eddf;border-radius:9px;padding:12px}.acquisition b{font-size:12px}.acquisition p{font-size:11px;line-height:1.7;color:#84927b}.acquisition .primary{font-size:11px;padding:10px}
.summon-results{padding:35px;text-align:center;min-height:420px;background:radial-gradient(ellipse at top,#fffae5,#e9dfca)}
.summon-envelope{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;min-height:365px}.summon-envelope>.game-icon{width:125px;height:125px;color:#c4a059;filter:drop-shadow(0 7px 0 #dac9a4);animation:invitation-float 2.5s ease-in-out infinite}.summon-envelope h2{font-size:23px;color:#58657b}.summon-open{display:none}.revealed .summon-envelope{display:none}.revealed .summon-open{display:block}.summon-open>small{font-size:9px;letter-spacing:.2em;color:#a4884f}.summon-open>h2{font-size:26px;margin:10px 0 23px}.summon-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:13px}.summon-grid.single{max-width:240px;margin:auto;grid-template-columns:1fr}.summon-grid article{position:relative;background:linear-gradient(#fff9e9,#e2d3b3);border:2px solid #bdab7e;border-radius:12px;padding:12px 5px;display:flex;flex-direction:column;align-items:center;animation:card-reveal .4s both;animation-delay:var(--delay);min-width:0}.summon-grid article>b{font-size:13px}.summon-grid article>small{font-size:9px;color:#8f8c79;margin-top:5px}.result-ribbon{font-size:8px;color:#ffefbb;background:#546f87;border-radius:4px;padding:3px 7px}.summon-open>.primary{margin-top:24px;font-size:13px}.summon-open>p{font-size:10px;color:#8d9b8d}
.swap-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.swap-options button,.exchange-hero{padding:8px;border:1px solid #d1bc91;background:#fff8e5;border-radius:9px;color:#47637c}.exchange-hero{width:90px;margin:4px}.swap-options b,.exchange-hero b{display:block;font-size:11px}.gift-confirm{text-align:center}.gift-confirm>.hero-portrait{max-width:180px;margin:auto}
.world-map{background:linear-gradient(#f7f0dbba,#f7f0dbee),url('/dice/assets/garden.webp') center / cover;min-height:100%}.map-banner{text-align:center;padding:10px 10px 20px}.map-banner h2{font-size:30px;margin:8px;color:#43675c}.map-banner p{color:#849b80;font-size:12px}.map-banner>span{display:inline-block;border:1px solid #c8d0ad;background:#f9f8e5;border-radius:30px;padding:6px 16px;font-size:11px;color:#789272}.map-path{max-width:720px;margin:auto;display:grid;grid-template-columns:repeat(3,1fr);gap:28px 25px;position:relative;padding:15px}.map-path:before{content:'';position:absolute;inset:70px 100px;border:4px dashed #bcc5a0;border-radius:20px;pointer-events:none}.map-node{position:relative;background:#fff8e9f2;border:2px solid #c1c49b;border-radius:15px;min-height:165px;padding:13px 7px;display:flex;flex-direction:column;align-items:center;gap:10px;box-shadow:0 5px 0 #a6b096;color:#4d6f61}.map-pin{width:55px;height:55px;display:grid;place-items:center;border:3px solid #d0bc7a;border-radius:50%;background:linear-gradient(#ffefb9,#ebd28d);color:#a0803e;box-shadow:0 4px 0 #bcad7b}.map-node.completed .map-pin{background:linear-gradient(#bed3a2,#85a575);color:#fffbe3;border-color:#a1b880;box-shadow:0 4px 0 #7b9770}.map-node.locked{filter:grayscale(.75);opacity:.55}.map-node.selected{border-color:#638775;box-shadow:0 5px 0 #527462}.map-node>span:last-child{text-align:center}.map-node small{font-size:8px;letter-spacing:.08em;display:block;color:#9da08a}.map-node b{display:block;font-size:13px;margin:6px 0}.map-node em{font-size:10px;font-style:normal;color:#93a083}
.dock{border-top:2px solid #d9c39b;background:linear-gradient(#fffaf0,#f2e8d5);gap:10px}.dock button{position:relative;color:#82919a;min-width:85px;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px;border-radius:10px;padding:5px 10px}.dock button>.game-icon{height:24px;width:24px}.dock button[aria-current=page]{color:#315c85;background:#e2e8e6;box-shadow:inset 0 2px 0 #cbd9d8}.dock button.has-rewards:after{content:'';position:absolute;right:18%;top:4px;width:7px;height:7px;background:#df7655;border:1px solid #fff5dc;border-radius:50%}
@keyframes invitation-float{50%{transform:translateY(-10px) rotate(4deg)}}
@keyframes card-reveal{from{opacity:0;transform:translateY(15px) scale(.9)}to{opacity:1;transform:none}}
.reduced .summon-envelope>.game-icon,.reduced .summon-grid article{animation:none}
@media(max-width:900px){.formation-slot{padding:0 5px;gap:1px}.formation-slot>.hero-portrait{width:80px;height:95px}.formation-slot b{font-size:14px}.formation-slot small{font-size:9px}.hero-grid{gap:10px}.menu-page{padding:20px}.achievement-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.quest-card{gap:10px}.quest-card .reward-items{max-width:70px}.quest-card .reward-item{font-size:10px;padding:4px}.quest-card .claim-button{padding:6px 9px}.recruitment-copy h2{font-size:35px}}
@media(max-width:600px){
 .menu-page{padding:16px 13px 20px}.overlay-head{padding:6px 12px;font-size:13px}.overlay-head button{min-height:38px;min-width:38px;font-size:25px}.menu-intro{margin-bottom:13px}.menu-intro h2,.codex-banner h2{font-size:22px}.menu-intro small{font-size:8px}.menu-intro p{font-size:10px}.collection-count strong{font-size:29px}.collection-count span{font-size:10px}.formation-strip{gap:6px;padding:8px;border-radius:11px}.formation-slot{flex-direction:column;gap:0;padding:3px 4px 8px;min-height:122px}.formation-slot>.hero-portrait{width:90px;height:85px;max-width:100%}.formation-slot>span:last-child{text-align:center}.formation-slot b{font-size:12px}.formation-slot small{font-size:9px;margin-top:3px}.slot-number{font-size:8px;left:5px;top:5px}.collection-toolbar{gap:4px;margin:13px 0;flex-wrap:wrap}.collection-toolbar>.text-button{margin-left:auto;min-height:30px;font-size:10px}.role-tabs{gap:4px;margin:13px 0;flex-wrap:nowrap}.role-tabs button{gap:3px;padding:6px 7px;font-size:10px;min-height:38px}.role-tabs .game-icon{width:14px;height:14px}.hero-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 8px}.hero-card{border-radius:10px}.hero-card-top{inset:6px 5px auto}.hero-card-top>.game-icon{width:20px;height:20px}.hero-card-top small{font-size:8px;padding:2px 4px}.hero-card-name{font-size:13px;padding-top:3px}.hero-card-foot{font-size:9px;padding-bottom:7px}.hero-card>.hero-portrait{margin-top:19px;width:98%}.menu-footnote{font-size:10px;margin-top:15px}.codex-banner{gap:10px;padding:14px 12px}.codex-emblem{width:43px;height:43px;border-width:1px;box-shadow:inset 0 0 0 3px #eadcaa}.codex-emblem .game-icon{width:25px;height:25px}.codex-banner>div:nth-child(2){min-width:0}.codex-banner small{font-size:7px;letter-spacing:.07em}.codex-banner h2{font-size:18px;letter-spacing:-.8px}.codex-banner p{font-size:10px}.codex-percent strong{font-size:27px}.codex-percent strong small{font-size:11px}.codex-percent>span{font-size:9px}.milestone-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:15px 0}.milestone{padding:11px 6px 10px;gap:6px}.milestone-badge{width:41px;height:41px}.milestone-badge .game-icon{width:23px;height:23px}.milestone .reward-item{font-size:10px;padding:3px 4px}.milestone .reward-item small{font-size:8px}.milestone .reward-items{gap:4px}.milestone .claim-button{min-height:36px;font-size:10px}.wardrobe summary{font-size:11px}.wardrobe p{font-size:11px}.wardrobe-options button{font-size:9px;padding:6px}.intro-seal{width:47px;height:47px}.intro-seal .game-icon{width:26px;height:26px}.goal-tabs{margin-bottom:14px}.goal-tabs button{min-height:40px;font-size:11px}.quest-prize{padding:14px 12px;gap:12px;flex-wrap:wrap}.prize-chest{width:50px;height:50px;border-radius:12px;border-width:2px}.prize-chest .game-icon{width:33px;height:33px}.quest-prize b{font-size:14px}.quest-prize p{font-size:10px}.quest-prize>.claim-button{margin-left:auto}.quest-prize .reward-item{font-size:10px}.quest-prize .reward-item small{font-size:8px}.quest-card{grid-template-columns:35px minmax(0,1fr) auto;gap:8px;padding:12px 10px}.quest-emblem{width:35px;height:35px;border-radius:10px}.quest-emblem .game-icon{width:20px;height:20px}.quest-info>b{font-size:12px}.quest-info>p{font-size:10px}.quest-info>small{font-size:9px}.quest-card>.reward-items{grid-column:2;grid-row:2;justify-content:flex-start;max-width:none}.quest-card>.claim-button{grid-column:3;grid-row:1 / 3;min-height:37px;font-size:10px;padding:6px 8px}.quest-info .quest-progress{margin-top:6px}.goal-toolbar>span{font-size:9px}.goal-toolbar .text-button{font-size:10px;padding:4px}.attendance-card{padding:12px 9px;gap:8px}.attendance-card>span .game-icon{width:25px;height:25px}.attendance-card b{font-size:11px}.attendance-card p{font-size:9px}.attendance-card .claim-button{font-size:10px;padding:5px 8px}.achievement-grid{gap:9px}.achievement-grid .quest-card{padding:14px 9px}.achievement-grid .quest-info>b{font-size:11px}.achievement-grid .quest-info>p{min-height:35px;font-size:10px}.achievement-grid .quest-emblem{width:48px;height:48px}.achievement-grid .quest-card .reward-items{justify-content:center}.trophy-overview{padding:15px 18px;gap:18px}.trophy-overview>span .game-icon{width:40px;height:40px}.trophy-overview strong{font-size:28px}.trophy-overview p{font-size:10px;line-height:1.6}.recruitment-menu{padding:0}.recruitment-art{min-height:225px;height:33vh;max-height:320px;background-position:60% center}.recruitment-copy{top:13%;left:6%}.recruitment-copy>small{font-size:7px;letter-spacing:.13em}.recruitment-copy h2{font-size:28px;letter-spacing:-1px;margin:9px 0}.recruitment-copy>p{font-size:11px;line-height:1.6;margin:8px 0}.recruit-collection{font-size:9px;padding:4px 7px}.recruit-collection .game-icon{width:14px;height:14px}.recruitment-character{width:35%;right:6%;bottom:3%}.recruitment-caption{font-size:9px;padding:6px}.recruitment-controls{padding:16px 13px}.guarantee{gap:8px}.guarantee>span{width:34px;height:34px;flex-shrink:0}.guarantee b{font-size:12px}.guarantee small{font-size:9px;line-height:1.5}.guarantee>.text-button{font-size:9px;padding:4px;white-space:nowrap}.recruitment-buttons{gap:10px;margin-top:15px}.summon-button{gap:10px;padding:10px 6px;min-height:67px;border-radius:10px}.summon-button>.game-icon{width:25px;height:25px}.summon-button b{font-size:14px}.summon-button small{font-size:10px}.recruit-links{margin-top:15px}.recruit-links button{font-size:9px;gap:4px;padding:6px 4px}.recruit-links .game-icon{width:14px;height:14px}.welcome-gift{flex-direction:column;align-items:stretch;padding:12px 14px;gap:4px;margin:18px 0}.welcome-gift h3{font-size:15px;margin:6px 0}.welcome-gift p{font-size:10px}.gift-heroes{display:grid;grid-template-columns:repeat(3,1fr)}.gift-heroes button{width:auto}.gift-heroes .hero-portrait{height:80px}.recruit-history{margin-top:18px}.recruit-history button{width:55px}.recruit-history>div{gap:6px}.hero-detail{grid-template-columns:1fr;min-height:0}.detail-portrait{padding:8px;min-height:180px}.detail-portrait>.hero-portrait{width:180px;height:180px}.detail-portrait>span{position:absolute;left:12px;bottom:10px;font-size:10px}.detail-content{padding:17px 18px 20px}.detail-content h2{font-size:26px}.hero-story{font-size:12px}.hero-stats{margin:12px 0}.detail-skills article{padding:8px}.detail-skills b{font-size:12px}.detail-actions .primary{min-height:42px}.summon-results{padding:30px 16px 22px;min-height:340px}.summon-envelope{min-height:320px}.summon-envelope h2{font-size:18px}.summon-envelope>.game-icon{width:95px;height:95px}.summon-open>h2{font-size:21px}.summon-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.summon-grid.single{max-width:200px}.summon-grid article{padding:10px 5px}.summon-grid article>.hero-portrait{max-height:140px}.result-ribbon{font-size:7px}.map-banner{padding:5px 5px 14px}.map-banner h2{font-size:25px}.map-banner p{font-size:11px}.map-path{gap:17px 10px;grid-template-columns:repeat(2,1fr);padding:5px}.map-path:before{inset:45px 55px}.map-node{min-height:140px;border-radius:12px;padding:10px 5px}.map-node b{font-size:12px}.map-pin{width:45px;height:45px}.dock{gap:0;justify-content:space-around}.dock button{min-width:0;flex:1;padding:4px 2px;font-size:9px;gap:3px}.dock button>.game-icon{width:23px;height:23px}.dock button.has-rewards:after{right:19%;top:2px}
}
@media(max-width:380px){.role-tabs button{padding:5px;font-size:9px;gap:2px}.role-tabs .game-icon{width:13px;height:13px}.codex-banner{padding:12px 9px;gap:7px}.codex-emblem{display:none}.collection-count span{font-size:9px}.quest-card>.claim-button{padding:5px 7px;font-size:9px}.recruitment-copy h2{font-size:25px}}
@media(prefers-reduced-motion:reduce){.hero-card,.formation-slot>.hero-portrait{transition:none}.summon-envelope>.game-icon,.summon-grid article{animation:none}}

.dock button>span{font-size:10px;line-height:1.2}
@media(max-width:600px){.dock button>span{font-size:9px}}

.codex-reward-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f5e9c9;border:1px solid #d9c6a0;border-radius:9px;margin:12px 0;padding:5px 12px}
.codex-reward-summary>span{display:flex;align-items:center;gap:8px;min-width:0}.codex-reward-summary b{font-size:11px;color:#9a814c}.codex-reward-summary .game-icon{width:20px;height:20px;color:#aa8a4c}.codex-reward-summary .text-button{font-size:10px;flex-shrink:0}
dialog:has(.collection-rewards-dialog){width:min(780px,calc(100vw - 40px));max-width:780px;background:#fcf6e9;border:2px solid #d5bd81}.collection-rewards-dialog>small{font-size:9px;letter-spacing:.13em;color:#ab8d54}.collection-rewards-dialog>h2{font-size:22px}.collection-rewards-dialog>p{font-size:12px;line-height:1.7;color:#899281}
@media(max-width:600px){.codex-reward-summary{padding:4px 8px;gap:4px}.codex-reward-summary b{font-size:10px}.codex-reward-summary .game-icon{width:16px;height:16px}.codex-reward-summary>span{gap:5px}.codex-reward-summary .text-button{font-size:9px;padding:4px}.collection-rewards-dialog>h2{font-size:19px}}

/* Keep actual goals visible in short desktop game frames. */
.goals-menu .menu-intro{margin-bottom:10px}.goals-menu .menu-intro>div>small{display:none}.goals-menu .menu-intro p{display:none}.goals-menu .menu-intro h2{font-size:23px;margin:3px 0}.goals-menu .intro-seal{width:42px;height:42px}.goals-menu .intro-seal .game-icon{width:24px;height:24px}.goals-menu .goal-tabs{margin-bottom:12px}.goals-menu .trophy-overview{padding:10px 18px}.goals-menu .trophy-overview strong{font-size:28px}.goals-menu .trophy-overview>span .game-icon{width:42px;height:42px}.goals-menu .goal-toolbar{margin:4px 0}.goals-menu .achievement-grid .quest-card{padding:12px}.goals-menu .achievement-grid .quest-emblem{height:46px;width:46px}.goals-menu .achievement-grid .quest-info>p{min-height:30px}
.summon-confirm{text-align:center;padding:8px}.summon-confirm>.game-icon{width:65px;height:65px;color:#b8954e;background:#f1e4c6;border-radius:15px;padding:12px;border:1px solid #cdb783}.summon-confirm h2{font-size:23px}.summon-confirm .cost-preview{display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid #dacdac;border-radius:10px;background:#fff7df;padding:13px;color:#9473a5;font-size:17px;font-weight:800}.summon-confirm .cost-preview .game-icon{width:22px;height:22px}.summon-confirm p{font-size:12px;line-height:1.8;color:#919586}.summon-confirm .primary{width:100%}.settings-heading{display:flex;align-items:center;gap:12px;margin-bottom:20px}.settings-heading>span{width:46px;height:46px;display:grid;place-items:center;border-radius:12px;border:2px solid #c8ad73;background:#304d78;color:#f2d995}.settings-heading h2{margin:0;font-size:22px}.settings-help{font-size:12px;line-height:1.8;background:#f1ecdf;border-radius:10px;padding:10px 14px;margin:14px 0}.settings-help summary{font-weight:800;color:#768773;cursor:pointer}.setting-row{background:#f8f0df;border:1px solid #ddd0b1;border-radius:10px;padding:12px 14px!important;margin:8px 0;gap:18px;color:#63738a;font-size:12px!important}.setting-row select{max-width:135px}.setting-row input{accent-color:#53789c}
/* Guardians share the codex; combat keeps the compact health HUD. */
.codex-tabs{display:flex;gap:8px;margin-bottom:16px;border-bottom:2px solid #cab684;padding-bottom:8px}.codex-tabs button{display:flex;align-items:center;justify-content:center;gap:8px;background:#e9dfc9;border-radius:9px;padding:8px 18px;font-size:12px;font-weight:800}.codex-tabs button[aria-pressed=true]{background:#2b4570;color:#fff0c5;box-shadow:0 3px 0 #152e53}
.boss-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.boss-card{position:relative;min-width:0;border:2px solid #b89c63;border-radius:15px;background:radial-gradient(ellipse at 50% 35%,#fff7d6,#dfceb0 65%);padding:14px 10px 12px;display:flex;flex-direction:column;align-items:center;gap:5px;box-shadow:0 4px 0 #b79e72;overflow:hidden}.boss-card.major{background:radial-gradient(ellipse at center,#777da4,#293b62);color:#fff0c9;border-color:#cfae57}.boss-card img{width:100%;height:190px;object-fit:contain;filter:drop-shadow(0 7px 6px #3d365135)}.boss-card.unseen img{filter:brightness(.15);opacity:.35}.boss-card strong{font-size:15px}.boss-card>small{font-size:10px;opacity:.7}.boss-index{font-size:10px;font-weight:900;letter-spacing:.12em;align-self:flex-start;border-bottom:1px solid #9f895d;padding:3px 8px}.boss-prize{font-size:10px;background:#fff9e77d;border-radius:6px;margin-top:5px;padding:7px;color:#685032}.boss-detail-art{position:relative;background:radial-gradient(ellipse at 50% 55%,#fff4d0,#c3cbd4 80%);border-radius:14px;padding:12px;display:flex;align-items:center;flex-direction:column}.boss-detail-art img{width:min(100%,340px);height:270px;object-fit:contain}.boss-detail-art small{font-size:10px;letter-spacing:.18em;color:#6a5f49;font-weight:900}.boss-detail .detail-content h2{font-size:25px}.boss-phase-note{background:#eee3f5;color:#654a8a;border-left:3px solid #a483bf;padding:12px;font-size:12px;line-height:1.8;margin:12px 0}.boss-loot{display:flex;align-items:center;gap:15px;padding:15px;background:#f4e8c7;border:1px solid #d7be7c;border-radius:10px;margin:15px 0}.boss-loot>.game-icon{height:35px;width:35px;color:#a8873f}.boss-loot b{font-size:13px}.boss-loot p{font-size:12px;margin:5px 0}.boss-loot small{font-size:10px;color:#8f8168}.boss-detail .primary{width:100%}
.boss-guide{position:absolute;z-index:76;left:18px;top:100px;display:flex;align-items:center;gap:8px;border:1px solid #daba6b;border-radius:10px;padding:8px 12px;background:#243757e8;color:#ffe8a2;font-size:12px;text-align:left}.boss-guide small{display:block;font-size:9px;color:#f3e5c3;margin-top:3px}.boss-guide .game-icon{width:20px;height:20px}.scene .unit.boss-unit{width:37%;height:75%;right:1%;bottom:10%}.scene .unit.boss-unit.phase-two img{filter:drop-shadow(0 0 15px #b383fb) drop-shadow(0 7px 8px #28394b77)}.scene .unit.enemy.enemy-slot-1{right:22%;height:32%;width:18%;bottom:12%!important}.scene .unit.enemy.enemy-slot-2{right:0%;height:30%;width:16%;bottom:6%!important}.boss-arrival{position:absolute;z-index:74;top:43%;left:0;right:0;text-align:center;pointer-events:none;background:linear-gradient(90deg,transparent,#182642ed 25%,#182642ed 75%,transparent);color:#fff0c4;padding:16px;animation:boss-arrive 1.5s both}.boss-arrival small{display:block;font-size:10px;letter-spacing:.3em;margin-bottom:5px;color:#f1c363}.boss-arrival b{font-size:25px}.fx-summon{color:#b6eca6;font-size:45px}.number-summon{font-size:20px;color:#c4ffb6}@keyframes boss-arrive{0%{opacity:0;transform:translateX(-25px)}15%,70%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(20px)}}.reduced .boss-arrival{display:none}
@media(max-width:760px){.codex-tabs{margin-bottom:12px}.codex-tabs button{flex:1;padding:7px;font-size:11px}.boss-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.boss-card{padding:9px 6px}.boss-card img{height:130px}.boss-card strong{font-size:12px}.boss-card>small,.boss-prize{font-size:9px}.boss-index{font-size:8px}.boss-guide{top:90px;left:9px;padding:6px;gap:4px;font-size:10px;max-width:130px}.boss-guide .game-icon{width:15px;height:15px}.boss-guide small{font-size:8px}.scene .unit.boss-unit{height:65%;width:41%;right:1%;bottom:20%!important}.boss-arrival b{font-size:20px}.boss-detail-art img{height:210px}.boss-detail .detail-content{padding:18px 0 0}.boss-detail .detail-content h2{font-size:21px}}
/* Rarity is conveyed by labels as well as color. */
.hero-card.tier-legendary,.summon-grid .tier-legendary{background:linear-gradient(145deg,#fff7d9,#eacb91);border-color:#cc9a31;box-shadow:inset 0 0 0 2px #ffe9a5,0 3px 12px #ba852727}.hero-card.tier-epic,.summon-grid .tier-epic{background:linear-gradient(145deg,#f7edff,#e1cdec);border-color:#ac7fc7}.hero-card.tier-rare{background:linear-gradient(145deg,#f3faff,#d7eaf9);border-color:#7faece}.hero-card.tier-uncommon{border-color:#79aa88}.tier-badge{display:block;color:var(--tier-color);font-weight:900;font-size:10px;letter-spacing:.1em;margin:2px 0}.tier-legendary .tier-badge{color:#805006}.tier-epic .tier-badge{color:#744394}.tier-label{font-weight:900}.probability-info{font-size:13px;line-height:1.65}.probability-info h3{margin:20px 0 8px}.rate-tiers{display:flex;flex-wrap:wrap;gap:6px}.rate-tiers>span{flex:1 1 80px;border-top:3px solid var(--tier-color);border-radius:8px;background:#f5efe4;padding:8px;text-align:center}.rate-tiers b,.rate-tiers small{display:block}.rate-tiers small{font-size:10px}.rate-table-wrap{overflow:auto}.probability-info table{width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap}.probability-info th,.probability-info td{padding:7px 5px;border-bottom:1px solid #ddcfb7;text-align:left}.rate-status{background:#fff1bf;padding:12px;border-radius:10px}.collection-rewards-dialog>.primary{margin:6px 0 12px;width:100%}
.region-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:14px}.region-tabs button{position:relative;overflow:hidden;padding:0 0 9px;background:#faf5e8;border:2px solid #d4c6aa;border-radius:12px;color:#44392f;text-align:left}.region-tabs button[aria-pressed=true]{border-color:#bb8630;box-shadow:0 0 0 2px #f3dca3}.region-tabs img{width:100%;height:74px;object-fit:cover;display:block}.region-tabs span,.region-tabs small{display:block;padding:5px 8px 0}.region-tabs span{font-weight:900;font-size:12px}.region-tabs small{font-size:9px}.map-banner{background-size:cover;background-position:center;min-height:170px}.map-banner h2,.map-banner p,.map-banner>small,.map-banner>span{color:#fff!important;text-shadow:0 1px 5px #16333b}.world-map .map-path{background-image:none}@media(max-width:600px){.region-tabs{display:flex;overflow:auto;gap:6px;padding:3px}.region-tabs button{min-width:112px}.region-tabs img{height:55px}.map-banner{min-height:140px}}
.world-map{background-image:linear-gradient(#fffaf1d9,#fffaf1df),var(--map-bg,url('/dice/assets/garden.webp'))}.map-banner>span{color:#514633!important;text-shadow:none}.map-node.locked{opacity:.7}
/* The workshop and companion preparation remain inside the game panel. */
.training-row{display:flex;align-items:center;gap:16px;padding:16px;border:1px solid #d7dccd;background:#f0f3e7;border-radius:16px;margin:14px 0}.training-row>div{flex:1}.training-row small{display:block;color:#667968;line-height:1.6;margin-top:6px}.training-row button{display:flex;align-items:center;gap:8px;white-space:nowrap}.preset-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:14px 0}.preset-row>div{padding:14px;border-radius:14px;background:#f4ede0;border:1px solid #e8dcc6}.preset-row small{display:block;margin:8px 0;color:#756a5a;min-height:18px}.preset-row button{padding:4px 7px;font-size:12px;background:white;border-radius:8px;margin:3px}.skill-upgrade{padding:6px 8px;border-radius:10px;background:#f4dfb0;font-size:11px;flex:none;max-width:95px}.detail-skills article>div{flex:1}.skill-growth-note,.training-note{font-size:11px;line-height:1.7;color:#746e62;margin:12px 0}.workshop-banner{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:200px;padding:28px;border-radius:22px;background:radial-gradient(ellipse at 90% 20%,#dabb7c,#52432e 70%);color:#fff9e9;overflow:hidden}.workshop-banner h2{font-size:30px;margin:8px 0}.workshop-banner p{line-height:1.7;margin-bottom:14px}.workshop-banner>img{width:200px;height:200px;object-fit:contain}.workshop-banner small{letter-spacing:2px;font-size:10px;color:#efcf8b}.workshop-banner span{font-size:12px}.workshop-party{display:flex;gap:12px;margin:16px 0}.workshop-party button{flex:1;display:flex;align-items:center;text-align:left;background:#fff;border:1px solid #e3d9c7;border-radius:14px;overflow:hidden}.workshop-party img{width:65px;height:65px;object-fit:contain}.workshop-party small{display:block;color:#8d7a55;margin-top:4px}.gear-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:16px 0}.gear-card{padding:18px;border:1px solid #e5d9bf;background:#fffaf0;border-radius:18px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px}.gear-card h3{font-size:14px}.gear-card p,.gear-card>small{font-size:12px;line-height:1.6;color:#756954}.gear-card button{width:100%;margin-top:auto;font-size:11px;display:flex;align-items:center;justify-content:center;gap:4px}.gear-art{display:flex;align-items:center;justify-content:center;position:relative;width:100px;height:100px;margin:0 auto 4px;border-radius:22px;background:radial-gradient(#fff7d4 15%,var(--gear-color));border:2px solid #e0bd70;box-shadow:inset 0 0 0 4px #ffffff66,0 8px 16px #64491a12;transform:rotate(-3deg)}.gear-art>.game-icon{width:50px;height:50px;stroke:#554523;filter:drop-shadow(0 2px #fff6d8)}.gear-art small{position:absolute;bottom:4px;left:0;right:0;font-size:9px;color:#4f482b}.gear-tier-3{border-color:#ac8ccc;box-shadow:inset 0 0 0 4px #ffffff88,0 0 14px #a892c636}.gear-unlock{margin-top:auto;background:#eee6d7;border-radius:9px;padding:11px;font-size:11px;color:#74654c;width:100%}.purchase-history{padding:16px;background:#eee7d9;border-radius:14px;font-size:13px}.purchase-history p{padding:8px;display:flex;justify-content:space-between;gap:16px}.gear-hero{display:flex;align-items:center;gap:18px}.gear-hero img{width:115px;height:115px}.gear-hero small{font-size:10px;letter-spacing:2px}.gear-hero h2{font-size:23px;margin:6px 0}.gear-slot{margin:20px 0}.gear-slot h3{font-size:16px}.gear-slot h3 small{display:block;color:#8e826d;font-size:12px;font-weight:400;margin:6px 0}.gear-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0}.gear-choices button{display:flex;flex-direction:column;align-items:center;padding:12px 6px;background:#f4eddf;border:1px solid #ded0b5;border-radius:14px;gap:8px}.gear-choices b{font-size:12px}.gear-choices small,.gear-choices em{font-size:10px;line-height:1.5;font-style:normal}.gear-purchase{text-align:center;display:grid;gap:18px;padding:12px}.gear-purchase p{line-height:1.8}
@media(max-width:600px){.training-row{flex-direction:column;align-items:stretch}.preset-row{gap:6px}.preset-row>div{padding:9px 6px}.preset-row small{font-size:10px;min-height:36px;line-height:1.6}.preset-row button{width:100%;margin:3px 0}.workshop-banner{padding:18px;min-height:170px}.workshop-banner h2{font-size:21px}.workshop-banner p{font-size:12px;max-width:160px}.workshop-banner>img{width:110px;height:140px;margin-left:-10px}.workshop-party{gap:5px}.workshop-party button{flex-direction:column;padding:4px;text-align:center;font-size:12px}.workshop-party small{font-size:10px}.gear-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.gear-card{padding:12px 8px}.gear-card h3{font-size:12px}.gear-art{width:85px;height:85px}.gear-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.gear-hero img{width:85px;height:100px}.gear-hero h2{font-size:18px}}

.act-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}.act-tabs button{display:flex;align-items:center;gap:10px;border:1px solid #cfc2a7;background:#eee6d5;color:#71644d;padding:11px 14px;border-radius:11px;text-align:left}.act-tabs button[aria-pressed=true]{color:#fff6da;background:#344775;border-color:#344775}.act-tabs b{white-space:nowrap;font-size:14px}.act-tabs span{font-size:11px}.act-tabs button:focus-visible,.region-tabs button:focus-visible{outline:3px solid #bc861d;outline-offset:2px}@media(max-width:600px){.act-tabs{gap:5px}.act-tabs button{padding:9px 4px;flex-direction:column;gap:4px}.act-tabs span{font-size:9px;white-space:nowrap}.region-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.region-tabs img{height:54px}}

/* In-scene rewards share the painted game's compact, tactile card system. */
.relic-bag-button{pointer-events:auto;position:absolute;right:0;top:92px;background:#193966ee;color:#fff1c9;border:1px solid #f0cf89;border-radius:9px;padding:5px 10px;min-height:32px;font-size:11px;box-shadow:0 3px 10px #15294830}
.relic-reward{position:absolute;z-index:66;inset:104px 28px 12px;display:flex;flex-direction:column;align-items:center;gap:14px;background:#fff9e9f2;border:2px solid #d2b574;border-radius:20px;padding:20px;overflow:auto;box-shadow:0 10px 40px #172e5555;backdrop-filter:blur(8px)}
.relic-reward header{text-align:center}.relic-reward header>small{font-size:9px;letter-spacing:2px;color:#897348}.relic-reward h2{margin:5px 0;font-size:25px;color:#253c65}.relic-reward p{margin:0;font-size:12px;color:#6a7282}.relic-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;width:100%;max-width:850px}.relic-card{position:relative;min-width:0;display:flex;flex-direction:column;align-items:center;gap:12px;border:1px solid color-mix(in srgb,var(--relic-color) 50%,#fff);border-bottom:4px solid var(--relic-color);border-radius:16px;background:linear-gradient(155deg,#fffef9,#f5eddb);padding:16px 13px;color:#283e63;text-align:center;box-shadow:0 5px 12px #283e6314}.relic-card.recommended{outline:2px solid #d9b15b;outline-offset:2px}.relic-emblem{position:relative;width:64px;height:64px;flex-shrink:0;display:grid;place-items:center;border:2px solid #fff9db;border-radius:18px;background:linear-gradient(145deg,color-mix(in srgb,var(--relic-color) 55%,#fff),var(--relic-color));color:white;box-shadow:inset 0 0 0 4px #ffffff25,0 5px 0 color-mix(in srgb,var(--relic-color) 80%,#333);transform:rotate(-5deg)}.relic-emblem svg{width:34px;height:34px;filter:drop-shadow(0 2px 1px #0003)}.relic-emblem i{position:absolute;right:-7px;top:-10px;color:#dfb358;font-size:26px;text-shadow:0 2px white;font-style:normal}.relic-copy{display:flex;flex-direction:column;gap:6px}.relic-copy>small{font-size:10px;color:var(--relic-color);font-weight:800}.relic-copy>strong{font-size:16px}.relic-copy>span{font-size:12px;line-height:1.65}.relic-select{font-size:11px;margin-top:auto;color:var(--relic-color)}.relic-reward footer{font-size:10px;color:#707b87}.relic-bag h2{color:#253c65}.relic-bag>p{font-size:12px;line-height:1.7;color:#687789}.relic-bag .relic-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.relic-card:focus-visible{outline:3px solid #295eb0;outline-offset:2px}
@media(max-width:760px){.relic-bag-button{top:81px;right:0;font-size:10px;padding:4px 7px}.relic-reward{inset:109px 9px 8px;padding:14px 12px;gap:12px;border-radius:14px}.relic-reward h2{font-size:19px}.relic-reward p{font-size:11px;line-height:1.6}.relic-cards{grid-template-columns:1fr;gap:10px}.relic-card{display:grid;grid-template-columns:44px 1fr;gap:12px;text-align:left;padding:11px 12px;border-radius:11px}.relic-emblem{width:40px;height:40px;border-radius:12px}.relic-emblem svg{width:25px;height:25px}.relic-emblem i{font-size:19px;right:-5px;top:-8px}.relic-copy{gap:3px}.relic-copy>strong{font-size:14px}.relic-copy>span{font-size:11px;line-height:1.5}.relic-copy>small{font-size:9px}.relic-select{display:none}.relic-reward footer{font-size:9px;line-height:1.5;text-align:center}.relic-bag .relic-cards{grid-template-columns:1fr}}
@media(max-height:660px){.relic-reward{inset:76px 12px 8px;gap:8px;padding:10px}.relic-reward header>small,.relic-reward footer{display:none}.relic-reward h2{font-size:18px}.relic-bag-button{top:46px}}
.story-tabs{display:flex;gap:7px;margin:12px 0 5px}.story-tabs button{flex:1;background:#eee8d8;color:#647184;border:1px solid #d6cbae;border-radius:10px;min-height:40px;font-size:12px;font-weight:800}.story-tabs button[aria-pressed=true]{background:#314b7d;color:#fff;border-color:#314b7d}.story-order-note{font-size:11px;color:#667486;text-align:center;margin:7px 0 14px}
/* Account progression stays compact above the playfield; all rewards live in the game dialog. */
.adventurer-badge{display:flex;align-items:center;gap:7px;background:#ffffff10;color:#fff;border:1px solid #ffffff30;border-radius:12px;padding:3px 10px;min-height:36px;text-align:left}.adventurer-badge b{font-size:11px;white-space:nowrap}.level-ready{color:#ffd67d;font-style:normal;font-size:8px}.adventurer-crest{display:inline-grid;place-items:center;width:30px;height:30px;flex-shrink:0;color:var(--crest);background:#1e355a;border:2px solid var(--crest);border-radius:50%;box-shadow:0 0 0 2px #ffffff19,0 2px 8px #091b3433}.adventurer-crest svg{width:90%;height:90%;fill:#ffffff19;stroke:currentColor;stroke-width:2}.adventurer-crest svg path{fill:currentColor;stroke:none}.adventurer-crest.large{width:80px;height:80px;border-width:4px;margin:0 auto 12px;box-shadow:0 0 26px #f7d68630}.adventurer-xp-mini{display:block;margin-top:4px;width:85px;height:4px;border-radius:4px;background:#101e3866;overflow:hidden}.adventurer-xp-mini i,.adventurer-xp i{display:block;height:100%;background:linear-gradient(90deg,#97d9c9,#f4d383);border-radius:inherit}#audio-toggle{font-size:20px;border-radius:50%;opacity:.55}#audio-toggle[aria-pressed=true]{opacity:1;color:#ffe1a3;background:#ffffff14}.adventurer-panel{min-width:0}.adventurer-cover{text-align:center;padding:24px 20px;background:radial-gradient(ellipse at top,#6c83a2,#2d4267);border:2px solid #dbbd7c;border-radius:18px;color:#fff9e9}.adventurer-cover small{display:block;font-size:9px;letter-spacing:3px;color:#e7d49f}.adventurer-cover h2{margin:6px 0;font-size:23px;overflow-wrap:anywhere}.adventurer-cover p{color:#d8e4ed;font-size:12px}.adventurer-cover>strong{display:block;font-size:32px;margin:12px 0}.adventurer-cover>span:last-child{font-size:11px;color:#dce9ed}.adventurer-xp{height:9px;max-width:320px;margin:10px auto;border-radius:8px;background:#182c4e;overflow:hidden}.adventurer-info{padding:18px 3px}.adventurer-info b{font-size:14px}.adventurer-info p{font-size:12px;line-height:1.9;margin:7px 0}.adventurer-info small{font-size:11px;color:#718097}.adventurer-reward-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0 12px}.adventurer-reward-head h3{font-size:16px}.adventurer-reward-head small{display:block;font-size:11px;color:#8b7e5d;margin-top:4px}.adventurer-reward-head button{font-size:12px;padding:10px}.adventurer-rewards{display:grid;gap:8px;margin-bottom:24px}.level-gift{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #d9cba8;border-radius:12px;background:#fff8e8}.level-gift>span{display:grid;place-items:center;width:42px;height:44px;flex-shrink:0;border-radius:9px;background:#314975;color:#ffe9ac;font-size:12px;font-weight:800}.level-gift>div{flex:1;min-width:0}.level-gift b{font-size:12px}.level-gift small{display:block;font-size:10px;margin-top:5px;color:#7e8492}.level-gift button{padding:6px 10px;font-size:11px;flex-shrink:0}.level-gift.received{background:#f0eee7}.adventurer-styles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}.adventurer-styles button{display:flex;flex-direction:column;align-items:center;gap:9px;padding:14px 7px;border-radius:12px;background:#f3edde;border:2px solid #dbd0b9}.adventurer-styles button.selected{border-color:#bb963a;background:#fff3ce}.adventurer-styles .adventurer-crest{width:42px;height:42px}.adventurer-styles b{font-size:11px}.adventurer-styles small{font-size:9px;line-height:1.5}.setting-row input[type=range]{width:130px;min-width:80px}.adventurer-badge:focus-visible,input[type=range]:focus-visible{outline:3px solid #e8b95b;outline-offset:2px}
@media(max-width:700px){.masthead{gap:6px}.masthead .preview-label{display:none}.adventurer-badge{margin-left:auto;padding:3px 6px;gap:5px;min-height:32px}.adventurer-badge b{font-size:10px}.adventurer-badge .adventurer-crest{width:23px;height:23px}.adventurer-xp-mini{width:72px}.masthead .icon-button{width:30px;min-height:32px;padding:0;flex-shrink:0}.adventurer-styles{grid-template-columns:repeat(2,minmax(0,1fr))}.adventurer-cover{padding:18px 12px}.adventurer-cover .large{width:62px;height:62px}.adventurer-cover>strong{font-size:27px}}

/* Use the production shell above one viewport-contained game frame. */
body[data-page=dice]{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
body[data-page=dice]>.app{width:calc(100% - 32px);max-width:1240px;margin:12px auto 4px;flex:1;min-height:0;height:auto;grid-template-rows:44px minmax(0,1fr) 56px;border:1px solid #ded3e8;border-radius:16px;overflow:hidden;box-shadow:0 10px 35px #66508618}
.dice-toolbar{display:flex;align-items:center;gap:8px;padding:3px 14px;background:#314672;color:#fff}.dice-toolbar .wallet{margin-left:auto;font-size:12px;gap:12px}.dice-toolbar .wallet small{color:#e0d9ec}.dice-toolbar .icon-button{width:34px;min-height:34px;padding:0;flex-shrink:0}.dice-toolbar .adventurer-badge{margin-left:0}
body[data-page=dice]>.mk-legal-footer{flex:0 0 auto;padding:4px 8px!important;font-size:10px!important;line-height:1.4!important}body[data-page=dice]>.mk-legal-footer br{display:none}
body[data-page=dice] .dock{padding:3px 14px;gap:12px}body[data-page=dice] .dock button{min-height:44px}
@media(max-width:700px){body[data-page=dice]>.app{width:calc(100% - 12px);margin:6px auto 2px;border-radius:12px;grid-template-rows:40px minmax(0,1fr) 54px}.dice-toolbar{padding:2px 7px;gap:5px}.dice-toolbar .wallet{gap:8px;font-size:11px}.dice-toolbar .wallet small{display:none}.dice-toolbar .icon-button{width:28px;min-height:32px}.dice-toolbar .adventurer-badge{padding:2px 5px}.dice-toolbar .adventurer-badge .adventurer-crest{width:23px;height:23px}body[data-page=dice]>.mk-legal-footer{font-size:9px!important}body[data-page=dice] .dock{gap:0;padding:2px 4px}}
@media(max-height:660px){body[data-page=dice]>.app{margin-top:4px;grid-template-rows:36px minmax(0,1fr) 46px}body[data-page=dice] .dock button{min-height:38px}.dice-toolbar{padding-top:1px;padding-bottom:1px}}
body[data-page=dice] .play-area{container-type:size;container-name:dice-play}
@container dice-play (max-height:600px){
 .relic-reward{inset:76px 14px 8px;padding:10px;gap:8px;border-radius:14px}.relic-reward header>small{display:none}.relic-reward h2{font-size:18px;margin:0 0 3px}.relic-reward p{font-size:10px}.relic-cards{gap:8px}.relic-card{padding:9px;gap:7px}.relic-emblem{width:36px;height:36px;border-radius:10px}.relic-emblem svg{width:24px;height:24px}.relic-emblem i{font-size:19px;right:-5px;top:-9px}.relic-copy{gap:4px}.relic-copy>strong{font-size:12px}.relic-copy>small,.relic-copy>span{font-size:10px;line-height:1.45}.relic-select{display:none}.relic-reward footer{display:none}
}
@container dice-play (max-height:440px){
 .combat-controls:not(.autoplay){max-height:58%;overflow-y:auto;flex-shrink:0;padding:5px 8px}.manual-controls .party-card{padding:4px}.manual-controls .card-top{display:flex;height:12px;margin:0}.manual-controls .card-portrait,.manual-controls .card-title small{display:none}.manual-controls .card-title{font-size:9px;line-height:12px}.manual-controls .skill{min-height:30px;padding:3px;font-size:10px}.manual-controls .skill small{display:none}.manual-controls .dice-row{margin:3px 0;gap:8px}.manual-controls .die{width:32px;height:32px;min-height:32px;font-size:24px}.manual-controls .action-list{max-height:26px;overflow:auto}.manual-controls .turn-actions{margin-top:4px}.manual-controls .turn-actions .primary{min-height:34px;padding:6px;font-size:10px}.battle-log{display:none}.command-guide{min-height:30px}.command-guide .secondary-button{min-height:30px;font-size:10px;padding:5px}.scene-head{top:5px;left:7px;right:7px}.scene-label{padding:5px 7px}.scene-label strong{font-size:10px}.scene-label small{font-size:8px}.progress-nodes{display:none}.scene-tools .turn-label{display:none}.relic-bag-button{top:46px}.battle-hud .enemy-hud{top:55px;right:8px;width:min(220px,55%)}.battle-hud .ally-hud{bottom:8px}.scene .unit{height:60%;bottom:23%!important}
}

/* Budget the PC controls against the available game frame, not the page height.
   Keep action buttons outside scrolling lists and reserve the scene for combat. */
@media(min-width:761px){
 .scene-tools{flex-direction:row;flex-wrap:wrap;justify-content:flex-end;max-width:58%}
 .scene-tools .relic-bag-button{position:static;margin:0}
 @container dice-play (max-height:640px){
  .combat-controls:not(.autoplay){max-height:none;overflow:visible;padding:6px 10px;flex-shrink:0}
  .combat-controls .command-guide{min-height:30px;margin-bottom:5px}
  .command-guide .secondary-button{min-height:30px;padding:5px 9px}
  .manual-controls{display:grid;grid-template-columns:200px minmax(0,1fr);gap:6px 12px;align-items:center}
  .manual-controls .dice-row{margin:0;gap:7px;flex-wrap:wrap}
  .manual-controls .die{width:38px;height:38px;min-height:38px;font-size:28px}
  .manual-controls .dice-row .secondary-button{max-width:none;min-height:30px}
  .manual-controls .party-card{padding:5px}
  .manual-controls .card-top{display:flex;height:auto;margin:0 0 4px}
  .manual-controls .card-portrait,.manual-controls .card-title small{display:none}
  .manual-controls .card-title{font-size:11px;line-height:14px}
  .manual-controls .skill{font-size:11px;min-height:40px;padding:4px}
  .manual-controls .skill small{display:block;font-size:9px}
  .manual-controls .turn-actions{grid-column:1/-1;margin:0;min-height:38px}
  .manual-controls .turn-actions .primary{min-height:36px;font-size:12px;padding:7px 14px}
  .manual-controls .action-list{display:flex;flex-wrap:nowrap;max-height:none;min-height:32px;overflow-x:auto;overflow-y:hidden;padding:2px 0}
  .manual-controls .action-chip{flex:0 0 auto;min-height:28px}
  .battle-log{display:none}
  .scene-head{top:7px;left:10px;right:10px;align-items:flex-start}
  .scene-label{padding:6px 9px;max-width:40%}
  .scene-label strong{font-size:12px}.scene-label small{font-size:9px}
  .scene-tools{flex-direction:row;flex-wrap:wrap;justify-content:flex-end;gap:6px;max-width:58%}
  .scene-tools .turn-label,.progress-nodes{display:none}
  .scene-tools .relic-bag-button{position:static;min-height:34px;margin:0}
  .auto-controls button{min-height:34px;padding:6px 9px;font-size:11px}
  .battle-hud .enemy-hud{top:58px;right:10px;width:280px;max-width:46%}
  .battle-hud .ally-hud{bottom:8px}
 }
 @container dice-play (max-height:320px){
  .play-area:has(.combat-controls:not(.autoplay))>.scene{flex:none;width:calc(100% - 360px);height:100%}
  .combat-controls:not(.autoplay){position:absolute;right:0;top:0;bottom:0;width:360px;border-top:0;border-left:2px solid #d6bc83;display:flex;flex-direction:column;padding:6px 8px}
  .combat-controls:not(.autoplay) .command-guide{flex-shrink:0;margin-bottom:0}
  .combat-controls:not(.autoplay) .command-guide b{font-size:10px}
  .combat-controls:not(.autoplay) .manual-controls{display:flex;flex-direction:column;align-items:stretch;gap:4px;flex:1;min-height:0}
  .combat-controls:not(.autoplay) .dice-row{flex-shrink:0}
  .combat-controls:not(.autoplay) .die{height:34px;min-height:34px;width:34px;font-size:25px}
  .combat-controls:not(.autoplay) .party-cards{min-height:0;overflow-y:auto;flex:1;align-content:start}
  .combat-controls:not(.autoplay) .skill-buttons{grid-template-columns:1fr}
  .combat-controls:not(.autoplay) .skill small{display:none}
  .combat-controls:not(.autoplay) .skill{min-height:30px;font-size:10px;padding:3px}
  .combat-controls:not(.autoplay) .turn-actions{display:grid;grid-template-columns:1fr auto;gap:3px 8px;flex-shrink:0}
  .combat-controls:not(.autoplay) .action-list{grid-column:1/-1;font-size:9px}
  .combat-controls:not(.autoplay) .action-chip{font-size:9px}
  .combat-controls:not(.autoplay) .turn-actions .undo{justify-self:end}
 }
}

/* Mobile HUD shares the same reserved toolbar row as desktop. */
@media(max-width:760px){
 .scene-head{left:8px;right:8px;gap:6px}
 .scene-label{max-width:40%}
 .scene-tools{flex-direction:row;flex-wrap:wrap;justify-content:flex-end;max-width:58%;gap:4px}
 .scene-tools .turn-label{display:none}
 .scene-tools .relic-bag-button{position:static;margin:0;min-height:36px;padding:4px 6px}
 .battle-hud .enemy-hud{top:64px;right:8px}
}
.quest-actions{display:flex;flex-direction:column;align-items:stretch;gap:5px}.quest-actions .mission-swap{font-size:10px;min-height:32px;padding:4px 7px}.quest-actions .mission-swap:disabled{opacity:.5}
.gear-copy-card{display:flex;flex-direction:column;min-width:0;border:1px solid #d8cdb5;border-radius:12px;overflow:hidden;background:#fffaf0}.gear-choices .gear-copy-card>button{border:0;border-radius:0;flex:1;width:100%;min-width:0}.gear-choices .gear-copy-card>.gear-enhance-link{display:flex;align-items:center;justify-content:center;gap:5px;min-height:42px;background:#eee3ca;font-size:11px;font-weight:800;padding:7px}.gear-enhance-link svg{width:16px;height:16px}.enhance-heading{text-align:center}.enhance-heading>.gear-art{margin:auto}.enhance-heading>small{display:block;font-size:9px;letter-spacing:2px;color:#97815a;margin:10px 0}.enhance-heading h2{font-size:21px}.enhance-heading h2 b{color:#a47a23}.enhance-next{display:grid;gap:8px;text-align:center;background:linear-gradient(120deg,#e9efd8,#fff5d6);border:1px solid #cfc491;border-radius:12px;padding:18px;margin:18px 0}.enhance-next small{font-size:12px;color:#6f8266}.enhance-next strong{font-size:16px}.enhance-next b{font-size:24px;color:#4e7a65}.enhance-cost{display:flex;justify-content:space-between;gap:10px;font-size:12px}.enhancement-dialog>.primary{width:100%;font-size:12px;margin:15px 0 6px}.enhance-rates{font-size:12px;border:1px solid #dbd0b9;border-radius:10px;padding:12px;margin:16px 0}.enhance-rates summary{cursor:pointer;min-height:28px;font-weight:800}.enhance-rates table{width:100%;text-align:center;border-collapse:collapse;margin-top:8px}.enhance-rates th,.enhance-rates td{padding:8px;border-bottom:1px solid #e7decb}.enhance-history h3{font-size:14px;margin:16px 0 8px}.enhance-history p{display:flex;flex-direction:column;gap:3px;background:#f0ecdf;border-radius:8px;padding:9px 12px}.enhance-history p.success{background:#e8f1e2;color:#4b7751}.enhance-history small{font-size:11px;color:#879087}
/* Daily challenge stays inside the existing game panel, including its ranking. */
.camp-launch-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.daily-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 26px;border-radius:22px;background:linear-gradient(90deg,#132941e8,#1d394880),var(--daily-bg) center/cover;color:#fff;overflow:hidden}
.daily-hero-copy h2{font-size:32px;margin:7px 0}.daily-hero-copy p{color:#e4eff4}.daily-hero-copy>small{font-size:10px;letter-spacing:2px;color:#f6d899}
.daily-clock{display:inline-flex;align-items:center;gap:6px;background:#102737c9;padding:7px 10px;border-radius:12px;font-size:12px}.daily-clock b{font-variant-numeric:tabular-nums}
.daily-party{display:flex;flex-shrink:0}.daily-party>div{text-align:center;display:grid;justify-items:center}.daily-party img{width:105px;height:115px;object-fit:contain;filter:drop-shadow(0 4px 6px #12293a55)}.daily-party b{font-size:14px}.daily-party small{font-size:11px;color:#f6d899}
.daily-route{display:flex;gap:8px;margin:15px 0}.daily-route>span{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;background:#fff7e5;padding:12px;border-radius:13px;color:#70552f;border:1px solid #e5d8b9}
.daily-prizes{display:grid;grid-template-columns:1fr 1fr;gap:12px}.daily-prizes>div{display:flex;gap:12px;align-items:center;padding:15px 18px;border:1px solid #e2d6bf;background:#fffdf4;border-radius:16px}.daily-prizes>.received{background:#f0f7ea;border-color:#c2d9b1}.daily-prizes .game-icon{width:32px;height:32px;color:#c6993a}.daily-prizes small,.daily-prizes b{display:block}.daily-prizes small{margin-top:4px;color:#73796d;font-size:12px}
.daily-launch{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:16px 0;padding:16px;background:#edf3ed;border-radius:16px}.daily-launch p{font-size:12px;margin:6px 0 0;color:#667b6b}.daily-rules{font-size:12px;color:#637266;line-height:1.7}.daily-rules summary{cursor:pointer;font-weight:bold;color:#435c4d;padding:10px 0}.daily-board{margin-top:18px;border-top:1px solid #dbdfd4;padding-top:14px}.daily-board-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.daily-board-heading h3{margin:0 auto 0 0;display:flex;align-items:center;gap:8px}.daily-board-heading label{display:flex;align-items:center;gap:6px;font-size:12px}.daily-board-heading input{font:inherit;background:#fff;border:1px solid #cdd8c6;border-radius:8px;padding:8px;max-width:150px}
.daily-ranking-list{list-style:none;padding:0;margin:12px 0}.daily-ranking-list li{display:flex;gap:14px;align-items:center;padding:12px;border-bottom:1px solid #dde3d5}.daily-rank{width:30px;height:30px;display:grid;place-content:center;background:#f0dfab;border-radius:50%;color:#765219}.daily-ranking-list li>div{flex:1;min-width:0}.daily-ranking-list strong{overflow-wrap:anywhere}.daily-ranking-list small{display:block;font-size:11px;color:#72816e;margin-top:5px}.daily-ranking-list .game-icon{color:#b98b22}.daily-empty{text-align:center;padding:24px;color:#899682}.daily-empty>.game-icon{width:38px;height:38px}.daily-goals-entry{display:flex;width:100%;gap:10px;align-items:center;padding:12px 16px;margin-bottom:15px;border:1px solid #d4c79d;border-radius:14px;background:linear-gradient(120deg,#fff1c6,#edf7ec);color:#535e42}.daily-goals-entry>span{display:grid;text-align:left;gap:3px}.daily-goals-entry small{font-size:11px}.daily-goals-entry>strong{margin-left:auto;white-space:nowrap;font-size:12px}.daily-inbattle-clock{background:#ffffffdd;padding:7px;border-radius:8px;font-size:11px;color:#486049}
@media(max-width:760px){.daily-hero{padding:16px 14px;gap:6px;flex-direction:column;align-items:stretch}.daily-hero-copy h2{font-size:26px}.daily-party{justify-content:center}.daily-party img{width:83px;height:88px}.daily-prizes{gap:7px}.daily-prizes>div{padding:12px 9px;gap:6px}.daily-prizes b{font-size:12px}.daily-prizes small{font-size:10px}.daily-prizes .game-icon{width:23px;height:23px;flex-shrink:0}.daily-launch{flex-direction:column;align-items:stretch}.daily-route>span{font-size:11px;padding:9px 4px;gap:4px}.daily-route .game-icon{width:17px;height:17px}.camp-launch-actions{gap:5px}.camp-launch-actions .secondary-button{font-size:11px;min-height:34px;padding:5px 8px}.daily-goals-entry>strong{font-size:10px}.daily-goals-entry small{font-size:10px}.daily-inbattle-clock{font-size:9px;padding:4px}}
.overlay-head .daily-header-start{margin-left:auto;margin-right:8px;width:auto;height:auto;padding:8px 12px;font-size:12px;background:#f5d983;color:#514227;border-radius:10px;white-space:nowrap}
/* Illustrated, optional companion stories stay within the game dialog. */
.training-row strong{display:block;font-size:12px;color:#657442;margin:4px 0}.story-entry{display:flex;align-items:center;gap:10px;width:100%;border:1px solid #e0cf9f;border-radius:14px;background:#fff7de;padding:12px;text-align:left;margin:12px 0}.story-entry svg{width:25px;height:25px;color:#aa8033;flex-shrink:0}.story-entry span{flex:1}.story-entry small{display:block;font-size:11px;color:#766c53;margin-top:4px}.story-entry strong{color:#aa8033}.story-library{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;margin-top:18px}.story-book{display:flex;align-items:flex-end;min-height:164px;position:relative;overflow:hidden;border:2px solid var(--tier-color);border-radius:18px;background:linear-gradient(0deg,#fff9e9 4%,#fff9e9bb 57%,#ffffff11),var(--story-bg) center/cover;text-align:left;padding:14px;isolation:isolate;box-shadow:0 5px 12px #514a2312}.story-book img{position:absolute;right:-12px;top:0;width:135px;height:135px;object-fit:contain;z-index:-1}.story-book-copy{display:flex;flex-direction:column;gap:6px;max-width:92%;text-shadow:0 1px 3px #fff}.story-book-copy small{font-size:11px;color:#60513a}.story-book-copy b{font-size:16px}.story-book-copy>span{font-size:11px;color:#7d6541}.story-book.locked{filter:saturate(.35);opacity:.65}.companion-story{max-width:650px;margin:auto}.story-picture{display:flex;align-items:flex-end;min-height:200px;padding:20px;border-radius:18px;background:linear-gradient(0deg,#2d393be6,transparent 90%),var(--story-bg) center/cover;color:white;position:relative;overflow:hidden;isolation:isolate}.story-picture img{width:200px;height:200px;position:absolute;right:6px;top:0;object-fit:contain;z-index:-1}.story-picture>div{max-width:80%;text-shadow:0 2px 5px #203626}.story-picture small{font-size:11px}.story-picture h2{font-size:25px;margin:10px 0}.story-picture span{font-size:11px;padding:4px 9px;background:#13271c66;border-radius:20px}.story-paper{padding:20px 8px 4px}.story-narrative{font-size:16px;line-height:1.9;word-break:keep-all;margin:0 0 20px;color:#50442f}.story-choices{display:grid;gap:9px}.story-paper .text-button{display:block;margin-top:10px}.story-record-note{color:#6e7851;font-size:12px}.story-paper .primary{white-space:normal;line-height:1.5;min-height:44px}.codex-tabs{flex-wrap:wrap}
@media(max-width:600px){.story-library{grid-template-columns:1fr 1fr;gap:10px}.story-book{min-height:165px;padding:11px}.story-book img{width:115px;height:115px}.story-book-copy b{font-size:14px}.story-picture{min-height:156px;padding:15px}.story-picture img{width:160px;height:160px}.story-picture h2{font-size:21px}.story-narrative{font-size:14px;line-height:1.85}.story-paper{padding:18px 0 4px}.detail-actions .primary{white-space:normal;line-height:1.5}}
.party-swap-confirm h2{text-align:center}.swap-portraits{display:flex;align-items:center;justify-content:center;gap:16px;background:linear-gradient(135deg,#f6e6bc,#e2efd5);border-radius:18px}.swap-portraits img{width:110px;height:120px;object-fit:contain}.swap-portraits strong{font-size:26px;color:#978453}.swap-gear-list{margin:18px 0;border:1px solid #e2d8c0;border-radius:12px;overflow:hidden}.swap-gear-list>div{display:flex;justify-content:space-between;gap:12px;padding:12px;font-size:12px}.swap-gear-list>div+div{border-top:1px solid #e2d8c0}.swap-gear-list span{flex-shrink:0;color:#867b67}.swap-gear-list b{text-align:right}.party-swap-confirm>.primary,.party-swap-confirm>.secondary-button{width:100%;white-space:normal;min-height:44px;line-height:1.5;margin-top:10px}
