/* =========================================================
   K-GodGom — "GodGom's Korea, a cute pixel adventure"
   Design system: KGODGOM_DESIGN_SYSTEM.md (this file is the source of truth)
   ========================================================= */

@font-face {
  font-family: "Galmuri11";
  src: url("https://cdn.jsdelivr.net/npm/galmuri@2.40.3/dist/Galmuri11-Bold.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* colour */
  --paper: #F6EFE3;
  --paper-2: #EFE4D2;
  --card: #FFFDF8;
  --ink: #1F1A17;
  --ink-2: #5B524A;
  --navy: #26304F;
  --navy-deep: #171D38;
  --honey: #E0A04F;
  --honey-2: #F6C978;
  --blush: #F08F7A;
  --sd-red: #E2574C;
  --sd-yellow: #F4C542;
  --sd-green: #4FA36C;
  --sd-blue: #4C7FD6;
  --sd-pink: #F49AC1;
  --red-text: #B8352B;         /* AA-contrast red for small text (sd-red stays decorative) */
  --tint-green: #D9EEDF;
  --tint-pink: #FCE1EC;
  --tint-blue: #DDE7FA;
  --tint-yellow: #FBEDB8;

  /* pixel + motion */
  --px: 4px;
  --fc: var(--ink);            /* frame colour */
  --sh: var(--ink);            /* hard shadow colour */
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --ease-soft: cubic-bezier(.22, 1, .36, 1);

  /* sprite frame (native px) */
  --fw: 34;
  --fh: 48;

  /* type */
  --font-display: "Bagel Fat One", "Nunito", system-ui, sans-serif;
  --font-pixel: "Galmuri11", ui-monospace, "Courier New", monospace;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --wrap: 1180px;
  --gutter: 16px;
  --header-h: 76px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--honey-2); color: var(--ink); }
:focus-visible { outline: 3px dashed var(--sd-blue); outline-offset: 6px; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 1100px) { :root { --gutter: 32px; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--card); padding: 10px 14px;
  font-family: var(--font-pixel); text-decoration: none;
}
.skip:focus { top: 12px; }

.sprite { image-rendering: pixelated; image-rendering: crisp-edges; }
.sprite { image-rendering: pixelated; }

.dots {
  background-color: var(--paper);
  background-image: radial-gradient(rgba(38, 48, 79, .13) 1.5px, transparent 1.8px);
  background-size: 16px 16px;
}

/* ---------- pixel frame ---------- */
.px-frame {
  background: var(--card);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--fc),
    0 var(--px) 0 0 var(--fc),
    calc(var(--px) * -1) 0 0 0 var(--fc),
    var(--px) 0 0 0 var(--fc);
  filter: drop-shadow(var(--px) var(--px) 0 var(--sh));
}

/* ---------- buttons ---------- */
.px-btn {
  --bg: var(--card);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 14px 20px; margin: 4px;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-pixel); font-size: 15px; line-height: 1; letter-spacing: .02em;
  text-decoration: none; border: 0; cursor: pointer; white-space: nowrap;
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--fc),
    0 var(--px) 0 0 var(--fc),
    calc(var(--px) * -1) 0 0 0 var(--fc),
    var(--px) 0 0 0 var(--fc),
    inset calc(var(--px) * -1) calc(var(--px) * -1) 0 0 rgba(31, 26, 23, .14);
  filter: drop-shadow(var(--px) var(--px) 0 var(--sh));
  transition: transform 120ms steps(2), filter 120ms steps(2), background-color 120ms;
  -webkit-tap-highlight-color: transparent;
}
.px-btn img { width: 16px; height: 16px; image-rendering: pixelated; }
.px-btn:hover { transform: translate(-2px, -2px); filter: drop-shadow(6px 6px 0 var(--sh)); }
.px-btn:active { transform: translate(var(--px), var(--px)); filter: drop-shadow(0 0 0 var(--sh)); }
.px-btn--primary { --bg: var(--honey); }
.px-btn--primary:hover { --bg: var(--honey-2); }
.px-btn--sm { min-height: 40px; padding: 10px 14px; font-size: 13px; }
.px-btn--xs { min-height: 40px; min-width: 44px; padding: 0 12px; font-size: 14px; margin: 0; }
.px-btn[aria-disabled="true"] { --bg: var(--paper-2); color: var(--ink-2); cursor: not-allowed; }

.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 10px;
  background: var(--card); border: 0; cursor: pointer;
  font-family: var(--font-pixel); font-size: 12px; line-height: 1;
  box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink);
}
.icon-btn__state { color: var(--ink-2); }
.icon-btn[aria-pressed="true"] { background: var(--honey-2); }
.icon-btn[aria-pressed="true"] .icon-btn__state { color: var(--ink); }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--card);
  font-family: var(--font-pixel); font-size: 12px; line-height: 1.2;
  text-transform: uppercase; letter-spacing: .04em;
  box-shadow: 0 -2px 0 0 var(--fc), 0 2px 0 0 var(--fc), -2px 0 0 0 var(--fc), 2px 0 0 0 var(--fc);
}
.chip img { width: 16px; height: 16px; image-rendering: pixelated; }
.chip--honey { background: var(--honey-2); }
.chip--green { background: var(--tint-green); }
.chip--pink { background: var(--tint-pink); }
.chip--blue { background: var(--tint-blue); }
.chip--yellow { background: var(--tint-yellow); }

/* ---------- saekdong (색동) stripe ---------- */
.saekdong {
  height: 10px;
  background: linear-gradient(to bottom,
    var(--sd-red) 0 2px, var(--sd-yellow) 2px 4px, var(--sd-green) 4px 6px,
    var(--sd-blue) 6px 8px, var(--sd-pink) 8px 10px);
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 239, 227, .94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.site-header__row {
  display: flex; align-items: center; gap: 16px;
  height: 60px;
}
.exp {
  display: flex; align-items: center; gap: 8px;
  height: 6px; padding: 0;
  background: var(--navy-deep);
}
.exp__label { display: none; }
.exp__track { flex: 1; height: 6px; display: block; }
.exp__fill {
  display: block; height: 100%;
  width: calc(var(--exp, 0) * 100%);
  background: repeating-linear-gradient(90deg, var(--honey-2) 0 12px, var(--honey) 12px 16px);
  transition: width 120ms steps(3);
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand__face { width: 32px; height: 32px; image-rendering: pixelated; }
.brand__name { font-family: var(--font-display); font-size: 1.35rem; line-height: 1; letter-spacing: .01em; }
.brand__ko { font-family: var(--font-pixel); font-size: 13px; color: var(--ink-2); transform: translateY(1px); }

.nav { display: none; }
.nav a {
  position: relative;
  font-family: var(--font-pixel); font-size: 13px; text-decoration: none;
  padding: 8px 6px;
}
.nav a::before {
  content: "▶"; position: absolute; left: -8px; top: 50%;
  font-size: 9px; color: var(--sd-red);
  transform: translateY(-50%); opacity: 0;
}
.nav a:hover::before, .nav a:focus-visible::before { opacity: 1; animation: nudge .6s steps(2) infinite; }
.site-header__tools { display: flex; align-items: center; gap: 10px; }

@media (min-width: 980px) {
  .nav { display: flex; gap: 18px; }
  .icon-btn--menu { display: none; }
}
@media (max-width: 979px) {
  .nav.is-open {
    display: flex; flex-direction: column;
    position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 8px);
    padding: 12px 16px; background: var(--card);
    box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink);
    filter: drop-shadow(4px 4px 0 var(--ink));
  }
  .nav.is-open a { padding: 12px 18px; font-size: 15px; }
  .nav.is-open a::before { left: 2px; }
}
@media (max-width: 420px) {
  .brand__ko { display: none; }
  #sound-toggle .icon-btn__label { display: none; }
}

