/* Lounge M — 첫 화면 하단 무대 · 필수템 테마 (hf284, 마스터) — assets/js/landing-stage.js
   hf286 (마스터 「너무 작아서 읽기가 어려워」): 카드 여백으로 아래 띠 40px 확보 → 리본 높이 32 → 36, 글자 14 → 16px,
   메뉴판 아래 띠 안으로 내려 아랫선을 눈 둔덕 바닥선에 맞춤(landing-stage.js place). 「50% 할인」 → 「50%↓」.
   메뉴 테두리 아랫선에 걸친 리본(높이 32). 리본이 나와 있는 동안 하단 장면(hf330: .season-ground — 크리스마스는 눈사람)과 빌드 번호는 숨긴다.
   첫 줄: 금색 [필수템] + 글자가 왼쪽부터 흐르듯(정보 카드 hf281과 같은 0.35초 · 전체 0.8초).
   둘째 줄 순서(hf292): 구성(0) → 할인 도장(0.45초) → 할인가(0.75초) → [담기](1.05초). 정가 · 점선은 hf292에서 뺐다. */
.page-shell > .must-have-stage {
  position: absolute !important;
  left: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 44px; /* hf286: 32 → 36 · hf291 (마스터 「세로 크기도 넓히고」): 36 → 44 */
  width: 404px; /* hf291 (마스터 「가로 크기는 상단의 검색창의 넓이로」): 검색창 · 메뉴판과 같은 18~422 */
  max-width: none;
  padding: 0 10px; /* hf291: 12 → 10 (17px 둘째 줄 + [메뉴 보기]가 들어가게) */
  border: 1px solid rgba(214, 174, 104, 0.6);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(30, 22, 13, 0.97), rgba(12, 9, 6, 0.97));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 12px rgba(214, 160, 82, 0.18);
  color: rgba(238, 226, 206, 0.92);
  font-family: inherit;
  font-size: 17px; /* hf286: 14 → 16 · hf291: 16 → 17 */
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  z-index: 14;
  transition: opacity 0.4s ease;
  -webkit-tap-highlight-color: transparent;
}

.page-shell > .must-have-stage.is-on {
  opacity: 1;
  pointer-events: auto;
}

.page-shell > .must-have-stage:focus-visible {
  outline: 2px solid #e6c27a;
  outline-offset: 2px;
}

body:not(.is-landing) .page-shell > .must-have-stage {
  display: none !important;
}

.must-have-stage .stage-line {
  display: inline-flex;
  align-items: center;
  gap: 5px; /* hf291: 7 → 5 (폭 404 안에 17px 둘째 줄) */
  transition: opacity 0.3s ease;
}

.must-have-stage.is-swapping .stage-line {
  opacity: 0;
}

.must-have-stage .stage-label {
  display: inline-flex;
  align-items: center;
  height: 26px; /* hf286: 20 → 22 · hf291: 22 → 26 */
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e6c27a, #c99a45);
  box-shadow: inset 0 1px 0 rgba(255, 245, 215, 0.55);
  color: #1b130a;
  font-size: 15px; /* hf286: 12 → 13 · hf291: 13 → 15 */
  font-weight: 800;
  letter-spacing: 0.04em;
}

.must-have-stage .stage-text {
  font-size: 18px; /* hf291: 첫 줄은 폭에 여유가 있어 18 (440 기준 약 371/382) */
  letter-spacing: -0.02em;
}

.must-have-stage .stage-char {
  display: inline-block;
  font-style: normal;
  animation: stage-flow 0.35s ease-out both;
}

/* hf284 (마스터): 「스페인 와인 칵테일」 초록 · 「특별 행사」 붉은색
   hf308 (마스터 A안 「Menu의 'M' 색깔로」): 값은 이미 M과 같은 #7fcf95였지만 18px 보통 굵기의 가는 획은 어두운 바탕에 섞여 탁해 보였다 —
   굵기는 그대로 두고(「칼리모초」 강조 유지) 초록만 밝혀 46px 굵은 M과 같은 밝기로 보이게 한다. */
.must-have-stage .stage-text .is-green {
  color: #a6eab9;
}

.must-have-stage .stage-text .is-red {
  color: #f26b5f;
}

.must-have-stage .stage-text .is-bold {
  font-weight: 700; /* hf286 (마스터): 「칼리모초」 굵게 */
}

@keyframes stage-flow {
  from { opacity: 0; filter: blur(2px); transform: translateX(-4px); } /* hf285: 3 → 2px */
  to { opacity: 1; filter: none; transform: none; }
}

/* hf292 (마스터 「3만원과 점선을 없애고 확보된 공간으로 문자를 키워줘」): 둘째 줄 = 구성 · 50%↓ · 할인가 · [담기], 17 → 19px.
   나타나는 순서도 정가 · 점선이 빠진 만큼 당긴다(도장 0.45초 · 할인가 0.75초 · [담기] 1.05초) */
.must-have-stage .stage-what {
  font-size: 19px;
  font-weight: 700; /* hf284 (마스터 「존재감이 약해」): 굵게 */
  letter-spacing: -0.02em;
  animation: stage-in 0.35s ease-out both;
}

