/* CHOT — brand rules live in /CLAUDE.md. Logos/symbols are only ever sized by width OR height. */

@font-face { font-family: "Paperlogy"; font-weight: 800; font-display: swap; src: url("../assets/fonts/Paperlogy-8ExtraBold.subset.woff2") format("woff2"); }
@font-face { font-family: "Paperlogy"; font-weight: 900; font-display: swap; src: url("../assets/fonts/Paperlogy-9Black.subset.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 400; font-display: swap; src: url("../assets/fonts/Pretendard-Regular.subset.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 500; font-display: swap; src: url("../assets/fonts/Pretendard-Medium.subset.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 600; font-display: swap; src: url("../assets/fonts/Pretendard-SemiBold.subset.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 700; font-display: swap; src: url("../assets/fonts/Pretendard-Bold.subset.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --pink: #e20382;
  --blue: #8597ff;
  --ink: #0e0e0f;
  --navy: #191a37;
  --indigo: #6982ed;
  --pink-soft: #fcc8f2;
  --blue-soft: #ccd8ff;
  --white: #ffffff;
  --muted: rgba(25, 26, 55, 0.62);
  --line: rgba(25, 26, 55, 0.1);
  --tint-pink: rgba(252, 200, 242, 0.35);
  --tint-blue: rgba(204, 216, 255, 0.4);
  --surface: rgba(204, 216, 255, 0.2);

  --f-title: "Paperlogy", "Pretendard", system-ui, sans-serif;
  --f-body: "Pretendard", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --gutter: clamp(20px, 5vw, 56px);
  --maxw: 1120px;
  --radius: 20px;
  --tap: 52px;
  --topbar-h: 108px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 16px/1.7 var(--f-body);
  letter-spacing: -0.02em; /* Pretendard Regular: tracking -2 */
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
/* Paperlogy: Korean-only lines. Lines that mix Korean and Latin use .t-sans-title. */
.t-title { font-family: var(--f-title); font-weight: 900; letter-spacing: -0.02em; line-height: 1.35; }
.t-sans-title { font-family: var(--f-body); font-weight: 700; letter-spacing: -0.025em; line-height: 1.35; }
.eyebrow { font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pink); margin-bottom: 10px; }
.eyebrow::before { content: "| "; }
/* medium and heavier Pretendard keep the earlier, looser tracking */
.btn, .pill, .chip, .choice, .topbar__nav a, .toc a, strong, b, h3, dt, .caption,
.card__notice, .tumblbug__name, .tumblbug__notice, .msg--user .msg__bubble, .composer__send, .composer__notice,
.divider, .swatch__info b, .rule figcaption, .errors span, .minsize > div, .w5, .w6, .w7 { letter-spacing: -0.01em; }
.caption { font-size: 13px; font-weight: 600; color: var(--muted); margin: 28px 0 12px; }
.caption:first-child { margin-top: 0; }
.source { font-size: 12px; color: var(--muted); margin-top: 14px; }
.accent { color: var(--pink); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0 26px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none; border: 0;
  transition: transform .15s ease, background-color .2s ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--pink); color: var(--white); }
.btn--ghost { background: var(--white); color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--white { background: var(--white); color: var(--pink); }
.btn[aria-disabled="true"] { background: var(--blue-soft); color: var(--navy); pointer-events: none; }

.pill {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0;
  background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap;
}
.pill:active { background: var(--tint-blue); }
.pill:disabled { opacity: .4; cursor: default; }
.pill--accent { color: var(--pink); box-shadow: inset 0 0 0 1.5px var(--pink-soft); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 0; /* logo centred on top, menu under it */
  min-height: var(--topbar-h);
  padding: 0 var(--gutter) 6px;
  padding-top: env(safe-area-inset-top);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
/* logo: 104px wide (min 100px); 0.5H clear space is guaranteed by the link padding */
.topbar__logo { display: block; padding: 14px 14px 8px; }
.topbar__logo img { width: 104px; height: auto; }
.topbar__nav { display: flex; justify-content: center; gap: 4px; }
.topbar__nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted);
}
.topbar__nav a[aria-current="page"] { color: var(--pink); font-weight: 700; } /* pink bold only, no pill behind */

/* ---------- views ---------- */
.view { display: none; }
.view.is-active { display: block; animation: view-in .35s ease both; }
#view-products { scroll-margin-top: var(--topbar-h); } /* 제품보기 starts under the sticky bar on the long page */
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(56px, 9vw, 104px) var(--gutter) 0; }
.section--first { padding-top: clamp(40px, 6vw, 72px); }
.section__head { margin-bottom: clamp(24px, 4vw, 40px); }
.section__head h2 { font-size: clamp(26px, 3.6vw, 38px); }

/* ---------- home ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto; text-align: center;
  /* generous side margins so the slogan and copy never run to the screen edges */
  padding: clamp(88px, 13vw, 168px) clamp(36px, 9vw, 120px) clamp(72px, 9vw, 112px);
}
/* the slogan is the centre of the hero: generous space above and below it */
.hero__slogan { width: min(600px, 100%); height: auto; margin: 0 auto; }
.hero__lead { font-size: clamp(19px, 2.6vw, 26px); font-weight: 800; /* one step under the Black slogan */ color: var(--navy); margin-top: clamp(44px, 6vw, 72px); }
.hero__row { display: block; } /* two phrases, one per line, at every width */
.hero__sub { max-width: 600px; margin: 20px auto 0; font-size: 15px; line-height: 1.8; color: var(--muted); }
/* fixed line breaks in the intro; dropped on narrow phones where lines wrap anyway */
.br-wide { display: inline; }
@media (max-width: 480px) { .br-wide { display: none; } }

