/* bubblejack — 화면 규칙 (회차 3 "청량함", 4단계 frontend-dev)
 *
 * 색·서체·간격·이징은 전부 tokens.css 의 var() 다(raw 색 0). 모바일(쌓는 배치) 먼저 쓰고,
 * 가로 배치는 `(min-width: 56rem) and (min-aspect-ratio: 1/1)` 에서 켠다 — 세로 태블릿은 쌓는다(wireframe-v3 g6).
 * 구획은 선이 아니라 색 판과 간격이다. 1px 선 0 · 대문자 자간 라벨 0 · 알약 0 · 등장 연출 0 · 12열 0.
 * 크기 계산은 섹션 너비(cqi)와 창 높이(svh)로 한다 — 커스텀 속성은 쓰는 자리에서 풀리므로 cqi 는 "쓰는 요소의 가장 가까운 컨테이너" 기준이다.
 */

/* ── 바탕 ──────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* 16각 별 — 스티커 모양(정적 clip-path, 등장이 아니다). 바깥 반지름 50%, 안쪽 41% */
  --star: polygon(50% 0%, 58% 9.8%, 69.1% 3.8%, 72.8% 15.9%, 85.4% 14.6%, 84.1% 27.2%, 96.2% 30.9%, 90.2% 42%, 100% 50%, 90.2% 58%, 96.2% 69.1%, 84.1% 72.8%, 85.4% 85.4%, 72.8% 84.1%, 69.1% 96.2%, 58% 90.2%, 50% 100%, 42% 90.2%, 30.9% 96.2%, 27.2% 84.1%, 14.6% 85.4%, 15.9% 72.8%, 3.8% 69.1%, 9.8% 58%, 0% 50%, 9.8% 42%, 3.8% 30.9%, 15.9% 27.2%, 14.6% 14.6%, 27.2% 15.9%, 30.9% 3.8%, 42% 9.8%);
  --top-h: calc(var(--spacing-header) + env(safe-area-inset-top));
  --pad-x: max(var(--spacing-margin), env(safe-area-inset-left), env(safe-area-inset-right));
  /* 캔 컷아웃 사진의 폭 ÷ 높이(626 × 1400). 설계의 0.56 은 도면 캔 상자 값이다 — 사진은 더 가늘다(NOTES) */
  --can-k: 0.4471;
}

/* 홈은 한 화면 = 한 맛. 손가락에서는 proximity(주소창·긴 표와 싸우지 않게, 회차 1 NOTES 3) */
.is-home {
  scroll-snap-type: y mandatory;
}

@media (pointer: coarse) {
  .is-home {
    scroll-snap-type: y proximity;
  }
}

.is-detail,
.is-buy {
  scroll-padding-top: var(--top-h);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--text-body--line-height);
  font-weight: var(--font-weight-body);
  -webkit-tap-highlight-color: transparent;
}

:where(h1, h2, h3, p, dl, dd, ol, ul, figure, table) {
  margin: 0;
}

:where(ol, ul) {
  list-style: none;
  padding: 0;
}

:where(a) {
  color: inherit;
}

:where(img) {
  display: block;
}

:where(button) {
  font: inherit;
  color: inherit;
}

b {
  font-weight: var(--font-weight-strong);
}

sub {
  font-size: 0.7em;
  line-height: 0;
  vertical-align: -0.2em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* 맛 스위치(tokens.css)가 바꾼 바탕을 칠한다. 조작 부품의 색도 여기서 정한다 — 가장 가까운 [data-flavor] 가 이긴다.
   맛 바탕·흰 판 위: 고를 것 = 흰 판 + 먹, 고른 것·버튼 = 먹 판 + 그 바탕 색. 먹 바탕 위: 반대(섹션의 반전, DESIGN 버튼 행) */
[data-flavor] {
  background-color: var(--color-ground);
  color: var(--color-on-ground);
  --tile-bg: var(--color-fizz-plate);
  --tile-fg: var(--color-ink);
  --pick-bg: var(--color-ink);
  --pick-fg: var(--color-ground);
  --hover-bg: var(--color-fizz-plate);
  --hover-fg: var(--color-ink);
}

[data-flavor="carbon"] {
  --tile-bg: transparent;
  --tile-fg: var(--color-fizz);
  --pick-bg: var(--color-fizz-plate);
  --pick-fg: var(--color-ink);
  --hover-bg: var(--color-carbon-band);
  --hover-fg: var(--color-fizz);
}

:focus-visible {
  outline: var(--spacing-ring) solid var(--color-on-ground);
  outline-offset: 3px;
}

/* 작은 데이터 글자 — Chivo 600 13px, 문장식 · 자간 0(회차 3: 대문자 자간 라벨 0) */
.micro,
.stats dt,
.facts dt,
.prices dt,
.price dt,
.coolers caption,
.hero__kick,
.picker__kick,
.pair__score,
.meter__name,
.others__code,
.rig__dim,
.flavor__dim,
.total__per,
.qty__l,
.picker__note,
figcaption {
  font-family: var(--font-body);
  font-size: var(--text-micro);
  line-height: var(--text-micro--line-height);
  font-weight: var(--font-weight-semibold);
}

.section-title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-h2);
  line-height: var(--text-h2--line-height);
  text-transform: uppercase;
}

.c-guava {
  color: var(--color-guava-ground);
}

.c-rasp {
  color: var(--color-rasp-ground);
}

.c-yuzu {
  color: var(--color-yuzu-ground);
}

.c-cuke {
  color: var(--color-cuke-ground);
}

.c-mango {
  color: var(--color-mango-ground);
}

.c-bg-guava {
  background-color: var(--color-guava-ground);
}

.c-bg-rasp {
  background-color: var(--color-rasp-ground);
}

.c-bg-yuzu {
  background-color: var(--color-yuzu-ground);
}

.c-bg-cuke {
  background-color: var(--color-cuke-ground);
}

.c-bg-mango {
  background-color: var(--color-mango-ground);
}

/* ── 버튼 — 섹션의 반전(먹 판 + 바탕 색 글자). 테두리 0 · 모서리 0 ─────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
  min-height: var(--spacing-button);
  padding: var(--spacing-2) var(--spacing-6);
  border: 0;
  border-radius: var(--radius-none);
  background-color: var(--pick-bg);
  color: var(--pick-fg);
  font-family: var(--font-body);
  font-weight: var(--font-weight-strong);
  font-size: 0.9375rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

@media (hover: hover) {
  .btn:hover {
    background-color: var(--hover-bg);
    color: var(--hover-fg);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.25em;
  }
}

.btn:focus-visible {
  background-color: var(--hover-bg);
  color: var(--hover-fg);
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background-color 120ms var(--ease-out), color 120ms var(--ease-out), transform 90ms var(--ease-press);
  }

  .btn:active {
    transform: scale(0.97);
  }
}

.skip {
  position: fixed;
  z-index: 40;
  top: var(--spacing-2);
  left: var(--pad-x);
  display: inline-flex;
  align-items: center;
  min-height: var(--spacing-tap);
  padding: 0 var(--spacing-4);
  background-color: var(--color-fizz-plate);
  color: var(--color-ink);
  font-weight: var(--font-weight-strong);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus-visible {
  transform: none;
  outline-color: var(--color-ink);
}

/* 기포 멈춤(WCAG 2.2.2) — JS 가 있고 움직임이 켜졌을 때만 보인다. 글은 그대로 두고 눌림 상태를 aria-pressed 로 */
.fizz-toggle {
  display: none;
  align-items: center;
  min-height: var(--spacing-tap);
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--text-micro);
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  cursor: pointer;
  touch-action: manipulation;
}

.fizz-toggle[aria-pressed="true"] {
  padding-inline: var(--spacing-3);
  background-color: var(--pick-bg);
  color: var(--pick-fg);
}

/* ── 헤더 — 바탕 = 지금 섹션(main.js 가 data-flavor 를 옮긴다). 선 없음 ────── */

.top {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  padding: env(safe-area-inset-top) var(--pad-x) 0;
}

@media (prefers-reduced-motion: no-preference) {
  .top {
    transition: background-color 240ms var(--ease-out), color 240ms var(--ease-out);
  }

  html {
    transition: background-color 240ms var(--ease-out);
  }
}

