@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

:root {
  --sky-top: #071324;
  --sky-bot: #102a43;
  --pine: #0f4c3a;
  --pine-dark: #093225;
  --crimson: #c92a2a;
  --crimson-dark: #9b1c1c;
  --gold: #eab308;
  --gold-soft: #fef08a;
  --paper: #fffbf2;
  --paper-soft: #f5efe0;
  --ink: #1b2838;
  --line: #e2d5b5;
  --ok: #15803d;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bot) 60%, #173753 100%);
  color: var(--ink);
  font-family: var(--font-gothic); letter-spacing: -0.02em;
  overflow-x: clip;
}

/* 눈송이 캔버스 */
#snowCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* 상단 반짝이는 전구 가랜드 */
.fairy-lights {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  z-index: 30;
}
.fairy-lights span {
  width: 10px;
  height: 14px;
  border-radius: 0 0 10px 10px;
  background: var(--gold);
  box-shadow: 0 0 12px 3px rgba(250, 204, 21, 0.7);
  animation: twinkle 2.2s infinite ease-in-out alternate;
}
.fairy-lights span:nth-child(3n) {
  background: #ff4d4d;
  box-shadow: 0 0 12px 3px rgba(255, 77, 77, 0.7);
  animation-delay: 0.6s;
}
.fairy-lights span:nth-child(3n+1) {
  background: #34d399;
  box-shadow: 0 0 12px 3px rgba(52, 211, 153, 0.7);
  animation-delay: 1.2s;
}
@keyframes twinkle {
  0% { opacity: 0.55; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1.1); }
}

.wrap {
  position: relative;
  z-index: 20;
  max-width: 680px;
  margin: 0 auto;
  padding: 24px max(4vw, 14px) 48px;
}

/* 헤더 바 */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.top-left, .top-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.top-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.15s, background 0.15s;
}
.top-brand:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

button.ic {
  min-width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 19px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s, background 0.15s;
}
button.ic:hover {
  background: rgba(255, 255, 255, 0.26);
}
button.ic.is-on {
  background: var(--crimson);
  border-color: #fca5a5;
  box-shadow: 0 0 12px rgba(201, 42, 42, 0.6);
}
.carol-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.carol-pill.is-playing {
  background: linear-gradient(135deg, var(--crimson), #b91c1c);
  border-color: var(--gold-soft);
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.45);
}
.carol-pill .note-bounce {
  display: inline-block;
}
.carol-pill.is-playing .note-bounce {
  animation: noteHop 0.9s infinite ease-in-out alternate;
}
@keyframes noteHop {
  0% { transform: translateY(0) rotate(-6deg); }
  100% { transform: translateY(-3px) rotate(8deg); }
}

/* 크리스마스 일러스트 히어로 배너 */
.hero-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #0d2238;
  border: 3px solid rgba(255, 249, 238, 0.25);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  margin-bottom: 18px;
}
.hero-bg-slider {
  position: relative;
  height: 230px;
  overflow: hidden;
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.4s ease, transform 9s ease-out;
}
.hero-bg-img.active {
  opacity: 1;
  transform: scale(1.12);
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 19, 36, 0.15) 0%, rgba(7, 19, 36, 0.85) 100%);
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: #fff;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: rgba(201, 42, 42, 0.92);
  border: 1.5px solid var(--gold-soft);
  color: #fff;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.hero-title {
  margin: 0;
  font-family: var(--font-gothic);
  font-weight: 900;
  font-size: clamp(26px, 6vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: #fff;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
}
.hero-title span {
  display: inline-block;
  color: #fef08a;
  -webkit-text-stroke: 1.4px #991b1b;
  paint-order: stroke fill;
  font-weight: 900;
  letter-spacing: -0.035em;
}
.hero-sub {
  margin: 6px 0 0;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* 움직이는 산타 썰매 / 빨간 자동차 디테일 */
.moving-car {
  position: absolute;
  bottom: 10px;
  right: -60px;
  font-size: 28px;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5));
  animation: driveAcross 15s linear infinite;
  pointer-events: none;
}
@keyframes driveAcross {
  0% { transform: translateX(60px) scaleX(-1); }
  100% { transform: translateX(-760px) scaleX(-1); }
}

