/* Portrait game layout. Viewport width never switches the game to a desktop UI. */
body.game-shell{margin:0;background:#e9e7ef;-webkit-text-size-adjust:100%;text-size-adjust:100%}
#app.phone{width:min(100%,430px);max-width:430px;min-width:0;margin-inline:auto;container-type:inline-size;font-size:14px}
#app .play-screen{font-size:14px}
#app :is(button,input,select,textarea){font-family:Chronicle,system-ui,sans-serif;touch-action:manipulation}
#app button{word-break:keep-all}
#app .battle-aside{display:none!important}
#app .player-hud{height:96px;min-height:96px;display:grid;grid-template-columns:42px minmax(0,1fr);grid-template-rows:42px 32px;gap:6px 10px;padding:8px 12px;background:linear-gradient(110deg,#fffdf8,#f5f2fc);border-bottom:1px solid #d6d0e6}
#app .player-avatar{width:42px;height:42px;border-radius:9px}
#app .player-avatar .character-art{height:61px}
#app .player-info{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1px 8px;align-items:center;min-width:0;max-width:none;width:100%;padding:0}
#app .player-info>b{font-size:15px;line-height:1.3;font-weight:700;color:#30334e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#app .player-info>span{grid-column:1;line-height:1.2}
#app .player-info>span>b{font:500 12px/1.3 Chronicle;color:#655c78}
#app .player-info>em{grid-column:2;grid-row:1/3;display:flex;align-items:center;gap:4px;padding:0;margin:0;min-width:0;background:none;clip-path:none;font:700 13px/1.3 Chronicle;color:#8b693e}
#app .player-info>em .ico{width:15px;height:15px}
#app .player-hud .world-wallet{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;flex:none;width:100%;max-width:none;margin:0}
#app .player-hud .world-wallet>button{display:grid;grid-template-columns:16px auto minmax(0,1fr);grid-template-rows:1fr;align-items:center;gap:3px;height:32px;min-height:32px;padding:4px 6px;border:1px solid #e2dbed;border-radius:7px;background:#fffdfacc;overflow:hidden;color:#3e3e5c;clip-path:none}
#app .player-hud .world-wallet>button>span{grid-row:auto;width:16px;height:16px}
#app .player-hud .world-wallet>button>span>.ico{width:16px;height:16px}
#app .player-hud .world-wallet small{font:500 11px/1.2 Chronicle;color:#635a75;white-space:nowrap}
#app .player-hud .world-wallet .wallet-full{display:none}
#app .player-hud .world-wallet .wallet-short{display:block;font:700 12px/1.3 Chronicle!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}
#app .player-hud .world-wallet button:after{display:none}
#app .bottom-drawer.growth-popup{top:96px;bottom:calc(70px + var(--safe-bottom));width:100%;max-width:430px}
#app .drawer-backdrop{inset:96px 0 calc(70px + var(--safe-bottom))}
#app .bottom-drawer.growth-popup>header{height:50px;min-height:50px;padding:0 16px 0 58px;background:#fffdf9}
#app .bottom-drawer.growth-popup>header h2{font:700 20px/1.3 Chronicle;color:#34364f;letter-spacing:-.5px}
#app .bottom-drawer.growth-popup>header small{font:500 9px/1.3 Chronicle;letter-spacing:1.2px;color:#71637f}
#app .bottom-drawer.growth-popup>header>.icon-button{width:32px;height:32px;min-height:32px;left:14px;top:9px}
#app .growth-popup .drawer-scroll{padding:16px 14px 26px;scrollbar-gutter:auto}
#app .button{font:700 14px/1.45 Chronicle;min-height:44px;padding:10px 12px;border-radius:8px;color:#50465e}
#app .button.gold{color:#fff;background:linear-gradient(#8270b1,#655690);border:1px solid #66518d;box-shadow:inset 0 1px #ffffff3b,0 2px 0 #4e4271}
#app .button.blue{background:#edeaf7;color:#514473}
#app input:not([type=range]),#app select{font-size:14px;line-height:1.4}
#app input[data-batch-input]{font:700 26px/1.3 Chronicle}
#app .world-nav{height:calc(70px + var(--safe-bottom));min-height:calc(70px + var(--safe-bottom));padding:0 4px var(--safe-bottom);background:linear-gradient(#fffefc,#f5f2fa);border-top:1px solid #d5cbe4}
#app .world-nav button{gap:5px;padding:9px 1px 7px;color:#45445f}
#app .world-nav .nav-glyph,#app .world-nav .nav-glyph .ico{width:24px;height:24px}
#app .world-nav button>span{font:700 11px/1.4 Chronicle;letter-spacing:-.25px}
#app .world-nav button.active{color:#74609c;background:linear-gradient(#eee7f8a6,#f9f7fc00)}

/* Compact, full-width character cards: illustration and real game information. */
#app .squad-roster{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
#app .squad-roster-card{height:300px;min-height:300px;display:block;align-items:stretch;gap:0;padding:0;isolation:isolate;border:2px solid #c6b5dc;border-radius:11px;background:radial-gradient(ellipse at 50% 35%,#fffef9 10%,#eee7f8 75%);box-shadow:inset 0 0 0 2px #fffaf0,0 3px 0 #d8cce4}
#app .squad-roster-card:before{content:'';position:absolute;inset:5px;border:1px solid #d0b98780;border-radius:6px;z-index:3;pointer-events:none}
#app .squad-roster-card.deployed{border-color:#aa8cc8;box-shadow:inset 0 0 0 2px #fff7e9,0 3px 0 #c7b1db}
#app .squad-roster-card .squad-avatar{position:absolute;inset:8px 0 58px;display:block;width:100%;height:auto;min-height:0;margin:0;padding:0;background:none;border:0;border-radius:0;overflow:hidden;z-index:0}
#app .squad-roster-card .squad-avatar>.character-art{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:contain;object-position:50% 15%;transform:none;filter:none}
#app .roster-card-number{display:none}
#app .roster-element{position:absolute;top:9px;left:9px;z-index:4;pointer-events:none}
#app .roster-element .element-badge{display:inline-flex;align-items:center;gap:4px;font:700 11px/1.3 Chronicle;color:var(--element-color);background:#fffdf2e8;border:1px solid #d6c8e3;padding:4px 6px;border-radius:6px;text-shadow:none}
#app .roster-element .element-badge i{font:700 12px/1 Chronicle}
#app .squad-roster-copy{position:absolute;inset:auto 0 51px;flex:none;display:block;width:100%;max-width:none;min-width:0;min-height:111px;padding:26px 11px 9px;margin:0;background:linear-gradient(#faf6ff00,#faf7f6f5 27%,#faf7f8);border:0;z-index:2;text-align:left}
#app .squad-roster-copy .roster-job{font:500 11px/1.35 Chronicle;color:#6c597e;white-space:normal;overflow-wrap:anywhere}
#app .squad-roster-copy h4{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:flex-start;gap:2px 6px;white-space:normal;overflow-wrap:anywhere;font:700 20px/1.3 Chronicle;color:#3d3356;margin:3px 0}
#app .squad-roster-copy h4>small{font:700 12px/1.4 Chronicle;color:#675375;margin:0;white-space:nowrap}
#app .squad-roster-copy p{font:500 12px/1.4 Chronicle;color:#6d607d;margin:0 0 4px}
#app .squad-roster-copy>span{display:inline-block;font:700 11px/1.3 Chronicle;color:#486c5a;background:#e4f1df;padding:3px 6px;border-radius:4px}
#app .squad-roster-action{position:absolute;inset:auto 0 0;display:flex;align-items:center;justify-content:center;min-height:51px;width:100%;padding:6px 10px 9px;background:#faf7f8;border-top:1px solid #e1d6eb;z-index:4}
#app .squad-small-button{display:flex;align-items:center;justify-content:center;width:100%;min-height:36px;padding:7px 8px;border:1px solid #ac96c2;border-radius:6px;background:linear-gradient(#f9f5ff,#e9dff4);box-shadow:0 2px 0 #cbbada;font:700 13px/1.3 Chronicle;color:#5f4679;white-space:normal}
#app .squad-small-button.primary{background:linear-gradient(#947cb5,#755795);border-color:#6e508f;box-shadow:0 2px 0 #5c4277;color:#fff}
#app .squad-small-button.quiet{background:#faf7ee;border-color:#d9c8a3;color:#816438}
#app .squad-fixed{display:block;width:100%;min-height:36px;padding:7px 8px;margin:0;background:#f9edd4;border:1px solid #e5d5ad;border-radius:6px;font:700 13px/1.5 Chronicle;color:#856b37}
#app .squad-tabs button{font:700 14px/1.4 Chronicle;min-height:44px;padding:10px 14px}
#app .squad-heading h3{font:700 22px/1.4 Chronicle;color:#4f3d68}
#app .squad-heading p{font-size:13px;color:#6b5d7d}
#app .squad-heading small{font-size:11px;color:#776887}
#app .squad-section-title{align-items:baseline;gap:8px;flex-wrap:wrap}
#app .squad-section-title h3{font:700 17px/1.4 Chronicle;color:#59446d}
#app .squad-section-title small,#app .squad-section-title>span{font-size:12px;color:#70607d}
#app .squad-line{gap:7px}
#app .squad-current{padding:14px 10px;background:#fffaf4}
#app .squad-member>button{height:145px;padding:0}
#app .squad-member .character-art{position:absolute;inset:0 0 auto;width:100%;height:110px;object-fit:contain}
#app .squad-member b{position:absolute;left:0;right:0;bottom:20px;font:700 14px/1.3 Chronicle;color:#4c3e60;background:#fffaf0df}
#app .squad-member small{position:absolute;left:0;right:0;bottom:5px;font:500 11px/1.2 Chronicle;color:#675474}
#app .squad-member>em,#app .squad-position{font:700 11px/1.4 Chronicle}
#app .squad-current-footer{display:flex;flex-wrap:wrap;gap:5px;font-size:12px}
#app .squad-current-footer small{font-size:11px}
#app .squad-tools{padding:14px 0;gap:12px}
#app .squad-tools .button{font-size:13px;min-height:44px}
#app .squad-text-button{font-size:13px;min-height:40px}
#app .squad-collection-link,#app .squad-growth-link{font-size:13px;min-height:48px;padding:12px}

/* Readable mobile menu hierarchy; decoration never sets the size of game text. */
#app .growth-heroes button{min-height:86px;max-height:86px}
#app .growth-heroes b{font:700 12px/1.3 Chronicle;padding-left:4px;color:#5e4f73}
#app .growth-heroes small{font:500 11px/1.3 Chronicle;padding-right:3px;color:#766485}
#app .growth-heroes button>.character-art{height:61px;transform:none}
#app .growth-tabs button{font:700 14px/1.4 Chronicle;min-height:44px;padding:9px 4px}
#app .growth-extras{gap:13px;justify-content:space-between;flex-wrap:wrap}
#app .growth-extras button{font:500 12px/1.4 Chronicle;min-height:36px}
#app .level-panel .button,#app .two-actions>.button{font-size:14px;min-height:44px}
#app .power-ribbon span,#app .level-panel>div :is(b,span){font-size:12px}
#app .level-panel>div{flex-wrap:wrap}
#app .level-panel p,#app .progression-hint{font-size:12px;line-height:1.6}
#app .stat-chips>span{font-size:12px}
#app .stat-chips b{font:700 19px/1.4 Chronicle}
#app .hero-nameplate h3{font-weight:700}
#app .hero-nameplate>small,#app .character-profile .hero-attribute,#app .appearance-btn{font-size:12px}
#app .character-profile .hero-attribute{max-width:calc(100% - 24px)}
#app .dossier-data{padding:18px 16px}
#app .skill-owner :is(small,span),#app .stats-profile :is(small,span){font-size:12px}
#app .skill-tree{gap:6px}
#app .skill-node b{font:700 12px/1.4 Chronicle!important;white-space:normal}
#app .skill-node small{font-size:11px!important}
#app .growth-skill .rpg-skill-description{font:400 13px/1.7 Chronicle}
#app .skill-values{font-size:12px;flex-wrap:wrap}
#app .skill-values b{font-size:13px}
#app .skill-upgrade-row{gap:10px;flex-wrap:wrap}
#app .skill-upgrade-row .button{font-size:14px;min-height:44px;flex:1}
#app .quantity-tabs button{font-size:13px;min-height:40px}
#app .bonus-row p{font-size:12px;line-height:1.5;max-width:none}
#app .bonus-buy .button{font-size:13px;min-height:44px}
#app .paper-slot>small{font-size:11px}
#app .paper-stats small,#app .paperdoll-card>p{font-size:12px}
#app .enhancement-stones{gap:5px}
#app .enhancement-stones>div{display:flex;flex-direction:column;align-items:center;text-align:center;gap:2px;padding:8px 4px}
#app .enhancement-stones span{font-size:11px;line-height:1.4}
#app .enhancement-stones b{font-size:14px}
#app .gear-filters button{font-size:12px;min-height:36px;padding:8px 10px}
#app .gear-tile{min-height:164px;padding:8px 5px}
#app .gear-tile>strong{font:700 12px/1.4 Chronicle;overflow-wrap:anywhere}
#app .gear-tile>span:last-child{font-size:11px;line-height:1.4}
#app .gear-tile .enhance-badge{font-size:11px}
#app .gear-tile>small{font-size:11px}
#app .currency-tabs button{font:700 14px/1.4 Chronicle;min-height:44px}
#app .shop-categories{gap:12px;overflow-x:auto;white-space:nowrap}
#app .shop-categories button{font-size:13px;min-height:44px;flex-shrink:0}
#app .rpg-shop-grid{gap:10px}
#app .product-card h4{font:700 16px/1.4 Chronicle}
#app .product-card>small,#app .product-price i{font-size:12px}
#app .product-price{flex-wrap:wrap;gap:5px;padding:10px}
#app .product-price b{font:700 16px/1.4 Chronicle}
#app .product-price .button{font-size:13px;min-height:40px}
#app .shop-policy,#app .recruit-bottom p{font-size:12px;line-height:1.6}
#app .recruit-actions{gap:8px}
#app .recruit-actions .button{font-size:13px;min-height:44px;padding:9px 8px;gap:5px}
#app .recruit-bottom small{font-size:13px}
#app .recruit-title>small{font-size:9px}
#app .recruit-title p,#app .recruit-title>span{font-size:12px}
#app .recruit-details :is(summary,p),#app .drop-rates{font-size:12px;line-height:1.6}
#app .section-caption{gap:8px;flex-wrap:wrap}
#app .section-caption b{font-size:18px;font-weight:700}
#app .section-caption span{font-size:12px}
#app .world-atlas-title p{font-size:12px}
#app .world-pins span{font:700 11px/1.4 Chronicle;padding:4px 3px;max-width:58px;white-space:normal;text-align:center}
#app .world-pins button{min-height:56px}
#app .world-tools{gap:6px;flex-wrap:wrap}
#app .world-tools>.button{font-size:12px;min-height:44px;padding:8px 6px}
#app .region-chapter summary :is(small,em){font-size:11px}
#app .region-chapter summary b{font-size:18px;font-weight:700}
#app .world-list button>span{font-size:14px}
#app .world-list small,#app .world-list em{font-size:12px}
#app .daily-intro p,#app .daily-copy p{font-size:13px;line-height:1.6}
#app .daily-copy :is(label,select){font-size:13px}
#app .daily-copy .button{font-size:14px}
#app .daily-reward small{font-size:12px}
#app .daily-reward b{font-size:14px}
#app .quest-list h3{font-size:16px;font-weight:700}
#app .quest-list p,#app .quest-list small{font-size:12px}
#app .settings-list>div,#app .settings-list b{font-size:13px}
#app .setting-actions .button{font-size:13px}
#app .panel-note,#app .service-notice p{font-size:13px;line-height:1.7}
#app .chest-card h3{font-size:15px;font-weight:700}
#app .chest-card .button{font-size:13px}
#app .chest-card :is(small,p){font-size:12px}
#app .rpg-dialog{max-width:100%;max-height:100%;overflow:auto}
#app .rpg-dialog header{padding:18px}
#app .rpg-dialog header h3{font-size:20px;font-weight:700}
#app .rpg-dialog :is(small,p,label){font-size:12px;line-height:1.6}
#app .market-product h3{font:700 19px/1.4 Chronicle}
#app .market-product p,#app .batch-limit,#app .batch-unit{font-size:12px;line-height:1.6}
#app .market-order{padding:18px 16px}
#app .market-order .button{font-size:14px}
#app .loot-card p,#app .loot-summary{font-size:13px}
.chronicle-confirm{box-sizing:border-box;width:min(calc(100% - 32px),398px);max-height:calc(100dvh - 32px);padding:24px;border:2px solid #bda7d0;border-radius:12px;background:linear-gradient(#fbf6ff,#fffaf4);color:#50425f;overflow:auto}
.chronicle-confirm h2{font:700 21px/1.5 Chronicle;color:#4d3b65;letter-spacing:-.4px}
.chronicle-confirm small{font:500 9px/1.4 Chronicle}
.chronicle-confirm p{font:400 14px/1.8 Chronicle;color:#62536f}
.chronicle-confirm .button{font:700 14px/1.4 Chronicle;min-height:44px;min-width:0;padding:10px 8px;border-radius:7px}

/* Full-screen art remains in the original mobile frame. */
#app .lobby-topline{left:18px;right:18px;top:20px}
#app .lobby-wordmark{font-size:11px}
#app .lobby-greeting{left:22px;top:90px}
#app .lobby-greeting>small{font-size:9px;letter-spacing:1px}
#app .lobby-greeting h3{font:700 27px/1.35 Chronicle;margin:10px 0;letter-spacing:-1px}
#app .lobby-greeting p{font-size:12px;max-width:260px}
#app .lobby-shortcuts{top:245px;left:8px;gap:12px}
#app .lobby-shortcuts button{width:60px;padding:4px 2px;gap:5px;min-height:58px}
#app .lobby-shortcuts span{font:700 11px/1.35 Chronicle;color:#4f465f}
#app .lobby-destinations{top:auto;bottom:34px;width:51%;right:4%;gap:8px}
#app .lobby-adventure{min-height:105px;padding:13px 12px;gap:4px}
#app .lobby-adventure>small,#app .lobby-world small,#app .lobby-event small{display:none}
#app .lobby-adventure>strong{font:700 22px/1.4 Chronicle;white-space:nowrap}
#app .lobby-adventure>span,#app .lobby-adventure>em{font-size:12px;line-height:1.4}
#app .lobby-adventure>em{padding-top:5px;margin-top:1px}
#app .lobby-world{min-height:54px;padding:11px 12px;gap:8px}
#app .lobby-world b{font:700 16px/1.4 Chronicle;margin:0}
#app .lobby-event{min-height:85px;padding:12px}
#app .lobby-event>span{width:84%;gap:5px}
#app .lobby-event b{font:700 14px/1.4 Chronicle}
#app .lobby-event em{font:500 11px/1.4 Chronicle;color:#fff5fb;word-break:keep-all;white-space:normal}
#app .lobby-stage-info{font-size:11px;color:#5c4e72}
#app .lobby-stage-info b{font-size:13px}
#app .lobby-speech{display:none}
#app .lobby-caption{left:18px;bottom:9px;font-size:9px;letter-spacing:0}
#app .lobby-character-tag{left:20%;bottom:17%;display:flex;flex-direction:column;align-items:flex-start;gap:3px;width:max-content;max-width:156px;min-height:0;height:auto;padding:8px 10px;line-height:1.4}
#app .lobby-character-tag small{display:block;max-width:134px;font-size:11px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#app .lobby-character-tag b{display:block;font:700 17px/1.4 Chronicle}
#app .lobby-characters{inset:165px 15% 15px -22%}
#app .play-tools{top:108px;right:10px}
#app .play-tools .button{height:36px;min-height:36px;width:32px;font-size:12px}
#app .play-screen .smooth-arena .stage-hud{top:108px;left:10px;right:52px;width:auto;padding:9px}
#app .smooth-arena .stage-hud>small{font:500 11px/1.3 Chronicle;letter-spacing:.4px}
#app .smooth-arena .stage-hud>span{font:700 15px/1.4 Chronicle}
#app .smooth-arena #wave-hud{font-size:12px}
#app .control-deck{bottom:calc(70px + var(--safe-bottom));padding:6px 8px 8px}
#app .control-deck .quest-ribbon{min-height:40px;padding:6px 8px}
#app .quest-ribbon b{font:500 12px/1.4 Chronicle}
#app .quest-ribbon small,#app .quest-ribbon em{font:400 11px/1.3 Chronicle}
#app .formation-dock{height:68px}
#app .core-skill{height:68px}
#app .core-skill .skill-label b{font:700 11px/1.3 Chronicle}
#app .core-skill .skill-label small{font:500 11px/1.3 Chronicle}
#app .skill-book>small{font-size:11px}
#app .formation-dock .leader-card b,#app .formation-dock .companion-slot b{font-size:11px}
#app .auth-box :is(label,p),#app .auth-tabs .button{font-size:14px}
#app .auth-box input{font-size:16px}
#app .auth-box .auth-note{font-size:12px}
#app .character-select span{font-size:12px}
#app .character-select small{font-size:11px}
#app .hero-description p{font-size:14px}
#app .realm-card b{font-size:17px}
#app .realm-card :is(small,em){font-size:12px}
@container(max-width:360px){
 #app .player-hud{padding-inline:8px}
 #app .player-hud .world-wallet>button{padding-inline:4px;gap:2px}
 #app .player-hud .world-wallet small{font-size:11px}
 #app .squad-roster{gap:9px}
 #app .squad-roster-card{height:284px;min-height:284px}
 #app .squad-roster-copy{padding-inline:9px}
 #app .squad-roster-copy h4{font-size:18px}
 #app .growth-popup .drawer-scroll{padding-inline:12px}
 #app .growth-heroes small{display:none}
 #app .growth-heroes b{font-size:12px}
 #app .growth-extras{gap:8px}
 #app .lobby-greeting{left:18px}
 #app .lobby-greeting h3{font-size:25px}
 #app .lobby-destinations{width:53%;right:3%}
 #app .lobby-adventure>strong{font-size:20px}
 #app .lobby-event b{font-size:13px}
 #app .recruit-actions .button{font-size:12px;gap:4px}
 #app .world-pins span{font-size:11px;max-width:48px}
}
@media(max-height:700px){
 #app .lobby-topline{top:13px}
 #app .lobby-topline>div{gap:6px}
 #app .lobby-greeting{top:65px}
 #app .lobby-greeting>small,#app .lobby-greeting p{display:none}
 #app .lobby-greeting h3{font-size:23px;margin:5px 0}
 #app .lobby-shortcuts{top:135px;gap:5px}
 #app .lobby-shortcuts button{min-height:48px}
 #app .lobby-shortcuts .ico{width:20px;height:20px;padding:4px}
 #app .lobby-shortcuts span{font-size:11px}
 #app .lobby-destinations{bottom:24px;gap:6px}
 #app .lobby-adventure{min-height:86px;padding:9px 10px}
 #app .lobby-adventure>strong{font-size:20px}
 #app .lobby-adventure>span,#app .lobby-adventure>em{font-size:11px}
 #app .lobby-world{min-height:46px;padding:9px 10px}
 #app .lobby-world b{font-size:15px}
 #app .lobby-event{min-height:69px;padding:9px 10px}
 #app .lobby-event b{font-size:12px}
 #app .lobby-event em{font-size:11px}
 #app .lobby-stage-info{display:none}
 #app .lobby-characters{inset:105px 10% 8px -20%}
 #app .lobby-caption{font-size:9px;bottom:5px}
 #app .lobby-character-tag{left:20%;bottom:6px}
 #app .lobby-character-tag small{font-size:11px}
 #app .control-deck .quest-ribbon.completed{display:none}
}