.top__mark {
  display: inline-flex;
  align-items: center;
  min-height: var(--spacing-tap);
  margin-inline-end: auto;
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: 1.375rem;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
}

.top__index {
  position: relative;
  --cell: var(--spacing-tap);
}

.index {
  position: relative;
  display: flex;
}

.index a {
  display: grid;
  place-items: center;
  width: var(--cell);
  height: var(--spacing-tap);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
}

/* 지금 맛 = 먹 타일(칸 전체) + 그 맛 색 숫자. 타일이 번호 사이를 옮겨 간다(Layout animation) */
.index__tile {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--cell);
  height: var(--spacing-tap);
  background-color: var(--color-ink);
  transform: translateX(calc(var(--i, 0) * var(--cell)));
  pointer-events: none;
}

.index a.is-tile {
  color: var(--color-ground);
}

.top[data-bar="off"] .index__tile {
  opacity: 0;
}

.top[data-bar="off"] .index a.is-tile {
  color: inherit;
}

@media (prefers-reduced-motion: no-preference) {
  .index__tile {
    transition: transform 240ms var(--ease-out), opacity 240ms var(--ease-out);
  }

  .index a {
    transition: color 240ms var(--ease-out);
  }
}

@media (hover: hover) {
  .index a:hover,
  .top__mark:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
  }
}

.top__more {
  display: none;
}

.top__more a {
  display: inline-flex;
  align-items: center;
  min-height: var(--spacing-tap);
  padding-inline: var(--spacing-3);
  font-weight: var(--font-weight-strong);
  font-size: 0.9375rem;
  text-decoration: none;
  text-underline-offset: 0.3em;
}

.top__more a[aria-current],
.top__more a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

@media (min-width: 40rem) {
  .top__more {
    display: flex;
    margin-inline-start: var(--spacing-2);
  }
}

@media (max-width: 23.4375rem) {
  /* 375px 미만 — 워드마크 + 번호 다섯 칸이 한 줄에 들어가게 칸을 40px 로 */
  .top__index {
    --cell: 2.5rem;
  }

  .top__mark {
    font-size: 1.125rem;
  }
}

/* ── 기포 — 바탕 속을 오른다(이름·캔 뒤). 회차 5: 반투명 유리 구슬 · 섹션 전체에 면적 비례로 고르게 · 섹션 밑에서 태어나 수면 앞에서 흐려진다 ── */

/* 섹션이 쌓임 맥락을 만들고 기포는 그 맨 아래(-1) — 위치 지정이 없는 글자(카피·수치)보다도 뒤에 선다 */
.flavor,
.hero,
.poster {
  isolation: isolate;
}

/* 기포 층 = 섹션 전체(쌓는 배치에서도 — 회차 4 까지는 첫 100svh 에만 있어 그 밑선에서 기포가 잘려 나왔다) */
.fizz {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: clip;
  pointer-events: none;
  container-type: size;
  contain: strict;
}

/* 페이지마다 한 번 두는 치익 프레임 정의 — 보이지 않는다(칠은 .burst svg 가 준다) */
.bj-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* 기포 한 알 = 바탕을 조금 어둡게 한 반투명 채움 + 흰 1px 테 + 안쪽 위 하이라이트 점. 먹 윤곽 0.
   밝은 바탕(유자·오이·망고)에서는 어두운 채움이, 먹 바탕(믹스 팩)에서는 흰 테가 형태를 잡는다.
   태어나는 자리 = 섹션 밑선 바로 밖(top 100%), 수면 = 헤더 밑선 + 0~36px(--p). 그 사이를 등속으로 오른다 */
.fizz i {
  --end: calc(var(--spacing-header) + var(--p) * 1px);
  --rise: calc(var(--end) - 100cqh);
  position: absolute;
  top: 100%;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  margin-left: calc(var(--s) / -2);
  border: var(--spacing-bubble-ring) solid var(--color-bubble-rim);
  border-radius: var(--radius-bubble);
  background-color: var(--color-bubble-fill);
  background-clip: padding-box;
  /* 움직임이 없을 때(reduced-motion) — 길의 --ph 지점에 멈춰 흩어져 있다 */
  translate: 0 calc(var(--rise) * var(--ph));
}

/* 하이라이트 — 지름의 25% 이하, 안쪽 위 왼쪽 */
.fizz i::after {
  content: "";
  position: absolute;
  top: 10%;
  left: 16%;
  width: max(1px, 24%);
  height: max(1px, 24%);
  border-radius: var(--radius-bubble);
  background-color: var(--color-bubble-glint);
}

/* 크기 5단계 — 여기의 --a 는 JS·인라인이 없을 때의 폴백이다. 회차 6부터 생성기가 기포마다 인라인 --a(랜덤 폭 ±2–20px)·--w 를 준다 */
.b-xs {
  --s: var(--spacing-bubble-xs);
  --a: 3px;
}

.b-sm {
  --s: var(--spacing-bubble-sm);
  --a: 4px;
}

.b-md {
  --s: var(--spacing-bubble-md);
  --a: 5px;
}

.b-lg {
  --s: var(--spacing-bubble-lg);
  --a: 6.5px;
}

.b-xl {
  --s: var(--spacing-bubble-xl);
  --a: 8px;
}

/* JS 가 없을 때 좁은 섹션은 앞 32 개만(있으면 main.js 가 면적으로 정한다 — 회차 6 에 16 → 32, 기포 2배) */
@container (max-width: 44.99rem) {
  html:not(.js) .fizz i:nth-child(n + 33) {
    display: none;
  }
}

/* 작은 글자 가림 — 기포가 머리글·범례·치수·고지·Pause 뒤를 지날 때 글자 둘레에서 흐려진다(회피 사각형, 회차 5).
   바탕과 같은 색의 번짐이라 기포가 없으면 보이지 않는다. 열을 비우지 않아 분포가 고르게 남는다(회차 4 는 기포를 옆으로 옮겨 가장자리에 몰렸다) */
:is(.hero__kick, .picker__kick, .legend, .rig__dim, .flavor__dim, .fizz-toggle, .qty__l, .total__meta, .picker__note) {
  text-shadow:
    0 0 var(--spacing-1) var(--color-ground),
    0 0 var(--spacing-2) var(--color-ground),
    0 0 var(--spacing-3) var(--color-ground);
}

/* 번짐은 판 위에서는 끈다 — 먹 타일 위 숫자(상세 범례 핀) · 눌린 Pause(판이 된다). 바탕색이 달라 발광이 된다 */
.legend .pin,
.fizz-toggle[aria-pressed="true"] {
  text-shadow: none;
}

@media (prefers-reduced-motion: no-preference) {
  /* 상승(등속, 길이 = 섹션 높이 비례 --k) + 흔들림(Alternate). 음수 지연이라 로드 때 이미 떠 있다(시작하는 순간 = 등장이 없다) */
  .fizz i {
    animation:
      bj-rise calc(var(--d) * var(--k, 1)) var(--ease-rise) calc(var(--o) * var(--k, 1)) infinite,
      bj-sway var(--w) var(--ease-sway) var(--o) infinite alternate;
  }

  /* 지금 섹션만 돈다(main.js 의 data-current). JS 가 없으면 CSS 만으로 다 돈다 */
  .js [data-screen]:not([data-current]) > .fizz i,
  html[data-fizz="off"] .fizz i,
  html[data-hidden] .fizz i {
    animation-play-state: paused;
  }

  .js [data-current] > .fizz i {
    will-change: translate, transform, scale, opacity;
  }

  .js .fizz-toggle {
    display: inline-flex;
  }

  /* buy 는 맛을 바꾸면 바탕이 240ms 에 바뀐다 — 글자 둘레 가림도 같이 */
  :is(.picker__kick, .rig__dim, .qty__l, .total__meta, .picker__note, .poster .fizz-toggle) {
    transition: text-shadow 240ms var(--ease-out);
  }
}

/* 섹션 밑선 밖에서 태어나 이동 거리의 8% 동안 투명 → 불투명, 수면 앞 10% 동안 불투명 → 투명(하드 팝 0).
   오르며 조금 커진다(탄산 기포는 오르며 부푼다). 한 바퀴가 끝나면 투명한 채 밑으로 돌아간다 */
