/* 노원수학축전 「수학과, 어디까지 알고 있니?」 — 화면 스타일
   16:9 가로 전시 화면 기준, 좁은 화면에서는 세로로 쌓고 스크롤합니다. */

:root {
  --red: #8b0000;
  --red-2: #a51c30;
  --red-deep: #5e0000;
  --accent: #d90429;
  --gold: #ffd700;
  --gold-ink: #7a5a00;
  --card: #ffffff;
  --card-2: #f8f9fa;
  --ink: #212529;
  --muted: #495057;
  --line: #dee2e6;
  --panel: #1b1e24;
  --panel-2: #262a33;
  --neon-ok: #3ddc97;
  --neon-bad: #ff5470;
  --ok: #146c2e;
  --ok-bg: #e7f5ec;
  --bad: #b42318;
  --bad-bg: #fdeceb;
  --notice: #7a4b00;
  --notice-bg: #fff4d1;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(40, 0, 0, 0.28);
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* 기준 글자 크기: 화면 너비와 높이 중 더 빠듯한 쪽에 맞춥니다(최소 15px). */
  font-size: clamp(15px, min(0.42vw + 11px, 1.1vh + 8.5px), 20px);
  /* 세로 여백 단위: 낮은 화면에서 먼저 줄어듭니다. */
  --gap-y: clamp(0.4rem, 1.5vh, 1rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--red);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(255, 215, 0, 0.08), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(0, 0, 0, 0.25), transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.on-dark :focus-visible,
.panel-dark :focus-visible {
  outline-color: var(--gold);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.noscript {
  margin: 2rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border-radius: 12px;
}

/* ───────── 버튼 ───────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: 48px;
  min-width: 48px;
  padding: 0.6em 1.3em;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  touch-action: manipulation;
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary {
  background: var(--red-2);
  color: #fff;
  box-shadow: 0 4px 0 var(--red-deep);
}

.btn-primary:hover:not(:disabled) {
  background: var(--red);
}

.btn-ghost {
  background: var(--card);
  border-color: var(--red-2);
  color: var(--red-2);
}

.btn-ghost:hover {
  background: #fff1f2;
}

.btn-ghost-dark {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.btn-small {
  min-height: 44px;
  padding: 0.4em 1em;
  font-size: max(0.9rem, 14px);
}

.btn-hint {
  background: var(--notice-bg);
  border-color: #f0c64a;
  color: var(--notice);
}

.btn-hint[aria-expanded="true"] {
  background: #ffe9a3;
}

.btn-start {
  min-height: 84px;
  padding: 0.5em 2.2em;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  background: var(--gold);
  color: var(--red-deep);
  box-shadow: 0 8px 0 #b39500, 0 18px 40px rgba(0, 0, 0, 0.35);
}

.btn-start:hover {
  background: #ffe34d;
}

/* ───────── 하단 공통 내비게이션 ─────────
   sticky: 스크롤 중에는 화면 아래에 붙어 있고, 페이지 끝에서는 자기 자리를 차지하므로 본문을 가리지 않습니다. */

.pager {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: clamp(0.3rem, 0.8vh, 0.6rem) max(1rem, env(safe-area-inset-right, 0px)) calc(clamp(0.3rem, 0.8vh, 0.6rem) + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  background: rgba(70, 0, 0, 0.94);
  backdrop-filter: blur(6px);
  color: #fff;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
}

.nav-btn {
  flex: none;
  min-height: 46px;
  min-width: 9.5rem;
  padding-block: 0.4em;
  font-size: 1.05rem;
  background: #fff;
  color: var(--red-deep);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}

.nav-btn:hover:not(:disabled) {
  background: #ffe9ec;
}

.nav-next {
  background: var(--gold);
}

.nav-next:hover:not(:disabled) {
  background: #ffe34d;
}

.nav-btn:disabled {
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
  box-shadow: none;
  opacity: 1;
}

.progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-width: 0;
  font-weight: 700;
}

.progress-label {
  min-width: 4.5em;
  text-align: right;
  color: var(--gold);
}

.progress-steps {
  display: flex;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress-steps li {
  width: clamp(14px, 2.2vw, 30px);
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.22);
}

.progress-steps li.done {
  background: rgba(255, 215, 0, 0.6);
}

.progress-steps li.current {
  background: var(--gold);
  box-shadow: 0 0 0 2px #fff;
}

.progress-count {
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ───────── 화면 공통 ───────── */

#app {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  width: 100%;
}

.screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 0 auto;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: var(--gap-y) max(1rem, env(safe-area-inset-right, 0px)) var(--gap-y) max(1rem, env(safe-area-inset-left, 0px));
}

.screen.is-entering {
  animation: screen-in 0.35s ease both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap-y) clamp(1rem, 2vw, 1.75rem);
  align-items: start;
}

