/* ---------- E3 foundations (docs/design.md "UI look: E3"; values from design/ui-e3/*.html) ---------- */
@font-face { font-family: Galmuri11; src: url(assets/fonts/Galmuri11.woff2) format('woff2'); font-display: block; }
@font-face { font-family: Galmuri11; font-weight: 700; src: url(assets/fonts/Galmuri11-Bold.woff2) format('woff2'); font-display: block; }
@font-face { font-family: 'Metal Mania'; src: url(assets/fonts/MetalMania-Regular.woff2) format('woff2'); font-display: block; }   /* title logo (Jee 2026-11-14; was Cinzel) */
/* Korean text in Nanum Myeongjo ExtraBold, English and numbers in Galmuri (Jee 2026-11-14, option 7). The file holds the 2,350
   common Hangul syllables (KS X 1001) + jamo; unicode-range sends only Korean to it. One weight serves every weight asked for. */
@font-face { font-family: 'TKS Korean'; src: url(assets/fonts/NanumMyeongjo-ExtraBold-KS.woff2) format('woff2'); font-weight: 100 900; unicode-range: U+AC00-D7A3, U+3131-318E; font-display: block; }
@font-face { font-family: Galmuri14; src: url(assets/fonts/Galmuri14.woff2) format('woff2'); font-display: block; }
/* English and numbers in Lora (Jee 2026-11-16; replaces Galmuri): SemiBold serves every weight up to 650, Bold the rest. */
@font-face { font-family: Lora; src: url(assets/fonts/Lora-SemiBold-latin.woff2) format('woff2'); font-weight: 100 650; font-display: block; }
@font-face { font-family: Lora; src: url(assets/fonts/Lora-Bold-latin.woff2) format('woff2'); font-weight: 651 900; font-display: block; }
:root {
  --navy: #002061; --win: #0f1d45; --shadow: #0a1330; --beige: #d9c9a0; --beige-dk: #8a7a4e;
  --tile: #8a3424; --tile-l: #c8705a; --tile-d: #3a0e06; --cream: #f3ead2; --gold: #e8c872; --muted: #b9b29a;
  --peach: #f2a688; --peach-l: #ffd8c8; --peach-d: #7a3a24; --peach-text: #2a1006;
  --sunk: #00164a; --sunk-dk: #000a28; --sunk-lt: #4a6aa0;
  --blue: #1a2c6a; --blue-l: #7a8ac8; --blue-d: #060c24; --ver: #c8402c; --ver-l: #f09a80; --ver-d: #5a1408;
  --font: 'TKS Korean', Lora, serif; --font-big: 'TKS Korean', Lora, serif;
}
/* BTK-style window: beige bevel, navy and brown keylines, hard shadow; crane-and-cloud interior */
.win { background: url(assets/ui/crane_tile.png) -37px -21px / 164px 82px #002061; image-rendering: pixelated;
  border: 2px solid var(--beige); box-shadow: inset 0 0 0 2px var(--navy), inset 0 0 0 3px var(--beige-dk), 0 3px 0 var(--shadow);
  border-radius: 3px; padding: 9px 10px; }
.tile { background: var(--tile); border: 2px solid; border-color: var(--tile-l) var(--tile-d) var(--tile-d) var(--tile-l);
  color: var(--cream); font: 700 12px var(--font); text-shadow: 1px 1px 0 #000; text-align: center; padding: 2px 0; }
.peach { background: var(--peach); color: var(--peach-text); border: 2px solid; border-color: var(--peach-l) var(--peach-d) var(--peach-d) var(--peach-l);
  text-shadow: none; }
.chip { display: inline-block; font: 700 12px var(--font); padding: 2px 7px; color: #ffd060; background: #5a2a14;
  border: 2px solid; border-color: #b8704a #24100a #24100a #b8704a; text-shadow: 1px 1px 0 #000; }
.sunk { background: var(--sunk); border: 2px solid; border-color: var(--sunk-dk) var(--sunk-lt) var(--sunk-lt) var(--sunk-dk); }
.btn { font: 700 16px var(--font); color: #fff; text-shadow: 1px 1px 0 #000; text-align: center; padding: 9px 0; letter-spacing: .06em;
  background: var(--ver); border: 3px solid; border-color: var(--ver-l) var(--ver-d) var(--ver-d) var(--ver-l); outline: 1px solid #000; border-radius: 0; }
.btn2 { font: 700 14px var(--font); color: var(--cream); text-align: center; padding: 10px 0; background: var(--blue);
  border: 2px solid; border-color: var(--blue-l) var(--blue-d) var(--blue-d) var(--blue-l); outline: 1px solid #000; text-shadow: 1px 1px 0 #000; border-radius: 0; }
.btn:disabled, .btn2:disabled { opacity: 0.4; }
img { image-rendering: pixelated; }

/* No text selection, callouts or magnifier anywhere (iOS long-press loupe) */
* { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #000;
  touch-action: none; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
#game {
  position: fixed; left: 0; top: 0; display: block;
  /* If the host page scales the artifact frame, keep pixel art hard-edged instead of blurred. */
  image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; image-rendering: pixelated;
}
/* Reads the safe-area insets so game.js can lay out around the notch / home indicator. */
#safe-probe {
  position: fixed; visibility: hidden; pointer-events: none;
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
}
#rotate-hint {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #111; color: #eee; font: 600 22px/1.4 system-ui, sans-serif; text-align: center;
}
#rotate-hint[hidden] { display: none; }

/* Pause button: positioned by game.js in the HUD strip; size in points. */
#pause-btn {
  position: fixed; width: 30px; height: 30px; padding: 0; margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  background: var(--blue); border: 2px solid; border-color: var(--blue-l) var(--blue-d) var(--blue-d) var(--blue-l);
  outline: 1px solid #000; border-radius: 0; box-sizing: border-box; touch-action: none;
}
#pause-btn span { display: block; width: 5px; height: 13px; background: var(--cream); box-shadow: 1px 1px 0 #000; border-radius: 0; }
#pause-btn[hidden] { display: none; }

/* Pause / Defeated screens */
#overlay {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,16,58,0.7); color: #fff; font: 17px/1.4 var(--font); text-align: center;
}
#overlay.dark { background: rgba(20,0,10,0.82); }
#overlay[hidden] { display: none; }
#overlay .panel {
  min-width: 240px; padding: 22px 26px; border-radius: 3px;
  background: url(assets/ui/crane_tile.png) -37px -21px / 164px 82px #002061; image-rendering: pixelated; border: 2px solid var(--beige);
  box-shadow: inset 0 0 0 2px var(--navy), inset 0 0 0 3px var(--beige-dk), 0 3px 0 var(--shadow);
}
#overlay h1 { margin: 0 0 14px; font: 28px var(--font-big); letter-spacing: .06em; color: var(--gold); text-shadow: 2px 2px 0 #000; }
#ov-body .row { display: flex; justify-content: space-between; gap: 24px; margin: 4px 0; font-weight: 500; }
#ov-body .row b { font-weight: 700; }
#ov-btns { margin-top: 18px; display: flex; gap: 12px; justify-content: center; }
#ov-btns button {
  font: 700 18px var(--font); color: #fff; padding: 10px 22px; border-radius: 0; letter-spacing: .06em; text-transform: uppercase; text-shadow: 1px 1px 0 #000;
  background: var(--ver); border: 3px solid; border-color: var(--ver-l) var(--ver-d) var(--ver-d) var(--ver-l); outline: 1px solid #000;
}
#ov-btns button:not(:first-child) { background: var(--blue); color: var(--cream); font-size: 15px; border-width: 2px; border-color: var(--blue-l) var(--blue-d) var(--blue-d) var(--blue-l); }