@keyframes bj-rise {
  from {
    translate: 0 0;
    scale: 0.8;
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  to {
    translate: 0 var(--rise);
    scale: 1;
    opacity: 0;
  }
}

@keyframes bj-sway {
  from {
    transform: translateX(calc(var(--a) * -1));
  }

  to {
    transform: translateX(var(--a));
  }
}

/* ── 캔 — 알파 컷아웃 사진 한 장 = 치익 버튼 ─────────────────────────────── */

.rig {
  --cw: calc(var(--H) * var(--can-k));
  --st: max(4.5rem, calc(var(--cw) * 0.42));
  position: relative;
  z-index: 2;
  width: var(--cw);
  height: var(--H);
  flex: none;
}

.can {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-none);
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.can img {
  width: 100%;
  height: 100%;
}

.can:focus-visible {
  outline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  .can {
    transition: transform 90ms var(--ease-press);
  }

  .can:active {
    transform: scale(0.97);
  }

  @view-transition {
    navigation: auto;
  }

  .vt-can {
    view-transition-name: bj-can;
  }
}

/* 스티커 — 16각 별 · 흰 판 · 먹 display 800. 바깥 먹 별 위에 2px 작은 흰 별(유자 바탕에서도 모양이 선다) */
.sticker,
.pssht {
  position: absolute;
  z-index: 3;
  width: var(--st);
  aspect-ratio: 1;
  container-type: inline-size;
  clip-path: var(--star);
  background-color: var(--color-ink);
  pointer-events: none;
}

.sticker > span,
.pssht > span {
  position: absolute;
  inset: 2px;
  display: grid;
  place-items: center;
  clip-path: var(--star);
  background-color: var(--color-fizz-plate);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: min(var(--text-sticker), 24cqi);
  line-height: 1;
  text-transform: uppercase;
}

/* 기본 자리 = 캔 오른쪽 어깨(쌓는 배치 · buy). 홈 가로 배치는 이름의 짧은 줄 옆으로 옮긴다 */
.sticker {
  left: calc(50% + var(--cw) * 0.2);
  top: calc(var(--cw) * 0.08);
  rotate: 12deg;
}

/* 치익 — 원 파편 4프레임(80ms 하드컷, main.js) + PSSHT! 스티커 900ms. 누를 때만 */
.burst {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* 쉬는 동안에는 파편·PSSHT! 가 상자도 갖지 않는다 */
.burst,
.pssht {
  display: none;
}

.rig[data-frame] .burst,
.rig[data-pssht] .pssht {
  display: block;
}

/* 프레임 = 뚜껑 가운데를 원점으로 캔 폭 단위 상자(x −1.1~1.1 · y −0.2~0.9). 원은 bj-defs 의 한 벌을 가리킨다(칠·테두리는 여기서 물려받는다) */
.burst svg {
  position: absolute;
  left: calc(var(--cw) * -1.1);
  top: calc(var(--cw) * -0.2);
  display: none;
  width: calc(var(--cw) * 2.2);
  height: calc(var(--cw) * 1.1);
  overflow: visible;
  /* 회차 5 — 기포와 같은 유리 구슬: 반투명 채움 + 흰 테, 하이라이트 점은 currentColor(프레임 정의의 안쪽 g) */
  color: var(--color-bubble-glint);
  fill: var(--color-bubble-fill);
  stroke: var(--color-bubble-rim);
  /* 뷰박스 단위(캔 폭 / 1000) — 캔과 함께 커진다: 1440 캔 306px 에서 1.2px · 172px 에서 0.7px */
  stroke-width: 4;
}

.rig[data-frame="1"] .f1,
.rig[data-frame="2"] .f2,
.rig[data-frame="3"] .f3,
.rig[data-frame="4"] .f4 {
  display: block;
}

.pssht {
  z-index: 5;
  left: calc(50% - var(--cw) * 0.5 - var(--st) * 0.8);
  top: calc(var(--st) * -0.2);
  rotate: -8deg;
  opacity: 0;
}

.rig[data-pssht] .pssht {
  opacity: 1;
}

.rig__dim {
  position: absolute;
  top: calc(100% + var(--spacing-3));
  left: 50%;
  translate: -50% 0;
  white-space: nowrap;
}

/* ══ 홈 — 맛 화면(쌓는 배치: 이름 → 캔(남는 줄) → 버튼 줄 = 첫 100svh) ═══════════ */

.flavor {
  position: relative;
  container-type: inline-size;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name name"
    "rig rig"
    "act count"
    "copy copy"
    "stats stats"
    "dim dim"
    "pause pause";
  align-content: start;
  row-gap: var(--spacing-2);
  padding: calc(var(--top-h) + var(--spacing-3)) var(--pad-x) calc(var(--spacing-10) + env(safe-area-inset-bottom));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  /* 이름: 긴 줄(--fit em)이 섹션 폭을 채우되 15svh 를 넘지 않는다 */
  --name: min(calc(100cqi / var(--fit)), 15svh);
  /* 캔: 첫 100svh 에서 헤더·이름 두 줄·버튼 줄·틈을 빼고 남는 높이(상한 64svh). 이름과 겹치지 않는다(회차 1 결정 4) */
  --H: min(var(--spacing-can-sm), calc(100svh - var(--top-h) - 2 * var(--spacing-3) - 1.6 * var(--name) - 2 * var(--spacing-2) - var(--spacing-button) - env(safe-area-inset-bottom)));
}

@media (min-width: 45rem) {
  .flavor {
    --name: min(calc(100cqi / var(--fit)), 18svh);
  }
}

.flavor__name {
  grid-area: name;
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: var(--font-weight-black);
  font-size: var(--name);
  line-height: var(--text-mega--line-height);
  letter-spacing: var(--text-mega--letter-spacing);
  text-transform: uppercase;
  white-space: nowrap;
}

/* 줄 상자를 글자 폭에 맞춘다 — 짧은 줄 옆 빈자리(스티커 자리)가 줄 상자에 먹히지 않게 */
.flavor__line {
  display: block;
  width: fit-content;
}

.flavor .rig {
  grid-area: rig;
  justify-self: center;
}

.flavor .rig__dim {
  display: none;
}

.flavor__info,
.flavor__nums {
  display: contents;
}

.flavor__act {
  grid-area: act;
  display: flex;
  align-items: center;
  gap: var(--spacing-6);
  min-width: 0;
}

.flavor__more {
  display: none;
}

.flavor__count {
  grid-area: count;
  align-self: center;
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-stat);
  line-height: var(--text-stat--line-height);
  white-space: nowrap;
}

.flavor__copy {
  grid-area: copy;
  max-width: 34ch;
  margin-top: var(--spacing-8);
  font-size: var(--text-lead);
  line-height: var(--text-lead--line-height);
  font-weight: var(--font-weight-medium);
}

.stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spacing-4) var(--spacing-8);
  margin-top: var(--spacing-4);
}

.stats > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: var(--spacing-1);
}

.stats dd {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-stat);
  line-height: var(--text-stat--line-height);
  white-space: nowrap;
}

.flavor__dim {
  grid-area: dim;
  margin-top: var(--spacing-4);
}

.flavor .fizz-toggle {
  grid-area: pause;
  justify-self: start;
}

/* 치익 파편은 캔 폭의 ±1 배까지 튄다 — 그 섹션에서만 가로를 자른다(html/body 에 두지 않는다, 규칙 12) */
.flavor,
.hero,
.poster {
  overflow-x: clip;
}

/* 실기기 첫 화면(창 높이 < 700) — 버튼 줄도 첫 화면 아래로 보내 캔을 키운다(wireframe-v3 1.1) */
@media (max-height: 43.6875rem) {
  .flavor {
    grid-template-areas:
      "name name"
      "rig rig"
      "copy copy"
      "act count"
      "stats stats"
      "dim dim"
      "pause pause";
    --H: min(var(--spacing-can-sm), calc(100svh - var(--top-h) - 2 * var(--spacing-3) - 1.6 * var(--name) - var(--spacing-2) - env(safe-area-inset-bottom)));
  }

  .flavor__copy {
    margin-top: var(--spacing-6);
  }

  .flavor__act {
    margin-top: var(--spacing-2);
  }
}

