/* Fizz 汽泡 — 明亮、好玩、以「口味」為入口。
   首頁是一疊口味卡，右滑加入、左滑換下一張；每張卡就是那個口味的顏色，泡泡從底部冒上來。
   其他地方保持乾淨的天空白與深藍字，讓口味色當主角；檸檬黃只給「加入」相關的動作。
   斷點：手機 < 700px（主要設計）／平板 700–1099px／桌機 ≥ 1100px */
:root {
  --sky: #EAF3FF;
  --white: #FFFFFF;
  --cloud: #D6E6FA;
  --ink: #12264A;
  --ink-2: #33466B;
  --mute: #5F7194;
  --lemon: #FFE14A;
  --lemon-2: #FFD21A;
  --sans: "Noto Sans TC", sans-serif;
  --pop: "Bricolage Grotesque", "Noto Sans TC", sans-serif;
  --nav-h: 74px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 12px 24px -14px rgba(18,38,74,.6);
  --scrim: rgba(18,38,74,.32);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; color: var(--ink); font: 400 15px/1.6 var(--sans); background: var(--sky); min-height: 100dvh; }
body.is-sheet-open, body.is-cart-open { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
svg { display: block; }
img { display: block; max-width: 100%; }
.ico { width: 22px; height: 22px; stroke-width: 2; }
.pop { font-family: var(--pop); font-weight: 800; letter-spacing: -.02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { position: relative; max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: env(safe-area-inset-top, 0px) 0 calc(var(--nav-h) + var(--safe-b) + 30px); overflow-x: hidden; }

/* ── 頁首 ── */
.bar { display: flex; align-items: center; gap: 12px; padding: 16px 16px 4px; }
.logo { display: flex; align-items: center; gap: 8px; margin-right: auto; font: 800 1.5rem/1 var(--pop); letter-spacing: -.03em; }
.logo i { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 18%, transparent 20%), var(--lemon); box-shadow: 10px -8px 0 -6px #9FD0FF, 16px 4px 0 -9px #FFB8D2; }
.round { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--white); }

/* ── 首頁：口味卡 ── */
.ask { margin: 14px 16px 2px; font: 900 1.65rem/1.25 var(--sans); }
.ask-sub { margin: 0 16px 14px; color: var(--mute); font-size: .9rem; }
.stack { position: relative; height: 410px; margin: 0 16px; touch-action: pan-y; }
.fc { position: absolute; inset: 0; border-radius: 34px; padding: 22px; color: var(--fg, var(--white)); background: var(--bg); overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; user-select: none; -webkit-user-select: none; cursor: grab;
  transform: translateY(calc(var(--i) * 14px)) scale(calc(1 - var(--i) * .05)); transform-origin: 50% 100%; transition: transform .35s cubic-bezier(.2,.9,.3,1.2), opacity .3s; z-index: calc(10 - var(--i)); box-shadow: 0 24px 40px -24px rgba(18,38,74,.45); }
.fc:not([data-i="0"]):not([data-i="1"]):not([data-i="2"]) { opacity: 0; }
.fc:not([data-i="0"]):not([data-i="1"]):not([data-i="2"]) .bubbles span { animation: none; }
.fc.is-drag { transition: none; cursor: grabbing; }
.fc.is-gone { pointer-events: none; opacity: 0; }
.fc:not([data-i="0"]) { pointer-events: none; }
.fc .bubbles { position: absolute; inset: 0; pointer-events: none; }
.fc .bubbles span { position: absolute; bottom: -30px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; border: 2px solid rgba(255,255,255,.55); background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.8) 0 14%, transparent 16%); animation: up var(--d) linear infinite; animation-delay: var(--w); }
@keyframes up { to { transform: translate(var(--dx), -520px); } }
.fc-top { position: relative; display: flex; justify-content: space-between; align-items: start; }
.fc-kind { padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.26); font-size: .8rem; font-weight: 700; }
.fc-price { font: 800 1.05rem var(--pop); }
.fc-stock { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: #fff; color: #0B7A3B; font-size: .82rem; font-weight: 900; }
.fc-stock.is-low { color: #8A5300; }
.fc-stock.is-out { color: #C42318; }
.fc-mid { position: relative; display: grid; place-items: center; }
.fc-mid svg, .fc-mid img { height: 190px; width: auto; aspect-ratio: 120/320; color: rgba(255,255,255,.92); filter: drop-shadow(0 18px 18px rgba(0,0,0,.18)); transform: rotate(var(--r, 8deg)); }
.fc-mid img { aspect-ratio: auto; object-fit: contain; height: 108px; width: auto; max-width: 84%; transform: none; border-radius: 18px; background: #fff; box-shadow: 0 0 0 10px #fff; }
.fc-bot { position: relative; }
.fc-name { margin: 0; font: 900 2rem/1.15 var(--sans); }
.fc-en { font: 700 .9rem var(--pop); opacity: .8; }
.notes { display: flex; gap: 14px; margin-top: 10px; font-size: .8rem; font-weight: 500; }
.notes span { display: grid; gap: 4px; }
.notes i { display: flex; gap: 3px; }
.notes i::before { content: ""; width: 54px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, currentColor calc(var(--v) * 10%), rgba(255,255,255,.3) 0); }
.stamp { position: absolute; top: 26px; padding: 6px 14px; border: 3px solid currentColor; border-radius: 14px; font: 900 1.2rem var(--sans); opacity: 0; transform: rotate(-12deg); }
.stamp.yes { left: 22px; } .stamp.no { right: 22px; transform: rotate(12deg); }
.done { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; border-radius: 34px; border: 3px dashed var(--cloud); color: var(--mute); }
.done b { color: var(--ink); font-size: 1.2rem; }
.done .cta { flex: none; padding: 0 26px; }
.done .again { padding: 6px 12px; font-size: .88rem; font-weight: 700; color: var(--mute); }

.swipe-act { display: flex; justify-content: center; gap: 18px; margin: 34px 0 0; }
.swipe-act button { height: 60px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 900; box-shadow: var(--shadow); }
.swipe-act button:disabled { opacity: .4; cursor: default; }
.swipe-act .skip { width: 60px; background: var(--white); }
.swipe-act .yes { padding: 0 28px; background: var(--lemon); }
.swipe-act .yes .ico { stroke-width: 2.6; }

.sec-h { display: flex; justify-content: space-between; align-items: baseline; padding: 34px 16px 12px; }
.sec-h h2 { margin: 0; font: 900 1.3rem var(--sans); }
.sec-h button { font-size: .88rem; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--lemon); }

/* 分類：四顆彩色泡泡 */
.bubs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 16px; }
.bubs button { display: grid; justify-items: center; gap: 6px; font-size: .84rem; font-weight: 700; }
.bubs button i { width: 100%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.85) 0 10%, transparent 12%), var(--c); display: grid; place-items: center; box-shadow: inset 0 -8px 16px rgba(0,0,0,.08); }
.bubs svg { height: 54%; width: auto; aspect-ratio: 120/320; color: rgba(255,255,255,.95); }