/* 홈 타일 3개 */
.tiles {
  display: grid;
  gap: 14px;
}
.tile {
  position: relative;
  display: grid;
  grid-template-columns: 78px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 24px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 7px 0 #d5c49c, 0 12px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.14s, box-shadow 0.14s;
  overflow: hidden;
}
.tile:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 #d5c49c, 0 6px 12px rgba(0, 0, 0, 0.25);
}
.tile-thumb {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 46px;
  background: linear-gradient(145deg, #fff3d6, #fde6b4);
  border: 2px solid #f0d79c;
  animation: gentleFloat 3.2s ease-in-out infinite;
}
.tile:nth-child(2) .tile-thumb {
  background: linear-gradient(145deg, #fee2e2, #fecaca);
  border-color: #fca5a5;
  animation-delay: 0.5s;
}
.tile:nth-child(3) .tile-thumb {
  background: linear-gradient(145deg, #d1fae5, #a7f3d0);
  border-color: #6ee7b7;
  animation-delay: 1s;
}
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.tile-info b {
  display: block;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 24px;
  color: var(--pine-dark);
}
.tile-desc {
  display: block;
  font-size: 13.5px;
  color: #52606d;
  margin: 2px 0 4px;
}
.stars {
  color: var(--crimson);
  font-size: 16px;
  letter-spacing: 1px;
}
.tile-lv {
  background: var(--pine);
  color: #fff;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.hint-box {
  margin-top: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14.5px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
}

/* 문제판 (Board) */
.board {
  background: var(--paper);
  border-radius: 28px;
  padding: 18px;
  border: 3px solid var(--line);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.hud b {
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 21px;
  color: var(--pine);
}
.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.irt-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--crimson);
  background: #fee2e2;
  padding: 3px 9px;
  border-radius: 999px;
}

.stage {
  background: linear-gradient(180deg, #f7f1e3 0%, #efe4cc 100%);
  border: 2px solid #e2d4b7;
  border-radius: 22px;
  padding: 16px;
  min-height: 165px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.say {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 20px;
  color: var(--ink);
  line-height: 1.3;
}
.say button {
  min-width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: var(--crimson);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--crimson-dark);
}

.seq {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}
.box {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #fffdf7;
  border: 2px solid #e2d4b7;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  box-shadow: 0 3px 0 #dccca8;
  padding: 4px;
}
.orn-badge {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.16));
  animation: stickerPop 0.36s cubic-bezier(0.34, 1.56, 0.64, 1) both, stickerFloat 3.2s ease-in-out infinite;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.box:nth-child(even) .orn-badge,
.pile-item:nth-child(even) .orn-badge {
  animation-delay: 0s, 0.7s;
}
.box:nth-child(3n) .orn-badge,
.pile-item:nth-child(3n) .orn-badge {
  animation-delay: 0s, 1.4s;
}
@keyframes stickerPop {
  0% { transform: scale(0.4) rotate(-8deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes stickerFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}
.choices button .orn-badge {
  width: 60px;
  height: 60px;
  animation: stickerPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.choices button:hover .orn-badge,
.choices button:active .orn-badge {
  transform: scale(1.16) rotate(-5deg);
}
.char-badge {
  width: 68px;
  height: 68px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.18));
  animation: stickerPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both, stickerFloat 3.6s ease-in-out infinite;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.choices button:nth-child(even) .char-badge {
  animation-delay: 0s, 0.9s;
}
.choices button:hover .char-badge,
.choices button:active .char-badge {
  transform: scale(1.14) translateY(-4px) rotate(3deg);
}
.pile {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-width: 340px;
}
.pile-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pile .orn-badge {
  width: 44px;
  height: 44px;
}
.pile .gone {
  opacity: 0.24;
  filter: grayscale(85%);
  transform: scale(0.88);
}
.scale-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.scale-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.15));
}
.scale-mid {
  font-size: 38px;
}
.box.q {
  background: var(--crimson);
  color: #fff;
  border-color: var(--crimson-dark);
  box-shadow: 0 3px 0 var(--crimson-dark);
  animation: pulseQ 1.4s infinite ease-in-out;
}
@keyframes pulseQ {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.plus {
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 34px;
  color: var(--crimson);
}
.eq {
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 44px;
  color: var(--pine-dark);
  letter-spacing: 4px;
}

.clues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.clue {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #e2d4b7;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  box-shadow: 0 3px 0 #d5c49c;
  cursor: pointer;
}
.clue .e { font-size: 24px; }
.clue .m { font-size: 20px; }

.choices {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.ch {
  min-height: 80px;
  border-radius: 18px;
  border: 2px solid #e2d4b7;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  box-shadow: 0 5px 0 #d5c49c;
  transition: transform 0.1s;
}
.ch:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #d5c49c;
}
.ch small {
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-weight: 700;
  font-size: 14px;
}
.ch .char-emoji {
  font-size: 36px;
  line-height: 1.1;
}
.ch .pile { font-size: 22px; }
.ch.no {
  opacity: 0.35;
  animation: shake 0.35s;
}
.ch.yes {
  background: var(--pine);
  border-color: var(--pine-dark);
  color: #fff;
  box-shadow: 0 5px 0 var(--pine-dark);
}
@keyframes shake {
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.fb {
  min-height: 30px;
  text-align: center;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 21px;
  color: var(--crimson);
  margin: 12px 0 0;
}

.goal {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pine-dark);
}
.bar {
  flex: 1;
  height: 13px;
  border-radius: 999px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
  transition: width 0.35s ease;
}

.done-btn {
  width: 100%;
  margin-top: 12px;
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  background: var(--paper-soft);
  color: var(--ink);
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--line);
}

/* 레벨 업 오버레이 */
.lvup {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 19, 36, 0.55);
  backdrop-filter: blur(4px);
  z-index: 50;
}
.lvup div {
  background: var(--paper);
  border: 4px solid var(--gold);
  border-radius: 28px;
  padding: 28px 36px;
  text-align: center;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 32px;
  color: var(--pine-dark);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  animation: pop 0.5s;
}
.lvup span { display: block; font-size: 64px; }
@keyframes pop {
  0% { transform: scale(0.4); }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* 결과 화면 & 상장 */
.rtop { text-align: center; }
.rbig { font-size: 62px; line-height: 1; }
.rtop h2 { font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em; font-size: 30px; margin: 6px 0; color: var(--pine); }
.rstars { color: var(--crimson); font-size: 42px; letter-spacing: 4px; }

.kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.kpi {
  background: var(--paper-soft);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
}
.kpi b { display: block; font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em; font-size: 25px; color: var(--pine-dark); }
.kpi small { font-size: 13.5px; color: #475569; }

.cert { margin: 12px 0 16px; }
.kn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}
.kn input {
  flex: 1;
  min-height: 44px;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 16px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
}
#certImg {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  aspect-ratio: 4/5;
  background: #fff9ee;
}

