/* ══════════════════════════════════════════════════════════════
   HALMEONI — see bottom of file for her sticker + inline styles
   ══════════════════════════════════════════════════════════════
   BANCHAN JIB 반찬집 — design system
   Palette + type straight from the brand book.
   ══════════════════════════════════════════════════════════════ */

/* ── fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Nanum+Myeongjo:wght@700;800&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Quicksand:wght@400;500;600&display=swap');

@font-face {
  font-family: 'Seoul Hangang';
  src: url('/assets/fonts/SeoulHangangB-subset.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: 'Seoul Hangang';
  src: url('/assets/fonts/SeoulHangangEB-subset.woff2') format('woff2');
  font-weight: 800; font-display: swap;
}

/* ── tokens ── */
:root {
  /* brand palette */
  --brown: #5A3E2B;        /* Soy Sauce Brown — logo, headlines, icons */
  --brown-deep: #46301f;
  --cream: #F6F0E7;        /* Rice Cream — backgrounds */
  --cream-dark: #efe6d8;
  --sage: #a8b69a;         /* Sage Green — highlights, dividers */
  --sage-soft: #c7d0bd;
  --kimchi: #8b1400;       /* Kimchi Red — buttons, key highlights (sparingly) */
  --kimchi-warm: #a12a14;
  --sesame: #c7b8a3;       /* texture elements */
  --seaweed: #7e8d63;      /* small accents, icons */
  --stone: #A8A29E;        /* supporting info */
  --ink: #4A4A4A;          /* body text */
  --caption: #6B6B6B;

  /* type */
  --serif: 'Cormorant Garamond', 'Nanum Myeongjo', serif;
  --kr-serif: 'Nanum Myeongjo', serif;
  --kr: 'Seoul Hangang', 'Nanum Myeongjo', sans-serif;
  --body: 'Poppins', sans-serif;
  --menu: 'Quicksand', sans-serif;

  /* spacious rhythm */
  --s-1: .5rem; --s0: .75rem; --s1: 1rem; --s2: 1.5rem; --s3: 2rem;
  --s4: 3rem; --s5: 4.5rem; --s6: 6rem; --s7: 9rem;

  --radius: 22px;
  --radius-lg: 34px;
  --shadow-soft: 0 18px 50px -18px rgba(90, 62, 43, .28);
  --shadow-lift: 0 30px 70px -25px rgba(90, 62, 43, .38);
  --border: 1.5px solid rgba(90, 62, 43, .16);

  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  /* z-scale */
  --z-doodle: 1; --z-content: 10; --z-nav: 100; --z-drawer: 500; --z-loader: 1000;
}

/* ── reset-ish ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html.js body > .page { opacity: 0; }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  overflow-x: clip;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--sage); color: var(--brown-deep); }

h1, h2, h3 { font-family: var(--serif); color: var(--brown); font-weight: 600; line-height: 1.12; }
.kr { font-family: var(--kr); font-weight: 700; }
.kr-serif { font-family: var(--kr-serif); font-weight: 800; }

/* grain — the lived-in paper feel */
body::after {
  content: ''; position: fixed; inset: -50%; pointer-events: none; z-index: 2000;
  opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container { width: min(1160px, calc(100% - 2.5rem)); margin-inline: auto; }
.section { padding-block: var(--s6); position: relative; }

/* ══════════════ LOADER ══════════════ */
#bj-loader {
  position: fixed; inset: 0; z-index: var(--z-loader);
  background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s2);
}
#bj-loader .loader-bowl { width: 108px; position: relative; }
#bj-loader .loader-bowl svg, #bj-loader .loader-bowl img { width: 100%; display: block; }
#bj-loader .loader-word {
  font-family: var(--kr-serif); font-weight: 800; font-size: 1.6rem; color: var(--brown);
  min-height: 2.2em; display: flex; align-items: center;
}
#bj-loader .loader-sub {
  font-family: var(--menu); color: var(--caption); font-size: .85rem; letter-spacing: .18em;
  text-transform: uppercase;
}
#bj-loader.done { pointer-events: none; }

/* page transition curtain */
#bj-curtain {
  position: fixed; inset: 0; z-index: calc(var(--z-loader) + 1);
  background: var(--brown);
  transform: translateY(101%);
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
#bj-curtain .kr-serif { color: var(--cream); font-size: clamp(2rem, 5vw, 3.4rem); opacity: 0; }

