#presentation-screen[hidden],#presentation-countdown[hidden],#presentation-combo[hidden],#presentation-defense[hidden]{display:none!important}
#presentation-screen{position:fixed;inset:0;z-index:100;overflow:hidden;isolation:isolate;color:#f8edc9;font-family:"Pixelify Sans",monospace;text-align:center;background:#142b31}
.presentation-landscape,.presentation-result-shade{position:absolute;inset:0;z-index:-2}.presentation-landscape{background-position:center;background-size:cover;image-rendering:pixelated;transform:scale(1.04)}
.presentation-result-shade{z-index:-1;background:linear-gradient(#061820aa,#10242c55 45%,#07151bd9)}
.presentation-result-content{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:18px 24px;box-sizing:border-box}
.presentation-brand{width:clamp(210px,24vw,350px);max-height:110px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 5px 0 #091b26);margin-top:-12px}
.presentation-outcome{height:clamp(110px,19vh,190px);width:min(780px,78vw);position:relative;display:grid;place-items:center;margin-top:3px}
.presentation-victory-art{position:absolute;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 7px 0 #0d202c);animation:presentation-title-land .48s cubic-bezier(.18,.7,.3,1.25) both}
.presentation-text-title{font-size:clamp(66px,9vw,122px);line-height:1;margin:0;color:#ffdf8c;letter-spacing:.03em;text-shadow:4px 0 #604d3d,-4px 0 #604d3d,0 4px #604d3d,0 -4px #604d3d,8px 9px #172b38;animation:presentation-title-land .48s cubic-bezier(.18,.7,.3,1.25) both}
.presentation-title-loaded .presentation-text-title{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
#presentation-screen[data-won=no] .presentation-text-title{color:#e0afb0;text-shadow:4px 0 #513d45,-4px 0 #513d45,0 4px #513d45,0 -4px #513d45,8px 9px #142333}
.presentation-winner{font-size:clamp(22px,2.6vw,36px);text-shadow:2px 3px #18313b;margin:4px 0 0;letter-spacing:.03em}
.presentation-heroes{width:min(890px,87vw);height:clamp(135px,23vh,230px);object-fit:contain;image-rendering:pixelated;flex-shrink:0}
.presentation-party{display:flex;justify-content:center;gap:9px;min-height:0;margin:1px 0 8px}.presentation-party img{width:42px;height:42px;object-fit:contain;image-rendering:pixelated;padding:3px;background:#193640b5;border-bottom:3px solid #e0c889;box-shadow:2px 3px #0b2230}
.presentation-stats{font-size:clamp(16px,1.6vw,24px);letter-spacing:.03em;word-spacing:3px;color:#d9ddbd;text-shadow:2px 2px #102a35;margin:5px 0 17px}
.presentation-actions{display:flex;gap:16px;justify-content:center;max-width:90vw}
.presentation-action{position:relative;min-width:184px;min-height:64px;padding:12px 23px;border:0;background:var(--native-button,#3d624f);background-size:100% 100%;font:700 25px "Pixelify Sans",monospace;color:#e9efcd;text-shadow:2px 2px #18303a;cursor:pointer;image-rendering:pixelated;transition:transform .12s,color .12s;outline:none}
.presentation-action.chosen,.presentation-action:hover,.presentation-action:focus-visible{background-image:var(--native-selected);color:#fff3bb;transform:translateY(-4px)}
.presentation-action.chosen::before{content:"▸";position:absolute;left:10px;top:50%;transform:translateY(-50%);color:#ffe69b}
.presentation-result-hint{font-size:15px;color:#becbbb;letter-spacing:.15em;margin:16px 0 0;text-shadow:2px 2px #112532}
.presentation-result-open #modal{z-index:220}.presentation-result-open .game-overlay{visibility:hidden;pointer-events:none}
#presentation-countdown{position:fixed;inset:0;display:grid;place-items:center;z-index:80;pointer-events:none;background:#06182022}
.presentation-countdown-plate{width:280px;height:166px;display:flex;align-items:center;justify-content:center;background-image:var(--native-nameplate);background-position:center;background-size:100% 100%;image-rendering:pixelated;filter:drop-shadow(0 8px 0 #0d243a77)}
.presentation-countdown-plate canvas{width:128px;height:128px;image-rendering:pixelated}.presentation-countdown-plate strong{font-size:70px;color:#ffe2a0;text-shadow:3px 3px #40534d,5px 6px #142c3a}
.presentation-number-slam .presentation-countdown-plate{animation:presentation-number .22s ease-out}
#presentation-combo{position:fixed;right:24px;top:28vh;z-index:46;pointer-events:none;display:flex;align-items:center;justify-content:center;gap:10px;min-width:204px;min-height:78px;padding:0 14px;background-image:var(--native-nameplate);background-size:100% 100%;font-family:"Pixelify Sans",monospace;color:#ffe6a4;text-shadow:2px 2px #204049;image-rendering:pixelated}
#presentation-combo b{font-size:48px;line-height:1}#presentation-combo span{font-size:22px;line-height:1.05;max-width:85px;text-align:left}.presentation-feedback-enabled #combo-label{opacity:0}
#presentation-defense{position:fixed;top:145px;left:22px;z-index:46;pointer-events:none;display:flex;align-items:center;gap:8px;min-height:52px;padding:3px 19px 3px 9px;max-width:310px;background-image:var(--native-nameplate);background-size:100% 100%;font:700 21px "Pixelify Sans",monospace;color:#d9efdc;text-shadow:2px 2px #243f45;image-rendering:pixelated}
#presentation-defense[data-team="1"]{left:auto;right:22px}#presentation-defense img{width:42px;height:42px;object-fit:contain;image-rendering:pixelated}
.presentation-feedback-pop{animation:presentation-feedback .24s ease-out}
@keyframes presentation-title-land{from{transform:translateY(-18px) scale(.85);opacity:0}to{transform:none;opacity:1}}
@keyframes presentation-number{0%{transform:scale(1.3);opacity:.3}60%{transform:scale(.95)}100%{transform:none;opacity:1}}
@keyframes presentation-feedback{0%{transform:translateY(5px) scale(.85);opacity:.5}65%{transform:translateY(-4px) scale(1.04)}100%{transform:none;opacity:1}}
@media(max-width:700px){.presentation-result-content{padding:14px 12px}.presentation-brand{max-height:86px}.presentation-outcome{height:108px;width:94vw}.presentation-winner{font-size:24px}.presentation-heroes{height:20vh;max-height:190px;width:100vw}.presentation-actions{gap:8px;flex-wrap:wrap}.presentation-action{min-width:145px;min-height:52px;padding:8px 17px;font-size:21px}.presentation-stats{font-size:15px;word-spacing:0;margin-bottom:12px}.presentation-party img{width:32px;height:32px}.presentation-result-hint{font-size:11px;margin-top:10px}#presentation-combo{right:8px;top:30vh;min-width:142px;min-height:62px;padding:0 8px;gap:6px}#presentation-combo b{font-size:36px}#presentation-combo span{font-size:17px;max-width:62px}#presentation-defense{left:8px;top:124px;font-size:16px;max-width:228px}#presentation-defense[data-team="1"]{right:8px}.presentation-countdown-plate{width:230px;height:140px}}
@media(max-height:600px) and (orientation:landscape){.presentation-result-content{padding:6px 15px}.presentation-brand{width:190px;max-height:57px;margin-top:0}.presentation-outcome{height:70px}.presentation-text-title{font-size:72px}.presentation-winner{font-size:22px}.presentation-heroes{height:125px;max-height:28vh}.presentation-party{margin:0}.presentation-party img{width:26px;height:26px}.presentation-stats{font-size:16px;margin:3px 0 8px}.presentation-action{min-height:48px;font-size:21px}.presentation-result-hint{margin-top:7px;font-size:11px}}
@media(prefers-reduced-motion:reduce){.presentation-victory-art,.presentation-text-title,.presentation-number-slam .presentation-countdown-plate,.presentation-feedback-pop{animation:none!important}.presentation-action{transition:none}.presentation-action.chosen{transform:none}}
#presentation-milestone[hidden]{display:none!important}
#presentation-milestone{position:fixed;inset:0;z-index:92;display:grid;place-items:center;pointer-events:none;color:#fff1c9;font-family:"Pixelify Sans",monospace;text-align:center}
.presentation-milestone-panel{position:relative;box-sizing:border-box;width:min(430px,88vw);min-height:260px;padding:18px 32px 27px;background-image:var(--native-dialog);background-size:100% 100%;image-rendering:pixelated;filter:drop-shadow(0 7px 0 #08192370)}
.presentation-milestone-kicker{margin:0;letter-spacing:.16em;font-size:17px;color:#c2e4d7;text-shadow:2px 2px #1b3440}
.presentation-milestone-panel canvas{display:block;width:100%;height:119px;object-fit:contain;image-rendering:pixelated;margin:1px auto -2px}
.presentation-milestone-panel h2{font-size:30px;line-height:1.08;margin:2px 0 6px;color:#ffe09a;text-shadow:2px 2px #263b3e}
.presentation-milestone-subtitle{font-size:19px;line-height:1.15;margin:0 auto;max-width:350px;color:#e0efda;text-shadow:2px 2px #1b3440}
.presentation-milestone-progress{position:absolute;bottom:15px;left:15%;width:70%;height:3px;background:#84c6a8;transform:scaleX(var(--milestone-progress,1));transform-origin:left;opacity:.65}
#presentation-milestone[data-kind=evolution]{background:#061f2d66;z-index:182}
#presentation-milestone[data-kind=evolution] .presentation-milestone-panel{width:min(590px,94vw);min-height:378px;padding:23px 35px 31px}
#presentation-milestone[data-kind=evolution] canvas{height:224px;margin:-5px auto -3px}
#presentation-milestone[data-kind=evolution] h2{font-size:38px}
#presentation-milestone[data-kind=evolution] .presentation-milestone-subtitle{max-width:475px;font-size:23px}
#presentation-milestone[data-kind=evolution] .presentation-milestone-kicker{font-size:21px;letter-spacing:.22em}
.presentation-milestone-enter .presentation-milestone-panel{animation:presentation-feedback .22s ease-out}
@media(max-width:500px){.presentation-milestone-panel{padding:17px 23px 25px;min-height:235px}.presentation-milestone-panel h2{font-size:26px}.presentation-milestone-subtitle{font-size:17px}.presentation-milestone-kicker{font-size:14px}#presentation-milestone[data-kind=evolution] .presentation-milestone-panel{padding:21px 28px 31px;min-height:320px}#presentation-milestone[data-kind=evolution] canvas{height:180px}#presentation-milestone[data-kind=evolution] h2{font-size:31px}#presentation-milestone[data-kind=evolution] .presentation-milestone-subtitle{font-size:19px}}
@media(prefers-reduced-motion:reduce){.presentation-milestone-enter .presentation-milestone-panel{animation:none!important}}
/* Ordinary journey cues stay at the edge; only evolution owns the center. */
#presentation-milestone:not([data-kind=evolution]){inset:112px 16px auto auto;display:block;width:min(320px,calc(100vw - 32px));background:none;text-align:left;z-index:190}
#presentation-milestone:not([data-kind=evolution]) .presentation-milestone-panel{display:grid;grid-template-rows:10px minmax(18px,36px) minmax(13px,26px);gap:1px;align-content:center;width:100%;height:88px;min-height:88px;padding:8px 13px 10px 66px;background-image:var(--native-nameplate);filter:drop-shadow(0 3px 0 #08192355)}
#presentation-milestone:not([data-kind=evolution]) canvas{position:absolute;left:8px;top:12px;width:54px;height:62px;margin:0;object-fit:contain}
#presentation-milestone:not([data-kind=evolution]) .presentation-milestone-kicker{margin:0;padding-right:16px;font-size:10px;line-height:10px;letter-spacing:.08em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#presentation-milestone:not([data-kind=evolution]) h2{margin:0;font-size:18px;line-height:18px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-shadow:1px 1px #263b3e}
#presentation-milestone:not([data-kind=evolution]) .presentation-milestone-subtitle{margin:0;max-width:none;font-size:12px;line-height:13px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-shadow:1px 1px #1b3440}
.presentation-milestone-icon{position:absolute;top:7px;right:11px;width:17px;height:17px;object-fit:contain;image-rendering:pixelated}
#presentation-milestone[data-kind=evolution] .presentation-milestone-icon{display:none}
#presentation-milestone:not([data-kind=evolution]) .presentation-milestone-progress{left:21%;bottom:5px;width:70%;height:2px}
#presentation-milestone:not([data-kind=evolution]).presentation-milestone-enter .presentation-milestone-panel{animation:presentation-notice-enter .18s ease-out}
@keyframes presentation-notice-enter{from{transform:translateY(-8px);opacity:0}to{transform:none;opacity:1}}
@media(max-width:700px) and (orientation:portrait){#presentation-milestone:not([data-kind=evolution]){top:226px;right:86px;width:min(292px,calc(100vw - 102px))}#presentation-milestone:not([data-kind=evolution]) .presentation-milestone-panel{height:84px;min-height:84px;padding-left:61px}#presentation-milestone:not([data-kind=evolution]) canvas{left:6px;width:51px;height:58px}}
@media(max-height:540px) and (min-width:600px){#presentation-milestone:not([data-kind=evolution]){top:126px;right:9px;width:270px}}

/* Party portraits use the same generated socket art as selection and combat. */
.presentation-party img { border:0; box-shadow:none; border-radius:0; padding:6px; background:var(--native-skill) center/100% 100% no-repeat; width:48px; height:48px; }

/* The last rendered arena stays visible beneath its native victory announcement. */
#presentation-finish[hidden]{display:none!important}
#presentation-finish{position:fixed;inset:0;z-index:98;display:grid;place-items:center;touch-action:none;pointer-events:auto;color:#fff0c5;font-family:"Pixelify Sans",monospace;text-align:center}
.presentation-finish-announcement{box-sizing:border-box;position:absolute;left:50%;top:32%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:min(600px,94vw);padding:0;image-rendering:pixelated}
.presentation-finish-announcement h1{font-size:clamp(30px,5vw,58px);line-height:1.04;margin:0;max-width:100%;overflow-wrap:anywhere;color:#ffe09a;text-shadow:2px 3px #172d36}
.presentation-finish-announcement p{box-sizing:border-box;font-size:clamp(18px,2.1vw,25px);line-height:1.12;margin:0;min-width:240px;max-width:90%;padding:19px 40px 22px;background:var(--native-nameplate) center/100% 100% no-repeat;overflow-wrap:anywhere;text-wrap:balance;text-shadow:1px 2px #172d36}
.presentation-finish-victory{display:block;width:100%;height:145px;object-fit:contain;image-rendering:pixelated}
.presentation-finish-victory[hidden]{display:none}
.finish-title-loaded h1{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
.presentation-finish-open #toast,.presentation-finish-open #presentation-combo,.presentation-finish-open #presentation-defense{visibility:hidden}
.presentation-finish-open .game-overlay{visibility:hidden;pointer-events:none}
.presentation-finish-announcement p[data-defeat-reason]{font-size:clamp(14px,1.8vw,20px);line-height:1.35}
.presentation-winner[data-defeat-reason]{font-size:clamp(14px,1.5vw,20px);line-height:1.4;text-wrap:balance}
@media(max-width:500px){.presentation-finish-announcement{top:36%;width:94vw;gap:2px}.presentation-finish-victory{height:94px}.presentation-finish-announcement h1{font-size:32px;padding:0 12px}.presentation-finish-announcement p{min-width:0;max-width:94%;font-size:19px;padding:17px 29px 20px}}
@media(max-height:420px) and (orientation:landscape){.presentation-finish-announcement{width:min(480px,66vw);top:34%}.presentation-finish-victory{height:94px}.presentation-finish-announcement p{font-size:20px;padding-top:16px;padding-bottom:19px}}
.presentation-action { min-width:0; width:220px; max-width:100%; }
.presentation-actions { width:min(730px,90vw); }
.presentation-action.chosen::before { content:''; width:14px; height:18px; background:var(--native-chevron) center/contain no-repeat; image-rendering:pixelated; }
@media(max-height:540px) and (orientation:landscape) {
  .presentation-result-content { display:grid; grid-template-columns:180px minmax(0,1fr); grid-template-rows:55px 66px minmax(0,1fr) 48px 16px; gap:1px 16px; padding:12px 24px; justify-items:center; align-items:center; }
  .presentation-brand { grid-column:1; grid-row:1; width:180px; max-height:53px; margin:0; }
  .presentation-outcome { grid-column:2; grid-row:1/3; width:100%; height:110px; margin:0; }
  .presentation-winner { grid-column:1; grid-row:2; font-size:19px; line-height:1.1; margin:0; }
  .presentation-heroes { grid-column:1; grid-row:3; height:100%; max-height:145px; width:180px; }
  .presentation-party { grid-column:2; grid-row:3; gap:6px; margin:0; align-self:start; }
  .presentation-party img { width:36px; height:36px; padding:5px; }
  .presentation-stats { grid-column:2; grid-row:3; align-self:end; max-width:100%; font-size:13px; line-height:1.25; margin:0 0 10px; }
  .presentation-actions { grid-column:1/-1; grid-row:4; width:100%; max-width:100%; gap:8px; }
  .presentation-action { font-size:16px; min-height:42px; width:auto; flex:1; padding:9px 18px; }
  .presentation-result-hint { grid-column:1/-1; grid-row:5; margin:0; font-size:10px; }
}
@media(max-width:700px) and (orientation:portrait) {
  .presentation-actions { display:grid; grid-template-columns:1fr; gap:6px; width:min(340px,88vw); }
  .presentation-action { width:100%; min-height:45px; font-size:18px; padding:9px 20px; }
  .presentation-party img { width:36px; height:36px; padding:5px; }
  .presentation-outcome { height:90px; }
  .presentation-result-content { padding:18px 12px; }
  .presentation-heroes { height:17vh; max-height:130px; }
}

/* One prominent cue at a time. Timers keep expiring while a higher-priority cue is shown. */
body.presentation-notice-open #presentation-combo,body.presentation-notice-open #presentation-defense,body.presentation-notice-open .local-sound-caption,
body.presentation-evolution-open #presentation-combo,body.presentation-evolution-open #presentation-defense,body.presentation-evolution-open .local-sound-caption,
body:has(#toast.visible) #presentation-combo,body:has(#toast.visible) #presentation-defense,body:has(#toast.visible) .local-sound-caption,
body:has(#presentation-defense:not([hidden])) #presentation-combo,body:has(#presentation-defense:not([hidden])) .local-sound-caption,
body:has(.local-sound-caption:not([hidden])) #presentation-combo{visibility:hidden}
/* Results reuse the lobby's native jade controls and reserve an explicit
   action column, rather than shrinking several long buttons across the screen. */
.presentation-result-shade{background:rgba(4,17,23,.62)}
.presentation-result-content{max-width:1240px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(260px,.8fr);grid-template-rows:auto auto auto auto auto auto;align-content:center;justify-items:center;gap:7px 42px;padding:32px 44px}
.presentation-brand{grid-column:1/-1;width:240px;height:76px;max-height:76px;margin:0 0 6px}
.presentation-outcome{grid-column:1;grid-row:2;width:100%;height:120px;margin:0}.presentation-winner{grid-column:1;grid-row:3;font-size:27px;line-height:1.2;max-width:100%;overflow-wrap:break-word;margin:0}
.presentation-heroes{grid-column:1;grid-row:4;width:100%;height:min(220px,25vh)}
.presentation-party{grid-column:1;grid-row:5}.presentation-party img{background:none;border:0;box-shadow:none;padding:0}
.presentation-stats{grid-column:1;grid-row:6;font-size:17px;line-height:1.4;margin:0;max-width:100%}
.presentation-actions{grid-column:2;grid-row:2/6;display:flex;flex-direction:column;gap:12px;width:100%;max-width:100%;align-self:center}
.presentation-action{width:100%;min-width:0;min-height:60px;height:auto;padding:18px 36px;font-size:21px;line-height:1.25;background:var(--menu-command) center/100% 100% no-repeat;color:#eadcbb;white-space:normal;overflow-wrap:break-word;text-shadow:1px 1px #122823}
.presentation-action:first-child{min-height:76px;background-image:var(--menu-primary);color:#26362d;text-shadow:none;font-size:25px}
.presentation-action.chosen,.presentation-action:hover,.presentation-action:focus-visible{background-image:var(--menu-command-active);transform:none;color:#fff0ba;filter:brightness(1.1)}
.presentation-action.chosen::before{display:none}.presentation-result-hint{grid-column:2;grid-row:6;font-size:13px;line-height:1.4;letter-spacing:.02em;margin:0}
@media(max-width:700px) and (orientation:portrait){.presentation-result-content{display:flex;flex-direction:column;justify-content:center;gap:6px;padding:18px 24px}.presentation-brand{height:58px;width:205px;max-height:58px;margin:0}.presentation-outcome{height:86px;width:100%;flex:none}.presentation-text-title{font-size:56px}.presentation-winner{font-size:22px}.presentation-heroes{height:min(160px,18vh);width:100%;flex:none}.presentation-party{gap:7px;margin:0}.presentation-party img{width:30px;height:30px}.presentation-stats{font-size:14px;margin:3px 0 8px;line-height:1.3}.presentation-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:min(420px,100%)}.presentation-action{font-size:15px;padding:14px 23px;min-height:52px}.presentation-action:first-child{grid-column:1/-1;min-height:58px;font-size:21px}.presentation-result-hint{font-size:11px;margin-top:3px}}
@media(max-width:360px) and (orientation:portrait){.presentation-result-content{padding:14px 16px;gap:4px}.presentation-brand{height:42px;max-height:42px;width:170px}.presentation-outcome{height:68px}.presentation-winner{font-size:19px}.presentation-heroes{height:95px}.presentation-party img{height:24px;width:24px}.presentation-stats{font-size:12px}.presentation-action{font-size:14px;padding:13px 20px;min-height:48px}.presentation-action:first-child{font-size:19px;min-height:54px}.presentation-text-title{font-size:48px}}
@media(max-height:540px) and (orientation:landscape){.presentation-result-content{grid-template-columns:minmax(0,1.15fr) minmax(200px,.85fr);gap:3px 24px;padding:16px 26px}.presentation-brand{height:40px;max-height:40px;width:170px;margin:0}.presentation-outcome{height:70px}.presentation-text-title{font-size:58px}.presentation-winner{font-size:19px}.presentation-heroes{height:96px;max-height:26vh}.presentation-party img{width:23px;height:23px}.presentation-stats{font-size:12px}.presentation-actions{gap:8px}.presentation-action{min-height:48px;font-size:16px;padding:13px 26px}.presentation-action:first-child{min-height:54px;font-size:20px}.presentation-result-hint{font-size:11px}}
