/* ══════════════════════════════════════════════════════════════
   뮤나리자 등급 공개 방식 비교 작업판
   (1546813496346288128-v2-20260908-235630 · 부모 1546813496346288128-v1)
   비교 시안 · 제품 미반영 · 확률·시간은 시험값.

   두 층으로 되어 있다.
   1) 바깥 「작업판」 — 탭·모드·안내. PC 중심이지만 390px 폭에서도 탭과 안내가 접근된다.
   2) 안쪽 「무대」 — 1920×1080 고정. 기존판 iframe 과 신규 A/B/C 무대가 같은 방식으로
      폭에 맞춰 등비 축소되고, 줄어든 만큼 감싼 칸 높이도 JS 가 줄여서 빈 공간이 남지 않는다.
      축소 비율은 폭뿐 아니라 「무대가 시작되는 높이」를 뺀 첫 화면 높이에도 맞춘다(reveal-app.js).

   v2 최소 수정 — 좌표·색·요소·순서는 부모 그대로 두고 아래 세 가지만 손봤다.
   · 바깥 여백을 조금 줄여 첫 화면에 무대가 더 들어가게 했다.
   · 좁은 폭(≤640px)에서는 무대를 통째로 줄이지 않고 같은 요소를 세로로 편다.
     통째 축소는 작업대 93px·글씨 2~6px 이 되어 검토 자체가 불가능했다.
   · 기존판 탭에서 잠기는 모드 버튼의 비활성 표시를 더했다.

   무대 안 좌표(자리·크기)는 기존판(0904 비교판 shared/play.css)의 값을 그대로 물려받았다.
   좌 패널 40~360 / 중앙 작업공간 380~1490 / 우 안내줄 1520~1880, 위 76~1064.
   자리(left/top/width/height)는 이 순서로 한 줄에 적는다 — 테스트가 그대로 읽는다.
   ══════════════════════════════════════════════════════════════ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; background: #17120d; }
body {
  color: #e8dcc4;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  word-break: keep-all;
  min-height: 100%;
}
button { font-family: inherit; }
[hidden] { display: none !important; }

/* ══ 바깥 작업판 ══ */
/* 여백 최소 보정 — 무대 위 머리말·탭·안내가 차지하던 높이를 조금 줄여 첫 화면을 넓힌다 */
#board { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 14px; }
#boardHead {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: #1b140f; border: 1px solid #57452c; border-radius: 8px; padding: 10px 14px;
}
#boardHead h1 { font-size: 16px; color: #f0e3c2; letter-spacing: 0.3px; }
#idTag {
  font-size: 11.5px; font-weight: 800; color: #9fc37a;
  border: 1px solid #4a5c3a; border-radius: 6px; padding: 4px 8px;
}
.mock-tag {
  font-size: 11px; font-weight: 900; letter-spacing: 0.4px; color: #d8b978;
  border: 1px dashed #8a6f3c; border-radius: 6px; padding: 5px 9px;
}

/* 탭·모드·시점 — 좁은 폭에서도 줄바꿈으로 전부 보인다 (숨기지 않는다) */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#tabBar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bar-title { font-size: 12px; font-weight: 800; color: #b09d7e; margin-right: 4px; white-space: nowrap; }
.bar button {
  background: #2e251b; color: #c9b891; border: 1px solid #57452c;
  border-radius: 6px; padding: 8px 12px; font-size: 13px; cursor: pointer; line-height: 1.25;
}
.bar button:hover:not(:disabled) { border-color: #d8b978; }
.bar button[aria-pressed="true"] { background: #3a3222; border-color: #d8b978; color: #f4dc9a; font-weight: 800; }
/* 기존판 탭에서는 체험 모드를 고를 수 없다 — 패널 버튼과 같은 비활성 표시를 쓴다 */
.bar button:disabled { opacity: 0.45; cursor: default; }
#tabBar button { font-size: 13.5px; padding: 9px 14px; }
#tabBar button small { display: block; font-size: 11px; font-weight: 400; color: #8d7b5f; }
#tabBar button[aria-pressed="true"] small { color: #c9b891; }

#boardNote {
  font-size: 12.5px; line-height: 1.55; color: #d8b978;
  border: 1px dashed #6a5a2c; border-radius: 8px; padding: 8px 12px;
}

/* 무대를 감싸는 칸 — 높이는 JS 가 축소 비율에 맞춰 정한다 */
.stage-wrap { position: relative; width: 100%; overflow: hidden; background: #14100c; border: 1px solid #3a2f24; border-radius: 10px; }
#legacyPane, #playPane { display: none; }
#board[data-tab="legacy"] #legacyPane { display: block; }
#board[data-tab="A"] #playPane,
#board[data-tab="B"] #playPane,
#board[data-tab="C"] #playPane { display: block; }
#legacyFrame {
  position: absolute; left: 0; top: 0;
  width: 1920px; height: 1080px; border: 0;
  transform-origin: 0 0;
}

/* ══ 안쪽 무대 — 1920×1080 고정 ══ */
#playStage {
  position: absolute; left: 0; top: 0;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  overflow: hidden;
  background: #221c16;
}