/* ══════════════ NAV ══════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  transition: transform .45s var(--ease-out), background .3s, box-shadow .3s;
}
.nav.scrolled { background: rgba(246, 240, 231, .92); box-shadow: 0 8px 30px -18px rgba(90,62,43,.35); }
.nav.hidden { transform: translateY(-110%); }
.nav-inner {
  width: min(1240px, calc(100% - 2rem)); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding-block: .9rem; gap: 1rem;
}
.nav-logo { display: flex; align-items: center; gap: .7rem; }
.nav-logo img { width: 46px; height: 46px; transition: transform .5s var(--ease-spring); }
.nav-logo:hover img { transform: rotate(-10deg) scale(1.08); }
.nav-logo .word {
  font-family: var(--serif); font-weight: 700; font-size: 1.32rem; color: var(--brown); line-height: 1;
}
.nav-logo .word small { display: block; font-family: var(--kr); font-size: .72rem; color: var(--seaweed); letter-spacing: .35em; margin-top: .18rem; }
.nav-links { display: flex; gap: .4rem; align-items: center; list-style: none; }
.nav-links a {
  position: relative; padding: .55rem .95rem; font-weight: 500; font-size: .93rem; color: var(--brown);
  border-radius: 999px; transition: background .25s;
}
.nav-links a:hover { background: rgba(168, 182, 154, .28); }
.nav-links a.active { background: var(--sage); color: var(--brown-deep); }
.nav-links a .kr-tip {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, 2px) scale(.8);
  font-family: var(--kr); font-size: .68rem; color: var(--kimchi); opacity: 0;
  transition: all .3s var(--ease-spring); white-space: nowrap; pointer-events: none;
}
.nav-links a:hover .kr-tip { opacity: 1; transform: translate(-50%, 4px) scale(1); }

.cart-btn {
  position: relative; display: flex; align-items: center; gap: .5rem;
  background: var(--brown); color: var(--cream); padding: .6rem 1.15rem; border-radius: 999px;
  font-weight: 500; font-size: .9rem;
  transition: transform .3s var(--ease-spring), background .25s;
  min-height: 44px;
}
.cart-btn:hover { background: var(--brown-deep); transform: scale(1.05); }
.cart-btn svg { width: 18px; height: 18px; }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; border-radius: 999px;
  background: var(--kimchi); color: #fff; font-size: .72rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; padding-inline: 5px;
  transform: scale(0); transition: transform .35s var(--ease-spring);
}
.cart-count.show { transform: scale(1); }
.cart-count.pop { animation: pop .45s var(--ease-spring); }
@keyframes pop { 50% { transform: scale(1.45); } }

.nav-burger { display: none; width: 44px; height: 44px; border-radius: 12px; color: var(--brown); align-items: center; justify-content: center; }

/* mobile nav */
@media (max-width: 800px) {
  .nav-links {
    position: fixed; inset: 0; top: 0; flex-direction: column; justify-content: center; gap: 1.2rem;
    background: var(--cream); z-index: -1;
    clip-path: circle(0 at calc(100% - 70px) 40px); transition: clip-path .6s var(--ease-out);
  }
  .nav-links.open { clip-path: circle(150% at calc(100% - 70px) 40px); }
  .nav-links a { font-size: 1.3rem; font-weight: 500; }
  .nav-burger { display: flex; }
}

/* ══════════════ BUTTONS ══════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 2rem; border-radius: 999px; font-weight: 500; font-size: .97rem;
  min-height: 48px;
  transition: transform .35s var(--ease-spring), box-shadow .35s, background .25s;
  will-change: transform;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--kimchi); color: #fff8f2; box-shadow: 0 14px 30px -12px rgba(139, 20, 0, .5); }
.btn-primary:hover { background: var(--kimchi-warm); transform: translateY(-3px) scale(1.02); box-shadow: 0 20px 40px -14px rgba(139, 20, 0, .55); }
.btn-outline { border: 2px solid var(--brown); color: var(--brown); }
.btn-outline:hover { background: var(--brown); color: var(--cream); transform: translateY(-3px); }
.btn-sage { background: var(--sage); color: var(--brown-deep); }
.btn-sage:hover { background: var(--seaweed); color: var(--cream); transform: translateY(-3px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ══════════════ RIBBONS (straight + symmetric) ══════════════ */
.ribbon {
  position: relative; overflow: clip; padding-block: .85rem;
  background: var(--brown); color: var(--cream);
  border-top: 3px solid var(--sage); border-bottom: 3px solid var(--sage);
}
.ribbon.ribbon-sage { background: var(--sage); color: var(--brown-deep); border-color: var(--brown); }
.ribbon.ribbon-kimchi { background: var(--kimchi); color: #fff4ec; border-color: var(--sesame); }
.ribbon-track { display: flex; width: max-content; gap: 0; }
.ribbon-chunk {
  display: flex; align-items: center; gap: 2.2rem; padding-right: 2.2rem;
  font-family: var(--serif); font-weight: 600; font-size: 1.12rem; letter-spacing: .12em;
  text-transform: uppercase; white-space: nowrap;
}
.ribbon-chunk .kr { font-size: 1.05rem; letter-spacing: .05em; }
.ribbon-chunk .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; flex: none; }

/* ══════════════ SECTION HEADERS ══════════════ */
.sec-head { text-align: center; max-width: 640px; margin: 0 auto var(--s5); }
.sec-eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--menu); font-weight: 600; font-size: .8rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--seaweed); margin-bottom: var(--s1);
}
.sec-eyebrow::before, .sec-eyebrow::after { content: ''; width: 26px; height: 2px; background: var(--sage); border-radius: 2px; }
.sec-title { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: var(--s1); }
.sec-title .kr-serif { color: var(--kimchi); }
.sec-sub { color: var(--caption); font-family: var(--menu); font-size: 1.02rem; }

