/* MechaProfessor cockpit HUD (b48). Patrick: "I also want the UI to take a bit of inspo from our other Professor App with
   the red and evangelion references". The design language of the teardown's Twin Eyes skin: a black and red console, data-plate
   type (stencil header tabs, condensed labels, mono readouts that glow), and three moods: tactical at rest, full alert when
   something is about to land (edge pulse, warning tapes), a title card when a boss walks on.
   This is the squirrels' instrument panel, laid over the film. The film keeps its own layer: the poster title, the 2.35
   letterbox, the reel cards, the newsreel subtitles, the banners and the score pop-ups stay Showa (index.html). */
:root {
  --y: #e8281a; --yt: #ff4a38; --glow: #ff2a14; --ck: #0b0907; --ckA: rgba(11,9,7,.86); --ln: #3b3226; --ln2: #5a1f18; --bone: #f4efe6;
  --amb: #ffb040; --cy: #8fd0ff; --grn: #2bff8a;
  --fhead: 'Big Shoulders Stencil Display', 'Arial Narrow', Impact, sans-serif; --flabel: 'Barlow Condensed', 'Arial Narrow', sans-serif; --fread: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --vt: 0px; --vh: 100vh;   /* the film frame (set by main.js resize): top and height of the 2.35 band */
}

/* ---------- parts ---------- */
#hud .plate { position: absolute; background: var(--ckA); border: 1.5px solid var(--ln); border-top: 2px solid var(--y); box-shadow: 0 2px 5px rgba(0,0,0,.55); }
#hud .tab { position: absolute; left: -1.5px; top: -2px; height: 20px; padding: 0 16px 0 8px; background: var(--y); color: var(--ck); font: 800 17px/20px var(--fhead); letter-spacing: .05em;
  white-space: nowrap; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
#hud .tab em { font: 700 12px/20px serif; font-style: normal; margin-left: 6px; letter-spacing: .08em; opacity: .85; }
#hud .read { font: 500 14px/1 var(--fread); color: var(--yt); text-shadow: 0 0 7px var(--glow); }

/* ---------- hull (top left) ---------- */
#crew { left: calc(10px + var(--sal)); top: calc(10px + var(--sat)); width: 236px; padding: 25px 8px 7px; display: flex; gap: 8px; align-items: center; }
#crewImg { width: 36px; height: 36px; object-fit: cover; border: 1px solid var(--ln2); filter: grayscale(1) sepia(1) hue-rotate(-38deg) saturate(3.2) contrast(1.15) brightness(.85); }
#crewBox { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
#hullRow { display: flex; align-items: center; gap: 7px; }
#hull { flex: 1; height: 13px; background: #1a0d0a; border: 1px solid var(--ln2); position: relative; overflow: hidden; }
#hullFill { position: absolute; inset: 0; right: auto; width: 100%; transition: width .15s; background: repeating-linear-gradient(90deg, var(--yt) 0 6px, transparent 6px 8px); box-shadow: 0 0 8px var(--glow); }
#hull.low #hullFill { animation: blink .4s steps(2) infinite; }
#hullN { width: 28px; text-align: right; }
#steam { height: 8px; background: #17110c; border: 1px solid var(--ln); position: relative; margin-right: 35px; }
#steamFill { position: absolute; inset: 0; right: auto; width: 0; background: linear-gradient(90deg, #7a4a12, var(--amb)); }
#steam.full #steamFill { background: var(--bone); box-shadow: 0 0 8px var(--amb); }
#steam i { position: absolute; top: -2px; bottom: -2px; left: 85%; width: 1.5px; background: var(--bone); }   /* full steam: what a steel tower needs */
#steam span { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 6px; font: 700 12px/1 var(--flabel); letter-spacing: .06em; color: var(--amb); }

/* ---------- score, pot, multiplier (top centre) ---------- */
#scoreBox { position: absolute; top: calc(4px + var(--sat)); left: 50%; transform: translateX(-50%); text-align: center; display: flex; flex-direction: column; align-items: center; }
#score { font: 800 46px/.95 var(--fhead); letter-spacing: .03em; color: var(--bone); text-shadow: 0 0 14px rgba(255,42,20,.8), 0 2px 0 #000; }
#pot { margin-top: 4px; display: inline-flex; align-items: center; gap: 7px; height: 26px; padding-right: 9px; background: var(--ckA); border: 1.5px solid var(--ln); opacity: .3; transition: opacity .2s;
  pointer-events: auto; cursor: pointer; position: relative; font: 500 16px/1 var(--fread); color: var(--bone); white-space: nowrap; }