.must-have-stage .stage-off {
  display: inline-flex;
  align-items: center;
  height: 28px; /* hf286: 20 → 22 · hf291: 22 → 25 · hf292: 28 */
  padding: 0 9px;
  border-radius: 4px;
  background: #b8322a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  color: #fff3e8;
  font-size: 17px; /* hf286: 12 → 14 (「50%↓」) · hf291: 15 · hf292: 17 */
  font-weight: 800;
  animation: stage-stamp 0.3s cubic-bezier(0.2, 1.6, 0.4, 1) 0.45s both;
}

.must-have-stage .stage-sale {
  color: #f0cf8a;
  font-size: 19px; /* hf284 (마스터 「너무 강해」): 16 → 14, 굵게 뺌 · hf286: 16 · hf291: 17 · hf292: 19 (보통 굵기 그대로) */
  font-weight: 400;
  letter-spacing: -0.01em;
  animation: stage-rise 0.35s ease-out 0.75s both;
}

.must-have-stage .stage-action {
  display: inline-flex;
  animation: stage-in 0.3s ease-out 1.05s both;
}

.page-shell > .must-have-stage .stage-action .toss-order-chip {
  height: 32px !important; /* hf286: 24 → 26 · hf291: 30 · hf292: 32 */
  padding: 0 13px 0 10px !important;
  font-size: 16px !important; /* hf291: 13.5 → 15 · hf292: 16 */
  margin: 0 !important;
}

.must-have-stage .stage-more {
  display: inline-flex;
  align-items: center;
  height: 32px; /* hf286: 22 → 26 · hf291: 30 · hf292: 32 ([담기]와 같게) */
  padding: 0 12px;
  border: 1px solid rgba(214, 174, 104, 0.7);
  border-radius: 999px;
  color: #e6c27a;
  font-size: 16px; /* hf286: 12.5 → 14 · hf291: 14 · hf292: 16 */
  font-weight: 700;
}

@keyframes stage-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes stage-stamp {
  from { opacity: 0; transform: rotate(-12deg) scale(1.7); }
  to { opacity: 1; transform: rotate(-4deg) scale(1); }
}

