/* ============================================================
   團購平台｜開團的畫面（open.js）：像逛電商一樣挑商品
   白底卡片＋大張商品圖（shots.js）、熱賣紅的揪團價、金色的「每件賺」、
   檔期橫幅、分類、排行、兩欄格子；確認開團做成結帳頁。class 一律 op- 開頭。
   動畫在 prefers-reduced-motion: reduce 時全部關掉。
   ============================================================ */

/* ---------- 共用 ---------- */
.op-ink { filter: url(#ink); }
.shot { display: block; width: 100%; height: 100%; object-fit: cover; }
.op-press { transition: transform .14s var(--ease-out); }
.op-press:active { transform: scale(.98); }
.op-grow { flex: 1; }
.op-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-chev { width: 16px; height: 16px; flex: none; color: var(--c-ink-soft); }
.op .chip[aria-pressed="true"] { background: var(--c-hot); border-color: var(--c-hot); }

@keyframes op-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.op-rise > * { animation: op-rise .42s var(--ease-out) both; }
.op-rise > :nth-child(2) { animation-delay: .05s; }
.op-rise > :nth-child(3) { animation-delay: .1s; }
.op-rise > :nth-child(4) { animation-delay: .15s; }
.op-rise > :nth-child(5) { animation-delay: .2s; }
.op-rise > :nth-child(n+6) { animation-delay: .25s; }

/* 按鈕 */
.op-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px;
  border-radius: var(--r-pill); border: 1.5px solid transparent; font-size: var(--f-md); font-weight: 800;
  white-space: nowrap; text-decoration: none; cursor: pointer;
}
.op-btn svg { width: 18px; height: 18px; flex: none; }
.op-btn-hot { background: var(--grad-hot); color: #fff; box-shadow: var(--sh-hot); }
.op-btn-hot:hover { background: var(--c-hot-600); }
.op-btn-line { background: var(--c-surface); color: var(--c-hot); border-color: var(--c-hot); }
.op-btn-line[aria-pressed="true"] { background: var(--c-hot-050); }
.op-btn-lg { min-height: 50px; padding: 0 26px; font-size: 16px; }
.op-btn[disabled] { opacity: .45; box-shadow: none; pointer-events: none; }
.op-btn:focus-visible, .op-add:focus-visible, .op-row:focus-visible, .op-where:focus-visible, .op-svc:focus-visible { outline: 3px solid rgba(210, 51, 31, .4); outline-offset: 2px; }

/* 價格與「賺」 */
.op-price {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 4px; color: var(--c-hot);
  font-weight: 800; font-size: 18px; line-height: 1.2; font-variant-numeric: tabular-nums;
}
.op-price small { font-size: 11px; font-weight: 700; margin-right: 1px; }
.op-price em { font-style: normal; font-size: 11px; font-weight: 700; }
.op-price s { color: var(--c-ink-soft); font-size: 11px; font-weight: 400; }
.op-price-sm { font-size: 16px; }
.op-earn {
  display: inline-flex; align-items: center; justify-self: start; background: linear-gradient(90deg, var(--c-gold) 0%, var(--c-gold-2) 100%);
  color: var(--c-gold-ink); font-size: 11px; font-weight: 800; line-height: 1; padding: 5px 8px; border-radius: 6px 6px 6px 2px;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.op-pill {
  display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--c-gold); color: var(--c-gold-ink); vertical-align: 1px; white-space: nowrap;
}
.op-pill.is-plain { background: var(--c-primary-050); color: var(--c-ink-2); }
.op-tag {
  position: absolute; left: 0; top: 8px; display: inline-flex; align-items: center; gap: 2px; background: var(--c-hot); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 8px 3px 6px; border-radius: 0 var(--r-pill) var(--r-pill) 0;
}
.op-tag svg { width: 12px; height: 12px; }
.op-tag-soon { background: var(--c-ink-2); }

/* 頂列的搜尋 */
.op-search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 38px; margin: 0 4px 0 6px; padding: 0 14px;
  border-radius: var(--r-pill); background: var(--c-bg); border: 1.5px solid var(--c-hot); color: var(--c-ink-soft);
  font-size: var(--f-sm); text-decoration: none;
}
.op-search svg { width: 18px; height: 18px; flex: none; color: var(--c-hot); }
.op-search span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.op-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--c-ink); font-size: 16px; outline: none; }
.op-search:focus-within, .op-search:focus-visible { box-shadow: 0 0 0 3px rgba(210, 51, 31, .18); outline: none; }