/* ── What's inside — 먹 띠 · 활자 띠(Marquee) ─────────────────────────────── */

.inside {
  scroll-snap-align: start;
  padding-top: var(--top-h);
  padding-bottom: var(--spacing-16);
}

.marquee {
  position: relative;
  display: flex;
  align-items: center;
  height: 4rem;
  overflow: hidden;
}

.marquee__track {
  display: flex;
  width: max-content;
}

.marquee__set {
  display: flex;
  flex: none;
  gap: 0.28em;
  padding-inline: 0.28em 0;
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-band);
  line-height: var(--text-band--line-height);
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee__set span:nth-of-type(5n + 1) {
  color: var(--color-guava-ground);
}

.marquee__set span:nth-of-type(5n + 2) {
  color: var(--color-rasp-ground);
}

.marquee__set span:nth-of-type(5n + 3) {
  color: var(--color-yuzu-ground);
}

.marquee__set span:nth-of-type(5n + 4) {
  color: var(--color-cuke-ground);
}

.marquee__set span:nth-of-type(5n) {
  color: var(--color-mango-ground);
}

.marquee__set i {
  font-style: normal;
  color: var(--color-fizz);
}

.marquee__toggle {
  display: none;
  position: absolute;
  inset: 0 0 0 auto;
  align-items: center;
  padding: 0 var(--spacing-6);
  border: 0;
  background-color: var(--color-fizz-plate);
  color: var(--color-ink);
  font-size: var(--text-micro);
  font-weight: var(--font-weight-strong);
  cursor: pointer;
  touch-action: manipulation;
}

.marquee__toggle[aria-pressed="true"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

@media (prefers-reduced-motion: no-preference) {
  .js .marquee__toggle {
    display: flex;
  }

  .marquee__track {
    animation: bj-marquee 32s var(--ease-linear) infinite;
  }

  .marquee:hover .marquee__track,
  .marquee:focus-within .marquee__track,
  .marquee.is-paused .marquee__track {
    animation-play-state: paused;
  }
}

@keyframes bj-marquee {
  to {
    transform: translateX(-50%);
  }
}

.inside__body {
  display: grid;
  gap: var(--spacing-6);
  padding: var(--spacing-12) var(--pad-x) 0;
}

.inside__list {
  max-width: 52ch;
  font-size: var(--text-lead);
  line-height: var(--text-lead--line-height);
}

/* 핵심 수치 — 칸 사이는 간격이다(선 없음) */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spacing-8);
  margin-top: var(--spacing-6);
}

.facts > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: var(--spacing-2);
}

.facts dd {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-numeral);
  line-height: var(--text-numeral--line-height);
}

.facts > .facts__codes {
  display: grid;
  align-content: center;
  gap: var(--spacing-1);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: 1.25rem;
  line-height: 1;
}

/* ── Where to buy — 흰 판 ──────────────────────────────────────────────── */

.where {
  scroll-snap-align: start;
  display: grid;
  gap: var(--spacing-10);
  padding: calc(var(--top-h) + var(--spacing-8)) var(--pad-x) var(--spacing-16);
}

.where__side {
  display: grid;
  gap: var(--spacing-6);
  justify-items: start;
}

/* 가격 판 한 장 안의 값 셋 — 간격으로 나눈다(판 셋을 세우면 카드 3칸이 된다) */
.prices {
  justify-self: stretch;
  display: grid;
  gap: var(--spacing-4);
}

.prices > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--spacing-4);
}

.prices dt span {
  display: block;
  margin-top: var(--spacing-1);
  font-weight: var(--font-weight-body);
}

.prices dd {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-numeral);
  line-height: var(--text-numeral--line-height);
}

/* 냉장고 표 — 줄 선 없이 줄 높이 52px 와 굵기로 나눈다 */
.coolers {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-small);
  line-height: var(--text-small--line-height);
}

.coolers caption {
  caption-side: top;
  padding-bottom: var(--spacing-3);
  text-align: start;
}

.coolers th,
.coolers td {
  height: 3.25rem;
  padding: var(--spacing-2) var(--spacing-3) var(--spacing-2) 0;
  text-align: start;
  vertical-align: middle;
}

.coolers th {
  height: auto;
  padding-bottom: var(--spacing-2);
  font-weight: var(--font-weight-strong);
}

.coolers td:first-child {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: 1.375rem;
  line-height: 1;
  text-transform: uppercase;
}

.coolers td:nth-child(3),
.coolers td:nth-child(4) {
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

/* 모바일: Stocked 열은 화면에서만 치우고(스크린리더는 읽는다) Spot 아래 micro 로 옮긴다 */
.coolers th:nth-child(4),
.coolers td:nth-child(4) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.coolers__m {
  display: block;
  margin-top: var(--spacing-1);
  font-size: var(--text-micro);
  font-weight: var(--font-weight-semibold);
}

/* ── Fine print ─────────────────────────────────────────────────────────── */

.fine {
  scroll-snap-align: start;
  display: grid;
  gap: var(--spacing-6);
  padding: calc(var(--top-h) + var(--spacing-8)) var(--pad-x) var(--spacing-16);
}

.fine__title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-black);
  font-size: var(--text-h2);
  line-height: var(--text-h2--line-height);
  text-transform: uppercase;
}

/* 390 에서는 두 줄(NOTHING HERE / IS FOR SALE.) — 폭 표 */
.fine__title span {
  display: block;
}

.fine__text {
  display: grid;
  gap: var(--spacing-3);
  max-width: 60ch;
}

.fine__notice {
  font-size: var(--text-lead);
  line-height: var(--text-lead--line-height);
  font-weight: var(--font-weight-strong);
}

/* ── 꼬리 — 먹 띠 ──────────────────────────────────────────────────────── */

.foot {
  scroll-snap-align: end;
  display: grid;
  gap: var(--spacing-6);
  padding: var(--spacing-12) var(--pad-x) calc(var(--spacing-8) + env(safe-area-inset-bottom));
}

.foot__mark {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: var(--spacing-tap);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-band);
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
}

.foot__nav {
  display: grid;
  gap: var(--spacing-2);
}

.foot__flavors {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--spacing-6);
}

.foot__flavors a {
  display: inline-flex;
  align-items: center;
  min-height: var(--spacing-tap);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: 1.5rem;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
}

@media (hover: hover) {
  .foot__flavors a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.15em;
  }
}

.foot__links {
  display: flex;
  gap: var(--spacing-4);
}

.foot__links a,
.foot__credit a {
  display: inline-flex;
  align-items: center;
  min-width: var(--spacing-tap);
  min-height: var(--spacing-tap);
  font-weight: var(--font-weight-semibold);
  text-underline-offset: 0.3em;
}

.foot__notice {
  max-width: 60ch;
  font-size: var(--text-small);
  line-height: var(--text-small--line-height);
}

.foot__credit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--spacing-6);
  font-size: var(--text-small);
  line-height: var(--text-small--line-height);
}

/* ══ 상세 /guava-riot/ ════════════════════════════════════════════════════ */

.hero {
  position: relative;
  container-type: inline-size;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "kick" "name" "rig" "price" "buy" "copy" "legend" "pause";
  align-content: start;
  row-gap: var(--spacing-2);
  padding: calc(var(--top-h) + var(--spacing-3)) var(--pad-x) var(--spacing-12);
  --name: var(--text-display);
  /* 캔: 첫 100svh 에서 이름·가격·버튼을 빼고 남는 높이(상한 60svh) */
  --H: min(60svh, calc(100svh - var(--top-h) - 2 * var(--spacing-3) - 1.3rem - 1.64 * var(--name) - 4 * var(--spacing-2) - 2 * var(--spacing-button) - env(safe-area-inset-bottom)));
}

.hero__kick {
  grid-area: kick;
  position: relative;
  z-index: 1;
}

.hero__name {
  grid-area: name;
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: var(--font-weight-black);
  font-size: var(--name);
  line-height: var(--text-display--line-height);
  text-transform: uppercase;
  white-space: nowrap;
}