/* ---------- section scaffolding ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); position: relative; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(36px, 5vw, 56px); }
.section-head--left { text-align: left; margin-left: 0; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-pixel); font-size: 13px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--navy);
  margin-bottom: 14px;
}
.kicker::before { content: ""; width: 8px; height: 8px; background: var(--honey); box-shadow: 0 0 0 2px var(--ink); }
.kicker--light { color: var(--honey-2); }
.section h2, .contact h2 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: .005em;
}
.section-lead { margin-top: 14px; font-size: 1.125rem; color: var(--ink-2); }

/* reveal (only when JS is on) */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms var(--ease-soft), transform 480ms var(--ease-pop);
  transition-delay: calc(var(--ri, 0) * 60ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }
/* after the staggered reveal has played (JS adds .is-settled), hover lifts work again with their own timing */
.js .reveal.is-settled { transition-delay: 0s; }
.js button.word.reveal.is-settled,
.js .quest.reveal.is-settled { transition: opacity 480ms var(--ease-soft), transform 240ms var(--ease-pop); }
.js button.word.reveal.is-in:hover { transform: translateY(-4px); }
.js .quest.reveal.is-in:hover { transform: translateY(-6px) rotate(-.4deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; overflow: hidden; padding-block: clamp(28px, 5vw, 64px) clamp(48px, 7vw, 88px); }
.hero__sky { position: absolute; inset: 0; pointer-events: none; }
.hero__inner { position: relative; display: grid; gap: 12px; align-items: center; }
@media (min-width: 960px) { .hero__inner { grid-template-columns: 1.02fr .98fr; gap: 24px; } }

.hero__copy { position: relative; z-index: 2; }
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.25rem);
  line-height: 1.02;
  margin: 18px 0 18px;
}
.hl {
  background: linear-gradient(transparent 58%, var(--honey-2) 58% 92%, transparent 92%);
  padding-inline: .06em;
}
.hero__lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); max-width: 34em; color: var(--ink-2); }
.hero__lead em { font-style: normal; font-weight: 800; color: var(--ink); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px -4px; }
.hero__promise {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-pixel); font-size: 13px; color: var(--navy);
}
.hero__promise img { width: 16px; height: 16px; image-rendering: pixelated; }

.hero__stage {
  position: relative;
  height: clamp(440px, 60vw, 620px);
  --mx: 0; --my: 0;
}

/* clouds */
.cloud { position: absolute; width: 96px; height: auto; image-rendering: pixelated; opacity: .95; animation: drift linear infinite; will-change: transform; }
.cloud--1 { top: 6%; animation-duration: 70s; animation-delay: -12s; }
.cloud--2 { top: 20%; width: 64px; animation-duration: 95s; animation-delay: -55s; opacity: .7; }
.cloud--3 { top: 2%; width: 128px; animation-duration: 120s; animation-delay: -88s; opacity: .8; }
@keyframes drift { from { transform: translateX(-160px); } to { transform: translateX(calc(100vw + 40px)); } }

/* floating pixel props */
.floaty {
  position: absolute; left: var(--x); top: var(--y);
  width: 48px; z-index: 1;
  transform: translate3d(calc(var(--mx) * var(--d) * 18px), calc(var(--my) * var(--d) * 18px), 0);
  transition: transform 500ms var(--ease-soft);
}
.floaty img { width: 100%; image-rendering: pixelated; animation: float 4.2s ease-in-out infinite; animation-delay: var(--t); }
.floaty--sm { width: 32px; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}
.twinkle { position: absolute; left: var(--x); top: var(--y); width: 32px; z-index: 1; }
.twinkle img { width: 100%; image-rendering: pixelated; animation: twinkle 1.6s steps(2) infinite; animation-delay: var(--t); }
@keyframes twinkle { 0% { opacity: 1; transform: scale(1); } 50% { opacity: .2; transform: scale(.6); } 100% { opacity: 1; transform: scale(1); } }
@media (max-width: 600px) {
  .floaty { width: 32px; }
  .floaty--sm { width: 16px; }
  .twinkle { width: 16px; }
}

/* dialog (RPG) */
.dialog {
  position: relative; display: block; text-align: left;
  background: var(--card);
  padding: 22px 34px 16px 18px;
  font-family: var(--font-pixel); font-size: 17px; line-height: 1.45;
  color: var(--ink); border: 0; cursor: pointer;
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--fc),
    0 var(--px) 0 0 var(--fc),
    calc(var(--px) * -1) 0 0 0 var(--fc),
    var(--px) 0 0 0 var(--fc);
  filter: drop-shadow(var(--px) var(--px) 0 var(--sh));
}
.dialog__name {
  position: absolute; top: -14px; left: 12px;
  padding: 5px 8px 4px;
  background: var(--navy); color: var(--card);
  font-size: 11px; letter-spacing: .08em; line-height: 1;
  box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink);
}
.dialog__caret { position: absolute; right: 12px; bottom: 8px; font-size: 10px; color: var(--sd-red); animation: caret 1s steps(2) infinite; }
.dialog.is-typing .dialog__caret { visibility: hidden; }
@keyframes caret { 0% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(3px); opacity: .25; } 100% { transform: translateY(0); opacity: 1; } }
.dialog__text { display: block; min-height: 1.45em; }

.hero__dialog {
  position: absolute; z-index: 3;
  left: 4%; top: 3%;
  min-width: 220px; max-width: min(320px, 78%);
}
.hero__dialog::after {
  content: ""; position: absolute; left: 62%; bottom: -16px;
  width: 20px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 4' shape-rendering='crispEdges'%3E%3Crect x='0' y='0' width='1' height='1' fill='%231F1A17'/%3E%3Crect x='1' y='0' width='3' height='1' fill='%23FFFDF8'/%3E%3Crect x='4' y='0' width='1' height='1' fill='%231F1A17'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%231F1A17'/%3E%3Crect x='2' y='1' width='2' height='1' fill='%23FFFDF8'/%3E%3Crect x='4' y='1' width='1' height='1' fill='%231F1A17'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%231F1A17'/%3E%3Crect x='3' y='2' width='1' height='1' fill='%23FFFDF8'/%3E%3Crect x='4' y='2' width='1' height='1' fill='%231F1A17'/%3E%3Crect x='3' y='3' width='2' height='1' fill='%231F1A17'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  image-rendering: pixelated;
}