/* Main video, full width. Wider than the video → the wall and floor carry on at the sides:
   hero-extend.webp repeats each row's edge colour (median over the clip, tools/make_hero_video.py);
   past its 4:1 width the flat tones below take over (horizon at 65.3% of the height). */
.key-visual {
  --horizon: 65.3%;
  display: flex; justify-content: center; overflow: hidden;
  height: min(92svh, 1000px);
  background:
    url("../assets/video/hero-extend.webp") center / auto 100% no-repeat,
    linear-gradient(to bottom, transparent var(--horizon), #dfdee3 var(--horizon), #e3e4e5),
    linear-gradient(to bottom, #8198f2 3%, #7693f2 30%, #6c89ed 60%);
}
.key-visual { position: relative; }
.key-visual__media { display: block; height: 100%; width: auto; }
.key-visual__media[hidden] { display: none; } /* the video or its still, whichever can show */
/* the way into 제품보기, set on the light floor at the bottom of the video */
.key-visual__go { position: absolute; left: 50%; bottom: clamp(25px, calc(5% + 5px), 53px); transform: translateX(-50%); white-space: nowrap; min-height: 42px; padding: 0 22px; font-size: 15px; }
.key-visual__go:active { transform: translateX(-50%) scale(0.97); }
.key-visual__media {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

/* small text link under HOW */
.home-link { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section .home-link { padding: 0; margin-top: 24px; }
.section .home-link--cta { margin-top: clamp(36px, 5vw, 52px); text-align: center; } /* HOW: the way into 첫기분, a pink button in the middle */
.text-link { display: inline-flex; align-items: center; min-height: var(--tap); font-size: 15px; font-weight: 500; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

/* HOW: three numbered rows, letters and numbers only */
.how { display: grid; gap: clamp(40px, 7vw, 64px); padding: 0; list-style: none; } /* wide gap between sets; photo + its number stay close (16px) */
/* big number on the left, heading over description on the right, both starting on one line */
.how__body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px clamp(16px, 3vw, 24px); align-items: center; }
/* every row carries a photo: above the text on phones; on wider screens photos sit in the left
   column and every row's text in the right one, so row 3 lines up under rows 1 and 2 */
.how__item--photo { display: grid; gap: 16px; }
.how .how__photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.how__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 861px) {
  .how__item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
  .how__item .how__body { grid-column: 2; }
  .how__item .how__text { grid-column: 2; max-width: 20em; } /* the three descriptions end up about the same width */
}
.how__no { grid-row: 1 / span 2; font-size: 68px; line-height: 1; min-width: 1.1ch; text-align: center; }
.how__item:nth-child(1) .how__no { color: var(--pink); }
.how__item:nth-child(2) .how__no { color: var(--indigo); }
.how__item:nth-child(3) .how__no { color: var(--navy); }
.how__head { grid-column: 2; align-self: end; font-size: 21px; font-weight: 700; line-height: 32px; color: var(--navy); }
.how__text { grid-column: 2; align-self: start; font-size: 18px; line-height: 30px; color: var(--navy); word-break: keep-all; text-wrap: balance; }
@media (max-width: 640px) {
  .how__text { line-height: 1.6; }
}


/* full-width light colour layers behind Brand Story and HOW */
.tint { margin-top: clamp(56px, 9vw, 104px); padding-bottom: clamp(56px, 9vw, 104px); }
.tint > .section { padding-top: clamp(56px, 9vw, 104px); }
.key-visual + .tint { margin-top: 0; } /* the pink band starts right where the main photo ends */
.tint--pink { background: #feeffb; }
.tint--blue { background: #f0f3ff; }

/* Brand Story title: breaks between words only, lines kept even */
.tint--pink .section__head { text-align: center; } /* Brand Story reads centred */
/* closing lines: Paperlogy ExtraBold in pink at the body size, one phrase per line */
.story__close { font-family: var(--f-title); font-weight: 800; font-size: 19px; line-height: 1.7; color: var(--pink); }
.story__row { display: block; }
/* the CH✱T logo standing in for the word (user's call, an exception to the no-logo-in-text rule);
   height only, so its proportions never change */
.story__logo { display: inline-block; height: .78em; width: auto; margin-right: .08em; vertical-align: -0.02em; }

/* scroll reveal on the home sections (app.js setupReveal; never on the hero, off with reduced motion) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .4s ease-out, transform .4s ease-out; transition-delay: var(--reveal-delay, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
/* Brand Story → WHY follow the scroll instead (js/scrub.js sets --e and the rise); fully shown without JS */
.scrub { opacity: var(--e, 1); will-change: opacity, transform; }

.story > p { word-break: keep-all; text-wrap: balance; } /* centred lines of even length */
.story { max-width: 560px; margin: 0 auto; text-align: center; display: grid; gap: 16px; font-size: 16px; line-height: 26.8px; color: var(--navy); } /* 28.8px - 2 */

.why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.why__item {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: clamp(24px, 3.4vw, 36px); padding-right: clamp(64px, 9vw, 110px); /* room for the corner ✱ */
  border-radius: var(--radius); background: var(--tint-blue); --why-symbol: var(--blue-soft);
}
.why__item:nth-child(2) { background: var(--tint-pink); --why-symbol: var(--pink-soft); }
/* the site's ✱ (assets/symbol.svg) as a mask: same shape and proportions, only its colour set; its centre sits a
   little inside the bottom-right corner so most of the ✱ shows and the card edge cuts the rest; behind the text */
.why__item::after {
  content: ""; position: absolute; z-index: -1; right: 0; bottom: 0;
  height: min(70%, 170px); aspect-ratio: 115.934 / 137.369; transform: translate(26%, 26%); /* capped so a tall card keeps it clear of the text */
  background: var(--why-symbol);
  -webkit-mask: url("../assets/symbol.svg") center / contain no-repeat; mask: url("../assets/symbol.svg") center / contain no-repeat;
}
.why__big { font-family: var(--f-title); font-weight: 800; font-size: 28px; line-height: 1.4; color: var(--navy); word-break: keep-all; text-wrap: balance; }
.why__em { font-style: normal; color: var(--pink); }
.why__small { margin-top: 10px; font-size: 15px; color: var(--muted); }
.why__item .source { margin-top: auto; padding-top: 20px; font-size: 13px; word-break: keep-all; text-wrap: balance; }
.source__link { color: inherit; text-decoration: underline; text-underline-offset: 2px; } /* opens the article in a new tab */
/* card A: four bars from a 0 baseline, heights in true proportion (js/why.js) */
.why-chart { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 2vw, 18px); width: 100%; max-width: 320px; margin-top: 18px; }
.why-chart__col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.why-chart__value { font-size: 13px; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.why-chart__track { display: flex; align-items: flex-end; width: 100%; height: clamp(96px, 12vw, 130px); }
.why-chart__bar { width: 100%; border-radius: 8px 8px 0 0; background: #c9cddb; } /* grey only for these bars */
.why-chart__label { font-size: 13px; color: var(--muted); }
.why-chart__col.is-accent .why-chart__bar { background: var(--pink); }
.why-chart__col.is-accent .why-chart__value { color: var(--pink); font-weight: 700; }
.why-chart__col.is-accent .why-chart__label { font-weight: 600; color: var(--navy); }
/* card B: the big number and two highlighter strokes painted left to right */
/* card B: no number — the two sentences carry the weight the big number used to */
.why__small--lead { margin: 0 0 12px; }
.why__big--hl { font-size: clamp(30px, 3.4vw, 36px); line-height: 1.45; }
.why__note { margin-top: 12px; font-size: 12px; color: var(--muted); }
.why__hl {
  color: inherit; padding: 0 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(var(--hl), var(--hl)) 0 88% / 0% 46% no-repeat; transition: background-size .6s ease-out;
}
.why__line { display: block; text-wrap: balance; } /* each sentence on its own line(s), broken evenly */
.why__hl--blue { --hl: rgba(133, 151, 255, .45); }
.why__hl--pink { --hl: rgba(226, 3, 130, .3); }
.why__hl.is-on { background-size: 100% 46%; }
@media (max-width: 640px) { .why__big { font-size: 24px; } .why__big--hl { font-size: 27px; } .why__item { padding-right: 72px; } .why__item::after { height: min(70%, 110px); } }

.values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* icon on the left, value name and description beside it */
.value { display: flex; align-items: center; gap: 22px; padding: 26px 24px; border-radius: var(--radius); box-shadow: inset 0 0 0 1.5px var(--line); }
.value__icon { flex: 0 0 64px; height: 64px; display: grid; place-items: center; }
.value__icon img { max-width: 64px; max-height: 64px; width: auto; height: auto; }
.value__icon--small img { max-width: 44px; max-height: 44px; }
.value__name { font-size: 19px; font-weight: 700; color: var(--pink); margin-bottom: 6px; }
.value p { font-size: 15px; color: var(--muted); }

.pmv { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pmv > div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.pmv dt { font-weight: 700; color: var(--navy); }
.pmv dd { color: var(--navy); }

.band {
  position: relative; overflow: hidden;
  margin: clamp(72px, 10vw, 120px) 0 0; padding: 0 var(--gutter);
  height: clamp(300px, 34vw, 420px);
  background: var(--pink); color: var(--white); text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
/* postcard 3 layout, scaled to the band height: big symbol cut by the left edge
   (74% tall, 6.2% from the top) and a piece cut by the bottom-right corner (42.7% tall) */
.band__wall { position: absolute; width: auto; pointer-events: none; }
.band__wall--left { left: 0; top: 6.2%; height: 74%; }
.band__wall--corner { right: 0; bottom: 0; height: 42.7%; }
.band__text, .band .btn { position: relative; }
.band__text { font-size: clamp(22px, 3vw, 32px); margin-bottom: 24px; }
/* narrow phones: smaller pieces so they stay clear of the text and button */
@media (max-width: 480px) { .band__wall--left { height: 46%; top: 6.2%; } .band__wall--corner { height: 32%; } }

/* ---------- chat ---------- */
.view--chat.is-active { display: flex; }
.chat {
  width: 100%; max-width: 780px; margin: 0 auto;
  display: flex; flex-direction: column;
  min-height: calc(100dvh - var(--topbar-h));
  padding: 16px var(--gutter) 0;
}
.chat__bar {
  position: sticky; top: var(--topbar-h); z-index: 5;
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 10px 0; background: var(--white);
}
.chat__actions { display: flex; gap: 8px; }

.chooser { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 0 72px; }
.chooser[hidden] { display: none; }
.chooser__title { font-size: clamp(28px, 4vw, 40px); margin-bottom: 36px; }
.chooser__buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 16px; width: 100%; justify-content: center; }
.choice {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  min-height: 188px; border: 0; border-radius: 28px;
  background: none; font-size: 22px; font-weight: 700; color: var(--navy);
  transition: transform .15s ease;
}
/* the button is the symbol itself: pink for 아이, the logo's blue asterisk for 부모 */
.choice img { height: 104px; width: auto; }
/* the title stays put; the two buttons sit 1cm closer to the centre and 2cm lower (transform, so layout doesn't move) */
.choice { --dx: 1cm; transform: translate(var(--dx), 2cm); }
.choice + .choice { --dx: -1cm; }
.choice:active { transform: translate(var(--dx), 2cm) scale(0.97); }

.chat__log { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 8px 0 24px; }
.chat__log:empty { display: none; }
.chat__log > * { scroll-margin-bottom: 150px; } /* keep new lines clear of the sticky composer */
.msg { display: flex; gap: 10px; max-width: 88%; }
.msg__avatar { flex: 0 0 auto; width: 32px; height: auto; margin-top: 4px; } /* symbol min size 32px */
.msg__bubble { padding: 13px 18px; border-radius: 20px; font-size: 16px; line-height: 1.7; white-space: pre-wrap; }
.msg--bot .msg__bubble { background: var(--tint-pink); color: var(--ink); border-top-left-radius: 6px; } /* child: light pink */
.msg--bot.msg--parent .msg__bubble { background: var(--tint-blue); } /* parent: light blue */
.msg--user { align-self: flex-end; }
.msg--user .msg__bubble { background: var(--pink); color: var(--white); font-weight: 500; border-top-right-radius: 6px; }
.msg--user.msg--parent .msg__bubble { background: var(--indigo); }
.msg__bubble.is-typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--pink); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.dots { display: inline-flex; gap: 5px; padding: 6px 2px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: dot 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 42px; }
.chip {
  min-height: 48px; padding: 10px 18px; border-radius: 999px; border: 0;
  background: var(--white); box-shadow: inset 0 0 0 1.5px var(--blue);
  color: var(--navy); font-size: 15px; font-weight: 600; text-align: left; line-height: 1.4;
  animation: chip-in .3s ease both;
}
.chip:active { background: var(--tint-blue); }
.chips--child .chip { box-shadow: inset 0 0 0 1.5px var(--pink); }
.chips--child .chip:active { background: var(--tint-pink); }
.chips.is-used .chip { box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted); }
@keyframes chip-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.divider { align-self: center; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 14px; border-radius: 999px; background: var(--tint-blue); }

.composer {
  position: sticky; bottom: 0; z-index: 5;
  padding: 10px 0 calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--white) 18px);
}
.composer[hidden] { display: none; }
.composer__notice { font-size: 12px; font-weight: 500; color: var(--muted); text-align: center; padding: 6px 0 0; word-break: keep-all; } /* the 1388 line under the input */
.composer__notice:empty { display: none; }
.composer__row { display: flex; gap: 8px; }
.composer__row[hidden] { display: none; }
.composer__input {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: 999px; border: 0;
  background: var(--surface); font-size: 15px;
}
.composer__input::placeholder { color: var(--muted); }
.composer__input:focus { outline: 2px solid var(--blue); }
[data-mode="child"] .composer__input:focus { outline-color: var(--pink); }
[data-mode="parent"] .composer__input:focus { outline-color: var(--blue); }
.composer__send { flex: 0 0 46px; width: 46px; height: 46px; padding: 0; border-radius: 50%; border: 0; background: var(--navy); color: var(--white); font-size: 20px; font-weight: 700; line-height: 1; }
.composer__send:disabled { opacity: .4; }

/* ---------- products (제품보기) ---------- */
.products { max-width: var(--maxw); margin: 0 auto; padding: clamp(28px, 5vw, 56px) 0 0; }
/* each part of the page: a small eyebrow heading under a hairline divider */
.products__sec { margin: clamp(32px, 6vw, 72px) var(--gutter) 0; padding-top: clamp(24px, 4vw, 36px); border-top: 1px solid var(--line); }
.products__sec[hidden] { display: none; }
.products__sec { border-top-color: transparent; } /* no rules between the 제품보기 parts; the space stays */
.products__sec .eyebrow { margin-bottom: 16px; }
.deck > .products__sec { margin-top: clamp(24px, 4vw, 40px); }
.products__sec + .bloom { margin-top: 0; }
.products__sec + .tumblbug { margin-top: 0; }
.products__bar { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 var(--gutter); }
.products__tlink { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* scene 0–1: the closed tin, opened by dragging */
/* contents start near the PRODUCTS bar (a moderate gap), not centred in the tall scene */
.tin { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: clamp(40px, 7vw, 64px) var(--gutter) clamp(12px, 3vw, 24px); justify-content: flex-start; } /* only as tall as its contents */
.tin.is-open { min-height: 0; }
.tin__title { font-size: clamp(28px, 4vw, 40px); color: var(--navy); }
/* the lid-opening photo sequence (js/tin-sequence.js): square, drawn on one canvas, the tin on
   the page itself (photos have transparent backdrops). 60% of the earlier size, which was capped
   so title, tin and hint fit one landscape iPad screen (1180×820) */
.tin__frame { --tin-size: min(720px, 100%, 100svh - 340px); position: relative; width: calc(var(--tin-size) * 0.6); aspect-ratio: 1; border-radius: 24px; outline-offset: 6px; }
@media (min-width: 861px) { .tin__frame { width: calc(var(--tin-size) * 0.78); } } /* computer: 30% larger */
.tin__canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.tin__frame--pending { display: grid; place-items: center; background: #ececf1; color: var(--muted); font-size: 13px; font-weight: 600; }
.tin__frame--pending .tin__canvas { position: absolute; inset: 0; }
/* portrait phone: no taller than 70% of the screen */
@media (max-width: 640px) and (orientation: portrait) { .tin__frame { --tin-size: min(100%, 70svh); } }
.tin__hint { font-size: 14px; font-weight: 500; color: var(--muted); transition: opacity .4s ease; }
.tin__hint.is-hidden { opacity: 0; }
.tin__title + .tin__hint { margin: -12px 0 12px; } /* close under the title (6px); the tin stays where it was */
.tin__next { transition-duration: .6s; }                  /* "하나씩 만나보세요": a slower fade, opacity only */

.photo { position: relative; background: var(--surface); overflow: hidden; }
.photo img { display: block; width: 100%; height: auto; }
.photo--pending { display: grid; place-items: center; aspect-ratio: 16 / 9; background: #ececf1; color: var(--muted); font-size: 13px; font-weight: 600; }
.photo__sim { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.85); font-size: 11px; color: var(--navy); }

/* swipe sideways with native scroll-snap; vertical page scrolling is left alone */
.deck { margin-top: 12px; }
.deck__track {
  display: flex; gap: 20px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 8px max(var(--gutter), calc((100% - min(680px, 86vw)) / 2)) 16px; align-items: stretch;
}
.deck__track::-webkit-scrollbar { display: none; }
.card {
  flex: 0 0 min(680px, 86vw); scroll-snap-align: center;
  border-radius: 24px; overflow: hidden; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line);
  display: flex; flex-direction: column; /* all cards as tall as the tallest, buttons on one line at the bottom */
}
.card__photo { border-radius: 0; aspect-ratio: 16 / 9; } /* every card the same photo size: a photo of another shape fills it, centred */
.card__photo img { width: 100%; height: 100%; object-fit: cover; }
/* a card's own photo slideshow (products.js createSlideshow): the shown photo fades in over the
   last in .6s (= SLIDE_FADE_MS); the first photo keeps the frame's size. Sideways swipes stay here. */
.photo--swap { touch-action: pan-y; }
.photo--swap img { opacity: 0; transition: opacity .6s ease-in-out; }
.photo--swap img + img { position: absolute; inset: 0; }
.photo--swap img.is-shown { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .photo--swap img { transition: none; } }
/* where you are: small dots on the photo, the current one filled */
.photo__dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 2px; }
.photo__dot { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.photo__dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .7); box-shadow: 0 0 0 1px rgba(25, 26, 55, .15); }
.photo__dot[aria-current="true"]::before { background: var(--pink); }
.card__body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: clamp(20px, 3vw, 28px); }
.card__item { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.card__stepno { padding: 2px 10px; border-radius: 999px; background: var(--pink); color: var(--white); font-size: 12px; font-weight: 700; }
.card__title { font-size: clamp(22px, 2.8vw, 28px); color: var(--navy); }
.card__desc { font-size: 16px; line-height: 1.7; color: var(--navy); }
.card__notice { font-size: 13px; font-weight: 700; color: var(--ink); padding: 10px 14px; border-radius: 12px; background: var(--tint-blue); }
.card__line { font-size: 14px; font-weight: 600; color: var(--muted); }
.card__more { display: grid; gap: 10px; padding-top: 6px; font-size: 15px; line-height: 1.75; color: var(--navy); }
.card__more[hidden] { display: none; }
.card__helps-title { font-weight: 700; color: var(--pink); margin-top: 6px; }
.card__helps { display: grid; gap: 6px; padding-left: 18px; list-style: disc; }
.card__gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.card__thumb { width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: none; }
.card__thumb .photo--pending { aspect-ratio: 1; font-size: 11px; }
.card__actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; margin-top: auto; }
.card__try { min-height: 44px; }
/* step bar sits above the cards */
.deck__nav { display: flex; align-items: center; justify-content: center; gap: 8px 16px; padding: 4px var(--gutter) clamp(20px, 3vw, 28px); /* room before the cards */ max-width: 760px; margin: 0 auto; }
/* numbered step bar: 1 → 5, the line fills up to the current step */
.deck__dots { --progress: 0; position: relative; flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.deck__dots::before, .deck__dots::after { content: ""; position: absolute; top: 16px; left: 10%; height: 2px; border-radius: 2px; }
.deck__dots::before { right: 10%; background: var(--line); }
.deck__dots::after { width: calc(80% * var(--progress)); background: var(--pink); transition: width .3s ease; }
.deck__dot { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px; border: 0; background: none; }
.deck__num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--white); box-shadow: inset 0 0 0 2px var(--line); font-size: 14px; font-weight: 700; color: var(--muted); transition: background-color .25s, color .25s, box-shadow .25s; }
.deck__dot.is-done .deck__num { box-shadow: inset 0 0 0 2px var(--pink); color: var(--pink); }
.deck__dot[aria-current="step"] .deck__num { background: var(--pink); box-shadow: none; color: var(--white); }
.deck__name { font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--muted); text-align: center; word-break: keep-all; }
.deck__dot[aria-current="step"] .deck__name { color: var(--navy); }
.deck__step { min-height: 44px; min-width: 44px; padding: 0 8px; border: 0; background: none; font-size: 15px; font-weight: 700; color: var(--navy); }
.deck__step:disabled { opacity: .3; }
@media (max-width: 640px) {
  /* phone: the step bar takes the full row, 이전 / 다음 sit underneath at either end */
  .deck__nav { flex-wrap: wrap; justify-content: space-between; padding-left: 12px; padding-right: 12px; }
  .deck__dots { order: -1; flex-basis: 100%; }
  .deck__name { font-size: 11px; }
}