.layout--explain {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  grid-template-areas:
    "text visual"
    "footer footer";
}

.layout--explain > .explain-card {
  grid-area: text;
}

.layout--explain > .panel {
  grid-area: visual;
}

.explain-footer {
  grid-area: footer;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: clamp(0.8rem, 2.2vh, 1.75rem) clamp(1rem, 2vw, 2rem);
  box-shadow: var(--shadow);
}

.panel {
  border-radius: var(--radius);
  padding: clamp(0.75rem, 2vh, 1.5rem) clamp(1rem, 1.8vw, 1.6rem);
  box-shadow: var(--shadow);
}

.panel-dark {
  background: radial-gradient(circle at 30% 0%, #2b303b, var(--panel) 70%);
  color: #f1f3f5;
}

.panel-light {
  background: var(--card-2);
}

.panel-label {
  margin: 0 0 0.6rem;
  font-weight: 800;
  font-size: 1.05rem;
}

.panel-dark .panel-label {
  color: var(--gold);
}

.panel-light .panel-label {
  color: var(--red-2);
}

.panel-label:not(:first-child) {
  margin-top: 1.2rem;
}

.panel-note {
  margin: 0.75rem 0 0;
  font-size: max(0.92rem, 14px);
  opacity: 0.92;
}

.mean-note {
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: var(--panel-2);
}

.eyebrow {
  margin: 0 0 0.2rem;
  font-weight: 800;
  font-size: max(0.9rem, 14px);
  color: var(--red-2);
  letter-spacing: 0.04em;
}

.screen-title {
  margin: 0 0 calc(var(--gap-y) * 0.6);
  font-size: clamp(1.3rem, min(2vw, 3.4vh), 2rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.screen-title:focus {
  outline: none;
}

.question {
  margin: 0 0 var(--gap-y);
  font-size: 1.12rem;
  font-weight: 600;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.mark {
  display: inline-block;
  padding: 0 0.35em;
  border-radius: 6px;
  background: var(--gold);
  color: var(--ink);
}

.small-help {
  margin: 0 0 0.4rem;
  font-size: max(0.9rem, 14px);
  color: var(--muted);
}

/* ───────── 힌트 · 답안 · 피드백 ───────── */

.hint-wrap {
  margin: var(--gap-y) 0;
}

.hint {
  margin-top: calc(var(--gap-y) * 0.6);
  padding: 0.5rem 1rem;
  border-left: 5px solid #f0c64a;
  border-radius: 10px;
  background: var(--notice-bg);
  color: #3d2c00;
}

.hint p {
  margin: 0;
}

.hint p::before {
  content: "💡 ";
}

.answer-label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 800;
}

.answer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.answer-field {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 10rem;
}

.answer-input {
  width: 100%;
  min-height: clamp(46px, 6vh, 56px);
  padding: 0.3rem 0.9rem;
  border: 3px solid #adb5bd;
  border-radius: 12px;
  background: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.answer-input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--red-2);
}

.answer-input[aria-invalid="true"] {
  border-color: var(--notice);
  border-style: dashed;
}

.answer-input:read-only {
  background: var(--ok-bg);
  border-color: var(--ok);
}

.answer-unit {
  font-size: 1.4rem;
  font-weight: 800;
}

.btn-submit {
  min-height: clamp(46px, 6vh, 56px);
  min-width: 7rem;
  font-size: 1.2rem;
}

.feedback:not(:empty) {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: calc(var(--gap-y) * 0.8);
  padding: 0.5rem 0.9rem;
  border: 2px solid;
  border-radius: 12px;
  font-weight: 700;
}

.feedback-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
}

.feedback.is-correct {
  background: var(--ok-bg);
  border-color: var(--ok);
  color: var(--ok);
}

.feedback.is-correct .feedback-icon {
  background: var(--ok);
}

.feedback.is-wrong {
  background: var(--bad-bg);
  border-color: var(--bad);
  border-style: dashed;
  color: var(--bad);
}

.feedback.is-wrong .feedback-icon {
  background: var(--bad);
}

.feedback.is-notice {
  background: var(--notice-bg);
  border-color: #e0a800;
  border-style: dotted;
  color: var(--notice);
}

.feedback.is-notice .feedback-icon {
  background: var(--notice);
}

.after-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: calc(var(--gap-y) * 0.8);
}