/* bear */
.bear {
  position: absolute; left: 50%; bottom: 8%;
  transform: translateX(-46%);
  padding: 0; border: 0; background: none; cursor: pointer; z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.bear:focus-visible { outline-offset: 0; }
.bear__body { position: relative; display: block; transform-origin: 50% 100%; animation: breathe 2.6s ease-in-out infinite; }
.bear__img { display: block; height: clamp(300px, 46vw, 500px); width: auto; max-width: none; user-select: none; -webkit-user-drag: none; }
.bear__shadow {
  position: absolute; left: 50%; bottom: -12px;
  width: 64%; height: 20px;
  background: rgba(31, 26, 23, .16);
  transform: translateX(-50%);
  clip-path: polygon(8% 0, 92% 0, 92% 25%, 100% 25%, 100% 75%, 92% 75%, 92% 100%, 8% 100%, 8% 75%, 0 75%, 0 25%, 8% 25%);
  animation: shadow 2.6s ease-in-out infinite;
  z-index: -1;
}
@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-6px) scale(1.01, 1.025); }
}
@keyframes shadow {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 1; }
  50% { transform: translateX(-50%) scaleX(.9); opacity: .75; }
}
.bear.is-hop .bear__body { animation: hop 640ms var(--ease-pop), breathe 2.6s ease-in-out 640ms infinite; }
@keyframes hop {
  0% { transform: translateY(0) scale(1, 1); }
  18% { transform: translateY(0) scale(1.07, .92); }
  50% { transform: translateY(-36px) scale(.96, 1.05); }
  78% { transform: translateY(0) scale(1.05, .95); }
  100% { transform: translateY(0) scale(1, 1); }
}
.hero__hint {
  position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  font-family: var(--font-pixel); font-size: 12px; color: var(--ink-2);
  animation: blink 1.4s steps(2) infinite;
  white-space: nowrap;
}
@keyframes blink { 0% { opacity: 1; } 50% { opacity: .2; } 100% { opacity: 1; } }

@media (max-width: 959px) {
  .hero__stage { height: clamp(420px, 104vw, 560px); }
  .hero__dialog { left: 0; top: 0; }
  .bear { bottom: 9%; }
  .bear__img { height: clamp(280px, 78vw, 420px); }
}

/* ---------- ticker ---------- */
.ticker { background: var(--navy-deep); color: var(--honey-2); overflow: hidden; padding: 14px 0; }
.ticker__track {
  display: flex; gap: 22px; width: max-content;
  font-family: var(--font-pixel); font-size: 15px; letter-spacing: .06em; white-space: nowrap;
  animation: ticker 48s linear infinite;
}
.ticker__track i { font-style: normal; color: var(--sd-pink); }
.ticker:hover .ticker__track, .ticker:focus-within .ticker__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* =========================================================
   ABOUT
   ========================================================= */
.equation { display: grid; gap: 20px; align-items: stretch; }
@media (min-width: 900px) {
  .equation { grid-template-columns: 1fr auto 1fr auto 1fr; gap: 18px; }
}
.equation__op {
  align-self: center; justify-self: center;
  font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--honey);
  -webkit-text-stroke: 2px var(--ink);
}
.word {
  position: relative; display: block; width: 100%;
  padding: 26px 22px 24px; border: 0;
  text-align: center; color: var(--ink);
  min-height: 300px;
}
button.word { cursor: pointer; }
button.word:hover { transform: translateY(-4px); }
button.word { transition: transform 240ms var(--ease-pop); }
.word__face { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.word__face--back { display: none; }
.word.is-flipped .word__face--front { display: none; }
.word.is-flipped .word__face--back { display: flex; }
.word.is-flipping { animation: pxflip 360ms steps(6); }
@keyframes pxflip { 0% { transform: scaleX(1); } 50% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
.word__icon { width: 48px; height: 48px; image-rendering: pixelated; margin-bottom: 4px; }
.word__icon.sprite { width: 64px; height: 64px; margin: -8px 0 -4px; } /* 32px sprite at x2, same layout box as the 48px icons */
.word__ko { font-family: var(--font-display); font-size: 4rem; line-height: 1.05; }
.word__rom { font-family: var(--font-pixel); font-size: 14px; color: var(--navy); letter-spacing: .06em; }
.word__def { margin-top: 8px; font-size: 1rem; color: var(--ink-2); max-width: 22em; }
.word__def [lang="ko"], .profile__info [lang="ko"] { white-space: nowrap; }
.word__more {
  margin-top: auto; padding-top: 14px;
  font-family: var(--font-pixel); font-size: 12px; color: var(--red-text);
  animation: blink 1.6s steps(2) infinite;
}
.word--result { background: var(--honey-2); }
.word--result .word__def { color: var(--ink); }

.about__grid { display: grid; gap: 32px; margin-top: clamp(40px, 6vw, 72px); }
@media (min-width: 1080px) { .about__grid { grid-template-columns: 1fr 1fr; align-items: stretch; } }

/* 100-day challenge */
.challenge { padding: 26px 22px; display: flex; flex-direction: column; gap: 14px; }
.challenge__title, .profile__title {
  font-family: var(--font-pixel); font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--navy);
}
.challenge__story { color: var(--ink-2); }
.challenge__screen {
  position: relative; display: grid; justify-items: center; gap: 10px;
  padding: 18px 16px 16px;
  background-color: var(--navy-deep);
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1.5px, transparent 1.8px);
  background-size: 16px 16px;
  box-shadow: inset 0 0 0 4px var(--ink);
  color: var(--card);
}
.challenge__walker, .walker {
  --s: 3;
  width: calc(var(--fw) * var(--s) * 1px);
  height: calc(var(--fh) * var(--s) * 1px);
  background: url("../img/px/sprite-godgom-walk.png") 0 0 / calc(var(--fw) * 4 * var(--s) * 1px) 100% no-repeat;
  image-rendering: pixelated;
  animation: walkcycle .64s steps(4) infinite;
}
@keyframes walkcycle { to { background-position: calc(var(--fw) * -4 * var(--s) * 1px) 0; } }
.challenge__walker.is-hop { animation: walkcycle .64s steps(4) infinite, minihop 420ms var(--ease-pop); }
@keyframes minihop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-18px); } }
.challenge.is-done .challenge__walker { animation: walkcycle .32s steps(4) infinite, minihop 520ms var(--ease-pop) infinite; }
.challenge__day { font-family: var(--font-pixel); font-size: 20px; color: var(--honey-2); }
.challenge__day b { color: var(--card); font-weight: 400; }
.challenge__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: -4px; }
.challenge__result {
  font-family: var(--font-pixel); font-size: 15px; color: var(--red-text);
  animation: resultpop 520ms var(--ease-pop);
}
.challenge__result span { display: block; margin-top: 6px; font-family: var(--font-body); font-size: 1rem; color: var(--ink-2); }
@keyframes resultpop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.challenge__reset {
  align-self: flex-start; background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-family: var(--font-pixel); font-size: 13px; color: var(--navy); text-decoration: underline;
}

