@import url('https://fonts.googleapis.com/css2?family=Grenze+Gotisch:wght@500;700&family=Press+Start+2P&family=Rajdhani:wght@500;600;700&display=swap');
:root{color-scheme:dark;--gold:#e9c76b;--parch:#e8dbc4;--ink:#21150f;--wood:#6a4228;--stone:#57575f;--stone2:#81818d;--panel:#241813;--panel2:#37241b;--red:#96343a;--blue:#365e9a;--green:#3f6e47}
*{box-sizing:border-box}html{background:#120e0d}body{margin:0;color:#f6ead3;font-family:Rajdhani,Arial,sans-serif;background:radial-gradient(circle at 50% -10%,#55413a 0,#2c1c16 26%,#120e0d 72%);min-height:100dvh}.f-top{max-width:1440px;margin:auto;min-height:56px;display:flex;align-items:center;gap:24px;padding:10px 20px;border-bottom:1px solid #4d372a;background:linear-gradient(180deg,#1a120f,#150f0d)}.back{font-size:.92rem;text-decoration:none;color:#e8c16d;font-weight:800;letter-spacing:.07em}.wordmark{margin:auto;font-weight:800;letter-spacing:.12em}.wordmark span{color:var(--gold)}.smallbtn{background:#2a1d17;color:#fff3d8;border:1px solid #6f5334;border-radius:8px;padding:8px 13px;cursor:pointer;font-weight:800}.smallbtn:hover{border-color:var(--gold)}
.f-main{max-width:1440px;margin:0 auto;padding:14px 22px 18px}.intro{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:12px}.eyebrow{color:#edcb7d;font-size:.72rem;letter-spacing:.18em;font-weight:900}.intro h1,.select h2,.end-content h2{font-family:'Grenze Gotisch',serif;font-size:clamp(1.7rem,3vw,2.8rem);letter-spacing:.05em;color:#fff2d8;text-shadow:2px 2px #5a3d2a,4px 4px #2a180e;margin:10px 0}.intro p{margin:4px 0;font-size:.9rem;letter-spacing:.1em;color:#d9c7ad}.stage-label{font-size:.82rem;letter-spacing:.08em;color:#e3d39e}.arcade{border:2px solid #71533e;box-shadow:0 12px 38px #0009;border-radius:16px;overflow:hidden;background:#130f0f}.fight-frame{position:relative;max-width:1150px;margin:auto;overflow:hidden;background:#0f0c0a}.fight-frame::after{content:"";pointer-events:none;position:absolute;inset:0;background:repeating-linear-gradient(0deg,transparent 0 3px,#00000012 3px 4px);opacity:.25}.hud{height:82px;position:absolute;top:0;left:0;right:0;z-index:3;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:10px 16px;background:linear-gradient(#190f0bcf,#140d0a48,transparent)}.combatant{width:39%}.combatant.two{text-align:right}.f-name{font:900 .88rem 'Press Start 2P','Courier New',monospace;color:#fff0d1;text-shadow:2px 2px #4a2717}.hp-shell{border:2px solid #f0ddaf;background:#422318;height:20px;margin-top:7px;padding:2px;transform:skew(-9deg);box-shadow:3px 3px #2a170f}.hp-shell.right{transform:skew(9deg)}.hp-fill{height:100%;width:100%;display:block;background:linear-gradient(90deg,#6dd16d,#cfdb6b,#e69053);transition:width .35s}.combatant.two .hp-fill{margin-left:auto}.combatant small{font-weight:800;color:#e0cfbc}.centre{text-align:center;min-width:120px}.round-label{color:#f6d67d;font:900 .75rem 'Press Start 2P','Courier New',monospace;text-shadow:2px 2px #6e4127}.phase{font-size:.68rem;color:#f6dd9c;margin-top:9px;font-weight:900;letter-spacing:.06em}#arena{width:100%;height:auto;max-height:clamp(220px,50dvh,600px);display:block;object-fit:contain;image-rendering:pixelated;background:transparent}.callout{position:absolute;z-index:5;top:26%;left:0;right:0;text-align:center;font:900 clamp(1rem,2.6vw,1.5rem) 'Press Start 2P','Courier New',monospace;color:#fff4d7;text-shadow:3px 3px #7b342f,-2px -2px #8e6d32;pointer-events:none;opacity:0;transform:scale(.86);transition:opacity .12s,transform .12s}.callout.show{opacity:1;transform:scale(1.04)}.overlay{position:absolute;z-index:8;inset:0;display:grid;place-items:center;background:#0a0706df;backdrop-filter:blur(2px);padding:14px}.overlay[hidden],.question-card[hidden],.feedback[hidden],.mainbtn[hidden]{display:none!important}.select-content,.end-content{text-align:center;max-width:760px;width:100%}.select p,.end-content p{margin:8px 0;color:#e3d4c8}.fighter-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:16px auto;max-width:720px}.fighter-choice{background:linear-gradient(#37251d,#1b1311);border:2px solid #81644c;border-radius:10px;display:flex;align-items:center;flex-direction:column;gap:8px;color:#fff;padding:10px 8px;cursor:pointer;transition:transform .12s,border-color .12s}.fighter-choice:hover,.fighter-choice:focus-visible{border-color:var(--gold);transform:translateY(-3px)}.fighter-choice img{width:92px;height:110px;object-fit:contain;image-rendering:pixelated}.fighter-choice strong{font:900 .75rem 'Press Start 2P','Courier New',monospace;color:#fff7eb}.fighter-choice span{font-size:.74rem;color:#efcd9c;letter-spacing:.04em}.bottom{max-width:1150px;margin:auto;background:linear-gradient(180deg,#1b110d,#0f0a08);border-top:2px solid #6b4d39}.progress{display:flex;align-items:center;gap:13px;padding:8px 15px;border-bottom:1px solid #3b2a22;min-height:45px}.phase-badge{color:var(--gold);font-size:.78rem;font-weight:900;white-space:nowrap;letter-spacing:.04em}.pips{display:flex;gap:6px}.pips span{width:13px;height:13px;border:2px solid #8a6965;transform:rotate(45deg);background:#221814}.pips span.lit{background:var(--gold);border-color:#ffe1a0;box-shadow:0 0 8px #ffd68f}.turn-desc{margin-left:auto;color:#d7c3b4;font-size:.79rem;line-height:1.15}.question-card{padding:10px 16px 12px}.q-head{display:flex;justify-content:space-between;color:#ffc182;font-size:.76rem;font-weight:900;letter-spacing:.06em}.question-card h2{font-size:clamp(1.03rem,1.55vw,1.2rem);margin:6px 0 9px;line-height:1.2;color:#fff7ef}.answers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.answer{min-height:38px;text-align:left;border:1px solid #7b6147;background:#2a1c14;border-radius:6px;color:#fdf9f6;padding:8px 11px;font:700 .93rem Rajdhani,Arial,sans-serif;cursor:pointer}.answer:hover:not(:disabled){background:#462a1a;border-color:#ffcf86}.answer.good{border-color:#80ee9a;background:#173425}.answer.bad{border-color:#f28b9a;background:#4f1f29}.feedback{margin-top:8px;background:#190f15;border-left:4px solid #ffbe67;padding:8px 10px;border-radius:0 6px 6px 0;font-size:.88rem;color:#eee0d4}.feedback.bad{border-left-color:#e05376}.mainbtn{margin-top:10px;border:none;background:linear-gradient(180deg,#ffdd8a,#e19a54);color:#2b1714;font:900 .85rem 'Press Start 2P','Courier New',monospace;padding:10px 13px;border-radius:7px;cursor:pointer;box-shadow:0 4px 0 #71412d}.instructions{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;padding:8px 16px 12px;border-top:1px solid #34241b;color:#d4bcaa;font-size:.73rem;letter-spacing:.05em}.under{max-width:1150px;margin:10px auto 0;color:#bba79d;font-size:.76rem;text-align:center}
@media(max-width:760px){.intro{flex-direction:column;align-items:flex-start}.fighter-choices{grid-template-columns:1fr}.answers{grid-template-columns:1fr}.progress{flex-wrap:wrap}.turn-desc{margin-left:0;width:100%}.instructions{flex-direction:column}.hud{padding:8px 8px;gap:8px}.f-name{font-size:.66rem}.combatant small{font-size:.66rem}.centre{min-width:82px}.round-label{font-size:.62rem}.phase{font-size:.58rem}}

.intro h1,.select h2,.end-content h2{font-family:'Grenze Gotisch','Palatino Linotype',serif!important;font-weight:700;letter-spacing:.01em;font-size:clamp(2.3rem,4vw,3.6rem)}

/* Sir Short's cinematic dialogue screens */
.sir-scene{position:absolute;z-index:14;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(8,5,13,.93);padding:10px}
.sir-scene[hidden]{display:none!important}
.sir-scene-shell{width:min(100%,823px);text-align:center}
.sir-art-wrap{position:relative;overflow:hidden;border:3px solid #ddbd72;border-radius:10px;box-shadow:0 0 0 4px #291a3d,0 12px 40px #000b}
.sir-art-wrap img{display:block;width:100%;height:auto;image-rendering:pixelated}

.sir-scene .mainbtn{font-size:clamp(.58rem,1.35vw,.85rem);margin:10px auto}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(prefers-reduced-motion:reduce){.sir-mouth{animation:none}}
@media(max-width:760px){.sir-scene{padding:5px}.sir-scene .mainbtn{font-size:.55rem;padding:8px}}

/* Dialogue uses two portrait sprites, not a CSS mouth patch. */
.sir-scene:not(.defeated) .sir-art-wrap img{aspect-ratio:823/253;object-fit:contain}
#sirContinue{min-height:44px;margin:14px auto 2px;padding:12px 24px;font-size:clamp(.65rem,1.4vw,.86rem)}
#sirContinue[hidden]{display:none!important}

/* Cinematic portraits are separately illustrated open/closed mouth sprites. */
.sir-scene-shell{width:min(100%,950px);max-height:100%;display:flex;flex-direction:column;align-items:center;gap:6px}
.sir-cinematic{width:100%;display:grid;grid-template-columns:minmax(0,46%) minmax(0,54%);background:#160f31;border:3px solid #dfb962;border-radius:10px;overflow:hidden;box-shadow:0 0 0 4px #291a3d,0 12px 40px #000b;align-items:stretch}
.sir-cinematic>img{width:100%;height:100%;min-height:0;max-height:min(38dvh,250px);object-fit:cover;object-position:center;image-rendering:pixelated}
.sir-copy{display:flex;flex-direction:column;align-items:stretch;justify-content:center;padding:10px;gap:7px;background:linear-gradient(145deg,#2c1855,#17142e)}
.sir-banner{font:bold clamp(.68rem,1.75vw,1.12rem) 'Press Start 2P','Courier New',monospace;background:#421a62;color:#ffda84;border:2px solid #e7bd64;border-radius:4px;padding:10px 7px;text-align:center;line-height:1.4}
.sir-speech{font:bold clamp(.78rem,1.7vw,1.12rem) Rajdhani,Arial,sans-serif;color:#20152c;background:#fff8e9;border:3px solid #282039;border-radius:12px;padding:clamp(9px,1.7vw,17px);margin:0;text-align:left;line-height:1.32}
.sir-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.sir-secondary{background:linear-gradient(#d5c0ef,#9161bd)}
.sir-scene.triumphant .sir-banner{background:#722d25;color:#fff0a8}
@media(max-width:600px){.sir-scene-shell{max-height:100%}.sir-cinematic{grid-template-columns:1fr 1fr}.sir-cinematic>img{max-height:180px}.sir-banner{font-size:.55rem;padding:6px 4px}.sir-copy{padding:6px}.sir-speech{font-size:.74rem;padding:7px;line-height:1.18}}
@media(prefers-reduced-motion:reduce){.sir-cinematic{transition:none}}

/* Sir Short victory expression sheets were separately drawn, not painted over. */
.sir-scene.triumphant .sir-cinematic{background:radial-gradient(ellipse at 30% 40%,#6834a2,#230e46 65%,#0a0820)}
.sir-scene.triumphant .sir-cinematic>img{object-fit:contain;image-rendering:pixelated;padding:5px;background:radial-gradient(circle at 50% 35%,#3e206a,#0b0a27)}

/* V9: both talking frames occupy identical dimensions; layout never moves. */
.sir-cinematic{grid-template-columns:minmax(0,46%) minmax(0,54%);align-items:stretch}
.sir-cinematic>img,.sir-scene.triumphant .sir-cinematic>img{box-sizing:border-box;display:block;width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:823/350;object-fit:cover;object-position:center center;padding:0;border:0;image-rendering:pixelated}
.sir-scene .sir-art-wrap{display:none}
.sir-actions .mainbtn[hidden]{display:none!important}

/* Clean artwork has no embedded text: all dialogue is live, accessible HTML only. */
.sir-scene.triumphant .sir-cinematic>img,.sir-scene.defeated .sir-cinematic>img{object-fit:cover;object-position:center;aspect-ratio:420/380;background:#251644}

/* V11: unified result cinema sizing. Never crop Sir Short's portrait. */
.sir-scene .sir-cinematic{
  display:grid;
  grid-template-columns:minmax(0,42%) minmax(0,58%);
  align-items:stretch;
  width:100%;
  min-height:215px;
  max-height:min(54dvh,320px);
}
.sir-scene .sir-cinematic > img,
.sir-scene.triumphant .sir-cinematic > img,
.sir-scene.defeated .sir-cinematic > img{
  width:100%;height:100%;
  min-width:0;min-height:0;
  max-width:100%;max-height:100%;
  aspect-ratio:auto;
  object-fit:contain;
  object-position:center center;
  padding:0;
  background:#201337;
  box-sizing:border-box;
}
.sir-scene .sir-copy{min-width:0;overflow-wrap:break-word}
.sir-scene .sir-actions{display:flex;justify-content:center;align-items:stretch;gap:12px;width:100%}
.sir-scene .sir-actions .mainbtn,
.sir-scene #sirContinue,
.sir-scene #sirMainMenu{
  box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;
  margin:10px 0 4px;width:clamp(170px,25vw,280px);height:50px;min-height:50px;
  padding:9px 12px;font-size:clamp(.58rem,.98vw,.76rem);line-height:1.3;
  text-align:center;white-space:normal;
}
.sir-scene .sir-actions .mainbtn[hidden]{display:none!important}
@media(max-width:600px){
 .sir-scene .sir-cinematic{grid-template-columns:minmax(0,40%) minmax(0,60%);min-height:180px;max-height:min(52dvh,290px)}
 .sir-scene .sir-actions{gap:7px}
 .sir-scene .sir-actions .mainbtn,.sir-scene #sirContinue,.sir-scene #sirMainMenu{
  flex:0 1 48%;width:auto;min-width:0;height:49px;min-height:49px;padding:6px 8px;font-size:.53rem;
 }
}


/* V12: result screens use natural artwork sizing with no visible letterbox fill. */
.sir-scene .sir-cinematic{
  grid-template-columns:minmax(0,44%) minmax(0,56%);
  align-items:stretch;
  width:100%;
  min-height:0;
  max-height:none;
  background:linear-gradient(145deg,#1a1030,#130d22);
}
.sir-scene .sir-cinematic > img,
.sir-scene.triumphant .sir-cinematic > img,
.sir-scene.defeated .sir-cinematic > img{
  display:block;
  width:100%;
  height:auto;
  max-height:min(56dvh,360px);
  align-self:start;
  justify-self:stretch;
  object-fit:unset;
  object-position:center center;
  aspect-ratio:auto;
  background:transparent;
  padding:0;
}
.sir-scene .sir-copy{
  justify-content:center;
}
@media(max-width:600px){
  .sir-scene .sir-cinematic{grid-template-columns:minmax(0,42%) minmax(0,58%)}
  .sir-scene .sir-cinematic>img,
  .sir-scene.triumphant .sir-cinematic>img,
  .sir-scene.defeated .sir-cinematic>img{
    max-height:min(42dvh,260px);
  }
}


/* V13: scene-specific artwork composition. The source images themselves no
   longer include solid-colour sidebars, speech bubbles, or embedded buttons. */
.sir-scene .sir-cinematic,
.sir-scene.triumphant .sir-cinematic,
.sir-scene.defeated .sir-cinematic {
  display:grid;
  grid-template-columns:minmax(0,44%) minmax(0,56%);
  width:100%;
  max-height:none;
  min-height:0;
  align-items:stretch;
  background:#23173c;
}
.sir-scene .sir-cinematic>img,
.sir-scene.triumphant .sir-cinematic>img,
.sir-scene.defeated .sir-cinematic>img {
  display:block;
  width:100%;
  height:auto;
  max-height:none;
  min-height:0;
  max-width:100%;
  aspect-ratio:4/3;
  object-fit:fill;
  object-position:center;
  padding:0;
  margin:0;
  border:0;
  background:transparent;
  align-self:stretch;
}
.sir-scene[data-scene="intro"] .sir-cinematic{
  grid-template-columns:minmax(0,54%) minmax(0,46%);
}
.sir-scene[data-scene="intro"] .sir-cinematic>img{
  aspect-ratio:823/350;
  object-fit:fill;
}
.sir-scene .sir-copy{align-self:stretch;justify-content:center}
@media(max-width:600px){
 .sir-scene .sir-cinematic,.sir-scene.triumphant .sir-cinematic,.sir-scene.defeated .sir-cinematic{grid-template-columns:44% 56%}
 .sir-scene[data-scene="intro"] .sir-cinematic{grid-template-columns:54% 46%}
}

/* Fight Knight three-stage campaign and reflective R093 report */
.sir-scene .sir-cinematic{grid-template-columns:minmax(0,46%) minmax(0,54%);max-height:min(56dvh,340px);min-height:0;}
.sir-scene .sir-cinematic>img,.sir-scene.triumphant .sir-cinematic>img,.sir-scene.defeated .sir-cinematic>img{width:100%;height:100%;max-height:340px;object-fit:cover;object-position:50% 45%;aspect-ratio:auto;background:transparent;border:0;}
.battle-report{max-width:1130px;margin:24px auto 42px;padding:24px;background:linear-gradient(150deg,#261a26,#17121b);border:2px solid #ba854b;border-radius:14px;box-shadow:0 16px 40px #0008;color:#f4e7cf}
.battle-report[hidden]{display:none}.report-top{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.report-top h2{font-family:'Grenze Gotisch',Georgia,serif;font-size:clamp(2rem,4vw,3rem);margin:4px 0}.report-top p{margin:5px 0 18px;color:#ddcbb6}.report-scores{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}.report-score{border:1px solid #876242;border-radius:9px;padding:13px;background:#35251f}.report-score strong{display:block;font:900 clamp(1.4rem,3vw,2rem) Rajdhani,Arial;color:#ffe08a}.report-score span{font-size:.85rem}.report-topics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.report-topic{padding:14px;border:1px solid #6d5848;border-radius:8px;background:#211a19}.report-topic h3{margin:0;font-size:1.1rem;color:#ffe3ae}.report-topic p{margin:7px 0;font-size:.9rem}.report-meter{height:9px;background:#543c32;border-radius:9px;overflow:hidden}.report-meter span{display:block;height:100%;background:#86cf89}.report-topic a{color:#ffdc8a}.report-filter{display:flex;gap:8px;margin:10px 0}.report-filter button{padding:9px 13px;border:1px solid #8b694b;border-radius:6px;background:#2c201d;color:#f9e8ce;cursor:pointer}.report-filter button[aria-pressed="true"]{background:#a76d37;border-color:#f1c481;color:#fff}.report-questions{max-height:430px;overflow:auto;border:1px solid #725841;border-radius:8px}.report-item{padding:12px 14px;background:#201a1a;border-bottom:1px solid #49352e}.report-item:last-child{border:0}.report-item strong{display:block;margin:3px 0}.report-item small{color:#f0bd76}.report-item p{margin:3px 0;font-size:.94rem}.report-item.correct{border-left:4px solid #7ec79a}.report-item.wrong{border-left:4px solid #ec8d79}.report-footer{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.report-link{color:#f5d18e}
@media(max-width:700px){.report-scores{grid-template-columns:repeat(3,minmax(0,1fr))}.report-topics{grid-template-columns:1fr}.battle-report{margin:12px;padding:14px}.report-top{flex-direction:column}.sir-scene .sir-cinematic{grid-template-columns:43% 57%}.sir-scene .sir-cinematic>img{max-height:250px}}

/* V16: PDF and shareable image report */
.report-download{border:1px solid #76553b;background:#211612;border-radius:12px;margin:16px 0;padding:13px 17px;display:flex;flex-wrap:wrap;align-items:center;gap:15px}
.report-download p{margin:0;color:#e4cfae;font-size:1rem}
.report-download button{margin:0;min-height:46px;line-height:1.4}
@media(max-width:640px){.report-download{display:block}.report-download p{margin-top:12px}}

.share-report-actions{display:flex;align-items:center;justify-content:flex-start;gap:14px;flex-wrap:wrap}.share-report-actions .mainbtn{min-height:46px;white-space:normal;line-height:1.4}#shareResultsStatus{min-height:1.25em;font-size:.9rem;color:#f7d99b}

/* QA controls are invisible until the private key sequence is entered. */
#fkQaPanel[hidden]{display:none!important}
#fkQaPanel{position:fixed;inset:0;z-index:99999;background:rgba(5,4,12,.94);display:flex;align-items:center;justify-content:center;padding:18px}
#fkQaPanel .fk-qa-box{width:min(100%,550px);max-height:calc(100dvh - 36px);overflow:auto;background:#261632;color:#fff2d9;border:2px solid #e9c76b;border-radius:12px;box-shadow:0 12px 50px #000b;padding:24px;text-align:center}
#fkQaPanel h2{font-family:'Grenze Gotisch',Georgia,serif;font-size:1.8rem;margin:0 0 16px}
#fkQaChoices{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#fkQaPanel button{border:1px solid #d7b77a;border-radius:7px;background:#49305d;color:#fff4d4;cursor:pointer;min-height:46px;padding:10px 9px;font:700 .95rem Rajdhani,Arial,sans-serif}
#fkQaPanel button:hover,#fkQaPanel button:focus-visible{background:#73508c;outline:2px solid #ffe2a3}
#fkQaCancel{margin-top:14px;background:#5a303a!important;min-width:130px}
@media(max-width:460px){#fkQaChoices{grid-template-columns:1fr}}


/* V18 scene and balance polish */
.sir-scene .sir-scene-shell{width:min(100%,980px);gap:10px}
.sir-scene .sir-cinematic,
.sir-scene.triumphant .sir-cinematic,
.sir-scene.defeated .sir-cinematic{
  grid-template-columns:minmax(0,42%) minmax(0,58%)!important;
  max-height:none!important;
  min-height:260px;
  background:#24153f!important;
  align-items:stretch!important;
}
.sir-scene .sir-cinematic>img,
.sir-scene.triumphant .sir-cinematic>img,
.sir-scene.defeated .sir-cinematic>img{
  width:100%!important;
  height:100%!important;
  max-height:min(48vh,430px)!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center center!important;
  background:#201335!important;
  padding:0!important;
}
.sir-scene[data-scene="intro"] .sir-cinematic{grid-template-columns:minmax(0,50%) minmax(0,50%)!important}
.sir-scene[data-scene="intro"] .sir-cinematic>img{max-height:min(44vh,360px)!important}
.sir-scene .sir-copy{display:flex;flex-direction:column;justify-content:center;padding:18px 14px;min-width:0}
.sir-scene .sir-banner{margin:0 0 12px}
.sir-scene .sir-speech{margin:0}
.sir-scene .sir-actions{gap:14px;align-items:center}
.sir-scene .sir-actions .mainbtn,
.sir-scene #sirContinue,
.sir-scene #sirMainMenu{margin:0;min-width:280px;white-space:nowrap;line-height:1.2}
@media(max-width:760px){
  .sir-scene .sir-cinematic,.sir-scene.triumphant .sir-cinematic,.sir-scene.defeated .sir-cinematic{grid-template-columns:1fr!important;min-height:0}
  .sir-scene .sir-cinematic>img,.sir-scene.triumphant .sir-cinematic>img,.sir-scene.defeated .sir-cinematic>img{max-height:min(40vh,280px)!important}
  .sir-scene .sir-actions .mainbtn,.sir-scene #sirContinue,.sir-scene #sirMainMenu{min-width:0;width:100%}
}


/* V20: a cleaner arcade-style comic burst for the boosted third strike. */
.critical-burst{position:absolute;z-index:7;left:60%;top:36%;width:clamp(170px,24vw,280px);aspect-ratio:1;display:grid;place-items:center;pointer-events:none;opacity:0;transform:translate(-50%,-50%) rotate(-12deg) scale(.2);filter:drop-shadow(0 6px 0 #2b1714) drop-shadow(0 0 0 #000);}
.critical-burst::before,.critical-burst::after{content:"";position:absolute;inset:0;clip-path:polygon(50% 0%,59% 18%,77% 3%,77% 25%,100% 22%,87% 42%,100% 58%,79% 66%,84% 92%,60% 80%,48% 100%,37% 80%,11% 92%,18% 67%,0% 56%,16% 41%,3% 20%,28% 25%);}
.critical-burst::before{background:#35172b;transform:scale(1.04);}
.critical-burst::after{inset:10px;background:linear-gradient(180deg,#fff3a2 0%,#ffca53 45%,#ff9540 100%);}
.critical-burst span{position:relative;z-index:1;display:block;padding:.25em .15em .1em;font-family:'Press Start 2P','Courier New',monospace;font-weight:900;line-height:1.15;letter-spacing:.03em;text-align:center;color:#fff7db;text-shadow:-2px 0 #481626,2px 0 #481626,0 -2px #481626,0 2px #481626,4px 4px 0 #c43642;}
.critical-burst span::first-line{font-size:clamp(.74rem,1.45vw,1rem);}
.critical-burst.show{animation:fkCriticalPop 1.1s both;}
@keyframes fkCriticalPop{0%{opacity:0;transform:translate(-50%,-50%) rotate(-18deg) scale(.2)}16%{opacity:1;transform:translate(-50%,-50%) rotate(-11deg) scale(1.18)}32%{transform:translate(-50%,-50%) rotate(-13deg) scale(.98)}80%{opacity:1;transform:translate(-50%,-50%) rotate(-11deg) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) rotate(-8deg) scale(1.08)}}
@media(prefers-reduced-motion:reduce){.critical-burst.show{animation:none;opacity:1;transform:translate(-50%,-50%) scale(1)}}

/* V21: use the actual approved pixel-art CRITICAL HIT artwork, unchanged. */
.critical-burst {
  left:61%; top:38%;
  width:clamp(165px,27vw,310px);
  aspect-ratio:1;
  background: transparent url('fk-critical-hit.png') center / contain no-repeat;
  image-rendering:pixelated;
  filter:drop-shadow(0 5px 5px rgba(0,0,0,.45));
}
.critical-burst::before,.critical-burst::after,.critical-burst span{display:none!important}

/* V23: approved illustrations; each card remains a native keyboard button.
   Blue/red are CSS crops of the original approved group image, unchanged. */
.fight-frame:has(#selectPanel:not([hidden])) #arena{min-height:590px}
#selectPanel{position:absolute;overflow-y:auto;padding:22px 18px;background:radial-gradient(ellipse at top,#253962,#10182c 70%);backdrop-filter:none}
#selectPanel .select-content{max-width:940px;margin:auto}
#selectPanel h2{margin:8px 0;font-size:clamp(1.5rem,3vw,2.4rem)}
#selectPanel .fighter-choices{grid-template-columns:repeat(3,minmax(0,1fr));max-width:900px;gap:18px;margin:18px auto}
#selectPanel .fighter-choice{min-width:0;gap:7px;padding:10px 10px 14px;border:2px solid #b99958;border-radius:14px;background:linear-gradient(#192e53,#0d1426);box-shadow:0 6px 14px #0007;transition:transform .15s,border-color .15s}
#selectPanel .fighter-choice:hover{transform:translateY(-4px);border-color:#ffdf8c}
#selectPanel .fighter-choice:focus-visible{outline:4px solid #fff5bd;outline-offset:4px;border-color:#fff}
#selectPanel .fighter-choice strong{font:700 clamp(1rem,1.7vw,1.35rem) Georgia,serif;color:#fff2cc;line-height:1.2}
#selectPanel .selection-art{display:block;width:100%;aspect-ratio:1;overflow:hidden;border-radius:8px;background-repeat:no-repeat;letter-spacing:normal}
#selectPanel .azure-art{background-image:url('selection-knights-approved.png');background-size:388.84% 241.28%;background-position:13.69% 56.26%}
#selectPanel .crimson-art{background-image:url('selection-knights-approved.png');background-size:491.77% 241.28%;background-position:81.83% 56.26%}
#selectPanel .verdant-art{background:radial-gradient(ellipse,#234b42,#101a2f)}
#selectPanel .verdant-art img{width:100%;height:100%;object-fit:contain;image-rendering:auto;transform:scale(1.1)}
#selectPanel .choose-label{display:block;min-height:32px;padding:9px 4px 0;color:#ffe5a2;font-size:.72rem;font-weight:800;letter-spacing:.04em}
#selectPanel .select-help{max-width:720px;margin:10px auto;line-height:1.45;font-size:.9rem}
@media(max-width:600px){
.fight-frame:has(#selectPanel:not([hidden])) #arena{min-height:620px}
#selectPanel{padding:18px 12px}
#selectPanel .fighter-choices{grid-template-columns:1fr;gap:12px;margin:14px auto}
#selectPanel .fighter-choice{display:grid;grid-template-columns:112px 1fr;grid-template-rows:auto auto auto;text-align:left;column-gap:16px;padding:10px}
#selectPanel .selection-art{grid-column:1;grid-row:1/4;width:112px}
#selectPanel .fighter-choice strong{font-size:1.1rem;align-self:end}
#selectPanel .choose-label{padding-top:2px;min-height:24px}
}
@media(max-height:500px) and (min-width:601px){
.fight-frame:has(#selectPanel:not([hidden])) #arena{min-height:460px}
#selectPanel{padding:12px}
#selectPanel .fighter-choices{max-width:700px;gap:12px;margin:10px auto}
#selectPanel .selection-art{max-height:190px}
}
@media(prefers-reduced-motion:reduce){#selectPanel .fighter-choice{transition:none}}
/* V24: matching backgrounds and complete, unclipped transparent artwork. */
#selectPanel .selection-art{background-color:#152636;background-image:none}
#selectPanel .azure-art,#selectPanel .crimson-art{background-image:url('selection-knights-clean.png');background-size:200% 100%;background-repeat:no-repeat}
#selectPanel .azure-art{background-position:left center}
#selectPanel .crimson-art{background-position:right center}
#selectPanel .verdant-art{background:#152636}
#selectPanel .verdant-art img{transform:none;object-fit:contain}