/* Level-up window (E3) */
#overlay.levelup { background: rgba(0,16,58,0.78); font-family: var(--font); }
#overlay.levelup h1 { display: none; }
#overlay.levelup .panel { width: min(369px, calc(100vw - 24px)); min-width: 0; max-width: none; padding: 12px; text-align: left; border-radius: 3px;
  background: url(assets/ui/crane_tile.png) -37px -21px / 164px 82px #002061; image-rendering: pixelated; border: 2px solid var(--beige);
  box-shadow: inset 0 0 0 2px var(--navy), inset 0 0 0 3px var(--beige-dk), 0 3px 0 var(--shadow); }
.lu-head { display: flex; gap: 10px; align-items: stretch; }
.lu-por { width: 58px; height: 72px; flex: none; border: 2px solid var(--beige); box-shadow: inset 0 0 0 1px var(--beige-dk); background: #000; }
.lu-por img { width: 54px; height: 68px; display: block; }
.lu-hr { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.lu-hn { display: flex; justify-content: space-between; align-items: center; }
.lu-hero { font: 700 13px var(--font); color: #ff8a6a; text-shadow: 1px 1px 0 #000; }
.lu-lv { padding: 1px 8px; font-size: 13px; }
.lu-title { font: 22px var(--font-big); color: var(--gold); text-shadow: 2px 2px 0 #000; letter-spacing: .06em; }
.lu-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
#ov-body .card.lu-card { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px; text-align: left; font: inherit; color: #fff;
  border-radius: 3px; background: url(assets/ui/crane_tile.png) -37px -21px / 164px 82px #002061; border: 2px solid var(--beige);
  box-shadow: inset 0 0 0 2px var(--navy), inset 0 0 0 3px var(--beige-dk), 0 3px 0 var(--shadow); }
#ov-body .card.lu-card:active { filter: brightness(1.35); }
#ov-body .card.lu-gold { border-color: var(--gold); box-shadow: inset 0 0 0 2px #002061, inset 0 0 0 3px var(--gold), 0 3px 0 var(--shadow); }
.lu-ico { width: 52px; height: 52px; flex: none; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  background: var(--sunk); border: 2px solid; border-color: var(--sunk-dk) var(--sunk-lt) var(--sunk-lt) var(--sunk-dk); }
.lu-ico.mx { border-color: var(--blue-d) var(--gold) var(--gold) var(--blue-d); }
#ov-body .card .lu-ico img { width: 44px; height: 44px; image-rendering: pixelated; background: none; padding: 0; border-radius: 0; }
.lu-ct { flex: 1; min-width: 0; }
.lu-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.lu-name { font: 700 15px var(--font); text-shadow: 1px 1px 0 #000; }
.lu-type { font: 700 10px var(--font); padding: 0 5px; border: 1px solid #000; color: var(--cream); flex: none; }
.lu-type.w { background: #8a3424; } .lu-type.p { background: #2a5a8a; }
.lu-pips { display: flex; align-items: center; gap: 2px; margin-top: 4px; }
.pp { display: inline-block; width: 9px; height: 9px; background: var(--sunk); border: 1px solid #000; box-shadow: inset 1px 1px 0 var(--sunk-dk); }
.pp.on { background: var(--gold); box-shadow: inset -1px -1px 0 #9a7a2a; }
.pp.nx { background: var(--peach); box-shadow: 0 0 0 1px #fff; }
.lu-max { font: 700 10px var(--font); padding: 0 4px; margin-left: 4px; }
.lu-new { font-size: 10px; padding: 0 4px; margin-left: 4px; }
.lu-line { font: 12px var(--font); color: #cfd6f0; margin-top: 4px; text-shadow: 1px 1px 0 #000; }
.lu-build { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; }
.lu-build .chip { font-size: 10px; }
.lu-slots { display: flex; gap: 2px; align-items: center; }
.lu-gap { width: 6px; }
.lu-slot { position: relative; width: 26px; height: 26px; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  background: var(--sunk); border: 2px solid; border-color: var(--sunk-dk) var(--sunk-lt) var(--sunk-lt) var(--sunk-dk); }
.lu-slot.em { opacity: .45; } .lu-slot.mx { border-color: var(--blue-d) var(--gold) var(--gold) var(--blue-d); }
.lu-slot img { width: 22px; height: 22px; image-rendering: pixelated; }
.lu-slot .lv { position: absolute; right: 1px; bottom: -1px; font: 700 10px var(--font); color: #fff; text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000; }
.lu-slot .lv.max { color: var(--gold); font-size: 8px; }

/* Title and hero select */
.screen {
  position: fixed; inset: 0; overflow-y: auto; color: #fff; font: 15px/1.4 var(--font);
  background: url(assets/ui/crane_tile.png) 0 0 / 164px 82px #002061; image-rendering: pixelated;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.screen[hidden] { display: none; }
.big-btn {
  font: 700 20px var(--font); color: #fff; padding: 12px 34px; border-radius: 0; letter-spacing: .06em; text-shadow: 1px 1px 0 #000;
  background: var(--ver); border: 3px solid; border-color: var(--ver-l) var(--ver-d) var(--ver-d) var(--ver-l); outline: 1px solid #000;
}
.big-btn:disabled { opacity: 0.4; }
.ghost-btn { font: 700 15px var(--font); color: var(--cream); padding: 6px 14px; border-radius: 0; text-shadow: 1px 1px 0 #000;
  background: var(--blue); border: 2px solid; border-color: var(--blue-l) var(--blue-d) var(--blue-d) var(--blue-l); outline: 1px solid #000; }
.sel-wrap { max-width: 560px; margin: 0 auto; padding: 12px; }
.sel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sel-head h2 { margin: 0; font-size: 19px; color: #ffd65a; }
.sel-start { display: flex; justify-content: flex-end; margin: 10px 0 12px; }
#hero-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hero-card {
  position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 2px 4px;
  border-radius: 10px; border: 2px solid #5a5a5a; background: #282c28; color: #fff; font: inherit;
}
.hero-card.sel { border-color: #ffd65a; background: #34462e; }
.hero-card .spr { width: 100%; max-width: 96px; aspect-ratio: 1; image-rendering: pixelated; }
.hero-card .spr.locked { filter: brightness(0); opacity: 0.85; }
.hero-card .hn { font-size: 16px; font-weight: 700; }
.hero-card.locked .hn { color: #777; }
.hero-card .hw { position: absolute; right: 4px; bottom: 4px; width: 20px; height: 20px; image-rendering: pixelated; }


/* Hero panel, Koei status style (decided 2026-11-11) */
#hero-panel.kpanel {
  background: linear-gradient(#1d3438, #14262a); border: 2px solid #7f9aa0; border-radius: 4px; padding: 6px 8px;
  box-shadow: inset 0 0 0 2px #0b1517, inset 0 0 0 3px #4d6a70; color: #e6eef0;
}
.kpanel .namebar { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.kpanel .kname { flex: 1; background: #0b1517; border: 1px solid #7f9aa0; padding: 1px 8px; font-size: 17px; font-weight: 700; }
.kpanel .pills { display: flex; gap: 4px; }
.kpanel .pill { font: 700 11px system-ui, sans-serif; padding: 3px 9px; border-radius: 999px; border: 1px solid #7f9aa0; color: #c8d6d8; }
.kpanel .pill.good { color: #9fd4ff; border-color: #3a8ee8; background: rgba(58,142,232,0.18); }
.kpanel .pill.bad { color: #ff9a90; border-color: #c0392b; background: rgba(232,38,30,0.15); }
.kpanel .krow { display: flex; gap: 8px; align-items: flex-start; }
.kpanel .por { flex: none; padding: 3px; background: #0b1517; border: 1px solid #7f9aa0; box-shadow: inset 0 0 0 1px #4d6a70; }
.kpanel .por img { width: 64px; height: 80px; image-rendering: pixelated; display: block; }
.kpanel .por.locked { min-width: 64px; min-height: 80px; }
.kpanel .kbody { flex: 1; min-width: 0; }
.kpanel .kstatus { display: flex; align-items: center; gap: 6px; min-height: 88px; }
.kpanel .radar { flex: 1; overflow: visible; min-width: 0; }
.kpanel .radar text { font: 700 9px system-ui, sans-serif; }
.kpanel .kweap { flex: none; width: 78px; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 4px; background: #0b1517; border: 1px solid #4d6a70; font-size: 10px; color: #c8d6d8; }
.kpanel .kweap img { width: 32px; height: 32px; image-rendering: pixelated; }
.kpanel .kweap b { font-size: 11px; color: #fff; }
.kpanel .klocked { margin: 0; color: #8a9a9c; }
.kpanel .kstory { display: none; background: #e9dcb8; color: #3a2a18; border-radius: 6px; padding: 6px 8px;
  box-shadow: inset 0 0 0 2px #b8913a; font-size: 12px; line-height: 1.4; word-break: keep-all; }
.kpanel .kstory p { margin: 0; }
.kpanel .kstory blockquote { margin: 6px 0 0; padding: 4px 8px; border-left: 3px solid #b23a24;
  font: italic 700 13px/1.3 Georgia, serif; color: #6a1a10; background: rgba(178,58,36,0.08); }
.kpanel .kstory blockquote span { display: block; font: 600 10px system-ui, sans-serif; color: #8a5a20; }
.kpanel.story .kstatus { display: none; }
.kpanel.story .kstory { display: block; }
.kpanel .ktabs { display: flex; gap: 4px; margin-top: 6px; }
.kpanel .ktabs button { font: 600 12px system-ui, sans-serif; color: #e6eef0; padding: 2px 10px;
  border: 1px solid #7f9aa0; background: #0b1517; border-radius: 0; }
.kpanel .ktabs button.on { background: #2f8a90; color: #fff; }
.kpanel .por.locked img { filter: brightness(0.22) grayscale(0.6); }
.kpanel .por.locked:not(:has(img)) { width: 64px; height: 80px; }

/* Boss chest reveal */
#ov-body .chest { display: flex; flex-direction: column; gap: 8px; }
#ov-body .crow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  background: rgba(255,214,90,0.1); border: 2px solid #b8913a; font-size: 16px; text-align: left; }
#ov-body .crow img { width: 40px; height: 40px; image-rendering: pixelated; }
#ov-body .crow b { flex: 1; }
#ov-body .crow span { color: #9fd4ff; font-weight: 700; }
#ov-body .crow span.max { color: #ffd65a; }

#ov-btns button:disabled { opacity: 0.45; }

/* Upgrades screen (E3 colours and fonts only; layout unchanged) */
.up-gold { margin-left: auto; font: 20px var(--font-big); color: var(--gold); text-shadow: 2px 2px 0 #000; font-variant-numeric: tabular-nums; }
#up-list { display: flex; flex-direction: column; gap: 8px; }
.up-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px;
  background: url(assets/ui/crane_tile.png) -37px -21px / 164px 82px #002061; border: 2px solid var(--beige);
  box-shadow: inset 0 0 0 2px var(--navy), inset 0 0 0 3px var(--beige-dk), 0 3px 0 var(--shadow); border-radius: 3px; }
.up-row img { width: 48px; height: 48px; image-rendering: pixelated; }
.up-row .un { font-weight: 700; font-size: 16px; text-shadow: 1px 1px 0 #000; }
.up-row .ul { color: var(--muted); font-size: 13px; margin-top: 1px; }
.up-pips { display: flex; gap: 4px; margin-top: 4px; }
.up-pips i { width: 14px; height: 8px; background: var(--sunk); border: 1px solid var(--sunk-lt); }
.up-pips i.on { background: var(--gold); border-color: var(--gold); }
.up-buy { font: 700 15px var(--font); color: #fff; padding: 8px 12px; min-width: 76px; border-radius: 0; text-shadow: 1px 1px 0 #000;
  background: var(--ver); border: 3px solid; border-color: var(--ver-l) var(--ver-d) var(--ver-d) var(--ver-l); outline: 1px solid #000; font-variant-numeric: tabular-nums; }
.up-buy:disabled { opacity: 0.4; }
.up-buy.max { opacity: 1; background: var(--peach); color: var(--peach-text); border-color: var(--peach-l) var(--peach-d) var(--peach-d) var(--peach-l); text-shadow: none; }
.up-foot { margin-top: 14px; text-align: center; }

/* Results / Paused screens (E3, design/ui-e3/results.html) */
#overlay.results { background: url(assets/ui/crane_tile.png) 0 0 / 164px 82px #002061; image-rendering: pixelated; align-items: flex-start; overflow-y: auto; }
#overlay.results .panel { width: min(393px, 100vw); min-width: 0; max-height: none; overflow: visible; box-sizing: border-box; text-align: left; border: 0; box-shadow: none;
  background: none; padding: calc(14px + env(safe-area-inset-top)) 10px calc(14px + env(safe-area-inset-bottom)); margin: 0 auto; }
#overlay.results h1 { display: none; }
.rs-head { display: flex; align-items: center; gap: 14px; padding: 4px 6px; }
.rs-seal { width: 56px; height: 56px; flex: none; box-sizing: border-box; background: var(--ver); color: var(--cream); border: 2px solid var(--cream); outline: 2px solid var(--ver);
  display: flex; align-items: center; justify-content: center; font: 700 30px var(--font-big); transform: rotate(-6deg); text-shadow: 1px 1px 0 #000; }
.rs-seal.gold { background: #c8982a; color: #3a0e06; border-color: #fff0b0; outline-color: #c8982a; text-shadow: 1px 1px 0 #ffe9a0; }
.rs-title { font: 31px var(--font-big); letter-spacing: .08em; text-shadow: 2px 2px 0 #000; line-height: 1.1; }
.rs-title.long { font-size: 24px; }
.rs-sub { font: 13px var(--font); color: var(--muted); text-shadow: 1px 1px 0 #000; margin-top: 3px; }
.rs-sub b { color: var(--peach); }
.rs .win { margin-top: 8px; }
.rs-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; text-align: center; }
.rs-stats .num { font: 24px var(--font-big); color: #fff; text-shadow: 2px 2px 0 #000; margin-top: 4px; }
.rs-lab { font: 700 12px var(--font); color: var(--gold); text-shadow: 1px 1px 0 #000; margin: 0 3px 3px; }
.rs table { border-collapse: separate; border-spacing: 3px; width: 100%; }
.rs td { font: 15px var(--font); text-align: center; text-shadow: 1px 1px 0 #000; padding: 1px 0; }
.rs-kpm { padding: 8px 7px; } .rs-kpm td.tile { padding: 2px 0; } .rs-kpm td.low { color: #ff8a6a; } .rs-kpm td.pk { font-weight: 700; text-shadow: none; }
.rs td.dim { opacity: .55; }
.rs-build { display: flex; gap: 10px; }
.rs-build > div { min-width: 0; }
.rs-slots { display: flex; gap: 3px; margin-top: 5px; }
.rs-slot { position: relative; flex: none; width: 38px; height: 38px; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  background: var(--sunk); border: 2px solid; border-color: var(--sunk-dk) var(--sunk-lt) var(--sunk-lt) var(--sunk-dk); }
.rs-slot.em { opacity: .45; } .rs-slot.mx { border-color: var(--blue-d) var(--gold) var(--gold) var(--blue-d); }
.rs-slot img { width: 32px; height: 32px; image-rendering: pixelated; }
@media (max-width: 370px) { .rs-slot { width: 32px; height: 32px; } .rs-slot img { width: 26px; height: 26px; } .rs-build { gap: 6px; } }
.rs-slot .lv { position: absolute; right: 1px; bottom: -1px; font: 700 10px var(--font); color: #fff; text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000; }
.rs-slot .lv.max { color: var(--gold); }
.rs-dmg { padding: 8px 7px; } .rs-dmg td.l { text-align: left; } .rs-dmg td.r { text-align: right; padding-right: 4px; }
.rs-dmg td.tile.l { padding-left: 8px; } .rs-dmg td.tile.lvc { width: 52px; } .rs-dmg td.tile.dc { width: 82px; }
.rs-dmg td img { width: 22px; height: 22px; vertical-align: -6px; image-rendering: pixelated; }
.rs-dmg .bar { height: 4px; margin: 3px 0 0 28px; background: #0a1438; } .rs-dmg .bar u { display: block; height: 100%; background: var(--gold); }
.rs-dmg .mxp { font: 700 11px var(--font); padding: 0 4px; }
.rs-gold { padding: 6px 10px; display: flex; justify-content: space-between; align-items: center; }
.rs-gold .gl { font: 700 15px var(--font); color: var(--gold); text-shadow: 1px 1px 0 #000; display: flex; align-items: center; gap: 6px; }
.rs-gold .gl img { width: 32px; height: 32px; image-rendering: pixelated; }
.rs-gold .gt { display: flex; align-items: center; gap: 6px; }
.rs-gold .gt em { font: normal 12px var(--font); color: var(--muted); text-shadow: 1px 1px 0 #000; }
.rs-gold .gt .peach { font: 700 14px var(--font); padding: 1px 8px; }
#overlay.results #ov-btns { margin-top: 14px; display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
#overlay.results #ov-btns.three { grid-template-columns: 1.6fr 1.15fr 1fr; gap: 8px; }
#overlay.results #ov-btns button { padding: 9px 0; }

/* Title sequence, part 1: tap to start, then the menu (design/title/tap.html and menu.html; sizes relative to the art width --w) */
#title-screen { background: #0a0a14; padding: 0; overflow: hidden; }
.tt { position: absolute; top: 0; bottom: 0; width: var(--w, 100vw); left: var(--left, 0); overflow: hidden; background: #0d0d1c; font-family: var(--font);
  transition: opacity .35s; }
.tt.tt-loading { opacity: 0; pointer-events: none; }
.tt-art { position: absolute; left: 0; width: var(--w); height: calc(var(--w) * 1.5); top: var(--art-top, 0px);
  background: url(assets/title/title_art.png) 0 0 / 100% 100%; image-rendering: pixelated; transition: top .7s cubic-bezier(.3,.7,.2,1); }
.tt-art::before, .tt-art::after { content: ""; position: absolute; left: 0; right: 0; transition: opacity .5s; }
.tt-art::before { top: 0; height: calc(var(--w) * .12); background: linear-gradient(#0d0d1c, transparent); }
.tt-art::after { bottom: 0; height: calc(var(--w) * .14); background: linear-gradient(transparent, #0d0d1c); }
.tt-menu .tt-art::before, .tt-menu .tt-art::after, .tt-card .tt-art::before, .tt-card .tt-art::after { opacity: 0; }
.tt-logo { position: absolute; left: 0; right: 0; top: var(--logo-top, 0px); text-align: center; font-family: 'Metal Mania', serif; font-weight: 400; line-height: 1;
  transition: top .7s cubic-bezier(.3,.7,.2,1); }
.tt-logo .g { background: linear-gradient(#fff6c8, #f2cf6a 38%, #c98a22 62%, #f0c45a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 1px #2a0e04) drop-shadow(0 0 1px #2a0e04) drop-shadow(0 calc(var(--w) * .003) 0 #1a0802) drop-shadow(0 0 calc(var(--w) * .01) rgba(0,0,0,.7)); }
.tt-logo .l1 { font-size: calc(var(--w) * .0931); letter-spacing: .02em; }
.tt-logo .l2 { font-size: calc(var(--w) * .1372); margin-top: calc(var(--w) * .006); }
.tt-logo .rule { width: calc(var(--w) * .547); height: max(2px, calc(var(--w) * .003)); margin: calc(var(--w) * .014) auto 0;
  background: linear-gradient(90deg, transparent, #e0b04a 15%, #e0b04a 85%, transparent); }
.tt-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(transparent, #000a); transition: opacity .4s; }
.tt-taptext { position: absolute; left: 0; right: 0; bottom: 12%; text-align: center; font: 700 18px var(--font); letter-spacing: .2em; color: var(--cream);
  text-shadow: 2px 2px 0 #000; transition: opacity .4s; animation: tt-blink 1.6s ease-in-out infinite; }
@keyframes tt-blink { 50% { opacity: .45; } }
.tt-menu .tt-shade, .tt-menu .tt-taptext, .tt-card .tt-shade, .tt-card .tt-taptext { opacity: 0; pointer-events: none; animation: none; }
.tt-card .tt-logo { opacity: 0; transition: opacity .5s; }
.tt-band { position: absolute; left: 0; right: 0; bottom: 0; background: url(assets/ui/crane_tile.png) 0 0 / 164px 82px #002061; image-rendering: pixelated;
  border-top: 2px solid var(--beige); box-shadow: 0 -1px 0 var(--beige-dk), 0 -60px 60px -10px #002061cc; padding: 16px 16px calc(26px + env(safe-area-inset-bottom));
  transform: translateY(calc(100% + 80px)); transition: transform .7s cubic-bezier(.3,.7,.2,1); }
.tt-band::before { content: ""; position: absolute; left: 0; right: 0; top: -90px; height: 88px; background: linear-gradient(transparent, #0020618a); pointer-events: none; }
.tt-menu .tt-band { transform: none; }
.tt-instant, .tt-instant * { transition: none !important; }
.tt-band .inner { max-width: 520px; margin: 0 auto; }
@media (min-width: 700px) { .tt-band .inner { zoom: 1.2; } }
.tt-band .win { padding: 7px 10px; box-shadow: inset 0 0 0 1px #002061, inset 0 0 0 2px var(--beige-dk), 3px 3px 0 var(--shadow); background: #002061; }
.tt .row { display: flex; align-items: center; gap: 8px; }
.tt-stage .tile { padding: 2px 8px; font-size: 13px; } .tt-stage .t { font: 700 15px var(--font); text-shadow: 1px 1px 0 #000; }
.tt-play { display: block; width: 100%; margin-top: 14px; font-size: 20px; padding: 13px 0; letter-spacing: .12em; text-shadow: 2px 2px 0 #000; border-radius: 0; }
.tt-new { margin-top: 8px; text-align: center; }
.tt-newbtn { font: 700 12px var(--font); color: var(--cream); background: none; border: 0; padding: 4px 14px; text-decoration: underline; opacity: .85; }
.tt-ask { display: flex; align-items: center; justify-content: center; gap: 10px; font: 700 13px var(--font); color: var(--cream); }
.tt-ask .btn2 { padding: 6px 14px; border-radius: 0; }
.tt-ask[hidden], .tt-new[hidden] { display: none; }
.tt-up { width: 100%; margin-top: 10px; justify-content: center; gap: 12px; padding: 8px 0; border-radius: 0; }
.tt-up .peach { font: 700 14px var(--font); padding: 1px 10px; text-shadow: none; border-color: #ffd2bc #8a4a30 #8a4a30 #ffd2bc; }

/* Title sequence, part 2: the stage card (design/title/stage-card.html) */
.tt-dim { position: absolute; inset: 0; background: #000a1ecc; opacity: 0; pointer-events: none; transition: opacity .5s; }
.tt-card .tt-dim { opacity: 1; }
.tt-cardwrap { position: absolute; left: 50%; top: 50%; width: calc(var(--w) - 32px); max-width: 420px; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
.tt-card .tt-cardwrap { opacity: 1; animation: sc-in .35s ease-out; }
@keyframes sc-in { from { opacity: 0; transform: translate(-50%, -46%); } }
@media (min-width: 700px) { .tt-cardwrap { zoom: 1.25; } }
.tt-card-win { padding: 14px; box-shadow: inset 0 0 0 1px #002061, inset 0 0 0 2px var(--beige-dk), 3px 3px 0 var(--shadow); background: #002061; }
.tt-card-top { justify-content: space-between; }
.tt-card-top .tile { font-size: 14px; padding: 3px 12px; }
.tt-card-top .sv { font: 12px var(--font); color: #cfd6f0; text-shadow: 1px 1px 0 #000; }
.tt-card-top .peach { font: 700 12px var(--font); padding: 0 6px; }
.sc-name { font: 30px var(--font-big); text-align: center; margin: 14px 0 2px; text-shadow: 2px 2px 0 #000; }
.sc-en { font: 12px var(--font); text-align: center; color: #cfd6f0; letter-spacing: .1em; text-shadow: 1px 1px 0 #000; }
.sc-rule { height: 2px; background: var(--beige-dk); margin: 14px 0; box-shadow: 0 1px 0 #000; }
.sc-say { align-items: flex-start; gap: 12px; }
.sc-por { width: 72px; height: 90px; flex: none; box-sizing: border-box; border: 2px solid var(--beige); box-shadow: inset 0 0 0 1px var(--beige-dk); background: #000; }
.sc-por img { width: 100%; height: 100%; display: block; }
.sc-talk { flex: 1; min-width: 0; }
.sc-who { font: 700 14px var(--font); color: #ff7a5a; text-shadow: 1px 1px 0 #000; }
.sc-who span { color: #fff; font-weight: 400; }
.sc-bub { position: relative; margin-top: 6px; background: var(--cream); color: #1a1408; border-radius: 10px; padding: 8px 10px; font: 14px var(--font); line-height: 1.55; word-break: keep-all; }
.sc-bub::before { content: ""; position: absolute; left: -9px; top: 12px; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-right: 9px solid var(--cream); }
.sc-bar { height: 4px; margin: 14px 8px 0; background: var(--sunk); border: 1px solid #000; }
.sc-bar i { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; }
.sc-bar i.run { transform: scaleX(0); transition: transform linear; }
.sc-skip { text-align: center; margin-top: 10px; font: 12px var(--font); color: #cfd6f0; letter-spacing: .15em; text-shadow: 1px 1px 0 #000; }

/* Hero select (E3; layout unchanged, Jee 2026-11-14) */
.sel-head { gap: 10px; }
.sel-head h2 { font: 18px var(--font-big); color: var(--gold); text-shadow: 2px 2px 0 #000; letter-spacing: .06em; text-transform: uppercase; }
/* status window: BTK-style window like the level-up and results screens */
#hero-panel.kpanel { background: url(assets/ui/crane_tile.png) -37px -21px / 164px 82px #002061; image-rendering: pixelated; border: 2px solid var(--beige); border-radius: 3px;
  box-shadow: inset 0 0 0 2px var(--navy), inset 0 0 0 3px var(--beige-dk), 0 3px 0 var(--shadow); padding: 9px 10px; color: #fff; }
.kpanel .kname { background: var(--tile); border: 2px solid; border-color: var(--tile-l) var(--tile-d) var(--tile-d) var(--tile-l); color: var(--cream);
  font: 700 15px var(--font); padding: 2px 10px; text-shadow: 1px 1px 0 #000; }
.kpanel .pill { font: 700 11px var(--font); padding: 2px 8px; border-radius: 0; border: 2px solid; text-shadow: 1px 1px 0 #000; color: var(--cream); }
.kpanel .pill.good { background: #2a5a8a; border-color: #7a9ac8 #0a2038 #0a2038 #7a9ac8; }
.kpanel .pill.bad { background: var(--tile); border-color: var(--tile-l) var(--tile-d) var(--tile-d) var(--tile-l); }
.kpanel .pill:not(.good):not(.bad) { background: var(--blue); border-color: var(--blue-l) var(--blue-d) var(--blue-d) var(--blue-l); }
.kpanel .por { padding: 0; background: #000; border: 2px solid var(--beige); box-shadow: inset 0 0 0 1px var(--beige-dk); }
.kpanel .kweap { background: var(--sunk); border: 2px solid; border-color: var(--sunk-dk) var(--sunk-lt) var(--sunk-lt) var(--sunk-dk);
  font: 10px var(--font); color: #cfd6f0; text-shadow: 1px 1px 0 #000; }
.kpanel .kweap b { font: 700 11px var(--font); color: #fff; }
.kpanel .radar text { font: 700 9px var(--font); }
.kpanel .klocked { color: var(--muted); font-size: 13px; text-shadow: 1px 1px 0 #000; }
.kpanel .kstory { background: var(--cream); color: #1a1408; border-radius: 3px; box-shadow: inset 0 0 0 2px var(--beige-dk); font: 12px/1.5 var(--font); }
.kpanel .kstory blockquote { border-left: 3px solid var(--ver); font: 700 12px/1.4 var(--font); color: #6a1a10; background: rgba(200,64,44,.1); }
.kpanel .kstory blockquote span { font: 10px var(--font); color: #8a5a20; }
.kpanel .ktabs button { font: 700 12px var(--font); color: var(--cream); background: var(--blue); border: 2px solid; border-radius: 0; padding: 2px 12px;
  border-color: var(--blue-l) var(--blue-d) var(--blue-d) var(--blue-l); outline: 1px solid #000; text-shadow: 1px 1px 0 #000; }
.kpanel .ktabs button.on { background: var(--peach); color: var(--peach-text); border-color: var(--peach-l) var(--peach-d) var(--peach-d) var(--peach-l); text-shadow: none; }
/* hero grid: sunken slots; the chosen hero gets the gold edge (like a maxed slot) */
#hero-grid { gap: 6px; }
.hero-card { border-radius: 0; background: var(--sunk); border: 2px solid; border-color: var(--sunk-dk) var(--sunk-lt) var(--sunk-lt) var(--sunk-dk); padding: 6px 2px 4px; }
.hero-card.sel { background: #0a2670; border-color: var(--blue-d) var(--gold) var(--gold) var(--blue-d); box-shadow: 0 0 0 1px #000; }
.hero-card .hn { font: 700 13px var(--font); text-shadow: 1px 1px 0 #000; }
.hero-card.locked { opacity: .7; } .hero-card.locked .hn { color: var(--muted); }

/* Version label (Jee 2026-11-14): small, so screenshots show which build they came from */
.tt-ver { text-align: center; margin-top: 10px; font: 11px var(--font); color: #8fa0d0; text-shadow: 1px 1px 0 #000; letter-spacing: .08em; }
.rs-ver { text-align: center; margin-top: 12px; font: 11px var(--font); color: #8fa0d0; text-shadow: 1px 1px 0 #000; }

/* Studio credit (Jee 2026-11-14): cream Lora like TAP TO START, small, at the foot of the tap screen */
.tt-studio { position: absolute; left: 0; right: 0; bottom: calc(2.5% + env(safe-area-inset-bottom)); text-align: center; font: 700 12px var(--font); letter-spacing: .3em;
  color: var(--cream); text-shadow: 1px 1px 0 #000; opacity: .8; transition: opacity .4s; }
.tt-menu .tt-studio, .tt-card .tt-studio { opacity: 0; pointer-events: none; }

/* Press feedback on every button (Jee 2026-11-14): sinks 2 px and brightens while held */
button:not(:disabled):active, .card:active, .hero-card:active { transform: translateY(2px); filter: brightness(1.3); }

/* Hero select: the starting-weapon box keeps room for 3 lines of description so the panel doesn't jump between heroes (Jee 2026-11-15). */
.kpanel .kweap { min-height: 124px; justify-content: flex-start; }

/* Leaderboard step 2: the hook line under the results header, and the RECORDS button (blue, gold text, gold edge) */
.rs-hook { padding: 6px 8px; text-align: center; font: 13px var(--font); color: var(--cream); text-shadow: 1px 1px 0 #000; cursor: pointer; line-height: 1.5; }
.rs-hook[hidden] { display: none; }
.rs-hook.wait { visibility: hidden; }
.rs-hook .tg { font-weight: 700; color: var(--gold); }
.rs-hook .rk { font: 700 20px var(--font-big); color: #fff; vertical-align: -1px; }
.rs-hook .df { font-weight: 700; color: var(--peach); }
.rs-hook b.ok { color: var(--gold); } .rs-hook b.no { color: var(--peach); }
.rs-hook .tm { font: 700 20px var(--font-big); color: #fff; vertical-align: -1px; }
.rs-hook .pb { font-weight: 700; color: var(--peach); }
.rs-hook .dim { color: var(--muted); font-size: 12px; }
#ov-btns button.rec { background: var(--blue); color: var(--gold); border-color: var(--gold); }

/* Leaderboard step 3: the RECORDS overlay (design/leaderboard/mockup-c.png) */
/* Leaderboard screens keep the retro pixel font (Jee 2026-11-16): RECORDS board and name entry; Korean names still in Nanum Myeongjo */
#records, #nameentry { --font: 'TKS Korean', Galmuri11, sans-serif; --font-big: 'TKS Korean', Galmuri14, Galmuri11, sans-serif; font-family: var(--font); }
#records { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0, 8, 30, 0.82); font: 13px var(--font); color: var(--cream); }
#records[hidden] { display: none; }
.rc-win { width: min(392px, 96vw); max-height: 94vh; display: flex; flex-direction: column; padding: 10px 8px 8px; box-shadow: inset 0 0 0 1px #002061, inset 0 0 0 2px var(--beige-dk), 3px 3px 0 var(--shadow); border: 2px solid var(--beige); }
.rc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.rc-title { font: 26px var(--font-big); color: var(--gold); letter-spacing: .06em; text-shadow: 2px 2px 0 #000; }
.rc-x { width: 30px; height: 28px; font: 700 20px/1 var(--font); color: #fff; background: var(--blue); border: 2px solid; border-color: var(--blue-l) var(--blue-d) var(--blue-d) var(--blue-l); border-radius: 0; padding: 0; }
.rc-stage { display: flex; align-items: center; gap: 6px; background: #0a1a52; border: 2px solid; border-color: var(--sunk-dk) var(--sunk-lt) var(--sunk-lt) var(--sunk-dk); padding: 3px 6px; }
.rc-stage .tile { font-size: 11px; padding: 2px 6px; }
.rc-stage select { flex: 1; font: 700 13px var(--font); color: #fff; background: transparent; border: 0; appearance: none; -webkit-appearance: none; text-shadow: 1px 1px 0 #000; }
.rc-stage select option { color: #000; }
.rc-tabs { display: flex; gap: 4px; margin-top: 6px; }
.rc-tabs button { font: 700 12px var(--font); color: var(--cream); padding: 3px 12px; border-radius: 0; background: var(--blue); border: 2px solid; border-color: var(--blue-l) var(--blue-d) var(--blue-d) var(--blue-l); text-shadow: 1px 1px 0 #000; }
.rc-tabs button.on { background: var(--peach); color: var(--peach-text); border-color: var(--peach-l) var(--peach-d) var(--peach-d) var(--peach-l); text-shadow: none; }
.rc-tabs.sw { gap: 0; }                                   /* ALL TIME | THIS WEEK: one two-part switch, the chosen half peach (Jee 2026-11-16) */
.rc-tabs.sw button { font-size: 11px; padding: 3px 14px; }
.rc-tabs.sw button + button { border-left-width: 0; }
.rc-rlbl { margin-top: 3px; font-size: 10px; color: var(--muted); text-shadow: 1px 1px 0 #000; letter-spacing: .02em; }
.rc-note { margin-top: 5px; text-align: center; font-size: 11px; color: var(--peach); }
.rc-list { margin-top: 6px; overflow-y: auto; flex: 1 1 auto; min-height: 120px; max-height: 66vh; position: relative; -webkit-overflow-scrolling: touch; }
.rc-row { display: grid; grid-template-columns: 22px 20px 24px 1fr 60px 42px 34px; align-items: center; gap: 4px; height: 30px; padding: 0 4px; font-size: 12px; text-shadow: 1px 1px 0 #000; border-bottom: 1px solid rgba(255,255,255,.05); }
.rc-row:nth-child(even) { background: rgba(0,0,0,.18); }
.rc-row .rc-rk { text-align: right; font-weight: 700; }
.rc-ic { width: 22px; height: 26px; object-fit: cover; image-rendering: pixelated; border: 1px solid var(--beige-dk); background: #000; display: block; }
.rc-tag { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-tag em { font-style: normal; font-size: 10px; }
.rc-big { white-space: nowrap; text-align: right; font: 16px var(--font-big); color: #fff; }
.rc-big.k { font-size: 15px; }
.rc-sm { white-space: nowrap; text-align: right; font-size: 10px; color: var(--muted); }
.rc-lv { text-align: right; font-size: 10px; color: var(--muted); }
/* seals: gold 승 = STAGE CLEARED, red 패 = DEFEATED (the results screens' own seals, small) */
.sl { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; box-sizing: border-box; font: 700 11px var(--font-big); font-style: normal; border: 1px solid var(--cream); transform: rotate(-6deg); text-shadow: none; }
.sl.ok { background: #c8982a; color: #3a0e06; border-color: #fff0b0; }
.sl.no { background: var(--ver); color: var(--cream); }
.sl.lg { width: 22px; height: 22px; font-size: 13px; }
.rc-row.cl { background: rgba(255,255,255,.07); }
.rc-row.cl .rc-big { color: var(--gold); }
.rc-row.df { color: var(--cream); }
.rc-row.df .rc-big { color: var(--cream); }
.rc-row.df .rc-tag, .rc-row.df .rc-rk { opacity: .8; }
.rc-sec { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; text-shadow: 1px 1px 0 #000; }
.rc-sec:first-child { margin-top: 0; }
.rc-sec b { letter-spacing: .04em; } .rc-sec.ok b { color: var(--gold); } .rc-sec.no b { color: var(--peach); }
.rc-sec span { font-size: 10px; color: var(--muted); white-space: nowrap; }
.rc-sec u { flex: 1; height: 1px; background: rgba(255,255,255,.25); }
.rc-cols { display: grid; grid-template-columns: 1fr 60px 42px 34px; gap: 4px; padding: 2px 4px 1px; font-size: 9px; color: var(--muted); text-align: right; text-shadow: 1px 1px 0 #000; }
.rc-cols span:first-child { grid-column: 1; }
.rc-row.me, .rc-row.me:nth-child(even) { background: var(--peach); color: var(--peach-text); text-shadow: none; }
.rc-row.me .rc-big, .rc-row.me .rc-sm, .rc-row.me .rc-lv, .rc-row.me.cl .rc-big, .rc-row.me.df .rc-big { color: var(--peach-text); }
.rc-row.me.cl, .rc-row.me.df { background: var(--peach); color: var(--peach-text); }
.rc-empty { padding: 30px 8px; text-align: center; color: var(--muted); }
.rc-you { margin-top: 2px; }
.rc-dots { text-align: center; color: var(--muted); line-height: 8px; font-size: 10px; letter-spacing: 3px; }
.rc-best { margin-top: 6px; min-height: 22px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; text-shadow: 1px 1px 0 #000; }
.rc-best b { color: var(--gold); } .rc-best .dim { color: var(--muted); }

/* Leaderboard step 4: NEW RECORD / ON THE BOARD name entry (design/leaderboard/mockup-b.png, panel 2) */
#nameentry { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; background: #0a1a52 url(assets/ui/crane_tile.png) -37px -21px / 164px 82px; image-rendering: pixelated; color: var(--cream); font: 13px var(--font); text-align: center; }
#nameentry[hidden] { display: none; }
.ne-win { width: min(380px, 96vw); max-height: 100vh; overflow-y: auto; padding: 6px 4px; }
.ne-head { font: 34px var(--font-big); color: var(--gold); letter-spacing: .06em; text-shadow: 2px 2px 0 #000; line-height: 1.1; }
.ne-head.small { font-size: 22px; color: var(--cream); }
.ne-blocks { display: flex; justify-content: center; gap: 22px; margin-top: 6px; }
.ne-val { font: 42px var(--font-big); color: #fff; text-shadow: 3px 3px 0 #000; line-height: 1.1; white-space: nowrap; }
.ne-val em { font-style: normal; color: var(--gold); }
.ne-lbl .sl { vertical-align: -3px; margin-right: 4px; }
.ne-lbl { font: 700 12px var(--font); color: var(--gold); letter-spacing: .05em; text-shadow: 1px 1px 0 #000; margin-top: 2px; }
.ne-rk { font-size: 12px; color: var(--muted); text-shadow: 1px 1px 0 #000; }
.ne-rk.dim { opacity: .5; }
.ne-pb { display: inline-block; margin-top: 8px; font: 700 12px var(--font); padding: 3px 10px; background: var(--peach); color: var(--peach-text); border: 2px solid; border-color: var(--peach-l) var(--peach-d) var(--peach-d) var(--peach-l); }
.ne-pb[hidden] { display: none; }
.ne-tag { display: flex; justify-content: center; gap: 4px; margin-top: 10px; }
.ne-tag i { width: 26px; height: 34px; font: normal 22px/32px var(--font-big); color: #fff; text-shadow: 2px 2px 0 #000; background: #0a1438; border-bottom: 3px solid var(--gold); }
.ne-tag i.cur { border-bottom-color: var(--peach); background: #14246a; }
.ne-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 10px; padding: 6px; background: rgba(0,16,58,.6); border: 2px solid var(--beige); }
.ne-grid button { height: 40px; font: 700 20px var(--font-big); color: #fff; background: var(--blue); border: 2px solid; border-color: var(--blue-l) var(--blue-d) var(--blue-d) var(--blue-l); border-radius: 0; text-shadow: 1px 1px 0 #000; padding: 0; }
.ne-grid button.wide { grid-column: span 2; font-size: 14px; }
.ne-grid button.del { font-size: 14px; background: var(--tile); border-color: var(--tile-l) var(--tile-d) var(--tile-d) var(--tile-l); }
.ne-ok { width: 100%; margin-top: 8px; height: 40px; font: 700 20px var(--font-big); color: #fff; background: var(--ver); border: 3px solid; border-color: var(--ver-l) var(--ver-d) var(--ver-d) var(--ver-l); outline: 1px solid #000; border-radius: 0; text-shadow: 1px 1px 0 #000; }
.ne-hint { margin-top: 8px; font-size: 11px; color: var(--muted); }

/* Title music mute (Jee 2026-11-16): small blue raised button, top right of the title menu only; a red slash when muted */
.tt-mute { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 10px; z-index: 6; width: 36px; height: 36px; padding: 0;
  display: none; align-items: center; justify-content: center; font: 20px/1 system-ui, sans-serif; color: var(--cream); text-shadow: 1px 1px 0 #000;
  background: var(--blue); border: 2px solid; border-color: var(--blue-l) var(--blue-d) var(--blue-d) var(--blue-l); outline: 1px solid #000; border-radius: 0; }
.tt-menu .tt-mute { display: flex; }
.tt-mute .ic { position: relative; }
.tt-mute.off { color: var(--muted); }
.tt-mute.off .ic::after { content: ''; position: absolute; left: -5px; right: -5px; top: 50%; height: 2px; background: #e03a2c; transform: rotate(-40deg); box-shadow: 0 0 0 1px #000; }

/* Leaderboard step 5: the title teaser line (option A, design/leaderboard/mockup-d.png): first thing in the menu band, above the stage tile */
.tt-rec { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 8px; padding: 7px 10px; border-radius: 0; text-align: left;
  font: 13px 'TKS Korean', Galmuri11, sans-serif; color: var(--cream); text-shadow: 1px 1px 0 #000; background: var(--blue);   /* teaser keeps the pixel font (Jee 2026-11-16) */ border: 2px solid; border-color: var(--blue-l) var(--blue-d) var(--blue-d) var(--blue-l); outline: 1px solid #000; }
.tt-rec .rl-tag { font: 700 11px 'TKS Korean', Galmuri11, sans-serif; color: var(--gold); letter-spacing: .04em; }
.tt-rec .rl-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity .25s; }
.tt-rec .rl-txt.fade { opacity: 0; }
.tt-rec .rl-go { color: var(--muted); font-size: 11px; }
.tt-rec .rl-dot { position: absolute; right: -5px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: #e02a1e; border: 2px solid #fff; box-shadow: 0 0 0 1px #000; }
.tt-rec .rl-dot[hidden] { display: none; }

/* Skins tab (Jee 2026-11-15): a third tab beside Stats and Story; the cards replace the stats while it is open, up to CONFIG.skinsMax of them */
.kpanel .kskins { display: none; gap: 6px; align-items: flex-start; min-height: 88px; }
.kpanel.skins .kstatus, .kpanel.skins .kstory { display: none; }
.kpanel.skins .kskins { display: flex; }
.kpanel .skin-chip { flex: 1 1 0; max-width: 92px; min-width: 0; padding: 2px; background: var(--sunk); cursor: pointer;
  border: 2px solid; border-color: var(--sunk-dk) var(--sunk-lt) var(--sunk-lt) var(--sunk-dk); }
.kpanel .skin-chip.sel { background: #0a2670; border-color: var(--blue-d) var(--gold) var(--gold) var(--blue-d); box-shadow: 0 0 0 1px #000; }
.kpanel .skin-chip canvas { display: block; width: 100%; aspect-ratio: 1; image-rendering: pixelated; }
.kpanel .ktabs button { position: relative; }
.new-dot { position: absolute; top: -4px; right: -4px; width: 9px; height: 9px; border-radius: 50%; background: #e03a2c; border: 1px solid #fff; }

/* Same panel height on every tab (Jee 2026-11-16): the body is a fixed 136 px (the Stats height); a long Story scrolls inside it */
.kpanel .kbody { height: 136px; }
.kpanel .kstatus, .kpanel .kskins { height: 100%; min-height: 0; box-sizing: border-box; }
.kpanel .kstory { height: 100%; box-sizing: border-box; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.kpanel .kstory { padding-top: 4px; padding-bottom: 4px; }