/* segmented bars */
.segbar { display: grid; grid-template-columns: repeat(var(--n, 20), 1fr); gap: 3px; width: 100%; height: 16px; }
.segbar i { display: block; background: rgba(255, 255, 255, .14); }
.segbar i.on { background: var(--honey); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.onair .segbar i { background: rgba(31, 26, 23, .1); }
.onair .segbar i.on { background: var(--sd-red); }

/* profile */
.profile { display: grid; gap: 20px; padding: 26px 22px; }
@media (min-width: 520px) { .profile { grid-template-columns: auto 1fr; } }
.profile__portrait {
  position: relative; display: grid; place-items: center;
  min-width: 168px; min-height: 220px; padding: 18px;
  background-color: var(--navy-deep);
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1.5px, transparent 1.8px);
  background-size: 16px 16px;
  box-shadow: inset 0 0 0 4px var(--ink);
}
.profile__lv {
  position: absolute; left: 10px; top: 10px;
  font-family: var(--font-pixel); font-size: 11px; color: var(--honey-2);
}
.sprite-stack { position: relative; --s: 4; }
.sprite-stack .sprite { width: calc(var(--fw) * var(--s) * 1px); height: calc(var(--fh) * var(--s) * 1px); }
.sprite-stack .sprite--blink { position: absolute; inset: 0; opacity: 0; animation: eyeblink 4.2s steps(1) infinite; }
.sprite-stack .sprite--idle { animation: spritebob 1.2s steps(2) infinite; }
.sprite-stack .sprite--blink { animation: eyeblink 4.2s steps(1) infinite, spritebob 1.2s steps(2) infinite; }
@keyframes eyeblink { 0%, 93% { opacity: 0; } 94%, 97% { opacity: 1; } 98%, 100% { opacity: 0; } }
@keyframes spritebob { 0% { transform: translateY(0); } 50% { transform: translateY(calc(var(--s) * -1px)); } 100% { transform: translateY(0); } }
.profile__info { margin: 12px 0 16px; display: grid; gap: 6px; }
.profile__info div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; }
.profile__info dt { font-family: var(--font-pixel); font-size: 12px; text-transform: uppercase; color: var(--ink-2); padding-top: 4px; }
.profile__info dd { margin: 0; font-weight: 700; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.statbar { display: grid; grid-template-columns: minmax(84px, 116px) minmax(60px, 1fr) 22px; gap: 10px; align-items: center; }
.statbar span { font-family: var(--font-pixel); font-size: 12px; text-transform: uppercase; }
.statbar em { font-family: var(--font-pixel); font-style: normal; font-size: 12px; text-align: right; color: var(--ink-2); }
.statbar b { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; height: 14px; }
.statbar b i { background: rgba(31, 26, 23, .1); transition: background-color 1ms; transition-delay: calc(var(--i) * 70ms); }
.statbar b i.on { background: var(--honey); }
.statbar:nth-child(2) b i.on { background: var(--sd-green); }
.statbar:nth-child(3) b i.on { background: var(--sd-blue); }
.statbar:nth-child(4) b i.on { background: var(--sd-red); }

.about__name {
  margin: clamp(40px, 6vw, 64px) auto 0; max-width: 760px; text-align: center;
  font-size: 1.125rem; color: var(--ink-2);
}
.about__name strong { color: var(--ink); }

/* =========================================================
   QUESTS
   ========================================================= */
.quests { background: var(--paper-2); }
.quest-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .quest-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.quest { display: flex; flex-direction: column; transition: transform 240ms var(--ease-pop); }
.quest:hover { transform: translateY(-6px) rotate(-.4deg); }
.quest__media { position: relative; overflow: hidden; box-shadow: inset 0 -4px 0 0 var(--ink); }
.quest__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 600ms var(--ease-soft); }
.quest:hover .quest__media img { transform: scale(1.04); }
.quest__body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.quest__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-family: var(--font-pixel); font-size: 12px; text-transform: uppercase; color: var(--ink-2); }
.quest h3 { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.quest h3 img { width: 32px; height: 32px; image-rendering: pixelated; flex: none; }
.quest p { color: var(--ink-2); }
.quest__note { margin-top: auto; font-size: .95rem; font-weight: 700; color: var(--navy) !important; }

/* =========================================================
   TRY THE MVP
   ========================================================= */
.try {
  --fc: var(--ink);
  --sh: #070A18;
  background-color: var(--navy-deep);
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1.5px, transparent 1.8px);
  background-size: 16px 16px;
  color: var(--card);
}
.try__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; }
@media (min-width: 1000px) { .try__inner { grid-template-columns: 1fr 420px; gap: 64px; } }
.try .section-head { margin-bottom: 18px; }
.try__lead { font-size: 1.15rem; color: #D9DCEA; max-width: 34em; }
.features { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.features li { display: flex; gap: 14px; align-items: flex-start; }
.features img { width: 32px; height: 32px; image-rendering: pixelated; flex: none; margin-top: 2px; }
.features strong { display: block; font-size: 1.05rem; color: var(--card); }
.features span { display: block; font-size: .98rem; color: #BFC4DA; }
.try__status { margin-bottom: 18px; }
.try__status .chip { color: var(--ink); }
.try__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-left: -4px; }

/* console device */
.console { width: 100%; max-width: 400px; min-width: 0; margin-inline: auto; }
.console__body {
  padding: 20px 16px 18px;
  background: var(--honey);
  box-shadow:
    0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink),
    inset -6px -6px 0 0 rgba(31, 26, 23, .16), inset 6px 6px 0 0 rgba(255, 255, 255, .25);
  filter: drop-shadow(8px 8px 0 #070A18);
}
.console__screen {
  position: relative;
  height: 560px;
  background: var(--paper);
  box-shadow: inset 0 0 0 4px var(--ink);
  padding: 4px;
  overflow: hidden;
}
.console__screen :focus-visible { outline-offset: -5px; }
.console__screen iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--paper); }
.console__controls { display: flex; align-items: center; justify-content: space-between; padding: 18px 8px 2px; }
.console__brand { font-family: var(--font-pixel); font-size: 11px; color: var(--ink); letter-spacing: .1em; opacity: .7; }
.dpad { position: relative; width: 48px; height: 48px; }
.dpad i { position: absolute; background: var(--ink); }
.dpad i:nth-child(1) { left: 16px; top: 0; width: 16px; height: 48px; }
.dpad i:nth-child(2) { left: 0; top: 16px; width: 48px; height: 16px; }
.dpad i:nth-child(3), .dpad i:nth-child(4) { display: none; }
.ab { display: flex; gap: 10px; transform: rotate(-18deg); }
.ab i {
  display: grid; place-items: center; width: 30px; height: 30px;
  background: var(--sd-red); color: var(--card);
  font-family: var(--font-pixel); font-size: 11px; font-style: normal;
  clip-path: polygon(25% 0, 75% 0, 75% 12%, 88% 12%, 88% 25%, 100% 25%, 100% 75%, 88% 75%, 88% 88%, 75% 88%, 75% 100%, 25% 100%, 25% 88%, 12% 88%, 12% 75%, 0 75%, 0 25%, 12% 25%, 12% 12%, 25% 12%);
}
.console__caption { margin-top: 18px; text-align: center; font-size: .92rem; color: #BFC4DA; }

/* in-console app */
.app { position: relative; display: flex; flex-direction: column; height: 100%; color: var(--ink); background: var(--paper); }
.app__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--navy); color: var(--card);
}
.app__bar .sprite { width: 32px; height: 32px; }
.app__title { font-family: var(--font-pixel); font-size: 14px; flex: 1; }
.app__badge { font-family: var(--font-pixel); font-size: 10px; padding: 3px 6px; background: var(--honey-2); color: var(--ink); }
.app__view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.app__view[hidden] { display: none; }
.app__hint { padding: 10px 12px 4px; font-family: var(--font-pixel); font-size: 11px; color: var(--ink-2); text-transform: uppercase; }
.app__tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); box-shadow: 0 -4px 0 0 var(--ink); }
.app__tabs button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px 8px; border: 0; background: none; cursor: pointer;
  font-family: var(--font-pixel); font-size: 11px; color: var(--ink-2);
}
.app__tabs button img { width: 16px; height: 16px; image-rendering: pixelated; opacity: .55; }
.app__tabs button[aria-selected="true"] { background: var(--honey-2); color: var(--ink); }
.app__tabs button[aria-selected="true"] img { opacity: 1; }