.hero__name span {
  display: block;
}

.hero .rig {
  grid-area: rig;
  justify-self: center;
}

/* 핀 번호 — 먹 32px 타일이 자기 뒤판이다(사진 위 글자 0). 지시선 없음 */
.pin {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--spacing-pin);
  height: var(--spacing-pin);
  background-color: var(--color-ink);
  color: var(--color-fizz);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: 1.25rem;
  line-height: 1;
}

.rig .pin {
  position: absolute;
  z-index: 3;
  left: 100%;
  top: var(--py);
  translate: -50% -50%;
  pointer-events: none;
}

.price {
  grid-area: price;
  justify-self: start;
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--spacing-2) var(--spacing-8);
  min-height: var(--spacing-button);
  padding: var(--spacing-2) var(--spacing-4);
  background-color: var(--color-fizz-plate);
  color: var(--color-ink);
}

.price > div {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: baseline;
  gap: var(--spacing-2);
}

.price dd {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-stat);
  line-height: var(--text-stat--line-height);
}

.hero__buy {
  grid-area: buy;
  position: relative;
  z-index: 1;
  justify-self: start;
}

.hero__copy {
  grid-area: copy;
  position: relative;
  z-index: 1;
  max-width: 34ch;
  margin-top: var(--spacing-6);
  font-size: var(--text-lead);
  line-height: var(--text-lead--line-height);
  font-weight: var(--font-weight-medium);
}

.legend {
  grid-area: legend;
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--spacing-3);
  margin-top: var(--spacing-4);
  font-size: var(--text-small);
  line-height: var(--text-small--line-height);
}

.legend li {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
}

.hero .fizz-toggle {
  grid-area: pause;
  position: relative;
  z-index: 1;
  justify-self: start;
}

/* 수치 띠 — 6칸, 간격으로 나눈다 */
.band {
  padding: var(--spacing-8) var(--pad-x);
}

.stats--six {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  row-gap: var(--spacing-6);
}

/* Cold proof — 폭·비율이 다른 확대 사진 셋(카드 아님). 캡션은 사진 밖 */
.cold {
  display: grid;
  gap: var(--spacing-8);
  padding: var(--spacing-16) var(--pad-x);
}

.cold__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--spacing-10);
  align-items: start;
}

.cold__fig img {
  width: 100%;
  height: auto;
}

.cold__fig figcaption {
  max-width: 36ch;
  margin-top: var(--spacing-3);
  font-size: var(--text-small);
  line-height: var(--text-small--line-height);
}

/* 라벨(영양 표) + 맛 계기 */
.label-sec {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--spacing-10);
  padding: var(--spacing-16) var(--pad-x);
}

/* Nutrition Facts — 흰 판 · 테두리 없음 · 구획은 8px·4px 막대, 줄은 간격 + 굵기 */
.nf {
  align-self: start;
  padding: var(--spacing-4);
  background-color: var(--color-fizz-plate);
  color: var(--color-ink);
}

.nf table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-small);
  line-height: 1.3;
}

.nf caption {
  padding-bottom: var(--spacing-2);
  text-align: start;
  font-family: var(--font-body);
  font-weight: var(--font-weight-black);
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  line-height: 1;
}

.nf th,
.nf td {
  padding: 3px 0;
  font-weight: var(--font-weight-body);
  text-align: start;
  vertical-align: baseline;
}

.nf td:last-child:not(:first-child) {
  text-align: end;
  font-weight: var(--font-weight-black);
}

.nf th b {
  font-weight: var(--font-weight-black);
}

.nf .nf__size > * {
  padding-bottom: var(--spacing-2);
  font-weight: var(--font-weight-black);
  font-size: var(--text-body);
}

.nf .nf__bar > * {
  padding-top: var(--spacing-2);
  border-top: var(--spacing-bar) solid currentColor;
}

.nf .nf__cal > * {
  padding-block: var(--spacing-1) var(--spacing-2);
  border-bottom: var(--spacing-bar-thin) solid currentColor;
  font-weight: var(--font-weight-black);
  font-size: 1.75rem;
  line-height: 1;
}

.nf .nf__cal th {
  font-size: 1.5rem;
}

.nf .nf__dv td {
  padding-top: var(--spacing-2);
  text-align: end;
  font-weight: var(--font-weight-black);
  font-size: var(--text-micro);
}

.nf .nf__in1 th {
  padding-inline-start: var(--spacing-4);
}

.nf .nf__in2 th {
  padding-inline-start: var(--spacing-8);
}

.nf__foot {
  max-width: 62ch;
  margin-top: var(--spacing-2);
  padding-top: var(--spacing-2);
  border-top: var(--spacing-bar-thin) solid currentColor;
  font-size: var(--text-micro);
  line-height: 1.4;
}

.taste {
  display: grid;
  gap: var(--spacing-6);
  align-content: start;
}

.taste__title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-band);
  line-height: 1;
  text-transform: uppercase;
}

.meters {
  display: grid;
  gap: var(--spacing-4);
}

.meter {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) 1.75rem;
  align-items: center;
  gap: var(--spacing-3);
}

/* 맛 계기 — 찬 칸 먹, 빈 칸 흰 판, 칸 사이 2px 틈은 바탕이 보인다. 처음부터 찬 상태(리빌 없음) */
.meter__cells {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 2px;
  height: 1.75rem;
}

.meter__cells i {
  background-color: var(--color-fizz-plate);
}

.meter__cells .on {
  background-color: var(--color-ink);
}

.meter__n {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: 1.75rem;
  line-height: 1;
  text-align: end;
}

.taste__list {
  display: grid;
  gap: var(--spacing-2);
  max-width: 52ch;
  margin-top: var(--spacing-4);
}

.taste__list p + p {
  font-weight: var(--font-weight-strong);
}

/* 페어링 — 전폭 띠 셋, 면 교대(흰 판 · 구아바 · 흰 판). 줄 사이 선 없음 */
.pairs {
  padding-top: var(--spacing-16);
}

.pairs__title {
  padding: 0 var(--pad-x) var(--spacing-8);
}

.pair {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--spacing-4);
  row-gap: var(--spacing-2);
  align-items: baseline;
  padding: var(--spacing-8) var(--pad-x);
}

.pair__n {
  grid-row: span 3;
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-numeral);
  line-height: var(--text-numeral--line-height);
}

.pair__name {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-band);
  line-height: var(--text-band--line-height);
  text-transform: uppercase;
}

.pair__line {
  max-width: 40ch;
}

/* 다른 맛 — 그 맛 바탕 띠 넷 + 작은 결로 캔 */
.others__title {
  padding: var(--spacing-10) var(--pad-x) var(--spacing-6);
}

.others__band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--spacing-4);
  min-height: 5.5rem;
  padding: var(--spacing-3) var(--pad-x);
  text-decoration: none;
}

.others__can {
  width: auto;
  height: 4rem;
}

.others__name {
  font-family: var(--font-display);
  font-weight: var(--font-weight-black);
  font-size: var(--text-band);
  line-height: 1;
  text-transform: uppercase;
}

.others__code {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  white-space: nowrap;
}

.others__code span {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: 1.5rem;
  line-height: 1;
}