/* 已選的商品縮圖（底部、浮動的購物車） */
.op-thumbs { display: flex; flex: none; }
.op-thumbs > span {
  width: 38px; height: 38px; border-radius: 10px; overflow: hidden; border: 2px solid var(--c-surface);
  margin-left: -14px; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); background: var(--c-surface);
}
.op-thumbs > span:first-child { margin-left: 0; }
.op-thumbs > .op-thumbs-more { display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--c-ink-2); background: var(--c-fill); }
.op-thumbs-empty { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--c-primary-050); color: var(--c-ink-soft); display: grid; place-items: center; }
.op-thumbs-empty svg { width: 22px; height: 22px; }

/* 動作列 */
.op-bar .bottom-bar-in { gap: 10px; }
.op-bar-sum { display: grid; line-height: 1.2; }
.op-bar-sum small { font-size: 11px; color: var(--c-ink-soft); }
.op-bar-sum b { font-size: 19px; font-weight: 900; color: var(--c-hot); font-variant-numeric: tabular-nums; white-space: nowrap; }
.op-barbag { position: relative; display: grid; justify-items: center; gap: 1px; flex: none; width: 44px; color: var(--c-ink-2); font-size: 11px; text-decoration: none; }
.op-barbag svg { width: 22px; height: 22px; }
.op-barbag i {
  position: absolute; top: -5px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--c-hot);
  color: #fff; font-style: normal; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.op-barbag ~ .op-btn { flex: 1; padding: 0 10px; }