/* chat */
.chat { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 10px 4px; scroll-behavior: smooth; }
.msg { margin: 10px 2px; max-width: 88%; font-size: .95rem; line-height: 1.45; animation: msgin 320ms var(--ease-pop); }
@keyframes msgin { from { transform: translateY(8px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.msg--user {
  margin-left: auto; padding: 8px 11px;
  background: var(--navy); color: var(--card);
  box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink);
}
.msg--bot {
  position: relative; margin-top: 20px; padding: 16px 12px 10px;
  background: var(--card);
  box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink);
}
.msg__name {
  position: absolute; top: -11px; left: 8px; padding: 3px 6px 2px;
  background: var(--navy); color: var(--card);
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: .08em;
}
.msg__lang { display: inline-block; margin-right: 6px; font-family: var(--font-pixel); font-size: 10px; color: var(--honey-2); }
.msg--bot .msg__caret { display: inline-block; margin-left: 4px; font-size: 9px; color: var(--sd-red); animation: caret 1s steps(2) infinite; }
.msg--typing { display: flex; align-items: center; gap: 8px; padding: 12px; }
.typing-walker { --s: 1; }
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots i { width: 6px; height: 6px; background: var(--ink); animation: dot 900ms steps(2) infinite; }
.typing-dots i:nth-child(2) { animation-delay: 150ms; }
.typing-dots i:nth-child(3) { animation-delay: 300ms; }
@keyframes dot { 0% { transform: translateY(0); } 50% { transform: translateY(-4px); } 100% { transform: translateY(0); } }

.chat__chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 10px; scrollbar-width: none; }
.chat__chips::-webkit-scrollbar { display: none; }
.qchip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 9px; background: var(--card); border: 0; cursor: pointer;
  font-size: .82rem; font-weight: 700; white-space: nowrap;
  box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink);
  transition: transform 120ms steps(2);
}
.qchip:hover { transform: translateY(-2px); background: var(--honey-2); }
.qchip b { font-family: var(--font-pixel); font-weight: 400; font-size: 10px; padding: 2px 4px; background: var(--navy); color: var(--card); }
.chat__form { display: flex; gap: 10px; padding: 6px 10px 12px; align-items: center; }
.chat__form input {
  flex: 1; min-width: 0; height: 40px; padding: 0 10px;
  font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--card); border: 0;
  box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink);
}
.chat__form input:focus { outline: 3px solid var(--honey); outline-offset: 2px; }

/* cards */
.cards { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 8px 12px 14px; align-content: start; }
.card-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 0 0 8px;
  background: var(--card); border: 0; cursor: pointer; text-align: left;
  box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink);
  transition: transform 200ms var(--ease-pop);
}
.card-tile:hover { transform: translateY(-3px) rotate(-1deg); }
.card-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.card-tile strong { padding: 0 8px; font-size: .88rem; line-height: 1.2; }
.card-tile span { padding: 0 8px; font-family: var(--font-pixel); font-size: 10px; color: var(--ink-2); }

/* places */
.places { flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 12px; padding: 8px 12px 14px; align-content: start; }
.place-row {
  display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center;
  padding: 6px; background: var(--card); border: 0; text-align: left; cursor: pointer;
  box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink);
  transition: transform 200ms var(--ease-pop);
}
.place-row:hover { transform: translateX(3px); }
.place-row img { width: 72px; height: 72px; object-fit: cover; }
.place-row strong { display: block; font-size: .95rem; line-height: 1.2; }
.place-row span { display: block; font-size: .82rem; color: var(--ink-2); line-height: 1.35; }

/* detail sheet inside app */
.sheet {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  background: var(--paper);
  animation: sheetin 360ms var(--ease-pop);
}
@keyframes sheetin { from { transform: translateY(14%); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--navy); color: var(--card); }
.sheet__back {
  border: 0; background: var(--honey-2); color: var(--ink); cursor: pointer;
  font-family: var(--font-pixel); font-size: 11px; padding: 6px 8px;
}
.sheet__title { font-family: var(--font-pixel); font-size: 13px; }
.sheet__body { flex: 1; overflow-y: auto; padding: 12px 14px 18px; }
.sheet__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; box-shadow: 0 0 0 3px var(--ink); margin-bottom: 14px; }
.sheet h4 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; line-height: 1.1; }
.sheet__ko { font-family: var(--font-pixel); font-size: 12px; color: var(--navy); }
.sheet ol { margin: 12px 0; padding-left: 20px; font-size: .93rem; }
.sheet ol li { margin-bottom: 6px; }
.sheet p { font-size: .93rem; margin-top: 10px; }
.phrase {
  margin-top: 12px; padding: 12px; background: var(--card);
  box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink);
}
.phrase__label { font-family: var(--font-pixel); font-size: 10px; color: var(--ink-2); text-transform: uppercase; }
.phrase__ko { font-size: 1.25rem; font-weight: 800; margin-top: 4px; }
.phrase__rom { font-family: var(--font-pixel); font-size: 12px; color: var(--navy); }
.phrase__en { font-size: .9rem; color: var(--ink-2); }
.phrase .px-btn { margin: 10px 0 0 4px; }
.tip { margin-top: 12px; padding: 10px 12px; background: var(--tint-yellow); font-size: .9rem; box-shadow: 0 0 0 3px var(--ink); }
.tip b { font-family: var(--font-pixel); font-weight: 400; font-size: 11px; display: block; margin-bottom: 2px; }