/* ══════════════ HERO ══════════════ */
.hero {
  min-height: 100dvh; display: grid; place-items: center; position: relative;
  padding-top: 90px; overflow: clip;
  background-color: var(--cream);
  background-image:
    repeating-linear-gradient(0deg, rgba(90, 62, 43, .05) 0px, rgba(90, 62, 43, .05) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(90, 62, 43, .05) 0px, rgba(90, 62, 43, .05) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .5) 0px, rgba(255, 255, 255, .5) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0px, rgba(255, 255, 255, .5) 1px, transparent 1px, transparent 4px);
  background-position: 0 0, 0 0, 1px 1px, 1px 1px;
}
.hero-inner { text-align: center; position: relative; z-index: var(--z-content); }
.hero-icon { width: clamp(120px, 16vw, 190px); margin: 0 auto var(--s2); position: relative; }
.hero-icon img { width: 100%; }
.hero-kr {
  font-family: var(--kr-serif); font-weight: 800; color: var(--kimchi);
  font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: .4em; margin-bottom: .4rem;
}
.hero-title {
  font-size: clamp(2.7rem, 7.5vw, 5.4rem); font-weight: 600; margin-bottom: var(--s2);
}
.hero-title em { font-style: italic; color: var(--seaweed); }
.hero-title .line { display: block; overflow: hidden; }
.hero-sub {
  font-family: var(--menu); font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--caption);
  max-width: 520px; margin: 0 auto var(--s3);
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-plates { position: absolute; inset: 0; pointer-events: none; }
.hero-plate {
  position: absolute; border-radius: 50%; overflow: hidden;
  box-shadow: var(--shadow-lift); border: 6px solid #fff;
  will-change: transform; pointer-events: auto; cursor: grab; touch-action: none;
  transition: box-shadow .35s var(--ease-out);
}
.hero-plate img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.hero-plate:focus-visible { outline: 3px solid var(--sage); outline-offset: 4px; }
/* peel-corner affordance — a little lifted fold hinting these can be pulled off */
.hero-plate::after {
  content: ''; position: absolute; right: -1px; bottom: -1px; width: 26%; height: 26%;
  background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,.95) 50.5%);
  border-radius: 0 0 50% 0; box-shadow: -3px -3px 8px -4px rgba(90,62,43,.35);
  opacity: .55; transition: opacity .3s, transform .3s var(--ease-spring); transform-origin: bottom right;
}
.hero-plate:hover::after { opacity: .9; transform: scale(1.12) rotate(-4deg); }
.hero-plate.peeled::after { display: none; }
.hero-plate.dragging {
  cursor: grabbing; z-index: 70; transition: none;
  box-shadow: 0 40px 70px -20px rgba(90, 62, 43, .55);
}
@media (max-width: 640px) { .hero-plate::after { width: 30%; height: 30%; } }
.hero-plate.p1 { width: clamp(130px, 17vw, 240px); height: clamp(130px, 17vw, 240px); top: 16%; left: 5%; }
.hero-plate.p2 { width: clamp(110px, 14vw, 200px); height: clamp(110px, 14vw, 200px); top: 55%; left: 11%; }
.hero-plate.p3 { width: clamp(130px, 17vw, 240px); height: clamp(130px, 17vw, 240px); top: 18%; right: 5%; }
.hero-plate.p4 { width: clamp(110px, 14vw, 200px); height: clamp(110px, 14vw, 200px); top: 58%; right: 10%; }
@media (max-width: 800px) {
  .hero-plate.p2, .hero-plate.p4 { display: none; }
  .hero-plate.p1 { top: 8%; left: -8%; }
  .hero-plate.p3 { top: auto; bottom: 4%; right: -8%; }
}
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  color: var(--stone); font-family: var(--menu); font-size: .78rem; letter-spacing: .25em; text-transform: uppercase;
}
.hero-scroll .chop { width: 2px; height: 44px; background: linear-gradient(var(--brown), transparent); border-radius: 2px; animation: dripline 1.8s ease-in-out infinite; }
@keyframes dripline { 0%, 100% { transform: scaleY(.4); transform-origin: top; } 50% { transform: scaleY(1); } }
@media (max-width: 800px) {
  .hero { padding-bottom: var(--s5); }
  .hero-scroll { display: none; }
}

/* steam wisps */
.steam { position: absolute; bottom: 100%; left: 50%; width: 60px; height: 80px; pointer-events: none; }
.steam path { fill: none; stroke: var(--sesame); stroke-width: 3; stroke-linecap: round; opacity: 0; }

/* ══════════════ PRODUCT CARDS ══════════════ */
.menu-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--s3);
}
.dish-card {
  position: relative; background: #fffdf9; border-radius: var(--radius-lg);
  padding: var(--s3) var(--s2) var(--s2); text-align: center;
  border: var(--border); box-shadow: var(--shadow-soft);
  transform-style: preserve-3d; will-change: transform;
  transition: box-shadow .4s;
}
.dish-card:hover { box-shadow: var(--shadow-lift); }
.dish-card .dish-img-wrap {
  display: block;
  width: min(210px, 70%); aspect-ratio: 1; margin: 0 auto var(--s2); border-radius: 50%;
  overflow: hidden; border: 5px solid var(--cream-dark);
  transform: translateZ(46px); box-shadow: 0 22px 35px -20px rgba(90,62,43,.5);
}
.dish-card .dish-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.dish-card:hover .dish-img-wrap img { transform: scale(1.09) rotate(3deg); }
.dish-card .dish-kr {
  position: absolute; top: 1.1rem; left: 1.4rem; font-family: var(--kr); font-weight: 800;
  color: var(--sage); font-size: .95rem; transform: translateZ(30px);
}
.dish-card .price-chip {
  position: absolute; top: 1rem; right: 1.2rem; transform: translateZ(60px) rotate(6deg);
  background: var(--kimchi); color: #fff; font-weight: 600; font-size: .88rem;
  padding: .35rem .8rem; border-radius: 999px; box-shadow: 0 8px 18px -8px rgba(139,20,0,.6);
}
.dish-card h3 { font-size: 1.5rem; transform: translateZ(34px); }
.dish-card .dish-sub { font-family: var(--menu); font-weight: 600; color: var(--seaweed); font-size: .92rem; margin-bottom: .55rem; transform: translateZ(30px); }
.dish-card p.desc { font-family: var(--menu); font-size: .92rem; color: var(--caption); margin-bottom: var(--s2); transform: translateZ(24px); }
.dish-actions { display: flex; gap: .6rem; justify-content: center; transform: translateZ(40px); }
.dish-actions .btn { padding: .6rem 1.3rem; min-height: 44px; font-size: .88rem; }