/* ── 등급 5색 — 기존판과 같은 값 ── */
.grade-cell { --grade-color: #b09d7e; }
.grade-cell[data-grade="bronze"] { --grade-color: #c07a45; }
.grade-cell[data-grade="silver"] { --grade-color: #c9d2da; }
.grade-cell[data-grade="gold"] { --grade-color: #e8c14a; }
.grade-cell[data-grade="platinum"] { --grade-color: #9ad7e8; }
.grade-cell[data-grade="diamond"] { --grade-color: #d79ae8; }

/* ── 무대 상태바 ── */
#reviewBar { left: 40px; top: 16px; width: 1840px; height: 48px;
  position: absolute;
  display: flex; align-items: center; gap: 14px;
  background: #1b140f; border: 1px solid #57452c; border-radius: 8px;
  padding: 0 16px; font-size: 12.5px; color: #b09d7e;
}
#reviewBar h2 { font-size: 15px; color: #f0e3c2; letter-spacing: 0.4px; white-space: nowrap; }
#scopeNote { flex: 1 1 auto; font-size: 13px; color: #9fc37a; font-weight: 800; white-space: nowrap; overflow: hidden; }

/* ══ 왼쪽 · 패널 ══ */
#comparePanel { left: 40px; top: 76px; width: 320px; height: 988px;
  position: absolute;
  display: flex; flex-direction: column; gap: 10px;
  background: #191411; border: 1px solid #3a2f24; border-radius: 10px;
  padding: 14px;
  overflow: hidden;
}
#panelHead h3 { font-size: 15px; color: #f4dc9a; letter-spacing: 0.4px; }
#panelHead p { font-size: 11px; color: #8d7b5f; line-height: 1.45; margin-top: 4px; }
#panelBody { display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.opt-group { display: flex; flex-direction: column; gap: 5px; }
.opt-title { font-size: 12px; font-weight: 800; color: #b09d7e; letter-spacing: 0.3px; }
.opt-title small { font-weight: 400; color: #8d7b5f; margin-left: 6px; }
.opt-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.opt-buttons[data-cols="3"] { grid-template-columns: 1fr 1fr 1fr; }
.opt-buttons button {
  background: #2e251b; color: #c9b891; border: 1px solid #57452c;
  border-radius: 6px; padding: 7px 6px; font-size: 12.5px; cursor: pointer; white-space: nowrap;
  line-height: 1.2;
}
.opt-buttons button:hover:not(:disabled) { border-color: #d8b978; }
.opt-buttons button[aria-pressed="true"] { background: #3a3222; border-color: #d8b978; color: #f4dc9a; font-weight: 800; }
.opt-buttons button:disabled { opacity: 0.45; cursor: default; }
.opt-buttons button[data-set="result"]::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 0;
  background: var(--dot, #8d7b5f); border-radius: 2px;
}
.opt-buttons button[data-value="random"] { --dot: #8d7b5f; }
.opt-buttons button[data-value="bronze"] { --dot: #c07a45; }
.opt-buttons button[data-value="silver"] { --dot: #c9d2da; }
.opt-buttons button[data-value="gold"] { --dot: #e8c14a; }
.opt-buttons button[data-value="platinum"] { --dot: #9ad7e8; }
.opt-buttons button[data-value="diamond"] { --dot: #d79ae8; }
.panel-hint { font-size: 11px; color: #d8b978; line-height: 1.45; border: 1px dashed #6a5a2c; border-radius: 6px; padding: 5px 8px; }

.prob-list { display: flex; flex-direction: column; gap: 3px; }
.prob-cell {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--grade-color); border-radius: 6px;
  padding: 3px 8px; height: 24px;
}
.prob-cell b { font-size: 12px; font-weight: 800; color: var(--grade-color); }
.prob-cell i { font-size: 13px; font-weight: 800; color: #e8dcc4; font-style: normal; }
#probSum { font-size: 11.5px; color: #d8b978; font-weight: 800; text-align: right; }

#panelActions { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
#panelActions button {
  background: #2e251b; color: #c9b891; border: 1px solid #57452c;
  border-radius: 6px; padding: 9px 12px; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  text-align: left;
}
#panelActions button:hover:not(:disabled) { border-color: #d8b978; }
#panelActions button[aria-pressed="true"] { background: #3a3222; border-color: #d8b978; color: #f4dc9a; }
#nextBtn { background: #d8b978; color: #221c16; border-color: #d8b978; font-weight: 800; }

/* ══ 중앙 · 작업공간 ══ */
#workspace { left: 380px; top: 76px; width: 1110px; height: 988px;
  position: absolute;
  background: radial-gradient(circle at 50% 42%, #34291e 0, #251e17 55%, #1d1712 100%);
  border: 1px solid #493a29; border-radius: 12px;
  box-shadow: inset 0 -20px 34px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.original-card { left: 20px; top: 70px; width: 240px; height: 96px;
  position: absolute;
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: #1d1712; border: 1px solid #57452c; border-radius: 10px;
  padding: 10px 12px; color: #e8dcc4;
}
.original-card canvas {
  image-rendering: pixelated; image-rendering: crisp-edges;
  width: 72px; height: 72px; flex: 0 0 auto;
  border: 2px solid #5b432c; border-radius: 4px; background: #14100c;
}
.original-card .sel-text b { display: block; font-size: 14px; color: #f3e7c8; margin-bottom: 3px; }
.original-card .sel-text span { font-size: 11.5px; color: #9b8a6c; line-height: 1.4; display: block; }

/* 등급 칸 — A/B 는 다섯 칸을 켜고, C 는 칸을 아예 그리지 않고 「등급 미공개」만 남긴다 */
#gradeLadder { left: 280px; top: 166px; width: 600px; height: 78px;
  position: absolute;
  display: flex; align-items: center; gap: 10px;
  background: rgba(20, 15, 10, 0.94); border: 1px solid #6a5a2c; border-radius: 10px;
  padding: 0 14px;
}
#ladderTitle {
  font-size: 13px; font-weight: 800; color: #f4dc9a; letter-spacing: 0.3px;
  flex: 0 0 auto; width: 72px; text-align: center; line-height: 1.25;
}
#ladderCells { display: flex; gap: 8px; flex: 1 1 auto; }
#ladderNote { font-size: 12.5px; font-weight: 800; color: #c9b891; flex: 1 1 auto; text-align: center; line-height: 1.4; }
.ladder-cell {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 54px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--grade-color); border-radius: 7px;
  opacity: 0.38;
}
.ladder-cell b { font-size: 12.5px; font-weight: 800; color: var(--grade-color); }
.ladder-cell i { font-size: 10px; font-style: normal; color: #b09d7e; height: 12px; line-height: 12px; }
.ladder-cell[data-state="current"] {
  opacity: 1; background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 1px var(--grade-color), 0 0 12px rgba(255, 255, 255, 0.12);
}
.ladder-cell[data-state="current"] i { color: #f0e3c2; }
.ladder-cell[data-state="past"] { opacity: 0.68; }
.ladder-cell[data-final="true"] { box-shadow: 0 0 0 2px var(--grade-color), 0 0 18px var(--grade-color); }

.ink-cartridge { position: absolute; left: 235px; top: 250px; width: 42px; height: 480px;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.55));
}
.ink-cartridge .ink-pipe {
  position: absolute; left: 40%; top: -22px; width: 22%; height: 26px;
  background: #30281e; border: 2px solid #7d6848; border-bottom: 0; border-radius: 3px 3px 0 0;
}
.ink-cartridge .ink-tank {
  position: absolute; left: 10%; right: 10%; top: 0; bottom: 40px;
  border: 3px solid #806849; border-radius: 9px; background: #130d16; overflow: hidden;
}
.ink-cartridge .ink-liquid {
  position: absolute; left: 0; right: 0; bottom: 0; height: 78%;
  background: linear-gradient(90deg, #3f6b8a, #62b6d8 55%, #3f6b8a);
}
.ink-cartridge .ink-liquid::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: rgba(200, 240, 255, 0.75);
}
.ink-cartridge .ink-readout {
  position: absolute; left: -8%; right: -8%; bottom: 0; height: 34px;
  border: 2px solid #806849; border-radius: 5px; background: #2b2118;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #f2d47f;
}

/* 작업대 — 기존판 확정값: 자리 315,250 · 작업대 480 · 작품 432 · 나무 틀 12px */
.bench { left: 315px; top: 250px; width: 480px; height: 480px;
  position: absolute;
  --bench-size: 480px; --bench-art-size: 432px;
  cursor: ns-resize;
}
.bench-unit {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: var(--bench-size); height: var(--bench-size);
  background: #14100c;
  border: 12px solid #5b432c;
  border-radius: 6px;
  box-shadow: 0 7px 0 #4a3826, 0 13px 0 #2b2016, 0 18px 20px rgba(0, 0, 0, 0.4);
}
.bench-unit canvas.art {
  image-rendering: pixelated; image-rendering: crisp-edges;
  width: var(--bench-art-size); height: var(--bench-art-size); display: block;
  flex: 0 0 auto;
}
.bench-unit canvas.frame-fx {
  position: absolute; left: -12px; top: -12px;
  width: 480px; height: 480px;
  image-rendering: pixelated; image-rendering: crisp-edges;
  pointer-events: none;
}
.bench-unit[data-glow="true"] {
  box-shadow: 0 7px 0 #4a3826, 0 13px 0 #2b2016, 0 18px 20px rgba(0, 0, 0, 0.4),
              0 0 0 2px var(--glow, #e8c14a), 0 0 34px var(--glow, #e8c14a);
}
.bench-unit[data-glow="strong"] {
  box-shadow: 0 7px 0 #4a3826, 0 13px 0 #2b2016, 0 18px 20px rgba(0, 0, 0, 0.4),
              0 0 0 3px #f6f2ff, 0 0 20px var(--glow, #d79ae8), 0 0 44px var(--glow, #d79ae8);
}
/* 색판이 착 맞는 순간 그림이 한 번 흔들린다 */
.bench-unit.shake canvas.art { animation: bench-snap 0.28s linear; }
@keyframes bench-snap {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3px, 1px); }
  50% { transform: translate(3px, -1px); }
  75% { transform: translate(-2px, 0); }
  100% { transform: translate(0, 0); }
}

/* ── 인쇄 진행 — 세로 레일과 가로 눈금띠가 같은 자료를 그린다. 등급 칸과 자리·색이 다르다 ── */
.p-label { font-size: 13px; font-weight: 900; color: #f0e3c2; letter-spacing: 0.4px; white-space: nowrap; }
.p-word { font-size: 10.5px; color: #b09d7e; white-space: nowrap; }
.p-cell {
  display: flex; align-items: center; justify-content: center;
  background: #241c14; border: 2px solid #4a3d2c; border-radius: 5px;
  color: #6a563a; font-size: 12px; font-weight: 800;
}
.p-cell[data-state="done"] { background: #3f6b8a; border-color: #62b6d8; color: #e9f6ff; box-shadow: inset 0 -3px 0 #2c4c63; }
.p-cell[data-state="current"] { border-color: #f1d37e; color: #f4dc9a; box-shadow: 0 0 0 2px rgba(241, 211, 126, 0.22); }

#progressRail { left: 820px; top: 250px; width: 72px; height: 480px;
  position: absolute;
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  background: rgba(20, 15, 10, 0.94); border: 1px solid #6a5a2c; border-radius: 10px;
  padding: 8px 6px;
}
#progressRail .p-head { display: flex; flex-direction: column; align-items: center; gap: 1px; height: 32px; flex: 0 0 auto; }
#railCells { flex: 1 1 auto; display: flex; flex-direction: column; gap: 5px; }
#railCells .p-cell { flex: 1 1 0; min-height: 0; }

#progressStrip { left: 315px; top: 766px; width: 480px; height: 48px;
  position: absolute;
  display: flex; align-items: center; gap: 8px;
  background: rgba(20, 15, 10, 0.94); border: 1px solid #6a5a2c; border-radius: 10px;
  padding: 0 10px;
}
#progressStrip .p-head { display: flex; flex-direction: column; align-items: flex-start; width: 84px; flex: 0 0 auto; }
#stripCells { flex: 1 1 auto; display: flex; gap: 5px; height: 30px; }
#stripCells .p-cell { flex: 1 1 0; min-width: 0; }

/* 진행 UI 스위치 — 한 번에 하나만 보인다 */
#workspace[data-progress-ui="rail"] #progressStrip { display: none; }
#workspace[data-progress-ui="strip"] #progressRail { display: none; }

#controlHint { left: 315px; top: 826px; width: 480px; height: 40px;
  position: absolute;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12.5px; color: #c9b891; white-space: nowrap;
  border: 1px dashed #4a3d2c; border-radius: 8px;
}
#controlHint b { color: #f0e3c2; }
#controlHint kbd { font-family: inherit; font-size: 11px; color: #8d7b5f; border: 1px solid #4a3d2c; border-radius: 4px; padding: 1px 5px; }

/* 최종 발표 줄 — 그림을 덮는 배너가 아니라 작업대 아래 한 줄 */
#resultLine { left: 315px; top: 880px; width: 480px; height: 56px;
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: #f0e3c2; letter-spacing: 1px;
  text-shadow: 0 2px 0 #14100c, 0 0 18px rgba(0, 0, 0, 0.8);
  white-space: nowrap; overflow: hidden;
}
#resultLine[data-state="idle"] { font-size: 15px; color: #8d7b5f; font-weight: 800; letter-spacing: 0.3px; }
#resultLine[data-jackpot="true"] { text-shadow: 0 0 10px #f6f2ff, 0 0 26px var(--result-color, #d79ae8); }
#phaseLine { left: 315px; top: 940px; width: 480px; height: 32px;
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; color: #b09d7e; white-space: nowrap; overflow: hidden;
}

/* ══ 오른쪽 · 안내줄 ══ */
#infoRail { left: 1520px; top: 76px; width: 360px; height: 988px;
  position: absolute;
  display: flex; flex-direction: column; gap: 10px;
  background: #191411; border: 1px solid #3a2f24; border-radius: 10px;
  padding: 14px;
  overflow: hidden;
}
.info-box { background: #241c14; border: 1px solid #3a2f24; border-radius: 8px; padding: 9px 11px; }
.info-box h3 { font-size: 12px; font-weight: 800; color: #b09d7e; letter-spacing: 0.3px; margin-bottom: 5px; }
.info-box p { font-size: 12.5px; color: #e8dcc4; line-height: 1.5; }
#statusLine { font-size: 14px; font-weight: 800; color: #f0e3c2; line-height: 1.4; }
#planLine { font-weight: 800; }
#fxPlanLine { font-size: 12px; color: #c9b891; }
.info-box ul { list-style: none; font-size: 12px; color: #c9b891; line-height: 1.6; }
.info-box ul b { color: #f0e3c2; }
#logBox { flex: 1 1 auto; overflow: hidden; }
#eventLogList { list-style: none; font-size: 11.5px; color: #b09d7e; line-height: 1.55; }
#eventLogList li b { color: #f4dc9a; }
#infoRail .mock-tag { align-self: flex-start; }

/* ══ 좁은 폭 — 전달판 점검용. 탭·모드·안내는 그대로 닿는다 ══
   출시용 모바일 화면이 아니라 「좁은 창에서도 검토할 수 있게」가 목적이다.
   무대를 통째로 등비 축소하면 390px 에서 작업대 93px·글씨 2~6px 이 되어 아무것도 읽히지
   않으므로, 축소를 걷어내고(reveal-app.js) 같은 요소·같은 색·같은 순서를 세로로 편다.
   새 버튼·새 기능·새 색은 없다. 보조 글씨는 12px 아래로 내려가지 않고, 작업대는 264px 로
   200px 이상을 지키며, 가로로 넘치거나 안이 잘리지 않게 줄바꿈을 허용한다. */
@media (max-width: 640px) {
  #board { padding: 8px 8px 16px; gap: 8px; }
  #boardHead { padding: 8px 10px; gap: 6px; }
  #boardHead h1 { font-size: 14px; }
  #tabBar button { padding: 8px 10px; font-size: 12.5px; }
  .bar button { padding: 7px 10px; font-size: 12px; }
  #boardNote { font-size: 12px; }
  /* .opt-title small 은 크기를 적어 두지 않아 UA 기본값(0.833em)으로 10px 이 된다 */
  #idTag, #tabBar button small, .mock-tag, .opt-title small { font-size: 12px; }

  /* ── 무대: 등비 축소 대신 세로 배치 ── */
  #playStage {
    position: static; width: 100%; height: auto;
    display: flex; flex-direction: column; gap: 10px; padding: 10px;
  }
  #reviewBar, #comparePanel, #workspace, #infoRail {
    position: static; left: auto; top: auto; width: 100%; height: auto; overflow: visible;
  }
  #reviewBar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  #reviewBar h2 { white-space: normal; }
  #scopeNote { flex: 1 1 100%; white-space: normal; overflow: visible; }
  #comparePanel, #infoRail { padding: 12px; }
  #panelHead p, .panel-hint, #probSum, #eventLogList { font-size: 12px; }
  /* small 은 크기를 안 적으면 부모 12px 에 브라우저 기본 비율이 곱해져 10px 이 된다 */
  .opt-title small { font-size: 12px; }
  #logBox { flex: 0 0 auto; overflow: visible; }
  #workspace { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }

  .original-card, #gradeLadder, .bench, #progressRail, #progressStrip,
  #controlHint, #resultLine, #phaseLine {
    position: static; left: auto; top: auto; width: 100%; height: auto;
  }
  /* 잉크통은 관·통·눈금이 안쪽 절대 배치라 자기 기준점을 잃으면 안 된다 (static 대신 relative) */
  .ink-cartridge { position: relative; left: auto; top: auto; }
  .original-card .sel-text span { font-size: 12px; }
  #gradeLadder { flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 12px; }
  #ladderTitle { width: auto; text-align: left; }
  #ladderCells { flex-wrap: wrap; gap: 6px; }
  .ladder-cell { flex: 1 1 96px; height: 48px; }
  .ladder-cell i { font-size: 12px; height: auto; line-height: 1.35; }
  #ladderNote { text-align: left; }
  .ink-cartridge { width: 46px; height: 170px; margin: 24px auto 0; flex: 0 0 auto; align-self: center; }
  .bench {
    --bench-size: 264px; --bench-art-size: 240px;
    width: var(--bench-size); height: var(--bench-size); margin: 0 auto;
  }
  .bench-unit canvas.frame-fx { width: var(--bench-size); height: var(--bench-size); }
  #progressRail { width: 92px; height: 420px; margin: 0 auto; }
  #progressRail .p-head { height: 36px; }
  #progressStrip { flex-direction: column; align-items: stretch; gap: 6px; padding: 10px; }
  #progressStrip .p-head { flex-direction: row; align-items: center; gap: 8px; width: auto; }
  #stripCells { flex-wrap: wrap; height: auto; gap: 6px; }
  #stripCells .p-cell { flex: 0 0 auto; width: 34px; height: 28px; min-width: 34px; }
  .p-word { font-size: 12px; }
  #controlHint { white-space: normal; text-align: center; line-height: 1.5; padding: 8px 10px; }
  #controlHint kbd { font-size: 12px; }
  #resultLine {
    white-space: normal; text-align: center; line-height: 1.3;
    font-size: 22px; min-height: 44px; padding: 4px 8px;
  }
  #resultLine[data-state="idle"] { font-size: 15px; }
  #phaseLine { white-space: normal; text-align: center; min-height: 28px; padding: 2px 8px; }
}
