:root {
  --red: #CD2E3A;
  --blue: #0047A0;
  --yellow: #FFB800;
  --green: #2E9E6B;
  --ink: #2b2b33;
  --muted: #6b6b76;
  --paper: #FFF8EE;
  --card: #FFFFFF;
  --soft: #FDEBD2;
  --radius: 22px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Baloo 2", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
.kw { font-family: "Gaegu", "Apple SD Gothic Neo", sans-serif; font-weight: 700; }
[hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  font-size: 1.05rem;
  font-weight: 800;
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 5px 0 #00306c;
  transition: transform .1s, box-shadow .1s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #00306c; }
.btn.red { background: var(--red); box-shadow: 0 5px 0 #8f1d27; }
.btn.red:active:not(:disabled) { box-shadow: 0 1px 0 #8f1d27; }
.btn.green { background: var(--green); box-shadow: 0 5px 0 #1d6b48; }
.btn.green:active:not(:disabled) { box-shadow: 0 1px 0 #1d6b48; }
.btn.yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 5px 0 #b88400; }
.btn.small { font-size: .92rem; padding: 8px 16px; }
.btn.big { font-size: 1.3rem; padding: 16px 34px; }

.pill {
  font-size: .98rem;
  font-weight: 700;
  border: 3px solid var(--soft);
  background: #fff;
  border-radius: 999px;
  padding: 7px 16px;
  color: var(--ink);
  transition: .12s;
}
.pill:hover { border-color: var(--blue); }
.pill.on { border-color: var(--blue); background: #E6EEFA; color: var(--blue); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, #0047A0 0%, #1565c8 55%, #CD2E3A 130%);
  color: #fff;
  padding: 48px 20px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; left: -5%; right: -5%; bottom: -2px; height: 64px;
  background: var(--paper);
  border-radius: 100% 100% 0 0;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 999px;
  padding: 5px 18px;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 22px;
  text-shadow: 0 3px 0 rgba(0,0,0,.18);
}
.hero-jian {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: center;
  max-width: 640px;
  margin: 0 auto 26px;
  position: relative; z-index: 2;
}
.hero-jian .avatar { font-size: 4.6rem; line-height: 1; animation: bob 2.4s ease-in-out infinite; }
.hero-jian .bubble {
  background: #fff;
  color: var(--ink);
  text-align: left;
  border-radius: 24px 24px 24px 6px;
  padding: 16px 20px;
  font-size: 1.08rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.hero-jian .bubble b { color: var(--red); }
.hero .btn { position: relative; z-index: 2; }
.floaters span {
  position: absolute; font-size: 2rem; opacity: .35;
  animation: floaty 6s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(8deg); } }

/* ---------- Passport bar ---------- */
.passport {
  position: sticky; top: 0; z-index: 60;
  background: #16254a;
  color: #fff;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.passport .pp-title { font-weight: 800; white-space: nowrap; font-size: .95rem; }
.pp-slots { display: flex; gap: 6px; overflow-x: auto; flex: 1; scrollbar-width: none; padding: 2px; }
.pp-slots::-webkit-scrollbar { display: none; }
.pp-slot {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.45);
  background: transparent;
  font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
  filter: grayscale(1); opacity: .5;
  transition: .2s;
}
.pp-slot.got {
  border: 2px solid var(--yellow);
  background: rgba(255,184,0,.2);
  filter: none; opacity: 1;
}
.pp-slot.pop { animation: pop .6s; }
.pp-count { font-weight: 800; color: var(--yellow); white-space: nowrap; }
.pp-sound {
  background: rgba(255,255,255,.12); border: none; color: #fff;
  border-radius: 50%; width: 36px; height: 36px; font-size: 1.05rem;
}
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.6); } 100% { transform: scale(1); } }

/* ---------- Layout ---------- */
main { max-width: 1000px; margin: 0 auto; padding: 36px 18px 10px; }
.section-title { text-align: center; font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; line-height: 1.2; }
.section-sub { text-align: center; color: var(--muted); margin: 4px 0 22px; }

/* ---------- Map ---------- */
.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 50px;
}
.map-card {
  position: relative;
  background: var(--card);
  border: 3px solid var(--soft);
  border-radius: 20px;
  padding: 16px 14px 14px;
  text-align: left;
  color: var(--ink);
  transition: .15s;
}
.map-card:hover { border-color: var(--blue); transform: translateY(-4px) rotate(-1deg); }
.map-card .mc-num { font-size: .78rem; font-weight: 800; color: var(--muted); letter-spacing: .08em; }
.map-card .mc-emoji { font-size: 2.3rem; line-height: 1.2; display: block; }
.map-card .mc-name { font-weight: 800; font-size: 1.12rem; display: block; line-height: 1.2; }
.map-card .mc-teaser { font-size: .88rem; color: var(--muted); display: block; margin-top: 4px; line-height: 1.35; }
.map-card .mc-stamp {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid var(--red); color: var(--red);
  font-size: .62rem; font-weight: 800; line-height: 1.05;
  display: none; align-items: center; justify-content: center; text-align: center;
  transform: rotate(-14deg);
  background: rgba(255,255,255,.9);
}
.map-card.got { border-color: #f3c1c6; background: #fffafa; }
.map-card.got .mc-stamp { display: flex; }
.map-card.final { background: linear-gradient(150deg, #fff5d6, #ffe7a3); border-color: #f5d98a; }

/* ---------- Stops ---------- */
.stop {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 6px 22px rgba(60,40,10,.08);
  margin-bottom: 48px;
  overflow: hidden;
  scroll-margin-top: 70px;
  position: relative;
}
.stop-head {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 26px;
  background: linear-gradient(90deg, #FFF3D6, #fff);
  border-bottom: 3px dashed var(--soft);
}
.stop-emoji {
  font-size: 2.5rem;
  background: #fff;
  border: 3px solid var(--soft);
  border-radius: 18px;
  width: 70px; height: 70px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stop-num { font-size: .8rem; font-weight: 800; color: var(--red); letter-spacing: .1em; }
.stop-head h2 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); font-weight: 800; line-height: 1.15; }
.stop-head .kr { font-family: "Gaegu", sans-serif; font-size: 1.2rem; color: var(--blue); font-weight: 700; }
.stop-head .done-stamp {
  margin-left: auto;
  width: 64px; height: 64px; border-radius: 50%;
  border: 4px solid var(--red); color: var(--red);
  font-weight: 800; font-size: .7rem; line-height: 1.1; text-align: center;
  display: none; align-items: center; justify-content: center;
  transform: rotate(-14deg);
  flex-shrink: 0;
}
.stop.got .done-stamp { display: flex; animation: stampIn .5s; }
.stop-body { padding: 22px 26px 26px; }
@media (max-width: 560px) {
  .stop-head { padding: 18px 16px; gap: 12px; }
  .stop-emoji { width: 56px; height: 56px; font-size: 2rem; }
  .stop-head .done-stamp { position: absolute; top: 8px; right: 10px; width: 52px; height: 52px; font-size: .6rem; border-width: 3px; background: rgba(255,255,255,.85); }
  .stop-body { padding: 18px 14px 20px; }
  .mission { padding: 14px 12px; }
  .jamo { width: 50px; height: 52px; font-size: 1.5rem; }
}

.jian { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.jian .avatar {
  font-size: 2.4rem; line-height: 1;
  background: #E6EEFA; border-radius: 50%;
  width: 58px; height: 58px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.jian .bubble {
  background: #F2F6FC;
  border-radius: 6px 22px 22px 22px;
  padding: 12px 18px;
  font-size: 1.06rem;
}
.jian .bubble b { color: var(--blue); }

.mission {
  border: 3px solid #cfe0f5;
  background: #FAFCFF;
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 18px;
}
.mission-title {
  font-weight: 800; font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.mission-title .tag {
  background: var(--blue); color: #fff; border-radius: 999px;
  font-size: .75rem; padding: 2px 10px; letter-spacing: .08em;
}
.msg { min-height: 1.7em; font-weight: 800; font-size: 1.08rem; margin-top: 10px; }
.msg.good { color: var(--green); }
.msg.bad { color: var(--red); }

/* ---------- Extras: say-it + flip cards ---------- */
.extras { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 680px) { .extras { grid-template-columns: 1fr; } }
.say-box { background: #E4F2EA; border: 3px solid #A9D8BF; border-radius: 18px; padding: 14px 16px; }
.say-box .label, .flip .label { font-weight: 800; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 8px; }
.say-box .label { color: var(--green); }
.say {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: #fff;
  border: 2px solid #A9D8BF;
  border-radius: 14px;
  padding: 8px 12px;
  margin-bottom: 8px;
  text-align: left;
  color: var(--ink);
  transition: .12s;
}
.say:last-child { margin-bottom: 0; }
.say:hover { border-color: var(--green); transform: translateX(3px); }
.say .spk { font-size: 1.4rem; }
.say .ko { font-family: "Gaegu", sans-serif; font-weight: 700; font-size: 1.35rem; color: var(--red); display: block; line-height: 1.1; }
.say small { display: block; font-size: .85rem; color: var(--muted); line-height: 1.3; }
.say.speaking { border-color: var(--green); background: #f3fbf6; }

.flip {
  position: relative;
  min-height: 150px;
  border: none; background: none; padding: 0;
  perspective: 900px;
  text-align: left;
  color: var(--ink);
}
.flip .inner {
  display: grid;
  width: 100%; height: 100%; min-height: 150px;
  transition: transform .6s;
  transform-style: preserve-3d;
}
.flip.open .inner { transform: rotateY(180deg); }
.flip .face {
  grid-area: 1 / 1;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 18px;
  padding: 14px 16px;
  display: flex; flex-direction: column; justify-content: center;
}
.flip .front { background: #FFF3D6; border: 3px solid #F5D98A; }
.flip .front .label { color: #A97800; }
.flip .front b { font-size: 1.12rem; line-height: 1.3; }
.flip .front .tap { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.flip .back { background: #fff; border: 3px solid var(--yellow); transform: rotateY(180deg); font-size: 1rem; }

.learn { margin-top: 16px; font-size: .88rem; color: var(--muted); }
.learn a { color: var(--blue); font-weight: 700; text-decoration: none; }
.learn a:hover { text-decoration: underline; }

/* ---------- Flag ---------- */
.flag-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: center; }
@media (max-width: 680px) { .flag-wrap { grid-template-columns: 1fr; } }
.flag-svg { width: 100%; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.15); background: #fff; }
.flag-svg .hit { fill: transparent; cursor: pointer; }
.flag-svg .hit:hover, .flag-svg .hit.on { fill: rgba(255,184,0,.25); stroke: var(--yellow); stroke-width: 1.2; }
.flag-svg .hit.found { stroke: var(--green); stroke-width: 1; stroke-dasharray: 2 1.5; }
.flag-info {
  background: #fff; border: 3px solid var(--soft); border-radius: 18px;
  padding: 16px; min-height: 150px;
}
.flag-info h3 { font-size: 1.3rem; line-height: 1.2; margin-bottom: 4px; }
.flag-info .big { font-size: 2rem; }
.checklist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.checklist span {
  font-size: .85rem; font-weight: 700;
  background: #eee; color: #999; border-radius: 999px; padding: 3px 10px;
}
.checklist span.found { background: #E4F2EA; color: var(--green); }

/* ---------- Hangeul ---------- */
.builder { display: grid; grid-template-columns: 1fr 180px; gap: 16px; align-items: center; }
@media (max-width: 620px) { .builder { grid-template-columns: 1fr; } }
.jamo-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.jamo-row .row-label { width: 100%; font-weight: 800; font-size: .85rem; color: var(--muted); }
.jamo {
  width: 58px; height: 58px;
  border-radius: 14px;
  border: 3px solid var(--soft);
  background: #fff;
  font-family: "Gaegu", sans-serif; font-weight: 700;
  font-size: 1.7rem; line-height: 1;
  color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: .1s;
}
.jamo small { font-family: "Baloo 2", sans-serif; font-size: .7rem; color: var(--muted); font-weight: 700; }
.jamo:hover { border-color: var(--blue); }
.jamo.on { border-color: var(--blue); background: #E6EEFA; color: var(--blue); }
.jamo.vowel.on { border-color: var(--red); background: #FDECEE; color: var(--red); }
.block-display {
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 20px;
  text-align: center;
  padding: 12px;
}
.block-display .syll { font-family: "Gaegu", sans-serif; font-weight: 700; font-size: 5.2rem; line-height: 1.05; }
.block-display .rom { font-weight: 800; font-size: 1.2rem; color: var(--red); }
.block-display .made { font-size: .85rem; color: var(--muted); }
.detective { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 620px) { .detective { grid-template-columns: repeat(2, 1fr); } }
.det-card {
  border: 3px solid var(--soft); border-radius: 16px; background: #fff;
  padding: 12px 6px; text-align: center; color: var(--ink);
}
.det-card .ko { font-family: "Gaegu", sans-serif; font-size: 2rem; font-weight: 700; display: block; line-height: 1.1; }
.det-card .ans { display: block; font-weight: 800; color: var(--muted); font-size: .95rem; }
.det-card.open { border-color: var(--green); background: #f3fbf6; }
.det-card.open .ans { color: var(--green); }

/* ---------- Bibimbap ---------- */
.bibim { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: center; }
@media (max-width: 620px) { .bibim { grid-template-columns: 1fr; justify-items: center; } }
.bowl-wrap { position: relative; width: 240px; height: 240px; }
.bowl {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #fffdf6 0 58%, #f1ead8 59% 64%, #3a3a44 65% 100%);
  box-shadow: 0 10px 0 #1f1f26, inset 0 0 0 6px #4a4a55;
  overflow: hidden;
}
.bowl.mixed { background: radial-gradient(circle, #f6ecd2 0 30%, #eadcb4 50%, #dfcf9f 64%, #3a3a44 65% 100%); animation: spin 1s ease-in-out; }
.bowl.mixed.spicy { background: radial-gradient(circle, #f08a4b 0 30%, #e5693a 50%, #d4552f 64%, #3a3a44 65% 100%); }
.topping {
  position: absolute; font-size: 2.2rem;
  transform: translate(-50%, -50%) scale(0);
  transition: transform .3s cubic-bezier(.3,1.6,.5,1);
}
.topping.in { transform: translate(-50%, -50%) scale(1); }
@keyframes spin { 0% { transform: rotate(0); } 30% { transform: rotate(-20deg); } 60% { transform: rotate(340deg); } 100% { transform: rotate(360deg); } }
.topping-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

/* ---------- Hanbok ---------- */
.hanbok { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start; }
@media (max-width: 620px) { .hanbok { grid-template-columns: 1fr; justify-items: center; } }
.hanbok-stage { position: relative; background: linear-gradient(#fdf1e2, #fff); border-radius: 20px; padding: 8px; border: 3px solid var(--soft); }
.hanbok-stage svg { width: 210px; display: block; }
.hanbok-stage .flash { position: absolute; inset: 0; background: #fff; border-radius: 18px; opacity: 0; pointer-events: none; }
.hanbok-stage .flash.go { animation: flash .6s; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.part-tabs, .style-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.swatch {
  width: 50px; height: 50px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 0 0 2px #ddd;
  position: relative;
}
.swatch:hover { box-shadow: 0 0 0 3px var(--blue); }
.swatch .o5 {
  position: absolute; bottom: -6px; right: -6px;
  background: var(--yellow); color: var(--ink);
  font-size: .62rem; font-weight: 800; border-radius: 999px; padding: 0 5px;
}
.swatch-name { font-size: .9rem; color: var(--muted); min-height: 1.4em; }

/* ---------- Seollal ---------- */
.seollal-scene {
  background: linear-gradient(#fff4e0, #ffe9c7);
  border-radius: 20px;
  padding: 18px;
  text-align: center;
  position: relative;
  min-height: 190px;
}
.elders { font-size: 3.4rem; line-height: 1; }
.elders .cushion { display: block; width: 180px; height: 12px; margin: 0 auto; border-radius: 6px; background: var(--red); }
.sebae-kid { font-size: 3.4rem; line-height: 1; display: inline-block; margin-top: 16px; transition: transform .4s; }
.sebae-kid.bow { transform: translateY(8px) scale(.95); }
.steps { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.pouch {
  font-size: 3.6rem; background: none; border: none; line-height: 1;
  animation: wiggle 1s ease-in-out infinite;
}
.pouch small { display: block; font-size: .9rem; font-weight: 800; color: var(--red); }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
.bill {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 14px;
  border-radius: 10px;
  padding: 12px 18px;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
  animation: stampIn .6s;
  text-align: left;
}
.bill .amt { font-size: 1.7rem; line-height: 1; }
.bill .who { font-size: .92rem; font-weight: 600; opacity: .95; }
.tteokguk { margin-top: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tteokguk .out { font-weight: 800; color: var(--blue); }

/* ---------- Chuseok ---------- */
.song-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 680px) { .song-grid { grid-template-columns: 1fr; } }
.step-label { font-weight: 800; font-size: .95rem; margin: 10px 0 6px; }
.step-label .n { display: inline-block; background: var(--red); color: #fff; width: 24px; height: 24px; border-radius: 50%; text-align: center; line-height: 24px; font-size: .8rem; margin-right: 4px; }
.dough-area {
  height: 170px;
  border-radius: 20px;
  background: #fff;
  border: 3px dashed var(--soft);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.dough-area.steaming { background: repeating-linear-gradient(60deg, #9ccf9a 0 3px, #6fae6c 3px 6px); border-style: solid; border-color: #6fae6c; }
.dough {
  width: 100px; height: 100px;
  border-radius: 50%;
  border: none;
  background: #f7f3ea;
  box-shadow: inset -8px -8px 0 rgba(0,0,0,.06), 0 6px 12px rgba(0,0,0,.12);
  transition: all .35s cubic-bezier(.3,1.5,.5,1);
  font-size: .85rem; font-weight: 800; color: rgba(0,0,0,.35);
}
.dough.p1 { width: 120px; height: 86px; }
.dough.p2 { width: 130px; height: 74px; border-radius: 60% 60% 40% 40%; }
.dough.p3 { width: 136px; height: 70px; border-radius: 68px 68px 14px 14px / 64px 64px 14px 14px; }
.steam-puff { position: absolute; font-size: 1.6rem; animation: rise 1.4s ease-out infinite; opacity: 0; }
@keyframes rise { 0% { transform: translateY(20px); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-70px); opacity: 0; } }
.bar { height: 12px; border-radius: 999px; background: #eee; overflow: hidden; margin-top: 10px; }
.bar > div { height: 100%; width: 0; background: var(--green); transition: width .2s linear; }
.plate {
  margin-top: 10px; min-height: 60px;
  background: #fff; border: 3px solid #eee; border-radius: 999px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; padding: 8px 16px;
}
.plate .mini { width: 34px; height: 18px; border-radius: 17px 17px 5px 5px / 16px 16px 5px 5px; border: 2px solid rgba(0,0,0,.14); box-shadow: 0 2px 3px rgba(0,0,0,.15); }
.plate .empty { color: var(--muted); font-size: .9rem; }
.moon-box {
  background: linear-gradient(#0c1a3d, #26386b);
  color: #fff; border-radius: 20px; padding: 18px; text-align: center;
}
.moon {
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fffbe6, #ffe27a 70%);
  margin: 6px auto 14px;
  box-shadow: 0 0 20px rgba(255,226,122,.5);
  transition: all 1s;
}
.moon.glow { width: 130px; height: 130px; box-shadow: 0 0 60px 20px rgba(255,226,122,.7); }
.moon-box input {
  font-family: inherit; font-size: 1rem;
  border-radius: 999px; border: none; padding: 10px 16px; width: 100%; max-width: 280px; margin-bottom: 10px;
}
.moon-box .wish-out { min-height: 1.6em; margin-top: 10px; font-weight: 700; color: #ffe27a; }

/* ---------- Taekwondo ---------- */
.tkd-stage {
  background: linear-gradient(#f5f7fb, #e3e9f5);
  border-radius: 20px; padding: 16px; text-align: center;
}
.tkd-fighter { font-size: 5rem; line-height: 1.1; transition: transform .15s; }
.tkd-fighter.hit { transform: scale(1.25); }
.belts { display: flex; gap: 6px; justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.belts span {
  width: 44px; height: 14px; border-radius: 4px; opacity: .25;
  border: 1px solid rgba(0,0,0,.2);
}
.belts span.on { opacity: 1; box-shadow: 0 0 0 2px var(--yellow); }
.belt-name { font-weight: 800; font-size: 1.15rem; }
.tkd-status { font-weight: 700; margin: 10px 0; min-height: 1.6em; }
.tkd-moves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.move {
  background: #fff; border: 4px solid #d8e2f2; border-radius: 18px;
  padding: 10px 4px; color: var(--ink);
  transition: .1s;
}
.move .e { font-size: 2.4rem; display: block; line-height: 1.1; }
.move b { display: block; font-size: 1.05rem; }
.move small { color: var(--muted); font-weight: 700; }
.move.lit { border-color: var(--yellow); background: #FFF3D6; transform: scale(1.06); }
.move.press { border-color: var(--blue); background: #E6EEFA; }

/* ---------- Hanok ---------- */
.hanok-svg { width: 100%; max-width: 560px; display: block; margin: 0 auto; border-radius: 16px; }
.hanok-svg .heat { transform: scaleX(0); transform-origin: left center; transform-box: fill-box; transition: transform 2.6s ease-in-out; }
.hanok-svg.warm .heat { transform: scaleX(1); }
.hanok-svg .floor { transition: fill 1.5s 2s; }
.hanok-svg.warm .floor { fill: #ff9a5a; }
.hanok-svg .fire { opacity: 0; transition: opacity .4s; }
.hanok-svg.lit .fire { opacity: 1; }
.hanok-svg .smoke { opacity: 0; }
.hanok-svg.warm .smoke { animation: smoke 2.4s 2.4s ease-out infinite; }
@keyframes smoke { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: .9; } 100% { opacity: 0; transform: translateY(-30px); } }
.hanok-svg .door { transition: transform .8s; transform-box: fill-box; transform-origin: right center; }
.hanok-svg.open .door { transform: scaleX(.08); }
.hanok-svg .shoe { transition: transform .8s; }
.hanok-svg .snow { animation: snowfall 4s linear infinite; }
.hanok-svg.warm .snow { opacity: .35; }
@keyframes snowfall { 0% { transform: translateY(-10px); } 100% { transform: translateY(40px); } }
.hanok-steps { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }

/* ---------- Cards: True/False + Manners ---------- */
.qcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.qcard { background: #fff; border: 3px solid var(--soft); border-radius: 18px; padding: 14px; }
.qcard .q { font-weight: 800; font-size: 1.05rem; line-height: 1.3; margin-bottom: 10px; }
.qcard .q .e { font-size: 1.5rem; margin-right: 4px; }
.qcard .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.qcard .opts button {
  border: 3px solid var(--soft); background: #fff; border-radius: 12px;
  padding: 7px 14px; font-weight: 800; font-size: .98rem; color: var(--ink);
}
.qcard .opts button:hover { border-color: var(--blue); }
.qcard .opts button.right { background: var(--green); border-color: var(--green); color: #fff; }
.qcard .opts button.wrong { background: #fde2e5; border-color: var(--red); color: var(--red); animation: shake .4s; }
.qcard .why { margin-top: 10px; font-size: .95rem; line-height: 1.4; }
.qcard.done { border-color: #A9D8BF; background: #fbfffc; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- Ddakji ---------- */
.games-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .games-grid { grid-template-columns: 1fr; } }
.dd-arena {
  height: 190px;
  background: linear-gradient(#e7dcc8, #d4c3a3);
  border-radius: 18px;
  position: relative;
  perspective: 700px;
  overflow: hidden;
}
.dd-tile {
  position: absolute; width: 96px; height: 96px;
  left: 50%; margin-left: -48px;
  transform-style: preserve-3d;
}
.dd-tile .f {
  position: absolute; inset: 0;
  border-radius: 6px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background:
    linear-gradient(45deg, transparent 49%, rgba(0,0,0,.28) 49.5% 50.5%, transparent 51%),
    linear-gradient(-45deg, transparent 49%, rgba(0,0,0,.28) 49.5% 50.5%, transparent 51%),
    var(--c);
  box-shadow: 0 4px 8px rgba(0,0,0,.25);
}
.dd-tile .f.b { transform: rotateX(180deg); }
.dd-tile.opp { bottom: 22px; transition: transform .8s cubic-bezier(.3,1.4,.5,1); }
.dd-tile.opp.flipped { transform: translate(64px, -24px) rotateX(180deg); }
.dd-tile.mine { top: -110px; transition: top .25s ease-in, left .5s ease-out; z-index: 3; }
.dd-tile.mine.drop { top: 40px; }
.dd-tile.mine.aside { left: 26%; }
.dd-arena.shake { animation: shake .35s; }
.meter {
  position: relative; height: 26px; border-radius: 999px;
  background: linear-gradient(90deg, #e3e7ee, #e3e7ee);
  margin: 14px 0 10px; overflow: hidden; border: 3px solid var(--ink);
}
.meter .zone { position: absolute; top: 0; bottom: 0; background: var(--green); opacity: .8; }
.meter .marker { position: absolute; top: -2px; bottom: -2px; width: 6px; margin-left: -3px; background: var(--red); border-radius: 3px; }
.yut-sticks { display: flex; gap: 10px; justify-content: center; margin: 12px 0; height: 120px; align-items: center; }
.stick {
  width: 26px; height: 110px; border-radius: 13px;
  background: #b7773f;
  box-shadow: inset -5px 0 0 rgba(0,0,0,.15);
  transition: transform .5s;
  display: flex; flex-direction: column; justify-content: space-evenly; align-items: center;
  color: #6b3d16; font-weight: 800; font-size: .9rem;
}
.stick.flat { background: #f3dfb8; box-shadow: inset 0 0 0 2px #d9bd8a; }
.stick.toss { animation: toss .6s; }
@keyframes toss { 0% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-50px) rotate(200deg); } 100% { transform: translateY(0) rotate(360deg); } }
.yut-result { text-align: center; font-weight: 800; font-size: 1.2rem; min-height: 2.8em; }
.yut-result .animal { font-size: 2rem; }
.game-box { background: #fff; border: 3px solid var(--soft); border-radius: 18px; padding: 14px; }
.game-box h3 { font-size: 1.15rem; margin-bottom: 6px; }

/* ---------- Final quiz ---------- */
.final { background: linear-gradient(150deg, #fff, #FFF3D6); }
.quiz-progress { display: flex; gap: 4px; margin-bottom: 14px; }
.quiz-progress span { flex: 1; height: 8px; border-radius: 4px; background: #eee; }
.quiz-progress span.ok { background: var(--green); }
.quiz-progress span.no { background: var(--red); }
.quiz-progress span.now { background: var(--yellow); }
.quiz-q { font-size: 1.3rem; font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opts button {
  text-align: left;
  border: 3px solid var(--soft); background: #fff; border-radius: 16px;
  padding: 12px 16px; font-weight: 700; font-size: 1.05rem; color: var(--ink);
}
.quiz-opts button:hover:not(:disabled) { border-color: var(--blue); }
.quiz-opts button.right { background: var(--green); border-color: var(--green); color: #fff; opacity: 1; }
.quiz-opts button.wrong { background: #fde2e5; border-color: var(--red); color: var(--red); opacity: 1; }
.quiz-why { margin-top: 12px; font-size: 1rem; min-height: 1.5em; }
.quiz-end { text-align: center; }
.quiz-end .score { font-size: 3rem; font-weight: 800; color: var(--red); line-height: 1.1; }
.quiz-end .stars { font-size: 2.2rem; }
.cert-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.cert-form input {
  font-family: inherit; font-size: 1.1rem; font-weight: 700;
  border: 3px solid var(--soft); border-radius: 999px; padding: 10px 18px; min-width: 240px;
}
.cert {
  max-width: 640px; margin: 10px auto 0;
  background: #fffdf7;
  border: 10px double var(--blue);
  border-radius: 12px;
  padding: 30px 26px;
  text-align: center;
  position: relative;
}
.cert .c-top { font-weight: 800; letter-spacing: .2em; color: var(--red); font-size: .85rem; }
.cert h3 { font-size: 2rem; line-height: 1.15; margin: 6px 0 10px; }
.cert .c-name { font-family: "Gaegu", sans-serif; font-size: 2.6rem; font-weight: 700; color: var(--blue); border-bottom: 3px solid var(--ink); display: inline-block; min-width: 60%; line-height: 1.2; margin: 6px 0 12px; }
.cert .c-stamps { font-size: 1.4rem; letter-spacing: 2px; margin: 8px 0; }
.cert .c-sign { margin-top: 16px; font-size: .95rem; color: var(--muted); }
.cert .c-seal {
  position: absolute; right: 18px; bottom: 18px;
  width: 92px; height: 92px; border-radius: 50%;
  border: 4px solid var(--red); color: var(--red);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transform: rotate(-14deg);
  font-family: "Gaegu", sans-serif; font-weight: 700; font-size: 1.15rem; line-height: 1.05;
  background: rgba(255,255,255,.8);
}
.cert .c-seal small { font-family: "Baloo 2", sans-serif; font-size: .55rem; font-weight: 800; }

/* ---------- Overlays ---------- */
.stamp-pop {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  background: rgba(22,37,74,.25);
}
.stamp-pop .stamp {
  width: 230px; height: 230px; border-radius: 50%;
  background: #fff;
  border: 8px solid var(--red);
  color: var(--red);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  font-weight: 800;
  transform: rotate(-12deg);
  animation: stampIn .5s cubic-bezier(.3,1.6,.5,1);
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.stamp-pop .stamp .e { font-size: 3.6rem; line-height: 1.1; }
.stamp-pop .stamp .t1 { font-size: .9rem; letter-spacing: .2em; }
.stamp-pop .stamp .t2 { font-size: 1.35rem; line-height: 1.1; }
.stamp-pop .stamp .t3 { font-size: .9rem; color: var(--ink); margin-top: 4px; }
@keyframes stampIn { 0% { transform: scale(3) rotate(-30deg); opacity: 0; } 100% { transform: scale(1) rotate(-12deg); opacity: 1; } }
.confetti { position: fixed; top: -40px; z-index: 210; font-size: 1.8rem; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-weight: 700;
  padding: 10px 20px; border-radius: 999px; z-index: 220;
  box-shadow: 0 8px 20px rgba(0,0,0,.3);
  max-width: 90vw; text-align: center;
}

/* ---------- Footer ---------- */
footer { background: var(--ink); color: #eee; padding: 40px 20px; margin-top: 20px; }
.foot-inner { max-width: 1000px; margin: 0 auto; }
footer h2 { font-size: 1.25rem; margin-bottom: 12px; color: var(--yellow); }
footer ul { list-style: none; columns: 2; column-gap: 30px; }
@media (max-width: 640px) { footer ul { columns: 1; } }
footer li { margin-bottom: 8px; font-size: .92rem; break-inside: avoid; }
footer a { color: #9ec5ff; text-decoration: none; font-weight: 700; }
footer a:hover { text-decoration: underline; }
footer .small { margin-top: 20px; font-size: .85rem; color: #aaa; }
footer .reset { background: none; border: 1px solid #666; color: #bbb; border-radius: 999px; padding: 4px 12px; font-size: .8rem; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  body * { visibility: hidden; }
  #cert, #cert * { visibility: visible; }
  #cert { position: absolute; left: 0; right: 0; top: 20px; margin: 0 auto; }
  .passport { display: none; }
}
