#modal:has(.run-results){padding:0;align-items:center}
.run-results.panel:before{display:none}
.run-results.panel{padding:0;display:flex;flex-direction:column;width:min(660px,100%);height:min(940px,100dvh);max-height:100dvh;overflow:hidden;background:#102b39;border:1px solid #73949a;border-radius:22px;color:#fff0ce;box-shadow:0 22px 70px #02121e88}
.result-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.result-art{margin:0;position:relative;aspect-ratio:3/2;overflow:hidden;flex:none}.result-art>img{width:100%;height:100%;object-fit:cover;display:block}.result-art:after{content:'';position:absolute;inset:35% 0 0;background:linear-gradient(transparent,#102b39)}.result-art figcaption{position:absolute;bottom:19px;left:24px;right:24px;z-index:1;display:flex;align-items:center;gap:8px;font-size:14px;color:#ffebbe}.result-art .camp-icon{width:26px;height:26px}.is-defeat .result-art>img{filter:saturate(.55) brightness(.72)}
.result-content{padding:4px 24px 22px}.result-eyebrow{font-size:12px;letter-spacing:.1em;color:#e7c482}.result-content h1{font-family:Georgia,serif;font-size:38px;font-weight:400;line-height:1.1;margin:12px 0}.result-message{font-size:16px;color:#c0d5d8;line-height:1.45;margin:0 0 18px}.result-message[role=alert]{color:#ffd2b8}.result-rewards{display:grid;grid-template-columns:1fr 1fr;gap:12px}.result-rewards article{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;padding:16px 10px;border:1px solid #b9a57877;border-radius:16px;background:linear-gradient(145deg,#31544f,#183647)}.result-rewards .camp-icon{width:44px;height:44px}.result-rewards strong{font-family:Georgia,serif;font-size:30px;color:#fff0ce}.result-rewards span{font-size:14px}.result-rewards small{font-size:12px;line-height:1.4;color:#d0dedd}.result-unlock{display:flex;align-items:center;gap:12px;margin-top:16px;padding:12px;border:1px solid #c6ab73;border-radius:14px;background:#284649}.result-unlock>img{width:54px;height:66px;object-fit:cover;object-position:50% 20%;border:1px solid #bfa477;border-radius:10px}.result-unlock strong,.result-unlock span{display:block}.result-unlock strong{font-size:16px}.result-unlock span{font-size:14px;color:#c2d8d8;line-height:1.4;margin-top:6px}.result-unlock>.camp-icon{width:30px;height:30px;flex:none}.result-unlock>.camp-icon:last-child{margin-left:auto;width:23px;height:23px}.result-run-line{display:flex;gap:10px;flex-wrap:wrap;padding:17px 1px;font-size:12px;color:#c1d4d6}.result-detail{border:1px solid #69899188;border-radius:12px;padding:0 12px}.result-detail summary{display:flex;align-items:center;gap:10px;min-height:48px;font-size:14px;cursor:pointer;list-style:none}.result-detail summary>.camp-icon{width:25px;height:25px}.result-detail summary>span{margin-left:auto}.result-detail[open]{padding-bottom:12px}.result-detail .account-result,.result-detail .stats{margin:12px 0}.result-detail .field-guide-result{font-size:14px}.result-detail .result-breakdown{margin:10px 0}
.result-actions{padding:14px 24px max(16px,env(safe-area-inset-bottom));border-top:1px solid #74929755;background:#102b39;display:grid;gap:9px;flex:none}.result-actions button{min-height:48px;font-size:16px;display:flex;align-items:center;justify-content:center;gap:10px;padding:12px}.result-actions button .camp-icon{width:23px;height:23px}.result-actions #again{font-size:14px;min-height:44px;background:#183644;color:#d7e2de}.result-actions .primary{color:#142c36;background:linear-gradient(#f1d699,#dfb67e);border-color:#f0d495}
.recruit-preview.owned-preview .recruit-hero{display:block;padding:0}.owned-preview .recruit-hero>img{display:block;width:100%;height:260px;object-fit:contain;object-position:center;background:radial-gradient(ellipse at center,#34686a55,transparent 70%)}.owned-preview .recruit-hero>div{padding:15px 3px}.owned-preview .recruit-hero h3{font-size:30px}.owned-preview .recruit-requirement{background:#294a4c;border:1px solid #bca27477;border-radius:12px;padding:14px;color:#efdfb8}.owned-preview footer button{min-height:48px;font-size:16px}.owned-preview footer #keepHero{font-size:14px;background:#193847;color:#d4e2dc}.owned-preview .recruit-kit canvas{width:36px;height:36px}
.board-next-stage{display:flex;align-items:center;gap:14px;margin-top:20px;padding:12px;border:1px solid #b6a775;border-radius:15px;background:#244850}.board-next-stage img{width:84px;height:64px;object-fit:cover;border-radius:9px}.board-next-stage span{display:block;text-align:left}.board-next-stage small{font-size:12px;color:#e3c48c}.board-next-stage strong{display:block;font-family:Georgia,serif;font-size:22px;color:#ffedc8;margin-top:4px}.board-tabs [data-board-tab=supplies] .camp-icon{width:16px;height:16px;margin-right:5px}.board-tabs button small{display:block;font-size:12px}.board-goal-recommended{outline:2px solid #e6c784;outline-offset:3px}.board-hero-heading[data-intro-hero] img{object-fit:cover;object-position:50% 15%;border-radius:12px}
@media(max-width:600px){.run-results.panel{height:100dvh;border:0;border-radius:0;max-width:none}.result-content{padding-inline:20px}.result-actions{padding-inline:20px}.result-content h1{font-size:32px}}
@media(max-height:600px){.result-art{aspect-ratio:3/1}.result-content h1{font-size:28px}.result-rewards article{padding:10px}.result-rewards .camp-icon{width:32px;height:32px}.result-rewards strong{font-size:25px}.result-actions{padding-block:10px;gap:7px}.owned-preview .recruit-hero>img{height:150px}}
@media(prefers-reduced-motion:no-preference){.result-unlock{animation:result-reveal .45s ease-out}.board-goal-recommended{animation:goal-ready 1.8s ease-in-out infinite}@keyframes result-reveal{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes goal-ready{50%{box-shadow:0 0 15px #e6c78455}}}
#modal .run-results .result-art{height:clamp(160px,27dvh,260px);aspect-ratio:auto}
#modal .run-results .result-rewards article{padding:10px 8px;gap:3px}
#modal .run-results .result-rewards .camp-icon{width:34px;height:34px}
#modal .run-results .result-rewards strong{font-size:28px}
#modal .run-results .result-rewards small{letter-spacing:0;font-weight:400;max-width:none}
.owned-preview .recruit-hero>img{border-radius:16px}
.board-next-stage strong{font-size:20px;line-height:1.2}
@media(max-height:600px){#modal .run-results .result-art{height:145px}}

#modal .run-results .result-rewards .result-stage-reward{grid-column:1/-1;display:grid;grid-template-columns:1fr auto;align-items:center;gap:2px 10px;padding:8px 12px;text-align:left;background:linear-gradient(145deg,#294944,#183647)}
#modal .run-results .result-stage-reward span{grid-column:1;grid-row:1;font-size:13px;text-align:left}
#modal .run-results .result-stage-reward strong{grid-column:2;grid-row:1;font-family:inherit;font-size:14px;text-align:right}
#modal .run-results .result-stage-reward small{grid-column:1/-1;text-align:left;font-size:11px}
/* Lead (T014A follow-up): a first-clear unlock is the headline, shown under the title before the rewards. */
.result-content>.result-unlock{margin:4px 0 14px;border-color:#efcf8b;box-shadow:0 0 0 3px #edcc8720}
@media(prefers-reduced-motion:no-preference){.result-content>.result-unlock{animation:result-unlock-in .42s cubic-bezier(.2,1.3,.4,1) .15s backwards}}
@keyframes result-unlock-in{from{opacity:0;transform:scale(.94)}}
/* Build strip: each weapon's share of the damage this run, best first (CREATIVE_DIRECTION §5). */
.result-build{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:10px 0 2px}
.result-build-weapon{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:46px;padding:5px 4px 4px;border:1px solid #74929766;border-radius:10px;background:#12303b}
.result-build-weapon .item-art{width:34px;height:34px}
.result-build-weapon b{font:600 12px var(--number,sans-serif);color:#d7e2de;font-variant-numeric:tabular-nums}
.result-build-weapon.top{border-color:#e2c685;background:linear-gradient(160deg,#2c4b43,#14323c)}
.result-build-weapon.top b{color:#f1d699}
.result-build-signature{display:flex;align-self:center;align-items:center;gap:5px;padding:3px 9px;border:1px solid #c9a86a80;border-radius:10px;background:#1d2f35;color:#e7dcc2;font:600 12px/1.2 var(--body,sans-serif)}
.result-build-signature b{font:700 12px var(--number,sans-serif);color:#f1d699;font-variant-numeric:tabular-nums}
/* T027 part 2 (CREATIVE_DIRECTION §5): the postcard carries one companion line; a defeat adds the cause and one next experiment. */
#modal .run-results .result-art{height:clamp(150px,24dvh,236px)}
.run-results .result-art:after{inset:24% 0 0;background:linear-gradient(transparent,#102b39d6 60%,#102b39)}
.run-results .result-art figcaption{top:12px;bottom:auto;left:14px;right:auto;gap:6px;padding:3px 12px 3px 5px;border:1px solid #e2c68555;border-radius:999px;background:#0b2230cc;font-size:13px}
.run-results .result-art figcaption .camp-icon{width:22px;height:22px}
.result-voice{position:absolute;z-index:1;left:18px;right:18px;bottom:6px;margin:0;display:grid;grid-template-columns:44px minmax(0,1fr);column-gap:12px;align-items:center}
.result-voice-face{grid-row:1/3;position:relative;width:44px;height:44px;border-radius:50%;overflow:hidden;border:1.5px solid #e2c685;background:#16323d;box-shadow:0 2px 8px #02121e99}
.result-voice-face img{position:absolute;max-width:none;width:260%;left:-75%;top:-47%}
.result-voice[data-result-companion=bram] .result-voice-face img{width:240%;left:-69%;top:-2%}
.result-voice p{margin:0;font:italic 15px/1.35 var(--display);color:#fff0ce;text-shadow:0 1px 3px #02121e}
.result-voice cite{font:600 12px/1.4 var(--body);font-style:normal;color:#e7c482}
.result-debrief{display:grid;grid-template-columns:18px max-content minmax(0,1fr);gap:6px 8px;margin:0 0 14px;padding:10px 14px;border:1px solid #6d8b8f5c;border-radius:14px;background:linear-gradient(160deg,#17343f,#0f2833)}
/* Icon, label and text line up across both rows (subgrid; older engines size each row alone). Icons sit on the first line. */
.result-debrief p{grid-column:1/-1;margin:0;display:grid;grid-template-columns:18px max-content minmax(0,1fr);column-gap:8px;align-items:baseline;line-height:1.35}
@supports (grid-template-columns:subgrid){.result-debrief p{grid-template-columns:subgrid}}
.result-debrief small{font-size:12px;color:#a9c0c1;white-space:nowrap}
.result-cause strong{font:600 17px/1.3 var(--body);color:#fff0ce}
/* The same terracotta ring as an enemy telegraph (CREATIVE_DIRECTION §4.5): red means the hit you did not dodge. */
.result-cause-mark{align-self:start;justify-self:center;margin-top:5px;width:13px;height:13px;border:2.5px solid #e25a3c;border-radius:50%;box-shadow:0 0 0 2px #0c222c}
.result-next{font-size:15px;color:#e3ecea}
.result-next .camp-icon{align-self:start;margin-top:1px;width:18px;height:18px}
.result-run{display:flex;flex-direction:column}
.run-results .result-run-line{padding:12px 1px 8px}
/* Reserved for the optional Salvage row on clear results (T013, CREATIVE_DIRECTION §8): hidden until the ads integration fills it. */
.result-salvage[hidden]{display:none}
/* Secondary actions share one row under the primary; the revive shows its price and the gem balance (CREATIVE_DIRECTION §5). */
.result-actions{grid-template-columns:1fr 1fr}
.result-actions>.primary,.result-actions>.result-wide{grid-column:1/-1}
.result-actions #revive{flex-direction:column;gap:1px;font-size:14px;line-height:1.2;min-height:44px;padding-block:6px}
.result-actions #revive small{font-size:12px;color:#b7cbcb}
