@import url("https://fonts.googleapis.com/css2?family=Jua&family=Nanum+Gothic:wght@400;700&display=swap");

:root {
  color-scheme: light;
  --bg: #fbf6e6;
  --bg-strong: #f8eec8;
  --ink: #1b1a17;
  --muted: #6a5f50;
  --primary: #ff9f1c;
  --primary-strong: #ff7a00;
  --secondary: #2ec4b6;
  --accent: #ffbf69;
  --card: #ffffff;
  --card-edge: #f2dcc0;
  --shadow: 0 20px 40px rgba(37, 29, 16, 0.16);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: radial-gradient(120% 120% at 10% 10%, #fff7d6 0%, var(--bg) 45%, #f6ead1 100%);
}

body.parent-open {
  overflow: hidden;
}

body.feedback-open {
  overflow: hidden;
}

.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.sky__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.6;
  animation: float 12s ease-in-out infinite;
}

.sky__blob--one {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at 30% 30%, #ffe7b3, #ffd28a);
  top: -120px;
  left: -80px;
}

.sky__blob--two {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle at 20% 20%, #d0f4ff, #a6e3f8);
  top: 120px;
  right: -80px;
  animation-delay: -3s;
}

.sky__blob--three {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 30% 30%, #ffe2ed, #ffc1d6);
  bottom: -140px;
  left: 40%;
  animation-delay: -6s;
}

.game {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 18px calc(60px + env(safe-area-inset-bottom));
  display: grid;
  gap: 28px;
}

.game__header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.game__kicker {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #ff7a00;
  margin: 0 0 8px;
}

.game__title h1 {
  font-family: "Jua", "Nanum Gothic", sans-serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  margin: 0 0 6px;
}

.game__subtitle {
  margin: 0;
  color: var(--muted);
}

.game__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid #ffe0b3;
  font-size: 0.9rem;
  font-weight: 700;
  color: #8c4a0a;
  white-space: nowrap;
}

.daily-status {
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid #c9f0e9;
  font-size: 0.86rem;
  font-weight: 700;
  color: #0b6b62;
  white-space: nowrap;
}

.parent-toggle {
  border: none;
  background: #fff2d9;
  color: #7c4a0d;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(140, 74, 10, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.feedback-toggle {
  border: none;
  background: #e4fbff;
  color: #0f5b6a;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(15, 91, 106, 0.15);
}

.feedback-toggle:active {
  transform: scale(0.97);
}

.parent-toggle:active {
  transform: scale(0.97);
}

.parent-toggle__hint {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: #ffe4bf;
  color: #8c4a0a;
}

.stage {
  display: grid;
  gap: 22px;
}

.card-panel {
  display: grid;
  gap: 18px;
}

.card {
  background: linear-gradient(145deg, #fff9ea, #ffffff);
  border: 2px solid var(--card-edge);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: popIn 0.5s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 223, 170, 0.4), transparent 60%);
  pointer-events: none;
}

.card__label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #d76c02;
}

.card__word {
  font-family: "Jua", "Nanum Gothic", sans-serif;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin: 10px 0 6px;
}

.card__hanja {
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  color: #6d4c41;
}

.meaning {
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  border: 2px dashed #ffd4a3;
}

.meaning h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.meaning__definition {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.meaning__breakdown {
  margin: 0 0 8px;
  color: #775c3d;
}

.meaning__examples {
  display: grid;
  gap: 6px;
  color: #6b5a44;
}

.meaning__links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
  color: #7c4a0d;
  background: #fff3dc;
  border: 1px solid #ffd8a0;
}

.action-panel {
  display: grid;
  gap: 12px;
}

.action {
  border: none;
  background: var(--primary);
  color: #22170c;
  font-weight: 800;
  padding: 15px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  min-height: 56px;
  font-size: 1.03rem;
  box-shadow: 0 10px 18px rgba(255, 122, 0, 0.2);
}