/* add-to-cart fly animation dot */
.fly-dot {
  position: fixed; z-index: calc(var(--z-nav) + 1); width: 52px; height: 52px; border-radius: 50%;
  pointer-events: none; overflow: hidden; border: 3px solid #fff; box-shadow: var(--shadow-lift);
}
.fly-dot img { width: 100%; height: 100%; object-fit: cover; }

/* ══════════════ STICKY / PINNED sections ══════════════ */
.pin-week { position: relative; }
.pin-week .pin-stage { min-height: 100vh; display: flex; align-items: center; overflow: clip; }
.week-track { display: flex; gap: var(--s3); padding-inline: 8vw; align-items: stretch; }
.week-track .dish-card { width: clamp(270px, 25vw, 330px); flex: none; }
.week-intro {
  width: clamp(260px, 28vw, 380px); flex: none; display: flex; flex-direction: column; justify-content: center;
}
.week-intro .sec-title { text-align: left; }
.week-intro .sec-eyebrow::before { display: none; }

/* tablet & mobile — same horizontal "slide along the table" browsing as
   desktop, just driven by native touch-scroll + snap instead of a
   scroll-jacked pin (which doesn't translate well to touch input) */
@media (max-width: 860px) {
  .pin-week .pin-stage { min-height: auto; padding-block: var(--s5) var(--s4); display: block; }
  .week-track {
    overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity; padding-inline: 6vw; padding-bottom: var(--s2);
    scrollbar-width: none;
  }
  .week-track::-webkit-scrollbar { display: none; }
  .week-intro { width: min(300px, 80vw); scroll-snap-align: start; }
  .week-track .dish-card { width: min(280px, 78vw); scroll-snap-align: center; }
}

/* granny letter */
.letter-wrap { max-width: 700px; margin-inline: auto; perspective: 1200px; }
.letter {
  background: #fffdf6; border-radius: 18px; padding: clamp(1.8rem, 4vw, 3.2rem);
  box-shadow: var(--shadow-lift); border: var(--border);
  position: relative; transform-origin: top center;
  background-image: repeating-linear-gradient(transparent 0 34px, rgba(168, 182, 154, .25) 34px 35px);
}
.letter::before {
  content: ''; position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  width: 120px; height: 30px; background: rgba(199, 184, 163, .55); border-radius: 3px;
}
.letter p { font-family: var(--menu); font-size: 1.08rem; line-height: 35px; color: var(--ink); }
.letter .sign { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--brown); margin-top: var(--s2); }
.letter .kr-note { font-family: var(--kr); color: var(--kimchi); font-size: .95rem; }

