/* The battle is the stage; rank and outcome belong to the same moment. */
.presentation-modal{width:calc(100% - 16px);height:calc(100% - 12px);max-width:1200px;max-height:none;background:#243e35;color:#f2e4bc;border:2px solid #c1b983;border-radius:10px;box-shadow:0 0 70px #111d19}
.presentation-modal>header{display:none}.presentation-modal>.modal-body{padding:10px;height:100%;overflow:hidden;display:block}.presentation-modal h1,.presentation-modal h2,.presentation-modal p{margin:0}.presentation-modal button{font-size:12px;min-height:34px;padding:4px 10px;background:#e8dfbb;color:#2e4639}.presentation-modal button.primary{background:#dfbb68;border:2px solid #f4da91;color:#203b31}.presentation-modal .p-loading{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px}.p-loading>.icon{height:60px;width:60px}
.p-match{display:grid;grid-template-rows:50px minmax(0,1fr) 66px;gap:7px;height:100%}.p-match-header{display:flex;align-items:center;gap:9px;min-width:0}.p-match-header>div:first-child{flex:1;min-width:0}.p-match-header h2{font-size:19px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-match-header small,.p-match-header>div>span{font-size:10px;color:#cbd7b8}.p-rounds{display:flex;gap:5px}.p-rounds>span{min-width:55px;padding:4px 7px;display:flex;flex-direction:column;align-items:center;gap:2px;background:#1b302b;border:1px solid #68846b;border-radius:5px}.p-rounds small{font-size:9px}.p-rounds b{font-size:12px}.p-rounds .current{border-color:#e1bf76;background:#675d38}.p-rounds .win{color:#e5cf80;border-color:#d2bd71}.p-rounds .loss{color:#e2aaa0;border-color:#af8178}.p-rounds .draw{color:#c5d3d0}
.p-battle-stage{position:relative;min-height:0;border:1px solid #829472;border-radius:8px;overflow:hidden;background:radial-gradient(ellipse,#657857,#263f35)}#p-battle-canvas{display:block;width:100%;height:100%}.p-match-footer{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto;align-items:center;gap:9px;min-height:0}.p-crew{display:flex;gap:4px;min-width:0}.p-crew>div{display:flex;gap:3px;align-items:center;flex:1;min-width:0}.p-crew .portrait{height:37px;width:26px;flex:none}.p-crew>div>span{flex:1;min-width:0}.p-crew b{font-size:9px;white-space:nowrap}.p-crew i{display:block;height:5px;background:#132b25;margin-top:5px}.p-crew em{display:block;height:100%;background:#b5d397}.p-crew .fallen{opacity:.45;filter:grayscale(1)}.p-crew .critical em{background:#d99876}.p-rank-hud{display:flex;align-items:center;gap:8px;padding-left:8px;border-left:1px solid #71866b}.p-rank-seal{width:35px;height:39px;display:flex;align-items:center;justify-content:center;flex:none;background:#786044;clip-path:polygon(50% 0,100% 17%,90% 74%,50% 100%,10% 74%,0 17%)}.p-rank-seal>.icon{width:24px;height:24px;color:#f4dea0}.p-rank-hud>div{display:flex;flex-direction:column;gap:2px}.p-rank-hud small{font-size:9px;white-space:nowrap}.p-rank-hud b{font-size:25px;line-height:1}.p-rank-goal{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}.p-rank-goal>span{font-size:10px;white-space:nowrap}.p-rank-goal>i{height:7px;background:#122b24;display:block;border-radius:4px;overflow:hidden}.p-rank-goal em{height:100%;display:block;background:linear-gradient(90deg,#a8b987,#efd082)}.p-controls{display:flex;gap:4px;align-items:center;flex-wrap:wrap;justify-content:flex-end;max-width:156px}.p-controls>button{font-size:10px;min-height:28px;padding:3px 7px}.p-controls>button:last-child{flex-basis:100%}
.p-verdict{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:28px;background:linear-gradient(100deg,#1e362aef,#354b2bdd,#182f28ef);animation:p-enter .32s ease-out}.p-verdict[hidden]{display:none}.p-verdict.loss{background:linear-gradient(100deg,#292b2def,#61483cdd,#262e2bef)}.p-verdict .p-result-crest{height:100px;width:88px;display:grid;place-items:center;background:#ac9352;clip-path:polygon(50% 0,100% 17%,90% 74%,50% 100%,10% 74%,0 17%)}.p-result-crest>.icon{height:62px;width:62px;color:#fff0b3}.loss .p-result-crest{background:#9a7662}.p-result-copy small{font-size:13px;letter-spacing:2px;color:#e0c277}.p-result-copy h1{font-size:60px;line-height:1.2;color:#f5d886;text-shadow:0 4px 0 #243b28}.loss .p-result-copy h1{color:#edc4b6}.p-result-copy p{font-size:12px;margin-top:7px}.p-rating-change{display:flex;flex-direction:column;align-items:center;gap:5px;padding-left:28px;border-left:1px solid #a7ad7b}.p-rating-change>small{font-size:12px}.p-rating-change>strong{font-size:46px;color:#e8d184;line-height:1}.p-rating-change.negative>strong{color:#e1a68e}.p-rating-change>span{font-size:12px}.p-rating-change>button{margin-top:7px;min-height:35px}
.p-summary,.p-homecoming{display:grid;grid-template-rows:30px minmax(0,1fr) 42px;gap:8px;height:100%}.p-summary>header,.p-homecoming>header{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#ddc782}.p-summary-center{display:grid;grid-template-columns:1fr 1.2fr;gap:22px;min-height:0}.p-rank-award{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:0;gap:4px;border-right:1px solid #75876b;background:radial-gradient(ellipse,#7d79473d,transparent 65%)}.p-grand-crest{width:82px;height:83px;display:grid;place-items:center;flex:none;background:#89704c;clip-path:polygon(50% 0,100% 17%,90% 74%,50% 100%,10% 74%,0 17%);filter:drop-shadow(0 4px 0 #12231d)}.p-grand-crest .icon{width:58px;height:58px;color:#fae6a8}.tier-2{background:#91a6a2}.tier-3{background:#c4a34d}.tier-4{background:#a6c3c5}.p-rank-award>small{letter-spacing:3px;font-size:10px;color:#dbc683}.p-rank-award h1{font-size:27px;color:#f6d88d}.p-big-rating{display:flex;align-items:baseline;gap:8px}.p-big-rating>b{font-size:38px;line-height:1}.p-big-rating>span{color:#c9d897;font-size:16px}.p-rank-award>.p-rank-goal{flex:none;width:75%;max-width:235px;align-items:stretch}.p-series-story{display:flex;flex-direction:column;justify-content:center;gap:8px;min-height:0}.p-series-story h2{font-size:30px;color:#efd285}.p-series-story h2>span{font-size:23px;color:#d1c4a4}.p-summary-row{display:flex;align-items:center;gap:9px;padding:8px 11px;background:#d9d8b7;color:#304b39;border-left:5px solid #b5c985;border-radius:4px;min-height:0}.p-summary-row.loss{border-left-color:#be8975}.p-summary-row>span{flex:1;font-size:12px;display:flex;flex-direction:column;gap:2px}.p-summary-row>span>small{font-size:10px;color:#64795a}.p-summary-row>b,.p-summary-row>strong{font-size:15px}.p-series-story>p{font-size:11px;line-height:1.4;color:#d6dabe}.p-summary>footer,.p-homecoming>footer{display:flex;gap:10px;justify-content:flex-end}.p-summary>footer>button,.p-homecoming>footer>button{min-height:40px;min-width:145px}.promoted .p-grand-crest{animation:p-award .9s ease-out}.promoted .p-rank-award{background:radial-gradient(ellipse,#ddc05b60,transparent 70%)}
.p-departure{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;text-align:center}.p-marching{display:flex;gap:28px;width:65%;justify-content:center;border-bottom:2px dashed #a3ad79;padding-bottom:14px}.p-marching>.portrait{width:50px;height:66px;animation:p-walk .5s ease-in-out infinite alternate}.p-marching>.portrait:nth-child(even){animation-delay:.2s}.p-departure h1{font-size:32px;color:#e7d18a}.p-departure>small{font-size:12px;color:#bfd0ae}.p-departure>span{font-size:12px;line-height:1.5}.p-departure>footer{display:flex;gap:12px}.p-departure>footer>button{min-height:42px}
.p-home-body{display:grid;grid-template-columns:1.35fr 1fr;gap:20px;min-height:0}.p-home-body>section{display:flex;flex-direction:column;justify-content:center;gap:9px;min-height:0}.p-return-party{display:flex;gap:12px;justify-content:center}.p-return-party>div{display:flex;flex-direction:column;align-items:center;gap:3px}.p-return-party .portrait{height:64px;width:46px}.p-return-party .fallen .portrait{filter:grayscale(1);opacity:.6}.p-return-party b{font-size:11px}.p-return-party small{font-size:9px;color:#bcc9ad}.p-home-body h1{font-size:29px;color:#f1d58c;text-align:center}.p-home-body h2{text-align:center;font-size:19px}.p-home-body h2>span{font-size:13px;margin-left:12px;color:#c1caa9}.p-home-body p{font-size:11px;text-align:center}.p-expedition-footsteps{display:flex;gap:4px}.p-expedition-footsteps>button{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px;font-size:9px;padding:4px}.p-expedition-footsteps small{font-size:9px}.p-expedition-footsteps .loss{background:#d4ac94}.p-home-body>aside{padding:12px;background:#dadabd;color:#2a483a;display:flex;flex-direction:column;gap:9px;justify-content:center;border:2px solid #96a47d;border-radius:8px;min-height:0}.p-return-loot{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.p-return-loot>span,.p-return-items>span{display:flex;align-items:center;gap:5px}.p-return-loot .item-art{width:27px;height:28px;flex:none}.p-return-loot b{font-size:11px}.p-return-items{display:flex;flex-direction:column;gap:5px}.p-return-items .item-art{width:35px;height:35px;flex:none}.p-return-items b{display:flex;flex-direction:column;font-size:12px;gap:3px}.p-return-items small{font-size:9px}
@keyframes p-enter{from{opacity:0;transform:scale(1.08)}to{opacity:1;transform:scale(1)}}@keyframes p-award{from{transform:scale(.55) rotate(-15deg)}70%{transform:scale(1.1) rotate(3deg)}to{transform:scale(1)}}@keyframes p-walk{to{transform:translateY(-5px)}}
@media(max-width:740px),(max-height:340px){.presentation-modal>.modal-body{padding:6px}.p-match{grid-template-rows:40px minmax(0,1fr) 51px;gap:4px}.p-match-header{gap:5px}.p-match-header h2{font-size:15px}.p-match-header small,.p-match-header>div>span{font-size:8px}.p-match-header button{min-height:28px;font-size:10px;padding:3px 7px}.p-rounds>span{min-width:40px;padding:3px}.p-rounds b{font-size:10px}.p-rounds small{font-size:8px}.p-match-footer{grid-template-columns:1fr 1fr 120px;gap:4px}.p-crew .portrait{width:21px;height:29px}.p-crew b{display:none}.p-crew i{margin-top:0;height:5px}.p-rank-seal{height:28px;width:25px}.p-rank-seal .icon{height:19px;width:19px}.p-rank-hud{padding-left:5px;gap:5px}.p-rank-hud b{font-size:21px}.p-rank-hud small{font-size:8px}.p-rank-goal>span{font-size:9px}.p-controls{gap:2px}.p-controls>button{min-height:24px;font-size:9px;padding:2px 6px}.p-verdict{gap:15px}.p-verdict .p-result-crest{width:52px;height:66px}.p-result-crest>.icon{height:41px;width:41px}.p-result-copy h1{font-size:40px}.p-result-copy small,.p-result-copy p{font-size:10px}.p-rating-change{padding-left:15px;gap:3px}.p-rating-change>strong{font-size:33px}.p-rating-change>button{margin-top:3px;min-height:29px;font-size:10px}.p-rating-change>span{font-size:10px}.p-summary,.p-homecoming{grid-template-rows:25px minmax(0,1fr) 34px;gap:5px}.p-summary>header,.p-homecoming>header{font-size:10px}.p-summary>header button,.p-homecoming>header button{font-size:10px;min-height:26px}.p-summary-center{gap:12px;grid-template-columns:1fr 1.2fr}.p-grand-crest{height:48px;width:49px}.p-grand-crest .icon{height:33px;width:33px}.p-rank-award{gap:3px}.p-rank-award>small{font-size:8px}.p-rank-award h1{font-size:21px}.p-big-rating>b{font-size:27px}.p-big-rating>span{font-size:12px}.p-series-story{gap:5px}.p-series-story h2{font-size:22px}.p-series-story h2>span{font-size:17px}.p-summary-row{padding:4px 7px;gap:6px}.p-summary-row>span{font-size:10px}.p-summary-row>span>small{font-size:8px}.p-summary-row>b,.p-summary-row>strong{font-size:12px}.p-series-story>p{display:none}.p-summary>footer>button,.p-homecoming>footer>button{min-height:32px;font-size:11px}.p-departure{gap:6px}.p-marching{padding-bottom:7px}.p-marching>.portrait{height:43px;width:34px}.p-departure h1{font-size:24px}.p-departure>small,.p-departure>span,.p-departure>p{font-size:10px}.p-departure>footer>button{min-height:32px;font-size:11px}.p-home-body{gap:10px}.p-home-body>section{gap:4px}.p-return-party{gap:10px}.p-return-party .portrait{height:37px;width:29px}.p-return-party b{font-size:9px}.p-return-party small{font-size:8px}.p-home-body h1{font-size:21px}.p-home-body h2{font-size:15px}.p-home-body h2>span{font-size:11px}.p-home-body p{font-size:9px}.p-expedition-footsteps>button{font-size:8px;min-height:34px;padding:2px}.p-expedition-footsteps small{font-size:8px}.p-home-body>aside{padding:6px;gap:5px}.p-home-body>aside>small{font-size:10px}.p-return-loot{gap:3px}.p-return-loot .item-art{height:20px;width:21px}.p-return-loot b{font-size:9px}.p-return-items{gap:3px}.p-return-items .item-art{height:25px;width:25px}.p-return-items b{font-size:10px;gap:1px}}
@media(prefers-reduced-motion:reduce){.p-verdict,.promoted .p-grand-crest,.p-marching>.portrait{animation:none}}
/* Fit the safe-area container even when Safari's toolbar is visible. */
.veil .presentation-modal{height:100%!important;width:100%;max-width:1200px!important}

.field-report{display:flex;align-items:center;gap:6px;padding:3px 9px;background:#e6d8a4;color:#2c493b;border:1px solid #b9a65f;border-radius:5px;min-height:34px;max-width:290px;min-width:0;flex:0 1 auto}
.field-report>.icon{width:24px;height:24px;flex:none}.field-report>span{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0}.field-report b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}.field-report small{font-size:9px;white-space:nowrap}.has-field-report .time-badge,.has-field-report .connection,.has-field-report .install-button{display:none}.p-big-rating>span.negative{color:#e1a68e}
.short-screen .field-report{min-height:28px;padding:2px 6px}.short-screen .field-report b{font-size:10px}.short-screen .field-report small{font-size:8px}
@media(max-width:740px){.field-report{max-width:220px}.field-report b{max-width:176px;font-size:10px}.field-report small{font-size:8px}.field-report>.icon{width:18px;height:18px}}
.p-result-copy .p-insight{font-size:11px;color:#ded6b8;max-width:230px}.p-summary-row>span{min-width:0}.p-summary-row>span>small{white-space:nowrap}
@media(max-width:740px),(max-height:340px){.p-result-copy .p-insight{font-size:9px;max-width:170px}.p-result-copy p{margin-top:4px}}
@media(max-width:740px),(max-height:340px){.p-home-body>section{gap:3px}.p-return-party .portrait{height:32px;width:27px}.p-return-party b,.p-return-party small{line-height:1.2}.p-home-body h1,.p-home-body h2{line-height:1.2}.p-home-body p{line-height:1.3}.p-expedition-footsteps>button{line-height:1.1}.p-expedition-footsteps small{line-height:1.1}}

.p-crew-expanded{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,1fr);gap:3px 6px}
.p-return-items.p-return-treasures{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;min-height:0}
.presentation-modal .p-return-treasures>button{display:flex;align-items:center;gap:5px;text-align:left;min-width:0;min-height:48px;padding:5px;border:1px solid #8e9c76;background:#eee4bf}
.presentation-modal .p-return-treasures>.q1{border-color:#719aab;background:#e3e9ce}.presentation-modal .p-return-treasures>.q2{border-color:#bc9650;background:#f1dc9b}
.p-return-treasures button>span{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
.p-return-treasures button b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.p-return-treasures button small{font-size:8px;white-space:nowrap}
.p-return-treasures .item-art{width:29px;height:32px}
.p-return-items.p-many-treasures{grid-template-columns:repeat(3,minmax(0,1fr))}.p-many-treasures button>span{gap:1px}.p-many-treasures button b{font-size:10px}.p-many-treasures button small{font-size:8px}.p-many-treasures .item-art{width:22px;height:26px}
@media(max-width:740px),(max-height:340px){.presentation-modal .p-return-treasures>button{min-height:42px;padding:3px;gap:3px}.p-return-treasures .item-art{width:23px;height:26px}.p-return-treasures button b{font-size:10px}.p-return-treasures button small{font-size:8px}.p-return-treasures button>span{gap:1px}.p-return-items.p-return-treasures{gap:3px}}
.p-crew-expanded .portrait{height:26px;width:19px}
.p-crew-expanded b{display:block;font-size:10px;overflow:hidden;text-overflow:ellipsis}
.p-crew-expanded i{margin-top:2px;height:4px}
@media(max-height:340px){.p-crew-expanded{gap:2px 4px}.p-crew-expanded .portrait{height:21px;width:16px}.p-crew-expanded b{display:block;font-size:8px}.p-crew-expanded i{margin-top:1px;height:3px}}