.row { display: flex; gap: 10px; margin-top: 12px; }
.row button {
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 17px;
  cursor: pointer;
  background: var(--paper-soft);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--line);
}
.row button.go {
  background: var(--crimson);
  color: #fff;
  box-shadow: 0 4px 0 var(--crimson-dark);
}
.cmsg { min-height: 20px; font-size: 14px; text-align: center; margin: 8px 0 0; color: var(--pine); }
#shareTxt {
  width: 100%;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 14px;
  border-radius: 12px;
  padding: 8px;
  border: 2px solid var(--line);
  background: #fff;
  margin-top: 8px;
}

.ask {
  background: #ecfdf5;
  border: 2px solid #a7f3d0;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 0;
  font-size: 15px;
  color: var(--pine-dark);
}

/* 부모님 리포트 & 알고리즘 설명 */
details.parent {
  margin-top: 20px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px;
  font-size: 14.5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
details.parent summary {
  cursor: pointer;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 19px;
  color: var(--pine);
}
table { width: 100%; border-collapse: collapse; margin: 10px 0; }
th, td { padding: 7px 4px; border-bottom: 1px dashed var(--line); text-align: left; }
td.n, th.n { text-align: right; white-space: nowrap; }
.algo-box {
  background: var(--paper-soft);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 13.5px;
  line-height: 1.55;
}
.reset-btn {
  margin-top: 8px;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid #fca5a5;
  background: #fee2e2;
  color: #991b1b;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  cursor: pointer;
}

/* 산타의 특별 선물 리드 마그넷 카드 */
.santa-gift-card {
  margin-top: 16px;
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
  border: 2.5px solid #f59e0b;
  border-radius: 22px;
  padding: 18px 16px;
  position: relative;
  box-shadow: 0 10px 26px rgba(180, 83, 9, 0.16);
  text-align: center;
}
.gift-ribbon {
  display: inline-block;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.35);
  margin-bottom: 10px;
}
.gift-tag {
  font-size: 12px;
  font-weight: 800;
  color: #b45309;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.santa-gift-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 20px;
  color: #78350f;
  line-height: 1.3;
}
.santa-gift-card p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: #451a03;
}
.gift-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.gift-dl-btn, .gift-next-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 14px;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gift-dl-btn {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  box-shadow: 0 4px 0 #166534;
}
.gift-dl-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #166534; }
.gift-next-btn {
  background: #fff;
  color: #991b1b;
  border: 2px solid #fca5a5;
}
.gift-shop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 16px;
  border-radius: 14px;
  font-family: var(--font-gothic); font-weight: 800; letter-spacing: -0.025em;
  font-size: 16px;
  text-decoration: none;
  background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
  color: #fef3c7;
  border: 2px solid #fde68a;
  box-shadow: 0 4px 0 #5b1414;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-top: 2px;
}
.gift-shop-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #5b1414; }