#pot.on { opacity: 1; }
#pot .tab { position: static; height: 23px; line-height: 23px; margin: 0; font-size: 16px; }
#pot .x { color: var(--yt); }
#mult { background: var(--y); color: var(--ck); font: 800 21px/22px var(--fhead); padding: 0 7px; min-width: 24px; text-align: center; }
#mult.pulse { animation: pulse .35s; }
#potVal { color: var(--yt); text-shadow: 0 0 7px var(--glow); }
#pot .bankHint { display: none; position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 9px; font: 700 13px/1 var(--flabel); letter-spacing: .1em; color: var(--amb); font-style: normal; white-space: nowrap; text-shadow: 0 1px 2px #000; }
#pot.bankable .bankHint { display: block; animation: blink 1s steps(2) infinite; }
#streakBar { width: 100%; min-width: 150px; height: 4px; background: #24100c; margin-top: 3px; }
#streakFill { height: 100%; width: 0; background: var(--yt); box-shadow: 0 0 6px var(--glow); }
#streakN { font: 700 12px/1.2 var(--flabel); letter-spacing: .14em; color: rgba(244,239,230,.62); margin-top: 3px; min-height: 14px; text-shadow: 0 1px 2px #000; }
/* the last moves; a stale one is struck through with what it pays */
#moves { margin-top: 2px; display: flex; gap: 4px; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; white-space: nowrap; font: 700 13px/1 var(--flabel); letter-spacing: .06em; }
#moves.on { opacity: 1; }
#moves .mv { display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 6px; background: var(--ckA); border: 1px solid var(--ln); color: var(--bone); }
#moves .mv i { font: 700 12px/1 serif; font-style: normal; color: var(--yt); }
#moves .mv.new { border-color: var(--yt); animation: pulse .3s; }
#moves .mv.stale { color: rgba(244,239,230,.45); text-decoration: line-through; border-color: #2a2420; }
#moves .mv u { text-decoration: none; display: inline-block; color: var(--amb); }
#moves b { color: rgba(244,239,230,.4); font-weight: 400; }

/* ---------- reel clock and quota (top right) ---------- */
#rightBox { right: calc(10px + var(--sar)); top: calc(10px + var(--sat)); width: 206px; padding: 24px 8px 7px; text-align: right; }
#timer { font: 800 32px/1 var(--fhead); letter-spacing: .04em; color: var(--bone); text-shadow: 0 0 10px rgba(255,42,20,.7); }
#timer.low { color: var(--yt); animation: blink .5s steps(2) infinite; }
#quota { font: 600 13px/1.25 var(--flabel); letter-spacing: .06em; color: rgba(244,239,230,.8); margin-top: 3px; white-space: nowrap; }
#quota b { font: 500 13px/1 var(--fread); color: var(--yt); text-shadow: 0 0 6px var(--glow); }
#quota i { font-style: normal; color: var(--amb); }
#rule { margin-top: 5px; padding-top: 4px; border-top: 1px solid var(--ln2); text-align: left; font: 700 13px/16px var(--flabel); letter-spacing: .05em; color: var(--bone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#rule b { display: inline-block; background: var(--y); color: var(--ck); font: 700 12px/16px serif; padding: 0 4px; margin-right: 6px; } #rule.off { text-decoration: line-through; opacity: .55; } #rule.off b { background: var(--grn); }
#xp { height: 9px; margin-top: 4px; border: 1px solid var(--ln2); background: repeating-linear-gradient(-45deg, #1c1410 0 5px, #0e0a08 5px 10px); position: relative; }
#xpFill { height: 100%; width: 0; background: var(--yt); transition: width .2s; }
#xpPot { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(90deg, rgba(255,176,64,.75) 0 3px, rgba(255,176,64,.2) 3px 6px); }
#paceTick { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--bone); box-shadow: 0 0 0 1px #000; }
#xp.behind #xpFill { background: #8a140c; }
#xp.met { border-color: var(--grn); } #xp.met #xpFill { background: var(--grn); }
#lvl { font: 700 13px/1.2 var(--flabel); letter-spacing: .05em; color: var(--yt); margin-top: 5px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
#lvl b { color: var(--bone); font-weight: 700; } #lvl em { font-style: normal; }
#lvl i { flex: 1; min-width: 20px; height: 6px; background: #1a0d0a; border: 1px solid var(--ln2); display: block; } #lvl u { display: block; height: 100%; background: var(--amb); }   /* rampage XP */
#btns { position: absolute; right: 100%; top: -2px; margin-right: 8px; display: flex; gap: 6px; pointer-events: auto; }
.sbtn { width: 34px; height: 34px; padding: 0; background: #1d1a16; color: var(--yt); border: 1.5px solid var(--ln2); border-radius: 2px; font: 700 16px/1 var(--flabel); cursor: pointer; }
@media (pointer: coarse) { .sbtn { width: 44px; height: 44px; } }

/* ---------- weapons, forces ticker (bottom) ---------- */
#weapons { position: absolute; left: calc(10px + var(--sal)); bottom: calc(10px + var(--sab)); display: flex; gap: 4px; }
.wpn { width: 36px; height: 36px; background: var(--ckA); border: 1.5px solid var(--ln); border-top: 2px solid var(--y); display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--bone); position: relative; }
.wpn.fire { animation: wfire .38s ease-out; } @keyframes wfire { 0% { transform: scale(1.45); background: var(--yt); color: var(--ck); box-shadow: 0 0 14px var(--glow); } 100% { transform: none; } }
.wpn i { position: absolute; bottom: 0; right: 2px; font: 500 12px/1 var(--fread); font-style: normal; color: var(--yt); }
#forces { position: absolute; left: 50%; bottom: calc(8px + var(--sab)); transform: translateX(-50%); z-index: 5; pointer-events: none; white-space: nowrap; height: 23px; padding: 0 10px 0 72px;
  background: #050403; border: 1.5px solid var(--ln2); font: 500 12px/20px var(--fread); color: var(--yt); text-shadow: 0 0 6px var(--glow); }