/* ---------- 開團首頁 ---------- */
.op-bans-wrap { position: relative; }
.op-bans {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; border-radius: var(--r-lg); box-shadow: var(--sh-card);
}
.op-bans::-webkit-scrollbar { display: none; }
.op-ban {
  scroll-snap-align: start; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 42%; align-items: center;
  min-height: 168px; padding: 16px 0 22px 18px; color: #fff; text-decoration: none; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%), linear-gradient(135deg, var(--b1), var(--b2));
}
.op-ban::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255, 255, 255, .09); z-index: -1; }
.op-ban-text { position: relative; z-index: 1; display: grid; gap: 4px; align-content: center; min-width: 0; }
.op-ban-kicker { justify-self: start; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .24); }
.op-ban-title { font-size: 24px; font-weight: 900; line-height: 1.15; letter-spacing: .5px; }
.op-ban-sub { font-size: var(--f-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-ban-earn { justify-self: start; margin-top: 4px; background: var(--c-gold); color: var(--c-gold-ink); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px 6px 6px 2px; white-space: nowrap; }
.op-ban-earn b { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.op-ban-time { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.op-ban-time svg { width: 14px; height: 14px; }
.op-ban-imgs { position: relative; height: 140px; }
.op-ban-imgs span { position: absolute; width: 84px; height: 84px; border-radius: 16px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .25); }
.op-ban-imgs span:nth-child(1) { right: 34px; top: 4px; transform: rotate(-8deg); z-index: 3; }
.op-ban-imgs span:nth-child(2) { right: -6px; top: 46px; transform: rotate(9deg); z-index: 2; }
.op-ban-imgs span:nth-child(3) { right: 60px; top: 66px; width: 70px; height: 70px; transform: rotate(5deg); z-index: 1; }
.op-ban-n1 span:nth-child(1) { width: 112px; height: 112px; right: 16px; top: 12px; }
.op-ban-n2 span:nth-child(1) { right: 44px; }
.op-dots { position: absolute; left: 0; right: 0; bottom: 9px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.op-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .5); transition: width .2s; }
.op-dots i.on { width: 16px; background: #fff; }

.op-panel { margin-top: 12px; background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--sh-card); overflow: hidden; }
.op-cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 2px; padding: 14px 6px 10px; }
.op-cat { display: grid; justify-items: center; gap: 5px; text-decoration: none; color: var(--c-ink); font-size: var(--f-xs); white-space: nowrap; }
.op-cat-img { width: 50px; height: 50px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; }
.op-cat-img .shot { transform: scale(1.2); }
.op-cat-all { background: var(--grad-hot); color: #fff; }
.op-cat-all svg { width: 24px; height: 24px; }
.op-trust {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--c-line-2);
  background: var(--c-surface-2); font-size: 11px; color: var(--c-ink-2);
}
.op-trust span { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.op-trust span svg { width: 13px; height: 13px; color: var(--c-success); }
.op-trust button {
  margin-left: auto; display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; padding: 4px 0;
  color: var(--c-hot); font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.op-trust button svg { width: 15px; height: 15px; }

.op-mine {
  margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: center;
  background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--sh-card); padding: 10px 2px 10px 0;
}
.op-mine a { display: grid; gap: 1px; min-width: 0; padding: 0 12px; text-decoration: none; color: var(--c-ink); border-right: 1px solid var(--c-line-2); }
.op-mine small { font-size: 11px; color: var(--c-ink-soft); }
.op-mine b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.op-mine .op-mine-go { display: flex; align-items: center; gap: 2px; padding: 0 8px; border-right: 0; font-size: var(--f-xs); font-weight: 700; color: var(--c-ink-2); white-space: nowrap; }
.op-mine-go svg { width: 14px; height: 14px; }
.op-where-note { margin-top: 10px; display: flex; align-items: center; gap: 6px; font-size: var(--f-xs); color: var(--c-ink-2); }
.op-where-note svg { width: 14px; height: 14px; flex: none; color: var(--c-hot); }

.op-sh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.op-sh-t { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 800; }
.op-sh-t > svg { width: 20px; height: 20px; color: var(--c-hot); }
.op-sh-sub { font-size: var(--f-xs); color: var(--c-ink-soft); }
.op-more { display: inline-flex; align-items: center; gap: 2px; font-size: var(--f-sm); color: var(--c-ink-soft); text-decoration: none; }
.op-more svg { width: 14px; height: 14px; }

/* 本週熱銷：橫滑的排行 */
.op-rankrow {
  display: grid; grid-auto-flow: column; grid-auto-columns: 136px; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px;
  scroll-snap-type: x proximity; scroll-padding: 0 16px; scrollbar-width: none;
}
.op-rankrow::-webkit-scrollbar { display: none; }
.op-rc { scroll-snap-align: start; display: grid; align-content: start; background: var(--c-surface); border-radius: 12px; overflow: hidden; box-shadow: var(--sh-card); text-decoration: none; color: var(--c-ink); }
.op-rc-img { position: relative; aspect-ratio: 1; }
.op-rank {
  position: absolute; left: 8px; top: 0; padding: 6px 6px 9px; font-size: 11px; font-weight: 900; line-height: 1; letter-spacing: .3px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); background: var(--c-primary); color: #fff;
}
.op-rank-1 { background: var(--c-gold); color: var(--c-gold-ink); }
.op-rank-2 { background: #DADDE3; color: #2E3138; }
.op-rank-3 { background: #EDB48C; color: #4A2200; }
.op-rc-body { padding: 8px 10px 10px; display: grid; gap: 4px; }
.op-rc-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 排序（黏在頂列下面） */
.op-sticky { position: sticky; top: calc(var(--appbar-h) + env(safe-area-inset-top)); z-index: 6; margin: 0 -16px 8px; padding: 0 16px; background: var(--c-bg); }
.op-sorts { display: flex; border-bottom: 1px solid var(--c-line); }
.op-sorts button { position: relative; flex: 1; border: 0; background: none; padding: 10px 0; font-size: var(--f-sm); color: var(--c-ink-2); cursor: pointer; }
.op-sorts button[aria-pressed="true"] { color: var(--c-hot); font-weight: 800; }
.op-sorts button[aria-pressed="true"]::after { content: ""; position: absolute; left: 28%; right: 28%; bottom: -1px; height: 3px; border-radius: 2px; background: var(--c-hot); }

/* 商品卡：兩欄的格子 */
.op-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.op-pc { position: relative; background: var(--c-surface); border-radius: 12px; overflow: hidden; box-shadow: var(--sh-card); transition: box-shadow .2s, transform .14s var(--ease-out); }
.op-pc:active { transform: scale(.985); }
.op-pc.is-on { box-shadow: 0 0 0 2px var(--c-hot), var(--sh-card); }
.op-pc-link { display: block; text-decoration: none; color: var(--c-ink); }
.op-pc-img { position: relative; aspect-ratio: 1; overflow: hidden; }
.op-pc-img .op-earn { position: absolute; left: 6px; bottom: 6px; box-shadow: 0 2px 6px rgba(90, 51, 0, .2); }
.op-pc.is-soon .op-pc-img .shot { filter: grayscale(.5); }
.op-pc-body { padding: 8px 10px 10px; display: grid; gap: 4px; }
.op-pc-name { font-size: 13px; line-height: 1.4; min-height: 2.8em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-pc-meta { font-size: 11px; color: var(--c-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-add {
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--c-hot); color: #fff;
  display: grid; place-items: center; box-shadow: 0 4px 10px rgba(210, 51, 31, .35); cursor: pointer;
}
.op-add::before { content: ""; position: absolute; inset: -6px; }
.op-add svg { width: 18px; height: 18px; }
.op-add[aria-pressed="true"] { background: #fff; color: var(--c-hot); box-shadow: 0 0 0 2px var(--c-hot), 0 4px 10px rgba(0, 0, 0, .12); }
.op-add.pop { animation: op-pop .32s var(--ease-out); }
@keyframes op-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* 浮在底部分頁上面的「已選」 */
.has-tabbar .view.op-has-float { padding-bottom: calc(var(--tabbar-h) + 100px + env(safe-area-inset-bottom)); }
.op-float {
  position: fixed; z-index: 25; left: 50%; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: calc(min(100vw, var(--content-max)) - 24px); display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px;
  border-radius: 16px; background: var(--c-ink); color: #fff; text-decoration: none; box-shadow: var(--sh-3); animation: op-float-in .3s var(--ease-out);
}
.op-float .op-thumbs > span { border-color: var(--c-ink); width: 34px; height: 34px; }
.op-float-t { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.op-float-t b { font-size: var(--f-sm); }
.op-float-t small { font-size: 11px; color: rgba(255, 255, 255, .78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-float-go { display: inline-flex; align-items: center; gap: 2px; padding: 9px 10px 9px 14px; border-radius: 12px; background: var(--grad-hot); font-size: var(--f-sm); font-weight: 800; white-space: nowrap; }
.op-float-go svg { width: 16px; height: 16px; }
@keyframes op-float-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 全部商品・搜尋 ---------- */
.op-filter { position: sticky; top: calc(var(--appbar-h) + env(safe-area-inset-top)); z-index: 6; margin: -12px -16px 8px; padding: 10px 16px 0; background: var(--c-bg); }
.op-filter .chips { padding-bottom: 6px; }
.op-count { margin: 2px 0 8px; font-size: var(--f-xs); color: var(--c-ink-soft); }

/* ---------- 檔期頁 ---------- */
.op-ban-lg { border-radius: var(--r-lg); min-height: 186px; box-shadow: var(--sh-card); }
.op-ban-lg .op-ban-title { font-size: 26px; }
.op-cdcard { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--c-ink); color: #fff; }
.op-cdcard-t { display: inline-flex; align-items: center; gap: 6px; font-size: var(--f-sm); font-weight: 800; white-space: nowrap; }
.op-cdcard-t svg { width: 18px; height: 18px; color: var(--c-gold); }
.op-cd { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.op-cd b { min-width: 28px; padding: 4px 5px; border-radius: 6px; background: var(--c-hot); color: #fff; font-size: 15px; font-weight: 900; text-align: center; }
.op-cd span { font-size: 12px; margin: 0 4px 0 1px; }
.op-cd i { font-style: normal; font-weight: 900; color: rgba(255, 255, 255, .75); }
.op-kfacts { margin-top: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 0; background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--sh-card); }
.op-kfacts div { display: grid; gap: 2px; justify-items: center; min-width: 0; padding: 0 6px; text-align: center; border-right: 1px solid var(--c-line-2); }
.op-kfacts div:last-child { border-right: 0; }
.op-kfacts small { font-size: 11px; color: var(--c-ink-soft); }
.op-kfacts b { font-size: var(--f-sm); font-weight: 800; white-space: nowrap; }
.op-vnote { display: flex; align-items: flex-start; gap: 10px; }
.op-vmark { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--c-hot); color: #fff; display: grid; place-items: center; font-weight: 800; }
.op-vnote > div { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 4px 16px 16px 16px; background: var(--c-surface); box-shadow: var(--sh-card); }
.op-vnote-name { margin-bottom: 2px; font-size: 11px; color: var(--c-ink-soft); }
.op-vnote-text { font-size: var(--f-sm); line-height: 1.6; }
.op-avs { display: inline-flex; margin-right: 4px; }
.op-avs span { width: 24px; height: 24px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--c-bg); background: var(--c-ink-2); color: #fff; font-size: 11px; display: grid; place-items: center; }
.op-avs span:first-child { margin-left: 0; }
.op-assure { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--c-success-050); color: var(--c-success); font-size: var(--f-xs); line-height: 1.6; }
.op-assure svg { width: 20px; height: 20px; flex: none; }

/* ---------- 商品頁 ---------- */
.op-pdp { margin-top: -12px; }
.op-gal { position: relative; margin: 0 -16px; background: var(--c-surface); }
.op-gal-track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.op-gal-track::-webkit-scrollbar { display: none; }
.op-gal-track:focus-visible { outline: 3px solid rgba(210, 51, 31, .5); outline-offset: -3px; }
.op-gal-slide { scroll-snap-align: start; aspect-ratio: 1 / .88; overflow: hidden; }
.op-gal-n { position: absolute; right: 12px; bottom: 12px; padding: 3px 10px; border-radius: var(--r-pill); background: rgba(22, 24, 29, .62); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.op-gal-tag { top: 12px; }

.op-band { margin: 0 -16px; display: flex; align-items: stretch; background: var(--grad-hot); color: #fff; }
.op-band-l { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 10px 12px 12px 16px; }
.op-band-k { font-size: 12px; font-weight: 700; }
.op-band-p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
.op-band-p b { font-size: 30px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.op-band-p b small { font-size: 15px; margin-right: 1px; }
.op-band-p em { font-style: normal; font-size: 13px; font-weight: 700; }
.op-band-p s { font-size: 13px; }
.op-off { align-self: center; padding: 1px 6px; border-radius: 4px; background: #fff; color: var(--c-hot); font-size: 12px; font-weight: 800; }
.op-band-r {
  flex: none; display: grid; align-content: center; justify-items: end; padding: 8px 16px 8px 22px; color: var(--c-gold-ink);
  background: linear-gradient(135deg, var(--c-gold), var(--c-gold-2)); clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
}
.op-band-r span, .op-band-r small { font-size: 11px; font-weight: 700; }
.op-band-r b { font-size: 18px; font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; }

.op-info { margin: 0 -16px; display: grid; gap: 8px; padding: 12px 16px; background: var(--c-surface); }
.op-info h1 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.45; }
.op-info-stats { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: var(--f-xs); color: var(--c-ink-soft); }
.op-info-stats span + span { margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--c-line); }
.op-info-stats b { color: var(--c-ink); }
.op-info-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.op-info-tags a { padding: 2px 10px; border-radius: var(--r-pill); background: var(--c-hot-050); color: var(--c-hot); font-size: 12px; font-weight: 700; text-decoration: none; }
.op-svc {
  display: flex; align-items: center; gap: 10px; width: calc(100% + 32px); margin: 8px -16px 0; padding: 12px 16px;
  border: 0; background: var(--c-surface); font-size: var(--f-xs); color: var(--c-ink-2); text-align: left; cursor: pointer;
}
.op-svc > svg:first-child { width: 18px; height: 18px; flex: none; color: var(--c-success); }
.op-svc span { white-space: nowrap; }
.op-svc .op-chev { margin-left: auto; }

.op-block { margin: 8px -16px 0; padding: 14px 16px; background: var(--c-surface); }
.op-block-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.op-block-h b { font-size: var(--f-md); font-weight: 800; }
.op-block-h span { font-size: var(--f-xs); color: var(--c-ink-soft); }
.op-tiers { display: flex; align-items: stretch; gap: 4px; }
.op-tier {
  flex: 1; min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 12px; border: 1.5px solid var(--c-line);
  background: var(--c-surface-2); text-align: center; transition: border-color .2s, background .2s;
}
.op-tier b { font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.op-tier span { font-size: 12px; color: var(--c-ink-2); }
.op-tier small { font-size: 11px; color: var(--c-ink-soft); }
.op-tier.is-on { border-color: var(--c-hot); background: var(--c-hot-050); box-shadow: 0 0 0 3px rgba(210, 51, 31, .1); }
.op-tier.is-on b { color: var(--c-hot); }
.op-tier.is-on small { color: var(--c-ink-2); }
.op-tier-arrow { align-self: center; color: var(--c-ink-soft); }
.op-tier-arrow svg { width: 14px; height: 14px; display: block; }

.op-calc-big { display: grid; gap: 2px; margin-bottom: 8px; }
.op-calc-big label { font-size: var(--f-sm); color: var(--c-ink-2); }
.op-calc-big output { font-weight: 800; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.op-calc-big b { font-size: 36px; font-weight: 900; line-height: 1.1; color: var(--c-hot); font-variant-numeric: tabular-nums; }
.op-range { --p: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 30px; margin: 0; background: transparent; cursor: pointer; }
.op-range:focus { outline: none; }
.op-range::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--c-hot) var(--p), var(--c-line) var(--p)); }
.op-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--c-hot); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.op-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(210, 51, 31, .25); }
.op-range::-moz-range-track { height: 8px; border-radius: 4px; background: var(--c-line); }
.op-range::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--c-hot); }
.op-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--c-hot); }
.op-range-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--c-ink-soft); }
.op-calc-rows { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: var(--f-xs); color: var(--c-ink-2); }
.op-calc-rows b { color: var(--c-ink); }
.op-calc-next { flex-basis: 100%; display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 10px; background: var(--c-hot-050); color: var(--c-hot); font-weight: 700; }
.op-calc-next svg { width: 15px; height: 15px; flex: none; }
.op-calc-bulk { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--c-line-2); font-size: var(--f-sm); font-weight: 700; cursor: pointer; }
.op-calc-bulk .grow { flex: 1; min-width: 0; }
.op-calc-bulk small { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; color: var(--c-ink-soft); }

.op-switch { position: relative; flex: none; display: inline-block; width: 46px; height: 28px; }
.op-switch input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.op-switch-ui { position: absolute; inset: 0; border-radius: 14px; background: var(--c-fill-600); transition: background .2s; }
.op-switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease-out); }
.op-switch input:checked + .op-switch-ui { background: var(--c-hot); }
.op-switch input:checked + .op-switch-ui::after { transform: translateX(18px); }
.op-switch input:focus-visible + .op-switch-ui { box-shadow: 0 0 0 3px rgba(210, 51, 31, .3); }