/* =========================================================
   YOUTUBE (channel guide)
   ========================================================= */
.yt { background: var(--paper-2); }
.yt__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; align-items: start; }
@media (min-width: 960px) { .yt__grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 64px; } }
.yt .section-head { margin-bottom: 28px; }

.channel { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.channel__avatar { width: 64px; height: 64px; image-rendering: pixelated; background: var(--paper); box-shadow: 0 0 0 3px var(--ink); }
.channel__meta { flex: 1; min-width: 140px; }
.channel__name { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; }
.channel__handle { font-family: var(--font-pixel); font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.channel__sub { margin: 4px; }

.yt__topics { list-style: none; margin: 30px 0; padding: 0; display: grid; gap: 16px; }
.yt__topics li { display: flex; gap: 14px; align-items: flex-start; }
.yt__topics img { width: 32px; height: 32px; image-rendering: pixelated; flex: none; margin-top: 2px; }
.yt__topics strong { display: block; font-size: 1.05rem; }
.yt__topics span { display: block; color: var(--ink-2); }

.yt__season { padding: 18px 18px 16px; display: grid; gap: 10px; }
.yt__season-label { font-family: var(--font-pixel); font-size: 12px; text-transform: uppercase; color: var(--navy); }
.yt__season-count { font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.yt__season-count span { color: var(--ink-2); }
.yt__season .segbar i { background: rgba(31, 26, 23, .1); }
.yt__season .segbar i.on { background: var(--sd-red); }
.yt__how { margin: 6px 0 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 4px; }

/* phone player */
.yt__player { display: grid; justify-items: center; gap: 16px; }
.phone {
  position: relative; width: min(100%, 320px);
  padding: 34px 12px 18px;
  background: var(--navy);
  box-shadow:
    0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink),
    inset 6px 6px 0 0 rgba(255, 255, 255, .12), inset -6px -6px 0 0 rgba(0, 0, 0, .2);
  filter: drop-shadow(6px 6px 0 var(--ink));
}
.phone__notch { position: absolute; top: 14px; left: 50%; width: 64px; height: 8px; transform: translateX(-50%); background: var(--ink); }
.phone__screen { position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: #000; box-shadow: 0 0 0 3px var(--ink); }
.phone__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lite { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: #000; }
.lite__thumb { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.lite__play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); image-rendering: pixelated; transition: transform 240ms var(--ease-pop); }
.lite:hover .lite__play { transform: translate(-50%, -50%) scale(1.12); }
.lite__handle { position: absolute; left: 10px; bottom: 10px; font-family: var(--font-pixel); font-size: 12px; color: var(--card); text-shadow: 2px 2px 0 var(--ink); }
.yt__now { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; text-align: center; font-weight: 800; max-width: 340px; }

/* latest list */
.yt__latest { margin-top: clamp(48px, 7vw, 80px); }
.yt__latest-title { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 22px; }
.yt__list {
  list-style: none; margin: 0; padding: 8px 6px 22px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 172px; gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--ink) transparent;
}
@media (min-width: 960px) { .yt__list { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); overflow: visible; } }
.yt-card { scroll-snap-align: start; }
.yt-card__btn {
  display: block; width: 100%; padding: 0; border: 0; cursor: pointer; text-align: left; background: none;
}
.yt-card__thumb {
  position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; background: #000;
  box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink);
  filter: drop-shadow(4px 4px 0 var(--ink));
  transition: transform 240ms var(--ease-pop);
}
.yt-card__thumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.yt-card__thumb .lite__play { width: 48px; height: 48px; }
.yt-card__btn:hover .yt-card__thumb { transform: translateY(-6px); }
.yt-card.is-playing .yt-card__thumb { outline: 4px solid var(--honey); outline-offset: 4px; }
.yt-card__ep { position: absolute; left: 8px; top: 8px; font-family: var(--font-pixel); font-size: 11px; padding: 3px 6px; background: var(--card); color: var(--ink); }
.yt-card__title { display: block; margin-top: 12px; font-weight: 800; line-height: 1.3; font-size: .95rem; }
.yt-card__date { display: block; font-family: var(--font-pixel); font-size: 11px; color: var(--ink-2); margin-top: 4px; }
.yt__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0 -4px; }

/* =========================================================
   STAGES
   ========================================================= */