.lightbox { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(25, 26, 55, .72); }
.lightbox[hidden] { display: none; }
.lightbox .photo { width: min(720px, 100%); border-radius: 16px; }

/* scene 3–4: 첫기분 board — 핑크 = 아이, 블루퍼플 = 부모 */
/* the whole 첫기분 panel takes the colour of the chosen view: pink = 아이, blue-purple = 부모 */
.bloom {
  --view-bg: rgba(252, 200, 242, 0.5); --view-accent: var(--pink); --view-on: var(--white);
  margin: clamp(56px, 8vw, 96px) var(--gutter) 0; padding: clamp(20px, 4vw, 44px); border-radius: 28px;
  background: var(--view-bg); transition: background-color .35s ease;
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}
.bloom[data-view="parent"] { --view-bg: rgba(204, 216, 255, 0.8); --view-accent: var(--blue); --view-on: var(--navy); }
.bloom[hidden] { display: none; }
.bloom__title { font-size: clamp(28px, 4vw, 40px); color: var(--navy); }
.bloom__line { margin-top: 6px; color: var(--muted); }
/* segmented switch: the chosen side is filled with its colour */
.bloom__views { display: flex; width: fit-content; gap: 4px; margin: clamp(28px, 4vw, 40px) auto 0; padding: 4px; /* centred */ border-radius: 999px; background: var(--white); }
.bloom__view { box-shadow: none; background: transparent; color: var(--muted); min-width: 104px; }
.bloom__view[aria-pressed="true"] { color: var(--view-on); background: var(--view-accent); }
.bloom__main { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.bloom__play { position: relative; }
.bloom__board { width: 100%; aspect-ratio: 772 / 688; border-radius: 20px; overflow: hidden; background: var(--white); box-shadow: 0 1px 2px rgba(25,26,55,.08), 0 10px 30px rgba(25,26,55,.10); }
.bloom__board img { display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-select: none; }
.bloom__tray { margin-top: 20px; border-radius: 20px; background: rgba(255, 255, 255, 0.7); }
.magnet { position: absolute; z-index: 2; height: auto; filter: drop-shadow(0 2px 5px rgba(25, 26, 55, .28)); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; }
.magnet.is-held { cursor: grabbing; }
.magnet.is-settling { transition: left .28s cubic-bezier(.2,.8,.2,1), top .28s cubic-bezier(.2,.8,.2,1); }
/* every piece gets the same soft shadow (shape and colour unchanged) */
.bloom__side { display: grid; gap: 12px; font-size: 15px; color: var(--navy); }
.bloom__note { color: var(--muted); font-size: 14px; }
.bloom__lead { font-size: 18px; font-weight: 700; line-height: 1.5; color: var(--navy); word-break: keep-all; }
.bloom__lead span { display: inline-block; }
.bloom__always { font-size: 14px; color: var(--muted); }
.bloom__again { display: inline-flex; align-items: center; justify-content: center; margin: 16px 0 18px; }
.bloom__guide { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; background: var(--white); box-shadow: inset 4px 0 0 var(--view-accent); }
.steps { display: grid; gap: 14px; margin-top: clamp(32px, 5vw, 48px); padding: 0; list-style: none; }
.steps__item { display: grid; grid-template-columns: 36px auto 1fr; gap: 4px 14px; align-items: start; }
/* number box as tall as the title line, so the number sits level with the title */
.steps__no { font-size: 22px; line-height: 27px; color: var(--pink); }
.bloom[data-view="parent"] .steps__no { color: var(--indigo); }
.steps__head { font-weight: 700; line-height: 27px; color: var(--navy); }
.steps__text { color: var(--navy); word-break: keep-all; text-wrap: balance; }
/* 아이 / 부모 descriptions stacked in one cell: the taller one sets the height, the other is hidden */
.steps__text { display: grid; }
.steps__t { grid-area: 1 / 1; }
.bloom:not([data-view="parent"]) .steps__t--parent, .bloom[data-view="parent"] .steps__t--child { visibility: hidden; }
@media (max-width: 860px) {
  .bloom__main { grid-template-columns: minmax(0, 1fr); }
  .steps__item { grid-template-columns: 30px 1fr; }
  .steps__text { grid-column: 2; }
}
@media (max-width: 640px) {
  .bloom { margin-left: 12px; margin-right: 12px; padding: 18px 14px; border-radius: 22px; }
  .bloom__views { display: flex; }
  .bloom__view { flex: 1; min-width: 0; }
}
.tumblbug {
  margin: clamp(56px, 8vw, 96px) var(--gutter) 0; padding: clamp(24px, 4vw, 44px) 0;
  /* the pink runs edge to edge of the screen as a plain band (border-image outset: no sideways scroll) */
  border-image: linear-gradient(var(--tint-pink), var(--tint-pink)) fill 0 / 0 / 0 100vw;
  display: grid; gap: 18px; scroll-margin-top: calc(var(--topbar-h) + 16px);
}
/* the wide set photo; title and note on its plain floor at the left (the photo was widened for this) */
.tumblbug__visual { position: relative; border-radius: 20px; overflow: hidden; }
.tumblbug__photo { background: var(--surface); }
.tumblbug__head { position: absolute; left: 5%; top: 50%; transform: translateY(-50%); width: 38%; display: grid; gap: 8px; }
.tumblbug__head .eyebrow { margin-bottom: 0; }
.tumblbug__note--outside { display: none; }
.tumblbug__title { font-size: clamp(26px, 4.2vw, 44px); color: var(--pink); line-height: 1.1; }
.tumblbug__note { color: var(--navy); font-size: clamp(15px, calc(1.6vw + 2px), 18px); word-break: keep-all; }
.tumblbug__note span { display: block; } /* two lines: "…준비하고 있습니다!" / "많은 기대와…" */
@media (max-width: 640px) {
  .tumblbug { margin-left: 12px; margin-right: 12px; padding: 24px 0; }
  /* the photo is small: TUMBLBUG and the title stay on it, the note goes above it */
  .tumblbug__head { width: 50%; gap: 4px; }
  .tumblbug__head .eyebrow { font-size: 11px; }
  .tumblbug__title { font-size: clamp(18px, 5.4vw, 26px); white-space: nowrap; }
  .tumblbug__head .tumblbug__note { display: none; }
  .tumblbug__note--outside { display: block; text-align: center; }
}

/* ---------- design guide ---------- */
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--navy); }
.g { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 64px); align-items: start; scroll-margin-top: calc(var(--topbar-h) + 16px); }
.g__text { display: grid; gap: 14px; position: sticky; top: calc(var(--topbar-h) + 24px); }
.g__text h3 { font-size: clamp(22px, 2.6vw, 28px); }
.g__text p { color: var(--navy); font-size: 15px; }
.formula { display: grid; gap: 6px; margin-top: 6px; }
.formula li { font-size: 15px; font-weight: 600; color: var(--pink); }
.formula li + li::before { content: "+ "; color: var(--muted); }