.after-actions .btn {
  flex: 1 1 10rem;
  min-height: clamp(46px, 6vh, 56px);
  font-size: 1.1rem;
}

/* 보기 선택 */
.choices {
  margin: 0 0 var(--gap-y);
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(var(--gap-y) * 0.75) 0.75rem;
}

.choices legend {
  grid-column: 1 / -1;
  padding: 0;
  margin-bottom: 0.5rem;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: clamp(50px, 7vh, 68px);
  padding: 0.4rem 1rem;
  border: 3px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.choice:hover {
  border-color: #adb5bd;
}

.choice-radio {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  border: 2px solid var(--muted);
  font-size: max(0.9rem, 14px);
}

.choice.is-selected {
  border-color: var(--red-2);
  background: #fff1f2;
}

.choice.is-selected .choice-num {
  background: var(--red-2);
  border-color: var(--red-2);
  color: #fff;
}

.choice.is-selected::after {
  content: "✓ 선택";
  margin-left: auto;
  font-size: max(0.85rem, 14px);
  color: var(--red-2);
}

.choice:has(.choice-radio:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.is-locked .choice {
  cursor: default;
}

/* ───────── 해설 공통 ───────── */

.answer-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.8rem;
  margin: 0 0 calc(var(--gap-y) * 0.6);
  padding: 0.3rem 1rem;
  border-radius: 12px;
  background: var(--card-2);
  border: 2px solid var(--line);
}

.answer-key {
  padding: 0.15em 0.7em;
  border-radius: 999px;
  background: var(--red-2);
  color: #fff;
  font-weight: 800;
  font-size: max(0.9rem, 14px);
}

.answer-value {
  font-size: 1.5rem;
  color: var(--red);
}

.result-status {
  margin-left: auto;
  font-weight: 700;
  color: var(--muted);
}

.result-status.is-correct {
  color: var(--ok);
}

.result-status.is-unanswered {
  padding: 0.1em 0.7em;
  border: 2px dashed var(--muted);
  border-radius: 999px;
}

.block {
  margin-top: calc(var(--gap-y) * 0.7);
}

.block h3 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
}

.block p {
  margin: 0 0 calc(var(--gap-y) * 0.5);
}

.block-major {
  display: grid;
  grid-template-columns: minmax(17rem, 0.8fr) minmax(0, 2.2fr);
  gap: 0.6rem 1.5rem;
  align-items: start;
  padding: clamp(0.6rem, 1.6vh, 1.2rem) clamp(1rem, 1.8vw, 1.5rem);
  border-radius: var(--radius);
  background: #fff5f5;
  border: 3px solid var(--gold);
  box-shadow: var(--shadow);
}

.block-major h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.subjects-label {
  margin: 0 0 0.3rem;
  font-weight: 700;
  font-size: max(0.9rem, 14px);
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.15em 0.7em;
  border-radius: 999px;
  background: var(--red-2);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.major-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1.5rem;
  margin: 0;
}

.major-list dt {
  font-weight: 800;
  color: var(--red);
}

.major-list dd {
  margin: 0;
}