/* values flip cards */
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s2); }
.flip { perspective: 900px; height: 240px; cursor: pointer; }
.flip-inner {
  position: relative; width: 100%; height: 100%; transform-style: preserve-3d;
  transition: transform .8s var(--ease-spring);
}
.flip:hover .flip-inner, .flip:focus-visible .flip-inner, .flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem;
  padding: 1.4rem; text-align: center;
}
.flip-front { background: #fffdf9; border: var(--border); box-shadow: var(--shadow-soft); }
.flip-front .kr { font-size: 2rem; color: var(--brown); }
.flip-front h3 { font-size: 1.25rem; }
.flip-back { background: var(--brown); color: var(--cream); transform: rotateY(180deg); }
.flip-back p { font-family: var(--menu); font-size: .92rem; line-height: 1.6; }

/* ══════════════ DOODLES ══════════════ */
.doodle {
  position: absolute; z-index: var(--z-doodle); pointer-events: none;
  color: var(--brown); opacity: .35; width: 64px; height: 64px;
}
.doodle.sage { color: var(--seaweed); }
.doodle.kimchi { color: var(--kimchi); opacity: .3; }
.doodle svg { width: 100%; height: 100%; }
@media (max-width: 700px) { .doodle { width: 44px; height: 44px; } }

/* ══════════════ PRODUCT PAGE ══════════════ */
.product-hero { padding-top: 120px; padding-bottom: var(--s6); position: relative; overflow: clip; }
.product-hero .bg-kr {
  position: absolute; top: 44%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--kr-serif); font-weight: 800; font-size: clamp(6rem, 22vw, 19rem);
  color: var(--brown); opacity: .05; white-space: nowrap; pointer-events: none; user-select: none;
}
.product-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: center;
}
@media (max-width: 860px) { .product-grid { grid-template-columns: 1fr; gap: var(--s3); } }
.plate-stage { perspective: 1100px; display: grid; place-items: center; }
.plate-3d {
  width: min(440px, 88vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  border: 10px solid #fff; box-shadow: var(--shadow-lift);
  transform-style: preserve-3d; will-change: transform; position: relative;
}
.plate-3d img { width: 100%; height: 100%; object-fit: cover; }
.plate-3d .shine {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.5), transparent 55%);
  mix-blend-mode: soft-light; pointer-events: none;
}
.plate-shadow {
  width: 60%; height: 26px; margin-top: 18px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(90,62,43,.3), transparent 70%);
}
.pd-info .kr-serif { color: var(--kimchi); font-size: 1.25rem; letter-spacing: .2em; }
.pd-info .kr-read { font-family: var(--menu); color: var(--stone); font-size: .85rem; letter-spacing: .12em; margin-left: .5rem; }
.pd-info h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); margin-block: .4rem .2rem; }
.pd-info .pd-sub { font-family: var(--menu); font-weight: 600; color: var(--seaweed); font-size: 1.1rem; margin-bottom: var(--s2); }
.pd-info .pd-price { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; color: var(--brown); margin-bottom: var(--s2); }
.pd-info .pd-price small { font-size: 1rem; font-family: var(--menu); color: var(--stone); font-weight: 400; }
.pd-story { font-family: var(--menu); font-size: 1.02rem; margin-bottom: var(--s2); }
.pd-tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: var(--s3); }
.pd-tags span {
  font-family: var(--menu); font-weight: 600; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(168, 182, 154, .3); color: var(--seaweed); padding: .35rem .85rem; border-radius: 999px;
}
.qty-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.qty {
  display: inline-flex; align-items: center; border: 2px solid var(--brown); border-radius: 999px; overflow: hidden;
}
.qty button { width: 46px; height: 46px; font-size: 1.25rem; color: var(--brown); transition: background .2s; }
.qty button:hover { background: rgba(168,182,154,.3); }
.qty .q { width: 44px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

.meter-block { margin-top: var(--s4); }
.meter-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 1rem; margin-bottom: .9rem; }
.meter-row label { font-family: var(--menu); font-weight: 600; font-size: .88rem; color: var(--brown); }
.meter-dots { display: flex; gap: .45rem; }
.meter-dots i {
  width: 22px; height: 22px; border-radius: 50% 50% 50% 4px; transform: rotate(45deg);
  background: var(--cream-dark); border: 1.5px solid rgba(90,62,43,.2);
  transition: background .3s, transform .4s var(--ease-spring);
}
.meter-dots i.on { background: var(--kimchi); border-color: var(--kimchi); }
.meter-dots i.on.sage-dot { background: var(--seaweed); border-color: var(--seaweed); }