#forces::before { content: 'FORCES'; position: absolute; left: 0; top: 0; bottom: 0; width: 62px; background: var(--y); color: var(--ck); font: 800 16px/20px var(--fhead); letter-spacing: .05em; text-align: center; text-shadow: none; }
#forces b { color: var(--bone); font-weight: 500; text-shadow: none; } #forces i { color: var(--amb); font-style: normal; }
#forces:empty { display: none; }

/* ---------- the three round controls ---------- */
.cbtn { position: absolute; border-radius: 50%; pointer-events: auto; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--rc) calc(var(--p, 0) * 1%), #1c1512 0); box-shadow: 0 0 0 2px #050403, 0 0 0 3.5px var(--ln), 0 3px 8px rgba(0,0,0,.6); }
.cbtn span { width: calc(100% - 12px); height: calc(100% - 12px); border-radius: 50%; background: radial-gradient(circle at 40% 30%, #2a2420, #0b0907 72%); display: flex; align-items: center; justify-content: center; text-align: center;
  font: 700 13px/1.05 var(--flabel); letter-spacing: .06em; color: rgba(244,239,230,.55); }
.cbtn kbd { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); padding: 1px 5px; background: #050403; border: 1px solid var(--ln); color: var(--yt); font: 500 11px/1.1 var(--fread); }
@media (pointer: coarse) { .cbtn kbd { display: none; } }
#hyperBtn { --rc: var(--y); right: calc(16px + var(--sar)); bottom: calc(16px + var(--sab)); width: 88px; height: 88px; }
#hyperBtn.ready span { background: var(--y); color: var(--ck); animation: blink .5s steps(2) infinite; }
#pieceCycle { position: absolute; left: -10px; top: -6px; width: 30px; height: 30px; border-radius: 50%; background: #050403; border: 1px solid var(--ln); color: var(--bone); font-style: normal; font-size: 16px; line-height: 28px; text-align: center; pointer-events: auto; }
#shieldBtn { --rc: var(--cy); --p: 100; right: calc(116px + var(--sar)); bottom: calc(20px + var(--sab)); width: 72px; height: 72px; }
#shieldBtn.ready span { color: var(--cy); }
#shieldBtn.up span { background: var(--cy); color: var(--ck); }
#shieldBtn.urgent.ready { animation: pulse .5s infinite; }
#shieldBtn.now span { background: var(--bone); color: var(--y); }
#jumpBtn { --rc: var(--amb); right: calc(24px + var(--sar)); bottom: calc(116px + var(--sab)); width: 70px; height: 70px; }
#jumpBtn.ready span { color: var(--amb); }

/* ---------- chains, Set Piece aim ---------- */
#chainHud { position: absolute; left: 50%; top: calc(var(--vt) + var(--vh) * .2); transform: translateX(-50%) scale(.9); opacity: 0; pointer-events: none; transition: opacity .25s;
  font: 800 24px/1 var(--fhead); letter-spacing: .06em; color: var(--bone); text-shadow: 0 2px 0 rgba(0,0,0,.7), 0 0 14px rgba(255,42,20,.5); white-space: nowrap; }
#chainHud.on { opacity: 1; }
#chainHud i { font: 700 16px/1 serif; font-style: normal; margin-right: 8px; color: var(--yt); }
#chainHud b { font-size: 38px; color: var(--bone); }
#chainHud u { text-decoration: none; font-size: 20px; margin-left: 6px; color: var(--amb); }
#chainHud.hot b { color: var(--yt); }
#chainHud.bump { animation: chainBump .22s ease-out; }
#aimInfo { position: absolute; left: 50%; bottom: calc(100vh - var(--vt) - var(--vh) + var(--vh) * .1); transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .15s;
  font: 700 15px/1.2 var(--flabel); letter-spacing: .08em; color: var(--bone); background: var(--ckA); border: 1.5px solid var(--ln); border-top: 2px solid var(--y); padding: 5px 12px; white-space: nowrap; }
#aimInfo.on { opacity: 1; }
#aimInfo b { color: var(--yt); } #aimInfo u { text-decoration: none; color: var(--amb); font: 500 17px/1 var(--fread); }

