:root {
  /* 화면 크기 배율: 휴대폰 1, 태블릿에서 키움 (아래 태블릿 부분 참고) */
  --k: 1;
  --bg: #fbf8f2;
  --card: #f6f2ea;
  --tile: #f8f6f1;
  --line: #ebe4d6;
  --ink: #5e4f3c;
  --muted: #b3a58f;
  --accent: #5fb97f;
  --red: #9b4d4d;
  --gold: #c4a676;
  --orange: #e3a25a;
  --good-bg: #e3f3e6;
  --good: #3f8a55;
  --bad-bg: #f8e3df;
  --bad: #c0564a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Jua', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation;
}
button:disabled { cursor: default; }

#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 16px 16px 40px;
}

/* ---------- 홈 ---------- */
.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
}
.home-top h1 { margin: 0; font-size: 34px; font-weight: 400; }
.sub { margin: 6px 0 24px; color: var(--muted); font-size: 20px; }

.level-label { margin-bottom: 8px; color: #8a7a62; font-size: 18px; }
.level-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 24px;
  padding: 6px;
  border-radius: 22px;
  background: var(--card);
}
.seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 4px;
  border-radius: 16px;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.seg.on { background: #fff; color: var(--ink); box-shadow: 0 2px 0 var(--line); }
.seg-name { font-size: 21px; }

/* ---------- 오늘의 학습 ---------- */
.daily-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin-bottom: 28px;
  padding: 20px;
  text-align: left;
  border: 3px solid var(--gold);
  border-radius: 28px;
  background: linear-gradient(160deg, #fff8e8, #fdf0d8);
  transition: transform .12s;
}
.daily-card:active { transform: scale(.98); }
.daily-card.finished { border-color: var(--accent); background: linear-gradient(160deg, #f1faf2, #e3f3e6); }
.daily-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.daily-tag { font-size: 26px; }
.daily-date { color: #8a7a62; font-size: 17px; }
.daily-games { display: flex; flex-wrap: wrap; gap: 8px; }
.daily-chip { padding: 6px 12px; border-radius: 999px; background: var(--c); font-size: 16px; }
.daily-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daily-info { color: #8a7a62; font-size: 17px; }
.daily-streak { color: var(--orange); }
.daily-go {
  flex: none;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 19px;
}
.daily-card.finished .daily-go { background: var(--good); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
}
.wk.today { background: rgba(255, 255, 255, .7); color: var(--ink); }
.wk-mark { font-size: 18px; line-height: 1.2; }

.round-chip {
  align-self: center;
  width: fit-content;
  margin: 18px auto -14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--c, var(--card));
  font-size: 18px;
}
.rgame { margin-left: 10px; font-size: 18px; }

.game-list { display: flex; flex-direction: column; gap: 14px; }
.game-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px;
  text-align: left;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 24px;
  transition: transform .12s;
}
.game-card:active { transform: scale(.97); }
.gc-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: var(--c);
  font-size: 38px;
}
.gc-body { flex: 1; min-width: 0; }
.gc-title { font-size: 24px; }
.gc-desc { margin-top: 2px; color: var(--muted); font-size: 17px; }
.gc-skill {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--card);
  font-size: 14px;
}
.gc-best { flex: none; color: var(--accent); font-size: 17px; }

.parent-note {
  margin-top: 28px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--card);
  color: #8a7a62;
  font-size: 16px;
  line-height: 1.6;
}

.pill-btn {
  padding: 8px 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 17px;
}

/* ---------- 게임 상단 ---------- */
.topbar { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  flex: none;
  width: 52px;
  height: 52px;
  border: 2px solid var(--line);
  border-radius: 16px;
  font-size: 24px;
  color: var(--muted);
}
.counter { flex: none; color: var(--muted); font-size: 24px; }
.bar { flex: 1; height: 14px; border-radius: 999px; background: #efe9df; overflow: hidden; }
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7aa7d9, var(--accent));
  transition: width .3s;
}
.score { flex: none; color: var(--accent); font-size: 26px; }

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding-top: 24px;
}

.prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 26px;
  text-align: center;
}
.speak-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card);
  font-size: 20px;
}

.btn-main {
  width: 100%;
  max-width: 420px;
  padding: 22px;
  border: 3px solid var(--gold);
  border-radius: 30px;
  background: #faf6ee;
  color: #6b5435;
  font-size: 28px;
  transition: transform .12s, opacity .2s;
}
.btn-main:active:not(:disabled) { transform: scale(.97); }
.btn-main:disabled { opacity: .4; }
.btn-main.alt { border-color: var(--line); background: #fff; }

/* ---------- 모양 기억하기 ---------- */
.mgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 7px;
  border: 3px solid #d8cfc0;
  border-radius: 14px;
  background: #e7e0d4;
}
.mgrid.big { width: min(88vw, calc(360px * var(--k))); gap: 8px; padding: 9px; border-radius: 18px; }
.mgrid.mini { width: 120px; }
.mgrid.mid { width: min(44vw, calc(210px * var(--k))); gap: 6px; padding: 7px; border-radius: 16px; }
.mgrid.mid .mcell { border-radius: 8px; }
.mcell {
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--tile);
  transition: background .15s, transform .1s;
}
.mgrid.big .mcell { border-radius: 10px; }
.mcell.on { background: var(--red); }
.mcell:active:not(:disabled) { transform: scale(.92); }

