@font-face {
  font-family: "Paperlogy";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-4Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Paperlogy";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-5Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Paperlogy";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-6SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Paperlogy";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-7Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Paperlogy";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Paperlogy";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-9Black.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

:root {
  --bg: #f6f7f8;
  --ink: #3c3c3c;
  --muted: #777777;
  --line: #e5e5e5;
  --card: #ffffff;
  --green: #58cc02;
  --green-deep: #46a302;
  --green-soft: #d7ffb8;
  --blue: #1cb0f6;
  --gold: #ffc800;
  --heart: #ff4b4b;
  --heart-lost: #e5e5e5;
  --orange: #ff9600;
  --red: #ff4b4b;
  --red-deep: #ea2b2b;
  --red-soft: #ffdfe0;
  --shadow: 0 8px 24px rgba(60, 60, 60, 0.06);
  --radius: 18px;
  --font: "Paperlogy", sans-serif;
  --press: cubic-bezier(0.3, 1.4, 0.5, 1);
  --app-width: 980px;
  --quiz-width: 560px;
  --pad-x: clamp(12px, 3.2vw, 28px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --fs-label: 11px;
  --fs-kicker: 12px;
  --fs-caption: 13px;
  --fs-body: 16px;
  --fw-body: 400;
  --fw-label: 600;
  --fw-mark: 700;
  --fw-strong: 600;
  --fw-title: 600;
  --fw-cta: 700;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gate {
  display: none;
}

html.is-gated .gate {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: 24px;
  background: #f7f7f7;
}

html.is-gated .app,
html.is-gated .dock,
html.is-gated .feedback {
  visibility: hidden;
}

.gate-card {
  width: min(420px, 100%);
  padding: 28px 22px 24px;
  background: #fff;
  border: 2px solid var(--line);
  border-bottom-width: 8px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.gate-kicker {
  margin: 0 0 8px;
  font-size: var(--fs-kicker);
  font-weight: var(--fw-mark);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.gate-card h1 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: var(--fw-title);
}

.gate-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.gate-form {
  display: grid;
  gap: 10px;
}

.gate-form input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  font: inherit;
}

.gate-error {
  margin: 12px 0 0;
  color: #dc2626;
  font-size: 14px;
}

html,
body {
  min-height: 100%;
  min-height: 100dvh;
}

body {
  width: 100%;
  max-width: 100%;
  font-family: var(--font);
  font-weight: var(--fw-body);
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(#ececee 1px, transparent 1px);
  background-size: 20px 20px;
  overflow-x: hidden;
}

strong,
b {
  font-weight: var(--fw-strong);
}

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

svg.ico,
.owl,
.glyph-heart,
.stat-illust svg,
.progress-illust svg {
  max-width: none;
  height: auto;
}

svg.ico {
  width: 22px;
  height: 22px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: min(var(--app-width), 100%);
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  padding: calc(12px + var(--safe-top)) max(var(--pad-x), var(--safe-left)) calc(28px + var(--safe-bottom)) max(var(--pad-x), var(--safe-right));
}

#confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none !important;
  z-index: 12;
}

.owl {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  overflow: visible;
}

.owl-sm {
  width: 48px;
  height: 48px;
}

.hero-card,
.speech-bubble,
.league,
.guide,
.question-card,
.choice-card,
.clear-screen {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

.hero-card {
  border-color: var(--green);
  padding: clamp(14px, 2.4vw, 24px);
  box-shadow: var(--shadow);
}

.hero-top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.sound-btn {
  margin-left: auto;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  line-height: 1;
}

.sound-btn:active {
  transform: translateY(3px);
  border-bottom-width: 2px;
}

.sound-btn.is-muted {
  filter: grayscale(1);
  opacity: 0.55;
}

.sound-btn .ico-off {
  display: none;
}

.sound-btn.is-muted .ico-on {
  display: none;
}

.sound-btn.is-muted .ico-off {
  display: block;
}

.ico {
  width: 1em;
  height: 1em;
  display: block;
  flex: 0 0 auto;
}

.sound-btn .ico,
.league-medal .ico {
  width: 22px;
  height: 22px;
}

.node-icon .ico {
  width: 22px;
  height: 22px;
}

.lock .ico {
  width: 15px;
  height: 15px;
}

.heart .ico {
  width: 18px;
  height: 18px;
}

.stat-chip .heart .ico {
  width: 16px;
  height: 16px;
}

.streak-flame .ico,
.bolt .ico,
.stat-value .ico,
.final-streak .ico {
  width: 16px;
  height: 16px;
}

.hud-item .streak-flame .ico {
  width: 22px;
  height: 22px;
}

.medal .ico,
.ico.ico-lg {
  width: 56px;
  height: 56px;
}

.feedback-icon .ico {
  width: 24px;
  height: 24px;
  stroke-width: 2.25;
}

.hero-copy {
  min-width: 0;
}

.hero-kicker {
  font-size: var(--fs-kicker);
  font-weight: var(--fw-label);
  color: var(--green-deep);
}

.hero-card h1 {
  font-size: clamp(20px, 4.4vw, 26px);
  line-height: 1.3;
  font-weight: var(--fw-title);
  letter-spacing: -0.01em;
  color: #2b8a0e;
  overflow-wrap: anywhere;
}

.hero-sub {
  margin-top: 4px;
  font-size: clamp(16px, 3.6vw, 18px);
  font-weight: 400;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.stat-chip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f7f8f7;
  border-radius: 16px;
  text-align: left;
}

.stat-illust {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.stat-illust svg {
  width: 28px;
  height: 28px;
  max-width: none;
}

.stat-chip.is-heart .stat-illust { background: #ffe8e8; }
.stat-chip.is-xp .stat-illust { background: #fff3cc; }
.stat-chip.is-league .stat-illust { background: #e7f6d6; }
.stat-chip.is-streak .stat-illust { background: #ffe9d2; }
.stat-chip.is-streak.is-lit .stat-illust { background: #ffd7a8; }

.stat-copy {
  min-width: 0;
  flex: 1;
}

.stat-label {
  display: block;
  margin-bottom: 4px;
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: 0.04em;
  color: var(--muted);
}

.stat-chip strong,
.stat-value {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bolt {
  display: inline-flex;
  color: var(--gold);
}

.hero-scene {
  margin-top: 16px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 18px;
}

.illust-studio {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.hero-progress {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-illust {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e7f6d6;
}

.progress-illust.is-event {
  background: #f3e8ff;
}

.progress-illust svg {
  width: 26px;
  height: 26px;
  max-width: none;
}

.progress-body {
  min-width: 0;
  flex: 1;
}

.hero-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: var(--fs-kicker);
  font-weight: var(--fw-label);
  color: var(--muted);
}

.event-fill {
  background: linear-gradient(90deg, #ce82ff, #a960ff);
}

.xp-track {
  position: relative;
  height: 12px;
  background: #ececec;
  border-radius: 99px;
  overflow: hidden;
}

.xp-fill {
  width: 0%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #58cc02, #89e219);
  transition: width 0.7s var(--press);
}

.hud .xp-fill {
  background: linear-gradient(90deg, #ffc800, #ffde59);
  box-shadow: inset 0 -3px 0 rgba(180, 83, 9, 0.18);
}

.hud .xp-track {
  overflow: visible;
  height: 14px;
  background: #f3f3f3;
}

.speech {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0 20px;
}

.speech-bubble {
  position: relative;
  min-width: 0;
  flex: 1;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.speech-bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 18px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  transform: rotate(45deg);
}

.speech-bubble p {
  font-size: clamp(17px, 4vw, 19px);
  font-weight: 400;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.speech-bubble strong {
  font-weight: var(--fw-title);
}

.speech-bubble .hl {
  padding: 0 0.18em;
  background: var(--green-soft);
  border-radius: 4px;
  font-weight: var(--fw-title);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.extra-gate {
  display: grid;
  justify-items: center;
  margin-bottom: 14px;
  padding: 20px 18px 22px;
  background: #fff8ee;
  border: 3px solid #ffc800;
  border-bottom-width: 8px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}

.extra-gate-kicker {
  margin-bottom: 6px;
  font-size: var(--fs-caption);
  font-weight: var(--fw-label);
  color: #b45309;
}

.extra-gate h2 {
  margin-bottom: 8px;
  font-size: clamp(20px, 5vw, 24px);
  font-weight: var(--fw-title);
}

.extra-gate-copy {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
}

.extra-gate .extra-list {
  margin-bottom: 14px;
}

.extra-gate .btn {
  width: min(100%, 280px);
}

.extra-gate .btn-ghost {
  margin-top: 8px;
}

.league {
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.league-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

.league.l1 {
  border-color: #ff9600;
}

.league.l1 .league-head {
  background: #fff7ea;
}

.league.l2 {
  border-color: #1cb0f6;
}

.league.l2 .league-head {
  background: #eef9ff;
}

.league.l3 {
  border-color: #00cd9c;
}

.league.l3 .league-head {
  background: #e8fff8;
}

.league.l4 {
  border-color: #ce82ff;
}

.league.l4 .league-head {
  background: #f7eeff;
}

.league.l5 {
  border-color: #4b4b4b;
}

.league.l5 .league-head {
  background: #f4f4f4;
}

.league.l6 {
  border-color: #58cc02;
}

.league.l6 .league-head {
  background: #f1ffe4;
}

.league.event {
  border-color: #ce82ff;
  border-style: dashed;
}

.league.event .league-head {
  background: #faf5ff;
}

.league.is-event-locked {
  opacity: 0.78;
}

.event-unlock {
  margin-bottom: 14px;
  padding: 20px 18px 22px;
  background: #fff8ee;
  border: 3px solid #ffc800;
  border-bottom-width: 8px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}

.event-unlock-kicker {
  margin-bottom: 6px;
  font-size: var(--fs-caption);
  font-weight: var(--fw-label);
  color: #b45309;
}

.event-unlock h2 {
  margin-bottom: 8px;
  font-size: clamp(20px, 5vw, 24px);
  font-weight: var(--fw-title);
}

.event-unlock p {
  font-size: 15px;
  font-weight: var(--fw-body);
  line-height: 1.55;
  color: var(--ink);
}

.league-medal {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  flex: 0 0 auto;
}

.league-head h2 {
  font-size: clamp(17px, 4vw, 20px);
  font-weight: var(--fw-title);
}

.league-head p {
  margin-top: 4px;
  font-size: clamp(14px, 3.2vw, 16px);
  font-weight: 400;
  color: var(--muted);
}

.path {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.path-bonus {
  border-top: 2px dashed #ececec;
}

.path-bonus::before {
  display: none;
}

.bonus-label {
  width: 100%;
  padding: 4px 8px 8px;
  font-size: 13px;
  font-weight: var(--fw-label);
  color: #b45309;
  text-align: center;
}

.extra-open {
  width: calc(100% - 24px);
  margin: 0 12px 16px;
  color: var(--ink);
  background: #fff8ee;
  border: 2px solid #ffe0b0;
  box-shadow: 0 5px 0 #f5c98a;
}

.extra-choice {
  width: min(100%, 360px);
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 16px 14px 18px;
  background: #fff8ee;
  border: 3px solid #ffc800;
  border-radius: 18px;
}

.extra-prompt {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
}

.extra-list {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff8ee;
  list-style: none;
  text-align: left;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
}

.extra-choice .btn-ghost {
  margin-top: 0;
}

.path::before {
  display: none;
}

.node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 0;
  border-radius: 16px;
  background: #fafafa;
  color: inherit;
  text-align: left;
  transition: transform 0.08s ease;
}

.node:active:not(.is-locked) {
  transform: scale(0.98);
}

.node:active:not(.is-locked) .node-icon {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #d0d0d0;
}

.node-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0f0f0;
  border: 3px solid #e5e5e5;
  box-shadow: 0 4px 0 #d0d0d0;
  color: var(--ink);
  flex: 0 0 auto;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.node-name {
  flex: 1;
  min-width: 0;
  max-width: none;
  font-size: clamp(14px, 3.2vw, 16px);
  font-weight: 400;
  line-height: 1.35;
  color: var(--muted);
  text-align: left;
}

.node.is-start .node-icon,
.node.is-open .node-icon {
  background: #d7ffb8;
  border-color: var(--green);
  box-shadow: 0 4px 0 var(--green-deep);
}

.node.is-start .node-name,
.node.is-open .node-name,
.node.is-cleared .node-name {
  color: var(--ink);
}

.node.is-cleared .node-icon {
  background: #fff;
  border-color: var(--green);
  box-shadow: 0 4px 0 var(--green-deep);
  color: var(--green-deep);
}

.start-pill,
.lock {
  position: static;
  margin-left: auto;
  flex: 0 0 auto;
}

.start-pill {
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--green);
  color: #fff;
  font-size: var(--fs-kicker);
  font-weight: var(--fw-mark);
  box-shadow: 0 3px 0 var(--green-deep);
}

.lock {
  font-size: 16px;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.node.is-locked {
  filter: grayscale(1);
  opacity: 0.72;
}

.guide {
  padding: 16px 18px;
  background: #fff8ee;
  border-color: #ffe0b0;
  font-size: clamp(16px, 3.8vw, 18px);
  font-weight: 400;
  line-height: 1.65;
  color: #7c5a1e;
}

.guide strong {
  display: block;
  margin-bottom: 4px;
  color: #b45309;
}

.btn {
  min-width: 132px;
  min-height: 48px;
  padding: 14px 22px;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: var(--fw-cta);
  color: #fff;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(5px) scale(0.98);
}

.btn-primary {
  background: var(--green);
  box-shadow: 0 6px 0 var(--green-deep);
}

.btn-primary:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--green-deep);
}

.btn-primary:disabled {
  background: #e5e5e5;
  color: #afafaf;
  box-shadow: 0 6px 0 #cfcfcf;
  cursor: not-allowed;
}

.start-cta {
  display: block;
  width: 100%;
  margin: 4px 0 20px;
}

.hub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 20px;
}

.hub-actions .btn {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.btn-ghost {
  width: 100%;
  margin-top: 14px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  box-shadow: 0 6px 0 #dcdcdc;
}

.btn-ghost:active:not(:disabled) {
  box-shadow: 0 1px 0 #dcdcdc;
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(16px + var(--safe-top));
  z-index: 50;
  width: min(420px, calc(100% - 24px));
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 14px;
  background: #3c3c3c;
  color: #fff;
  font-size: 14px;
  font-weight: var(--fw-label);
  text-align: center;
  box-shadow: var(--shadow);
}

#quizView {
  width: 100%;
  max-width: min(var(--quiz-width), 100%);
  margin: 0 auto;
  padding-bottom: calc(108px + var(--safe-bottom));
}

.hud {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--card);
  border: 2px solid var(--line);
  border-bottom-width: 6px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hud-stats {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.back-btn {
  width: fit-content;
  min-height: 40px;
  border: 0;
  background: #f3f3f3;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: var(--fw-label);
  color: var(--ink);
  box-shadow: 0 3px 0 #dcdcdc;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.back-btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 #dcdcdc;
}

.hud-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.hud-top .sound-btn-hud {
  margin-left: auto;
}

.hud-label {
  display: block;
  font-size: 11px;
  font-weight: var(--fw-mark);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.heart-row {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 1;
  color: var(--heart);
}

.heart {
  display: inline-flex;
  color: var(--heart);
  transition: transform 0.25s var(--press), filter 0.25s ease, opacity 0.25s ease;
}

.heart .glyph-heart,
.heart .ico {
  width: 18px;
  height: 18px;
  max-width: none;
}

.stat-chip .heart .glyph-heart {
  width: 16px;
  height: 16px;
}

.heart .ico-heart {
  fill: currentColor;
}

.heart.lost {
  color: var(--heart-lost);
  opacity: 0.35;
  filter: grayscale(1);
  transform: scale(0.85);
}

.heart.lost .ico-heart {
  fill: none;
}

.heart.hit {
  animation: heart-pop 0.45s var(--press);
}

.xp-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.xp-value {
  font-size: 12px;
  font-weight: var(--fw-mark);
  color: #b45309;
}

.xp-pop {
  position: absolute;
  right: 0;
  top: -26px;
  font-size: 13px;
  font-weight: var(--fw-mark);
  color: #b45309;
  opacity: 0;
}

.xp-pop.show {
  animation: xp-float 0.9s ease forwards;
}

.streak {
  display: flex;
  align-items: center;
  gap: 6px;
}

.streak-flame {
  display: inline-flex;
  color: #c4c4c4;
}

.streak-flame.lit {
  color: var(--orange);
  animation: flame-dance 0.8s ease infinite alternate;
}

.streak-copy strong {
  display: block;
  font-size: 18px;
  line-height: 1;
  color: var(--orange);
}

.stage {
  margin-top: 18px;
  transition: transform 0.55s var(--press), opacity 0.4s ease;
}

.stage.exit {
  transform: translateX(-24px) scale(0.96);
  opacity: 0;
}

.stage-kicker {
  font-size: 13px;
  font-weight: var(--fw-mark);
  color: var(--blue);
}

.q-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -6px 0 14px;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.q-kind {
  padding: 4px 10px;
  border-radius: 99px;
  background: #eaf9ff;
  color: #0369a1;
  font-size: var(--fs-kicker);
  font-weight: var(--fw-mark);
}

.q-kind[data-kind="단축키"] {
  background: #fff7ea;
  color: #b45309;
}

.q-kind[data-kind="메뉴"] {
  background: #eef2f6;
  color: #334155;
}

.q-kind[data-kind="툴"] {
  background: #e8fff4;
  color: #047857;
}

.q-kind[data-kind="감점"] {
  background: #fff1f2;
  color: #be123c;
}

.q-kind[data-kind="원리"],
.q-kind[data-kind="실무"] {
  background: #f3e8ff;
  color: #6b21a8;
}

.q-kind.is-review {
  background: #fff1f2;
  color: #be123c;
}

.review-banner {
  margin: -8px 0 14px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff1f2;
  color: #9f1239;
  font-size: 13px;
  font-weight: var(--fw-label);
}

.stage-title {
  margin: 4px 0 14px;
  font-size: clamp(20px, 4.8vw, 24px);
  line-height: 1.35;
  font-weight: var(--fw-title);
  letter-spacing: -0.01em;
}

.question-card {
  padding: clamp(14px, 3vw, 20px);
  border-bottom-width: 6px;
  box-shadow: var(--shadow);
}

.layer-preview {
  margin-bottom: 14px;
  padding: 8px;
  background: #2a2a2a;
  border-radius: 14px;
  container-type: inline-size;
}

.layer-stack {
  display: grid;
  gap: 8px;
}

.layer-stack.has-art {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  padding: 10px 6px 4px;
}

.layer-stack.has-scene {
  display: block;
  padding: 0;
}

.ps-scene {
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #2f2f2f;
  color: #d8d8d8;
  box-shadow: 0 4px 0 #1c1c1c;
  pointer-events: none;
  font-size: 8px;
  font-size: clamp(6px, 2.3cqi, 9px);
  line-height: 1;
  user-select: none;
}

.ps-menubar {
  height: 16px;
  padding: 0 7px;
  background: #3a3a3a;
  color: #ececec;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  flex: 0 0 auto;
}

.ps-menubar span.is-on {
  color: #fff;
  background: #5c5c5c;
  padding: 3px 5px;
  margin: 0 -2px;
  border-radius: 3px;
}

.ps-optbar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 14px;
  padding: 0 8px 0 28px;
  background: #4e4e4e;
  flex: 0 0 auto;
}

.ps-optbar i {
  display: block;
  height: 10px;
  width: 18px;
  border-radius: 2px;
  background: #6a6a6a;
}

.ps-optbar i.fill {
  width: 12px;
  background: #111;
  box-shadow: 1px 1px 0 #fff;
}

.ps-optbar i.wide {
  width: 42px;
}

.ps-body {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) minmax(68px, 24%);
  flex: 1;
  min-height: 0;
}

.ps-scene.is-nodock .ps-body {
  grid-template-columns: 22px minmax(0, 1fr);
}

.ps-scene.is-bare .ps-body {
  grid-template-columns: minmax(0, 1fr);
}

.ps-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 0 6px;
  background: #4e4e4e;
  overflow: hidden;
}

.ps-tool {
  width: 16px;
  height: 9px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  color: #ececec;
}

.ps-tool svg {
  width: 8px;
  height: 8px;
  max-width: none;
}

.ps-tool.is-on {
  background: #7d7d7d;
}

.ps-swatch {
  position: relative;
  width: 16px;
  height: 16px;
  margin-top: auto;
}

.ps-swatch b,
.ps-swatch em {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid #fff;
}

.ps-swatch b {
  left: 0;
  top: 0;
  background: #111;
  z-index: 1;
}

.ps-swatch em {
  right: 0;
  bottom: 0;
  background: #fff;
}

.ps-board {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #1f1f1f;
}

.ps-ruler-h {
  height: 5px;
  flex: 0 0 auto;
  background-color: #323232;
  background-image:
    repeating-linear-gradient(90deg, #5a5a5a 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, #7a7a7a 0 1px, transparent 1px 12px);
  background-size: auto 3px, auto 5px;
  background-repeat: repeat-x;
  background-position: left bottom, left bottom;
}

.ps-mid {
  display: flex;
  min-height: 0;
  flex: 1;
}

.ps-ruler-v {
  width: 5px;
  flex: 0 0 auto;
  background-color: #323232;
  background-image:
    repeating-linear-gradient(180deg, #5a5a5a 0 1px, transparent 1px 3px),
    repeating-linear-gradient(180deg, #7a7a7a 0 1px, transparent 1px 12px);
  background-size: 3px auto, 5px auto;
  background-repeat: repeat-y;
  background-position: right top, right top;
}

.ps-paste {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ps-dock {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #3a3a3a;
  border-left: 1px solid #2a2a2a;
}

.ps-dtabs {
  display: flex;
  gap: 0;
  background: #323232;
}

.ps-dtabs span {
  flex: 1;
  padding: 5px 2px;
  text-align: center;
  color: #9a9a9a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-dtabs span.on {
  background: #3a3a3a;
  color: #f2f2f2;
}

.ps-drows {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 6px 5px;
  flex: 1;
}

.ps-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 3px 4px;
  border-radius: 3px;
  color: #d0d0d0;
}

.ps-row.is-on {
  background: #505050;
  color: #fff;
}

.ps-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-thumb {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: linear-gradient(#cfe8ff, #8ed24f);
  box-shadow: 0 0 0 1px #222;
}

.ps-thumb.pale {
  background: #fff;
}

.ps-thumb.t {
  background: #fff;
  box-shadow: inset 0 0 0 1px #888;
}

.ps-thumb.path {
  background: #1f1f1f;
  box-shadow: inset 0 0 0 1px #1cb0f6;
}

.ps-maskbit {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: linear-gradient(90deg, #fff 50%, #111 50%);
}

.ps-lock {
  width: 7px;
  height: 6px;
  margin-left: auto;
  flex: 0 0 auto;
  border: 1px solid #aaa;
  border-radius: 1px;
  position: relative;
}

.ps-lock::before {
  content: "";
  position: absolute;
  left: 1px;
  top: -3px;
  width: 3px;
  height: 3px;
  border: 1px solid #aaa;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.ps-eye {
  width: 8px;
  height: 5px;
  flex: 0 0 auto;
  border: 1px solid #aaa;
  border-radius: 50%;
}

.ps-eye.off,
.ps-row.is-off {
  opacity: 0.38;
}

.ps-dctrl {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 5px 2px;
  color: #c8c8c8;
}

.ps-dctrl .on {
  padding: 2px 5px;
  border-radius: 2px;
  background: #1cb0f6;
  color: #fff;
}

.ps-dctrl b {
  margin-left: auto;
  font-weight: 400;
  color: #9a9a9a;
}

.ps-dfloor {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding: 4px 6px;
  border-top: 1px solid #2a2a2a;
}

.ps-plus {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.ps-plus::before,
.ps-plus::after {
  content: "";
  position: absolute;
  background: #c8c8c8;
}

.ps-plus::before {
  left: 4px;
  top: 1px;
  width: 2px;
  height: 8px;
}

.ps-plus::after {
  left: 1px;
  top: 4px;
  width: 8px;
  height: 2px;
}

.ps-plus.is-on {
  background: #1cb0f6;
}

.ps-plus.is-on::before,
.ps-plus.is-on::after {
  background: #fff;
}

.ps-swatch.is-on {
  outline: 1px solid #1cb0f6;
  outline-offset: 1px;
}

.ps-swatch.is-gray b {
  background: #8a8a8a;
}

.ps-swatch.is-swap b {
  background: #fff;
}

.ps-swatch.is-swap em {
  background: #111;
}

.ps-optbar.is-hot {
  box-shadow: inset 0 -2px 0 #1cb0f6;
}

.ps-optbar i.al,
.ps-optbar i.mode {
  width: 9px;
  height: 8px;
}

.ps-optbar i.al.on,
.ps-optbar i.mode.on {
  background: #1cb0f6;
}

.ps-bar,
.ps-dot,
.ps-bar-line,
.ps-work {
  display: none;
}

.ps-desk,
.ps-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62%;
  height: auto;
  aspect-ratio: 4 / 3;
  max-height: 84%;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px #111, 0 3px 8px rgba(0, 0, 0, 0.28);
}

.ps-desk {
  background: #aeb6bf;
}

.ps-canvas.is-tiny,
.ps-tiny {
  left: 8%;
  top: 12%;
  width: 20%;
  aspect-ratio: 3 / 4;
  max-height: 48%;
  transform: none;
  padding: 0;
}

.ps-canvas.is-blank {
  background: #fff;
}

.ps-canvas.is-buried .ps-photo {
  position: absolute;
  inset: 0 0 26% 0;
  width: auto;
  height: auto;
}

.ps-bigtype {
  position: absolute;
  left: 10%;
  bottom: 5%;
  font-size: 16px;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: 0.08em;
}

.ps-canvas.is-dup .ps-photo {
  position: absolute;
  width: auto;
  height: auto;
}

.ps-canvas.is-dup .ps-photo.back {
  inset: 6% 22% 22% 6%;
  box-shadow: 0 0 0 1px #1cb0f6;
}

.ps-canvas.is-dup .ps-photo.front {
  inset: 22% 6% 6% 22%;
}

.ps-offmark {
  position: absolute;
  right: 8%;
  top: 10%;
  font-size: 15px;
  font-weight: 800;
  color: #888;
  text-decoration: line-through;
  opacity: 0.55;
}

.ps-logo {
  position: absolute;
  left: 12%;
  bottom: 12%;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.ps-picker {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42%;
  height: 58%;
  transform: translate(-50%, -50%);
  padding: 6px;
  background: #4a4a4a;
  border-radius: 4px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.ps-picker i {
  display: block;
  height: 70%;
  background: linear-gradient(#fff, #1cb0f6);
  border-radius: 2px;
}

.ps-picker b {
  display: block;
  height: 8px;
  margin-top: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}

.ps-guide-v {
  position: absolute;
  left: 50%;
  top: 6%;
  bottom: 6%;
  width: 1px;
  background: #ff79c6;
}

.ps-box.pick {
  box-shadow: 0 0 0 1.5px #1cb0f6;
}

.ps-modechip {
  position: absolute;
  top: 8%;
  left: 8%;
  padding: 3px 6px;
  border-radius: 3px;
  background: #1cb0f6;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
}

.ps-modelist {
  position: absolute;
  top: 10%;
  right: 8%;
  display: grid;
  gap: 2px;
  padding: 4px;
  background: #3a3a3a;
  border-radius: 3px;
  color: #ddd;
  font-size: 7px;
}

.ps-modelist .on {
  background: #1cb0f6;
  color: #fff;
}

.ps-blob.mix {
  left: 28%;
  top: 22%;
  width: 44%;
  background: linear-gradient(120deg, #58cc02, #ffc800);
}

.ps-photo {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(#cfe8ff, #f4fbff);
}

.ps-sun {
  position: absolute;
  top: 16%;
  right: 14%;
  width: 18%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffe08a;
}

.ps-hill {
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: 0;
  height: 42%;
  border-radius: 80% 80% 0 0;
  background: #8ed24f;
}

.ps-zoom .ps-photo {
  position: absolute;
  inset: -22% -8% -8% 18%;
  width: auto;
  height: auto;
}

.ps-dialog {
  display: grid;
  gap: 8px;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 10px 12px;
  background: #4a4a4a;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.ps-dialog-row {
  height: 8px;
  border-radius: 99px;
  background: #6a6a6a;
}

.ps-dialog-row.short {
  width: 62%;
}

.ps-list {
  display: grid;
  gap: 8px;
  width: 70%;
  margin: 22px auto 0;
}

.ps-list span {
  display: block;
  height: 14px;
  border-radius: 8px;
  background: #fff;
}

.ps-list span.is-now {
  background: #d7ffb8;
}

.ps-handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff;
  border: 1.5px solid #1cb0f6;
}

.ps-handle.tl { top: 10px; left: 10px; }
.ps-handle.tr { top: 10px; right: 10px; }
.ps-handle.bl { bottom: 10px; left: 10px; }
.ps-handle.br { bottom: 10px; right: 10px; }

.ps-split {
  display: grid;
  grid-template-columns: 1fr 72px;
  height: 100%;
}

.ps-split .ps-canvas {
  position: relative;
  inset: 8px 0 8px 10px;
}

.ps-panel {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 10px 8px;
  background: #f4f5f7;
}

.ps-panel b {
  display: block;
  height: 12px;
  border-radius: 4px;
  background: #e4e6ea;
}

.ps-panel b.on {
  background: #d7ffb8;
}

.ps-stroke::after {
  content: "";
  position: absolute;
  left: 18%;
  top: 42%;
  width: 58%;
  height: 10px;
  border-radius: 99px;
  background: #ff4b4b;
  transform: rotate(-12deg);
  opacity: 0.85;
}

.ps-stroke.is-gray::after {
  background: #8a8a8a;
}

.ps-stroke.is-white::after {
  background: #fff;
  box-shadow: 0 0 0 1px #888;
}

.ps-stroke.is-paint::before {
  content: "";
  position: absolute;
  left: 28%;
  top: 22%;
  width: 42%;
  height: 8px;
  border-radius: 99px;
  background: #ff4b4b;
  transform: rotate(18deg);
  opacity: 0.8;
}

.ps-copy {
  position: absolute;
  left: 14%;
  top: 12%;
  width: 72%;
  height: 72%;
  border: 1px dashed #1cb0f6;
  background: rgba(255, 255, 255, 0.28);
}

.ps-align {
  background: #f3f4f6;
}

.ps-box {
  position: absolute;
  width: 28%;
  height: 38%;
  border-radius: 6px;
}

.ps-box.a {
  left: 16%;
  top: 18%;
  background: #58cc02;
}

.ps-box.b {
  right: 18%;
  top: 38%;
  background: #ffc800;
}

.ps-align.is-uneven .ps-box.a {
  left: 8%;
  top: 30%;
  height: 44%;
}

.ps-align.is-uneven .ps-box.b {
  left: 38%;
  right: auto;
  top: 10%;
  height: 28%;
}

.ps-box.c {
  left: 66%;
  top: 38%;
  width: 24%;
  height: 50%;
  background: #1cb0f6;
}

.ps-center {
  display: grid;
  place-items: center;
  background: #f3f4f6;
}

.ps-rect {
  width: 42%;
  height: 48%;
  border-radius: 10px;
  background: #1cb0f6;
}

.ps-rect.round {
  width: 58%;
  height: 30%;
  border-radius: 40px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.ps-rect.jagged {
  border-radius: 0;
  clip-path: polygon(0 7px, 7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px));
}

.ps-blob {
  position: absolute;
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.8;
}

.ps-blob.green {
  left: 24%;
  background: #58cc02;
}

.ps-blob.gold {
  right: 24%;
  background: #ffc800;
}

.ps-blob.cover {
  left: 10%;
  top: 8%;
  right: 10%;
  bottom: 8%;
  width: auto;
  aspect-ratio: auto;
  opacity: 0.9;
}

.ps-ants {
  position: absolute;
  left: 22%;
  top: 18%;
  width: 46%;
  height: 58%;
  border: 1.5px dashed #1cb0f6;
  border-radius: 4px;
}

.ps-crop {
  background: #111;
}

.ps-crop .ps-photo {
  clip-path: inset(12% 18%);
}

.ps-crop-rule {
  position: absolute;
  inset: 12% 18%;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 80px rgba(0, 0, 0, 0.35);
}

.ps-dim .ps-photo {
  filter: brightness(0.72) saturate(0.8);
}

.ps-slider {
  display: grid;
  place-items: center;
  background: #f4f5f7;
}

.ps-slider i {
  width: 8px;
  height: 70%;
  border-radius: 99px;
  background: linear-gradient(#fff, #ffc800);
  box-shadow: inset 0 0 0 2px #ececec;
}

.ps-spot {
  position: absolute;
  top: 28%;
  left: 30%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c4a574;
  box-shadow: 0 0 0 3px rgba(196, 165, 116, 0.35);
}

.ps-files {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  position: absolute;
  inset: 12%;
}

.ps-file {
  width: 44px;
  height: 56px;
  border-radius: 6px 12px 6px 6px;
  background: #fff;
  box-shadow: 0 4px 0 #d0d0d0;
}

.ps-file.psd {
  background: linear-gradient(#d7eeff, #fff);
}

.ps-file.jpg {
  background: linear-gradient(#fff3cc, #fff);
}

.ps-veil {
  position: absolute;
  inset: 0 0 0 42%;
  background: #111;
  opacity: 0.72;
}

.ps-type .ps-line {
  position: absolute;
  left: 14%;
  bottom: 18%;
  width: 54%;
  height: 8px;
  border-radius: 4px;
  background: #3c3c3c;
}

.ps-type .ps-line.w {
  bottom: 32%;
  width: 38%;
  height: 12px;
}

.ps-type.is-misalign .ps-line:not(.w) {
  left: 8%;
  width: 36%;
}

.ps-path {
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  background: #fff;
}

.ps-tiles {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(58%, 92px);
  height: 78%;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  background:
    repeating-linear-gradient(90deg, #d7ffb8 0 16px, #fff 16px 32px),
    repeating-linear-gradient(0deg, #d7ffb8 0 16px, #fff 16px 32px);
  background-blend-mode: multiply;
}

.ps-phone {
  width: 34%;
  height: 78%;
  padding: 6px 5px;
  border-radius: 10px;
  background: #3c3c3c;
}

.ps-swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56%;
  transform: translate(-50%, -50%);
}

.ps-swatches i {
  aspect-ratio: 1;
  border-radius: 50%;
}

.ps-swatches i:nth-child(1) { background: #58cc02; }
.ps-swatches i:nth-child(2) { background: #ffc800; }
.ps-swatches i:nth-child(3) { background: #ff9600; }
.ps-swatches i:nth-child(4) { background: #1cb0f6; }
.ps-swatches i:nth-child(5) { background: #ff4b4b; }
.ps-swatches i:nth-child(6) { background: #ce82ff; }

.preview-tool {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.preview-art {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #454545;
  border-radius: 16px;
  box-shadow: 0 4px 0 #2f2f2f;
}

.preview-tool figcaption {
  font-size: 12px;
  font-weight: var(--fw-mark);
  color: var(--ink);
  text-align: center;
}

.mini-layer {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: var(--fw-label);
  text-align: center;
}

.mini-layer.photo {
  background: #cdeeff;
  color: #075985;
  box-shadow: 0 4px 0 #7dd3fc;
}

.mini-layer.type {
  background: #ffe08a;
  color: #92400e;
  box-shadow: 0 4px 0 #fbbf24;
}

.mini-layer.mute {
  background: #ececec;
  color: #737373;
  box-shadow: 0 4px 0 #d4d4d4;
}

.mini-layer.lock {
  background: #ffedd5;
  color: #9a3412;
  box-shadow: 0 4px 0 #fdba74;
}

.mini-layer.mint {
  background: #d7ffb8;
  color: #3f6212;
  box-shadow: 0 4px 0 #86efac;
}

.mini-layer.lilac {
  background: #f3e8ff;
  color: #6b21a8;
  box-shadow: 0 4px 0 #d8b4fe;
}

.mini-layer.buried {
  opacity: 0.55;
}

.preview-caption {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 400;
  color: #c8c8c8;
  text-align: center;
}

.question-text {
  font-size: clamp(17px, 3.8vw, 19px);
  line-height: 1.65;
  font-weight: var(--fw-title);
}

.q-hint {
  margin-top: 12px;
}

.q-hint-btn {
  min-height: 40px;
  padding: 8px 14px;
  border: 2px dashed #f5c16c;
  border-radius: 12px;
  background: #fff8e8;
  color: #9a6700;
  font-size: 14px;
  font-weight: var(--fw-label);
}

.q-hint-btn:disabled {
  opacity: 0.55;
}

.q-hint-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 10px 12px;
  list-style: none;
  background: #fff8e8;
  border: 2px solid #f5c16c;
  border-radius: 12px;
}

.q-hint-list li {
  display: grid;
  gap: 4px;
}

.q-hint-label {
  font-size: 11px;
  font-weight: var(--fw-mark);
  letter-spacing: 0.06em;
  color: #b45309;
}

.q-hint-list p {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #3c3c3c;
}

.choices {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.choice-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  min-height: 64px;
  padding: 14px;
  text-align: left;
  color: inherit;
  border-bottom-width: 6px;
  transition: transform 0.08s ease, border-bottom-width 0.08s ease;
}

.choice-card:active:not(:disabled) {
  transform: translateY(4px) scale(0.985);
  border-bottom-width: 2px;
}

.choice-card.selected {
  border-color: var(--blue);
  background: #eaf9ff;
}

.choice-card.correct {
  border-color: var(--green);
  background: var(--green-soft);
}

.choice-card.wrong {
  border-color: var(--red);
  background: var(--red-soft);
  animation: shake 0.4s ease;
}

.choice-key {
  flex: 0 0 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f3f3f3;
  font-weight: var(--fw-mark);
  color: var(--muted);
}

.choice-card.selected .choice-key {
  background: var(--blue);
  color: #fff;
}

.choice-card.correct .choice-key,
.choice-card.wrong .choice-key {
  color: #fff;
}

.choice-card.correct .choice-key {
  background: var(--green);
}

.choice-card.wrong .choice-key {
  background: var(--red);
}

.choice-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.choice-title {
  font-size: 15px;
  font-weight: var(--fw-label);
  line-height: 1.5;
}

.choice-hint {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
}

.dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: min(var(--quiz-width), 100%);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  padding: 12px var(--pad-x) calc(20px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 2px solid var(--line);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  z-index: 25;
}

.dock .btn {
  width: 100%;
}

.dock-tip {
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
}

.feedback {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(60, 60, 60, 0.18);
  pointer-events: auto;
}

.feedback-sheet {
  width: 100%;
  max-width: min(var(--quiz-width), 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  max-height: min(78vh, 720px);
  overflow-y: auto;
  padding: 20px var(--pad-x) calc(20px + var(--safe-bottom));
  background: #fff;
  animation: sheet-up 0.35s var(--press);
}

.feedback-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.explain-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  white-space: pre-line;
}

.explain-card::before {
  content: "단축키";
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: var(--fw-mark);
  letter-spacing: 0.04em;
  color: #b45309;
}

.explain-card.tip::before {
  content: "실무 팁";
  color: #3f6212;
}

.feedback.ok .feedback-sheet {
  background: #d7ffb8;
}

.feedback.bad .feedback-sheet {
  background: #ffdfe0;
}

.feedback-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 26px;
  font-weight: var(--fw-cta);
  color: #fff;
  background: var(--green);
}

.feedback.bad .feedback-icon {
  background: var(--red);
}

.feedback-copy {
  min-width: 0;
}

.feedback-title {
  font-size: clamp(20px, 5vw, 24px);
  font-weight: var(--fw-title);
}

.feedback-text {
  margin-top: 6px;
  font-size: clamp(16px, 3.8vw, 18px);
  font-weight: 400;
  line-height: 1.55;
}

.feedback.ok #continueBtn,
.feedback.bad #continueBtn {
  width: 100%;
}

.feedback.ok #continueBtn {
  background: var(--green);
  box-shadow: 0 6px 0 var(--green-deep);
}

.feedback.bad #continueBtn {
  background: var(--red);
  box-shadow: 0 6px 0 var(--red-deep);
}

.clear-screen {
  margin-top: 28px;
  padding: clamp(24px, 5vw, 36px) clamp(16px, 4vw, 24px);
  text-align: center;
  border-bottom-width: 6px;
  animation: pop-in 0.5s var(--press);
}

.clear-screen .btn {
  width: min(100%, 280px);
}

[hidden] {
  display: none !important;
}

.medal {
  display: grid;
  place-items: center;
  color: var(--ink);
}

.final-streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--orange);
}

.clear-kicker {
  margin-top: 8px;
  font-weight: var(--fw-mark);
  color: #b45309;
}

.clear-screen h2 {
  margin: 6px 0 10px;
  font-size: clamp(22px, 5vw, 26px);
  font-weight: var(--fw-title);
  letter-spacing: -0.01em;
}

.clear-copy {
  font-size: clamp(16px, 3.8vw, 18px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted);
}

.clear-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0;
}

.clear-stats div {
  padding: 12px;
  background: #fff8ee;
  border-radius: 14px;
}

.clear-stats span {
  display: block;
  font-size: 12px;
  font-weight: var(--fw-mark);
  color: var(--muted);
}

.clear-stats strong {
  font-size: 22px;
}

.clear-actions {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.league-reward {
  margin: -8px 0 20px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fff6d6, #fff);
  border: 2px solid #ffc800;
  border-radius: 16px;
}

.league-reward-kicker {
  font-size: var(--fs-kicker);
  font-weight: var(--fw-mark);
  color: #b45309;
}

.league-reward-items {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
  font-size: 16px;
  font-weight: var(--fw-cta);
  color: var(--ink);
}

.clear-actions .btn {
  width: min(100%, 280px);
}

.clear-actions .btn-ghost {
  margin-top: 0;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

@keyframes sheet-up {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes xp-float {
  0% { opacity: 0; transform: translateY(8px); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-14px); }
}

@keyframes heart-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(0.85); }
}

@keyframes flame-dance {
  from { transform: scale(1.1) rotate(-8deg); }
  to { transform: scale(1.22) rotate(8deg); }
}

@keyframes pop-in {
  from { transform: scale(0.92) translateY(16px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Phone: keep stacked map even if a wide image briefly stretches layout */
@media (max-width: 639px) {
  .ps-body {
    grid-template-columns: 18px minmax(0, 1fr) minmax(56px, 22%);
  }

  .ps-scene.is-nodock .ps-body {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .path {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    gap: 8px;
    padding: 10px;
  }

  .path::before {
    display: none;
  }

  .node {
    flex-direction: row;
    width: 100%;
    min-height: 64px;
    padding: 10px 12px;
    background: #fafafa;
    text-align: left;
  }

  .node-name {
    max-width: none;
    margin-top: 0;
    text-align: left;
  }

  .start-pill,
  .lock {
    position: static;
    margin-left: auto;
  }
}

/* Tablet */
@media (min-width: 640px) {
  .owl {
    width: 68px;
    height: 68px;
  }

  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hud {
    flex-direction: row;
    align-items: center;
  }

  .hud-stats {
    flex: 1;
  }

  .dock {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px calc(18px + var(--safe-bottom));
  }

  .dock .btn,
  .feedback.ok #continueBtn,
  .feedback.bad #continueBtn {
    width: auto;
  }

  .dock-tip {
    text-align: left;
  }

  .feedback-sheet {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .feedback-copy {
    flex: 1 1 180px;
  }
}

/* Windows / desktop */
@media (min-width: 860px) {
  .app {
    padding-top: 32px;
    padding-bottom: 48px;
  }

  .owl {
    width: 76px;
    height: 76px;
  }

  .owl-sm {
    width: 58px;
    height: 58px;
  }

  .path {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 28px 16px 22px;
  }

  .path::before {
    content: "";
    display: block;
    position: absolute;
    left: 12%;
    right: 12%;
    top: 58px;
    height: 4px;
    background: #ececec;
    border-radius: 99px;
  }

  .path-bonus::before {
    display: none;
  }

  .bonus-label {
    grid-column: 1 / -1;
    text-align: left;
    padding-left: 4px;
  }

  .node {
    flex-direction: column;
    width: auto;
    min-height: 0;
    padding: 0;
    background: transparent;
    text-align: center;
  }

  .node-icon {
    width: 68px;
    height: 68px;
  }

  .node-icon .ico {
    width: 28px;
    height: 28px;
  }

  .node-name {
    max-width: 120px;
    margin-top: 8px;
    font-size: 14px;
    text-align: center;
  }

  .node.is-start .node-name,
  .node.is-open .node-name {
    margin-top: 18px;
  }

  .start-pill,
  .lock {
    position: absolute;
    margin-left: 0;
  }

  .start-pill {
    top: 52px;
    padding: 4px 10px;
    font-size: 11px;
  }

  .lock {
    top: 46px;
    font-size: 14px;
  }

  .league-head {
    padding: 18px 20px;
  }
}

/* Wide Windows: quiz 2-column */
@media (min-width: 1100px) {
  :root {
    --quiz-width: 980px;
  }

  .stage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 22px;
    align-items: start;
  }

  .stage-kicker,
  .stage-title,
  .q-meta {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .stage-title {
    margin-bottom: 4px;
  }

  .choices {
    margin-top: 0;
  }

  .question-card {
    min-height: 100%;
  }
}

.study-kicker,
.study-sheet-kicker {
  margin: 8px 0 4px;
  font-size: var(--fs-kicker);
  font-weight: var(--fw-mark);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.study-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: var(--fw-title);
  line-height: 1.25;
}

.study-lead,
.study-summary {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.study-league {
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--card);
  border: 2px solid var(--line);
  border-bottom-width: 6px;
  border-radius: var(--radius);
}

.study-league-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: #f7f7f7;
}

.study-league.l1 .study-league-head { background: #fff7ea; }
.study-league.l2 .study-league-head { background: #eef9ff; }
.study-league.l3 .study-league-head { background: #e8fff8; }
.study-league.l4 .study-league-head { background: #f6edff; }
.study-league.l5 .study-league-head { background: #fff0f3; }
.study-league.l6 .study-league-head { background: #f4fff0; }
.study-league.event .study-league-head { background: #fff8e6; }

.study-league-icon {
  display: inline-flex;
  color: var(--ink);
}

.study-league-kicker {
  margin: 0;
  font-size: var(--fs-kicker);
  font-weight: var(--fw-mark);
  color: var(--muted);
}

.study-league-head h2 {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: var(--fw-strong);
}

.study-league.is-locked {
  opacity: 0.72;
}

.study-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  text-align: left;
  color: var(--ink);
}

.study-item:active:not(.is-locked) {
  background: #f7fbf3;
}

.study-item-num {
  flex: 0 0 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f4fff0;
  color: var(--green-deep);
  font-size: 12px;
  font-weight: var(--fw-mark);
}

.study-item-body {
  min-width: 0;
  flex: 1;
}

.study-item-body strong {
  display: block;
  font-size: 15px;
  font-weight: var(--fw-strong);
}

.study-item-body span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.study-item-go {
  color: var(--green-deep);
  font-size: 13px;
  font-weight: var(--fw-label);
}

.study-item.is-locked .study-item-num {
  background: #f3f3f3;
  color: var(--muted);
}

.study-item.is-locked .study-item-go {
  color: var(--muted);
}

.study-sheet {
  padding: 4px 0 24px;
}

.study-sheet h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: var(--fw-title);
  line-height: 1.3;
}

.study-sheet-sub {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.study-keys {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.study-key {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid var(--line);
}

.study-key-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: var(--fw-mark);
  letter-spacing: 0.04em;
  color: #b45309;
}

.study-key.is-mac .study-key-label {
  color: #1d4ed8;
}

.study-key.is-kr .study-key-label {
  color: #3f6212;
}

.study-key.is-en .study-key-label {
  color: #1d4ed8;
}

.study-lang-note {
  margin: 2px 2px 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.study-key p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.study-steps {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  counter-reset: study-step;
}

.study-steps li {
  position: relative;
  margin-bottom: 10px;
  padding: 14px 14px 14px 48px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid var(--line);
  counter-increment: study-step;
}

.study-steps li::before {
  content: counter(study-step);
  position: absolute;
  left: 12px;
  top: 14px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 12px;
  font-weight: var(--fw-mark);
}

.study-step-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.study-step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.study-step-meta span {
  padding: 4px 8px;
  border-radius: 8px;
  background: #f3f3f3;
  font-size: 12px;
  line-height: 1.35;
}

.study-step-meta span.is-menu-kr {
  background: #f4fff0;
  color: #3f6212;
}

.study-step-meta span.is-menu-en {
  background: #eef7ff;
  color: #1d4ed8;
}

.study-step-meta span.is-key {
  background: #fff8e6;
  color: #92400e;
}

.study-tip {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f4fff0;
  font-size: 14px;
  line-height: 1.55;
}

.study-tip::before {
  content: "이노업쌤 팁";
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: var(--fw-mark);
  color: #3f6212;
}

.study-link {
  min-width: 0;
}

@media (hover: hover) and (pointer: fine) {
  .node:hover:not(.is-locked) .node-icon {
    transform: translateY(-3px);
  }

  .choice-card:hover:not(:disabled) {
    transform: translateY(-2px);
  }

  .btn-ghost:hover,
  .back-btn:hover {
    filter: brightness(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