.pd-extra { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s5); }
@media (max-width: 700px) { .pd-extra { grid-template-columns: 1fr; } }
.pd-panel { background: #fffdf9; border: var(--border); border-radius: var(--radius); padding: var(--s3); box-shadow: var(--shadow-soft); }
.pd-panel h3 { font-size: 1.3rem; margin-bottom: .8rem; display: flex; align-items: center; gap: .6rem; }
.pd-panel ul { list-style: none; }
.pd-panel li { font-family: var(--menu); padding-block: .45rem; border-bottom: 1px dashed rgba(90,62,43,.15); display: flex; gap: .6rem; align-items: baseline; }
.pd-panel li::before { content: '✽'; color: var(--sage); flex: none; }
.pd-panel li:last-child { border-bottom: none; }
.granny-says {
  margin-top: var(--s3); background: rgba(168,182,154,.18); border-left: 4px solid var(--sage);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.2rem 1.4rem;
  font-family: var(--menu); font-style: italic; color: var(--brown);
}
.granny-says b { font-family: var(--kr); font-style: normal; color: var(--kimchi); display: block; font-size: .8rem; letter-spacing: .2em; margin-bottom: .3rem; }

/* ══════════════ CART DRAWER ══════════════ */
.drawer-veil {
  position: fixed; inset: 0; z-index: calc(var(--z-drawer) - 1); background: rgba(70, 48, 31, .5);
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.drawer-veil.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-drawer);
  width: min(430px, 94vw); background: var(--cream);
  transform: translateX(105%); transition: transform .5s var(--ease-out);
  display: flex; flex-direction: column; box-shadow: -20px 0 60px -20px rgba(70,48,31,.5);
  border-left: 3px solid var(--sage);
}
.cart-drawer.open { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 1.5rem; border-bottom: var(--border); }
.cart-head h3 { font-size: 1.5rem; }
.cart-head .kr { font-size: .8rem; color: var(--seaweed); letter-spacing: .25em; display: block; }
.cart-close { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--brown); transition: transform .4s var(--ease-spring), background .25s; }
.cart-close:hover { background: rgba(168,182,154,.3); transform: rotate(90deg); }
.cart-items { flex: 1; overflow-y: auto; padding: 1.2rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.cart-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; align-items: center;
  background: #fffdf9; border: var(--border); border-radius: 16px; padding: .7rem .9rem;
}
.cart-item img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--cream-dark); }
.cart-item .ci-name { font-weight: 600; color: var(--brown); font-size: .93rem; line-height: 1.3; }
.cart-item .ci-price { font-family: var(--menu); color: var(--caption); font-size: .82rem; }
.cart-item .qty { transform: scale(.78); transform-origin: right center; }
.cart-empty { text-align: center; color: var(--caption); font-family: var(--menu); padding-block: var(--s4); }
.cart-empty .kr { display: block; font-size: 1.5rem; color: var(--sage); margin-bottom: .6rem; }
.cart-foot { padding: 1.2rem 1.5rem 1.6rem; border-top: var(--border); background: var(--cream-dark); }
.cart-total { display: flex; justify-content: space-between; font-weight: 600; color: var(--brown); margin-bottom: 1rem; font-size: 1.05rem; }
.cart-total .amt { font-family: var(--serif); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.cart-foot .btn { width: 100%; }

/* ══════════════ ORDER PAGE ══════════════ */
.order-wrap { padding-top: 130px; }
.order-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s4); align-items: start; }
@media (max-width: 900px) { .order-grid { grid-template-columns: 1fr; } }
.order-panel { background: #fffdf9; border: var(--border); border-radius: var(--radius-lg); padding: var(--s3); box-shadow: var(--shadow-soft); }
.order-panel h2 { font-size: 1.7rem; margin-bottom: var(--s2); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 600; font-size: .88rem; color: var(--brown); margin-bottom: .4rem; }
.field label .req { color: var(--kimchi); }
.field input, .field textarea, .field select {
  width: 100%; padding: .85rem 1.1rem; border-radius: 14px; border: 1.5px solid rgba(90,62,43,.25);
  background: var(--cream); font: inherit; color: var(--ink); min-height: 48px;
  transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--seaweed); box-shadow: 0 0 0 4px rgba(168,182,154,.3);
}
.field .hint { font-family: var(--menu); font-size: .78rem; color: var(--stone); margin-top: .3rem; }
.field .err { display: none; font-size: .8rem; color: var(--kimchi); margin-top: .3rem; }
.field.invalid input, .field.invalid textarea { border-color: var(--kimchi); }
.field.invalid .err { display: block; }
.order-summary-list { list-style: none; margin-bottom: var(--s2); }
.order-summary-list li { display: flex; justify-content: space-between; gap: 1rem; padding-block: .55rem; border-bottom: 1px dashed rgba(90,62,43,.18); font-family: var(--menu); font-size: .95rem; }
.order-summary-list .tot { font-weight: 700; color: var(--brown); border-bottom: none; font-size: 1.1rem; }
.dm-preview {
  background: var(--brown); color: var(--cream); border-radius: var(--radius); padding: 1.4rem;
  font-family: var(--menu); font-size: .88rem; white-space: pre-wrap; line-height: 1.65;
  margin-block: var(--s2); position: relative;
}
.dm-preview::before {
  content: 'your order note'; position: absolute; top: -11px; left: 18px;
  background: var(--sage); color: var(--brown-deep); font-size: .68rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase; padding: .15rem .7rem; border-radius: 999px;
}
.order-actions { display: flex; flex-direction: column; gap: .8rem; }

/* toast */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translate(-50%, 150%);
  background: var(--brown); color: var(--cream); padding: .9rem 1.6rem; border-radius: 999px;
  font-family: var(--menu); font-size: .92rem; z-index: calc(var(--z-loader) + 2);
  transition: transform .5s var(--ease-spring); box-shadow: var(--shadow-lift);
  display: flex; align-items: center; gap: .6rem; max-width: 92vw; text-align: center;
}
.toast.show { transform: translate(-50%, 0); }
.toast .kr { color: var(--sage); }

/* ══════════════ ABOUT PAGE ══════════════ */
.about-hero { padding-top: 140px; text-align: center; position: relative; overflow: clip; }
.about-hero h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); }
.about-hero .kr-serif { display: block; font-size: clamp(1.2rem, 2.5vw, 1.8rem); color: var(--kimchi); letter-spacing: .45em; margin-bottom: var(--s1); }
.story-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: center; }
@media (max-width: 860px) { .story-split { grid-template-columns: 1fr; } }
.story-split .photo-stack { position: relative; }
.story-split .photo-stack img {
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); border: 8px solid #fff;
}
.story-split .photo-stack .stamp {
  position: absolute; bottom: -24px; right: -14px; width: 110px; height: 110px; border-radius: 50%;
  background: var(--kimchi); color: #fff4ec; display: grid; place-items: center; text-align: center;
  font-family: var(--kr); font-size: .82rem; line-height: 1.4; padding: .8rem;
  transform: rotate(8deg); box-shadow: var(--shadow-lift);
}
.story-body p { font-family: var(--menu); font-size: 1.05rem; margin-bottom: 1.1rem; }
.story-body .drop { font-family: var(--serif); font-size: 1.45rem; font-style: italic; color: var(--brown); line-height: 1.4; margin-bottom: var(--s2); }