.timer { width: min(88vw, calc(360px * var(--k))); height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.timer-fill { width: 100%; height: 100%; background: var(--orange); }
.timer.run .timer-fill { animation: shrink linear forwards; }
@keyframes shrink { from { width: 100%; } to { width: 0; } }

/* ---------- 선 따라 긋기 ---------- */
.dl-board { display: block; background: #fff; border-radius: 16px; }
.dl-board.mid { width: min(43vw, calc(220px * var(--k))); }
.dl-board.mini { width: 130px; }
.dl-frame { fill: none; stroke: #3d3a36; stroke-width: 3; }
.dl-point { fill: #1f1d1b; }
.dl-board.drawable { touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.dl-dot .dl-point { transform-box: fill-box; transform-origin: center; transition: transform .12s, fill .12s; }
.dl-dot.sel .dl-point { fill: var(--orange); transform: scale(1.7); }
.dl-line { stroke-width: 7; stroke-linecap: round; }
.dl-line.orig { stroke: #c9534a; }
.dl-line.mine { stroke: #4f5b8a; }
path.dl-line { fill: none; stroke-linejoin: round; }
.dl-line.live { stroke: #4f5b8a; opacity: .65; }
.draw-tip { margin-top: -12px; color: var(--muted); font-size: 17px; text-align: center; }
.btn-row { display: flex; gap: 12px; width: 100%; max-width: 420px; }
.btn-row .btn-main { flex: 1; padding: 18px; font-size: 24px; }
.btn-row .btn-main.alt { flex: 0 0 42%; white-space: nowrap; font-size: 21px; }

/* ---------- 규칙 찾기 ---------- */
.pgroups { display: grid; grid-template-columns: repeat(2, auto); gap: 14px; justify-content: center; }
.pgroup {
  display: flex;
  gap: 8px;
  padding: 10px;
  border: 2px dashed #e6dcc8;
  border-radius: 20px;
}
.tile {
  display: grid;
  place-items: center;
  width: var(--t, 64px);
  height: var(--t, 64px);
  border: 2px solid #efebe3;
  border-radius: calc(var(--t, 64px) * .26);
  background: var(--tile);
  font-size: calc(var(--t, 64px) * .78);
  line-height: 1;
}
.tile.blank { border: 3px dashed #d9b07c; background: #fdf3e8; color: var(--orange); }
.tile.good { border: 3px solid var(--good); background: var(--good-bg); }
.tile.bad { border: 3px solid var(--bad); background: var(--bad-bg); }
.tile.pop { animation: pop .35s; }

.choice-label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  margin-bottom: -12px;
  color: #8a7a62;
  font-size: 21px;
  white-space: nowrap;
}
.choice-label::before,
.choice-label::after { content: ''; flex: 1; border-top: 2px dashed var(--line); }

.choices { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.choice { --t: var(--choice-t, clamp(calc(80px * var(--k)), 24vw, calc(108px * var(--k)))); transition: transform .12s, opacity .2s; }
.choice.used { opacity: 0; pointer-events: none; }
.choice:active { transform: scale(.92); }
.choices .choice { animation: pop .3s backwards; }
.choices .choice:nth-child(2) { animation-delay: .06s; }
.choices .choice:nth-child(3) { animation-delay: .12s; }

/* ---------- 몇 개일까 ---------- */
.count-board {
  position: relative;
  width: min(88vw, 60vh, calc(420px * var(--k)));
  aspect-ratio: 4 / 3;
  border: 2px solid var(--line);
  border-radius: 26px;
  background: var(--card);
}
.count-item {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: clamp(calc(56px * var(--k)), 17vw, calc(80px * var(--k)));
  line-height: 1;
}
.count-item > span { display: block; animation: pop .35s backwards; }

.num-choices { display: flex; gap: 18px; justify-content: center; }
.num-btn {
  width: min(27vw, calc(100px * var(--k)));
  height: min(27vw, calc(100px * var(--k)));
  border: 3px solid var(--gold);
  border-radius: 28px;
  background: #faf6ee;
  font-size: min(14vw, calc(54px * var(--k)));
  transition: transform .12s;
}
.num-btn:active { transform: scale(.92); }
.num-btn.good { border-color: var(--good); background: var(--good-bg); }
.num-btn.bad { border-color: var(--bad); background: var(--bad-bg); }

/* ---------- 다른 하나 찾기 ---------- */
.ogrid { display: grid; gap: 12px; width: min(90vw, calc(420px * var(--k))); }
.otile {
  aspect-ratio: 1;
  border: 2px solid #efebe3;
  border-radius: 22%;
  background: var(--tile);
  line-height: 1;
  transition: transform .12s;
  animation: pop .3s backwards;
}
.otile:active { transform: scale(.92); }
.otile.good { border: 3px solid var(--good); background: var(--good-bg); }
.otile.bad { border: 3px solid var(--bad); background: var(--bad-bg); }
.ogrid.mini { width: 140px; gap: 5px; }
.ogrid.mini .otile { animation: none; border-radius: 10px; }

/* ---------- 짝 맞추기 ---------- */
.card-grid { display: grid; gap: 10px; width: min(90vw, calc(420px * var(--k))); }
.card {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid #c9b6e3;
  border-radius: 18px;
  background: linear-gradient(135deg, #d9c9ee, #bfa9dd);
  line-height: 1;
  transition: background .2s, transform .12s;
}
.card::before {
  content: '★';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .6em;
  opacity: .7;
}
.card > span { display: block; opacity: 0; transform: scale(.3); transition: opacity .2s, transform .2s; }
.card.open { border-color: #efebe3; background: var(--tile); }
.card.open::before { opacity: 0; }
.card.open > span { opacity: 1; transform: none; }
.card.matched { border: 3px solid var(--good); background: var(--good-bg); }
.card:active:not(.open) { transform: scale(.94); }

/* ---------- 그림자 찾기 ---------- */
.shadow { display: block; filter: brightness(0); opacity: .78; }
.shadow-target { --t: clamp(calc(150px * var(--k)), 46vw, calc(200px * var(--k))); background: #fff; animation: pop .35s; }

/* ---------- 순서 맞추기 ---------- */
.order-slots { display: flex; gap: 10px; justify-content: center; }
.order-slots .slot { font-size: calc(var(--t) * .36); }
.order-slots .slot.filled { font-size: calc(var(--t) * .78); border-color: var(--gold); }
.order-face { display: block; line-height: 1; }
.order-review { display: flex; flex-direction: column; gap: 14px; }

/* ---------- 피드백 ---------- */
.feedback {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(251, 248, 242, .55);
  backdrop-filter: blur(2px);
  pointer-events: all;
}
.fb-icon { font-size: 120px; line-height: 1; animation: pop .4s; }
.fb-text { font-size: 34px; animation: pop .4s .05s backwards; }
.feedback.good .fb-text { color: var(--good); }
.feedback.bad .fb-text { color: var(--orange); }
.feedback.pass .fb-text { color: var(--muted); }

@keyframes pop {
  0% { transform: scale(.4); opacity: 0; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

/* ---------- 결과 ---------- */
.result-hero {
  margin-top: 16px;
  padding: 28px 20px;
  border-radius: 30px;
  background: #fff;
  border: 2px solid var(--line);
  text-align: center;
}
.result-level { margin-bottom: 10px; color: var(--muted); font-size: 18px; }
.stars { display: flex; justify-content: center; gap: 8px; font-size: 54px; }
.star { animation: pop .4s backwards; }
.star:nth-child(2) { animation-delay: .15s; }
.star:nth-child(3) { animation-delay: .3s; }
.star.off { filter: grayscale(1); opacity: .25; }
.result-title { margin: 14px 0 4px; font-size: 32px; }
.result-score { color: var(--accent); font-size: 26px; }
.result-actions { display: flex; gap: 12px; margin-top: 22px; }
.result-actions .btn-main { padding: 16px; font-size: 22px; }

.records { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.rcard {
  padding: 18px 20px 24px;
  border: 2px solid var(--line);
  border-radius: 28px;
  background: var(--card);
}
.rcard-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rnum { color: #8a7a62; font-size: 26px; }
.badge { padding: 6px 16px; border-radius: 999px; font-size: 20px; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.pass { background: #ece8e1; color: var(--muted); }

.compare { display: flex; justify-content: center; gap: 28px; }
.compare-col { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #8a7a62; font-size: 20px; }
.review-note { margin-top: 12px; text-align: center; color: #8a7a62; font-size: 19px; }
.review-items { text-align: center; font-size: 30px; letter-spacing: 2px; word-break: break-all; }
.review-center { display: flex; justify-content: center; }

/* ---------- 틀렸을 때 다시 해 보기 ---------- */
/* .choices .choice의 등장 애니메이션보다 뒤에 두어서 덮어씀 */
.stage .hint {
  position: relative;
  z-index: 1;
  border-color: var(--orange);
  animation: hint-pulse 1s ease-in-out infinite;
}
.stage .mcell.hint {
  background: #fde9cf;
  outline: 4px dashed var(--orange);
  outline-offset: -4px;
  animation: hint-blink 1s ease-in-out infinite;
}
.stage .tried { opacity: .3; }
@keyframes hint-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(227, 162, 90, .9); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(227, 162, 90, .3); }
}
@keyframes hint-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
.dl-line.hint { stroke: var(--orange); stroke-dasharray: 4 14; opacity: .9; animation: hint-blink 1s ease-in-out infinite; }
.badge.retry { background: #fdeccf; color: #b7792f; }

/* ---------- 이름 듣고 찾기 · 기분 알기 ---------- */
.review-word { max-width: 150px; text-align: center; color: var(--ink); font-size: 22px; line-height: 1.4; }
.situation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(88vw, calc(380px * var(--k)));
  padding: 18px 16px;
  border: 2px solid var(--line);
  border-radius: 26px;
  background: #fff;
  animation: pop .35s;
}
.situation-icon { font-size: clamp(calc(90px * var(--k)), 30vw, calc(130px * var(--k))); line-height: 1; }
.situation-text { font-size: 26px; text-align: center; line-height: 1.4; }

/* ---------- 시각 일정표 (오늘의 학습) ---------- */
.schedule {
  width: 100%;
  max-width: 440px;
  padding: 18px 16px;
  border: 2px solid var(--line);
  border-radius: 28px;
  background: #fff;
}
.schedule-title { margin-bottom: 12px; text-align: center; font-size: 26px; }
.schedule-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.schedule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 3px solid transparent;
  border-radius: 22px;
  background: var(--card);
  transition: opacity .2s;
}
.schedule-item.now { border-color: var(--orange); background: var(--c); animation: pop .4s; }
.schedule-item.done { opacity: .45; }
.schedule-item.later { opacity: .8; }
.schedule-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  font-size: 20px;
}
.schedule-item.done .schedule-num { background: var(--good); color: #fff; }
.schedule-item.now .schedule-num { background: var(--orange); color: #fff; }
.schedule-icon { flex: none; font-size: 46px; line-height: 1; }
.schedule-name { flex: 1; display: flex; flex-direction: column; font-size: 22px; }
.schedule-name small { color: #8a7a62; font-size: 15px; }
.schedule-state { flex: none; color: #8a7a62; font-size: 16px; }
.schedule-item.now .schedule-state { color: var(--ink); }

.schedule-strip { display: flex; justify-content: center; gap: 8px; margin: 14px 0 -10px; }
.strip-step {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  min-width: 40px;
  padding: 0 10px;
  justify-content: center;
  border-radius: 999px;
  background: var(--card);
  font-size: 22px;
}
.strip-step.now { border: 2px solid var(--orange); background: var(--c); }
.strip-step.done { background: var(--good-bg); color: var(--good); font-size: 18px; }
.strip-step.later { opacity: .55; }
.strip-name { font-size: 16px; }

/* ---------- 생활 순서: 그림 아래 글자 ---------- */
.tile.captioned { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tile.captioned .order-face { font-size: calc(var(--t) * .5); }
.order-caption { color: var(--ink); font-size: clamp(calc(12px * var(--k)), 3.6vw, calc(15px * var(--k))); line-height: 1.15; white-space: nowrap; }

/* ---------- 아래 메뉴 (오늘 / 놀이 / 기록 / 설정) ---------- */
.screen.home { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.tab-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  max-width: 560px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  border-top: 2px solid var(--line);
  background: rgba(255, 255, 255, .96);
  transform: translateX(-50%);
}
.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  border-radius: 16px;
  color: var(--muted);
  font-size: 16px;
}
.tab-icon { font-size: 26px; line-height: 1; filter: grayscale(.7); opacity: .7; }
.tab-btn.on { background: var(--card); color: var(--ink); }
.tab-btn.on .tab-icon { filter: none; opacity: 1; }

.more-games {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 18px 20px;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: #fff;
  font-size: 21px;
}

/* ---------- 놀이 탭: 영역 ---------- */
.cat-tabs {
  display: flex;
  gap: 8px;
  margin: 0 -16px 18px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: none;
  padding: 10px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #8a7a62;
  font-size: 18px;
}
.cat-tab.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.cat-section { margin-bottom: 26px; }
.cat-title { margin: 0; font-size: 24px; font-weight: 400; }
.cat-desc { margin: 2px 0 12px; color: var(--muted); font-size: 17px; }

/* ---------- 기록 · 설정 ---------- */
.panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 24px;
  background: #fff;
}
.panel-title { margin: 0 0 12px; font-size: 21px; font-weight: 400; }
.rec-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rec-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--card);
  font-size: 18px;
}
.rec-list li > span:first-child { flex: 1; }
.rec-meta { color: #8a7a62; font-size: 15px; }
.rec-list b { font-weight: 400; color: var(--accent); }
.empty { margin: 0; color: var(--muted); font-size: 17px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.setting-name { margin-bottom: 8px; font-size: 20px; }
.setting-row .setting-name { margin-bottom: 0; }
.setting-desc { color: var(--muted); font-size: 15px; }
.switch {
  flex: none;
  min-width: 72px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--line);
  color: #8a7a62;
  font-size: 18px;
}
.switch.on { background: var(--accent); color: #fff; }
.guide-list { margin: 0; padding-left: 20px; color: #6f604b; font-size: 17px; line-height: 1.6; }
.guide-list li + li { margin-top: 6px; }

/* ---------- 기록 자세히 ---------- */
/* 결과 색: 처음에 맞힘 / 다시 해서 맞음 / 패스 (색약 구분 검사 통과, 숫자·범례 글자를 함께 표시) */
:root { --o-first: #3f8f5a; --o-retry: #e0913a; --o-pass: #8c8577; }
.range-seg { grid-template-columns: repeat(2, 1fr); }
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 6px;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.stat-tile b { font-weight: 400; font-size: 28px; color: var(--ink); }
.stat-tile span { color: #8a7a62; font-size: 15px; }

.alerts { display: flex; flex-direction: column; gap: 10px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; }
.alert.hard { background: #fdf1e2; }
.alert.good { background: var(--good-bg); }
.alert-icon { flex: none; font-size: 30px; }
.alert-body { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 15px; color: #6f604b; }
.alert-body b { font-weight: 400; font-size: 19px; color: var(--ink); }
.alert-btn { flex: none; padding: 10px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 16px; }

.obar-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; color: #6f604b; font-size: 15px; }
.obar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.swatch.first, .obar-seg.first { background: var(--o-first); }
.swatch.retry, .obar-seg.retry { background: var(--o-retry); }
.swatch.pass, .obar-seg.pass { background: var(--o-pass); }
.obar-list { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.obar-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 18px; }
.obar-num { flex: none; color: #6f604b; font-size: 15px; }
.obar { display: flex; gap: 2px; height: 16px; border-radius: 4px; overflow: hidden; background: var(--card); }
.obar-seg { min-width: 6px; }
.obar-detail { margin-top: 4px; color: var(--muted); font-size: 13px; }
.not-played { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { text-align: center; color: var(--muted); font-size: 14px; }
.cal-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--card);
  color: #8a7a62;
  font-size: 14px;
}
.cal-cell.blank { background: none; }
.cal-cell.played { background: var(--good-bg); color: var(--good); }
.cal-cell.today { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal-mark { font-size: 13px; line-height: 1; }
.cal-legend { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- 소개 · 사용 방법 ---------- */
.panel .more-games + .more-games { margin-top: 10px; }
.guide-top { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.guide-top h1 { margin: 0; font-size: 26px; font-weight: 400; }
.guide .range-seg { margin-bottom: 18px; }
.guide .btn-main { display: block; margin: 8px auto 24px; }
.guide-hero {
  margin-bottom: 18px;
  padding: 24px 20px;
  border-radius: 28px;
  background: linear-gradient(160deg, #fff8e8, #e9f5ec);
  text-align: center;
}
.guide-hero-icon { font-size: 56px; line-height: 1; }
.guide-hero h2 { margin: 10px 0 8px; font-size: 26px; font-weight: 400; }
.guide-hero p { margin: 0; color: #6f604b; font-size: 18px; line-height: 1.65; }
.feature-list, .step-list { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.feature-list li, .step-list li { display: flex; align-items: flex-start; gap: 12px; }
.feature-list li > div, .step-list li > div { display: flex; flex-direction: column; gap: 2px; }
.feature-list b, .step-list b { font-weight: 400; font-size: 19px; color: var(--ink); }
.feature-list span:not(.feature-icon), .step-list li > div span { color: #6f604b; font-size: 16px; line-height: 1.55; }
.feature-icon { flex: none; width: 36px; font-size: 28px; line-height: 1.2; text-align: center; }
.step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
}
.guide-cat + .guide-cat { margin-top: 14px; }
.guide-cat-name { display: flex; flex-direction: column; font-size: 19px; }
.guide-cat-name small { color: var(--muted); font-size: 15px; }
.guide-cat-games { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.guide-cat-games span { padding: 5px 11px; border-radius: 999px; background: var(--c); font-size: 15px; }
.note-panel { background: #fffaf1; }
.guide-p { margin: 0 0 8px; color: #6f604b; font-size: 16px; }

/* ---------- 오늘 탭: 놀이 예시 ---------- */
.pick-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.pick-head h2 { margin: 0; font-size: 22px; font-weight: 400; }
.pick-all { padding: 6px 4px; color: #8a7a62; font-size: 17px; }
.pick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: #fff;
  text-align: left;
  transition: transform .12s;
}
.pick-card:active { transform: scale(.97); }
.pick-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: 18px;
  background: var(--c);
  font-size: 34px;
}
.pick-card b { font-weight: 400; font-size: 19px; color: var(--ink); }
.pick-card span:last-child { color: #8a7a62; font-size: 14px; line-height: 1.4; }

/* ---------- 로고 (쑥쑥이) ---------- */
.home-top h1.logo { flex: 1; min-width: 0; margin: 0; line-height: 0; }
.logo svg { display: block; width: 100%; max-width: 250px; height: auto; }

/* ---------- 쑥쑥이 캐릭터 ---------- */
.mascot { display: inline-block; width: 64px; height: 64px; flex: none; }
.mascot svg { display: block; width: 100%; height: 100%; }
.mascot.bounce { animation: mascot-bounce .6s ease-out; }
@keyframes mascot-bounce {
  0% { transform: translateY(18px) scale(.6); opacity: 0; }
  55% { transform: translateY(-12px) scale(1.05); opacity: 1; }
  80% { transform: translateY(2px) scale(.98); }
  100% { transform: none; }
}
.feedback .fb-icon { animation: none; }
.feedback .mascot { width: calc(150px * var(--k)); height: calc(150px * var(--k)); }
.schedule-title { display: flex; align-items: center; justify-content: center; gap: 10px; }
.schedule-title .mascot { width: 60px; height: 60px; }
.bubble {
  position: relative;
  padding: 8px 14px;
  border-radius: 16px;
  background: var(--card);
  font-size: 21px;
}
.bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  border: 8px solid transparent;
  border-right-color: var(--card);
  border-left: 0;
  transform: translateY(-50%);
}
.result-mascot { display: flex; justify-content: center; margin-bottom: 4px; }
.result-mascot .mascot { width: 110px; height: 110px; }
@media (prefers-reduced-motion: reduce) {
  .mascot.bounce { animation: none; }
}

.sound-test { margin-bottom: 8px; }
.sound-test:disabled { opacity: .45; }
.sound-help { margin: 0 0 16px; line-height: 1.5; }

/* ---------- 태블릿: 여백 줄이고 크게 ---------- */
@media (min-width: 700px) {
  :root { --k: 1.25; }
  #app { max-width: 920px; padding: 24px 32px 40px; }
  .tab-bar { max-width: 920px; }
  .tab-btn { font-size: 18px; }
  .tab-icon { font-size: 30px; }
  .home-top h1 { font-size: 40px; }
  .logo svg { max-width: 320px; }
  .sub { font-size: 22px; }
  .game-list { display: grid; grid-template-columns: repeat(2, 1fr); }
  .pick-grid { grid-template-columns: repeat(4, 1fr); }
  .stage { gap: 26px; padding-top: 28px; }
  .prompt { font-size: 32px; }
  .speak-btn { width: 52px; height: 52px; font-size: 24px; }
  .choice-label { max-width: 620px; font-size: 24px; }
  .choices { gap: 16px; }
  .btn-main, .btn-row { max-width: 560px; }
  .compare { gap: 40px; }
  .fb-text { font-size: 42px; }
  .records { display: grid; grid-template-columns: repeat(2, 1fr); }
}
/* 세로로 긴 태블릿(세로 모드)은 더 크게 */
@media (min-width: 700px) and (min-height: 860px) {
  :root { --k: 1.45; }
}

/* ---------- 어디에 있을까? (공간 개념) ---------- */
.space-scene { width: min(90vw, 52vh, calc(400px * var(--k))); max-width: 100%; padding: 8px; border: 2px solid var(--line); border-radius: 26px; background: #fff; animation: pop .35s; }
.space-scene svg { display: block; width: 100%; height: auto; }
.space-scene.mini { width: 180px; padding: 4px; border-radius: 16px; animation: none; }
.space-review { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tile.choice.place { font-size: calc(var(--t) * .26); }
.place-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; line-height: 1; }
.place-btn b { font-weight: 400; font-size: 1.9em; }

/* ---------- 실사 사진 ---------- */
img.photo { display: block; object-fit: cover; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.tile img.photo { width: 86%; height: 86%; border-radius: 18%; }
.shadow-target img.photo { width: 90%; height: 90%; }
.count-item img.photo { width: 1.15em; height: 1.15em; border-radius: 22%; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.review-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.review-items img.photo { width: 30px; height: 30px; border-radius: 8px; }
.card > span:has(img.photo) { display: grid; place-items: center; width: 100%; height: 100%; }
.card img.photo { width: 84%; height: 84%; border-radius: 16%; }
.otile { display: grid; place-items: center; }
.otile img.photo { width: 84%; height: 84%; border-radius: 18%; }
.order-face img.photo { width: calc(var(--t) * .8); height: calc(var(--t) * .8); border-radius: 18%; }
.answer-note { display: flex; align-items: center; justify-content: center; gap: 6px; }
.answer-note img.photo { width: 36px; height: 36px; border-radius: 8px; }

/* ---------- 세로가 짧은 휴대폰 (아이폰 SE 등): 간격을 줄여 한 화면에 들어오게 ---------- */
@media (max-height: 700px) {
  .stage { gap: 14px; padding-top: 14px; }
  .prompt { font-size: 22px; }
  .speak-btn { width: 36px; height: 36px; font-size: 18px; }
  .choice-label { margin-bottom: -6px; font-size: 18px; }
  .round-chip { margin: 10px auto -8px; font-size: 16px; }
  .schedule-strip { margin: 10px 0 -6px; }
  .schedule { padding: 12px; }
  .schedule-title { font-size: 21px; }
  .schedule-title .mascot { width: 46px; height: 46px; }
  .bubble { font-size: 18px; padding: 6px 12px; }
  .schedule-list { gap: 6px; }
  .schedule-item { padding: 6px 12px; }
  .schedule-icon { font-size: 34px; }
  .schedule-name { font-size: 19px; }
  .stage > .btn-main { padding: 14px; font-size: 24px; }
}
@media (max-height: 600px) {
  .stage { gap: 10px; padding-top: 8px; }
  .space-scene { width: min(90vw, 46vh); }
  .pgroups { --t: min(30vw, 15vh) !important; }
  .choices .choice { --t: min(var(--choice-t, 80px), 14vh); }
}

/* ---------- 폭이 아주 좁은 휴대폰 (320px 대) ---------- */
@media (max-width: 360px) {
  .daily-top { flex-wrap: wrap; row-gap: 2px; }
  .daily-tag { font-size: 22px; }
  .daily-date { font-size: 15px; }
  .schedule-state { display: none; }
  .schedule-item.now { box-shadow: 0 0 0 2px var(--orange); }
  .strip-step { padding: 0 8px; gap: 4px; font-size: 19px; }
  .strip-name { font-size: 13px; white-space: nowrap; }
  .home-top h1.logo .logo svg, .logo svg { max-width: 200px; }
}

/* ---------- 설정: 목소리 ---------- */
.voice-box { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 2px dashed var(--line); }
.voice-box .setting-name { margin-bottom: 0; }
.voice-select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
}
.voice-label { margin-top: 4px; }
.voice-seg { margin-bottom: 4px; }
.voice-seg .seg { padding: 10px 4px; }
.voice-seg .seg-name { font-size: 18px; }
.voice-box .more-games:disabled { opacity: .45; }

/* ---------- 오늘 탭 위쪽 단순하게 (블록 로고 · 작은 난이도 · 오늘의 학습) ---------- */
.home-top { align-items: center; gap: 10px; }
.logo svg { max-width: 270px; }
.guide-btn { flex: none; padding: 8px 12px; font-size: 15px; }
.level-seg.compact { margin: 6px 0 16px; padding: 4px; border-radius: 18px; }
.level-seg.compact .seg { padding: 8px 4px; border-radius: 14px; }
.level-seg.compact .seg-name { font-size: 18px; }
.daily-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 24px;
  background: #fff;
  text-align: left;
}
.daily-card:active { transform: none; }
.daily-card.finished { border-color: #b9dcc3; background: #f5fbf6; }
.daily-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.daily-tag { font-size: 23px; }
.daily-date { color: var(--muted); font-size: 15px; }
.daily-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.daily-icons { display: flex; gap: 6px; }
.daily-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c);
  font-size: 23px;
}
.daily-info { display: flex; flex-direction: column; align-items: flex-end; color: #8a7a62; font-size: 15px; text-align: right; }
.daily-info small { color: var(--orange); font-size: 14px; }
.daily-go {
  width: 100%;
  padding: 14px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  font-size: 22px;
  transition: transform .12s;
}
.daily-go:active { transform: scale(.98); }
.daily-card.finished .daily-go { background: var(--good); }
@media (min-width: 700px) {
  .logo svg { max-width: 340px; }
  .daily-icon { width: 52px; height: 52px; font-size: 27px; }
}
.pick-head h2, .pick-all { white-space: nowrap; }
@media (max-width: 360px) {
  .pick-head h2 { font-size: 19px; }
  .pick-all { font-size: 14px; }
  .bubble { font-size: 16px; white-space: nowrap; }
  .daily-icon { width: 40px; height: 40px; font-size: 21px; }
}

/* 시작하기 버튼: 아이 눈에 밝고 눌러 보고 싶은 노란 장난감 버튼 */
.daily-go {
  background: #ffd76e;
  color: #5b4320;
  box-shadow: 0 5px 0 #e9b44c;
  margin-bottom: 5px;
}
.daily-go:active { transform: translateY(4px); box-shadow: 0 1px 0 #e9b44c; }
.daily-card.finished .daily-go { background: #bfe7c9; color: #2f6e44; box-shadow: 0 5px 0 #8fcfa1; }
.daily-card.finished .daily-go:active { box-shadow: 0 1px 0 #8fcfa1; }

/* 쑥쑥이 + 블록 글자 로고: 휴대폰에서도 크게 */
.logo svg { max-width: 300px; }
@media (min-width: 700px) { .logo svg { max-width: 380px; } }
.guide-btn { width: 46px; height: 46px; padding: 0; border-radius: 50%; font-size: 22px; display: grid; place-items: center; }

/* ---------- 손 놀이: 길 따라 그리기 ---------- */
.trace-board {
  position: relative;
  width: min(100%, calc(560px * var(--k)), 62vh);
  aspect-ratio: 3 / 2;
  margin: 0 auto;
  border-radius: 24px;
  background: #f1f8ec;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.trace-board svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.trace-board path, .trace-board polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.trace-edge { stroke: #d9b07c; }
.trace-road { stroke: #fbefd9; }
.trace-mid { stroke: #e6cfa6; stroke-width: 3; stroke-dasharray: 6 9; }
.trace-trail { stroke: #8fd19e; }
.trace-mover, .trace-goal {
  position: absolute;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  font-size: min(11vw, 7vh, calc(58px * var(--k)));
  line-height: 1;
  pointer-events: none;
}
.trace-goal img.photo { width: 1.25em; height: 1.25em; border-radius: 22%; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.trace-goal.reached { filter: drop-shadow(0 0 10px #ffd76e); }
.trace-mover { z-index: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
.trace-mover.held { font-size: min(13vw, 8.5vh, calc(68px * var(--k))); }
.trace-mover.wiggle { animation: trace-wiggle 1.2s ease-in-out infinite; }
@keyframes trace-wiggle {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.18); }
}
.trace-board.mini { width: 180px; border-radius: 14px; }
.trace-board.mini .trace-mover, .trace-board.mini .trace-goal { font-size: 20px; }

/* ---------- 손 놀이: 바구니에 쏙 ---------- */
.sort-pieces {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  min-height: var(--t);
  max-width: calc(560px * var(--k));
  margin: 0 auto;
}
.sort-piece { touch-action: none; cursor: grab; transition: box-shadow .15s; }
.sort-piece.dragging { position: relative; z-index: 5; cursor: grabbing; box-shadow: 0 10px 22px rgba(0, 0, 0, .2); transition: none; }
.sort-piece.sel { border: 3px solid var(--orange); background: #fff4e3; }
.sort-piece.used { visibility: hidden; }
.sort-tip { margin: 6px 0 0; }
.baskets { display: grid; gap: 12px; width: 100%; max-width: calc(560px * var(--k)); margin: 0 auto; }
.basket {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: clamp(150px, 26vh, calc(210px * var(--k)));
  padding: 12px 8px;
  border: 3px solid #d9b07c;
  border-radius: 18px 18px 34px 34px;
  background: repeating-linear-gradient(45deg, #f6e2c4 0 10px, #f1d8b2 10px 20px);
}
.basket.over { border-color: var(--good); background: var(--good-bg); }
.basket-label {
  display: grid;
  place-items: center;
  width: clamp(60px, 16vw, calc(80px * var(--k)));
  aspect-ratio: 1;
  border-radius: 16px;
  background: #fff;
}
.basket-label img.photo { width: 86%; height: 86%; border-radius: 18%; }
.basket-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.basket-got img.photo { width: clamp(30px, 8vw, calc(40px * var(--k))); height: clamp(30px, 8vw, calc(40px * var(--k))); border-radius: 8px; }

/* ---------- 공유하기 ---------- */
.share-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 8px;
  padding: 16px 18px;
  border: 2px dashed #e6dcc8;
  border-radius: 22px;
  background: #fffdf8;
}
.share-text { display: flex; flex-direction: column; gap: 2px; }
.share-text b { font-weight: 400; font-size: 18px; }
.share-text span { color: var(--muted); font-size: 14px; }
.share-btn {
  flex: none;
  padding: 12px 16px;
  border-radius: 16px;
  background: #d5e6f6;
  color: #34506b;
  font-size: 17px;
  box-shadow: 0 4px 0 #aac8e6;
}
.share-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #aac8e6; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  text-align: center;
  transform: translateX(-50%);
  animation: pop .3s;
}
@media (max-width: 360px) {
  .share-text b { font-size: 16px; }
  .share-btn { padding: 10px 12px; font-size: 15px; }
}

/* 공유하기: 실선 테두리 · 연분홍 카드 · 분홍 장난감 버튼 */
.share-card {
  justify-content: flex-start;
  border: 2px solid #f7c6d3;
  background: #fff1f5;
}
.share-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  font-size: 26px;
}
.share-text { flex: 1; min-width: 0; }
.share-text b { color: var(--ink); font-size: 19px; }
.share-text span { color: #9b6475; font-size: 15px; }
.share-btn {
  padding: 13px 16px;
  background: #ffc4d4;
  color: #8f2b4b;
  font-size: 18px;
  box-shadow: 0 4px 0 #f29bb3;
}
.share-btn:active { box-shadow: 0 1px 0 #f29bb3; }
@media (max-width: 360px) {
  .share-card { gap: 8px; padding: 14px 12px; }
  .share-icon { width: 38px; height: 38px; font-size: 21px; }
  .share-text b { font-size: 16px; }
  .share-text span { font-size: 13px; }
  .share-btn { padding: 10px 11px; font-size: 15px; }
}
/* 글자가 꺾이지 않게: 위에 그림 · 글, 아래에 큰 공유 버튼 */
.share-card { flex-wrap: wrap; row-gap: 14px; }
.share-btn { width: 100%; padding: 14px; font-size: 20px; }
@media (max-width: 360px) { .share-btn { padding: 12px; font-size: 18px; } }

/* ---------- 게임 놀이: 풍선 터뜨리기 ---------- */
.balloon-field {
  position: relative;
  width: min(100%, calc(520px * var(--k)));
  height: clamp(300px, 52vh, calc(460px * var(--k)));
  margin: 0 auto;
  border-radius: 24px;
  background: linear-gradient(#e3f2fd, #f5fbff);
  overflow: hidden;
}
.balloon {
  position: absolute;
  width: clamp(60px, 20%, calc(104px * var(--k)));
  padding: 0;
  background: none;
  transform: translate(-50%, -50%);
  animation: balloon-bob 2.4s ease-in-out infinite;
}
.balloon svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .12)); }
.balloon.popped { pointer-events: none; animation: balloon-pop .3s forwards; }
.balloon.nope { animation: balloon-nope .4s; }
.stage .balloon.hint { box-shadow: none; border-radius: 50%; animation: balloon-hint 1s ease-in-out infinite; }
@keyframes balloon-bob {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, -56%); }
}
@keyframes balloon-pop {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  60% { transform: translate(-50%, -50%) scale(1.35); opacity: .6; }
  100% { transform: translate(-50%, -50%) scale(.2); opacity: 0; }
}
@keyframes balloon-nope {
  0%, 100% { transform: translate(-50%, -50%) rotate(0); }
  25% { transform: translate(-50%, -50%) rotate(-12deg); }
  75% { transform: translate(-50%, -50%) rotate(12deg); }
}
@keyframes balloon-hint {
  0%, 100% { transform: translate(-50%, -50%) scale(1); filter: drop-shadow(0 0 0 #ffb347); }
  50% { transform: translate(-50%, -50%) scale(1.12); filter: drop-shadow(0 0 10px #ffb347); }
}

/* ---------- 게임 놀이: 숨은 친구 잡기 ---------- */
.mole-count { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; color: #d9b07c; font-size: 28px; }
.mole-field {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 3vw, 22px);
  width: min(100%, calc(520px * var(--k)));
  margin: 0 auto;
  padding: 22px 16px;
  border-radius: 24px;
  background: #e3f0d6;
}
.mole-field.holes-4 { grid-template-columns: repeat(2, 1fr); width: min(100%, calc(400px * var(--k))); }
.mole-field.holes-3 { grid-template-rows: auto; }
.mole-hole {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 50% 50% 22px 22px;
  background: radial-gradient(ellipse at 50% 88%, #6b4f35 0 38%, transparent 39%), #cfe5bd;
}
.mole-friend {
  position: absolute;
  left: 50%;
  bottom: 6%;
  font-size: min(16vw, calc(78px * var(--k)));
  line-height: 1;
  transform: translate(-50%, 150%);
  transition: transform .22s ease-out;
}
.mole-hole.up .mole-friend { transform: translate(-50%, 0); }
.mole-hole.hit .mole-friend { transform: translate(-50%, 0) scale(1.2); filter: drop-shadow(0 0 10px #ffd76e); }
.mole-hole.nope { animation: balloon-nope .4s; }
.mole-hole.nope { animation-name: mole-nope; }
@keyframes mole-nope {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}

/* 공유하기: 파란색 계열로 (실선 테두리 · 큰 버튼은 그대로) */
.share-card { border-color: #b9d5f0; background: #eef6fd; }
.share-text span { color: #5b7a99; }
.share-btn { background: #cfe3f7; color: #2f5478; box-shadow: 0 4px 0 #9fc2e6; }
.share-btn:active { box-shadow: 0 1px 0 #9fc2e6; }

/* ---------- 몸 어디 있지? ---------- */
.body-scene { width: min(100%, calc(340px * var(--k)), 46vh); margin: 0 auto; }
.body-scene.body { width: min(78%, calc(300px * var(--k)), 34vh); }
.body-scene svg { display: block; width: 100%; height: auto; }
.body-scene .bp { cursor: pointer; transform-box: fill-box; transform-origin: center; }
.body-scene .bp.hint { animation: body-hint 1s ease-in-out infinite; }
.body-scene .bp.good { filter: drop-shadow(0 0 6px #3f8a55) drop-shadow(0 0 3px #3f8a55); }
.body-scene .bp.bad { animation: body-nope .4s; }
.body-scene.mini { width: 110px; }
.body-scene.mini.body { width: 80px; }
@keyframes body-hint {
  0%, 100% { filter: drop-shadow(0 0 0 #e3a25a); transform: scale(1); }
  50% { filter: drop-shadow(0 0 8px #e3a25a) drop-shadow(0 0 4px #e3a25a); transform: scale(1.08); }
}
@keyframes body-nope {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

/* ---------- 큰 것, 작은 것 ---------- */
.size-tile { overflow: hidden; }
.size-face { display: grid; place-items: center; width: 100%; height: 100%; transition: transform .2s; }
.size-tile .size-face { font-size: calc(var(--t, 64px) * .72); line-height: 1; }
.size-review { display: flex; justify-content: center; align-items: center; gap: 8px; }

/* ---------- 조각 퍼즐 ---------- */
.puzzle-board {
  display: grid;
  gap: 3px;
  width: var(--p);
  height: var(--p);
  margin: 0 auto;
  padding: 3px;
  border: 3px dashed #d9b07c;
  border-radius: 18px;
  background: #fdf3e8;
}
.puzzle-board.guide { background: linear-gradient(rgba(253, 243, 232, .72), rgba(253, 243, 232, .72)), var(--guide) center / cover; }
.puzzle-board.complete { gap: 0; border-style: solid; border-color: var(--good); }
.puzzle-slot { padding: 0; border: 2px dashed rgba(217, 176, 124, .7); border-radius: 10px; background: transparent; overflow: hidden; }
.puzzle-slot.filled { border: 0; border-radius: 0; }
.puzzle-slot.over { border: 3px solid var(--good); background: rgba(227, 243, 230, .7); }
.puzzle-slot.hint { border: 3px solid var(--orange); animation: hint-blink 1s ease-in-out infinite; }
.puzzle-img { display: block; width: 100%; height: 100%; background-repeat: no-repeat; }
.puzzle-pieces { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.puzzle-piece { padding: 0; border: 3px solid #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 3px 8px rgba(0, 0, 0, .15); touch-action: none; cursor: grab; }
.puzzle-piece.dragging { position: relative; z-index: 5; box-shadow: 0 10px 22px rgba(0, 0, 0, .25); }
.puzzle-piece.sel { border-color: var(--orange); }
.puzzle-piece.used { visibility: hidden; }

/* ---------- 칭찬 스티커판 ---------- */
.sticker-card {
  margin: -10px 0 26px;
  padding: 16px 18px;
  border: 2px solid #f5dfa6;
  border-radius: 22px;
  background: #fffaeb;
}
.sticker-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sticker-grow { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; background: #fff; font-size: 28px; }
.sticker-text { display: flex; flex-direction: column; }
.sticker-text b { font-weight: 400; font-size: 19px; }
.sticker-text span { color: #9a7b3c; font-size: 15px; }
.sticker-board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sticker {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 2px dashed #ecd8a4;
  border-radius: 50%;
  background: #fff;
  font-size: min(7vw, calc(30px * var(--k)));
}
.sticker.on { border: 2px solid #f5c94c; background: #fff3c4; }
.result-sticker { margin-top: 10px; padding: 10px 16px; border-radius: 16px; background: #fff3c4; color: #7a5a17; font-size: 18px; }

/* ---------- 우리 아이 난이도 알아보기 ---------- */
.level-test-link {
  display: block;
  width: 100%;
  margin: -8px 0 18px;
  padding: 10px 14px;
  border: 2px solid #d9cbf0;
  border-radius: 16px;
  background: #f4effc;
  color: #5b4a86;
  font-size: 16px;
  text-align: center;
}
.panel .level-test-link { margin: 12px 0 0; }
.test-notes { margin: 14px 0 4px; padding: 0 0 0 20px; color: #6b5d48; font-size: 16px; line-height: 1.7; text-align: left; }
.test-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 12px 0 6px; color: var(--muted); font-size: 16px; }
.test-pick b { padding: 6px 26px; border-radius: 18px; background: #fff3c4; color: #7a5a17; font-weight: 400; font-size: 34px; }
.test-bars { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 360px; margin: 10px auto 4px; }
.test-bar { display: grid; grid-template-columns: 76px 1fr 44px; align-items: center; gap: 8px; font-size: 15px; }
.test-bar-name { color: var(--muted); text-align: left; }
.test-dots { display: flex; gap: 6px; }
.test-dots i { width: 18px; height: 18px; border-radius: 50%; background: #ece6da; }
.test-dots i.on { background: #8fd19e; }
.test-bar-num { text-align: right; }
.test-why { margin: 8px 0 0; font-size: 16px; line-height: 1.6; }
.test-why.muted { color: var(--muted); font-size: 14px; }
.result-actions.stack { flex-direction: column; align-items: stretch; width: 100%; max-width: 360px; margin-left: auto; margin-right: auto; }
.result-actions.stack .btn-main { width: 100%; }

/* 메뉴 5칸 (말하기 추가) */
.tab-bar { grid-template-columns: repeat(5, 1fr); padding-left: 4px; padding-right: 4px; }
.tab-btn { font-size: 14px; }
.tab-icon { font-size: 24px; }

/* ---------- 말하기 카드 ---------- */
.talk-said {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 72px;
  margin-bottom: 14px;
  padding: 10px 16px;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: #fff;
}
.talk-said-hint { color: var(--muted); font-size: 16px; }
.talk-said-icon { font-size: 40px; line-height: 1; }
.talk-said b { font-weight: 400; font-size: 26px; }
.talk-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.talk-group h2 { margin: 6px 0 8px; color: var(--muted); font-weight: 400; font-size: 17px; }
.talk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.talk-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 108px;
  padding: 10px 6px;
  border: 2px solid rgba(0, 0, 0, .04);
  border-radius: 20px;
  background: var(--c);
  transition: transform .12s;
}
.talk-card:active { transform: scale(.95); }
.talk-card.big { flex-direction: row; min-height: 76px; gap: 10px; }
.talk-card.big .talk-text { font-size: 24px; }
.talk-icon { font-size: 40px; line-height: 1; }
.talk-text { font-size: 16px; line-height: 1.25; word-break: keep-all; }
@media (min-width: 700px) {
  .talk-grid { grid-template-columns: repeat(5, 1fr); }
  .talk-card { min-height: 130px; }
  .talk-icon { font-size: 48px; }
}

/* ---------- 무엇에 쓰는 걸까? ---------- */
.review-items .use-answer { padding: 0 4px; border-radius: 8px; background: var(--good-bg); }

/* ---------- 쑥쑥이 따라 하기 ---------- */
.imitate-show { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 10px; }
.imitate-mascot { width: 90px; }
.imitate-act { font-size: min(32vw, 34vh, calc(150px * var(--k))); line-height: 1.1; }
.imitate-name { font-size: 22px; }
.imitate-name span { color: var(--muted); }
.imitate-name span.on { color: var(--ink); }
.imitate-tip { margin-bottom: 12px; color: var(--muted); font-size: 15px; text-align: center; }
.anim-clap { animation: im-clap .5s ease-in-out infinite; }
.anim-wave { animation: im-wave .8s ease-in-out infinite; transform-origin: 70% 90%; }
.anim-up { animation: im-up .9s ease-in-out infinite; }
.anim-bob { animation: im-bob 1s ease-in-out infinite; }
.anim-stomp { animation: im-stomp .6s ease-in infinite; }
.anim-poke { animation: im-poke .8s ease-in-out infinite; }
.anim-beat { animation: im-beat .8s ease-in-out infinite; }
@keyframes im-clap { 0%, 100% { transform: scale(1); } 50% { transform: scale(.82); } }
@keyframes im-wave { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(16deg); } }
@keyframes im-up { 0%, 100% { transform: translateY(10px); } 50% { transform: translateY(-14px); } }
@keyframes im-bob { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes im-stomp { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-18px); } 60% { transform: translateY(0) scaleY(.92); } }
@keyframes im-poke { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(10px) scale(1.06); } }
@keyframes im-beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.15); } 60% { transform: scale(.98); } }

/* ---------- 차례대로 눌러요 ---------- */
.steps-tile { position: relative; }
.steps-num:empty { display: none; }
.steps-num {
  position: absolute;
  top: -8px;
  left: -8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--good);
  color: #fff;
  font-size: 18px;
}

/* ---------- 생활 도우미 ---------- */
.helper-card { margin: 26px 0 0; }
.helper-card h2 { margin: 0 0 10px; font-weight: 400; font-size: 21px; }
.helper-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.helper-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  border: 2px solid rgba(0, 0, 0, .04);
  border-radius: 20px;
  background: var(--c);
}
.helper-btn span { font-size: 36px; line-height: 1; }
.helper-btn b { font-weight: 400; font-size: 16px; }
.tool .sub { margin-top: -6px; }
.chip { padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; background: #fff; font-size: 16px; }
.chip.on { border-color: var(--good); background: var(--good-bg); color: var(--good); }

/* 그림 이야기 */
.story-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.story-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px; border: 2px solid var(--line); border-radius: 22px; background: #fff; }
.story-item span { font-size: 48px; line-height: 1; }
.story-item b { font-weight: 400; font-size: 18px; }
.story-page { position: relative; display: flex; flex-direction: column; align-items: center; padding: 24px 18px 20px; border: 2px solid var(--line); border-radius: 26px; background: #fffaf0; }
.story-scene { font-size: min(36vw, 30vh, calc(170px * var(--k))); line-height: 1.15; }
.story-text { margin: 14px 0 0; font-size: 24px; line-height: 1.5; text-align: center; word-break: keep-all; }
.story-page .speak-btn { position: absolute; top: 12px; right: 12px; }
.story-dots { display: flex; justify-content: center; gap: 8px; margin: 16px 0; }
.story-dots i { width: 12px; height: 12px; border-radius: 50%; background: #e6dcc8; }
.story-dots i.on { background: var(--orange); }

/* 먼저 · 다음 */
.ft-boards { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 14px; }
.ft-arrow { color: var(--muted); font-size: 28px; }
.ft-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 16px; border: 3px solid var(--line); border-radius: 22px; background: #fff; }
.ft-box.sel { border-color: var(--orange); border-style: dashed; }
.ft-box.done { background: var(--good-bg); border-color: #b9dcc3; }
.ft-box.now { border-color: var(--good); animation: hint-pulse 1.2s ease-in-out infinite; }
.ft-label { color: var(--muted); font-size: 18px; }
.ft-icon { font-size: min(22vw, calc(96px * var(--k))); line-height: 1.1; }
.ft-box b { font-weight: 400; font-size: 20px; }
.ft-timer {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-top: 6px;
  border-radius: 50%;
  background: conic-gradient(var(--orange) var(--p, 100%), #f1ede4 0);
  font-size: 15px;
}
.ft-help { margin: 0 0 8px; color: var(--muted); font-size: 15px; text-align: center; }
.ft-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.ft-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border: 2px solid var(--line); border-radius: 16px; background: #fff; }
.ft-item span { font-size: 30px; line-height: 1.1; }
.ft-item small { font-size: 13px; }
.ft-item.on { border-color: var(--orange); background: #fff4e3; }
.ft-times { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-bottom: 16px; font-size: 15px; color: var(--muted); }

/* 숨 쉬기 */
.breath-stage { display: grid; place-items: center; height: min(52vw, 34vh, 300px); }
.breath-ball { font-size: 90px; line-height: 1; transition: transform 4s ease-in-out; }
.breath-ball.grow { transform: scale(2.1); }
.breath-ball.shrink { transform: scale(.9); }
.breath-word { min-height: 36px; margin: 10px 0; font-size: 24px; text-align: center; }
.breath-count { display: flex; justify-content: center; gap: 10px; margin-bottom: 16px; }
.breath-count i { width: 16px; height: 16px; border-radius: 50%; background: #e6dcc8; }
.breath-count i.on { background: #8fd19e; }
.story-group h2 { margin: 14px 0 8px; color: var(--muted); font-weight: 400; font-size: 17px; }
.story-list { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.story-item { padding: 14px 4px; border-radius: 20px; }
.story-item span { font-size: 40px; }
.story-item b { font-size: 15px; word-break: keep-all; }
@media (min-width: 700px) { .story-list { grid-template-columns: repeat(4, 1fr); } }
/* 숨 쉬기 풍선: 큰 글자를 줄였다 키워서 커질 때 잘리지 않게 */
.breath-stage { height: auto; min-height: min(56vw, 34vh, 260px); padding: 8px 0; overflow: visible; }
.breath-ball { font-size: min(50vw, 30vh, 220px); line-height: 1.25; padding: .05em .1em; transform: scale(.5); transform-origin: center; }
.breath-ball.grow { transform: scale(1); }
.breath-ball.shrink { transform: scale(.45); }

/* ---------- 의견 게시판 ---------- */
.feedback-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 18px;
  padding: 14px 16px;
  border: 2px solid #f3d9b0;
  border-radius: 22px;
  background: #fff7ea;
  text-align: left;
}
.feedback-card-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: #fff; font-size: 24px; }
.feedback-card-text { display: flex; flex: 1; flex-direction: column; gap: 2px; }
.feedback-card-text b { font-weight: 400; font-size: 18px; }
.feedback-card-text small { color: #9a7b3c; font-size: 14px; }
.feedback-card-go { color: var(--muted); font-size: 24px; }
.fb-form { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 2px solid var(--line); border-radius: 22px; background: #fff; }
.fb-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-kinds .chip { font-size: 15px; padding: 7px 12px; }
.fb-message, .fb-nick {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  box-sizing: border-box;
}
.fb-message { resize: vertical; min-height: 110px; line-height: 1.5; }
.fb-message:focus, .fb-nick:focus { outline: none; border-color: var(--orange); }
.fb-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.fb-status:empty { display: none; }
.fb-status { margin: 0; color: #c0504d; font-size: 15px; }
.fb-title { margin: 24px 0 10px; font-weight: 400; font-size: 21px; }
.fb-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 24px; }
.fb-post { padding: 14px 16px; border: 2px solid var(--line); border-radius: 20px; background: #fff; }
.fb-post-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.fb-kind { padding: 3px 10px; border-radius: 999px; background: #fff3c4; font-size: 13px; }
.fb-kind.issue { background: #fde2e2; }
.fb-kind.etc { background: #e4dbf3; }
.fb-who { color: var(--muted); font-size: 14px; }
.fb-text { margin: 0; font-size: 17px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.fb-reply { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--good-bg); }
.fb-reply b { color: var(--good); font-weight: 400; font-size: 15px; }
.fb-reply p { margin: 4px 0 0; font-size: 16px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

/* ---------- 듣고 고르는 놀이 (소리 · 동작 · 색깔 모양 · 숫자) ---------- */
.choice-review { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; }
.sound-play { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto 10px; padding: 10px 20px; border: 2px solid #f3d9b0; border-radius: 999px; background: #fff7ea; font-size: 22px; }
.sound-play b { font-weight: 400; }
.shape-pic { display: grid; place-items: center; width: 70%; height: 70%; }
.shape-pic svg { width: 100%; height: 100%; }
.choice-review .shape-pic { width: 34px; height: 34px; }
.num-big { margin: 0 auto 8px; color: #3b82f6; font-family: var(--display); font-size: min(26vw, 18vh, calc(110px * var(--k))); line-height: 1; text-align: center; }
.num-dots { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 2px; width: 86%; height: 86%; font-size: calc(var(--t, 80px) * .26); line-height: 1; }
.num-dots.n1 { font-size: calc(var(--t, 80px) * .5); }
.num-dots.n2 { font-size: calc(var(--t, 80px) * .38); }
.choice-review .num-dots { width: auto; height: auto; font-size: 13px; padding: 4px; }

/* ---------- 반대말 · 이럴 땐 ---------- */
.opp-pic { display: grid; place-items: center; width: 82%; height: 82%; }
.opp-pic svg { width: 100%; height: 100%; }
.choice-review .opp-pic { width: 36px; height: 36px; }
.need-scene { margin: 0 auto 6px; font-size: min(24vw, 16vh, calc(100px * var(--k))); line-height: 1.1; text-align: center; }

/* ---------- 번갈아 쌓기 ---------- */
.turn-tower { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-height: min(46vh, 330px); margin: 4px 0 10px; padding-bottom: 6px; border-bottom: 6px solid #d9b07c; }
.turn-block { display: grid; place-items: center; width: min(46vw, 180px); height: min(6vh, 40px); border-radius: 10px; background: var(--c); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .15); font-size: 20px; }
.turn-who { display: flex; justify-content: center; min-height: 44px; margin-bottom: 10px; font-size: 22px; }
.turn-who .turn-wait { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.turn-who .turn-wait .mascot, .turn-who .turn-wait svg { width: 38px; height: 38px; }
.turn-mine { color: var(--good); }
.turn-btn { display: block; width: 100%; padding: 18px; border-radius: 20px; background: #ffd76e; color: #5b4320; box-shadow: 0 5px 0 #e9b44c; font-size: 24px; }
.turn-btn.waiting { background: #ece6da; color: var(--muted); box-shadow: 0 5px 0 #d6cebf; }
.turn-btn.nope, .wait-box.nope { animation: mole-nope .4s; }

/* ---------- 기다리기 연습 ---------- */
.wait-glass { display: flex; align-items: center; gap: 12px; width: min(100%, 420px); margin: 6px auto 18px; }
.wait-bar { flex: 1; height: 26px; overflow: hidden; border-radius: 999px; background: #f1ede4; }
.wait-fill { width: 100%; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f6c453, #e3a25a); }
.wait-left { min-width: 40px; color: var(--orange); font-family: var(--display); font-size: 34px; text-align: right; }
.wait-box { display: grid; place-items: center; width: min(52vw, 32vh, 220px); aspect-ratio: 1; margin: 0 auto 10px; border: 3px dashed #e6cfa6; border-radius: 32px; background: #fffaf0; font-size: min(30vw, 18vh, 130px); line-height: 1; }
.wait-box.opened { border-style: solid; border-color: var(--good); background: var(--good-bg); }

/* ---------- 다 하면 뭐 할까? ---------- */
.reward-line { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 2px dashed #f3c6d3; border-radius: 16px; background: #fff5f8; font-size: 16px; text-align: left; }
.reward-line b { font-weight: 400; font-size: 18px; }
.reward-line small { margin-left: auto; color: var(--muted); font-size: 14px; }
.reward-line.set { border-style: solid; }
.reward-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.reward-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 8px; border: 2px solid var(--line); border-radius: 22px; background: #fff; }
.reward-item span { font-size: 48px; line-height: 1; }
.reward-item b { font-weight: 400; font-size: 18px; }
.reward-item.on { border-color: #f29bb3; background: #fff1f5; }
.reward-chip { margin: 10px auto 0; padding: 8px 16px; border-radius: 999px; background: #fff1f5; color: #8f2b4b; font-size: 18px; text-align: center; }
.result-reward { margin-top: 10px; padding: 10px 16px; border-radius: 16px; background: #fff1f5; color: #8f2b4b; font-size: 18px; }
.helper-grid { grid-template-columns: repeat(3, 1fr); }
.helper-btn b { word-break: keep-all; font-size: 15px; }

/* ---------- 기록 한 장 ---------- */
.report-link { display: block; width: 100%; margin: -6px 0 14px; padding: 10px 14px; border: 2px solid #d9cbf0; border-radius: 16px; background: #f4effc; color: #5b4a86; font-size: 16px; }
.report { padding: 16px; border: 2px solid var(--line); border-radius: 22px; background: #fff; }
.report-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.report-head b { font-weight: 400; font-size: 20px; }
.report-head span { color: var(--muted); font-size: 14px; }
.report-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 14px 0; font-size: 15px; }
.report-facts dt { color: var(--muted); }
.report-facts dd { margin: 0; }
.report-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report-table th, .report-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.report-table th:first-child, .report-table td:first-child { text-align: left; }
.report-table th { color: var(--muted); font-weight: 400; }
.report-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.report-actions { margin-top: 14px; }
.report-tip { color: var(--muted); font-size: 14px; text-align: center; }
@media print {
  body { background: #fff; }
  .guide-top .icon-btn, .report-actions, .report-tip, .tab-bar { display: none !important; }
  .report { border: 0; padding: 0; }
}

/* ---------- 종이 학습지 ---------- */
.ws-link { background: #fbf3df; border-color: #ecd8a4; color: #7a5a17; }
.ws-types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ws-types .chip { font-size: 14px; padding: 7px 11px; }
.ws-level { margin: 0 0 12px; }
.ws-preview { padding: 10px; border-radius: 18px; background: #ece6da; }
.ws-actions { margin-top: 14px; }
.ws-page {
  --ws-e: 34px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px;
  background: #fff;
  color: #222;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.ws-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; padding-bottom: 8px; border-bottom: 2px solid #333; }
.ws-title { font-family: var(--display); font-size: 22px; }
.ws-name { color: #555; font-size: 13px; }
.ws-say { margin: 0; font-size: 17px; }
.ws-foot { margin-top: 6px; padding-top: 6px; border-top: 1px solid #ccc; color: #888; font-size: 11px; text-align: center; }
.ws-svg, .ws-board { display: block; }
.ws-board svg, .ws-svg svg { display: block; width: 100%; height: auto; }
.ws-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ws-board.wide { border: 1px solid #ddd; border-radius: 10px; }
.ws-pairs { display: flex; flex-direction: column; gap: 12px; }
.ws-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.ws-pair .ws-board { max-width: 160px; justify-self: center; width: 100%; }
.ws-arrow { color: #888; font-size: 22px; }
.ws-e { font-size: var(--ws-e); line-height: 1.15; }
.ws-e.small { font-size: calc(var(--ws-e) * .8); }
.ws-e.tiny { font-size: calc(var(--ws-e) * .55); }
.ws-e.shade { filter: brightness(0) opacity(.8); }
.ws-connect { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22%; }
.ws-col { display: flex; flex-direction: column; gap: 12px; }
.ws-cell { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: calc(var(--ws-e) * 1.4); }
.ws-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #333; }
.ws-num { font-family: var(--display); font-size: calc(var(--ws-e) * 1.1); font-weight: 400; }
.ws-rows { display: flex; flex-direction: column; gap: 10px; }
.ws-row { display: flex; align-items: center; justify-content: space-around; gap: 6px; min-height: calc(var(--ws-e) * 1.6); padding: 4px 6px; border-bottom: 1px dashed #ccc; }
.ws-row.spread { justify-content: space-between; }
.ws-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; max-width: 64%; }
.ws-nums, .ws-choose { display: inline-flex; gap: 8px; }
.ws-nums b { display: grid; place-items: center; width: 26px; height: 26px; font-family: var(--display); font-size: 20px; font-weight: 400; }
.ws-choose { padding-left: 8px; border-left: 2px solid #ccc; }
.ws-blank { display: inline-grid; place-items: center; width: calc(var(--ws-e) * .95); height: calc(var(--ws-e) * .95); border: 2px dashed #888; border-radius: 8px; color: #888; font-size: 18px; }

/* 인쇄: 학습지 한 장만, A4 */
@page { size: A4; margin: 12mm; }
@media print {
  .print-ws body { background: #fff; }
  .print-ws body * { visibility: hidden; }
  .print-ws .ws-page, .print-ws .ws-page * { visibility: visible; }
  .print-ws .ws-page { --ws-e: 15mm; position: absolute; top: 0; left: 0; width: 100%; padding: 0; gap: 6mm; box-shadow: none; }
  .print-ws .ws-title { font-size: 22pt; }
  .print-ws .ws-name { font-size: 12pt; }
  .print-ws .ws-say { font-size: 16pt; }
  .print-ws .ws-pair .ws-board { max-width: 62mm; }
  .print-ws .ws-grid2 { gap: 8mm; }
  .print-ws .ws-col { gap: 8mm; }
  .print-ws .ws-dot { width: 4mm; height: 4mm; }
  .print-ws .ws-nums b { width: 12mm; height: 12mm; font-size: 22pt; }
  .print-ws .ws-row { min-height: 26mm; }
  .print-ws .ws-blank { font-size: 16pt; }
  .print-ws .ws-foot { font-size: 9pt; }
}
.ws-group { flex-wrap: nowrap; }
.ws-pair .ws-board { border: 1px solid #ddd; border-radius: 10px; }
@media print {
  .print-ws .ws-page { --ws-e: 21mm; gap: 7mm; }
  .print-ws .ws-col { gap: 12mm; }
  .print-ws .ws-dot { width: 5mm; height: 5mm; }
  .print-ws .ws-row { min-height: 40mm; }
  .print-ws .ws-pairs { gap: 8mm; }
  .print-ws .ws-pair .ws-board { max-width: 72mm; }
  .print-ws .ws-grid2 { gap: 7mm; }
  .print-ws .ws-blank { border-width: 3px; }
}
@media print {
  .print-ws .ws-pairs { gap: 6mm; }
  .print-ws .ws-pair .ws-board { max-width: 64mm; }
}

/* ---------- 점검 후 다듬기 ---------- */
/* 놀이 영역이 8개라 옆으로 숨지 않게 두 줄로 */
@media (min-width: 700px) { .cat-tabs { flex-wrap: wrap; overflow: visible; } }
/* 번갈아 쌓기: 블록 쌓을 자리가 눈에 보이게 */
.turn-tower { border-radius: 20px 20px 6px 6px; background: linear-gradient(#fffaf0, #fdf3e3); }
/* 학습지 '세어 보기': 좁은 화면에서 숫자가 넘치지 않게 */
.ws-nums { gap: 2px; flex-wrap: nowrap; }
.ws-nums b { width: 22px; font-size: 17px; }
.ws-row.spread .ws-group { min-width: 0; flex-shrink: 1; }
@media print { .print-ws .ws-nums { gap: 4mm; } }
.ws-page { width: 560px; box-sizing: border-box; }
@media print { .print-ws .ws-page { width: 100%; zoom: 1 !important; } }
/* 풍선 크기를 판 높이에 맞춤 (줄 간격 31%보다 작게 → 위아래 풍선이 겹치지 않게) */
.balloon { width: auto; height: 27%; }
.balloon svg { width: auto; height: 100%; }
/* 힌트 공통 규칙(position: relative)이 풍선의 절대 위치를 덮어써서 반짝이는 풍선이 자리를 옮기던 것 막기 */
.stage .balloon.hint { position: absolute; z-index: 1; }

/* 소개 영상 (세로 영상이라 높이를 화면에 맞춤) */
.intro-video video { display: block; width: auto; max-width: 100%; height: min(70vh, 640px); margin: 0 auto; border-radius: 22px; background: #fbf8f2; }

/* 앱이 뜨기 전 잠깐 보이는 소개 (검색엔진용) */
.seo-intro { max-width: 560px; margin: 0 auto; padding: 24px 16px; color: var(--ink); line-height: 1.6; }
.seo-intro h1 { font-size: 26px; }
a.more-games { color: inherit; text-decoration: none; box-sizing: border-box; }

/* 오늘 탭 맨 아래: 자주 묻는 질문 */
.home-foot { margin: 18px 0 8px; }
.faq-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.faq-btn span:first-child { font-size: 22px; }
.faq-btn b { font-weight: 400; font-size: 18px; }
.faq-go { margin-left: auto; color: var(--muted); font-size: 22px; }
.home-foot-links { margin-top: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.home-foot-links a { color: var(--muted); }
/* 자주 묻는 질문 버튼: 그림 · 설명 문구 (의견 게시판 카드와 같은 모양, 연보라) */
.faq-btn { gap: 12px; padding: 14px 16px; border-color: #d9cbf0; border-radius: 22px; background: #f6f2fd; }
.faq-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: #fff; font-size: 24px; }
.faq-text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.faq-text b { font-weight: 400; font-size: 18px; }
.faq-text small { color: #6f5f99; font-size: 14px; line-height: 1.4; word-break: keep-all; }