.stage-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px 22px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .stage-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .stage-grid { grid-template-columns: repeat(5, 1fr); } }
.stage__btn {
  display: block; width: 100%; padding: 0 0 12px; border: 0; cursor: pointer; text-align: left;
  background: var(--card);
  box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink);
  filter: drop-shadow(4px 4px 0 var(--ink));
  transition: transform 240ms var(--ease-pop);
}
.stage__btn:hover { transform: translateY(-6px) rotate(.6deg); }
.stage__img { overflow: hidden; box-shadow: inset 0 -4px 0 var(--ink); }
.stage__img img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 500ms var(--ease-soft); }
.stage__btn:hover .stage__img img { transform: scale(1.06); }
.stage__no { display: block; padding: 10px 10px 0; font-family: var(--font-pixel); font-size: 11px; color: var(--red-text); }
.stage__name { display: block; padding: 2px 10px 0 10px; font-weight: 800; line-height: 1.25; position: relative; }
.stage__name::before {
  content: "▶"; position: absolute; left: -2px; font-size: 9px; top: 6px; color: var(--sd-red);
  opacity: 0; transform: translateX(-6px); transition: opacity 120ms steps(2), transform 120ms steps(2);
}
.stage__btn:hover .stage__name::before, .stage__btn:focus-visible .stage__name::before { opacity: 1; transform: none; }
.stage__style { display: block; padding: 4px 10px 0; font-size: .85rem; color: var(--ink-2); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { text-align: center; padding-block: clamp(80px, 11vw, 140px); }
.contact__inner { display: flex; flex-direction: column; align-items: center; }
.letter { position: relative; display: flex; align-items: flex-end; gap: 6px; margin-bottom: 26px; }
.letter__icon { width: 96px; height: 96px; image-rendering: pixelated; animation: float 3.6s ease-in-out infinite; }
.letter__bear { --s: 2; }
.contact h2 { margin-top: 2px; }
.contact .section-lead { max-width: 36em; }
.contact__email {
  display: inline-block; margin: 28px 0 18px;
  font-family: var(--font-display); font-size: clamp(1.75rem, 6.4vw, 3.6rem); line-height: 1.1;
  text-decoration: none; word-break: break-all;
  background: linear-gradient(transparent 62%, var(--honey-2) 62% 92%, transparent 92%);
  transition: background-size 240ms var(--ease-soft);
}
.contact__email:hover { color: var(--navy); }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--navy-deep); color: #D9DCEA; }
.ground { position: relative; height: 150px; overflow: hidden; background: var(--paper); }
.ground .cloud--f1 { top: 14px; animation-duration: 80s; animation-delay: -20s; width: 80px; }
.ground .cloud--f2 { top: 40px; animation-duration: 110s; animation-delay: -70s; width: 48px; opacity: .7; }
.grass {
  position: absolute; left: 0; right: 0; bottom: 0; height: 32px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 2' shape-rendering='crispEdges'%3E%3Crect x='1' y='0' width='1' height='2' fill='%234FA36C'/%3E%3Crect x='5' y='1' width='1' height='1' fill='%234FA36C'/%3E%3C/svg%3E") 0 0 / 32px 8px repeat-x,
    linear-gradient(to bottom, transparent 0 8px, var(--sd-green) 8px 16px, #3B8456 16px 20px, #8A5A2B 20px);
}
.walker {
  --s: 2;
  position: absolute; bottom: 28px; left: 0;
  animation: walkcycle .64s steps(4) infinite, walkacross 26s linear infinite;
}
@keyframes walkacross { from { transform: translateX(-120px); } to { transform: translateX(calc(100vw + 20px)); } }
.site-footer__row { display: grid; gap: 14px; padding-block: 36px 44px; }
@media (min-width: 900px) { .site-footer__row { grid-template-columns: auto 1fr; align-items: center; } }
.brand--light { color: var(--card); }
.brand--light .brand__ko { color: var(--honey-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--font-pixel); font-size: 13px; }
@media (min-width: 900px) { .footer-links { justify-content: flex-end; } }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--honey-2); }
.site-footer__legal { font-size: .9rem; color: #A9AEC6; }
.site-footer__egg { font-family: var(--font-pixel); font-size: 11px; color: #9AA0BD; }
@media (min-width: 900px) { .site-footer__egg { text-align: right; } }

/* =========================================================
   MODAL / TOAST / FX
   ========================================================= */
.modal { padding: 0; border: 0; background: transparent; max-width: min(760px, calc(100vw - 32px)); width: 100%; overflow: visible; max-height: none; }
.modal::backdrop { background: rgba(23, 29, 56, .72); }
.modal[open] { animation: modalin 360ms var(--ease-pop); }
@keyframes modalin { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__box {
  padding: 18px;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); /* 32px leaves room for the outward pixel border */
  overflow-y: auto; overscroll-behavior: contain;
}
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.modal__title { font-family: var(--font-pixel); font-size: 14px; text-transform: uppercase; }
.modal__close {
  width: 40px; height: 40px; border: 0; cursor: pointer; background: var(--honey-2);
  font-family: var(--font-pixel); font-size: 14px;
  box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink);
}
.modal__body img { width: auto; max-width: 100%; height: auto; max-height: 60vh; max-height: 60dvh; margin-inline: auto; box-shadow: 0 0 0 4px var(--ink); }
.modal__body p { margin-top: 14px; }
.modal__video { position: relative; width: min(100%, 360px, 70vh * 9 / 16); width: min(100%, 360px, 70dvh * 9 / 16); margin: 0 auto; aspect-ratio: 9 / 16; background: #000; box-shadow: 0 0 0 4px var(--ink); }
.modal__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  width: max-content; max-width: calc(100vw - 32px); box-sizing: border-box; text-align: center;
  padding: 12px 16px;
  background: var(--navy); color: var(--card);
  font-family: var(--font-pixel); font-size: 13px;
  box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink);
  transform: translate(-50%, calc(100% + 40px)); /* fully off-screen whatever its height (an empty toast used to peek out) */
  transition: transform 320ms var(--ease-pop);
  pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); }

.fx-layer { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.fx {
  position: fixed; left: 0; top: 0; width: 32px; height: 32px;
  image-rendering: pixelated;
  animation: fxpop 900ms var(--ease-soft) forwards;
}
@keyframes fxpop {
  0% { transform: translate(var(--sx), var(--sy)) scale(.4); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(var(--sx) + var(--dx)), calc(var(--sy) + var(--dy))) scale(1.1); opacity: 0; }
}
.fx--rain { width: 48px; height: 48px; animation: fxrain var(--dur, 2.4s) linear forwards; }
@keyframes fxrain {
  from { transform: translate(var(--sx), -60px) rotate(0); }
  to { transform: translate(calc(var(--sx) + var(--dx)), 110vh) rotate(var(--rot, 180deg)); }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }
  .cloud, .ticker__track, .walker { animation: none !important; }
  .walker { left: 50%; }
  .floaty { transform: none !important; }
}

/* width/height attributes must not override aspect-ratio crops */
.card-tile img, .place-row img, .sheet__img { height: auto; }
.place-row img { height: 72px; }
/* hidden toast must not peek */
.toast { visibility: hidden; transition: transform 320ms var(--ease-pop), visibility 0s linear 320ms; }
.toast.is-on { visibility: visible; transition: transform 320ms var(--ease-pop), visibility 0s; }