/* sticky steps (how it works) */
.steps-wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: var(--s5); }
@media (max-width: 860px) { .steps-wrap { grid-template-columns: 1fr; } }
.steps-sticky { position: sticky; top: 120px; align-self: start; }
@media (max-width: 860px) { .steps-sticky { position: static; } }
.steps-list { display: flex; flex-direction: column; gap: var(--s3); }
.step-card {
  background: #fffdf9; border: var(--border); border-radius: var(--radius); padding: var(--s3);
  box-shadow: var(--shadow-soft); display: grid; grid-template-columns: 64px 1fr; gap: 1.2rem; align-items: start;
}
.step-card .num {
  width: 64px; height: 64px; border-radius: 50% 50% 50% 6px; background: var(--sage);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.6rem; color: var(--brown-deep);
}
.step-card h3 { font-size: 1.35rem; margin-bottom: .3rem; }
.step-card .kr { font-size: .8rem; color: var(--kimchi); letter-spacing: .2em; display: block; margin-bottom: .5rem; }
.step-card p { font-family: var(--menu); font-size: .95rem; color: var(--caption); }

/* big quote */
.big-quote { text-align: center; padding-block: var(--s6); }
.big-quote blockquote {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.8rem); color: var(--brown); max-width: 820px; margin-inline: auto; line-height: 1.35;
}
.big-quote .who { font-family: var(--kr); color: var(--seaweed); margin-top: var(--s2); letter-spacing: .2em; }

/* ══════════════ FOOTER + GAME ══════════════ */
.footer { background: var(--brown); color: var(--cream); position: relative; overflow: clip; margin-top: var(--s6); }
.footer .footer-game { padding: var(--s5) 0 var(--s3); text-align: center; }
.footer .footer-game h2 { color: var(--cream); font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
.footer .footer-game .kr { color: var(--sage); display: block; font-size: .85rem; letter-spacing: .3em; margin-bottom: .4rem; }
.footer .footer-game p { font-family: var(--menu); color: var(--sesame); font-size: .92rem; margin-top: .4rem; }
/* the playable game itself spans edge to edge at every viewport width —
   no side gaps. height stays sane (not aspect-locked to the canvas's
   760x380 intrinsic ratio, or it'd become absurdly tall on wide screens) */
.game-shell {
  width: 100vw; margin: var(--s3) calc(50% - 50vw) 0; position: relative;
  overflow: hidden; border-top: 3px solid var(--sage); border-bottom: 3px solid var(--sage);
  background: var(--cream); box-shadow: 0 10px 50px -25px rgba(0, 0, 0, .5);
}
#bj-game { display: block; width: 100%; height: clamp(260px, 42vw, 440px); touch-action: none; cursor: none; }
.game-hud {
  position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between;
  padding: .8rem 1.2rem; font-family: var(--menu); font-weight: 700; color: var(--brown);
  pointer-events: none; font-size: .95rem;
}
.game-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .8rem; background: rgba(246,240,231,.88); text-align: center; padding: 1rem;
  transition: opacity .4s; cursor: pointer;
}
.game-overlay.hide { opacity: 0; pointer-events: none; }
.game-overlay h3 { font-size: 1.8rem; }
.game-overlay p { font-family: var(--menu); color: var(--caption); font-size: .92rem; max-width: 420px; }
.game-overlay .btn { margin-top: .4rem; }

@media (max-width: 640px) {
  .game-overlay { gap: .35rem; padding: .5rem; }
  .game-overlay h3 { font-size: 1.15rem; }
  .game-overlay p { display: none; }
  .game-overlay .btn { min-height: 40px; padding: .5rem 1.2rem; font-size: .82rem; }
  .game-hud { font-size: .78rem; padding: .5rem .8rem; }
}

.footer-main {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: var(--s4);
  padding-block: var(--s5); border-top: 1px solid rgba(246,240,231,.15);
}
@media (max-width: 800px) { .footer-main { grid-template-columns: 1fr; text-align: center; } }
.footer-main h4 { font-family: var(--serif); font-size: 1.25rem; color: var(--sesame); margin-bottom: 1rem; }
.footer-main ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.footer-main a { font-family: var(--menu); font-size: .95rem; color: var(--cream); opacity: .85; transition: opacity .2s, padding-left .3s var(--ease-out); }
.footer-main a:hover { opacity: 1; padding-left: 6px; color: var(--sage); }
.footer-main a.social-link { display: inline-flex; align-items: center; gap: .55rem; }
.footer-main a.social-link svg { width: 18px; height: 18px; flex: none; }
.social-row { display: flex; gap: .7rem; margin-top: 1.1rem; }
@media (max-width: 800px) { .social-row { justify-content: center; } }
.social-row a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: var(--cream); border: 1.5px solid rgba(246, 240, 231, .3);
  transition: background .25s, border-color .25s, transform .3s var(--ease-spring), color .25s;
}
.social-row a svg { width: 19px; height: 19px; }
.social-row a:hover { background: var(--sage); border-color: var(--sage); color: var(--brown-deep); transform: translateY(-3px) scale(1.06); }
.footer-brand .fb-logo { display: flex; align-items: center; gap: .8rem; justify-content: flex-start; }
@media (max-width: 800px) { .footer-brand .fb-logo { justify-content: center; } }
.footer-brand .fb-logo img { width: 58px; filter: brightness(0) saturate(100%) invert(93%) sepia(9%) saturate(300%) hue-rotate(340deg); }
.footer-brand .word { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; }
.footer-brand .word small { display: block; font-family: var(--kr); font-size: .75rem; color: var(--sage); letter-spacing: .4em; }
.footer-brand p { font-family: var(--menu); font-size: .9rem; color: var(--sesame); margin-top: 1rem; max-width: 300px; }
@media (max-width: 800px) { .footer-brand p { margin-inline: auto; } }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding-block: 1.4rem; border-top: 1px solid rgba(246,240,231,.15);
  font-family: var(--menu); font-size: .82rem; color: var(--sesame);
}
.footer-wordmark {
  font-family: var(--kr-serif); font-weight: 800; text-align: center;
  font-size: clamp(4rem, 16vw, 14rem); line-height: 1; color: rgba(246,240,231,.07);
  user-select: none; pointer-events: none; letter-spacing: .1em; padding-top: var(--s3);
}

