/* Primary tabs are deliberately composed as one screen. No root book/pager. */
.single-tab-main{display:flex!important;flex-direction:column;overflow:hidden!important;min-height:0;padding:12px 14px!important}
.tab-screen{display:flex;flex-direction:column;gap:8px;flex:1;min-height:0;overflow:visible}
.tab-screen>*{flex-shrink:0;margin-top:0;margin-bottom:0}.tab-screen .tab-title,.tab-screen .camp-title,.tab-screen .trial-heading,.tab-screen .mall-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:42px;margin:0}
.tab-title h1,.tab-screen .camp-title h1,.tab-screen .trial-heading h1{font-size:23px;line-height:1.3;margin:3px 0 0;color:#614b61}.tab-title h1 small{font-size:11px;color:#9e8068;margin-left:4px}.tab-title>.button{font-size:10px;min-height:32px;padding:5px 9px;white-space:nowrap}.tab-caption{font-size:10px;line-height:1.5;color:#92755f;margin:0}.tab-primary-actions{display:flex;flex-direction:column;gap:8px;padding:3px 1px 5px;flex:0 0 auto}.tab-primary-actions>.button{width:100%;min-height:42px;margin:0;padding:8px 10px;font-size:12px}.tab-screen .progress-guide{font-size:10px;padding:6px 9px;line-height:1.45;margin:0}.tab-screen .progress-guide span{display:block;font-size:9px}.tab-empty{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;color:#98785f;text-align:center}.tab-empty>.world-art{width:100%;height:clamp(170px,30dvh,260px);border:2px solid #92767f;border-radius:7px 11px}.tab-empty>b{font-size:15px;color:#795875}.tab-empty>p{font-size:11px;margin:0}
/* Lobby: the scene and every main entrance coexist on the first view. */
.lobby-screen .camp-board{display:flex;flex-direction:column;flex:1;min-height:180px;margin:0;overflow:hidden}.lobby-screen .camp-map{flex:1;height:auto;min-height:112px;max-height:none}.lobby-screen .camp-map>.world-art{height:100%;width:100%;object-fit:cover}.lobby-screen .camp-party{height:96%;bottom:2px}.lobby-screen .camp-party .adventurer{height:100%;max-height:150px}.lobby-screen .expedition-cta{display:flex;align-items:center;justify-content:space-between;gap:9px;flex:0 0 auto;padding:9px 12px}.lobby-screen .expedition-cta>div{min-width:0;flex:1}.lobby-screen .expedition-cta h2{font-size:18px;line-height:1.3;margin:3px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lobby-screen .expedition-cta p{font-size:10px;line-height:1.5;margin:0}.lobby-screen .camp-end-run{font-size:9px;white-space:nowrap;padding:5px 0;margin:0;color:#a27268}.school-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.school-summary>button{display:flex;align-items:center;justify-content:center;gap:5px;min-height:51px;padding:6px 3px;background:#f5e6c6;border:1.5px solid #aa8c79;border-radius:5px 8px;box-shadow:0 2px #c0a689;text-align:left;color:#94775e}.school-summary>button>span{font-size:8px;line-height:1.5;min-width:0}.school-summary b{display:block;font-size:11px;line-height:1.5;color:#73556f;white-space:nowrap}.home-next{display:flex;justify-content:space-between;align-items:center;gap:10px;background:#f9e9c4;border:1.5px solid #b49a78;border-radius:5px 8px;padding:8px 10px}.home-next>div{min-width:0}.home-next b{display:block;font-size:12px;color:#76546f}.home-next small{display:block;font-size:9px;color:#a18463;margin-top:4px}.home-next>.button{font-size:11px;padding:6px 9px;min-height:34px;white-space:nowrap}
/* Student archive: one four-card spread, no six separate empty categories. */
.roster-records{flex:1;min-height:0}.roster-screen .character-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 9px}.roster-screen .character-grid.screen-list-book{display:flex;flex-direction:column;gap:6px}.roster-screen .character-art{height:clamp(94px,15dvh,135px)}.roster-screen .character-art>.adventurer{height:95%;max-height:128px;width:auto}.roster-screen .character-copy{padding:8px 9px}.roster-screen .character-copy h3{font-size:13px;line-height:1.35;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.roster-screen .character-copy h3 small{display:block;font-size:9px;margin:3px 0 0}.roster-screen .character-copy>p{font-size:9px;margin:4px 0}.roster-screen .card-language{font-size:8px;padding-top:4px}.roster-screen .card-grade{font-size:18px;width:28px;height:28px}.roster-screen .card-origin{font-size:7px}.roster-screen .card-element .campus-prop{width:22px;height:22px}
/* Formation and the selectable learners are visible together. */
.team-screen .formation{padding:9px 10px;margin:0;display:flex;flex-direction:column;gap:7px}.team-screen .simple-team-grid{gap:5px}.team-screen .simple-member{min-height:83px;padding:4px 1px;gap:2px}.team-screen .simple-member .adventurer{height:57px;width:43px}.team-screen .simple-member>b{font-size:8px;line-height:1.2;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.team-screen .simple-member>span{font-size:22px}.team-strength{display:flex;justify-content:space-between;gap:9px;align-items:center;font-size:9px;color:#9a7a5d}.team-strength b{font-size:17px;margin-left:4px;color:#79557f}.team-screen .formation>small{font-size:8px;color:#a08266;line-height:1.3}.tab-list-title{display:flex;justify-content:space-between;align-items:center;color:#7b586f}.tab-list-title>b{font-size:12px}.tab-list-title>small{font-size:9px;color:#a18468}.team-candidates{flex:1;min-height:0}.team-screen .candidate-grid{display:grid;grid-template-columns:1fr;gap:6px}.team-screen .candidate-grid.screen-list-book{display:flex;flex-direction:column}.team-screen .candidate{padding:6px 9px;gap:10px;min-height:60px}.team-screen .candidate>.adventurer{width:38px;height:45px}.team-screen .candidate>span{flex:1;min-width:0}.team-screen .candidate b{font-size:12px;line-height:1.3;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.team-screen .candidate small{font-size:9px;display:block;margin-top:4px}.team-screen .candidate em{font-size:16px;font-style:normal}
/* Assessment: main encounter, rules and fight buttons stay on the same screen. */
.trial-tools{display:flex;gap:6px}.trial-tools>button{display:flex;flex-direction:column;align-items:center;gap:1px;min-width:36px;min-height:38px;padding:3px;background:#f5e5c7;border:1.5px solid #a48b7c;border-radius:4px 7px;color:#8d715c}.trial-tools small{font-size:8px}.trial-screen .boss-arena{flex:1;min-height:0;padding:9px 12px;display:flex;flex-direction:column;align-items:stretch;gap:5px;margin:0}.trial-screen .arena-badge{align-self:center;font-size:9px;line-height:1.3;padding:4px 8px}.trial-screen .boss-figure{flex:1;min-height:48px;max-height:140px;display:flex;justify-content:center;align-items:center;height:auto;margin:0}.trial-screen .boss-figure>svg{height:100%;max-height:125px;width:auto;max-width:100%}.trial-screen .boss-life{min-height:19px;height:19px;flex-shrink:0;margin:0}.trial-screen .boss-life span{font-size:10px;line-height:17px}.trial-screen .arena-team{position:relative;display:flex;justify-content:center;gap:8px;align-items:center;height:55px;min-height:55px;margin:0;padding-right:45px}.trial-screen .arena-team>span{min-width:0;flex:0 1 48px;max-width:50px}.trial-screen .arena-team .adventurer{height:42px;width:32px}.trial-screen .arena-team small{display:block;font-size:7px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.trial-screen .arena-edit{position:absolute;right:0;bottom:12px;font-size:8px;padding:3px 0;color:#97745b;max-width:48px}.trial-screen .arena-power{display:flex;justify-content:center;align-items:center;gap:8px;min-height:36px;margin:0}.trial-screen .arena-power>span{font-size:9px}.trial-screen .arena-power strong{font-size:27px;line-height:1.1}.trial-screen .arena-power>b{font-size:8px;padding:3px 5px}.trial-screen .trial-rule{display:flex;align-items:center;gap:7px;padding:7px 9px;margin:0;min-height:47px}.trial-screen .trial-rule b{display:block;font-size:10px;margin:0}.trial-screen .trial-rule small{display:block;font-size:9px;line-height:1.5;margin-top:3px}.trial-screen .tab-primary-actions>.button.secondary{min-height:36px;font-size:10px;padding:6px 8px}
/* Supply room: draw on the tab, inspect/grow supplies in the cabinet sheet. */
.mall-screen .mall-heading{min-height:43px}.mall-screen .mall-heading h1{font-size:22px}.mall-screen .supply-banner{flex:1;min-height:170px;max-height:none;display:flex;flex-direction:column;padding:12px}.mall-screen .supply-banner-art{flex:1;min-height:70px;height:auto;max-height:230px;align-items:center}.mall-screen .supply-crate-art{height:100%;max-height:210px;min-height:70px;width:100%}.mall-screen .supply-banner>strong{margin-top:4px;flex-shrink:0}.mall-screen .supply-banner h2{margin:4px 0;font-size:24px}.mall-screen .supply-pity{margin:0;padding:7px 9px;flex-shrink:0}.mall-screen .supply-links{margin:0;min-height:19px;line-height:1.2}.mall-screen .supply-links>span{font-size:8px}.cabinet-entry{display:flex;align-items:center;gap:9px;text-align:left;width:100%;min-height:65px;border:2px solid #a18570;background:#ead6af;border-radius:5px 9px;box-shadow:0 2px #bba080;padding:8px 10px;color:#78566e}.cabinet-entry>span{flex:1;min-width:0}.cabinet-entry b{display:block;font-size:13px;line-height:1.4}.cabinet-entry small{display:block;font-size:9px;color:#9c7c55;margin-top:4px}.cabinet-entry em{font-size:23px;font-style:normal;color:#a17c58}.mall-screen .tab-primary-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:8px}.mall-screen .tab-primary-actions>.button{font-size:11px;padding:8px 4px}.cabinet-sheet>h2{margin:0 0 10px}.cabinet-sheet>h2 small{font-size:11px;color:#a68a6d}.cabinet-sheet .supply-growth-wallet{margin-bottom:7px}.cabinet-help{font-size:10px;line-height:1.5;color:#a17e61;margin:6px 0}.cabinet-sheet .supply-tile,.screen-sheet .cabinet-sheet .supply-tile{min-height:131px;padding:5px 3px;gap:0}.cabinet-sheet .supply-tile .supply-illustration,.screen-sheet .cabinet-sheet .supply-tile .supply-illustration{width:60px;height:60px;margin:0}.cabinet-sheet .supply-tile>b{font-size:11px}.cabinet-sheet .supply-tile>em{display:none}.cabinet-sheet .supply-tile .supply-level,.cabinet-sheet .supply-copies{font-size:7px;margin-top:1px}.cabinet-sheet .supply-tile>small{font-size:8px}.cabinet-sheet .supply-tile-quality{font-size:8px;padding:1px 4px}.ranking-screen .ranking-board{flex:1;min-height:0;display:flex;flex-direction:column}.ranking-screen .ranking-head{padding:11px 13px;font-size:10px}.ranking-screen .ranking-entries{padding:0 10px 8px;min-height:0}.ranking-screen .ranking-row{padding:11px 4px;gap:10px;min-height:57px}.ranking-screen .ranking-row b{font-size:12px}.ranking-screen .ranking-row small{font-size:8px}.ranking-screen .ranking-row>strong{font-size:22px}.ranking-screen .screen-pager{color:#f8e9c4}.ranking-screen .screen-page-label{color:#e4d3af}.ranking-screen .rank-empty{font-size:12px;padding:22px 8px}
@media(max-height:730px){.single-tab-main{padding:8px 12px!important}.tab-screen{gap:6px}.tab-screen .tab-title,.tab-screen .camp-title,.tab-screen .trial-heading,.tab-screen .mall-heading{min-height:38px}.tab-title h1,.tab-screen .camp-title h1,.tab-screen .trial-heading h1{font-size:21px}.lobby-screen .expedition-cta{padding:7px 10px}.lobby-screen .expedition-cta h2{font-size:17px}.school-summary>button{min-height:47px}.home-next{padding:7px 9px;min-height:54px}.lobby-screen .camp-board{min-height:172px}.lobby-screen .camp-map{min-height:108px}.roster-screen .character-art{height:96px}.roster-screen .character-copy{padding:6px 8px}.roster-screen .character-copy h3{font-size:12px}.roster-screen .character-copy>p{margin:3px 0}.team-screen .formation{padding:7px 8px;gap:5px}.team-screen .simple-member{min-height:76px}.team-screen .simple-member .adventurer{height:50px;width:37px}.team-strength b{font-size:16px}.team-screen .candidate{min-height:56px;padding:5px 8px}.team-screen .candidate>.adventurer{height:42px;width:34px}.trial-screen .boss-arena{padding:7px 10px;gap:4px}.trial-screen .arena-team{height:48px;min-height:48px}.trial-screen .arena-team .adventurer{height:36px;width:28px}.trial-screen .arena-power{min-height:32px}.trial-screen .arena-power strong{font-size:24px}.trial-screen .trial-rule{padding:6px 8px;min-height:44px}.mall-screen .supply-banner{min-height:167px;padding:10px}.mall-screen .supply-banner h2{font-size:22px}.mall-screen .supply-banner-art{min-height:68px;max-height:150px}.mall-screen .supply-crate-art{max-height:145px;min-height:68px}.mall-screen .supply-pity{padding:5px 7px;font-size:8px}.cabinet-entry{min-height:59px;padding:7px 9px}.cabinet-entry b{font-size:12px}.cabinet-entry small{font-size:8px}.tab-primary-actions{gap:6px}.ranking-screen .ranking-row{min-height:51px;padding:8px 3px}.cabinet-sheet .supply-tile,.screen-sheet .cabinet-sheet .supply-tile{min-height:126px}.cabinet-sheet .supply-tile .supply-illustration,.screen-sheet .cabinet-sheet .supply-tile .supply-illustration{width:55px;height:55px}}
/* Keep short final list pages from stretching a single card. */
.roster-screen .screen-list-page.character-grid,.cabinet-sheet .screen-list-page.supply-collection{align-content:start}
.ranking-screen .ranking-row>strong{color:#ffe6a6}.ranking-screen .ranking-row>strong>small{color:#e5d6b4}
/* All native modal variants share the same phone-canvas anchor. */
.app-shell{position:relative}
.phone-modal-shade{position:absolute;inset:0;z-index:100;background:#302b345e;backdrop-filter:blur(3px);border-radius:inherit;pointer-events:none}
.sketch-dialog,.sketch-dialog.wide-dialog{position:fixed;inset:auto;margin:0;box-sizing:border-box;min-width:0;min-height:0}
.sketch-dialog::backdrop,.sketch-dialog.wide-dialog::backdrop{background:transparent;backdrop-filter:none}
.screen-dialog-body,.screen-dialog-actions{min-width:0;max-width:100%}
.screen-dialog-actions .button{min-width:0;white-space:normal}