.plate { display: grid; place-items: center; padding: clamp(36px, 6vw, 64px) 24px; border-radius: var(--radius); background: var(--surface); }
.g-logo { width: min(360px, 80%); height: auto; }
.g-slogan { width: min(560px, 100%); height: auto; }
.plate--stage { gap: 20px; }
.symbol-stage { width: min(320px, 80%); aspect-ratio: 1; }
.jamo { display: flex; align-items: flex-end; justify-content: center; gap: clamp(16px, 4vw, 40px); padding: 24px 0 0; }
.jamo svg { height: 64px; width: auto; }
.jamo .jamo__sym { height: 72px; }
.jamo__eq { font-size: 22px; font-weight: 700; color: var(--muted); align-self: center; }

.variations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.variations li { position: relative; aspect-ratio: 4 / 3; background: var(--white); }
.variations img { position: absolute; inset: 18% 14%; width: 72%; height: 64%; object-fit: contain; }

/* small colour chips with plenty of white around them (user's call): no card, just chip + values */
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 36px; margin-bottom: 12px; }
.swatch { width: 128px; text-align: center; }
.swatch__chip { width: 40px; height: 40px; margin: 0 auto; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.swatches--main .swatch__chip { width: 76px; height: 76px; border-radius: 16px; }
#g-color { text-align: center; } /* the colour section reads centred: title, text, captions, chips */
.swatch__info { padding: 10px 0 0; font-size: 13px; line-height: 1.5; }
.swatch__info b { display: block; font-size: 14px; }
.swatch__info span { color: var(--muted); }

.type-card { padding: 28px; border-radius: var(--radius); background: var(--surface); }
.type-card + .type-card { margin-top: 12px; }
.type-card .caption { margin: 0 0 14px; }
.type-sample { font-size: clamp(22px, 3vw, 30px); line-height: 1.4; }
.type-sample--paper9 { font-family: var(--f-title); font-weight: 900; }
.type-sample--paper8 { font-family: var(--f-title); font-weight: 800; font-size: 18px; color: var(--muted); margin-top: 8px; }
.type-sample--pre { font-weight: 700; }
.type-weights { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; color: var(--navy); }
.w4 { font-weight: 400; } .w5 { font-weight: 500; } .w6 { font-weight: 600; } .w7 { font-weight: 700; }

.patterns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.patterns li { aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--surface); }
.patterns img { width: 100%; height: 100%; object-fit: cover; }
.icons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.icons li { position: relative; aspect-ratio: 1; border-radius: 16px; background: var(--surface); }
/* object-fit: contain keeps each icon's own proportions inside the square cell */
.icons img { position: absolute; inset: 24%; width: 52%; height: 52%; object-fit: contain; }