.action.primary {
  background: linear-gradient(135deg, #ff9f1c, #ff7a00);
  color: #ffffff;
}

.action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.action.ghost {
  background: #ffffff;
  border: 2px solid #ffe0b3;
  color: #7c4a0d;
  box-shadow: none;
}

.action-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.quiz-target {
  border: 2px dashed #ffd7a3;
  border-radius: var(--radius-md);
  background: #fff8eb;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.quiz-target__label {
  font-weight: 700;
  color: #7c4a0d;
  font-size: 0.9rem;
}

.quiz-target__controls {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.quiz-target__input {
  border: 2px solid #ffd9aa;
  border-radius: var(--radius-pill);
  padding: 10px 12px;
  font: inherit;
  background: #ffffff;
}

.quiz-target__input:focus {
  outline: 2px solid rgba(255, 159, 28, 0.35);
  border-color: rgba(255, 159, 28, 0.7);
}

.quiz-target__button {
  min-height: 44px;
  padding-inline: 14px;
}

.quiz-target__status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.82rem;
  color: #6f5a40;
}

.quiz-target__status--error {
  color: #b91c1c;
}

.quiz-target__status--ok {
  color: #0f6b47;
}

.quiz-target__suggestions {
  display: grid;
  gap: 8px;
}

.quiz-target__suggestions[hidden] {
  display: none;
}

.quiz-target__suggestion-title {
  margin: 0;
  color: #7c4a0d;
  font-size: 0.8rem;
  font-weight: 700;
}

.quiz-target__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quiz-target__suggestion {
  border: 2px solid #ffd29a;
  background: #fff4dd;
  color: #7b4a11;
  border-radius: var(--radius-pill);
  min-height: 40px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}

.quiz {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 2px solid #ffe7bf;
  box-shadow: var(--shadow);
}

.quiz__header {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.flow-guide {
  display: grid;
  gap: 6px;
  background: #fff4de;
  border: 2px solid #ffd8a3;
  border-radius: 14px;
  padding: 10px 12px;
}

.flow-guide__progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: #ffe8c3;
  overflow: hidden;
}

.flow-guide__progress-fill {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb347, #ff8a00);
  transition: width 0.25s ease, background-color 0.2s ease;
}

.flow-guide__progress-fill--error {
  background: #ef4444;
}

.flow-guide__progress-fill--ok {
  background: #22c55e;
}

.flow-guide__step {
  margin: 0;
  font-size: 0.82rem;
  color: #8c4a0a;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.flow-guide__next {
  margin: 0;
  font-size: 0.9rem;
  color: #6f4a23;
  font-weight: 700;
}

.flow-guide__cheer {
  margin: 0;
  font-size: 0.82rem;
  color: #7c4a0d;
  font-weight: 700;
}

.flow-guide__cheer--error {
  color: #b91c1c;
}

.flow-guide__cheer--ok {
  color: #0f6b47;
}

.flow-guide__cta {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #ffb347, #ff8a00);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.94rem;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(255, 138, 0, 0.18);
}

.flow-guide__cta[hidden] {
  display: none;
}

.flow-guide__next--error {
  color: #b91c1c;
}

.flow-guide__next--ok {
  color: #0f6b47;
}

.quiz__hanja {
  margin: 0;
  color: #6f5a40;
  font-size: 0.95rem;
}

.quiz__options {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.quiz-option {
  background: #fff5e3;
  border: 2px solid #ffd7a3;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 58px;
  display: grid;
  gap: 8px;
  animation: slideUp 0.35s ease both;
  text-align: left;
  font-family: inherit;
}

.quiz-option small {
  font-weight: 500;
  color: #6f5a40;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.quiz-option.correct {
  background: #e3fff2;
  border-color: #7ee2b8;
}

.quiz-option.wrong {
  background: #ffe7ea;
  border-color: #ff9db0;
}

.quiz__hint {
  margin: 10px 0 0;
  color: #7b4b2c;
  font-weight: 700;
}

.quiz__result {
  margin-top: 12px;
  font-size: 1.05rem;
  font-weight: 800;
}

.quiz__result small {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #6f4a23;
}

.quiz__answer-detail {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid #ffe2b8;
  background: #fffaf0;
  display: grid;
  gap: 4px;
}

.quiz__answer-detail[hidden] {
  display: none;
}

.quiz-answer__title,
.quiz-answer__meaning,
.quiz-answer__composition {
  margin: 0;
}

.quiz-answer__title {
  font-weight: 800;
  color: #6f4a23;
}

.quiz-answer__meaning {
  color: #674f37;
}

.quiz-answer__composition {
  color: #3f5e87;
}

.quiz__next-card {
  margin-top: 12px;
  width: 100%;
}

.quiz__next-card[hidden] {
  display: none;
}

.review {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 2px dashed #ffd8a3;
  background: #fffaf0;
}

.review[hidden] {
  display: none;
}

.review__title {
  margin: 0 0 8px;
  color: #6f4a23;
  font-weight: 700;
}

.review__buttons {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.review__btn {
  min-height: 48px;
  font-size: 0.95rem;
}

.review__btn.review__btn--default {
  border-color: #ff9f1c;
  background: #fff1d8;
}

.review__status {
  margin: 8px 0 0;
  color: #6f5a40;
  font-size: 0.9rem;
}

.related {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  border: 2px solid #ffe7bf;
}

.related__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.related-chip {
  border: 2px solid #ffd9aa;
  background: #fff8eb;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.related-chip span {
  font-size: 0.9rem;
  color: #6b4b2b;
}

.catalog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  border: 2px solid #d9e9ff;
  box-shadow: var(--shadow);
}

.catalog__summary {
  margin: 0 0 14px;
  color: #365b8a;
  font-weight: 700;
}

.catalog__columns {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.catalog__col {
  background: #f6fbff;
  border-radius: 12px;
  border: 1px solid #d7ebff;
  padding: 12px;
}

.catalog__col h3 {
  margin: 0 0 8px;
  color: #234975;
  font-size: 1rem;
}

.catalog__list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #2d4663;
}

.zones {
  background: #fffef8;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  border: 2px solid #d9f0d8;
  box-shadow: var(--shadow);
}

.zone-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.zone-chip {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #cde8cc;
  padding: 10px 12px;
  background: linear-gradient(135deg, #ecfff0, #f8fff9);
}

.zone-chip--locked {
  border-color: #d4dbe5;
  background: linear-gradient(135deg, #f4f7fb, #fbfcff);
}

.zone-chip__header {
  font-weight: 700;
  color: #2f6445;
  position: relative;
  z-index: 2;
}

.zone-chip--locked .zone-chip__header {
  color: #4f647d;
}

.zone-chip__body {
  margin-top: 6px;
  color: #3f5b4b;
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

.zone-chip--locked .zone-chip__body {
  color: #63778e;
}

.zone-chip__fog {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.7), rgba(180, 195, 216, 0.95));
  opacity: var(--fog-opacity, 0.5);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.parent {
  position: fixed;
  inset: 0;
  background: rgba(22, 19, 14, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20;
}

.parent[hidden] {
  display: none;
}

.feedback {
  position: fixed;
  inset: 0;
  background: rgba(22, 19, 14, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 21;
}

.feedback[hidden] {
  display: none;
}

.feedback__dialog {
  background: #fffaf0;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: min(640px, 100%);
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.feedback__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.feedback__subtitle {
  margin: 6px 0 0;
  color: #74553a;
}

.feedback__close {
  border: none;
  background: #fff0d8;
  color: #7d4f1f;
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.feedback__form {
  display: grid;
  gap: 12px;
}

.feedback__field {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
  color: #5f4d37;
}

.feedback__field--hidden {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.feedback__field input,
.feedback__field select,
.feedback__field textarea {
  width: 100%;
  border: 2px solid #ffd9aa;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fffefb;
}

.feedback__field textarea {
  resize: vertical;
  min-height: 96px;
}

.feedback__turnstile {
  min-height: 66px;
}

.feedback__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.feedback__status {
  margin: 0;
  font-size: 0.9rem;
  color: #6f5a40;
}

.parent__dialog {
  background: #fffaf0;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: min(960px, 100%);
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow);
}

.parent__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.parent__subtitle {
  margin: 4px 0 0;
  color: #7c6652;
}

.parent__close {
  border: none;
  background: #ffd7a3;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 700;
}

.parent__actions {
  margin-top: 16px;
}

.parent__link {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: #fff0d6;
  color: #8c4a0a;
  font-weight: 700;
  text-decoration: none;
}

.parent__sync {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.parent__sync-btn {
  border: 2px solid #ffd9aa;
  background: #fff8eb;
  color: #6f4a23;
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.parent__sync-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.parent__sync-status {
  margin: 0;
  color: #7b5f42;
  font-size: 0.9rem;
}

.hide-panel {
  position: fixed;
  inset: 0;
  background: rgba(22, 19, 14, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 22;
}

.hide-panel[hidden] {
  display: none;
}

.hide-panel__dialog {
  background: #fffaf0;
  border-radius: var(--radius-lg);
  width: min(560px, 100%);
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.hide-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hide-panel__close {
  border: none;
  background: #fff0d8;
  color: #7d4f1f;
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.hide-panel__form {
  display: grid;
  gap: 10px;
}

.hide-panel__fieldset {
  border: 2px solid #ffe0b3;
  border-radius: 12px;
  padding: 10px;
  margin: 0;
  display: grid;
  gap: 8px;
}

.hide-panel__fieldset legend {
  font-weight: 700;
  color: #6b4b2b;
  padding: 0 6px;
}

.hide-panel__option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5f4d37;
}

.hide-panel__field {
  display: grid;
  gap: 6px;
  color: #5f4d37;
}

.hide-panel__field input {
  width: 100%;
  border: 2px solid #ffd9aa;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fffefb;
}

.hide-panel__field input:disabled {
  opacity: 0.5;
}

.hide-panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hide-panel__status {
  margin: 0;
  color: #7b5f42;
  font-size: 0.9rem;
}

.terminal {
  background: #fff5e3;
  border-radius: var(--radius-md);
  margin-top: 16px;
  border: 2px solid #ffd9aa;
  overflow: hidden;
}

.output {
  padding: 18px 20px;
  max-height: 260px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 245, 227, 0.9));
}

.line {
  white-space: pre-wrap;
}

.line--system {
  color: #d76c02;
  font-weight: 700;
}

.line--prompt {
  color: #8b7c6a;
}

.line--error {
  color: #b91c1c;
}

.line--meta {
  color: #7b6b59;
}

.command-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-top: 2px solid #ffe0b3;
  background: #fff8eb;
}

.command-bar button {
  border: 1px solid #ffd9aa;
  background: #ffffff;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  cursor: pointer;
}

.input {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-top: 2px solid #ffe0b3;
  background: #fffaf2;
}

.prompt {
  color: #d76c02;
  font-weight: 700;
}

#command-input {
  border: 1px solid #ffd4a3;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
}

#command-input:focus {
  outline: 2px solid rgba(255, 159, 28, 0.35);
  border-color: rgba(255, 159, 28, 0.7);
}

/* Minimap styles (adapted from previous theme) */
.minimap-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 30;
}

.minimap-overlay[hidden] {
  display: none;
}

.minimap-modal {
  background: #fffaf0;
  border-radius: 20px;
  border: 2px solid #ffe0b3;
  width: min(980px, 100%);
  max-height: 88vh;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.minimap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #fff1d6;
  border-bottom: 2px solid #ffe0b3;
  gap: 12px;
}

.minimap-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.minimap-stats {
  font-size: 0.9rem;
  color: #7c4a0d;
}

.minimap-close {
  background: #ffd7a3;
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 1.2rem;
  cursor: pointer;
}

.minimap-container {
  flex: 1;
  background: #fffdf7;
  overflow: auto;
}

#minimap-svg {
  width: 100%;
  min-height: 360px;
}

.minimap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
  background: #fff1d6;
  border-top: 2px solid #ffe0b3;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #7c4a0d;
}

.legend-item::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-seed::before {
  background: #c38e2f;
}

.legend-correct::before {
  background: #20c997;
}

.legend-incorrect::before {
  background: #ff6b6b;
}

.legend-viewed::before {
  background: #ffbf69;
}

.legend-unseen::before {
  background: #cbd5e1;
}

@media (max-width: 720px) {
  .game {
    gap: 18px;
    padding: 18px 12px calc(84px + env(safe-area-inset-bottom));
  }

  .game__header {
    gap: 10px;
  }

  .game__meta {
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
  }

  .status,
  .daily-status {
    white-space: normal;
    font-size: 0.8rem;
    padding: 8px 10px;
    min-width: 0;
    flex: 1 1 180px;
  }

  .parent-toggle,
  .feedback-toggle {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.86rem;
  }

  .card {
    padding: 18px;
  }

  .meaning,
  .related,
  .catalog,
  .zones {
    padding: 14px;
  }

  .action-panel {
    gap: 10px;
  }

  .action {
    min-height: 58px;
    font-size: 1rem;
  }

  .quiz {
    padding: 14px;
  }

  .flow-guide {
    padding: 8px 10px;
  }

  .flow-guide__step {
    font-size: 0.76rem;
  }

  .flow-guide__next {
    font-size: 0.84rem;
  }

  .flow-guide__cheer {
    font-size: 0.8rem;
  }

  .flow-guide__cta {
    min-height: 50px;
    font-size: 0.92rem;
  }

  .quiz__options {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .quiz-option {
    padding: 12px 13px;
    min-height: 60px;
  }

  .quiz-target__controls {
    grid-template-columns: 1fr;
  }

  .quiz-target__button {
    width: 100%;
  }

  .quiz-target__chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .quiz-target__suggestion {
    width: 100%;
    min-height: 48px;
    font-size: 0.92rem;
    padding: 8px 11px;
  }

  .quiz__result {
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .quiz__answer-detail {
    padding: 9px 10px;
  }

  .review {
    margin-top: 10px;
    padding: 10px;
  }

  .review__buttons {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .review__btn {
    min-height: 54px;
    font-size: 0.94rem;
  }

  .related-chip {
    width: 100%;
    justify-content: flex-start;
  }

  .action-row {
    display: none;
  }
}

@media (max-width: 900px) {
  .action-row {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@keyframes popIn {
  from {
    transform: scale(0.98) translateY(6px);
    opacity: 0.6;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(12px);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