/* ── 商品卡：白底展示區，白底商品照可直接放 ── */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 58%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px 6px; scroll-padding-inline: 16px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.pc { scroll-snap-align: start; position: relative; display: grid; gap: 2px; padding: 6px 6px 12px; border-radius: 28px; background: var(--white); cursor: pointer; touch-action: manipulation; }
.pc[hidden] { display: none; }
.pc .stage { position: relative; height: 180px; border-radius: 22px; background: var(--white); display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--sky); overflow: hidden; }
.pc .stage svg { height: 140px; width: auto; aspect-ratio: 120/320; }
.pc .stage img { width: 100%; height: 100%; object-fit: contain; }
.pc .tag { position: absolute; z-index: 1; top: 10px; right: 10px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--lemon); font-size: .76rem; font-weight: 900; transform: rotate(12deg); }
.pc .dots { position: absolute; left: 12px; bottom: 10px; display: flex; gap: 3px; }
.pc .dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--white); }
.pc h3 { margin: 8px 10px 0; font-size: 1rem; font-weight: 900; }
.pc-stock { margin: 2px 10px 0; font-size: .82rem; font-weight: 900; color: #0B7A3B; }
.pc-stock.is-low { color: #8A5300; }
.pc-stock.is-out { color: #C42318; }
.pc .meta { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 0 10px; }
.pc .meta .pop { font-size: 1rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.grid .pc .stage { height: 156px; }
.grid .pc .stage svg { height: 118px; }

/* ── 商品頁 ── */
.page-t { margin: 0; padding: 22px 16px 12px; font: 800 2.2rem/1.05 var(--pop); }
.page-t small { display: block; font: 700 .9rem var(--sans); color: var(--mute); letter-spacing: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 14px; scrollbar-width: none; }
.chips button { flex: none; height: 40px; padding: 0 18px; border-radius: 999px; background: var(--white); font-size: .9rem; font-weight: 700; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--white); }

/* ── 會員頁 ── */
.card-m { position: relative; margin: 0 16px; height: 210px; border-radius: 32px; padding: 22px; overflow: hidden; display: grid; align-content: space-between; color: var(--ink);
  background: radial-gradient(circle at 85% 20%, #FFB8D2 0 22%, transparent 23%), radial-gradient(circle at 18% 110%, #9FD0FF 0 34%, transparent 35%), var(--lemon); }
.card-m small { font-size: .84rem; font-weight: 700; }
.card-m .pop { font-size: 2.8rem; line-height: 1; }
.stamps { margin: 14px 16px 0; padding: 16px; border-radius: 26px; background: var(--white); }
.stamps p { margin: 0 0 10px; font-weight: 700; font-size: .92rem; }
.stamps div { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.stamps i { aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--cloud); }
.stamps i.on { border: 0; background: radial-gradient(circle at 32% 28%, #fff 0 14%, transparent 16%), var(--c, #9FD0FF); }
.list { margin: 12px 16px 0; background: var(--white); border-radius: 26px; overflow: hidden; }
.list a, .list button { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; font-size: .95rem; font-weight: 500; color: inherit; text-decoration: none; text-align: left; }
.list a + a, .list a + button, .list button + a, .list button + button, .list form + a, .list a + form, .list form + button, .list button + form { border-top: 2px solid var(--sky); }
.list form { margin: 0; }
.list .ico { width: 18px; height: 18px; color: var(--mute); }

/* ── 分頁列：手機是浮在底部的白色膠囊，選中的分頁變成檸檬黃並顯示文字 ── */
.nav { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); width: calc(min(480px, 100%) - 32px); height: 64px; display: flex; gap: 4px; padding: 6px; border-radius: 999px; background: var(--white); box-shadow: 0 16px 34px -14px rgba(18,38,74,.45); }
.nav button { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; color: var(--mute); font-size: .86rem; font-weight: 900; transition: flex .3s, background .3s; }
.nav button span.l { display: none; }
.nav button[aria-current="page"] { flex: 1.8; background: var(--lemon); color: var(--ink); }
.nav button[aria-current="page"] span.l { display: inline; }
.badge { position: absolute; top: 6px; right: calc(50% - 22px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ink); color: var(--white); font: 800 .7rem/20px var(--pop); text-align: center; }
.badge[data-n="0"] { display: none; }

/* ── 底部面板（商品詳情、購物袋） ── */
.sheet, .cart { position: fixed; z-index: 40; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.sheet.is-open, .cart.is-open { opacity: 1; visibility: visible; }
.panel { width: min(480px, 100%); max-height: 92dvh; display: flex; flex-direction: column; background: var(--sky); border-radius: 34px 34px 0 0; transform: translateY(100%); transition: transform .5s cubic-bezier(.2,.9,.3,1.15); padding-bottom: var(--safe-b); }
.is-open > .panel { transform: none; }
.grab { width: 48px; height: 6px; border-radius: 3px; background: var(--cloud); margin: 10px auto 0; }
.p-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px 6px 22px; }
.p-head h2 { margin: 0; font: 800 1.6rem var(--pop); }
.p-body { overflow: auto; padding: 0 16px 14px; overflow-anchor: none; touch-action: pan-y; }
.d-media { position: relative; height: 270px; border-radius: 28px; background: var(--white); display: grid; place-items: center; overflow: hidden; overflow-anchor: none; }
.d-media [data-d-media] { width: 100%; height: 100%; min-width: 0; min-height: 0; }
.d-media.is-gal { height: 348px; display: block; }
.d-media svg { height: 220px; width: auto; aspect-ratio: 120/320; transition: color .3s; }
.d-media img { width: 100%; height: 100%; object-fit: contain; }
.d-gal { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.d-gal-stage { position: relative; flex: 1; min-height: 0; }
.d-gal-open { display: block; width: 100%; height: 100%; padding: 0; cursor: zoom-in; }
.d-gal-stage img, .d-gal-thumbs img { width: 100%; height: 100%; }
.d-gal-stage img { object-fit: contain; }
.d-gal-nav { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); font-size: 1.45rem; line-height: 1; box-shadow: 0 6px 16px -10px rgba(18,38,74,.8); }
.d-gal-nav.prev { left: 10px; }
.d-gal-nav.next { right: 10px; }
.d-gal-nav[hidden] { display: none; }
.d-gal-count { position: absolute; right: 12px; bottom: 12px; z-index: 2; padding: 2px 8px; border-radius: 999px; background: rgba(18,38,74,.72); color: var(--white); font: 800 .75rem var(--pop); }
.d-gal-count[hidden] { display: none; }
.d-gal-thumbs { display: flex; gap: 8px; padding: 8px 10px 10px; overflow-x: auto; scrollbar-width: thin; }
.d-gal-thumbs button { flex: 0 0 56px; height: 56px; padding: 0; border-radius: 14px; overflow: hidden; background: var(--sky); box-shadow: inset 0 0 0 1px var(--cloud); }
.d-gal-thumbs button.is-current { box-shadow: inset 0 0 0 2px var(--ink); }
.d-gal-thumbs img { object-fit: cover; }
.d-lightbox { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 72px 16px 88px; background: rgba(18,38,74,.92); }
@media (min-width: 700px) { .d-lightbox { padding: 72px 64px; } }
.d-lightbox[hidden] { display: none; }
.d-lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.d-lightbox .d-gal-count { background: var(--white); color: var(--ink); }
.d-lightbox-x { position: absolute; top: 16px; right: 16px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: var(--white); color: var(--ink); font-size: 1.5rem; line-height: 1; }
.d-badge { position: absolute; top: 14px; right: 14px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--lemon); font-size: .8rem; font-weight: 900; transform: rotate(12deg); }
.d-badge:empty { display: none; }
.d-name { margin: 16px 6px 0; font: 900 1.5rem var(--sans); }
.d-en { margin: 0 6px; font: 700 .85rem var(--pop); color: var(--mute); }
.d-desc { margin: 10px 6px 14px; color: var(--ink-2); white-space: pre-line; line-height: 1.65; }
.vars { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0 6px; margin: 0 0 14px; }
.vars label { position: relative; }
.vars input { position: absolute; opacity: 0; }
.vars span { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 7px; border-radius: 999px; background: var(--white); font-size: .9rem; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.vars span::before { content: ""; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.7) 0 14%, transparent 16%), var(--c); }
.vars input:checked + span { background: var(--ink); color: var(--white); }
.vars input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.specs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.specs div { background: var(--white); border-radius: 18px; padding: 10px 14px; }
.specs dt { font-size: .76rem; color: var(--mute); }
.specs dd { margin: 0; font-weight: 700; font-size: .92rem; }
.p-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px 16px; }
.d-buy { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.d-qty { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--white); touch-action: manipulation; }
.d-qty button { width: 36px; height: 36px; border-radius: 50%; background: var(--sky); font-weight: 900; font-size: 1.15rem; line-height: 1; }
.d-qty input { width: 46px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: center; font: 800 16px var(--pop); }
.d-qty input::-webkit-outer-spin-button, .d-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.d-qty input { -moz-appearance: textfield; appearance: textfield; }
.d-qty input:disabled, .d-qty button:disabled, .cta:disabled { opacity: .45; cursor: default; }
.p-foot .total { font: 800 1.2rem var(--pop); white-space: nowrap; }
.cta { flex: 1.3; height: 56px; border-radius: 999px; background: var(--lemon); font-weight: 900; font-size: 1rem; box-shadow: var(--shadow); }
.cta:active { transform: scale(.97); }
@media (max-width: 699px) {
  .sheet .p-foot { flex-wrap: wrap; align-items: stretch; }
  .sheet .d-buy { width: 100%; justify-content: space-between; }
  .sheet .p-foot .cta { flex: 1 1 100%; }
}

.ship { margin: 0 16px 10px; padding: 12px 16px; border-radius: 20px; background: var(--white); font-size: .86rem; font-weight: 500; }
.ship .bar2 { margin-top: 8px; height: 10px; border-radius: 5px; background: var(--sky); overflow: hidden; }
.ship .bar2::after { content: ""; display: block; height: 100%; width: calc(var(--p, 0) * 100%); border-radius: 5px; background: repeating-linear-gradient(-45deg, var(--lemon) 0 8px, var(--lemon-2) 8px 16px); transition: width .4s; }
.cart ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ci { display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; padding: 8px; border-radius: 22px; background: var(--white); }
.ci-thumb { height: 72px; border-radius: 16px; background: var(--sky); display: grid; place-items: center; overflow: hidden; }
.ci-thumb svg { width: 20px; height: auto; }
.ci-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ci p { margin: 0; }
.ci-name { font-weight: 900; font-size: .92rem; }
.ci-var { font-size: .8rem; color: var(--mute); }
.ci-qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; touch-action: manipulation; }
.ci-qty button { width: 30px; height: 30px; border-radius: 50%; background: var(--sky); font-weight: 900; }
.ci-qty input { width: 48px; height: 30px; border: 0; border-radius: 10px; background: var(--sky); color: var(--ink); text-align: center; font: 800 16px var(--pop); }
.ci-qty input::-webkit-outer-spin-button, .ci-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ci-qty input { -moz-appearance: textfield; appearance: textfield; }
.ci-stock { margin-top: 2px; font-size: .78rem; font-weight: 900; color: #0B7A3B; }
.ci-stock.is-low { color: #8A5300; }
.ci-stock.is-out { color: #C42318; }
.ci-end { display: grid; align-content: space-between; justify-items: end; padding-right: 6px; }
.ci-price { font: 800 .95rem var(--pop); }
.ci-remove { font-size: .78rem; color: var(--mute); }
.empty { padding: 32px 0; text-align: center; color: var(--mute); }
.note { margin: 0 22px; font-size: .8rem; color: var(--mute); }
[data-cart-count].is-bump { animation: bump .5s; }
@keyframes bump { 40% { transform: scale(1.4); } }

/* ── 提示訊息、版本更新 ── */
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); transform: translate(-50%, 10px); max-width: calc(min(480px, 100%) - 32px); padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: .86rem; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.update { position: fixed; z-index: 55; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 32px); padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: .86rem; font-weight: 700; box-shadow: var(--shadow); animation: drop .4s cubic-bezier(.2,.9,.3,1.2) both; }
.update[hidden] { display: none; }
.update button { height: 36px; padding: 0 16px; border-radius: 999px; background: var(--lemon); color: var(--ink); font-weight: 900; }
@keyframes drop { from { transform: translate(-50%, -120%); } }

/* ── 加到主畫面：從底部彈上來的面板，App 圖示在裡面上下浮動 ── */
.install { position: fixed; z-index: 45; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim); animation: fade .3s both; }
.install[hidden] { display: none; }
.install .card { width: min(480px, 100%); padding: 26px 22px calc(20px + var(--safe-b)); border-radius: 34px 34px 0 0; background: var(--white); text-align: center; animation: rise .55s cubic-bezier(.2,.9,.3,1.2) both; }
.install .phone { position: relative; width: 120px; height: 120px; margin: 0 auto 14px; border-radius: 34px; background: var(--sky); display: grid; place-items: center; }
.install .phone img { width: 64px; height: 64px; border-radius: 18px; animation: bob 2.4s ease-in-out infinite; box-shadow: 0 12px 20px -10px rgba(18,38,74,.5); }
.install h2 { margin: 0 0 4px; font: 900 1.35rem var(--sans); }
.install p { margin: 0 0 18px; color: var(--mute); font-size: .92rem; }
.install .cta { display: block; width: 100%; }
.install .later { margin-top: 10px; padding: 8px 14px; color: var(--mute); font-weight: 700; font-size: .9rem; }
.ship-notice { z-index: 46; }
.ship-notice .card { text-align: left; }
.ship-notice h2 { margin-bottom: 14px; text-align: center; }
.ship-notice ul { margin: 0 0 18px; padding: 0; list-style: none; }
.ship-notice li { margin: 0 0 10px; padding: 12px 14px; border-radius: 16px; background: var(--sky); color: var(--ink); font-weight: 700; line-height: 1.55; text-align: left; }
.ship-notice li:last-child { margin-bottom: 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ── 平板 ≥ 700px：單欄加寬，口味卡置中；詳情改置中視窗、購物袋改右側抽屜 ── */
@media (min-width: 700px) {
  .app { max-width: 960px; padding-inline: 16px; }
  .bar { padding-top: 24px; }
  .home-l { text-align: center; }
  .home-l .stack { width: 400px; margin-inline: auto; text-align: left; }
  .bubs { grid-template-columns: repeat(4, minmax(0, 132px)); gap: 24px; }
  .rail { grid-auto-columns: calc((100% - 32px - 24px) / 3); }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .grid .pc .stage { height: 190px; }
  .grid .pc .stage svg { height: 146px; }
  .me-top { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 16px; }
  .me-top .card-m, .me-top .stamps { margin: 0; height: auto; min-height: 210px; }
  .me-top .stamps { display: grid; align-content: center; }

  .sheet { align-items: center; padding: 24px; }
  .sheet .panel { width: min(600px, 100%); max-height: calc(100dvh - 48px); border-radius: 34px; transform: translateY(24px) scale(.97); transition: transform .35s cubic-bezier(.2,.9,.3,1.15); padding-bottom: 0; }
  .sheet .grab { visibility: hidden; }
  .cart { justify-content: flex-end; align-items: stretch; }
  .cart .panel { width: 420px; max-height: none; height: 100%; border-radius: 34px 0 0 34px; transform: translateX(100%); }
  .cart .grab { visibility: hidden; }
  .cart .p-body { flex: 1; }
  .sheet.is-open .panel, .cart.is-open .panel { transform: none; }

  .install { align-items: center; padding: 24px; }
  .install .card { width: 420px; border-radius: 34px; padding-bottom: 20px; }
}

/* ── 桌機 ≥ 1100px：分頁列移到頁首；首頁左邊固定口味卡、右邊分類與熱銷 ── */
@media (min-width: 1100px) {
  :root { --nav-h: 0px; }
  .app { max-width: 1200px; padding: 0 24px 64px; }
  .bar { position: sticky; top: 0; z-index: 30; margin: 0 -24px; padding: 16px 24px; background: color-mix(in srgb, var(--sky) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .logo { font-size: 1.7rem; }

  .nav { position: static; transform: none; width: auto; height: 52px; padding: 5px; box-shadow: none; }
  .nav button { flex: none; padding: 0 20px; gap: 8px; }
  .nav button span.l { display: inline; }
  .nav button[aria-current="page"] { flex: none; }
  .nav button:not([aria-current="page"]):hover { background: var(--sky); color: var(--ink); }
  .nav .badge { position: static; }

  .home { display: grid; grid-template-columns: 440px 1fr; gap: 56px; align-items: start; padding-top: 12px; }
  .home[hidden] { display: none; }
  .home-l { position: sticky; top: 100px; text-align: left; }
  .home-l .ask { margin-inline: 0; font-size: 2.1rem; }
  .home-l .ask-sub { margin-inline: 0; }
  .home-l .stack { width: auto; height: 460px; margin: 0; }
  .home-r .sec-h { padding-inline: 0; }
  .home-r .sec-h:first-child { padding-top: 22px; }
  .home-r .bubs { margin: 0; max-width: none; grid-template-columns: repeat(4, minmax(0, 132px)); gap: 24px; }
  .home-r .rail { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; padding: 0; gap: 16px; }

  .page-t { padding: 28px 0 16px; font-size: 3rem; }
  .chips { padding: 0 0 20px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0; }
  .grid .pc .stage { height: 210px; }
  .grid .pc .stage svg { height: 160px; }
  .pc:hover .stage { box-shadow: inset 0 0 0 2px var(--cloud); }

  .me { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
  .me .page-t { grid-column: 1 / -1; }
  .me-top { margin: 0; }
  .me .list { margin: 0; }

  .sheet .panel { width: min(920px, 100%); }
  .sheet .p-body { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; align-content: start; padding: 0 28px 20px; }
  .sheet .p-body > * { grid-column: 2; }
  .sheet .d-media { grid-column: 1; grid-row: 1 / span 6; height: 460px; }
  .sheet .d-media.is-gal { height: 520px; }
  .sheet .d-media svg { height: 380px; }
  .sheet .d-name { margin-top: 4px; font-size: 2rem; }
  .sheet .p-foot { padding: 12px 28px 22px; }

  .toast { bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
a.logo { color: inherit; text-decoration: none; }
.fc-en:empty, .d-en:empty { display: none; }
.d-stock { display: flex; align-items: baseline; gap: 10px; flex: 1 0 100%; margin: 0; padding: 10px 16px; border-radius: 18px; background: #E5F8EC; color: #0B7A3B; }
.d-stock b { font: 800 2rem/1 var(--pop); letter-spacing: -.03em; }
.d-stock span { font-weight: 800; font-size: .95rem; }
.d-stock.is-low { background: #FFF3D6; color: #8A5300; }
.d-stock.is-out { background: #FFE8E6; color: #C42318; }
.vars input:disabled + span { opacity: .4; cursor: default; }
.bubs b { font: 900 1.35rem var(--sans); color: #fff; }
.bubs img { width: 72%; height: 72%; object-fit: cover; border-radius: 50%; }
.ph { width: 42%; height: 68%; border-radius: 20px; background: radial-gradient(circle at 32% 24%, #fff 0 12%, transparent 14%), var(--c, #7FB8FF); }
.line-dock { position: fixed; z-index: 25; right: max(16px, env(safe-area-inset-right)); bottom: calc(var(--nav-h) + var(--safe-b) + 18px); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.line-menu { display: none; flex-direction: column; align-items: flex-end; gap: 10px; }
.line-dock.is-open .line-menu { display: flex; }
.line-toggle { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: #06c755; color: #fff; cursor: pointer; box-shadow: 0 10px 24px rgba(6, 150, 70, 0.35); }
.line-toggle svg { width: 30px; height: 30px; }
.line-toggle .line-mark { display: grid; }
.line-toggle .line-x { display: none; }
.line-dock.is-open .line-toggle .line-mark { display: none; }
.line-dock.is-open .line-toggle .line-x { display: block; }
.line-toggle:hover, .line-cs:hover { background: #05b34c; color: #fff; }
.line-cs { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px 0 10px; border-radius: 999px; background: #06c755; color: #fff; font-size: .86rem; font-weight: 800; letter-spacing: .04em; text-decoration: none; box-shadow: 0 10px 24px rgba(6, 150, 70, 0.35); }
.line-cs svg { width: 26px; height: 26px; flex: none; }
.install .phone i { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 18%, transparent 20%), var(--lemon); box-shadow: 14px -10px 0 -8px #9FD0FF, 22px 6px 0 -12px #FFB8D2; }