.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#g-slogan .plate, #g-logo .plate { background: none; } /* slogan and logo on the page itself, no panel (user's call) */
.rule { border-radius: var(--radius); padding: 24px; /* no panel behind (user's call) */ display: flex; flex-direction: column; gap: 16px; }
.rule figcaption { font-size: 13px; font-weight: 600; color: var(--muted); }
.clearspace { flex: 1; display: grid; place-items: center; }
/* the dashed box is exactly 0.5H away from the logo on every side (H = logo height) */
.clearspace__box { --h: 34px; padding: calc(var(--h) / 2); outline: 1.5px dashed var(--blue); background: var(--white); }
.clearspace__box img { height: var(--h); width: auto; }
.minsize { flex: 1; display: flex; align-items: center; justify-content: space-around; gap: 16px; }
.minsize > div { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.minsize__logo { width: 100px; height: auto; }
.minsize__symbol { height: 32px; width: auto; }

.bgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bgs li { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; }
.bgs img { width: 46%; min-width: 100px; height: auto; }
.bg-blue { background: var(--blue); } .bg-pink { background: var(--pink); } .bg-white { background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.bg-green { background: #0e7a3a; } .bg-yellow { background: #ffe600; } .bg-black { background: #000; }
.bgs--no li { aspect-ratio: 16 / 6; position: relative; }
.bgs--no li::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), var(--pink) calc(50% - 1px), var(--pink) calc(50% + 1px), transparent calc(50% + 1px)); }