@media (hover: hover) {
  .others__band:hover .others__name {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.12em;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .others__code span {
    transition: transform 160ms var(--ease-out);
  }

  .others__band:hover .others__code span {
    transform: translateX(8px);
  }
}

.fine--short {
  padding-block: var(--spacing-12);
}

/* ══ 구매 /buy/ ═══════════════════════════════════════════════════════════ */

/* 고르는 포스터 — 쌓는 배치: 번호 → 이름 → 캔(남는 줄) → 칩 → 팩 → 수량·합계 → [담기] = 첫 100svh.
   바탕은 <html data-flavor>(고른 맛)가 칠한다 — 이 섹션은 판이 없다 */
.poster {
  position: relative;
  container-type: inline-size;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "kick" "name" "can" "chips" "packs" "qty" "add" "subs" "note" "cart" "pause";
  align-content: start;
  row-gap: var(--spacing-2);
  padding: calc(var(--top-h) + var(--spacing-3)) var(--pad-x) var(--spacing-12);
  --name: var(--text-display);
  --H: min(48svh, calc(100svh - var(--top-h) - 2 * var(--spacing-3) - 1.1rem - 1.64 * var(--name) - var(--spacing-chip) - 2 * var(--spacing-button) - var(--spacing-button-lg) - 6 * var(--spacing-2) - env(safe-area-inset-bottom)));
  /* 믹스 무리(다섯 캔) — 쌓는 배치는 가운데 캔 = 캔 칸 × 0.9, 겹침 55%(가로 넘침 0) */
  --lap: 0.55;
  --k: 1.048;
  --Hc: min(calc(var(--H) * 0.9), calc(100cqi / var(--k)));
}

.poster__can,
.picker,
.picker__side {
  display: contents;
}

.poster .rig {
  grid-area: can;
  justify-self: center;
}

.poster .rig__dim {
  display: none;
}

.picker__kick {
  grid-area: kick;
  position: relative;
  z-index: 1;
}

.picker__name {
  grid-area: name;
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: var(--font-weight-black);
  font-size: var(--name);
  line-height: var(--text-display--line-height);
  text-transform: uppercase;
  white-space: nowrap;
}

.picker__name span {
  display: block;
}

/* 캔 사진 다섯 장을 겹쳐 두고 고른 것만 보인다(Crossfade 160ms). 칸 높이는 그대로 — 흔들림 0 */
.can__stack {
  display: grid;
  width: 100%;
  height: 100%;
}

.can__stack img {
  grid-area: 1 / 1;
  opacity: 0;
}

.can__stack img.is-on {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .can__stack img {
    transition: opacity 160ms var(--ease-out);
  }
}

.cluster {
  display: none;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.can .cluster__can {
  --h: calc(var(--Hc) * var(--s));
  position: relative;
  flex: none;
  width: calc(var(--h) * var(--can-k));
  height: var(--h);
  margin-inline-start: calc(var(--h) * var(--can-k) * var(--lap) * -1);
}

.can .cluster__can--0 {
  --s: 0.76;
  z-index: 1;
  margin-inline-start: 0;
}

.can .cluster__can--1 {
  --s: 0.88;
  z-index: 2;
}

.can .cluster__can--2 {
  --s: 1;
  z-index: 3;
}

.can .cluster__can--3 {
  --s: 0.88;
  z-index: 2;
}

.can .cluster__can--4 {
  --s: 0.76;
  z-index: 1;
}

/* 무리는 캔 칸 밑선에 선다 — 칸 높이는 한 캔일 때와 같다(팩을 바꿔도 아래 부품이 흔들리지 않는다) */
.is-buy[data-pack="mix"] .poster .rig {
  --cw: calc(var(--Hc) * var(--can-k));
  width: calc(var(--Hc) * var(--k));
  height: var(--Hc);
  margin-top: calc(var(--H) - var(--Hc));
}

.is-buy[data-pack="mix"] .can__stack {
  display: none;
}

.is-buy[data-pack="mix"] .cluster {
  display: flex;
}

/* 맛 칩 — 흰 판 타일(모서리 0) · 12px 맛 색 견본 · 번호 · 이름. 고른 칩 = 먹 판 + 맛 색 글자 */
.chips {
  grid-area: chips;
  position: relative;
  z-index: 1;
}

.chips__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--spacing-2);
}

.chip {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  grid-template-areas: "sw n x" "name name name";
  align-items: center;
  column-gap: var(--spacing-2);
  row-gap: 2px;
  min-height: var(--spacing-chip);
  padding: var(--spacing-2);
  background-color: var(--tile-bg);
  color: var(--tile-fg);
  text-decoration: none;
  touch-action: manipulation;
}

.chip__sw {
  grid-area: sw;
  width: var(--spacing-swatch);
  height: var(--spacing-swatch);
}

.chip__n {
  grid-area: n;
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: 1.375rem;
  line-height: 1;
}

.chip__name {
  grid-area: name;
  font-size: var(--text-micro);
  line-height: var(--text-micro--line-height);
  font-weight: var(--font-weight-semibold);
}

.chip__short,
.chip__x {
  display: none;
}

.chip__x {
  grid-area: x;
  font-size: var(--text-micro);
  font-weight: var(--font-weight-semibold);
}

.chip[aria-current] {
  background-color: var(--pick-bg);
  color: var(--pick-fg);
}

@media (hover: hover) {
  .chip:not([aria-current], [aria-disabled]):hover .chip__n {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.15em;
  }
}

.chip[aria-disabled="true"] {
  cursor: default;
}

.is-buy[data-pack="mix"] .chip__x {
  display: inline;
  white-space: nowrap;
}

@media (max-width: 44.99rem) {
  .chip__full {
    display: none;
  }

  .chip__short {
    display: inline;
  }
}

@media (max-width: 22.49rem) {
  .chip__name {
    display: none;
  }
}

/* 좁은 칩에서 믹스 — 이름 자리에 "× 4"(이름은 aria-label 과 견본 색이 말한다) */
@media (max-width: 44.99rem) {
  .is-buy[data-pack="mix"] .chip__name {
    display: none;
  }

  .is-buy[data-pack="mix"] .chip__x {
    grid-area: name;
  }
}

/* 팩 — 쌓는 배치는 세 칸 한 줄(×12 ×24 MIX), 가로 배치는 세로로 쌓은 줄 셋(카드 3칸 아님) */
.packs {
  grid-area: packs;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--spacing-2);
}

.pack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-3);
  min-height: var(--spacing-button);
  padding: var(--spacing-1) var(--spacing-3);
  background-color: var(--tile-bg);
  color: var(--tile-fg);
  text-decoration: none;
  touch-action: manipulation;
}

.pack[aria-current] {
  background-color: var(--pick-bg);
  color: var(--pick-fg);
}

.pack__n,
.pack__p {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-sticker);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.pack__d,
.pack__p,
.pack__20 {
  display: none;
}

.pack__d {
  font-size: var(--text-small);
  line-height: var(--text-small--line-height);
}

@media (hover: hover) {
  .pack:not([aria-current]):hover .pack__n,
  .sub:not([aria-current]):hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.15em;
  }
}

/* 수량 · 합계 — 값 바뀜은 즉시(Number ticker 없음) */
.qty-row {
  grid-area: qty;
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-2) var(--spacing-6);
  min-height: var(--spacing-button);
}

.qty {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.qty__b {
  display: grid;
  place-items: center;
  width: var(--spacing-button);
  height: var(--spacing-button);
  padding: 0;
  border: 0;
  background-color: var(--pick-bg);
  color: var(--pick-fg);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.qty__b[hidden] {
  display: none;
}

.qty__b:disabled {
  background-color: var(--tile-bg);
  color: var(--tile-fg);
  cursor: not-allowed;
}

.qty__n {
  min-width: 2.25rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-stat);
  line-height: 1;
}

.total__meta {
  margin-inline-start: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--spacing-2);
}

.total__n {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-numeral);
  line-height: var(--text-numeral--line-height);
}

.total__was {
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-lead);
}

.total__was[hidden] {
  display: none;
}

/* 좁은 폭 — 수량(148px) + 합계가 한 줄(358px)에 서야 [담기]가 첫 화면에 든다. 원가·한 캔 값·"Packs" 는
   화면에서만 치운다(스크린리더는 읽는다 · 원가 −10% 는 구독 줄이, 팩 값은 [담기] 글이 말한다) */