/* reward reactions (laugh / spicy busts) */
.challenge__laugh { display: none; width: 144px; height: auto; }
.challenge.is-done .challenge__walker { display: none; }
.challenge.is-done .challenge__laugh { display: block; animation: resultpop 520ms var(--ease-pop); }
.profile { position: relative; }
.statbar--tap { cursor: pointer; }
.statbar--tap span { text-decoration: underline dotted; text-underline-offset: 3px; }
.statbar--tap:hover span, .statbar--tap:focus-visible span { color: var(--red-text, #B8352B); }
.spicy-pop {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; width: 176px;
  padding: 10px 10px 8px; text-align: center; background: var(--card);
  box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink);
  filter: drop-shadow(3px 3px 0 var(--ink));
  animation: resultpop 420ms var(--ease-pop);
}
.spicy-pop[hidden] { display: none; }
.spicy-pop img { width: 132px; height: auto; margin: 0 auto 4px; }
.spicy-pop p { font-family: var(--font-pixel); font-size: 12px; }

/* =========================================================
   GLOBAL IMAGE FIX: width/height attributes must not
   override CSS aspect-ratio crops
   ========================================================= */
img { height: auto; }

/* =========================================================
   MOBILE (same URL, phone-optimised layout)
   ========================================================= */
.m-nav, .swipe-hint { display: none; }

@media (max-width: 759px) {
  :root { --header-h: 64px; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .section { padding-block: 60px; }
  .section-head { margin-bottom: 26px; }
  .section h2, .contact h2 { font-size: clamp(1.9rem, 8.4vw, 2.4rem); }
  .section-lead { font-size: 1rem; }

  /* header: the bottom nav replaces the menu */
  .site-header__row { height: 56px; }
  .icon-btn--menu { display: none; }
  .brand__name { font-size: 1.2rem; }

  /* bottom tab bar */
  .m-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: var(--card);
    box-shadow: 0 -4px 0 0 var(--ink);
  }
  .m-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    min-height: 52px; padding: 4px 2px; text-decoration: none;
    font-family: var(--font-pixel); font-size: 10px; color: var(--ink-2);
    -webkit-tap-highlight-color: transparent;
  }
  .m-nav a img { width: 32px; height: 32px; image-rendering: pixelated; opacity: .6; transition: transform 160ms var(--ease-pop); }
  .m-nav a.is-active { color: var(--ink); }
  .m-nav a.is-active img { opacity: 1; transform: translateY(-2px); }
  .m-nav a.is-active span { box-shadow: inset 0 -3px 0 var(--honey); }
  .m-nav a.m-nav__main img {
    width: 48px; height: 48px; padding: 8px; margin-top: -26px; opacity: 1;
    background: var(--honey);
    box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink);
    filter: drop-shadow(3px 3px 0 var(--ink));
  }
  .m-nav a.m-nav__main span { color: var(--ink); }
  .m-nav a.m-nav__main:active img { transform: translate(3px, 3px); filter: none; }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }

  /* swipe carousels */
  .swipe-hint {
    display: block; margin-top: 6px; text-align: right;
    font-family: var(--font-pixel); font-size: 11px; color: var(--ink-2);
  }
  .equation, .quest-grid, .stage-grid {
    display: grid; grid-auto-flow: column; grid-template-columns: none;
    gap: 18px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1); padding: 10px var(--gutter) 22px;
    scrollbar-width: none;
  }
  .equation::-webkit-scrollbar, .quest-grid::-webkit-scrollbar, .stage-grid::-webkit-scrollbar { display: none; }
  .equation { grid-auto-columns: 78%; }
  .quest-grid { grid-auto-columns: 84%; }
  .stage-grid { grid-auto-columns: 46%; }
  .equation > *, .quest-grid > *, .stage-grid > * { scroll-snap-align: start; }
  .equation__op { display: none; }
  .js .equation > .reveal, .js .quest-grid > .reveal, .js .stage-grid > .reveal { opacity: 1; transform: none; }
  .word { min-height: 0; padding: 20px 16px 18px; }
  .word__ko { font-size: 3.2rem; }
  .word__def { font-size: .95rem; }
  .quest:hover { transform: none; }
  .quest__body { padding: 16px 16px 18px; }
  .quest h3 { font-size: 1.35rem; }
  .quest p { font-size: .95rem; }

  /* hero: title, then GodGom, then the rest */
  .hero { padding-block: 18px 40px; }
  .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero__copy { display: contents; }
  .hero__copy > * { position: relative; z-index: 2; }
  .hero__copy > .chip { order: 1; justify-self: start; }
  .hero__title { order: 2; font-size: clamp(2.15rem, 10.2vw, 2.7rem); margin: 14px 0 0; }
  .hero__stage { order: 3; height: 370px; margin-top: 26px; }
  .hero__lead { order: 4; font-size: 1rem; margin-top: 6px; }
  .hero__cta { order: 5; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 16px; }
  .hero__cta .px-btn { margin: 4px; padding: 13px 8px; font-size: 13px; }
  .hero__promise { order: 6; }
  .hero__dialog { left: 0; top: 4px; min-width: 0; max-width: 62%; padding: 18px 26px 12px 14px; font-size: 15px; }
  .bear { bottom: 34px; transform: translateX(-38%); }
  .bear__img { height: 286px; }
  .hero__hint { bottom: 4px; }
  .floaty { width: 40px; }
  .floaty--sm { width: 32px; }
  .cloud--1 { width: 64px; }
  .cloud--3 { width: 96px; }

  /* about */
  .about__grid { gap: 26px; margin-top: 36px; }
  .challenge { padding: 20px 16px; gap: 12px; }
  .challenge__story { font-size: .95rem; }
  .challenge__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
  .challenge__actions .px-btn { margin: 4px; padding: 10px 6px; font-size: 12px; }
  .profile { grid-template-columns: 112px minmax(0, 1fr); gap: 14px 16px; padding: 18px 16px; }
  .profile__body { display: contents; }
  .profile__portrait { grid-row: 1 / span 2; min-width: 0; min-height: 150px; padding: 10px; align-self: start; }
  .profile__portrait .sprite-stack { --s: 2; }
  .profile__title { grid-column: 2; align-self: end; font-size: 13px; }
  .profile__info { grid-column: 2; margin: 0; gap: 4px; font-size: .92rem; }
  .profile__info div { grid-template-columns: 1fr; gap: 0; }
  .profile__info dt { padding-top: 0; font-size: 10px; }
  .stats { grid-column: 1 / -1; }
  .statbar { grid-template-columns: 104px minmax(0, 1fr) 20px; }
  .about__name { font-size: 1rem; margin-top: 36px; }

  /* try */
  .try__inner { gap: 32px; }
  .try__lead { font-size: 1rem; }
  .features { grid-template-columns: 1fr 1fr; gap: 14px 12px; margin: 22px 0; }
  .features li { flex-direction: column; gap: 6px; }
  .features span { display: none; }
  .features strong { font-size: .95rem; line-height: 1.25; }
  .try__cta { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; }
  .try__cta .px-btn { margin: 4px; }
  .console__screen { height: 520px; }
  .console__body { padding: 14px 10px 12px; }

  /* youtube */
  .yt__grid { gap: 28px; }
  .channel { padding: 12px; gap: 12px; }
  .channel__avatar { width: 48px; height: 48px; }
  .channel__name { font-size: 1.25rem; }
  .yt__topics { grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
  .yt__topics li { flex-direction: column; align-items: center; text-align: center; gap: 6px; }
  .yt__topics span { display: none; }
  .yt__topics strong { font-size: .85rem; line-height: 1.25; }
  .yt__season { padding: 14px; }
  .yt__season-count { font-size: 1.6rem; }
  .phone { width: min(100%, 260px); padding: 28px 10px 14px; }
  .yt__latest { margin-top: 40px; }
  .yt__list { grid-auto-columns: 42%; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .yt__cta { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 18px 0 0; }

  /* stages */
  .stage__name { font-size: .95rem; }
  .stage__style { font-size: .8rem; }

  /* contact + footer */
  .contact { padding-block: 64px 56px; }
  .letter__icon { width: 64px; height: 64px; }
  .contact__email { margin: 18px 0 14px; }
  .contact__actions { display: grid; grid-template-columns: 1fr; width: 100%; max-width: 320px; gap: 8px; }
  .ground { height: 110px; }
  .site-footer__row { padding-block: 28px 30px; }
}