.errors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.errors li { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; aspect-ratio: 4 / 3; border-radius: 16px; background: var(--surface); padding: 14%; }
.errors img { max-width: 100%; max-height: 64%; width: auto; height: auto; }
.errors span { font-size: 12px; font-weight: 600; color: var(--muted); }
.errors li::before { content: ""; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--pink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M6 6l6 6M12 6l-6 6' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px no-repeat; }

/* design guide · 응용: magnet pieces */
.pieces { width: 100%; border-collapse: collapse; font-size: 15px; color: var(--navy); }
.pieces th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 10px 10px 0; border-bottom: 1px solid var(--line); }
.pieces td { padding: 14px 10px 14px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pieces td:first-child { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.pieces__img { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 56px; height: 48px; }
.pieces__img img { height: 100%; width: auto; } /* each piece keeps its own proportions */
.pieces__img--three img { height: 34px; }
.pieces__white { filter: drop-shadow(0 1px 3px rgba(25, 26, 55, .3)); }
.pieces__sub { font-size: 13px; color: var(--muted); }
/* ---------- footer ---------- */
/* logo + slogan keep their space (72px above, 48px below); the credit sits almost at the very bottom */
.footer { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 72px var(--gutter) calc(14px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 13px; }
.footer img { width: 104px; height: auto; }
.footer__credit { display: grid; gap: 8px; margin-top: 36px; font-size: 11px; line-height: 1.6; text-align: center; color: var(--muted); }
.footer__credit p:first-child { font-weight: 700; }
.footer__sep { margin: 0 10px; }
.footer__credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
body.on-chat .footer { display: none; }

/* ---------- opening (src/js/intro.js) ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  outline: none; overflow: hidden;
}
.intro.is-off { display: none; }
/* Netlify adds a "Powered by Netlify" badge (iframe#nl-badge-frame) to the hosted page: hidden */
#nl-badge-frame { display: none !important; }
.intro__bg { position: absolute; inset: 0; background: var(--pink); }
.intro__bg.is-white { background: var(--white); } /* = body background */
.intro__stage { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.intro__stage g { will-change: transform; }
.intro__sym { transform-box: view-box; }
.intro__bloom { transform-box: fill-box; transform-origin: center; }
.intro__logo, .intro__slogan { position: absolute; visibility: hidden; transform-origin: 0 0; }
.intro__logo svg, .intro__slogan svg { display: block; width: 100%; height: auto; overflow: visible; }
.intro__hint {
  /* very top of the screen, with a little breathing room */
  position: absolute; left: 0; right: 0; top: calc(28px + env(safe-area-inset-top)); margin: 0;
  text-align: center; font: 500 13px/1.4 var(--f-body); color: var(--white); pointer-events: none;
  transition: opacity .5s ease; /* fades out gently once the drag starts */
}
.intro__hint.is-hidden { opacity: 0; }
.intro.is-light .intro__hint { color: var(--navy); }
.intro:not(.is-light) .intro__hint { transition: none; }
.fx { position: fixed; inset: 0; z-index: 101; pointer-events: none; overflow: hidden; }
.intro__fx { position: absolute; inset: 0; pointer-events: none; }
.fx svg, .intro__fx svg { position: absolute; display: block; overflow: visible; will-change: transform, opacity; }
.stage-svg { width: 100%; height: 100%; overflow: visible; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g { grid-template-columns: minmax(0, 1fr); }
  .g__text { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar { align-items: stretch; }
  .topbar__logo { align-self: center; }
  .topbar__nav { justify-content: space-between; }
  .topbar__nav a { padding: 0 10px; font-size: 14px; }
  .hero { padding-left: 36px; padding-right: 36px; }
  .hero__sub { font-size: 14px; }
  /* portrait phone: the video itself fills the width, no extension needed */
  .key-visual { height: auto; background: none; }
  .key-visual__media { width: 100%; height: auto; -webkit-mask-image: none; mask-image: none; }
  .why { grid-template-columns: minmax(0, 1fr); }
  .values { grid-template-columns: minmax(0, 1fr); }
  .pmv > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .chat__bar { flex-wrap: wrap; }
  .chat__actions { width: 100%; }
  .chat__actions .pill { flex: 1; }
  .chooser__buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice { min-height: 156px; font-size: 20px; }
  .choice img { height: 88px; }
  .msg { max-width: 94%; }
  .chips { padding-left: 0; }
  .patterns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .icons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rules-grid, .bgs, .errors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bgs:not(.bgs--no) { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .view.is-active, .chip { animation: none; }
  .tin__next { transition: none; }
}