@media (max-width: 44.99rem) {
  .qty__l,
  .total__meta {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* 구독 — 줄 둘. 고른 줄 = 먹 판 */
.subs {
  grid-area: subs;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spacing-2);
  margin-top: var(--spacing-4);
}

.sub {
  display: flex;
  align-items: center;
  min-height: var(--spacing-button);
  padding: var(--spacing-1) var(--spacing-3);
  background-color: var(--tile-bg);
  color: var(--tile-fg);
  font-weight: var(--font-weight-strong);
  font-size: 0.9375rem;
  line-height: 1.2;
  text-decoration: none;
  touch-action: manipulation;
}

.sub[aria-current] {
  background-color: var(--pick-bg);
  color: var(--pick-fg);
}

/* [담기] — 이 페이지의 주인공 동작, 56px 한 단 크게. 글이 지금 선택을 말한다(좁으면 두 줄) */
.add {
  grid-area: add;
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: var(--spacing-button-lg);
  font-size: 1rem;
}

.picker__note {
  grid-area: note;
  position: relative;
  z-index: 1;
}

.cart {
  grid-area: cart;
  position: relative;
  z-index: 1;
}

/* 카트 줄 — 흰 판 한 줄, 하드컷으로 켜진다(등장 연출 0). JS 가 없으면 #cart 로 :target */
.cart__line {
  display: none;
  padding: var(--spacing-3) var(--spacing-4);
  background-color: var(--color-fizz-plate);
  color: var(--color-ink);
  font-size: var(--text-small);
  line-height: var(--text-small--line-height);
}

html:not(.js) .cart__line:target,
.is-buy[data-added] .cart__line {
  display: block;
}

.is-buy[data-added] .picker__note {
  display: none;
}

/* 글줄 안 링크 — 줄 높이는 그대로 두고 누르는 자리만 44px 로 넓힌다 */
.cart__keep {
  display: inline-block;
  padding-block: var(--spacing-3);
  margin-block: calc(var(--spacing-3) * -1);
  font-weight: var(--font-weight-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.poster .fizz-toggle {
  grid-area: pause;
  position: relative;
  z-index: 1;
  justify-self: start;
}

/* 실기기 첫 화면(창 높이 < 700) — 팩·수량·합계를 [담기] 아래로. [담기] 글이 기본 선택을 말한다 */
@media (max-height: 43.6875rem) {
  .poster {
    grid-template-areas: "kick" "name" "can" "chips" "add" "packs" "qty" "subs" "note" "cart" "pause";
    --H: min(48svh, calc(100svh - var(--top-h) - 2 * var(--spacing-3) - 1.1rem - 1.64 * var(--name) - var(--spacing-chip) - var(--spacing-button-lg) - 4 * var(--spacing-2) - env(safe-area-inset-bottom)));
  }

  .add {
    margin-bottom: var(--spacing-4);
  }
}

/* The 12-pack — 구아바 띠 고정(사진이 구아바다). 반복 모션 0 */
.packshot {
  display: grid;
  gap: var(--spacing-8);
  padding: var(--spacing-16) var(--pad-x);
}

.packshot__fig img {
  width: 100%;
  height: auto;
}

.packshot__fig figcaption {
  margin-top: var(--spacing-3);
}

.packshot__text {
  display: grid;
  gap: var(--spacing-6);
  justify-items: start;
  align-content: center;
}

.packshot__line {
  max-width: 30ch;
  font-size: var(--text-lead);
  line-height: var(--text-lead--line-height);
  font-weight: var(--font-weight-medium);
}

/* Delivery & subscription — 흰 판 · 사진 없음 · 활자 사실 셋(판·테두리·아이콘 0 — 카드 아님) */
.delivery {
  display: grid;
  gap: var(--spacing-10);
  padding: var(--spacing-16) var(--pad-x);
}

.facts3 {
  display: grid;
  gap: var(--spacing-8);
}

.facts3 > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: var(--spacing-2);
}

.facts3 dd {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-numeral);
  line-height: var(--text-numeral--line-height);
  text-transform: uppercase;
  white-space: nowrap;
}

.facts3 dt {
  max-width: 24ch;
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
}

.delivery__sub {
  display: grid;
  gap: var(--spacing-2);
  max-width: 60ch;
  font-size: var(--text-lead);
  line-height: var(--text-lead--line-height);
}

/* ══ 가로 배치 — 56rem 이상이면서 가로가 긴 창 ═════════════════════════════ */

@media (min-width: 56rem) and (min-aspect-ratio: 1/1) {
  /* 맛 화면: 두 칸(이름 칸 max-content + 캔 칸) + 남는 폭은 캔 바깥 바탕으로 흘린다(기포가 가장 잘 보이는 면) */
  .flavor {
    height: 100svh;
    min-height: 35rem;
    grid-template-columns: max-content max-content minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "name rig ."
      ". rig ."
      "info rig .";
    align-content: stretch;
    row-gap: 0;
    padding: calc(var(--top-h) + var(--spacing-6)) var(--pad-x) calc(var(--spacing-6) + env(safe-area-inset-bottom));
    /* 캔 H = min(76svh, 100svh − 120px) · 이름 칸 N = 폭 − 캔 폭 − 거터.
       홀수: 이름 = N ÷ (fit − 0.18)(캔이 긴 줄 끝 0.18em 을 덮는다) · 짝수: N ÷ fit(캔 쪽이 첫 글자라 덮지 않는다, 회차 2)
       상한 둘: 34svh · 왼칸 상한(이름 아래 카피·버튼·수치·멈춤 ≈ 282px 가 들어가게) */
    --H: min(var(--spacing-can), calc(100svh - 7.5rem));
    --N: calc(100cqi - var(--H) * var(--can-k) - var(--spacing-gutter));
    --name: min(calc(var(--N) / (var(--fit) - 0.18)), 34svh, calc((100svh - 362px) / 1.6));
  }

  .flavor--flip {
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    grid-template-areas:
      ". rig name"
      ". rig ."
      ". rig info";
    --name: min(calc(var(--N) / var(--fit)), 34svh, calc((100svh - 362px) / 1.6));
  }

  .flavor .rig {
    align-self: start;
    justify-self: start;
    margin-inline-start: calc(var(--name) * -0.18);
  }

  .flavor--flip .rig {
    margin-inline: 0 var(--spacing-gutter);
  }

  .flavor .rig__dim {
    display: block;
  }

  .flavor--flip .flavor__name {
    text-align: end;
  }

  .flavor--flip .flavor__line {
    margin-inline-start: auto;
  }

  /* 스티커는 이름의 짧은 줄 옆 빈자리에 — 긴 줄의 끝은 캔이 이미 덮고 있다(회차 1 결정 5). --sl = 짧은 줄 번호 */
  .flavor .sticker {
    left: auto;
    right: calc(100% - var(--cw) * 0.12);
    top: calc(var(--name) * (0.8 * var(--sl) - 0.4) - var(--st) / 2);
    rotate: -12deg;
  }

  .flavor--flip .sticker {
    right: auto;
    left: calc(100% - var(--cw) * 0.12);
    rotate: 12deg;
  }

  /* 반전 화면은 캔이 왼쪽 가장자리에 붙는다 — PSSHT! 를 뚜껑 오른쪽(이름 쪽)으로 옮긴다(왼쪽이면 화면 밖으로 잘린다, 회차 4 컷) */
  .flavor--flip .pssht {
    left: calc(50% + var(--cw) * 0.5 - var(--st) * 0.2);
    rotate: 8deg;
  }

  .flavor__info {
    grid-area: info;
    contain: inline-size;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-4);
    padding-top: var(--spacing-6);
  }

  .flavor__copy,
  .stats {
    margin-top: 0;
  }

  .flavor__more {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    min-height: var(--spacing-tap);
    white-space: nowrap;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
  }

  .flavor__more:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.3em;
  }

  .flavor__nums {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--spacing-4) var(--spacing-8);
  }

  .stats {
    grid-template-columns: repeat(4, auto);
    column-gap: var(--spacing-8);
  }

  .flavor__dim {
    display: none;
  }

  /* What's inside */
  .marquee {
    height: 5.5rem;
  }

  .inside {
    padding-bottom: var(--spacing-12);
  }

  .inside__body {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    column-gap: var(--spacing-gutter);
    row-gap: var(--spacing-10);
    padding-top: var(--spacing-10);
    align-items: end;
  }

  .facts {
    grid-column: 1 / -1;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 0;
  }

  .facts > .facts__codes {
    display: none;
  }

  /* Where to buy — 왼쪽 가격 판, 오른쪽 냉장고 표 */
  .where {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    column-gap: var(--spacing-16);
    padding-bottom: var(--spacing-12);
    align-items: start;
  }

  .prices {
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    column-gap: var(--spacing-10);
  }

  .prices > div {
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: var(--spacing-1);
  }

  .prices dd {
    font-size: clamp(2.5rem, 4.2vw, 4rem);
  }

  .coolers {
    font-size: var(--text-body);
  }

  .coolers th:nth-child(4),
  .coolers td:nth-child(4) {
    position: static;
    width: auto;
    height: 3.25rem;
    padding: var(--spacing-2) 0;
    overflow: visible;
    clip-path: none;
    text-align: end;
  }

  .coolers th:nth-child(4) {
    height: auto;
  }

  .coolers__m {
    display: none;
  }

  .fine__title span {
    display: inline;
  }

  .fine__text {
    max-width: 60ch;
  }

  .foot {
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    column-gap: var(--spacing-gutter);
    row-gap: var(--spacing-4);
    padding-top: var(--spacing-10);
  }

  .foot__nav {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .foot__notice {
    grid-column: 1 / -1;
  }

  .foot__credit {
    grid-column: 1 / -1;
  }

  /* 상세 히어로 — 세 칸 [글 1fr] [캔 auto] [범례 12–16rem] */
  .hero {
    height: 100svh;
    min-height: 35rem;
    grid-template-columns: minmax(0, 1fr) auto minmax(12rem, 16rem);
    grid-template-rows: minmax(0, 1fr) repeat(6, auto) minmax(0, 1fr);
    grid-template-areas:
      ". rig legend"
      "kick rig legend"
      "name rig legend"
      "copy rig legend"
      "price rig legend"
      "buy rig legend"
      "pause rig legend"
      ". rig legend";
    column-gap: calc(var(--spacing-gutter) * 2);
    row-gap: 0;
    align-content: stretch;
    padding: calc(var(--top-h) + var(--spacing-6)) var(--pad-x) var(--spacing-6);
    --H: min(var(--spacing-can-detail), calc(100svh - var(--top-h) - 3rem));
  }

  .hero__copy,
  .price,
  .hero__buy {
    margin-top: var(--spacing-6);
  }

  .hero__name {
    margin-top: var(--spacing-3);
  }

  .hero .fizz-toggle {
    margin-top: var(--spacing-4);
  }

  .price {
    justify-self: start;
    padding: var(--spacing-3) var(--spacing-6);
    column-gap: var(--spacing-10);
  }

  .price > div {
    flex-direction: column-reverse;
    gap: var(--spacing-1);
  }

  .price dd {
    font-size: var(--text-h2);
    line-height: var(--text-h2--line-height);
  }

  .hero .rig {
    align-self: center;
  }

  .legend {
    align-self: center;
    margin-top: 0;
    gap: var(--spacing-6);
  }

  .legend li {
    align-items: flex-start;
  }

  .stats--six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .band {
    padding-block: var(--spacing-10);
  }

  .cold {
    padding-block: var(--spacing-24);
  }

  .cold__row {
    grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 3fr);
    column-gap: var(--spacing-gutter);
  }

  .label-sec {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    column-gap: var(--spacing-16);
    row-gap: var(--spacing-8);
    padding-block: var(--spacing-24);
  }

  .label-sec .section-title {
    grid-column: 1 / -1;
  }

  .pairs {
    padding-top: var(--spacing-24);
  }

  .pair {
    grid-template-columns: 7rem minmax(0, 2fr) minmax(0, 2fr) auto;
    column-gap: var(--spacing-8);
    align-items: center;
    padding-block: var(--spacing-10);
  }

  .pair__n {
    grid-row: auto;
  }

  .pair__score {
    justify-self: end;
  }

  .others__band {
    min-height: calc(var(--spacing-can-band) + 2 * var(--spacing-3));
    column-gap: var(--spacing-8);
  }

  .others__can {
    height: var(--spacing-can-band);
  }

  /* 구매 포스터 — [캔 칸 max(캔 폭, 5fr)] [고르는 칸 7fr], 고르는 칸 안은 두 칸(1fr 1fr) */
  .poster {
    min-height: max(100svh, 40rem);
    grid-template-columns: minmax(var(--cw0), 5fr) minmax(0, 7fr);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas:
      "can pick"
      "pause pick";
    column-gap: calc(var(--spacing-gutter) * 2);
    row-gap: 0;
    align-content: stretch;
    padding: calc(var(--top-h) + var(--spacing-6)) var(--pad-x) var(--spacing-6);
    --name: var(--text-display);
    --H: min(var(--spacing-can), calc(100svh - 7.5rem));
    --cw0: calc(var(--H) * var(--can-k));
    /* 믹스 무리 — 가운데 캔 100%, 겹침 45%. 캔 칸 폭에 맞춰 줄인다(가운데 캔 높이 × 1.205 = 무리 폭) */
    --lap: 0.45;
    --k: 1.205;
    --Hc: min(var(--H), calc(100cqi / var(--k)));
  }

  .poster__can {
    grid-area: can;
    display: grid;
    justify-items: center;
    align-content: start;
    container-type: inline-size;
  }

  .poster .rig {
    grid-area: auto;
  }

  .poster .rig__dim {
    display: block;
  }

  .poster > .fizz-toggle {
    grid-area: pause;
    justify-self: center;
  }

  .picker {
    grid-area: pick;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "kick kick"
      "name name"
      "chips chips"
      "packs side"
      "cart side"
      "note note";
    align-content: safe center;
    column-gap: calc(var(--spacing-gutter) * 2);
    row-gap: var(--spacing-6);
  }

  .picker__name {
    margin-top: calc(var(--spacing-4) * -1);
  }

  .picker__side {
    grid-area: side;
    display: grid;
    align-content: start;
    gap: var(--spacing-3);
  }

  .qty-row,
  .subs,
  .add,
  .picker__note,
  .cart {
    grid-area: auto;
  }

  /* 카트 줄은 팩 줄 아래 빈자리(오른쪽 칸이 더 길다)에 선다 — 담아도 첫 화면 높이가 그대로다 */
  .picker__note {
    grid-area: note;
  }

  .cart {
    grid-area: cart;
    align-self: start;
  }

  /* 비어 있는 카트 줄이 줄 간격 하나를 먹지 않게 */
  .is-buy.js:not([data-added]) .picker .cart {
    margin-top: calc(var(--spacing-6) * -1);
  }

  .subs {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 0;
  }

  /* 가로 배치 — [수량][원가 · 한 캔 값] 한 줄, 합계는 그 아래 한 줄 */
  .qty-row {
    justify-content: flex-start;
    row-gap: var(--spacing-1);
  }

  .total {
    flex-basis: 100%;
  }

  .packs {
    grid-template-columns: max-content minmax(0, 1fr) auto;
    align-content: start;
  }

  .packs > li {
    display: contents;
  }

  .pack {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    justify-content: stretch;
    column-gap: var(--spacing-3);
    min-height: var(--spacing-chip);
    padding: var(--spacing-2) var(--spacing-4);
  }

  .pack__n,
  .pack__p {
    font-size: var(--text-stat);
  }

  .pack__d,
  .pack__p,
  .pack__20 {
    display: inline;
  }

  .pack__p {
    justify-self: end;
  }

  /* 창 높이 < 760 — 구독 두 줄 → 한 줄 두 칸(폭 표 896×672). 단 오른쪽 칸이 20rem 보다 좁으면 두 칸 글이 세 줄로 꺾인다 → 두 줄 그대로 */
  .picker__side {
    container-type: inline-size;
  }

  @media (max-height: 47.5rem) {
    @container (min-width: 20rem) {
      .subs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    .picker {
      row-gap: var(--spacing-4);
    }
  }

  /* 팩 칸이 22rem 보다 좁으면 설명 칸을 뺀다(×12 · $24 만) — 한 캔 값은 합계 위 줄이 말한다 */
  .packs {
    container-type: inline-size;
  }

  @container (max-width: 22rem) {
    .pack__d {
      display: none;
    }
  }

  .packshot {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    column-gap: calc(var(--spacing-gutter) * 2);
    align-items: center;
    padding-block: var(--spacing-24);
  }

  .delivery {
    padding-block: var(--spacing-24);
  }

  .facts3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--spacing-gutter);
  }
}

@media (min-width: 56rem) {
  .facts3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.nw {
  white-space: nowrap;
}