.op-specs { display: flex; flex-wrap: wrap; gap: 8px; }
.op-specs span { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 10px; border: 1px dashed var(--c-fill-600); background: var(--c-surface-2); font-size: var(--f-sm); }
.op-specs svg { width: 14px; height: 14px; color: var(--c-ink-soft); }
.op-specs small { margin-left: 2px; font-size: 11px; color: var(--c-ink-soft); }
.op-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.op-points li { display: flex; gap: 8px; font-size: var(--f-sm); line-height: 1.55; }
.op-points li > svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--c-success); }
.op-points b { display: block; }
.op-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.op-fact { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; min-width: 0; }
.op-fact svg { grid-row: span 2; width: 20px; height: 20px; color: var(--c-ink-soft); }
.op-fact span { font-size: 11px; color: var(--c-ink-soft); }
.op-fact b { font-size: var(--f-sm); }

/* ---------- 確認開團（結帳頁） ---------- */
.op-co { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.op-card { background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--sh-card); }
.op-co > section.op-card { padding: 4px 14px 6px; }
.op-co-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 0 6px; }
.op-co-h b { min-width: 0; font-size: var(--f-md); font-weight: 800; }
.op-co-h span { font-size: 11px; color: var(--c-ink-soft); white-space: nowrap; }
.op-co-h a { display: inline-flex; align-items: center; gap: 2px; font-size: var(--f-sm); font-weight: 700; color: var(--c-hot); text-decoration: none; white-space: nowrap; }
.op-co-h a svg { width: 15px; height: 15px; }
.op-where { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.op-where-b { flex: 1; min-width: 0; display: grid; gap: 1px; }
.op-where-b small { font-size: 11px; color: var(--c-ink-soft); }
.op-where-b b { font-size: var(--f-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-where-b span { font-size: var(--f-xs); color: var(--c-ink-2); }
.op-where-ch { display: inline-flex; align-items: center; gap: 2px; font-size: var(--f-xs); color: var(--c-ink-soft); white-space: nowrap; }
.op-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--c-line-2); }
.op-item:first-child { border-top: 0; }
.op-item-img { display: block; width: 64px; height: 64px; flex: none; border-radius: 12px; overflow: hidden; }
.op-item-b { flex: 1; min-width: 0; display: grid; gap: 3px; }
.op-item-n { font-size: var(--f-sm); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-item.is-off .op-item-img, .op-item.is-off .op-item-b { opacity: .4; }
.op-x { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--c-primary-050); color: var(--c-ink-2); cursor: pointer; }
.op-x svg { width: 16px; height: 16px; }
.op-row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 10px 0; border: 0; border-top: 1px solid var(--c-line-2);
  background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.op-row:disabled { cursor: default; color: inherit; }
.op-row-k { flex: none; width: 52px; font-size: var(--f-sm); color: var(--c-ink-soft); }
.op-row-v { flex: 1; min-width: 0; font-size: var(--f-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-miss { color: var(--c-danger); font-weight: 700; }
.op-co-pv { padding-bottom: 14px !important; }
.op-co-foot { display: flex; align-items: flex-start; gap: 8px; margin: 2px 4px; font-size: 11px; color: var(--c-ink-soft); line-height: 1.6; }
.op-co-foot svg { width: 16px; height: 16px; flex: none; color: var(--c-success); }

/* 底部抽屜裡的選項 */
.op-circles, .op-ships { display: grid; gap: 8px; }
.op-circle, .op-ship { display: flex; gap: 12px; padding: 12px; border-radius: var(--r-md); border: 1.5px solid var(--c-line); background: var(--c-surface); cursor: pointer; }
.op-circle { align-items: center; }
.op-ship { align-items: flex-start; padding: 14px; }
.op-circle-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.op-circle-body b { font-size: var(--f-sm); }
.op-circle-body span { font-size: var(--f-xs); color: var(--c-ink-soft); }
.op-check { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--c-fill-600); color: transparent; }
.op-check svg { width: 14px; height: 14px; }
.op-circle:has(input:checked), .op-ship:has(input:checked) { border-color: var(--c-hot); background: var(--c-hot-050); }
.op-circle:has(input:checked) .op-check, .op-ship:has(input:checked) .op-check { background: var(--c-hot); border-color: var(--c-hot); color: #fff; }
.op-circle:has(input:checked) .op-circle-body span { color: var(--c-ink-2); }
.op-circle:has(input:focus-visible), .op-ship:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(210, 51, 31, .25); }
.op-ship-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--c-primary-050); }
.op-ship-ic svg { width: 22px; height: 22px; }
.op-ship-body { flex: 1; min-width: 0; }
.op-ship-body b { font-size: var(--f-md); }
.op-ship-body p { margin: 4px 0 8px; font-size: var(--f-xs); color: var(--c-ink-2); line-height: 1.6; }
.op-ship-body .op-pill { margin-left: 0; }
.op-bulk { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--c-line); background: var(--c-surface-2); }
.op-bulk[hidden] { display: none; }
.op-bulk-title { display: flex; align-items: center; gap: 6px; font-size: var(--f-sm); font-weight: 700; }
.op-bulk-title svg { width: 16px; height: 16px; color: var(--c-hot); }
.op-bulk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.op-input:focus { border-color: var(--c-hot); box-shadow: 0 0 0 3px rgba(210, 51, 31, .15); }
.op-input-wrap { position: relative; }
.op-input-wrap .op-input { padding-right: 56px; }
.op-counter { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--c-ink-soft); }
.sheet-body .hint { font-size: var(--f-xs); color: var(--c-ink-soft); }
.op-notes { display: flex; flex-wrap: wrap; gap: 6px; }
.op-notes button { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: var(--r-pill); border: 1.5px solid var(--c-line); background: var(--c-surface); font-size: var(--f-sm); cursor: pointer; }
.op-notes button svg { width: 14px; height: 14px; color: var(--c-gold-2); }
.op-notes button[aria-pressed="true"] { border-color: var(--c-hot); background: var(--c-hot-050); color: var(--c-hot); font-weight: 700; }
.op-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.op-quick button { display: grid; justify-items: center; gap: 1px; padding: 8px 2px; border-radius: 12px; border: 1.5px solid var(--c-line); background: var(--c-surface); font-size: var(--f-sm); font-weight: 700; cursor: pointer; }
.op-quick small { font-size: 11px; font-weight: 400; color: var(--c-ink-soft); }
.op-quick button[aria-pressed="true"] { border-color: var(--c-hot); background: var(--c-hot-050); color: var(--c-hot); }
.op-quick button[aria-pressed="true"] small { color: var(--c-ink-2); }
.op-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: st; }
.op-steps li { display: flex; align-items: flex-start; gap: 12px; font-size: var(--f-sm); color: var(--c-ink-2); line-height: 1.6; counter-increment: st; }
.op-steps b { display: block; font-size: var(--f-md); color: var(--c-ink); }
.op-steps-ic { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--c-hot-050); color: var(--c-hot); }
.op-steps-ic svg { width: 22px; height: 22px; }
.op-steps-ic::after {
  content: counter(st); position: absolute; right: -4px; top: -4px; width: 18px; height: 18px; display: grid; place-items: center;
  border-radius: 50%; background: var(--c-hot); color: #fff; font-size: 11px; font-weight: 800;
}
.op-steps-note { display: flex; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--c-success-050); color: var(--c-success); font-size: var(--f-xs); line-height: 1.6; }
.op-steps-note svg { width: 18px; height: 18px; flex: none; }