/* ══════════════ misc ══════════════ */
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.center { text-align: center; }
.mt-2 { margin-top: var(--s2); } .mt-4 { margin-top: var(--s4); }

/* ══════════════════════════════════════════════════════════════
   HALMEONI 할머니 — the mascot
   ══════════════════════════════════════════════════════════════ */
.halmeoni-sticker {
  position: fixed; z-index: 60; cursor: grab; touch-action: none; user-select: none;
  filter: drop-shadow(0 16px 28px rgba(90, 62, 43, .35));
  will-change: transform, left, top;
}
.halmeoni-sticker:active, .halmeoni-sticker.dragging { cursor: grabbing; }
.halmeoni-sticker.dragging { filter: drop-shadow(0 26px 40px rgba(90, 62, 43, .45)); }
.halmeoni-sticker:focus-visible { outline: 3px solid var(--sage); outline-offset: 6px; border-radius: 50%; }
.halmeoni-bob { animation: halmeoni-bob 3.6s ease-in-out infinite; }
.halmeoni-bob svg, .halmeoni-bob img { width: 100%; display: block; pointer-events: none; }
@keyframes halmeoni-bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-9px) rotate(1.5deg); } }
.halmeoni-sticker.dragging .halmeoni-bob { animation: none; }

.halmeoni-hint {
  position: absolute; bottom: 100%; right: -6px; margin-bottom: 10px;
  background: var(--brown); color: var(--cream); font-family: var(--menu); font-size: .74rem;
  padding: .5rem .8rem; border-radius: 12px; white-space: nowrap;
  opacity: 0; transform: translateY(6px) scale(.9); transform-origin: bottom right;
  transition: opacity .35s, transform .35s var(--ease-spring); pointer-events: none;
}
.halmeoni-hint::after {
  content: ''; position: absolute; top: 100%; right: 18px; border: 6px solid transparent; border-top-color: var(--brown);
}
.halmeoni-hint .kr { display: block; color: var(--sage); font-size: .8rem; margin-bottom: .1rem; }
.halmeoni-hint.show { opacity: 1; transform: translateY(0) scale(1); }
@media (max-width: 640px) { .halmeoni-hint { display: none; } }

/* the reason bubble — hidden until she's tapped, explains her current mood.
   default position: above her, growing leftward from her right edge — she
   lives in the bottom-right corner, so the bubble opens onto open screen
   space toward her left. .anchor-left / .anchor-below are safety overrides
   applied by JS when she's been dragged near the left or top edge instead. */
/* speech bubble opens on her LEFT (she lives bottom-right, so that side
   is always open space), vertically centered on her */
.halmeoni-reason {
  position: absolute; right: calc(100% + 14px); top: 50%; left: auto; bottom: auto;
  width: max-content; max-width: min(260px, 62vw); text-align: left;
  background: var(--brown); color: var(--cream); font-family: var(--menu); font-size: .84rem; line-height: 1.5;
  padding: .85rem 1.05rem; border-radius: 18px;
  opacity: 0; pointer-events: none; z-index: 5;
  transform: translateY(-50%) translateX(6px) scale(.92); transform-origin: right center;
  transition: opacity .3s, transform .35s var(--ease-spring);
  box-shadow: var(--shadow-lift);
}
.halmeoni-reason::after {
  content: ''; position: absolute; left: 100%; top: 50%; margin-top: -7px; right: auto;
  border: 7px solid transparent; border-left-color: var(--brown);
}
.halmeoni-reason .kr { display: block; color: var(--sage); font-size: .75rem; letter-spacing: .1em; margin-bottom: .35rem; }
.halmeoni-reason.show { opacity: 1; pointer-events: auto; transform: translateY(-50%) translateX(0) scale(1); }

/* if she's been dragged against the left edge, flip the bubble to her right */
.halmeoni-reason.flip-right {
  right: auto; left: calc(100% + 14px);
  transform: translateY(-50%) translateX(-6px) scale(.92); transform-origin: left center;
}
.halmeoni-reason.flip-right.show { transform: translateY(-50%) translateX(0) scale(1); }
.halmeoni-reason.flip-right::after {
  left: auto; right: 100%; border-left-color: transparent; border-right-color: var(--brown);
}

.halmeoni-inline { pointer-events: none; user-select: none; }
.halmeoni-inline svg, .halmeoni-inline img { width: 100%; display: block; }

@media (prefers-reduced-motion: reduce) { .halmeoni-bob { animation: none; } }

/* reduced motion — calm everything down */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