@keyframes stage-rise {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* 리본이 나와 있는 동안 하단 장면(눈사람 등) · 빌드 번호는 쉰다 (같은 자리) — hf330: 시즌 테마 공용 .season-ground */
.page-shell > .season-ground {
  transition: opacity 0.5s ease;
}

.page-shell > .season-ground.is-offstage {
  opacity: 0 !important;
}

body:not(.is-landing) .page-shell > .season-ground {
  display: none !important;
}

/* hf291: 서서히(opacity 0.4초) → 바로 숨김 — 마스터 사파리 사진에서 리본이 나와 있는데도 빌드 번호가 그대로 보였다 */
body.has-must-have-stage.is-landing .page-shell > .landing-build-badge {
  visibility: hidden !important;
}

/* hf285: 줄이 다 나타나면(is-settled) 애니메이션을 걷어 내고 끝 모습 그대로 둔다 — iPhone 사파리가 흐린 채 남긴 글자를 새로 그리게.
   움직임 줄이기 폰은 처음부터 이 모습 */
.page-shell > .must-have-stage.is-settled *,
.page-shell > .must-have-stage.is-settled *::after {
  animation: none !important;
}

.page-shell > .must-have-stage.is-settled .stage-off {
  transform: rotate(-4deg);
}

@media (prefers-reduced-motion: reduce) {
  .must-have-stage *,
  .must-have-stage *::after {
    animation: none !important;
  }

  .must-have-stage .stage-off {
    transform: rotate(-4deg);
  }
}

/* hf289 (마스터 「배포까지 고」): 첫 화면은 위아래로 끌리지 않게.
   - style.css body의 min-height 100vh를 크롬은 「도구 막대가 숨었을 때 높이」(마스터 폰 872)로 계산해, 보이는 화면(762)보다
     110px 길어져 첫 화면이 끌렸다(scrollY 14로 남아 있던 사진). 첫 화면에서만 0으로 — 높이는 landing-fit.js가 화면에 맞춘다.
   - 사파리에서 리본을 화면 높이 아래(떠 있는 도구 막대 위)까지 내려도 스크롤이 생기지 않게 첫 화면만 overflow: hidden.
     메뉴 화면으로 가면(body.is-landing이 빠지면) 원래대로 스크롤된다. */
/* hf290은 사파리만 잠그지 않았다(그때는 리본이 도구 막대 위 띠까지 내려가 잘렸다).
   hf312 (마스터 B안): 사파리도 잠근다 — 스크롤 여유가 있으면 막대가 접히며 화면이 밀린 채 남았다. 리본은 이제 innerHeight 안(landing-stage.js),
   막대 둘레 띠는 아래 hf290 바탕색으로 칠해진다. */
body.phone-mode.landing-fit.is-landing:not(.ipad-detail) {
  min-height: 0 !important;
}

html:has(> body.phone-mode.landing-fit.is-landing:not(.ipad-detail)) {
  overflow: hidden;
}

/* hf290: 페이지 배경은 그라데이션뿐이라 페이지 밖(막대 둘레 · 끌어 내렸을 때)을 브라우저가 흰색으로 채웠다 — 아랫색 그대로 어둡게 */
/* phone.css의 body.phone-mode … { background: … !important }가 바탕색을 지우므로 그보다 강하게(바탕색만) */
html body.phone-mode,
html body.phone-mode:not(.ipad-detail).is-landing {
  background-color: #050505 !important;
}

/* hf300 (마스터 「장바구니 알약의 위치가 어중간해. 필수템 알약의 가운데에 오도록」): 첫 화면에서만
   [장바구니]·「메뉴별 담기 버튼을 눌러주세요」 알약(높이 44, toss-order.css)의 가운데를 리본 가운데(landing-stage.js dock)에 맞춘다.
   상세 화면은 그대로 화면 맨 아래(hf158 — ←·↑ 동그란 버튼과 겹치지 않게). 리본 가운데는 알약에 가려진다(마스터 A안).
   hf301 (마스터 「높이를 필수템 알약과 완전히 동일하게」): 화면 고정(fixed) 대신 페이지 위치(absolute)에 두어 사파리 아래 띠에서도
   잘리지 않게 하고, 첫 화면과 같은 비율(landing-fit.js)로 줄여 어느 폰에서나 리본과 높이가 같다. */
html.has-stage-dock body.phone-mode.is-landing:not(.ipad-detail) .toss-cart-pill-wrap {
  position: absolute !important;
  top: calc(var(--landing-stage-center) - 22px) !important;
  bottom: auto !important;
  transform: translateX(-50%) scale(var(--landing-stage-scale, 1)) !important;
}

/* hf315 (마스터 「특별 행사로 배포까지 고」): 앱을 열면 가운데에 필수템 소개 카드 3초 → 리본으로 (must-have-intro.js).
   카드는 터치를 받지 않는다(누르면 must-have-intro.js가 바로 지운다). 움직임은 Web Animations로, 끝나면 통째로 지운다. */
/* hf317: ?intro=always | normal 안내 — 카드(9995) 위, 화면 위쪽 */
.toss-order-toast.mh-intro-notice {
  top: calc(14px + env(safe-area-inset-top));
  bottom: auto;
  z-index: 9996;
  width: max-content; /* left 50%라 그냥 두면 화면 절반 폭에서 줄이 꺾인다 */
}

.mh-intro {
  position: fixed;
  inset: 0;
  z-index: 9995;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.mh-intro-dim {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 3, 0.66);
}

.mh-intro-card {
  position: relative;
  width: min(340px, calc(100vw - 48px));
  padding: 16px 16px 20px;
  overflow: hidden;
  border: 1px solid rgba(222, 188, 116, 0.75);
  border-radius: 22px;
  background: linear-gradient(180deg, #2a1f12, #0e0b08);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6), 0 0 34px rgba(214, 160, 82, 0.25);
  text-align: center;
}

.mh-intro-photo img {
  display: block;
  width: 100%;
  height: 196px;
  object-fit: cover;
  border-radius: 14px;
}

.mh-intro-label {
  margin: 14px 0 2px;
  color: #e6c27a;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
}

.mh-intro-name {
  margin: 0;
  color: #f4ead5;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.mh-intro-what {
  margin: 4px 0 12px;
  color: rgba(244, 234, 213, 0.8);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.mh-intro-deal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.mh-intro-off {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 5px;
  background: #b8322a;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  color: #fff3e8;
  font-size: 24px;
  font-weight: 800;
}

.mh-intro-sale {
  display: inline-block;
  color: #f0cd86;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.mh-intro-sheen {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 45%;
  background: linear-gradient(100deg, rgba(255, 240, 200, 0), rgba(255, 240, 200, 0.28), rgba(255, 240, 200, 0));
  pointer-events: none;
}

.mh-intro-streak {
  position: absolute;
  left: 50%;
  width: 6px;
  margin-left: -3px;
  border-radius: 3px;
  transform-origin: bottom center;
  background: linear-gradient(180deg, rgba(230, 194, 122, 0), rgba(246, 214, 146, 0.95));
  box-shadow: 0 0 14px rgba(246, 214, 146, 0.8);
}

/* 카드가 리본에 닿으면 리본이 두 번 금빛으로 반짝 */
@keyframes mh-intro-arrive {
  0%, 100% { box-shadow: 0 0 0 rgba(246, 214, 146, 0); }
  20% { box-shadow: 0 0 26px rgba(246, 214, 146, 1), inset 0 0 12px rgba(246, 214, 146, 0.5); }
  45% { box-shadow: 0 0 14px rgba(246, 214, 146, 0.5); }
  65% { box-shadow: 0 0 24px rgba(246, 214, 146, 0.9), inset 0 0 10px rgba(246, 214, 146, 0.45); }
}

.page-shell > .must-have-stage.is-intro-arrive {
  animation: mh-intro-arrive 0.95s ease-out;
}