/* ---------- LINE 群組裡看到的樣子 ---------- */
.op-chat { border-radius: var(--r-lg); background: var(--c-chat); overflow: hidden; }
.op-chat-top { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: rgba(255, 255, 255, .35); font-size: var(--f-xs); font-weight: 700; color: #1F2A3D; }
.op-chat-top svg { width: 16px; height: 16px; }
.op-msg { display: flex; align-items: flex-end; gap: 8px; padding: 12px; }
.op-msg-av { width: 34px; height: 34px; flex: none; align-self: flex-start; display: grid; place-items: center; border-radius: 50%; background: var(--c-hot); color: #fff; font-weight: 800; }
.op-msg-main { flex: 1; min-width: 0; max-width: 250px; display: grid; gap: 6px; }
.op-msg-name { font-size: 11px; color: #1F2A3D; }
.op-msg-time { font-size: 11px; color: #1F2A3D; white-space: nowrap; }
.op-bubble { padding: 8px 12px; border-radius: 4px 16px 16px 16px; background: #fff; font-size: var(--f-sm); line-height: 1.55; word-break: break-word; }
.op-flex { border-radius: 16px; overflow: hidden; background: #fff; }
.op-flex-cover { position: relative; aspect-ratio: 1.6; overflow: hidden; }
.op-flex-cover span { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: var(--r-pill); background: rgba(22, 24, 29, .7); color: #fff; font-size: 11px; font-weight: 700; }
.op-flex-body { display: grid; gap: 4px; padding: 10px 12px 12px; }
.op-flex-body b { font-size: var(--f-sm); line-height: 1.4; }
.op-flex-price { color: var(--c-hot); font-size: var(--f-md); font-weight: 900; }
.op-flex-price span { font-size: 11px; font-weight: 400; color: var(--c-ink-soft); }
.op-flex-meta { font-size: 11px; color: var(--c-ink-soft); }
.op-flex-btn { display: block; margin-top: 6px; padding: 8px; border-radius: 10px; background: var(--grad-hot); color: #fff; font-size: var(--f-sm); font-weight: 800; text-align: center; }

/* ---------- 開團成功 ---------- */
.op-share { margin-top: -12px; }
.op-done {
  position: relative; margin: 0 -16px; padding: 26px 24px 40px; text-align: center; color: #fff; overflow: hidden; isolation: isolate;
  background: radial-gradient(80% 70% at 50% 0%, rgba(255, 255, 255, .16), transparent 60%), var(--grad-hot);
}
.op-done-paper { position: relative; display: grid; place-items: center; width: 120px; height: 120px; margin: 0 auto 12px; border-radius: 50%; background: #FBF8F3; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
.op-done-seal { width: 78px; height: 78px; display: block; transform: rotate(-6deg); animation: op-stamp .6s cubic-bezier(.3, 1.4, .5, 1) .1s both; }
@keyframes op-stamp { 0% { opacity: 0; transform: scale(2.2) rotate(-20deg); } 60% { opacity: 1; transform: scale(.92) rotate(-4deg); } 100% { transform: scale(1) rotate(-6deg); } }
.op-done h1 { margin: 0 0 6px; font-size: 26px; font-weight: 900; }
.op-done p { margin: 0; font-size: var(--f-sm); line-height: 1.7; }
.op-confetti { position: absolute; left: 50%; top: 86px; z-index: -1; }
.op-confetti i { position: absolute; width: 8px; height: 12px; border-radius: 2px; background: var(--c); opacity: 0; animation: op-burst 1.1s var(--ease-out) both; animation-delay: calc(.35s + var(--d)); }
@keyframes op-burst { 0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.6); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); } }
.op-share-card { position: relative; display: grid; gap: 10px; margin-top: -20px; padding: 16px; }
.op-share-main { width: 100%; }
.op-share-hint { margin: 0; font-size: 11px; color: var(--c-ink-soft); text-align: center; }
.op-share-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.op-share-row a, .op-share-row button {
  display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--c-line);
  background: var(--c-surface-2); color: var(--c-ink); font-size: var(--f-xs); font-weight: 600; text-decoration: none; cursor: pointer;
}
.op-share-row svg { width: 20px; height: 20px; color: var(--c-ink-2); }
.op-next { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; }
.op-next li { position: relative; padding: 0 0 16px 26px; font-size: var(--f-xs); color: var(--c-ink-soft); line-height: 1.6; }
.op-next li b { display: block; font-size: var(--f-sm); color: var(--c-ink); }
.op-next li::before { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--c-fill-600); background: var(--c-bg); }
.op-next li::after { content: ""; position: absolute; left: 7px; top: 19px; bottom: 0; width: 2px; background: var(--c-line); }
.op-next li:last-child::after { display: none; }
.op-next li.done::before { background: var(--c-success); border-color: var(--c-success); }
.op-next li.now::before { background: var(--c-hot); border-color: var(--c-hot); box-shadow: 0 0 0 4px rgba(210, 51, 31, .18); }
.op-again { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 8px; padding: 12px; color: var(--c-hot); font-size: var(--f-sm); font-weight: 700; text-decoration: none; }
.op-again svg { width: 16px; height: 16px; }

/* ---------- 減少動態、窄手機 ---------- */
@media (prefers-reduced-motion: reduce) {
  .op-rise > *, .op-add.pop, .op-float, .op-done-seal, .op-confetti i { animation: none !important; }
  .op-confetti { display: none; }
  .op-press, .op-pc, .op-tier, .op-switch-ui, .op-switch-ui::after, .op-dots i { transition: none; }
  .op-press:active, .op-pc:active { transform: none; }
  .op-bans, .op-gal-track { scroll-behavior: auto; }
}
@media (max-width: 360px) {
  .op-trust span:nth-child(3) { display: none; }
  .op-ban { grid-template-columns: minmax(0, 1fr) 38%; padding-left: 14px; }
  .op-ban-imgs { transform: scale(.82); transform-origin: right center; }
  .op-ban-title { font-size: 21px; }
  .op-mine a { padding: 0 8px; }
  .op-mine b { font-size: 14px; }
  .op-band-p b { font-size: 26px; }
}