/* 하단 DS4K 연계 배너 */
.ds4k-promo-card {
  margin-top: 16px;
  background: linear-gradient(135deg, #0f4c3a 0%, #115e59 100%);
  color: #fff;
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  border: 1.5px solid rgba(254, 240, 138, 0.45);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}
@media (min-width: 520px) {
  .ds4k-promo-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.ds4k-promo-card b {
  font-family: var(--font-gothic);
  font-weight: 800;
  letter-spacing: -0.025em;
  font-size: 16px;
  display: block;
  color: var(--gold-soft);
  margin-bottom: 2px;
}
.ds4k-promo-card small {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  display: block;
}
.ds4k-promo-card a {
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--gold);
  color: #1b2838;
  font-family: var(--font-gothic);
  font-weight: 800;
  letter-spacing: -0.025em;
  font-size: 14px;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.ds4k-promo-card small a.ds4k-promo-sub-link {
  padding: 0;
  background: none;
  box-shadow: none;
  color: var(--gold-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  white-space: normal;
  display: inline;
}

[hidden] { display: none !important; }

/* 모바일 전용 1화면 무스크롤 컴팩트 핏 (100dvh) */
@media (max-width: 600px) {
  .wrap {
    padding: 10px 12px 20px;
    max-width: 100%;
  }
  .top {
    margin-bottom: 8px;
    gap: 6px;
  }
  .top-brand {
    padding: 5px 10px;
    font-size: 12px;
  }
  button.ic {
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 16px;
  }
  .carol-pill {
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 10px;
  }

  /* 홈: 상단 히어로 + 3개 타일이 스크롤 없이 첫 화면에 쏙 들어가도록 */
  .hero-card {
    margin-bottom: 8px;
    border-radius: 18px;
    border-width: 2px;
  }
  .hero-bg-slider {
    height: 105px;
  }
  .hero-content {
    padding: 8px 12px;
  }
  .hero-badge {
    font-size: 11px;
    padding: 2px 8px;
    margin-bottom: 3px;
  }
  .hero-title {
    font-size: 21px;
  }
  .hero-sub {
    font-size: 11.5px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tiles {
    gap: 7px;
  }
  .tile {
    padding: 8px 12px;
    border-radius: 16px;
    grid-template-columns: 44px 1fr auto;
    gap: 10px;
  }
  .tile-thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .tile-thumb img {
    width: 36px;
    height: 36px;
  }
  .tile-info b {
    font-size: 16px;
  }
  .tile-desc {
    font-size: 12px;
    margin: 1px 0 2px;
  }
  .stars {
    font-size: 12px;
  }
  .tile-lv {
    font-size: 12px;
    padding: 4px 9px;
  }
  .hint-box {
    margin-top: 10px;
    padding: 8px 10px;
    font-size: 12.5px;
  }

  /* 게임 화면: 문제와 선택지가 스크롤 없이 한 화면에 완벽하게 들어오도록 */
  .board {
    padding: 12px 14px;
    border-radius: 20px;
  }
  .hud {
    margin-bottom: 8px;
  }
  .hud b {
    font-size: 17px;
  }
  .irt-badge {
    font-size: 11px;
    padding: 2px 7px;
  }
  .stage {
    min-height: 115px;
    padding: 10px;
    gap: 8px;
    border-radius: 16px;
  }
  .say {
    font-size: 15.5px;
    gap: 6px;
  }
  .say button {
    min-width: 32px;
    height: 32px;
    font-size: 14px;
    border-radius: 8px;
  }
  .box {
    width: 44px;
    height: 44px;
    font-size: 22px;
    border-radius: 12px;
    padding: 2px;
  }
  .orn-badge {
    width: 36px;
    height: 36px;
  }
  .choices {
    gap: 8px;
    margin-top: 10px;
  }
  .c4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .choices button {
    min-height: 52px;
    padding: 6px 8px;
    border-radius: 14px;
  }
  .choices button .orn-badge {
    width: 42px;
    height: 42px;
  }
  .char-badge {
    width: 46px;
    height: 46px;
  }
  .ch small {
    font-size: 12px;
    margin-top: 2px;
  }
  .goal {
    margin-top: 8px;
  }
  .done-btn {
    margin-top: 8px;
    min-height: 38px;
    font-size: 13px;
    border-radius: 12px;
  }
}

/* ============================================================
   산타가 고른 선물 TOP 3 (결과·상장 화면 아래)
   2026 크리스마스 시즌 — 교구 구매 시 5~7세 PDF 3종 증정
   ============================================================ */
.gift-top3 {
  margin-top: 18px;
  padding: 18px 16px 16px;
  border-radius: 22px;
  background: linear-gradient(160deg, #fffdf5 0%, #fdf1d6 100%);
  border: 2.5px solid var(--gold);
  box-shadow: 0 14px 30px rgba(120, 53, 15, 0.18);
}
.gt3-head {
  text-align: center;
  margin-bottom: 14px;
}
.gt3-kicker {
  display: inline-block;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.025em;
  font-size: 12.5px;
  padding: 4px 13px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.32);
}
.gt3-head h3 {
  margin: 8px 0 4px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #78350f;
  line-height: 1.28;
}
.gt3-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #6b4a1f;
}
.gt3-head p b {
  color: #9a3412;
}
/* 교구 구매 혜택 기준 — 마켓 상단 공지와 같은 내용을 한 곳에만 */
.gt3-note {
  margin: 10px auto 0;
  max-width: 420px;
  padding: 9px 12px;
  border-radius: 12px;
  background: #fff7e6;
  border: 1.5px dashed #eab654;
  text-align: left;
}
.gt3-note p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #6b4a1f;
}
.gt3-note p + p {
  margin-top: 2px;
}
.gt3-note b {
  color: #9a3412;
  font-weight: 900;
}
.gt3-list {
  display: grid;
  gap: 10px;
}
.gt3-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  border: 2px solid #f2e3c0;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gt3-card:active {
  transform: translateY(2px);
  box-shadow: none;
}
.gt3-thumb {
  position: relative;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #f8f1e3;
  border: 1.5px solid #ecdcb6;
}
.gt3-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.gt3-rank {
  position: absolute;
  top: 5px;
  left: 5px;
  background: var(--gold);
  color: #4a2c05;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.02em;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.6;
}
.gt3-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.gt3-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #9a3412;
  background: #fde68a;
  border-radius: 999px;
  padding: 2px 8px;
}
.gt3-body h4 {
  margin: 5px 0 1px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #2c1d13;
  line-height: 1.28;
}
.gt3-sub {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: #6b5a45;
}
.gt3-price {
  margin: 5px 0 4px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #9b1c1c;
}
.gt3-price small {
  font-size: 11px;
  font-weight: 800;
  color: #15803d;
  margin-left: 3px;
}
.gt3-more {
  display: block;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
  background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
  color: #fef3c7;
  border: 2px solid #fde68a;
  box-shadow: 0 4px 0 #5b1414;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gt3-more:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #5b1414;
}