/* ---------- off-screen threat pips ---------- */
#pips { position: fixed; inset: 0; pointer-events: none; z-index: 6; }
#pips .pip { position: absolute; left: 0; top: 0; width: 0; height: 0; margin: -9px 0 0 -14px; display: none;
  border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 16px solid rgba(255,176,64,.9); filter: drop-shadow(0 0 2px #000); }
#pips .pip.big { border-left-color: var(--y); border-top-width: 12px; border-bottom-width: 12px; border-left-width: 22px; }
#pips .pip.hot { border-left-color: var(--yt); animation: blink .3s steps(2) infinite; }

/* ---------- alert: what is about to land, and what to do about it. --wc follows the tell's colour ---------- */
body { --wc: var(--y); --eg: rgba(255,40,14,.5); }
body[data-tell="orange"] { --wc: var(--amb); --eg: rgba(255,150,30,.46); }
body[data-tell="white"] { --wc: #eef2ff; --eg: rgba(228,236,255,.42); }
#warn { position: absolute; left: 50%; top: calc(var(--vt) + var(--vh) * .66); transform: translateX(-50%); min-width: 190px; text-align: center; padding: 13px 14px 11px;
  background: rgba(5,4,3,.9); border-left: 1.5px solid var(--wc); border-right: 1.5px solid var(--wc); }
#warn::before, #warn::after { content: ''; position: absolute; left: 0; right: 0; height: 6px; background: repeating-linear-gradient(-45deg, var(--wc) 0 8px, #120f0b 8px 16px); }
#warn::before { top: 0; } #warn::after { bottom: 0; }
#warnB { display: block; font: 800 27px/1 var(--fhead); letter-spacing: .06em; color: var(--wc); }
#warnT { display: block; text-decoration: none; font: 700 13px/1.3 var(--flabel); letter-spacing: .1em; color: var(--bone); }
#warn.now { background: var(--bone); } #warn.now #warnB { color: var(--y); font-size: 40px; } #warn.now #warnT { color: var(--ck); }
#warnBar { height: 4px; background: rgba(255,255,255,.12); margin-top: 4px; } #warnFill { height: 100%; width: 0; background: var(--wc); }
#warn.plain #warnBar { display: none; }

#edge { position: absolute; left: 0; right: 0; top: var(--vt); height: var(--vh); pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 50%, var(--eg) 100%); }
body[data-state="alert"] #edge { animation: alarm .52s ease-in-out infinite alternate; }
body[data-state="alert"][data-tell="hull"] #edge { animation-duration: 1.1s; }
@keyframes alarm { from { opacity: .95; } to { opacity: .28; } }
.tape { position: absolute; left: 0; right: 0; height: 18px; overflow: hidden; background: var(--wc); opacity: 0; transition: opacity .12s; box-shadow: 0 0 10px rgba(0,0,0,.6); }
.tape span { display: block; width: max-content; white-space: nowrap; font: 800 15px/18px var(--fhead); letter-spacing: .14em; color: #0b0907; animation: tape 10s linear infinite; }
#tapeA { top: var(--vt); } #tapeB { top: calc(var(--vt) + var(--vh) - 18px); } #tapeB span { animation-direction: reverse; }
@media (min-aspect-ratio: 1/1) { #tapeA { -webkit-mask: linear-gradient(90deg, #000 calc(50% - 190px), transparent calc(50% - 190px), transparent calc(50% + 190px), #000 calc(50% + 190px)); mask: linear-gradient(90deg, #000 calc(50% - 190px), transparent calc(50% - 190px), transparent calc(50% + 190px), #000 calc(50% + 190px)); } }   /* the top tape passes behind the score cluster */
@keyframes tape { to { transform: translateX(-50%); } }
body[data-state="alert"] .tape { opacity: .94; }
@media (max-aspect-ratio: 1/1) {   /* portrait: the tapes run down the two edges, out of the way of the plates */
  .tape { width: 100vh; right: auto; height: 15px; transform-origin: 0 0; transform: rotate(90deg); top: 0 !important; }
  .tape span { font-size: 13px; line-height: 15px; }
  #tapeA { left: 15px; } #tapeB { left: 100vw; }
}
/* tactical, at rest: corner brackets on the film frame (only when there are letterbox bars for the plates to sit in) */
body.bars #hud::before { content: ''; position: absolute; left: 12px; right: 12px; top: calc(var(--vt) + 8px); height: calc(var(--vh) - 16px); pointer-events: none; opacity: .5; --c: var(--yt);
  background: linear-gradient(var(--c), var(--c)) left top / 26px 1.5px no-repeat, linear-gradient(var(--c), var(--c)) left top / 1.5px 26px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 26px 1.5px no-repeat, linear-gradient(var(--c), var(--c)) right top / 1.5px 26px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 26px 1.5px no-repeat, linear-gradient(var(--c), var(--c)) left bottom / 1.5px 26px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 26px 1.5px no-repeat, linear-gradient(var(--c), var(--c)) right bottom / 1.5px 26px no-repeat; }
body.bars[data-state="alert"] #hud::before { opacity: 0; }
@media (prefers-reduced-motion: reduce) { body[data-state="alert"] #edge { animation: none; opacity: .55; } .tape span { animation: none; } }

/* ---------- the boss: a plate with its hull, and a title card when it walks on ---------- */
#bossBar { left: 50%; bottom: max(calc(100vh - var(--vt) - var(--vh) + 12px), calc(40px + var(--sab))); transform: translateX(-50%); width: min(46vw, 440px); padding: 22px 8px 7px; text-align: left; }
#bossName { font: 800 19px/1.1 var(--fhead); letter-spacing: .05em; color: var(--bone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bossTrack { height: 9px; border: 1px solid var(--ln2); background: #1a0d0a; margin-top: 3px; }
#bossFill { height: 100%; width: 100%; background: repeating-linear-gradient(90deg, var(--yt) 0 10px, transparent 10px 12px); box-shadow: 0 0 8px var(--glow); }
/* b50: a boss or a battery arrives under a title lettered like the Showa films' own cards (data.js TITLE), laid over the
   live shot: fat hand-drawn gothic, flat colour, slanted, a name a colour, a small 対 on a patch, a line above. Never a black card. */
#credit { position: fixed; left: 4vw; right: 4vw; bottom: calc(100vh - var(--vt, 0px) - var(--vh, 100vh) + var(--vh, 100vh) * .06); z-index: 40; pointer-events: none; opacity: 0; text-align: left; }
#credit.go { animation: credit 2.3s var(--d, 0s) linear both; }
@keyframes credit { 0% { opacity: 0; transform: scale(1.28); } 3% { opacity: 1; transform: scale(1.28); } 8% { transform: scale(.97); } 11% { transform: scale(1); } 87% { opacity: 1; transform: scale(1.03); } 100% { opacity: 0; transform: scale(1.03); } }
.st { --fs: min(calc(88vw / (var(--n) + .4)), calc(var(--vh, 100vh) * .15)); font: 400 var(--fs)/1 'Dela Gothic One', 'Arial Black', sans-serif; white-space: nowrap; display: inline-block; transform-origin: left bottom; transform: skewX(-9deg) rotate(-2deg); filter: url(#stRough); }
.st i { font-style: normal; display: inline-block; } .st i:nth-child(2n) { transform: translateY(.035em) rotate(1.6deg) scale(1, 1.06); } .st i:nth-child(3n) { transform: translateY(-.03em) rotate(-2deg); } .st i:nth-child(5n) { transform: translateY(.02em) scale(1.06, 1); }
.st-k { font-size: .36em; letter-spacing: .14em; color: var(--k); margin: 0 0 .3em .35em; text-shadow: .09em .09em 0 #000, -.04em -.04em 0 #000, .04em -.04em 0 #000, -.04em .04em 0 #000; }
.st-a, .st-b { letter-spacing: -.035em; text-shadow: .06em .06em 0 #000, -.022em -.022em 0 #000, .022em -.022em 0 #000, -.022em .022em 0 #000, .022em .022em 0 #000; }
.st-a { color: var(--h); } .st-b { color: var(--c); margin: -.05em 0 0 1.1em; } .st.solo .st-b { margin-left: 0; }
.st-vs { display: inline-block; font-size: .5em; line-height: 1; color: #0b0907; background: var(--bx); padding: .1em .14em .12em; margin-right: .22em; vertical-align: .24em; text-shadow: none; transform: rotate(5deg); box-shadow: .1em .1em 0 #000; }
.st-e { font: 400 max(12px, .2em)/1 'Bowlby One SC', 'Arial Black', sans-serif; letter-spacing: .1em; color: #fff; margin: .55em 0 0 5.6em; text-shadow: .1em .1em 0 #000, -.06em -.06em 0 #000, .06em -.06em 0 #000, -.06em .06em 0 #000; } .st.solo .st-e { margin-left: .3em; }
.st-e u { text-decoration: none; font-size: .8em; color: #ffd22e; }

/* ---------- small hints ---------- */
#rotate { position: fixed; bottom: calc(200px + var(--sab)); left: 50%; transform: translateX(-50%); font: 700 12px/1 var(--flabel); letter-spacing: .12em; color: var(--bone); background: var(--ckA); border: 1px solid var(--ln); padding: 4px 9px; pointer-events: none; animation: hintOut .6s 7s forwards; }
@keyframes hintOut { to { opacity: 0; visibility: hidden; } }
@media (orientation: landscape) { #rotate { display: none; } }
.subOn #rotate { display: none; }
.pop.resist { font-family: var(--fhead); font-weight: 800; letter-spacing: .08em; color: var(--amb); text-shadow: 0 0 6px rgba(0,0,0,.9), 0 2px 0 #000; }

/* ---------- the requisition depot: the same console, full screen ---------- */
#shop { overflow-y: auto; justify-content: flex-start; padding-top: max(18px, var(--sat));
  background: linear-gradient(rgba(5,4,3,.94), rgba(5,4,3,.94)), repeating-linear-gradient(0deg, transparent 0 23px, rgba(232,40,26,.5) 23px 24px), repeating-linear-gradient(90deg, transparent 0 23px, rgba(232,40,26,.5) 23px 24px); }
.sh-top { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 20px; }
.sh-title { display: inline-block; background: var(--y); color: var(--ck); font: 800 clamp(24px, 5vw, 40px)/1.15 var(--fhead); letter-spacing: .04em; padding: 0 30px 0 12px; clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%); }
.sh-title span { font: 700 .6em/1 serif; margin-left: 10px; }
.sh-reel { font: 500 13px/1.4 var(--fread); color: var(--yt); text-shadow: 0 0 6px var(--glow); flex-basis: 100%; } .sh-reel b { color: var(--grn); text-shadow: none; font-weight: 500; }
.sh-nuts { margin: 0; font: 700 15px/1 var(--flabel); letter-spacing: .14em; color: var(--bone); } .sh-nuts b { font: 800 30px/1 var(--fhead); color: var(--yt); text-shadow: 0 0 10px var(--glow); }
.sh-rule { flex-basis: 100%; font: 600 15px/1.3 var(--flabel); letter-spacing: .04em; color: var(--bone); } .sh-rule b { background: var(--y); color: var(--ck); font: 800 15px/18px var(--fhead); letter-spacing: .05em; padding: 1px 7px; margin-right: 8px; }
.sh-rule u { text-decoration: none; font: 800 17px/1 var(--fhead); letter-spacing: .05em; color: var(--yt); text-shadow: 0 0 7px var(--glow); margin-right: 4px; } .sh-rule i { font-style: normal; color: rgba(244,239,230,.6); }
/* b49: the drawing. A blueprint of the Professor in the middle, numbered call-outs either side, leader lines to the parts */
.sh-sheet { position: relative; display: grid; grid-template-columns: minmax(168px, 232px) auto minmax(168px, 232px); gap: 0 38px; align-items: center; justify-content: center; margin-top: 10px; }
.sh-col { display: flex; flex-direction: column; gap: 12px; }
.sh-sheet .card { width: auto; min-height: 148px; }
.sh-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.sh-lines path { fill: none; stroke: var(--yt); stroke-width: 1.5; filter: drop-shadow(0 0 3px var(--glow)); }
.sh-lines path.poor { stroke-dasharray: 5 4; opacity: .6; filter: none; } .sh-lines path.sold { stroke: var(--grn); filter: none; opacity: .75; } .sh-lines path.hot { stroke: var(--bone); stroke-width: 2.5; opacity: 1; }
.sh-bp { --bl: #6f9fd2; position: relative; border: 1.5px solid var(--bl); box-shadow: 0 0 0 4px #06111f, 0 0 0 5px rgba(111,159,210,.45), 0 6px 18px rgba(0,0,0,.7); padding: 8px 8px 0;
  background: linear-gradient(rgba(6,17,31,.9), rgba(6,17,31,.9)), repeating-linear-gradient(0deg, transparent 0 59px, #6f9fd2 59px 60px), repeating-linear-gradient(90deg, transparent 0 59px, #6f9fd2 59px 60px),
    linear-gradient(rgba(6,17,31,.82), rgba(6,17,31,.82)), repeating-linear-gradient(0deg, transparent 0 11px, #6f9fd2 11px 12px), repeating-linear-gradient(90deg, transparent 0 11px, #6f9fd2 11px 12px), #06111f; }
.bp-fig { position: relative; aspect-ratio: 5 / 6; height: min(50vh, 430px); max-width: 100%; margin: 0 auto; }
.bp-fig canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bp-c { position: absolute; width: 14px; height: 14px; border: 0 solid var(--bl); } .bp-c.a { left: 5px; top: 5px; border-width: 1.5px 0 0 1.5px; } .bp-c.b { right: 5px; top: 5px; border-width: 1.5px 1.5px 0 0; }
.bp-mark { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 2px solid var(--yt); border-radius: 50%; background: rgba(11,9,7,.8); color: var(--bone); font: 800 16px/22px var(--fhead); text-align: center;
  box-shadow: 0 0 9px var(--glow), 0 0 0 5px rgba(255,74,56,.16); animation: bpmark 1.4s ease-in-out infinite; }
@keyframes bpmark { 50% { box-shadow: 0 0 9px var(--glow), 0 0 0 10px rgba(255,74,56,0); } }
.bp-mark.poor { border-style: dashed; animation: none; box-shadow: none; opacity: .75; } .bp-mark.sold { border-color: var(--grn); color: var(--grn); animation: none; box-shadow: none; } .bp-mark.hot { background: var(--yt); color: var(--ck); }
.bp-block { contain: inline-size; border-top: 1px solid var(--bl); margin: 6px -8px 0; padding: 5px 9px 6px; background: rgba(6,17,31,.85); font: 500 12px/1.4 var(--fread); letter-spacing: .05em; color: #a9cdf2; text-align: left; max-width: none; }
.bp-block b { color: #e3f1ff; font-weight: 500; letter-spacing: .14em; }
#shop.nobp .sh-bp { display: none; } #shop.nobp .sh-sheet { grid-template-columns: repeat(2, minmax(168px, 232px)); gap: 12px; } #shop.nobp .sh-lines { display: none; }
.card .no { position: absolute; right: 7px; top: 3px; font: 800 20px/1 var(--fhead); color: var(--rc); }
.card .pt { font: 500 12px/1.2 var(--fread); letter-spacing: .08em; color: #a9cdf2; }
.card { --rc: var(--y); width: clamp(150px, 26vw, 212px); min-height: 178px; background: #0b0907; color: var(--bone); border: 1.5px solid var(--ln); border-top: 3px solid var(--rc); padding: 28px 10px 9px; position: relative; text-align: left;
  cursor: pointer; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; box-shadow: 0 3px 8px rgba(0,0,0,.6); }
.card:active { transform: translateY(2px); }
.card .tg { position: absolute; left: -1.5px; top: -3px; height: 20px; padding: 0 16px 0 8px; background: var(--rc); color: var(--ck); font: 800 15px/20px var(--fhead); letter-spacing: .05em; white-space: nowrap; clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
.card .ic { font-size: 26px; line-height: 1; color: var(--rc); }
.card .nm { font: 800 23px/1 var(--fhead); letter-spacing: .03em; }
.card .ds { font: 600 15px/1.22 var(--flabel); color: rgba(244,239,230,.8); }
.card .pr { font: 500 16px/1 var(--fread); color: var(--yt); text-shadow: 0 0 7px var(--glow); margin-top: auto; }
.card .k { font: 500 11px/1 var(--fread); color: #7a6c58; }
.card.rare { --rc: #58a6ea; } .card.epic { --rc: #b98af5; } .card.legendary { --rc: var(--amb); box-shadow: 0 0 24px rgba(255,170,40,.5); }
.card.poor { opacity: .55; } .card.poor .pr { color: #a8a096; text-shadow: none; }
.card.sold { opacity: .28; pointer-events: none; filter: grayscale(1); }
.sh-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; justify-content: center; align-items: stretch; }
.sh-btn { background: #1d1a16; color: var(--yt); border: 2px solid var(--ln2); border-radius: 2px; font: 700 18px/1.1 var(--flabel); letter-spacing: .04em; text-transform: uppercase; padding: 7px 14px; min-height: 44px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.sh-btn i { font: 500 12px/1.2 var(--fread); font-style: normal; color: rgba(244,239,230,.7); text-transform: none; } .sh-btn u { text-decoration: none; font: 500 11px/1 var(--fread); color: #7a6c58; }
.sh-btn:disabled { opacity: .4; cursor: default; } .sh-btn:not(:disabled):active { transform: translateY(2px); }
#shop .sh-go { margin-top: 0; background: var(--y); color: var(--ck); border: 2px solid #050403; box-shadow: none; font: 800 24px/1 var(--fhead); letter-spacing: .05em; padding: 8px 22px; min-height: 44px; }
.sh-hint { margin: 10px 0 auto; font: 600 14px/1.3 var(--flabel); letter-spacing: .06em; color: rgba(244,239,230,.55); }
.sh-notes { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; font: 600 14px/1.2 var(--flabel); letter-spacing: .04em; color: rgba(244,239,230,.8); }
.sh-notes span { border: 1px solid var(--ln); background: #0b0907; padding: 3px 8px; } .sh-notes b { color: var(--yt); font: 700 13px/1 serif; margin-right: 5px; }

/* the reel card's field notes: the three rules, in the cockpit's hand */
.rc-notes { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 620px; font: 600 14px/1.2 var(--flabel); letter-spacing: .04em; color: var(--bone); }
.rc-notes span { border: 1px solid var(--ln); border-top: 2px solid var(--y); background: var(--ckA); padding: 4px 9px; } .rc-notes b { color: var(--yt); font: 700 14px/1 serif; margin-right: 6px; }

/* ---------- narrow screens (phone portrait) ---------- */
@media (max-width: 600px) {
  /* b52 (Patrick: "The UI on phone is a bit too much"): two half-width plates make one strip across the top (no portrait, no
     rampage row); the score and the pot sit under it; the move strip, streak count, pot sum, bank hint and the forces ticker go
     (the pot's tab itself turns to BANK); the sound switch moves into the pause screen; the boss plate sits under the score */
  #crew { left: calc(6px + var(--sal)); top: calc(6px + var(--sat)); width: calc(50vw - 9px - var(--sal)); padding: 24px 6px 6px; } #crewImg { display: none; } #steam { margin-right: 40px; }
  #rightBox { right: calc(6px + var(--sar)); top: calc(6px + var(--sat)); width: calc(50vw - 9px - var(--sar)); padding: 24px 6px 6px; }
  #timer { position: absolute; right: 5px; top: 1px; height: 19px; }
  #quota { font-size: 12px; margin-top: 0; } #quota b { font-size: 12px; } #quota i { display: none; } #lvl { display: none; }
  #rule { font-size: 12px; line-height: 15px; margin-top: 4px; padding-top: 3px; } #rule b { font-size: 11px; line-height: 15px; }
  #btns { position: fixed; right: auto; left: calc(6px + var(--sal)); top: calc(70px + var(--sat)); margin: 0; } #muteBtn { display: none; }
  body.ruled { --ry: 22px; }   /* a rule card adds a row to the reel plate: what sits under it moves down */
  #scoreBox { top: calc(68px + var(--ry, 0px) + var(--sat)); } #score { font-size: 32px; }
  #pot { height: 23px; gap: 5px; font-size: 14px; padding-right: 7px; } #pot .tab { height: 20px; line-height: 20px; font-size: 15px; padding: 0 13px 0 6px; } #mult { font-size: 18px; line-height: 19px; }
  #potVal, #pot .bankHint, #streakN, #moves, #forces { display: none !important; }
  #streakBar { min-width: 130px; }
  #chainHud { top: calc(196px + var(--ry, 0px) + var(--sat)); }
  #bossBar { bottom: auto; top: calc(134px + var(--ry, 0px) + var(--sat)); width: 64vw; padding: 21px 6px 5px; } #bossName { font-size: 15px; } #bossTrack { height: 6px; }
  #warn { top: 60%; }
  #credit { bottom: 37vh; } .st { --fs: min(calc(90vw / (var(--n) + .4)), 15vw); }
  #rotate { display: none; }
  #subtitle { left: calc(12px + var(--sal)) !important; right: calc(12px + var(--sar)); transform: none !important; max-width: none !important; bottom: calc(200px + var(--sab)) !important; text-align: center !important; font-size: 13px !important; line-height: 1.25 !important; }
  .card .nm { font-size: 20px; } .card .ds { font-size: 14px; }
  /* the drawing on top, the four call-outs in a block under it: numbers tie them to the marks (no leader lines) */
  .sh-sheet { grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; } .sh-bp { grid-column: 1 / -1; order: -1; } .sh-col { display: contents; } .sh-lines { display: none; }
  .bp-fig { height: min(19.5vh, 164px); } .sh-top { gap: 2px 20px; } .sh-sheet { margin-top: 6px; } .sh-rule { font-size: 14px; } .sh-rule i { display: none; } .sh-btn { flex: 1 1 40%; padding: 5px 6px; font-size: 16px; } #shop .sh-go { flex-basis: 100%; } .bp-block span { display: none; } .bp-block { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sh-sheet .card { min-height: 0; padding: 26px 8px 8px; gap: 4px; } .sh-hint { display: none; } .sh-row { margin-top: 10px; } .sh-title { font-size: 26px; }
}
/* short screens (phone landscape) */
@media (max-height: 520px) {
  .sh-title { font-size: 22px; } .sh-reel { font-size: 12px; margin-top: 3px; } .sh-nuts { margin: 3px 0 6px; } .sh-nuts b { font-size: 20px; } #shop { padding-top: max(8px, var(--sat)); }
  .sh-sheet { grid-template-columns: minmax(150px, 210px) auto minmax(150px, 210px); gap: 0 22px; margin-top: 6px; max-width: calc(100vw - 16px); } .sh-col { gap: 8px; } .sh-sheet .card { min-height: 0; padding: 24px 8px 6px; gap: 3px; } .bp-fig { height: calc(100vh - 248px); min-height: 110px; } #shop .sh-hint { display: none; } .bp-mark { width: 20px; height: 20px; margin: -10px 0 0 -10px; font-size: 13px; line-height: 16px; } .sh-rule { font-size: 13px; } .sh-rule b, .sh-rule u { font-size: 14px; }
  .sh-sheet .card .nm { font-size: 17px; } .sh-sheet .card .ds { font-size: 12px; line-height: 1.15; } .sh-sheet .card .pr { font-size: 13px; } .bp-block { font-size: 12px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sh-hint { margin-top: 4px; font-size: 12px; } .sh-notes { display: none; } .sh-row { margin-top: 8px; } .sh-btn { padding: 4px 10px; font-size: 15px; }
  .rc-notes { margin-top: 6px; font-size: 12px; }
  #warn { top: calc(var(--vt) + var(--vh) * .5); }
  #chainHud { top: calc(var(--vt) + var(--vh) * .33); } .subOn #bossBar { opacity: 0; }   /* a subtitle has the bottom of a short screen to itself for its few seconds */
}
@media (max-height: 520px) and (pointer: coarse) { #btns { right: 0; top: 100%; margin: 6px 0 0; } }   /* phone landscape: mute and pause tuck under the reel plate */
@media (max-height: 430px) {
  #score { font-size: 30px; } #crew { width: 190px; } #crewImg { width: 30px; height: 30px; } #rightBox { width: 200px; } #timer { font-size: 24px; } #quota, #quota b { font-size: 12px; }
  #forces { max-width: calc(100vw - 420px); overflow: hidden; }
  #jumpBtn { bottom: calc(104px + var(--sab)); width: 62px; height: 62px; } #hyperBtn { width: 76px; height: 76px; } #shieldBtn { right: calc(102px + var(--sar)); width: 66px; height: 66px; }
}
@media (pointer: coarse) { .sh-btn u { display: none; } }

/* ---------- b52 Eva touches, halved in b53 (Patrick: "Pull back the Evangelion by 50%"). Kept: the amber seven-segment
   reel clock. Gone: the squeezed serif, the honeycomb, the scanlines, the running chevrons. ---------- */
#timer { display: flex; justify-content: flex-end; align-items: stretch; gap: 1.5px; height: 30px; color: var(--amb); text-shadow: none; filter: drop-shadow(0 0 4px rgba(255,150,40,.8)); }
#timer .sg { height: 100%; width: auto; aspect-ratio: 12 / 20; display: block; } #timer .sg.sc { aspect-ratio: 5 / 20; }
#timer .sg polygon, #timer .sg rect { fill: currentColor; } #timer .sg .o { opacity: .1; }
#timer.low { color: var(--yt); filter: drop-shadow(0 0 5px var(--glow)); }
@media (max-width: 600px) { #timer { height: 19px; gap: 1px; } }
/* the boss title in English: THE sits small before the name; the Japanese title is the sub line */
.st.en .st-a, .st.en .st-b { letter-spacing: -.01em; }
.st-the { display: inline-block; font-size: .36em; line-height: 1; vertical-align: .95em; margin-right: .18em; letter-spacing: .04em; color: var(--c); }
.st.en .st-e { font-family: 'Dela Gothic One', 'Arial Black', sans-serif; font-size: max(13px, .27em); letter-spacing: .16em; margin: .5em 0 0 .25em; color: #fff; }
.st.en .st-vs { font-size: .42em; padding: .12em .2em .14em; }

#pot.bankable .tab { background: var(--amb); animation: blink 1s steps(2) infinite; }
body:has(#results:not(.hide)) #subtitle, body:has(#shop:not(.hide)) #subtitle, body:has(#reelCard:not(.hide)) #subtitle { display: none; }   /* a crew line never lands on the results or the depot */

/* b53: grab / throw. A fourth round control, shown only when something is in reach or in his hands */
#grabBtn { --rc: var(--bone); --p: 100; right: calc(114px + var(--sar)); bottom: calc(112px + var(--sab)); width: 64px; height: 64px; display: none; }
#grabBtn.show { display: flex; animation: pulse .25s; }
#grabBtn span { color: var(--bone); font-size: 14px; }
#grabBtn.hot { --rc: var(--amb); } #grabBtn.hot span { background: var(--amb); color: var(--ck); }
@media (max-height: 430px) { #grabBtn { right: calc(100px + var(--sar)); bottom: calc(100px + var(--sab)); width: 58px; height: 58px; } }