.math-line {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.formula {
  margin: calc(var(--gap-y) * 0.4) 0 calc(var(--gap-y) * 0.6);
  padding: calc(var(--gap-y) * 0.6) 1rem;
  border-radius: 12px;
  background: var(--panel);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.formula p {
  margin: 0.15rem 0;
}

.formula .mark {
  color: var(--ink);
}

.formula-label {
  color: var(--gold);
  font-size: max(0.9rem, 14px);
}

.formula-wide p:not(.formula-label) {
  font-size: 1.05rem;
}

.pairs {
  font-weight: 700;
}

.compare {
  margin: 0.8rem 0 0;
  padding: 0.7rem 0.9rem;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  font-size: 0.95rem;
}

/* ───────── 1. 표지 ───────── */

.screen--cover {
  position: relative;
  display: grid;
  place-items: center;
  max-width: none;
  overflow: hidden;
  cursor: pointer;
  background: radial-gradient(ellipse at center, #a51c30 0%, #8b0000 50%, #4a0000 100%);
  color: #fff;
  text-align: center;
}

.cover-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cover-bg .bg-stroke {
  fill: none;
  stroke: rgba(255, 215, 0, 0.16);
  stroke-width: 1.5;
}

.cover-bg .bg-koch {
  stroke: rgba(255, 255, 255, 0.2);
}

.cover-bg .bg-fill polygon {
  fill: rgba(255, 215, 0, 0.1);
}

.cover-bg .bg-thick {
  stroke-width: 3;
  stroke: rgba(255, 255, 255, 0.22);
}

.cover-bg .bg-dash {
  stroke-dasharray: 6 8;
}

.cover-bg text {
  fill: rgba(255, 255, 255, 0.24);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 30px;
}

.bg-spin {
  animation: spin 160s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.cover-content {
  position: relative;
  max-width: 62rem;
  padding: 2rem 1rem;
}

.cover-content::before {
  content: "";
  position: absolute;
  inset: -10% -15%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(74, 0, 0, 0.65), transparent 70%);
}

.cover-event {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.3em 1em;
  border: 2px solid rgba(255, 215, 0, 0.7);
  border-radius: 999px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.screen--cover .screen-title {
  margin: 0;
  color: #fff;
  font-size: clamp(2.3rem, 6.4vw, 6rem);
  font-weight: 900;
  line-height: 1.15;
  text-wrap: balance;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.cover-subtitle {
  margin: 0.8rem 0 0;
  font-size: clamp(1.15rem, 2.2vw, 2rem);
  font-weight: 700;
  color: var(--gold);
}

.cover-enter {
  margin: clamp(1.5rem, 4vh, 3rem) 0 clamp(1.2rem, 3vh, 2rem);
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
}

/* ───────── 문제 1 · 픽셀 ───────── */

.pixel-grid {
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: clamp(6px, 1vw, 12px);
}

.px {
  position: relative;
  width: clamp(56px, min(9vw, 11vh), 130px);
  height: clamp(56px, min(9vw, 11vh), 130px);
  border-radius: 12px;
  text-align: center;
  vertical-align: middle;
}

.px-val {
  display: block;
  font-size: clamp(1.4rem, min(2.6vw, 4.2vh), 2.6rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.px-tag {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 800;
}

.px-ok {
  border: 3px solid var(--neon-ok);
  box-shadow: 0 0 12px rgba(61, 220, 151, 0.55), inset 0 0 10px rgba(61, 220, 151, 0.25);
}

.px-noisy {
  border: 4px dashed var(--neon-bad);
  color: #fff;
  background-color: #7a1020;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.28) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.25) 0 3px, transparent 3px 7px);
  box-shadow: 0 0 18px rgba(255, 84, 112, 0.7);
  text-shadow: 0 1px 3px #000;
}

.px-noisy .px-tag {
  display: inline-block;
  padding: 0 0.4em;
  border-radius: 6px;
  background: #b5103a;
  color: #fff;
  text-shadow: none;
}

.px-fixed {
  border: 4px solid var(--gold);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.6);
}

.px-fixed .px-tag {
  color: var(--gold);
}

.pixel-grid.is-compact {
  border-spacing: 4px;
}

.pixel-grid.is-compact .px {
  width: clamp(44px, 2.5vw, 48px);
  height: clamp(44px, 2.5vw, 48px);
  border-radius: 8px;
  border-width: 2px;
}

.pixel-grid.is-compact .px-val {
  font-size: clamp(1rem, 1.4vw, 1.3rem);
}

.pixel-grid.is-compact .px-tag {
  margin-top: 0;
  font-size: 0.7rem;
  line-height: 1.2;
}

/* 작은 행렬에서는 아이콘만 보이고 낱말은 화면 낭독기로 읽힙니다. */
.pixel-grid.is-compact .tag-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.legend {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.swatch {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  font-weight: 900;
  font-size: 0.95rem;
}

.swatch-ok {
  border: 3px solid var(--neon-ok);
  background: #0d0d0d;
  color: var(--neon-ok);
}

.swatch-noisy {
  border: 3px dashed var(--neon-bad);
  background: #7a1020;
  color: #fff;
}

.brightness {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.brightness-bar {
  flex: 1;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, #000, #fff);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.chip-row {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 0.3rem 0 0.25rem;
  border-radius: 10px;
  border: 2px solid rgba(61, 220, 151, 0.8);
  background: #0f1115;
}

.chip-val {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.chip-pos {
  font-size: clamp(0.6rem, 0.8vw, 0.7rem);
  opacity: 0.85;
  white-space: nowrap;
}

.chip.is-noise {
  border: 2px dashed var(--neon-bad);
}

.chip.is-mid {
  border: 3px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
}

.sort-row.play .chip {
  animation: chip-in 0.35s ease both;
  animation-delay: calc(var(--i) * 0.12s);
}

.sort-row.play .chip.is-mid {
  animation: chip-in 0.35s ease both, chip-pop 0.5s ease 1.3s both;
}

@keyframes chip-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes chip-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

.mini-panel .panel-label {
  margin-bottom: 0.2rem;
}

.mini-panel {
  margin: 0.4rem 0 0.6rem;
  padding: 0.6rem 1rem;
  border-radius: 14px;
}

.before-after {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1rem;
}

.ba-arrow {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
}

.before-after figure {
  margin: 0;
  text-align: center;
}

.before-after figcaption {
  margin-top: 0.3rem;
  font-size: max(0.9rem, 14px);
  font-weight: 700;
}

.pixel-art {
  display: block;
  width: clamp(96px, min(10vw, 17vh), 180px);
  height: auto;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  image-rendering: pixelated;
}

/* ───────── 문제 2 · 그래프 ───────── */

.graph {
  display: block;
  width: 100%;
  height: auto;
  max-height: 50vh;
}

.map-grid line {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.edge {
  stroke: #8fa3bf;
  stroke-width: 4;
  stroke-linecap: round;
}

.arrow {
  fill: #8fa3bf;
}

.arrow-on {
  fill: var(--gold);
}

.edge-group.is-on .edge {
  stroke: var(--gold);
  stroke-width: 8;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
}

.weight circle {
  fill: #fff;
  stroke: #8fa3bf;
  stroke-width: 3;
}

.weight text {
  fill: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.edge-group.is-on .weight circle {
  fill: var(--gold);
  stroke: #fff;
}

.node circle {
  fill: var(--red-2);
  stroke: #fff;
  stroke-width: 3;
}

.node.is-start circle,
.node.is-end circle {
  fill: var(--accent);
}

.node.is-on circle {
  stroke: var(--gold);
  stroke-width: 5;
}

.node-name {
  fill: #fff;
  font-size: 26px;
  font-weight: 900;
}

.node-caption {
  fill: var(--gold);
  font-size: 18px;
  font-weight: 800;
}

.paths {
  margin: 0 0 0.5rem;
}

.rule {
  margin: 0 0 0.6rem;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  background: #fff1f2;
  border: 2px solid #f3c4c9;
  font-weight: 700;
  color: var(--red);
}

.path-list {
  display: grid;
  gap: 0.5rem;
}

.path-btn {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem 0.9rem;
  min-height: 52px;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.path-btn {
  color: var(--ink);
}

.panel-dark .small-help {
  color: rgba(255, 255, 255, 0.85);
}

.path-btn:hover {
  border-color: #adb5bd;
}

.path-btn[aria-pressed="true"] {
  border-color: #c9a400;
  background: #fff8d6;
  box-shadow: inset 4px 0 0 var(--gold);
}

.path-name {
  font-weight: 800;
  color: var(--red-2);
}

.path-route {
  font-weight: 800;
}

.path-sum {
  font-weight: 700;
  color: var(--muted);
}

.path-table {
  width: 100%;
  margin: 0.4rem 0 0.8rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.path-table th,
.path-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.path-table thead th {
  font-size: max(0.85rem, 14px);
  color: var(--muted);
}

.path-table tr.is-best {
  background: #fff8d6;
}

.path-table tr.is-best th {
  box-shadow: inset 4px 0 0 var(--gold);
}

.best-tag {
  margin-left: 0.5rem;
  padding: 0.05em 0.5em;
  border-radius: 999px;
  background: var(--ok);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.graph-legend {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.4rem 0 0;
  font-weight: 700;
}

.legend-line {
  flex: none;
  width: 2.4rem;
  height: 8px;
  border-radius: 4px;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.use-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.use-icons li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 9rem;
  padding: 0.5rem 0.7rem;
  border-radius: 12px;
  background: var(--panel-2);
  font-weight: 700;
  font-size: max(0.92rem, 14px);
}

/* 아이콘 */
.icon {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  fill: var(--gold);
}

.icon .icon-cut {
  fill: var(--panel);
}

.icon .icon-line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon .icon-thick {
  stroke-width: 4;
}

.panel-light .icon {
  fill: var(--red-2);
}

.panel-light .icon .icon-cut {
  fill: #fff;
}

.panel-light .icon .icon-line {
  stroke: var(--red-2);
}

/* ───────── 문제 3 · 시계 ───────── */

.clock-figure {
  margin: 0;
  text-align: center;
}

.clock {
  display: block;
  width: min(100%, 330px, 38vh);
  height: auto;
  margin: 0 auto;
}

.clock-face {
  fill: #fff;
  stroke: var(--red);
  stroke-width: 6;
}

.clock-sector {
  fill: rgba(255, 215, 0, 0.45);
  stroke: #c9a400;
  stroke-width: 2;
}

.tick {
  stroke: #868e96;
  stroke-width: 2;
}

.tick-major {
  stroke: var(--ink);
  stroke-width: 4;
}

.clock-num {
  fill: var(--ink);
  font-size: 24px;
  font-weight: 800;
}

.num-ring {
  fill: none;
  stroke: none;
}

.num-ring.is-start {
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-dasharray: 4 3;
}

.num-ring.is-end {
  fill: var(--gold);
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-dasharray: none;
}

.hand-hour line {
  stroke: var(--red);
  stroke-width: 9;
  stroke-linecap: round;
}

.hand-hour path {
  fill: var(--red);
}

.hand-minute {
  stroke: #6c757d;
  stroke-width: 4;
  stroke-linecap: round;
}

.clock-cap {
  fill: var(--ink);
}

.clock-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 1rem;
  margin-top: 0.6rem;
}

.clock-caption {
  width: 100%;
  font-weight: 700;
  color: var(--muted);
}

.clock-readout {
  margin: 0;
  min-width: 13em;
  font-size: 1.25rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.visual-clock .btn-ghost-dark {
  color: var(--red-2);
}

.clock-intro {
  margin: 0 0 0.6rem;
  font-weight: 600;
}

/* 문제 3: 숫자 변환 기계 */
.rule-rows {
  display: grid;
  gap: clamp(0.6rem, 1.2vw, 1rem);
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.rule-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.9rem;
  padding: clamp(0.6rem, 1.2vw, 1rem) 1rem;
  border: 2px solid rgba(61, 220, 151, 0.55);
  border-radius: 16px;
  background: #0f1115;
  font-size: clamp(1.3rem, min(2.6vw, 4.6vh), 2.6rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.rule-row.is-question {
  border: 3px dashed var(--gold);
}

.rule-in {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  white-space: nowrap;
}

.rule-arrow {
  color: var(--gold);
  white-space: pre;
}

.num-chip {
  display: inline-grid;
  place-items: center;
  min-width: 1.9em;
  padding: 0.05em 0.3em;
  border-radius: 12px;
  background: var(--panel-2);
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.num-chip.is-out {
  background: var(--neon-ok);
  border-color: var(--neon-ok);
  color: var(--ink);
}

.num-chip.is-blank {
  background: var(--red-2);
  border-color: #fff;
  color: #fff;
}

.crypto-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.crypto-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  background: #fff;
  border: 2px solid var(--line);
  font-weight: 600;
}

/* ───────── 문제 4 · 생일 ───────── */

.avatars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 0.4rem;
}

@media (min-width: 1500px) and (orientation: landscape) {
  .avatars {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

.avatar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 48px;
  padding: 0.2rem 0.1rem 0.1rem;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.avatar-img {
  width: clamp(30px, 4.2vh, 40px);
  height: clamp(33px, 4.6vh, 44px);
}

.avatar-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted);
  line-height: 1.2;
}

.avatar-badge {
  position: absolute;
  top: -10px;
  right: -4px;
  display: none;
  padding: 0 0.3em;
  border-radius: 8px;
  background: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.5;
}

.avatar[aria-pressed="true"] {
  border-color: var(--red-2);
  background: #fff1f2;
}

.avatar.is-paired .avatar-badge {
  display: block;
}

.pair-status {
  min-height: 3.2em;
  margin: 0.7rem 0 0;
  font-weight: 700;
  color: var(--red);
}

.conditions {
  margin-top: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: #fff;
  border: 2px solid var(--line);
  font-size: max(0.92rem, 14px);
}

.conditions-title {
  margin: 0 0 0.2rem;
  font-weight: 800;
}

.conditions ul {
  margin: 0;
  padding-left: 1.2em;
}

/* 확률 곡선 */
.chart {
  display: block;
  width: 100%;
  height: auto;
  max-height: 40vh;
  touch-action: pan-y;
}

.chart--compact {
  display: none;
}

/* 그래프가 들어갈 자리가 좁으면(휴대폰, 가로 3열 해설) 글자가 큰 좁은 그림을 씁니다. */
.chart-wrap {
  container-type: inline-size;
}

@container (max-width: 560px) {
  .chart--wide {
    display: none;
  }

  .chart--compact {
    display: block;
  }

  .chart--compact .tick-label,
  .chart--compact .ref-label {
    font-size: 16px;
  }

  .chart--compact .axis-title,
  .chart--compact .hl-text {
    font-size: 17px;
  }
}

.chart-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1rem;
}

.chart-meta .chart-table[open] {
  flex-basis: 100%;
}

.explain-footer > .compare {
  margin: 0 0 var(--gap-y);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin-bottom: 0.4rem;
}

.panel-head .panel-label {
  margin: 0;
}


.grid-line {
  stroke: #e9ecef;
  stroke-width: 1;
}

.axis-line {
  stroke: #868e96;
  stroke-width: 1.5;
}

.ref-line {
  stroke: #495057;
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}

.ref-label {
  fill: #495057;
  font-size: 14px;
  font-weight: 700;
}

.tick-label {
  fill: #495057;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.axis-title {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.curve {
  fill: none;
  stroke: var(--red-2);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.hl-guide {
  stroke: var(--red-2);
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
}

.hl-dot {
  fill: var(--gold);
  stroke: var(--red);
  stroke-width: 3;
}

.hl-box {
  fill: var(--ink);
}

.hl-text {
  fill: #fff;
  font-size: 16px;
  font-weight: 800;
}

.cross-line {
  stroke: var(--ink);
  stroke-width: 1;
}

.cross-dot {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 3;
}

.chart-hit {
  fill: transparent;
  cursor: crosshair;
}

.slider-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  margin-top: 0.5rem;
  font-weight: 700;
}

.slider {
  flex: 1 1 12rem;
  min-height: 44px;
  accent-color: var(--red-2);
}

.chart-readout {
  display: block;
  margin-top: 0.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.chart-table {
  margin-top: calc(var(--gap-y) * 0.4);
}

.chart-table summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  color: var(--red-2);
  cursor: pointer;
}

/* 표를 펼쳐도 화면 높이를 많이 쓰지 않도록 3열 격자로 배치합니다. (머리글은 화면 낭독기용) */
.chart-table table {
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.chart-table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.chart-table tbody {
  display: grid;
  grid-template-columns: repeat(3, max-content minmax(5.5em, max-content));
  column-gap: 0.6rem;
}

.chart-table tr {
  display: contents;
}

.chart-table td {
  padding: 0.15rem 0.4rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.chart-table tr.is-best td {
  font-weight: 800;
  background: #fff8d6;
}

/* ───────── 10. 완료 ───────── */

.screen--finish {
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
}

.finish-content {
  max-width: 54rem;
}

.stamp {
  display: block;
  width: clamp(110px, min(14vw, 20vh), 190px);
  margin: 0 auto calc(var(--gap-y) * 0.5);
  transform: rotate(-10deg);
}

.screen--finish.is-entering .stamp {
  animation: stamp-in 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) 0.15s both;
}

@keyframes stamp-in {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(1.8);
  }
  to {
    opacity: 1;
    transform: rotate(-10deg) scale(1);
  }
}

.stamp-ring {
  fill: rgba(255, 215, 0, 0.08);
  stroke: var(--gold);
  stroke-width: 7;
}

.stamp-ring.thin {
  fill: none;
  stroke-width: 2.5;
}

.stamp-big {
  fill: var(--gold);
  font-size: 34px;
  font-weight: 900;
}

.stamp-small {
  fill: var(--gold);
  font-size: 15px;
  font-weight: 800;
}

.screen--finish .screen-title {
  color: #fff;
  font-size: clamp(1.8rem, 3.6vw, 3.2rem);
}

.catchphrase {
  margin: calc(var(--gap-y) * 0.4) 0 var(--gap-y);
  font-size: clamp(1.2rem, min(2.1vw, 3.4vh), 1.9rem);
  font-weight: 900;
  color: var(--gold);
}

.finish-body {
  margin: 0;
  font-size: clamp(1.02rem, 1.4vw, 1.3rem);
}

.finish-closing {
  margin: 0.3rem 0 calc(var(--gap-y) * 1.3);
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  font-weight: 900;
}

.souvenir {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto 1.6rem;
  padding: 1rem 1.4rem;
  max-width: 40rem;
  border: 3px dashed var(--gold);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
}

.souvenir .icon {
  width: 3rem;
  height: 3rem;
}

.souvenir .icon .icon-cutline {
  stroke: var(--red-deep);
}

.souvenir-text {
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  font-weight: 800;
  text-align: left;
}

.btn-restart {
  min-height: 72px;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

#confetti {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 20;
}

/* ───────── 반응형 ───────── */

@media (max-width: 960px), (orientation: portrait) {
  .layout,
  .layout--explain {
    grid-template-columns: minmax(0, 1fr);
  }

  .layout--explain {
    grid-template-areas:
      "text"
      "visual"
      "footer";
  }

  .block-major,
  .major-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .progress-label,
  .progress-steps {
    display: none;
  }
}

@media (max-width: 520px) {
  .choices {
    grid-template-columns: minmax(0, 1fr);
  }

  .pager {
    gap: 0.5rem;
    padding-inline: max(0.6rem, env(safe-area-inset-left, 0px));
  }

  .nav-btn {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 0.6em;
    font-size: 0.95rem;
  }

  .progress-count {
    font-size: 1rem;
  }

  .path-btn {
    grid-template-columns: auto 1fr;
  }

  .path-sum {
    grid-column: 2;
  }

  .souvenir {
    flex-direction: column;
  }

  .souvenir-text {
    text-align: center;
  }

  .result-status {
    margin-left: 0;
  }
}

/* 움직임 줄이기 설정 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .bg-spin {
    animation: none !important;
  }
}


/* ───────── 넓은 가로 화면: 한 화면에 모두 보이도록 열 배치 ─────────
   전시용 PC·태블릿 가로 화면(너비 1100px 이상)에서는 세로로 쌓지 않고 옆으로 나눕니다. */
@media (min-width: 1100px) and (orientation: landscape) {
  /* 해설: 풀이 | 시각 자료 | 수학과는 이런 걸 해요! */
  .layout--explain {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(14rem, 0.62fr);
    grid-template-areas: "text visual footer";
  }

  .block-major,
  .major-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .block-major {
    gap: calc(var(--gap-y) * 0.6);
    font-size: 0.95rem;
  }

  /* 채점 결과 옆에 다시 풀기/해설 보기 버튼 (자리가 모자라면 아래 줄로) */
  .answer-area {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    column-gap: 0.75rem;
  }

  .answer-area > .answer-form {
    flex: 1 1 100%;
  }

  .answer-area > .feedback {
    flex: 1 1 17rem;
  }

  .answer-area > .after-actions {
    flex: 1 0 auto;
    flex-wrap: nowrap;
  }

  .answer-area > .after-actions .btn {
    flex: 1 0 auto;
  }

  /* 문제 2: 경로 목록이 지도 아래에 있으므로 지도 높이를 줄입니다. */
  .screen--problem .graph {
    max-height: 34vh;
  }

  /* 해설 3: 시계와 암호학 카드 */
  .screen--explain .clock {
    width: min(100%, 300px, 27vh);
  }

  .screen--explain .crypto-list {
    gap: calc(var(--gap-y) * 0.6);
    margin-top: calc(var(--gap-y) * 0.7);
  }

  .screen--explain .crypto-list li {
    padding: 0.4rem 0.7rem;
    font-size: max(0.88rem, 14px);
  }

  .screen--explain .crypto-list .icon {
    width: 2rem;
    height: 2rem;
  }

  .clock-intro {
    font-size: 0.95rem;
  }

  /* 해설 4: 그래프 높이 */
  .chart {
    max-height: 33vh;
  }

  /* 보기 4개를 한 줄에 */
  .choices {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .choice {
    padding-inline: 0.7rem;
    gap: 0.5rem;
  }

  .choice.is-selected::after {
    display: none;
  }
}

/* 낮은 가로 화면(일반 브라우저 창 등): 보조 설명과 그림을 조금 더 줄입니다. 본문은 그대로 둡니다. */
@media (min-width: 1100px) and (orientation: landscape) and (max-height: 720px) {
  .panel-note,
  .note,
  .clock-intro,
  .compare,
  .block-major {
    font-size: max(0.92rem, 14px);
  }

  .path-btn {
    min-height: 44px;
    padding-block: 0.25rem;
  }

  .pixel-art {
    width: clamp(90px, 14vh, 150px);
  }

  .screen--explain .clock {
    width: min(100%, 300px, 23vh);
  }

  .path-table th,
  .path-table td {
    padding-block: 0.3rem;
  }
}

/* 숫자 칸·버튼 이름은 줄바꿈으로 쪼개지지 않게 합니다. */
.chip-val,
.px-val,
.num-chip,
.answer-value,
.choice-text,
.nav-btn,
.progress-count {
  white-space: nowrap;
  overflow-wrap: normal;
}
