/* GADAI · PLEDGE · 当票 — 1990s Glodok Teak, Green Baize, Aged Brass & Crimson Lacquer Vertical Cabinet */

@font-face {
  font-family: 'PressStart';
  src: url('fonts/press-start-2p.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Sembako';
  src: url('fonts/sembako-pixel-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Sembako';
  src: url('fonts/sembako-pixel-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Fusion Pixel Latin';
  src: url('fonts/fusion-pixel-latin.woff2') format('woff2');
  font-display: swap;
  unicode-range: U+00A0-024F, U+2000-2BFF;
}
@font-face {
  font-family: 'Fusion Pixel ZH';
  src: url('fonts/fusion-pixel-zh.woff2') format('woff2');
  font-display: swap;
  unicode-range: U+00B7, U+2014, U+2018-2019, U+201C-201D, U+2026, U+2E80-9FFF, U+3000-303F, U+FF00-FFEF;
}

:root {
  --abyss: #110b09;
  --teak-dk: #241612;
  --teak: #4a2b20;
  --teak-lt: #6b3f2f;
  --baize-dk: #142a1f;
  --baize: #1f4432;
  --baize-lt: #2d5f47;
  --crimson-dk: #5e1814;
  --crimson: #8f261e;
  --crimson-hi: #c43d32;
  --brass-dk: #6b4918;
  --brass: #c5953c;
  --brass-hi: #f5d87e;
  --paper: #f2e7cc;
  --paper-dk: #ddd0ad;
  --paper-line: #bda97f;
  --ink: #241610;
  --ink-soft: #5c4334;
  --good: #256e43;
  --warn: #b35d17;
  --cjk: 'PingFang SC', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Sembako', 'Fusion Pixel Latin', var(--cjk), monospace;
  --font-px: 'PressStart', var(--cjk), monospace;
  --vvh: 100dvh;
}

html[data-lang="zh"] {
  --cjk: 'Fusion Pixel ZH', 'PingFang SC', 'Noto Sans CJK SC', sans-serif;
  --font-body: 'Fusion Pixel ZH', 'Sembako', 'Fusion Pixel Latin', var(--cjk), monospace;
  --font-px: 'Fusion Pixel ZH', 'PressStart', monospace;
}
html[data-lang="zh"] * { line-break: strict; word-break: normal; }

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font-family: inherit; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 1px; }

html, body {
  width: 100%;
  height: 100%;
  background: var(--abyss);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  image-rendering: pixelated;
}
.hidden { display: none !important; }

/* VERTICAL 9:16 CABINET — spacious 50% stage for authored Glodok cutaway! */
#cabinet {
  width: min(100vw, 440px);
  max-width: 100vw;
  height: var(--vvh);
  max-height: 860px;
  background: var(--teak-dk);
  border: 3px solid var(--brass-dk);
  box-shadow: inset 0 0 0 2px var(--teak), inset 0 0 0 4px #160c09, 0 0 36px rgba(0, 0, 0, 0.75);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 62px minmax(240px, 50%) 1fr;
  padding: max(4px, env(safe-area-inset-top)) 4px max(4px, env(safe-area-inset-bottom));
  gap: 4px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 460px) {
  #cabinet { width: 100vw; max-height: none; border-width: 2px; }
}
/* Short phones (e.g. 360x640): give the desk enough room that the counter's inspect & offer buttons
   are visible on Turn 1 without discovering that the desk scrolls. The cutaway shrinks, never the controls. */
@media (max-height: 720px) {
  #cabinet { grid-template-rows: 62px minmax(150px, 33%) 1fr; }
  .tap-hint { font-size: 10px; padding: 2px 5px; line-height: 1.25; }
  #desk-body { padding: 5px; gap: 5px; }
  .card { padding: 5px; gap: 4px; }
  .tag-row .tag { padding: 0 4px; }
}

/* TACTILE BUTTONS */
button {
  cursor: pointer;
  border: 2px solid #160d0a;
  color: var(--paper);
  background: var(--teak);
  font-family: var(--font-px);
  font-size: 8px;
  line-height: 1.25;
  padding: 7px 8px;
  min-height: 32px;
  transition: transform 0.05s;
}
html[data-lang="zh"] button { font-size: 11px; padding: 6px 6px; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.42; cursor: not-allowed; }
.btn-brass { background: var(--brass); color: #1d1006; border-color: #2b1804; box-shadow: inset 0 2px 0 var(--brass-hi), inset 0 -2px 0 var(--brass-dk); }
.btn-baize { background: var(--baize); color: var(--paper); border-color: var(--baize-dk); box-shadow: inset 0 2px 0 var(--baize-lt), inset 0 -2px 0 var(--baize-dk); }
.btn-crimson { background: var(--crimson); color: var(--paper); border-color: var(--crimson-dk); box-shadow: inset 0 2px 0 var(--crimson-hi), inset 0 -2px 0 var(--crimson-dk); }
.btn-wood { background: var(--teak); color: var(--paper); box-shadow: inset 0 2px 0 var(--teak-lt), inset 0 -2px 0 var(--teak-dk); }
.btn-mini { min-height: 28px; height: 28px; padding: 2px 6px; font-size: 8px; background: var(--baize); border: 2px solid #0e1c14; }
html[data-lang="zh"] .btn-mini { font-size: 11px; padding: 1px 6px; }
.btn-mini.off { background: #3b2a26; color: #9c8c84; }

/* BOOT SCREEN */
#boot-screen {
  position: absolute; inset: 0; z-index: 50;
  background: radial-gradient(circle at 50% 42%, #311d16 0%, #160d0a 84%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}
.boot-top-bar { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 10px; }
.boot-center { display: flex; flex-direction: column; align-items: center; gap: 11px; text-align: center; max-width: 316px; }
.boot-presents { font-family: var(--font-px); font-size: 8px; letter-spacing: 1px; color: var(--brass); }
html[data-lang="zh"] .boot-presents { font-size: 12px; }
#boot-sprite { image-rendering: pixelated; animation: gentlebob 1.5s steps(2, jump-none) infinite; }
@keyframes gentlebob { 50% { transform: translateY(-2px); } }
.boot-brand { font-family: 'Fusion Pixel ZH', 'PressStart', sans-serif; font-size: 14px; color: var(--brass-hi); text-shadow: 2px 2px 0 #140b09; letter-spacing: 0.5px; }
.boot-bar-wrap { width: 220px; height: 10px; border: 2px solid var(--brass-dk); background: #140b09; padding: 1px; }
#boot-bar { width: 0%; height: 100%; background: var(--brass); transition: width 0.14s; }
#boot-status { font-family: var(--font-px); font-size: 8px; color: var(--paper-dk); min-height: 14px; }
html[data-lang="zh"] #boot-status { font-size: 12px; }
#boot-tip { font-size: 13px; color: #d8c6a2; line-height: 1.4; min-height: 36px; }
#boot-enter { padding: 11px 18px; font-size: 9px; animation: pulsebrass 1.3s ease-in-out infinite; }
html[data-lang="zh"] #boot-enter { font-size: 13px; }
@keyframes pulsebrass { 50% { box-shadow: inset 0 2px 0 #fff1b8, 0 0 14px rgba(245, 216, 126, 0.55); } }

/* LANGUAGE PILLS */
.lang-strip { display: flex; gap: 4px; }
.lang-pill { min-height: 26px; padding: 3px 8px; font-size: 8px; background: rgba(24, 15, 12, 0.88); border: 2px solid var(--brass-dk); color: var(--paper-dk); }
html[data-lang="zh"] .lang-pill { font-size: 11px; }
.lang-pill.active { background: var(--brass); color: #1b0f06; border-color: var(--brass-hi); }

/* TITLE SCREEN */
#title-screen { position: absolute; inset: 0; z-index: 40; background: #150e0c; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
#title-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.title-top-row { position: relative; z-index: 2; display: flex; justify-content: flex-end; padding: max(8px, env(safe-area-inset-top)) 8px 0; }
.title-menu {
  position: relative; z-index: 2;
  background: linear-gradient(180deg, rgba(20, 12, 10, 0.15) 0%, rgba(20, 12, 10, 0.94) 18%, rgba(18, 10, 8, 0.98) 100%);
  border-top: 2px solid var(--brass-dk);
  padding: 12px 10px max(10px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 7px;
  max-height: 75%; overflow-y: auto;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity 0.35s, transform 0.35s;
}
.title-menu.shown { opacity: 1; transform: none; pointer-events: auto; }
.title-sub { font-size: 13px; text-align: center; color: #f0dfb8; line-height: 1.35; text-shadow: 1px 1px 0 #140b09; }
.sprint-best { font-family: var(--font-px); font-size: 7px; text-align: center; color: var(--brass-hi); background: rgba(20, 42, 31, 0.88); border: 1px solid var(--brass-dk); padding: 4px 6px; }
html[data-lang="zh"] .sprint-best { font-size: 11px; }
.slot-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.slot-card { background: rgba(34, 21, 16, 0.92); border: 2px solid var(--brass-dk); padding: 5px 5px; text-align: left; display: flex; flex-direction: column; gap: 2px; min-height: 46px; }
.slot-card.active { border-color: var(--brass-hi); background: rgba(66, 38, 22, 0.96); box-shadow: inset 0 0 0 1px var(--brass); }
.slot-card.bad { border-color: var(--crimson-hi); }
.slot-top { display: flex; justify-content: space-between; align-items: center; gap: 2px; flex-wrap: wrap; font-family: var(--font-px); font-size: 7px; color: var(--brass-hi); }
html[data-lang="zh"] .slot-top { font-size: 10px; }
.slot-body { font-family: var(--font-body); font-size: 11px; color: var(--paper-dk); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-confirm { background: #2c1411; border: 2px solid var(--crimson-hi); padding: 7px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--paper); }
.slot-confirm-btns { display: flex; gap: 6px; }
.slot-confirm-btns button { flex: 1; }
.title-actions { display: flex; flex-direction: column; gap: 6px; }
.title-actions button { width: 100%; padding: 9px 10px; }
.title-credit { font-family: var(--font-px); font-size: 7px; text-align: center; color: #a79276; letter-spacing: 0.5px; }
html[data-lang="zh"] .title-credit { font-size: 10px; }

/* 2-ROW HUD */
#hud { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; }
.hud-row { display: flex; align-items: center; gap: 3px; min-width: 0; }
.hud-plate {
  display: flex; align-items: center; gap: 3px;
  background: #1a110e; border: 2px solid var(--brass-dk);
  padding: 1px 4px; height: 28px; white-space: nowrap; min-width: 0; overflow: hidden;
}
.pill { font-family: var(--font-px); font-size: 7px; background: var(--crimson); color: var(--brass-hi); padding: 2px 4px; border: 1px solid var(--crimson-hi); }
html[data-lang="zh"] .pill { font-size: 11px; padding: 0 4px; }
.lbl { font-family: var(--font-px); font-size: 7px; color: var(--brass); }
html[data-lang="zh"] .lbl { font-size: 10px; }
#hud strong { font-size: 13px; font-weight: 700; color: var(--brass-hi); line-height: 1; }
#hud strong.warn { color: #ff8e6e; }
.hud-chalk-plate { background: #16261d; border-color: #365743; }
.hud-chalk-plate.hot { border-color: #d66542; background: #2c1612; }
.hud-act-plate { flex: 1 1 auto; justify-content: center; background: #211410; }
.hud-act-plate.rain { background: #16222c; border-color: #3d5b70; }
.act-txt { font-family: var(--font-px); font-size: 7px; color: #dfd0ad; overflow: hidden; text-overflow: ellipsis; }
html[data-lang="zh"] .act-txt { font-size: 10px; }
.hud-tools { display: flex; gap: 3px; margin-left: auto; flex-shrink: 0; }

/* SPACIOUS 3-LAYER AUTHORED STAGE */
#stage-wrap {
  position: relative; background: #130c0a;
  border: 2px solid #140b09; box-shadow: inset 0 0 0 2px #3b241c;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; min-height: 0; min-width: 0; max-width: 100%;
}
#stage { height: 100%; width: auto; max-width: 100%; aspect-ratio: 240 / 360; image-rendering: pixelated; cursor: pointer; display: block; }

#toast-bar {
  position: absolute; top: max(8px, env(safe-area-inset-top)); left: 10px; right: 10px; z-index: 60;
  background: rgba(24, 15, 12, 0.96); border: 2px solid var(--brass-hi); color: var(--brass-hi);
  padding: 6px 8px; font-size: 13px; text-align: center; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65); pointer-events: none;
}

/* SPACIOUS NARRATIVE DIALOGUE BOX */
#dialogue {
  position: absolute; left: 6px; right: 6px; bottom: 6px; max-height: calc(100% - 12px); z-index: 15;
  background: var(--paper); color: var(--ink);
  border: 3px solid #26150e; box-shadow: inset 0 0 0 2px var(--brass-dk), 0 8px 22px rgba(0, 0, 0, 0.78);
  display: flex; flex-direction: column; padding: 8px; gap: 6px;
}
.dlg-head { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
#dlg-portrait { width: 48px; height: 48px; background: #261713; border: 2px solid var(--brass-dk); image-rendering: pixelated; flex-shrink: 0; }
.dlg-meta { min-width: 0; flex: 1; }
#dlg-speaker { font-family: var(--font-px); font-size: 8px; color: var(--baize); }
html[data-lang="zh"] #dlg-speaker { font-size: 11px; }
#dlg-title { font-size: 15px; font-weight: 700; color: var(--crimson); line-height: 1.2; margin-top: 2px; }
#dlg-body {
  font-size: 14px; line-height: 1.45; overflow-y: auto; min-height: 0; flex: 1 1 auto;
  padding: 6px 7px; background: var(--paper-dk); border: 1px solid var(--paper-line); cursor: pointer;
}
#dlg-choices { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.dlg-choice {
  background: var(--baize); color: var(--paper); text-align: left;
  padding: 7px 9px; font-family: var(--font-body); font-size: 14px;
  border: 2px solid var(--baize-dk); box-shadow: inset 0 1px 0 var(--baize-lt);
}
.dlg-choice:hover:not(:disabled) { background: var(--baize-lt); }

/* LAST-TURN REPORT & SEASON CARD */
.turn-report {
  position: absolute; top: 6px; left: 6px; right: 6px; z-index: 6; max-height: 55%; overflow-y: auto;
  background: rgba(244, 234, 208, 0.97); color: var(--ink);
  border: 2px solid var(--paper-line); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
  padding: 6px 8px; font-size: 13px;
}
.tr-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-family: var(--font-px); font-size: 8px; color: var(--crimson); }
html[data-lang="zh"] .tr-head { font-size: 12px; }
.tr-money { font-weight: 700; margin: 3px 0; }
.tr-money.pos { color: var(--good); }
.tr-money.neg { color: var(--crimson); }
.tr-lines { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.season-card {
  position: absolute; left: 50%; top: 44%; z-index: 5; transform: translate(-50%, -50%); pointer-events: none;
  background: rgba(20, 12, 10, 0.92); border: 2px solid var(--brass); color: var(--brass-hi);
  font-family: var(--font-px); font-size: 9px; padding: 9px 14px; white-space: nowrap;
}
html[data-lang="zh"] .season-card { font-size: 15px; }
.season-card.play { animation: seasoncard 2.2s ease-in-out both; }
@keyframes seasoncard { 0% { opacity: 0; transform: translate(-50%, -40%); } 15%, 78% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -56%); } }

/* COUNTER DESK & PROGRESSIVE TABS */
#desk {
  background: var(--paper); color: var(--ink);
  border: 2px solid #160d0a; box-shadow: inset 0 0 0 2px var(--brass-dk);
  display: flex; flex-direction: column; min-height: 0; min-width: 0; max-width: 100%; overflow: hidden;
}
#tabs { display: flex; background: var(--teak-dk); border-bottom: 2px solid var(--brass-dk); padding: 3px 3px 0; gap: 2px; flex-shrink: 0; }
.tab {
  flex: 1 1 0; min-width: 0; min-height: 32px; padding: 5px 2px;
  font-family: var(--font-px); font-size: 7px;
  background: var(--teak); color: #ccb895; border: 2px solid #1a0f0c; border-bottom: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html[data-lang="zh"] .tab { font-size: 11px; padding: 4px 2px; }
.tab.active { background: var(--paper); color: var(--ink); font-weight: 700; }
.tab.fresh { animation: tabglow 1.2s ease-in-out 2; }
@keyframes tabglow { 50% { background: var(--brass); color: #1b0f06; } }

#desk-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 7px; display: flex; flex-direction: column; gap: 7px;
  /* Scroll shadows: a soft ink edge appears only where more desk content is hidden above/below */
  background:
    linear-gradient(var(--paper) 30%, rgba(0, 0, 0, 0)) top / 100% 18px no-repeat local,
    linear-gradient(rgba(0, 0, 0, 0), var(--paper) 70%) bottom / 100% 18px no-repeat local,
    radial-gradient(farthest-side at 50% 0, rgba(40, 20, 10, 0.28), rgba(0, 0, 0, 0)) top / 100% 9px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, rgba(40, 20, 10, 0.28), rgba(0, 0, 0, 0)) bottom / 100% 9px no-repeat scroll;
  background-color: var(--paper);
}

/* CARDS & TAGS */
.card { background: #f8efd9; border: 2px solid var(--paper-line); padding: 7px; display: flex; flex-direction: column; gap: 6px; }
.card-head { display: flex; align-items: center; gap: 8px; }
.item-thumb { width: 34px; height: 34px; background: #261713; border: 2px solid var(--brass-dk); image-rendering: pixelated; flex-shrink: 0; }
.port-thumb { width: 40px; height: 40px; background: #261713; border: 2px solid var(--brass-dk); image-rendering: pixelated; flex-shrink: 0; }
.card-title { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.card-sub { font-size: 12px; color: var(--ink-soft); line-height: 1.3; }
.tap-hint { font-size: 12px; color: var(--ink); background: #f9e6a8; border: 2px dashed var(--brass-dk); padding: 5px 7px; text-align: center; }
.section-lbl { font-family: var(--font-px); font-size: 8px; color: var(--crimson); letter-spacing: 0.4px; }
html[data-lang="zh"] .section-lbl { font-size: 11px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 11px; padding: 2px 6px; background: var(--paper-dk); border: 1px solid var(--paper-line); color: var(--ink); }
.tag.good { background: #d4ecd9; border-color: #6ea87f; color: #1a5230; }
.tag.warn { background: #f8d8ce; border-color: #d4725c; color: #8c2218; font-weight: 700; }

.btn-row { display: flex; gap: 5px; flex-wrap: wrap; }
.btn-row button { flex: 1 1 0; min-width: 84px; padding: 6px 5px; }
.btn-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }

.led-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 3px 0; border-bottom: 1px dashed var(--paper-line); gap: 6px; }
.led-row:last-child { border-bottom: none; }
.pos { color: var(--good); font-weight: 700; }
.neg { color: var(--crimson); font-weight: 700; }
.log-item { font-size: 12px; line-height: 1.3; padding: 3px 5px; border-left: 3px solid var(--paper-line); background: #f5ebd2; }
.log-item.warm { border-left-color: var(--good); }
.log-item.warn, .log-item.alert { border-left-color: var(--crimson); background: #f8e2db; }
.log-item.finale { border-left-color: var(--brass); background: #efe0b9; font-weight: 700; }

.bar-track { height: 8px; background: #d5c5a2; border: 1px solid var(--paper-line); overflow: hidden; }
.bar-fill { height: 100%; background: var(--baize); }
.bar-fill.warn { background: var(--crimson); }

/* ONE-THUMB FOOTER */
#thumb-bar {
  display: flex; align-items: center; gap: 5px; padding: 4px 6px;
  background: var(--teak-dk); border-top: 2px solid var(--brass-dk); flex-shrink: 0;
}
.visitor-pills { display: flex; gap: 4px; flex: 1 1 auto; min-width: 0; overflow-x: auto; }
.vis-pill {
  min-height: 32px; padding: 4px 8px; font-family: var(--font-body); font-size: 12px;
  background: var(--teak); border: 2px solid var(--brass-dk); color: var(--paper-dk); white-space: nowrap;
}
.vis-pill.active { background: var(--baize); border-color: var(--brass-hi); color: var(--brass-hi); }
.vis-pill.done { opacity: 0.5; text-decoration: line-through; }
.btn-next {
  min-height: 34px; padding: 4px 12px; font-size: 8px; flex-shrink: 0;
  background: var(--brass); color: #1b0f06; border: 2px solid #2b1804;
  box-shadow: inset 0 2px 0 var(--brass-hi), inset 0 -2px 0 var(--brass-dk);
}
html[data-lang="zh"] .btn-next { font-size: 12px; padding: 3px 12px; }
.btn-next.armed { background: var(--crimson); color: var(--paper); border-color: var(--crimson-hi); }
.btn-crimson.armed { background: var(--brass-hi); color: var(--crimson); border-color: var(--crimson); animation: tabglow 0.9s ease-in-out infinite; }

/* MODALS (OPTIONS & RED BOOK REVIEW) */
.overlay { position: absolute; inset: 0; z-index: 55; background: rgba(12, 7, 5, 0.82); display: flex; align-items: center; justify-content: center; padding: 12px; }
.modal-card {
  width: 100%; max-height: 92%; overflow-y: auto;
  background: #231511; color: var(--paper);
  border: 3px solid var(--brass); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8);
  padding: 10px; display: flex; flex-direction: column; gap: 9px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-px); font-size: 9px; color: var(--brass-hi); border-bottom: 1px solid var(--brass-dk); padding-bottom: 6px; }
html[data-lang="zh"] .modal-head { font-size: 13px; }
.opt-group { display: flex; flex-direction: column; gap: 5px; }
.opt-label { font-family: var(--font-px); font-size: 7px; color: var(--brass); }
html[data-lang="zh"] .opt-label { font-size: 11px; }
.opt-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.opt-pill { min-height: 28px; padding: 4px 8px; font-size: 8px; background: #311d16; border: 2px solid var(--brass-dk); color: var(--paper-dk); }
html[data-lang="zh"] .opt-pill { font-size: 11px; }
.opt-pill.active { background: var(--brass); color: #1b0f06; border-color: var(--brass-hi); }
#opt-audio-row.muted .opt-pill:not(.master) { opacity: 0.42; }
.opt-wide { width: 100%; }
.opt-slot-tag { font-size: 12px; color: var(--brass-hi); }
.opt-io-row { display: flex; gap: 6px; }
.opt-io-row button { flex: 1; }
#save-io-box { width: 100%; background: #140c0a; color: var(--paper); border: 2px solid var(--brass-dk); padding: 6px; font-size: 12px; resize: none; }

.rev-body { display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.45; }
.rev-satchel { background: #170e0b; border: 1px solid var(--brass-dk); padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.rev-satchel strong { font-family: var(--font-px); font-size: 7px; color: var(--brass-hi); }
html[data-lang="zh"] .rev-satchel strong { font-size: 11px; }
.rev-notes { background: #16261d; border-left: 3px solid var(--brass); padding: 5px 7px; font-size: 12px; color: #f0dfb8; display: flex; flex-direction: column; gap: 3px; }
.rev-rank { text-align: center; font-family: var(--font-px); font-size: 11px; color: var(--brass-hi); margin-top: 2px; }
html[data-lang="zh"] .rev-rank { font-size: 16px; }
.rev-score-big { text-align: center; font-family: var(--font-px); font-size: 18px; color: #fff1c2; }
.rev-score-big small { font-size: 10px; color: var(--brass); }
.rev-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.rev-cell { background: #170e0b; border: 1px solid var(--brass-dk); padding: 6px 4px; text-align: center; display: flex; flex-direction: column; gap: 3px; }
.rev-cell .k { font-size: 11px; color: var(--brass); }
.rev-cell .v { font-family: var(--font-px); font-size: 10px; color: var(--paper); }
.rev-stats { text-align: center; color: #dfcea9; font-size: 12px; }
.rev-actions { display: flex; gap: 6px; }
.rev-actions button { flex: 1; }

/* LANDSCAPE PHONE ROTATE HINT */
.rotate-hint { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  .rotate-hint {
    display: flex; position: fixed; inset: 0; z-index: 100;
    align-items: center; justify-content: center; background: #160e0c;
    color: var(--brass-hi); font-family: var(--font-px); font-size: 10px; text-align: center; padding: 24px; line-height: 1.6;
  }
  html[data-lang="zh"] .rotate-hint { font-size: 16px; }
}
@media (max-width: 375px) {
  #hud .hud-row:first-child .hud-plate:nth-child(2) .lbl { display: none; }
  .hud-plate { padding: 1px 3px; gap: 2px; }
  #hud strong { font-size: 12px; }
  .btn-mini { padding: 2px 5px; }
  .hud-act-plate { display: none; }
}
@media (max-width: 340px) {
  #hud .hud-row:first-child .hud-plate:nth-child(3) .lbl { display: none; }
  .slot-top { font-size: 6px; }
  html[data-lang="zh"] .slot-top { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  #boot-sprite, #boot-enter, .tab.fresh, .btn-crimson.armed { animation: none; }
  .title-menu { transition: none; }
}
