/* =========================================================
   一番番賞模擬器 v4 — 「夜祭籤屋」
   深藍夜空 + 燈籠散景（GPT 生成背景）+ 朱紅籤紙 + 金色
   效能：動畫只動 transform / opacity / clip-path；無 backdrop-filter
   ========================================================= */
:root {
  --edge: 16px;
  --night: #0e0b20;
  --panel: rgba(28, 21, 48, .86);
  --panel2: rgba(255, 255, 255, .06);
  --line: rgba(255, 214, 140, .22);
  --text: #f6ecd8;
  --text2: #bdb0a0;
  --ink: #2b1d14;
  --shu: #d4402b;
  --shu2: #9e2818;
  --gold: #e6b65a;
  --gold2: #ffd98a;
  --shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .05) inset;
  --font: "Zen Maru Gothic", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}
@media (pointer: coarse) { :root { --edge: 30px; } }

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: var(--night); color: var(--text); font-family: var(--font);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; overscroll-behavior: none; -webkit-text-size-adjust: 100%;
}
img { -webkit-user-drag: none; pointer-events: none; display: block; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
a { color: inherit; }
.hidden { display: none !important; }

/* ---------- 圖層 ---------- */
#app { position: fixed; inset: 0; overflow: hidden; }
#bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(10, 8, 28, .55) 0%, rgba(10, 8, 28, .25) 40%, rgba(20, 8, 24, .72) 100%),
    url("../assets/tex/bg_night.webp") center 30% / cover no-repeat, var(--night);
}
#bg::after {
  /* 很淡的青海波紋，讓背景有和風質感 */
  content: ""; position: absolute; inset: 0; opacity: .07;
  background:
    radial-gradient(circle at 50% 100%, transparent 38%, #ffd98a 39%, #ffd98a 42%, transparent 43%, transparent 55%, #ffd98a 56%, #ffd98a 59%, transparent 60%) 0 0 / 40px 20px,
    radial-gradient(circle at 50% 100%, transparent 38%, #ffd98a 39%, #ffd98a 42%, transparent 43%, transparent 55%, #ffd98a 56%, #ffd98a 59%, transparent 60%) 20px 10px / 40px 20px;
  -webkit-mask-image: linear-gradient(transparent, #000 60%); mask-image: linear-gradient(transparent, #000 60%);
}
#view {
  position: absolute; inset: 0; z-index: 2; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top) + 8px) calc(var(--edge) + env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 18px) calc(var(--edge) + env(safe-area-inset-left));
}
#stageBg { position: absolute; inset: 0; z-index: 5; background: radial-gradient(120% 80% at 50% 35%, rgba(40, 26, 70, .9), rgba(6, 4, 16, .96)); opacity: 0; pointer-events: none; transition: opacity .3s, background .6s; }
#stageBg.show { opacity: 1; pointer-events: auto; }
#stageBg.dim { background: radial-gradient(90% 60% at 50% 35%, rgba(30, 14, 50, .96), rgba(0, 0, 0, .99)); }
#rays { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
#stage {
  position: absolute; inset: 0; z-index: 7; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .2s;
  padding: calc(env(safe-area-inset-top) + 16px) calc(var(--edge) + env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 16px) calc(var(--edge) + env(safe-area-inset-left));
}
#stage.show { opacity: 1; pointer-events: auto; }
#stage.shake .stWrap { animation: shake .5s; }
#flash { position: absolute; inset: 0; z-index: 8; background: #fff8e0; opacity: 0; pointer-events: none; }
#flash.go { animation: flash .6s ease-out; }
#modal {
  position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; background: rgba(4, 3, 12, .7);
  padding: calc(env(safe-area-inset-top) + 16px) calc(var(--edge) + 4px) calc(env(safe-area-inset-bottom) + 16px);
}
#fx { position: absolute; inset: 0; z-index: 12; width: 100%; height: 100%; pointer-events: none; }
.edge { display: none; position: fixed; top: 0; bottom: 0; width: 26px; z-index: 999; touch-action: none; }
.edgeL { left: 0; } .edgeR { right: 0; }
@media (pointer: coarse) { .edge { display: block; } }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
@keyframes shake { 0%, 100% { transform: none; } 15% { transform: translate(-7px, 3px); } 35% { transform: translate(7px, -3px); } 55% { transform: translate(-4px, 2px); } 75% { transform: translate(2px, -1px); } }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes stamp { 0% { transform: scale(2.2); opacity: 0; } 55% { transform: scale(.9); opacity: 1; } 100% { transform: none; } }

.wrap { max-width: 520px; margin: 0 auto; position: relative; }

/* ---------- 共用元件 ---------- */
.coin {
  display: inline-block; width: 1em; height: 1em; border-radius: 50%; vertical-align: -.14em; margin-right: .2em;
  background: radial-gradient(circle at 35% 30%, #fff6c4, #e9b947 55%, #b07d1c); box-shadow: inset 0 0 0 .08em #9a6b14;
}
.bigBtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 100%; min-height: 64px; padding: 10px 20px; border-radius: 999px;
  background: linear-gradient(#e85a40, var(--shu) 55%, #b8311e); color: #fff8ec;
  box-shadow: inset 0 0 0 2px rgba(255, 217, 138, .6), inset 0 2px 0 rgba(255, 255, 255, .25), 0 5px 0 var(--shu2), 0 10px 28px rgba(212, 64, 43, .45);
  font-size: 22px; font-weight: 900; letter-spacing: 3px; transition: transform .08s, box-shadow .08s;
}
.bigBtn small { font-size: 12px; font-weight: 700; letter-spacing: 1px; opacity: .9; }
.bigBtn:active:not(:disabled) { transform: translateY(4px); box-shadow: inset 0 0 0 2px rgba(255, 217, 138, .6), 0 1px 0 var(--shu2), 0 4px 12px rgba(212, 64, 43, .3); }
.bigBtn.sm { min-height: 54px; font-size: 18px; letter-spacing: 2px; }
.darkBtn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); color: var(--text); font-weight: 900; font-size: 17px; letter-spacing: 2px;
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.darkBtn:active { background: rgba(255, 255, 255, .14); }
.ghostBtn {
  display: block; width: 100%; max-width: 320px; padding: 12px 16px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--line); color: var(--text); font-weight: 700; font-size: 15px; letter-spacing: 1px; background: rgba(255, 255, 255, .04);
}
.ghostBtn:active { background: rgba(255, 255, 255, .12); }
.pill { padding: 8px 15px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px; white-space: nowrap; }
.pill.gold { background: linear-gradient(#ffe39a, #d9a640); color: #3a250a; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), 0 3px 0 #8f6418, 0 6px 16px rgba(230, 182, 90, .35); font-weight: 900; }
.pill.dark { background: var(--gold2); color: var(--ink); font-weight: 900; }
.pill:active { transform: translateY(2px); }
.moreLink {
  display: inline-flex; align-items: center; padding: 10px 20px; border-radius: 999px; text-decoration: none;
  color: var(--gold2); font-weight: 700; font-size: 14px; letter-spacing: 1px; box-shadow: inset 0 0 0 1.5px var(--line); background: rgba(0, 0, 0, .25);
}
.tierTag {
  position: absolute; left: 8px; top: 8px; z-index: 3; padding: 3px 10px; border-radius: 999px; background: var(--tc); color: #fff;
  font-weight: 900; font-size: 13px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .3);
}
.bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--c1, var(--gold)), var(--gold2)); box-shadow: 0 0 8px var(--c1, var(--gold)); }

/* ---------- 上方列 ---------- */
.top {
  position: sticky; top: calc(-8px - env(safe-area-inset-top)); z-index: 5; display: flex; align-items: center; gap: 8px;
  margin: calc(-8px - env(safe-area-inset-top)) calc(-1 * var(--edge)) 0;
  padding: calc(12px + env(safe-area-inset-top)) var(--edge) 14px;
  background: linear-gradient(rgba(12, 9, 28, .95) 70%, rgba(12, 9, 28, 0));
}
.tbBtn { height: 40px; padding: 0 14px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 15px; }
.tbBtn.icon { width: 40px; padding: 0; display: flex; align-items: center; justify-content: center; }
.pauseIco { width: 12px; height: 13px; border-left: 4px solid var(--gold2); border-right: 4px solid var(--gold2); }
.tbLogo { font-weight: 900; font-size: 14px; color: var(--shu); white-space: nowrap; text-shadow: 0 0 10px rgba(212, 64, 43, .5); }
.tbLogo b { color: var(--gold2); font-size: 19px; margin-left: 3px; }
.coins { margin-left: auto; display: flex; align-items: center; height: 40px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-weight: 900; }
.coins b { min-width: 50px; text-align: right; font-size: 16px; margin-right: 6px; color: var(--gold2); }
.coins .plus { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .1); font-weight: 900; color: var(--gold2); }

/* =========================================================
   籤紙元件（GPT 生成的封面 / 內頁 / 紙背 + 胡桃木托盤）
   --p 0~1   --d = 摺線位置   --fw = 捲起來那片的寬度
   ========================================================= */
.tk { position: relative; width: 100%; aspect-ratio: 1.75; font-size: 7px; }
.tk.big { font-size: clamp(14px, 4.8vw, 18px); touch-action: none; cursor: grab; }
.tk.big.grab { cursor: grabbing; }
.tray {
  position: absolute; inset: 0; border-radius: .9em;
  background: linear-gradient(160deg, rgba(255, 220, 180, .14), rgba(0, 0, 0, .22)), url("../assets/tex/wood.webp") center / 30em auto, #55351f;
  box-shadow: inset 0 0 0 .14em #2e1a0e, inset 0 0 0 .26em rgba(230, 182, 90, .6), inset 0 .3em .5em rgba(255, 255, 255, .1), 0 .4em 1em rgba(0, 0, 0, .45);
}
.ring {
  position: absolute; left: 3%; top: 50%; width: 8.5%; height: 58%; transform: translateY(-50%);
  background: url("../assets/tex/ring.png") center / contain no-repeat; filter: drop-shadow(0 .1em .12em rgba(0, 0, 0, .45));
}
.tno { display: none; position: absolute; right: 3.2%; top: 2.5%; font-size: .6em; font-weight: 900; color: rgba(255, 217, 138, .75); letter-spacing: .05em; }
.paper { position: absolute; left: 15%; right: 5%; top: 9%; bottom: 9%; --d: calc(var(--p) * .8); --fw: min(var(--d), .22); }
.inner {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 .06em .1em rgba(0, 0, 0, .35));
}
.tierTxt { font-weight: 900; font-size: 2.5em; line-height: 1; color: var(--tc); letter-spacing: .02em; display: flex; align-items: baseline; margin-left: .4em; transition: opacity .25s; }
.tierTxt small { font-size: .62em; color: var(--ink); margin-left: .06em; }
.cover {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  clip-path: inset(0 0 0 calc(var(--d) * 100%));
  background: url("../assets/tex/ticket_front.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 .06em .12em rgba(0, 0, 0, .4));
}
.tkNum { position: absolute; right: 8.5%; bottom: 13.5%; font-size: .62em; font-weight: 900; color: #6b2a10; letter-spacing: .08em; }
.innerImg { position: absolute; inset: 0; background: center / 100% 100% no-repeat; }
.seal { font-weight: 900; font-size: 1.25em; color: #ffe39a; text-shadow: 0 .04em 0 #7a4a08, 0 0 .4em rgba(255, 200, 80, .5); margin-left: .1em; }
.flap {
  position: absolute; top: -.08em; bottom: -.08em; left: calc(var(--d) * 100%); width: calc(var(--fw) * 100%);
  opacity: calc(var(--d) * 40);
  border-radius: 0 1.3em 1.3em 0 / 0 50% 50% 0;
  background:
    linear-gradient(90deg, rgba(110, 45, 20, .5) 0%, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, .4) 48%, rgba(255, 255, 255, 0) 72%, rgba(110, 45, 20, .4) 100%),
    url("../assets/tex/back.webp") center / 14em auto, #f2cdb9;
  box-shadow: -.25em 0 .45em -.1em rgba(40, 15, 0, .35), .3em .05em .5em rgba(40, 15, 0, .35), inset -.12em 0 .2em rgba(255, 255, 255, .5);
}
.tab {
  position: absolute; top: 50%; left: calc(var(--d) * 100%); width: 1.6em; height: 1.6em; margin: -.8em 0 0 -1em;
  background: url("../assets/tex/tab.png") center / contain no-repeat; filter: drop-shadow(0 .12em .18em rgba(0, 0, 0, .45));
  transition: opacity .2s;
}
.tab span { display: none; }
.tk.big .tab { animation: tabNudge 1.6s ease-in-out infinite; }
.tk.big.grab .tab, .tk.big.charge .tab { animation: none; }
@keyframes tabNudge { 0%, 70%, 100% { translate: 0 0; } 80% { translate: .35em 0; } 90% { translate: 0 0; } }
.tk.mini .tab { opacity: 0; }
.tk.mini.peeling .tab { opacity: 1; }
.tk.opened .tab { opacity: 0; animation: none; }

/* 蓄力：顫動 + 預兆 */
.tk.charge .paper { animation: tremble .07s linear infinite alternate; }
@keyframes tremble { from { transform: translate(.05em, -.03em); } to { transform: translate(-.05em, .03em); } }
.tk.sign-gold.charge .flap { box-shadow: 0 0 1.2em .4em rgba(255, 196, 50, .95); animation: glowP .35s ease-in-out infinite alternate; }
.tk.sign-gold.charge .inner { filter: drop-shadow(0 0 .8em rgba(255, 190, 40, .95)); }
.tk.sign-rainbow.charge .flap { animation: rainbow .6s linear infinite; }
.tk.sign-rainbow.charge .inner { filter: drop-shadow(0 0 .8em rgba(255, 120, 200, .9)); }
@keyframes glowP { to { box-shadow: 0 0 1.8em .7em rgba(255, 230, 120, 1); } }
@keyframes rainbow {
  0% { box-shadow: 0 0 1.4em .5em #ff5d8f; } 25% { box-shadow: 0 0 1.4em .5em #ffd23f; }
  50% { box-shadow: 0 0 1.4em .5em #3ec1d3; } 75% { box-shadow: 0 0 1.4em .5em #9b5de5; } 100% { box-shadow: 0 0 1.4em .5em #ff5d8f; }
}
/* 揭曉前：字被光蓋住，蓄力時越來越亮 */
.tk.veil .tierTxt { opacity: 0; }
.tk.veil .innerImg { filter: brightness(1.5) saturate(.3) blur(.08em); }
.tk.veil .inner::after {
  /* 光團蓋在印好的大字上，爆開前看不到是哪一賞 */
  content: ""; position: absolute; left: 24%; right: 14%; top: 10%; bottom: 28%; border-radius: 50%;
  background: radial-gradient(closest-side, #fff 30%, var(--tc, #ffd166) 65%, transparent); opacity: .95;
}
.tk.opened .innerImg { filter: none; transition: filter .25s; }
.tk.pop .innerImg, .tk.stampIn .innerImg { animation: innerPop .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes innerPop { 0% { filter: brightness(2.5); transform: scale(1.06); } 100% { filter: none; transform: none; } }
.tk.powering { animation: powerShake .08s linear infinite alternate; }
.tk.powering .inner::after { animation: powerGlow .5s ease-in infinite alternate; }
.tk.powering .tray { box-shadow: inset 0 0 0 .14em #2e1a0e, inset 0 0 0 .26em var(--tc), 0 0 1.6em .3em var(--tc), 0 .4em 1em rgba(0, 0, 0, .45); }
@keyframes powerShake { from { transform: translate(.04em, -.04em) scale(1.01); } to { transform: translate(-.04em, .04em) scale(1.02); } }
@keyframes powerGlow { from { opacity: .55; transform: scale(.9); } to { opacity: 1; transform: scale(1.25); } }
.tk.pop .tierTxt, .tk.stampIn .tierTxt { animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1); }
.tk.r-big .tierTxt { text-shadow: 0 0 .4em rgba(255, 200, 60, .9); }
.tk.r-big .tray { box-shadow: inset 0 0 0 .14em #2e1a0e, inset 0 0 0 .26em var(--gold2), 0 0 1.4em .2em rgba(255, 200, 80, .6), 0 .4em 1em rgba(0, 0, 0, .45); }

/* ---------- 標題 ---------- */
.titleWrap { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 12px 0 20px; }
.logoSub { font-size: 12px; font-weight: 700; letter-spacing: .5em; color: var(--gold2); opacity: .8; margin-bottom: 10px; }
.logo { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 900; line-height: 1; }
.lg1 { font-size: 20px; color: #fff8ec; background: linear-gradient(#e85a40, var(--shu)); padding: 6px 18px; border-radius: 8px; letter-spacing: .5em; text-indent: .5em; box-shadow: inset 0 0 0 1.5px rgba(255, 217, 138, .7), 0 3px 0 var(--shu2), 0 0 20px rgba(212, 64, 43, .6); }
.logoShout {
  position: relative; margin-top: 16px; padding: 10px 20px; border-radius: 18px; transform: rotate(-4deg);
  background: #fff8ec; color: var(--shu); font-size: 22px; font-weight: 900; letter-spacing: .05em;
  box-shadow: 0 4px 0 #c9a77a, 0 10px 24px rgba(0, 0, 0, .4); animation: shout 2.4s ease-in-out infinite;
}
.logoShout::after {
  content: ""; position: absolute; left: 22%; bottom: -12px; border: 8px solid transparent; border-top: 12px solid #fff8ec; border-bottom: 0;
}
@keyframes shout { 0%, 86%, 100% { transform: rotate(-4deg) scale(1); } 90% { transform: rotate(-6deg) scale(1.08); } 94% { transform: rotate(-2deg) scale(1.04); } }
.lowfx .logoShout { animation: none; }
.lg2 {
  font-size: clamp(54px, 16vw, 78px); letter-spacing: .06em;
  background: linear-gradient(#fff6d8, #ffd98a 45%, #c98a2a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #6b3f0c) drop-shadow(0 0 18px rgba(255, 200, 90, .45));
}
.logoLine { margin-top: 12px; font-size: 14px; color: var(--text2); font-weight: 700; letter-spacing: .2em; }
.demoTk { width: min(320px, 88%); margin: 6px 0 14px; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .5)); }
.demoTk .tk { font-size: clamp(13px, 4.4vw, 17px); }
.titleWrap .bigBtn { max-width: 320px; }
.titleWrap .moreLink { margin-top: 8px; }

/* ---------- 系列列表 ---------- */
.secHead { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 14px; }
.secHead h2, .pageTitle { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: .05em; }
.pageTitle { margin: 2px 0 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pageTitle small { font-size: 13px; color: var(--text2); font-weight: 700; }
.sCard { position: relative; display: block; width: 100%; text-align: left; margin-bottom: 16px; overflow: hidden; border-radius: 20px; background: var(--panel); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.sCard:active { transform: scale(.985); }
.sImg { position: relative; }
.sImg img { width: 100%; aspect-ratio: 5 / 2; object-fit: cover; }
.sImg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(28, 21, 48, .9)); }
.sTag { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 3px 10px; border-radius: 999px; background: var(--gold2); color: var(--ink); font-weight: 900; font-size: 12px; letter-spacing: .1em; }
.sInfo { padding: 4px 16px 14px; }
.sRow { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sRow.sub { align-items: center; margin: 8px 0; font-size: 13px; color: var(--text2); font-weight: 700; }
.sRow.sub b { color: var(--text); font-size: 16px; }
.sName { font-size: 19px; font-weight: 900; }
.sEn { font-size: 10px; font-weight: 700; letter-spacing: .3em; color: var(--text2); margin-top: 2px; }
.sPrice { font-weight: 900; font-size: 17px; white-space: nowrap; color: var(--gold2); }
.sPrice small { font-size: 11px; color: var(--text2); }
.sA { padding: 3px 9px; border-radius: 999px; background: #ff2d55; color: #fff; font-size: 11px; font-weight: 900; box-shadow: 0 0 10px rgba(255, 45, 85, .6); }
.sA.gone { background: #5b5168; box-shadow: none; }
.stamp {
  position: absolute; right: 16px; top: 22%; padding: 4px 14px; border: 3px solid var(--shu); color: var(--shu); border-radius: 8px; z-index: 2;
  font-size: 26px; font-weight: 900; transform: rotate(-12deg); background: rgba(255, 248, 236, .9); letter-spacing: .2em;
}
.sCard.soldout img { filter: grayscale(.85); opacity: .7; }
.note { color: var(--text2); font-size: 12px; text-align: center; margin: 4px 0 10px; }

/* ---------- 籤盒 ---------- */
.boxHead { display: flex; align-items: stretch; overflow: hidden; border-radius: 18px; background: var(--panel); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.boxHead img { width: 40%; object-fit: cover; object-position: 85% 50%; }
.bhInfo { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.bhInfo h2 { margin: 0; font-size: 19px; font-weight: 900; }
.bhSub { font-size: 13px; color: var(--text2); font-weight: 700; }
.bhSub b { font-size: 18px; color: var(--gold2); }
.bhPrice { font-size: 14px; font-weight: 900; }
.strip { display: flex; gap: 6px; width: 100%; margin: 12px 0 4px; padding: 2px 0 6px; overflow-x: auto; scrollbar-width: none; text-align: left; }
.strip::-webkit-scrollbar { display: none; }
.ts { flex: none; display: flex; align-items: baseline; gap: 4px; padding: 6px 10px 6px 6px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-weight: 900; font-size: 14px; }
.ts b { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--tc); color: #fff; font-size: 12px; align-self: center; }
.ts small { color: var(--text2); font-size: 11px; }
.ts.lo b { background: linear-gradient(#ffe39a, #c98a2a); color: var(--ink); font-size: 10px; }
.ts.out { opacity: .35; }
.boxTools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 10px; flex-wrap: wrap; }
.btBtns { display: flex; gap: 6px; }
.btBtns .pill { padding: 8px 12px; font-size: 13px; }
.btHint { font-size: 14px; font-weight: 700; color: var(--text2); }
.tkGrid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; padding: 14px 10px; border-radius: 20px;
  background: radial-gradient(120% 60% at 50% 0%, rgba(255, 214, 140, .12), transparent 60%), linear-gradient(#2a1838, #1a1026);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 2px 12px rgba(0, 0, 0, .5), var(--shadow);
}
.cell { display: block; width: 100%; transition: transform .1s; }
.cell:active { transform: scale(.95); }
.cell .tk { font-size: clamp(6.2px, 2vw, 9px); }
.autoBar {
  position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding: 12px 14px 12px 18px; border-radius: 999px; background: rgba(12, 9, 28, .95); color: var(--text); font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 18px rgba(0, 0, 0, .5);
}
.autoBar b { color: var(--gold2); font-size: 18px; }

/* ---------- 獎品陣容 ---------- */
.lineup { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding-bottom: 8px; }
.pz { position: relative; display: flex; flex-direction: column; text-align: left; overflow: hidden; border-radius: 18px; background: var(--panel); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.pzImg { position: relative; }
.pzImg img { width: 100%; aspect-ratio: 1; object-fit: contain; position: relative; z-index: 1; }
.pz.wide { grid-column: 1 / -1; flex-direction: row; }
.pz.wide .pzImg { width: 42%; flex: none; }
.pzBody { position: relative; flex: 1; padding: 10px 12px 30px; }
.pz.wide .pzBody { padding-top: 16px; }
.pzName { font-weight: 900; font-size: 14px; line-height: 1.35; }
.pz.wide .pzName { font-size: 17px; }
.pzType { font-size: 12px; color: var(--text2); font-weight: 700; margin-top: 3px; }
.pzLeft { position: absolute; right: 12px; bottom: 8px; font-size: 12px; color: var(--text2); font-weight: 700; }
.pzLeft b { font-size: 18px; color: var(--gold2); }
.pz.out .pzImg img { filter: grayscale(1); opacity: .4; }
.pz.last { background: linear-gradient(135deg, #3a2a10, #120c08); box-shadow: 0 0 0 1.5px var(--gold), 0 0 24px rgba(230, 182, 90, .3), var(--shadow); }
.pz.last .pzType, .pz.last .pzLeft { color: var(--gold2); }
.pz.last .tierTag { background: linear-gradient(#ffe39a, #c98a2a); color: #3a250a; }
.stickyGo { position: sticky; bottom: 0; padding: 12px 0 2px; background: linear-gradient(rgba(12, 9, 28, 0), rgba(12, 9, 28, .95) 40%); }
/* 展示底（透明 PNG） */
.pzImg, .sumC { background: radial-gradient(circle at 50% 38%, rgba(255, 240, 210, .22), rgba(255, 255, 255, .02) 70%); }
.pzImg::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 7%; height: 7%; border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, .5), transparent 70%); }

/* =========================================================
   懸浮展示 show3d（去背物品 + 光暈 + 反光 + 地面陰影）
   --rx --ry --rz：傾斜角度（JS 依手指 / 滑鼠位置設定）
   ========================================================= */
.show3d { position: relative; aspect-ratio: 1; perspective: 700px; --rx: 0deg; --ry: 0deg; --rz: 0deg; --gx: 30%; --gy: 20%; --sx: 0px; }
.show3d .aura {
  position: absolute; inset: 6%; border-radius: 50%; opacity: var(--aura, .4);
  background: radial-gradient(closest-side, var(--tc), transparent); filter: blur(4px);
  animation: auraPulse 2.6s ease-in-out infinite;
}
@keyframes auraPulse { 0%, 100% { transform: scale(.9); } 50% { transform: scale(1.06); } }
.show3d .float { position: absolute; inset: 4%; transform-style: preserve-3d; animation: hover 4.5s ease-in-out infinite; }
@keyframes hover { 0%, 100% { transform: translateY(0) rotateY(-5deg); } 50% { transform: translateY(-4%) rotateY(5deg); } }
.show3d .tilt {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz));
  transition: transform .6s cubic-bezier(.2, .9, .3, 1.2);
}
.show3d.tilting .tilt { transition: transform .08s linear; }
.show3d img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.show3d .glare {
  position: absolute; inset: 0; pointer-events: none; opacity: .0; transition: opacity .3s;
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 42%);
}
.show3d.tilting .glare { opacity: 1; }
.show3d.holo .glare {
  opacity: .55;
  background:
    radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 40%),
    linear-gradient(115deg, rgba(255, 90, 160, 0) 30%, rgba(255, 90, 160, .22) 40%, rgba(255, 220, 90, .25) 48%, rgba(90, 220, 255, .25) 56%, rgba(160, 110, 255, 0) 66%) calc(var(--gx) * 1.4) 0 / 200% 100%;
  mix-blend-mode: screen;
}
.show3d .floorShadow {
  position: absolute; left: 24%; right: 24%; bottom: 0; height: 8%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); transform: translateX(var(--sx));
  animation: shadowPulse 4.5s ease-in-out infinite;
}
@keyframes shadowPulse { 0%, 100% { opacity: .9; scale: 1; } 50% { opacity: .55; scale: .85; } }

/* ---------- 撕籤舞台 ---------- */
.stWrap { width: min(400px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.stHead { width: 100%; display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--text2); letter-spacing: .1em; padding: 0 4px; }
.stTk { width: 100%; transition: transform .5s cubic-bezier(.2, .9, .3, 1); will-change: transform; }
.stTk.up { transform: scale(.8); }
.stTk.gone { display: none; }
.stHint { height: 24px; font-size: 15px; font-weight: 700; color: var(--text2); transition: opacity .25s; display: flex; align-items: center; gap: 6px; }
.stHint b { color: var(--gold2); }
.stHint.gone { opacity: 0; }
.hand::before { content: "👉"; display: inline-block; animation: swipe 1.4s ease-in-out infinite; }
@keyframes swipe { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(10px); } }
.stRes { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; width: 100%; }
.stRes .show3d.res { width: min(230px, 56vw); }
.resTier { font-size: 26px; font-weight: 900; color: var(--tc); letter-spacing: .1em; text-shadow: 0 0 14px var(--tc), 0 2px 0 rgba(0, 0, 0, .5); }
.resName { font-size: 19px; font-weight: 900; line-height: 1.35; }
.resSub { font-size: 12px; color: var(--text2); font-weight: 700; }
.stRes > * { animation: pop .35s ease-out backwards; }
.stRes .resName { animation-delay: .15s; }
.stRes .resSub { animation-delay: .22s; }
/* 登場方式：小獎彈出、中獎旋轉、大獎史詩 */
.stRes.enter-pop .show3d { animation: resPop .55s cubic-bezier(.2, 1.5, .4, 1) backwards; }
.stRes.enter-spin .show3d { animation: resSpin .9s cubic-bezier(.2, .9, .25, 1.05) backwards; }
.stRes.enter-epic .show3d { animation: resEpic 1.4s cubic-bezier(.2, .9, .25, 1.05) backwards; }
.stRes.enter-epic .resTier { animation: stamp .6s .6s cubic-bezier(.2, 1.6, .4, 1) backwards; font-size: 32px; }
@keyframes resPop { 0% { transform: scale(.3) translateY(30px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes resSpin { 0% { transform: perspective(600px) rotateY(540deg) scale(.4); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes resEpic {
  0% { transform: perspective(600px) translateY(60%) rotateY(900deg) scale(.2); opacity: 0; filter: brightness(4); }
  55% { opacity: 1; filter: brightness(2); }
  80% { transform: perspective(600px) translateY(-4%) rotateY(-10deg) scale(1.08); }
  100% { transform: none; filter: none; }
}
.stRes.hi .show3d .aura { inset: -6%; }
.stBtns { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 4px; }

/* ---------- 收藏：展示櫃 ---------- */
.ctabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px; }
.ctabs::-webkit-scrollbar { display: none; }
.ctab { flex: none; display: flex; flex-direction: column; align-items: flex-start; padding: 8px 14px; border-radius: 14px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-weight: 900; font-size: 14px; }
.ctab small { font-size: 11px; color: var(--text2); font-weight: 700; }
.ctab.on { background: linear-gradient(160deg, var(--c1), #3a2350); box-shadow: inset 0 0 0 1.5px var(--gold2), 0 0 14px rgba(255, 217, 138, .3); }
.ctab.on small { color: #fff; }
.cabinet {
  position: relative; padding: 14px 12px 12px; border-radius: 24px; overflow: hidden;
  background: radial-gradient(70% 45% at 50% 0%, rgba(255, 236, 200, .2), transparent 70%), linear-gradient(180deg, #24183a, #0f0a1a);
  background:
    radial-gradient(70% 45% at 50% 0%, rgba(255, 236, 200, .2), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--c2) 35%, #170f26), #0f0a1a);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 0 40px rgba(0, 0, 0, .6), var(--shadow);
}
.cabHead { display: flex; justify-content: space-between; align-items: flex-end; margin: 0 4px 8px; }
.cabHead b { font-size: 19px; font-weight: 900; display: block; }
.cabHead small { font-size: 10px; letter-spacing: .3em; color: var(--text2); }
.cabHead span { font-weight: 900; color: var(--gold2); }
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 6px; margin-top: 12px; }
.item { position: relative; isolation: isolate; display: block; padding: 4px 2px 8px; text-align: center; border-radius: 16px; }
.item.big { grid-column: span 3; }
.item.big .show3d { width: min(250px, 64%); margin: 0 auto; }
.item::after {
  /* 玻璃層架：發光的底座 */
  content: ""; position: absolute; left: 10%; right: 10%; bottom: 22px; height: 10px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 230, 170, .35), transparent); z-index: -1;
}
.item.big::after { left: 25%; right: 25%; }
.item .tierTag { left: 2px; top: 2px; font-size: 10px; padding: 1px 7px; }
.item.big .tierTag { left: 16%; top: 6px; font-size: 13px; }
.item .ccN { position: absolute; right: 2px; top: 2px; bottom: auto; z-index: 3; padding: 1px 7px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: var(--gold2); font-weight: 900; font-size: 11px; box-shadow: inset 0 0 0 1px var(--line); }
.item.big .ccN { right: 16%; top: 6px; }
.itemName { display: block; margin-top: 2px; font-size: 11px; font-weight: 700; color: var(--text); line-height: 1.3; height: 2.6em; overflow: hidden; }
.item.big .itemName { font-size: 14px; height: auto; }
.item:active .show3d { transform: scale(.96); }
.item.no img { filter: brightness(0) invert(.18); opacity: .55; }
.item.no .show3d .float { animation: none; }
.item.no .q { position: absolute; left: 0; right: 0; top: 34%; font-size: 26px; font-weight: 900; color: rgba(255, 255, 255, .35); }
.cabHint { text-align: center; font-size: 12px; color: var(--text2); margin: 10px 0 2px; }
.ccN { position: absolute; right: 4px; bottom: 4px; padding: 1px 7px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: var(--gold2); font-weight: 900; font-size: 12px; }

/* ---------- 對話框 ---------- */
.mBox {
  width: min(380px, 100%); max-height: 100%; overflow-y: auto; padding: 20px; border-radius: 26px;
  background: linear-gradient(180deg, #2a1f44, #18112a); box-shadow: inset 0 0 0 1px var(--line), 0 20px 60px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; gap: 10px; animation: pop .25s cubic-bezier(.2, 1.4, .4, 1);
}
.mTitle { margin: 0 0 4px; text-align: center; font-size: 22px; font-weight: 900; letter-spacing: .1em; color: var(--gold2); }
.mText { margin: 0 0 4px; text-align: center; color: var(--text2); font-weight: 700; font-size: 14px; }
.mBtn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 14px 18px; border-radius: 16px;
  background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--line); font-weight: 900; font-size: 16px;
}
.mBtn:not(:has(small)) { justify-content: center; }
.mBtn small { font-size: 13px; color: var(--gold2); }
.mBtn.danger { background: rgba(212, 64, 43, .22); color: #ffb3a6; }
.mBtn.ghost { background: none; box-shadow: none; color: var(--text2); }
.mBtn:active { transform: translateY(2px); }
.setRow { display: flex; align-items: center; justify-content: space-between; font-weight: 900; font-size: 16px; padding: 4px 2px; }
.tog { display: flex; align-items: center; gap: 8px; min-width: 86px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-weight: 900; font-size: 14px; color: var(--text2); }
.tog i { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.tog.on { background: #4f9a63; color: #fff; }
.mFoot { display: flex; justify-content: center; padding-top: 12px; margin-top: 4px; border-top: 1px dashed var(--line); }
.sumGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 6px; }
.sumC { position: relative; overflow: hidden; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.sumC img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.sumC .tierTag { font-size: 10px; padding: 1px 6px; left: 4px; top: 4px; }
/* 放大檢視：透明對話框，物品浮在空中 */
#modal[data-k="viewerBox"] { background: radial-gradient(90% 60% at 50% 40%, rgba(40, 26, 70, .95), rgba(4, 3, 12, .98)); }
.mBox.viewerBox { background: none; box-shadow: none; overflow: visible; padding: 0; width: min(420px, 100%); }
.viewer { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.viewer .show3d { width: min(340px, 82vw); }
.viewer .tierTag { position: relative; left: 0; top: 0; font-size: 16px; padding: 4px 14px; }
.vHint { font-size: 12px; color: var(--gold2); opacity: .8; margin: 4px 0 6px; }
.viewer .darkBtn { max-width: 260px; }
.mBox.lo { background: linear-gradient(160deg, #3a2a10, #0e0906); box-shadow: 0 0 0 2px var(--gold), 0 0 40px rgba(230, 182, 90, .35), 0 20px 60px rgba(0, 0, 0, .6); }
.loBox { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.loBox .show3d { width: min(260px, 70vw); }
/* ---------- Last One：BOSS 級 ---------- */
#modal[data-k="lo"] { background: radial-gradient(90% 60% at 50% 45%, rgba(40, 18, 60, .96), #000 85%); }
.mBox.lo { width: min(460px, 100%); overflow: visible; }
.mBox.lo.rumble { animation: rumble .45s; }
@keyframes rumble { 0%, 100% { transform: none; } 10% { transform: translate(-9px, 4px); } 25% { transform: translate(8px, -5px); } 40% { transform: translate(-7px, 3px); } 60% { transform: translate(5px, -2px); } 80% { transform: translate(-2px, 1px); } }
.loBox .show3d.boss { width: min(380px, 96vw); margin: -10px -20px 0; animation: bossRise 2.2s cubic-bezier(.3, .8, .3, 1) backwards; }
@keyframes bossRise {
  0% { transform: translateY(40%) scale(.7); filter: brightness(0); opacity: .0; }
  15% { opacity: 1; }
  72% { transform: translateY(0) scale(1.03); filter: brightness(0) drop-shadow(0 0 18px rgba(201, 160, 255, .9)); }
  78% { filter: brightness(3.2); }
  100% { transform: none; filter: none; }
}
.show3d.boss .aura { inset: -14%; animation: auraPulse 1.8s ease-in-out infinite, auraIn 2.2s backwards; }
@keyframes auraIn { 0%, 75% { opacity: 0; } }
.show3d.boss .floorShadow { left: 12%; right: 12%; height: 10%; background: radial-gradient(closest-side, rgba(0, 0, 0, .8), transparent); }
.show3d.boss img { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .7)) drop-shadow(0 0 22px rgba(201, 160, 255, .35)); }
.loBox .loHead, .loBox .loSub { animation: pop .5s 1.75s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.loBox .resName, .loBox .bigBtn { animation: pop .4s 2.1s ease-out backwards; }
.loBox .loHead { font-size: 38px; }
/* 收藏與檢視裡的 Last One 也比較大 */
.viewer .show3d.boss { width: min(420px, 96vw); }
.item.big .show3d.boss { width: min(300px, 82%); }
.loHead { font-size: 32px; font-weight: 900; letter-spacing: .08em; background: linear-gradient(#fff3c4, #e1b24a); -webkit-background-clip: text; background-clip: text; color: transparent; animation: stamp .55s cubic-bezier(.2, 1.6, .4, 1); }
.loSub { font-weight: 700; color: var(--gold2); font-size: 14px; }

/* ---------- 提示 ---------- */
#toast {
  position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 66px); z-index: 13; transform: translate(-50%, -16px); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; padding: 10px 20px; border-radius: 999px; background: var(--gold2); color: var(--ink); font-weight: 900; white-space: nowrap;
  box-shadow: 0 6px 22px rgba(255, 200, 90, .35);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 省電模式 / 減少動態 ---------- */
.lowfx .tk.big .tab, .lowfx .hand::before, .lowfx .tk.sign-gold.charge .flap, .lowfx .tk.sign-rainbow.charge .flap,
.lowfx .show3d .aura, .lowfx .show3d .float, .lowfx .show3d .floorShadow { animation: none !important; }
.lowfx .show3d .aura { filter: none; }
.lowfx #rays { mix-blend-mode: normal; }
@media (prefers-reduced-motion: reduce) { .tk.big .tab, .hand::before, .show3d .aura, .show3d .float, .show3d .floorShadow { animation: none !important; } }

/* ---------- 寬螢幕（PC）---------- */
@media (min-width: 560px) {
  .tkGrid { gap: 14px 12px; padding: 16px; }
  .lineup { grid-template-columns: repeat(3, 1fr); }
  .pz.wide .pzImg { width: 34%; }
  .shelf { grid-template-columns: repeat(4, 1fr); }
  .item.big { grid-column: span 2; }
  .item.big .show3d { width: 86%; }
}

/* =========================================================
   UI 皮膚（GPT 生成）：按鈕 / 外框 / LOGO / 代幣
   按鈕用九宮格 border-image：兩端金飾不變形，中間橫向延伸
   ========================================================= */
.bigBtn {
  background: none; border-radius: 0; box-shadow: none;
  border-style: solid; border-color: transparent;
  border-width: 0 34px;
  border-image: url("../assets/ui/btn_red.webp") 0 92 fill / 0 34px / 0 stretch;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
  text-shadow: 0 2px 0 #7a1608, 0 0 10px rgba(0, 0, 0, .35);
  padding-left: 4px; padding-right: 4px;
}
.bigBtn.sm { border-width: 0 28px; border-image-width: 0 28px; }
.bigBtn:active:not(:disabled) { transform: translateY(3px) scale(.985); box-shadow: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .45)) brightness(.95); }
.bigBtn:disabled { filter: grayscale(.8) brightness(.7); }
.darkBtn, .ghostBtn, .mBtn {
  background: none; box-shadow: none; border-radius: 0;
  border-style: solid; border-color: transparent; border-width: 0 26px;
  border-image: url("../assets/ui/btn_dark.webp") 0 92 fill / 0 26px / 0 stretch;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4));
  padding-left: 2px; padding-right: 2px;
}
.ghostBtn { min-height: 48px; display: flex; align-items: center; justify-content: center; }
.darkBtn:active, .ghostBtn:active, .mBtn:active { background: none; transform: translateY(2px); filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4)) brightness(1.15); }
.mBtn { min-height: 52px; }
.mBtn.danger { border-image-source: url("../assets/ui/btn_red.webp"); color: #fff3e6; filter: saturate(.75) brightness(.85) drop-shadow(0 4px 8px rgba(0, 0, 0, .4)); }
.mBtn.ghost { border-image: none; border-width: 0; filter: none; }
.pill.gold {
  background: none; box-shadow: none; border-radius: 0;
  border-style: solid; border-color: transparent; border-width: 0 18px;
  border-image: url("../assets/ui/btn_gold.webp") 0 105 fill / 0 18px / 0 stretch;
  padding: 9px 2px; color: #4a2c05; text-shadow: 0 1px 0 rgba(255, 245, 200, .7);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .4));
}
.coin { background: url("../assets/ui/coin.webp") center / contain no-repeat; box-shadow: none; border-radius: 0; width: 1.15em; height: 1.15em; }

/* LOGO */
.logoImg { width: min(340px, 90vw); height: auto; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .55)); animation: logoIn .7s cubic-bezier(.2, 1.4, .4, 1) backwards; }
@keyframes logoIn { from { transform: scale(.6) translateY(-20px); opacity: 0; } to { transform: none; opacity: 1; } }
.titleWrap .logoShout { margin-top: -6px; }
.tbLogoImg { height: 38px; width: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }

/* 金色雕花木框：對話框、收藏展示櫃 */
.mBox {
  border: 34px solid transparent; border-radius: 0; padding: 6px 4px;
  border-image: url("../assets/ui/frame.webp") 100 / 34px / 0 round;
  background: linear-gradient(180deg, #2a1f44, #18112a) padding-box;
  box-shadow: none; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .6));
}
.mBox.viewerBox { border: 0; border-image: none; background: none; filter: none; padding: 0; }
.mBox.lo { border-image: url("../assets/ui/frame.webp") 100 / 34px / 0 round; background: linear-gradient(160deg, #3a2a10, #0e0906) padding-box; box-shadow: none; }
.cabinet {
  border: 30px solid transparent; border-radius: 0; padding: 6px 4px 8px;
  border-image: url("../assets/ui/frame.webp") 100 / 30px / 0 round;
  background-clip: padding-box; box-shadow: none; overflow: visible;
}
/* 系列封面（GPT 生成） */
.sImg img, .boxHead img, .pBanner { object-fit: cover; object-position: 60% 45%; }
.boxHead img { object-position: 70% 45%; }
.titleWrap .logoShout { width: fit-content; margin-left: auto; margin-right: auto; }

/* =========================================================
   生涯模式
   ========================================================= */
.bigBtn.alt { border-image-source: url("../assets/ui/btn_gold.webp"); border-image-slice: 0 105 fill; color: #4a2c05; text-shadow: 0 1px 0 rgba(255, 245, 200, .7); }
.dayPill { flex: none; padding: 7px 12px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-weight: 900; font-size: 13px; color: var(--gold2); white-space: nowrap; }
.neg { color: #ff8a7a !important; } .pos { color: #8fe3a0 !important; } .gold { color: var(--gold2); }
.dayCard { padding: 14px 16px; border-radius: 20px; background: linear-gradient(160deg, rgba(60, 40, 90, .9), rgba(24, 16, 40, .92)); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.dcTop { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.dcDay b { font-size: 24px; font-weight: 900; margin-right: 10px; }
.dcDay span { font-weight: 900; color: var(--gold2); }
.dcTop small { color: var(--text2); font-weight: 700; }
.dcStats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.dcStats div { padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .05); text-align: center; }
.dcStats small { display: block; font-size: 11px; color: var(--text2); font-weight: 700; }
.dcStats b { font-size: 15px; font-weight: 900; }
.hubQ { margin: 18px 2px 10px; font-size: 17px; font-weight: 900; }
.actCard { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 10px; padding: 14px; border-radius: 18px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.actCard:active { transform: scale(.98); }
.actCard b { display: block; font-size: 18px; font-weight: 900; }
.actCard small { display: block; margin-top: 4px; font-size: 12px; color: var(--text2); font-weight: 700; line-height: 1.6; }
.aIco { flex: none; width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; font-style: normal; background: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, .18), rgba(0, 0, 0, .2)); box-shadow: inset 0 0 0 1.5px var(--line); }
.a-shop .aIco { background-color: rgba(212, 64, 43, .35); } .a-club .aIco { background-color: rgba(62, 193, 211, .25); } .a-home .aIco { background-color: rgba(230, 182, 90, .25); }
.shl { display: inline-block; margin-right: 10px; } .shl b { display: inline; font-size: 12px; color: var(--text); margin-right: 3px; }
.hotA { font-style: normal; color: #ff6b8a; font-weight: 900; }
.badge { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #ff3b5c; color: #fff; font-style: normal; font-size: 11px; font-weight: 900; line-height: 18px; }
.newsBox { margin-top: 14px; padding: 12px 14px; border-radius: 18px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px var(--line); }
.nbHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.newsBox p { margin: 6px 0; font-size: 13px; font-weight: 700; line-height: 1.5; }
.newsBox p small { color: var(--gold2); margin-right: 6px; font-size: 11px; }
.warnBar { margin-bottom: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(212, 64, 43, .3); font-weight: 900; }
.clerk { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.clerk i { font-style: normal; font-size: 30px; }
.clerk p { margin: 0; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #fff8ec; color: var(--ink); font-weight: 700; font-size: 14px; }
.sRow.sub .chips { display: flex; gap: 4px; }
.sRow.sub .chips .ts { padding: 2px 7px 2px 3px; font-size: 12px; }
.sRow.sub .chips .ts b { min-width: 18px; height: 18px; font-size: 10px; }
.panel { margin-bottom: 12px; padding: 14px; border-radius: 18px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.pHead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 8px; }
.pHead b { font-size: 17px; font-weight: 900; } .pHead span { font-size: 12px; color: var(--text2); font-weight: 700; text-align: right; }
.pBtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.warn { margin: 8px 0 0; font-size: 13px; color: #ff8a7a; font-weight: 700; }
.mkRow { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px dashed rgba(255, 255, 255, .08); }
.mkRow img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.mkRow .tierTag { position: static; font-size: 10px; padding: 1px 6px; flex: none; }
.mkName { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; line-height: 1.3; }
.mkName small { margin-left: 4px; color: var(--text2); }
.mkRow > b { font-weight: 900; color: var(--gold2); white-space: nowrap; }
.mkRow i { font-style: normal; font-size: 11px; margin-left: 3px; } .mkRow i.up { color: #8fe3a0; } .mkRow i.down { color: #ff8a7a; }
.hyList { display: flex; flex-direction: column; gap: 4px; }
.hy { font-size: 13px; color: var(--text2); font-weight: 700; } .hy b { color: var(--text); margin-right: 6px; }
.repList p, .rules p { margin: 6px 0; font-size: 14px; font-weight: 700; line-height: 1.55; }
.rules b { color: var(--gold2); }
.nightTbl, .endTbl { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.nightTbl div, .endTbl div { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; }
.nightTbl .sum, .endTbl .sum { padding-top: 6px; border-top: 1px dashed var(--line); font-size: 16px; }
.endWrap { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; }
.endHead { text-align: center; padding: 10px 0; }
.endHead small { color: var(--text2); font-weight: 700; letter-spacing: .2em; }
.endHead h2 { margin: 6px 0; font-size: 34px; font-weight: 900; background: linear-gradient(#fff3c4, #e1b24a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.endHead p { margin: 0; color: var(--text2); font-weight: 700; }

/* =========================================================
   一番番賞二手交流社：原創的手機社群 App 風格（暖白紙色 + 朱紅）
   ========================================================= */
.wrap.club { color: #2b211a; }
.v-club #view, .v-club { }
.clubTop { position: sticky; top: calc(-8px - env(safe-area-inset-top)); z-index: 5; display: flex; align-items: center; gap: 8px;
  margin: calc(-8px - env(safe-area-inset-top)) calc(-1 * var(--edge)) 0; padding: calc(12px + env(safe-area-inset-top)) var(--edge) 10px;
  background: #fffaf2; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.clubTitle { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.clubTitle b { display: block; font-size: 16px; font-weight: 900; color: #2b211a; }
.clubTitle small { font-size: 11px; color: #8a7a6a; font-weight: 700; }
.clubIco { flex: none; width: 36px; height: 36px; border-radius: 10px; background: url("../assets/ui/coin.webp") center / 80% no-repeat, linear-gradient(#e85a40, #b8311e); }
.clubTop .coins { background: #f3ebdd; box-shadow: none; color: #2b211a; } .clubTop .coins b { color: #8a5a10; }
.clubTop .tbBtn { background: #f3ebdd; box-shadow: none; } .clubTop .pauseIco { border-color: #8a5a10; }
.cTabs { display: flex; gap: 4px; margin: 0 calc(-1 * var(--edge)); padding: 0 var(--edge); background: #fffaf2; border-bottom: 1px solid #eadfcd; position: sticky; top: 50px; z-index: 4; }
.cTab { flex: 1; padding: 12px 4px 10px; font-weight: 900; font-size: 14px; color: #8a7a6a; border-bottom: 3px solid transparent; }
.cTab.on { color: #c2361f; border-bottom-color: #c2361f; }
.clubBody { margin: 0 calc(-1 * var(--edge)); padding: 10px var(--edge) 4px; background: #efe7da; min-height: 60vh; }
.compose { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; margin-bottom: 10px; border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); color: #8a7a6a; font-weight: 700; text-align: left; }
.compose span { flex: 1; } .compose b { color: #c2361f; font-weight: 900; }
.av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 900; color: #fff; background: var(--av); font-size: 16px; }
.post { margin-bottom: 10px; padding: 12px; border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); color: #2b211a; }
.post header { display: flex; align-items: center; gap: 10px; }
.post header div { flex: 1; } .post header b { display: block; font-size: 14px; font-weight: 900; } .post header small { font-size: 11px; color: #9a8a7a; }
.post > p { margin: 8px 0; font-size: 14px; line-height: 1.5; font-weight: 500; }
.hotTag { padding: 2px 8px; border-radius: 6px; background: #ff3b5c; color: #fff; font-size: 11px; font-weight: 900; }
.sale { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: #f7f1e6; }
.sale img { width: 84px; height: 84px; object-fit: contain; flex: none; }
.sale > div { flex: 1; min-width: 0; }
.sName2 { font-size: 13px; font-weight: 900; line-height: 1.35; } .sName2 .tierTag { position: static; display: inline-block; margin-right: 4px; font-size: 10px; padding: 0 6px; vertical-align: 1px; }
.price { margin: 4px 0 6px; font-size: 18px; font-weight: 900; color: #c2361f; } .price small { display: block; font-size: 11px; color: #9a8a7a; font-weight: 700; }
.offLine { font-size: 12px; font-weight: 700; color: #6a5a4a; }
.brag img { width: 100%; max-height: 180px; object-fit: contain; background: #f7f1e6; border-radius: 12px; }
.clubEmpty { text-align: center; color: #8a7a6a; font-weight: 700; padding: 30px 10px; }
.chatRow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; background: #fff; text-align: left; color: #2b211a; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.chatRow > div { flex: 1; min-width: 0; } .chatRow b { font-size: 14px; font-weight: 900; } .chatRow small { display: block; font-size: 12px; color: #c2361f; font-weight: 700; }
.chatRow p { margin: 2px 0 0; font-size: 12px; color: #7a6a5a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chatRow img { width: 46px; height: 46px; object-fit: contain; flex: none; }
.chatRow.closed { opacity: .5; }
.dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: #ff3b5c; vertical-align: 2px; }
.v-club .stickyGo { background: linear-gradient(rgba(239, 231, 218, 0), #efe7da 40%); }
.club .pill { background: #f3ebdd; color: #2b211a; box-shadow: none; }
.club .pill.gold { color: #4a2c05; }
/* 社團用的對話框：白底、圓角，不用木框 */
.mBox.chatBox, .mBox.clubM { border: 0; border-image: none; border-radius: 20px; background: #fffaf2; color: #2b211a; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .5)); padding: 16px; }
.mBox.chatBox .mText, .mBox.clubM .mText { color: #7a6a5a; }
.mBox.clubM .mTitle { color: #c2361f; }
.pickGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 50vh; overflow-y: auto; }
.pk { position: relative; padding: 6px 4px 4px; border-radius: 12px; background: #f3ebdd; text-align: center; color: #2b211a; }
.pk img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.pk .tierTag { font-size: 10px; padding: 0 6px; left: 4px; top: 4px; }
.pk .ccN { top: 4px; bottom: auto; right: 4px; }
.pk small { font-weight: 900; color: #c2361f; }
.lpItem { display: flex; gap: 10px; align-items: center; }
.lpItem img { width: 76px; height: 76px; object-fit: contain; }
.lpItem .tierTag { position: static; display: inline-block; font-size: 11px; padding: 1px 7px; margin-right: 4px; }
.lpItem b { font-weight: 900; } .lpItem small { display: block; margin-top: 4px; font-size: 12px; color: #7a6a5a; }
.lpPrice { text-align: center; margin: 10px 0 2px; } .lpPrice b { display: block; font-size: 30px; font-weight: 900; color: #c2361f; }
.lpPrice small { font-weight: 900; font-size: 13px; }
.lpPrice .hot { color: #e0461f; } .lpPrice .ok { color: #3a8a4a; } .lpPrice .mid { color: #b07d1c; } .lpPrice .slow, .lpPrice .dead { color: #8a7a6a; }
input[type=range] { width: 100%; accent-color: #c2361f; height: 28px; }
.chat header { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #eadfcd; }
.chat header div { flex: 1; } .chat header b { display: block; font-weight: 900; } .chat header small { font-size: 12px; color: #9a8a7a; }
.xBtn { width: 34px; height: 34px; border-radius: 50%; background: #f3ebdd; font-weight: 900; color: #7a6a5a; }
.chatItem { position: relative; display: flex; align-items: center; gap: 8px; margin: 10px 0; padding: 6px; border-radius: 12px; background: #f3ebdd; font-size: 12px; font-weight: 700; color: #6a5a4a; }
.chatItem img { width: 52px; height: 52px; object-fit: contain; } .chatItem .tierTag { position: static; font-size: 10px; padding: 0 6px; }
.msgs { display: flex; flex-direction: column; gap: 6px; max-height: 32vh; overflow-y: auto; padding: 4px 0 8px; }
.msgs p { margin: 0; max-width: 82%; padding: 9px 12px; border-radius: 16px; font-size: 14px; line-height: 1.45; font-weight: 500; }
.msgs .them { align-self: flex-start; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); border-bottom-left-radius: 4px; }
.msgs .me { align-self: flex-end; background: #c2361f; color: #fff; border-bottom-right-radius: 4px; }
.counter { text-align: center; } .counter b { font-size: 26px; font-weight: 900; color: #c2361f; }
.chatBtns { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.chatBtns .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chat .mBtn { color: var(--text); }
/* 生涯模式上方列在手機上比較擠：按鈕不換行、天數標籤縮小 */
.top .tbBtn { white-space: nowrap; flex: none; }
@media (max-width: 420px) {
  .dayPill { font-size: 11px; padding: 6px 8px; }
  .top .coins { padding-left: 8px; }
  .top .coins b { min-width: 0; font-size: 14px; }
  .top .tbBtn:not(.icon) { padding: 0 10px; font-size: 14px; }
}
/* =========================================================
   一番番賞二手交流社 v2：社群社團版面
   淺灰底、白色卡片、圓形頭像、讚／留言／分享列、拍賣格、即時通訊聊天
   ========================================================= */
.fbg { --fbBg: #eef0f3; --fbCard: #fff; --fbTx: #111418; --fbTx2: #626a73; --fbLine: #e1e4e8; --fbAcc: #2f6fd8; --fbAccBg: #e6efff; color: var(--fbTx); }
.fbg .fbBar { position: sticky; top: calc(-8px - env(safe-area-inset-top)); z-index: 6; display: flex; align-items: center; gap: 8px;
  margin: calc(-8px - env(safe-area-inset-top)) calc(-1 * var(--edge)) 0; padding: calc(10px + env(safe-area-inset-top)) var(--edge) 8px; background: var(--fbCard); border-bottom: 1px solid var(--fbLine); }
.fbSearch { flex: 1; padding: 9px 14px; border-radius: 999px; background: var(--fbBg); color: var(--fbTx2); font-size: 14px; font-weight: 500; }
.fbg .fbBar .coins { background: var(--fbBg); box-shadow: none; height: 36px; } .fbg .fbBar .coins b { color: #8a5a10; }
.fbIcon { width: 36px; height: 36px; border-radius: 50%; background: var(--fbBg); display: flex; align-items: center; justify-content: center; flex: none; }
.fbIcon .pauseIco { border-color: var(--fbTx); }
.grpHead { margin: 0 calc(-1 * var(--edge)); background: var(--fbCard); border-bottom: 1px solid var(--fbLine); }
.grpCover { height: 140px; background: center / cover no-repeat; }
.grpInfo { padding: 12px var(--edge) 14px; }
.grpInfo h2 { margin: 0; font-size: 22px; font-weight: 900; }
.grpInfo > p { margin: 4px 0 8px; font-size: 13px; color: var(--fbTx2); font-weight: 500; } .grpInfo > p b { color: var(--fbTx); }
.grpMem { display: flex; align-items: center; margin-bottom: 12px; }
.grpMem .av { margin-right: -8px; box-shadow: 0 0 0 2px var(--fbCard); }
.grpMem small { margin-left: 16px; font-size: 12px; color: var(--fbTx2); font-weight: 500; }
.grpBtns, .fbBtns { display: flex; gap: 8px; }
.fbBtn { flex: 1; padding: 9px 12px; border-radius: 8px; background: var(--fbBg); color: var(--fbTx); font-weight: 900; font-size: 14px; text-align: center; }
.fbBtn.primary { background: var(--fbAcc); color: #fff; }
.fbBtn.sq { flex: none; width: 42px; }
.fbBtn:active { filter: brightness(.92); }
.gTabs { position: sticky; top: 46px; z-index: 5; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--edge)); padding: 0 calc(var(--edge) - 6px); background: var(--fbCard); border-bottom: 1px solid var(--fbLine); }
.gTabs::-webkit-scrollbar { display: none; }
.gTab { flex: none; padding: 12px 12px 10px; font-weight: 900; font-size: 14px; color: var(--fbTx2); border-bottom: 3px solid transparent; white-space: nowrap; }
.gTab.on { color: var(--fbAcc); border-bottom-color: var(--fbAcc); }
.fbg .clubBody { margin: 0 calc(-1 * var(--edge)); padding: 8px 0 4px; background: var(--fbBg); min-height: 60vh; }
.fbCompose, .fbPost { margin-bottom: 8px; padding: 12px var(--edge); background: var(--fbCard); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.fbCompose .row { display: flex; align-items: center; gap: 10px; }
.fbCompose .btns { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--fbLine); justify-content: space-around; }
.fbCompose .btns button { font-size: 13px; font-weight: 700; color: var(--fbTx2); padding: 4px 8px; }
.pillIn { flex: 1; padding: 10px 14px; border-radius: 999px; background: var(--fbBg); color: var(--fbTx2); text-align: left; font-size: 14px; font-weight: 500; }
.fbg .av { width: 40px; height: 40px; font-size: 16px; }
.fbg .av.sm { width: 30px; height: 30px; font-size: 12px; }
.fbg .av.xs { width: 24px; height: 24px; font-size: 10px; }
.fbPost header { display: flex; align-items: center; gap: 10px; }
.fbPost header div { flex: 1; min-width: 0; } .fbPost header b { display: block; font-size: 14px; font-weight: 900; } .fbPost header small { font-size: 12px; color: var(--fbTx2); }
.dots3 { font-style: normal; color: var(--fbTx2); font-size: 18px; padding: 0 4px; }
.saleTag { padding: 2px 8px; border-radius: 6px; background: var(--fbAccBg); color: var(--fbAcc); font-size: 11px; font-weight: 900; }
.fbPost .txt { margin: 10px 0; font-size: 15px; line-height: 1.5; font-weight: 500; }
.fbImg { position: relative; background: radial-gradient(circle at 50% 40%, #fff, #e9ecf0); border-radius: 10px; overflow: hidden; }
.fbImg img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.fbImg.big img { aspect-ratio: 4 / 3; }
.fbImg .hotTag { position: absolute; left: 8px; top: 8px; }
.fbSale { display: flex; gap: 12px; align-items: stretch; padding: 8px; border-radius: 12px; border: 1px solid var(--fbLine); }
.fbSale .fbImg { width: 42%; flex: none; }
.fbSaleInfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.fbSaleInfo .price, .dealD .price { font-size: 20px; font-weight: 900; color: var(--fbTx); }
.fbSaleInfo .nm, .dealD .nm { font-size: 13px; font-weight: 700; line-height: 1.35; }
.fbg .tierTag { position: static; display: inline-block; margin-right: 4px; font-size: 10px; padding: 0 6px; vertical-align: 1px; box-shadow: none; }
.fbSaleInfo small, .dealD > small { font-size: 11px; color: var(--fbTx2); font-weight: 500; }
.fbSaleInfo .fbBtn { margin-top: 4px; flex: none; }
.offLine { font-size: 12px; font-weight: 700; color: var(--fbAcc); }
.fbStats { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--fbTx2); }
.fbStats .emo { letter-spacing: -3px; } .fbStats .r { margin-left: auto; }
.fbActs { display: flex; margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--fbLine); }
.fbActs button { flex: 1; padding: 8px 0; font-size: 14px; font-weight: 700; color: var(--fbTx2); border-radius: 6px; }
.fbActs button.on { color: var(--fbAcc); }
.fbActs button:active { background: var(--fbBg); }
.fbCmt { display: flex; gap: 8px; margin-top: 8px; align-items: flex-start; }
.fbCmt p { margin: 0; padding: 7px 12px; border-radius: 16px; background: var(--fbBg); font-size: 13px; line-height: 1.4; }
.fbCmt p b { display: block; font-size: 12px; font-weight: 900; }
.mkHead, .msHead { padding: 4px var(--edge) 8px; } .mkHead b, .msHead b { display: block; font-size: 17px; font-weight: 900; } .mkHead small, .msHead small { font-size: 12px; color: var(--fbTx2); }
.mkGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 var(--edge); }
.mkCard { display: flex; flex-direction: column; gap: 2px; padding: 6px 6px 10px; border-radius: 12px; background: var(--fbCard); text-align: left; color: var(--fbTx); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.mkCard b { margin-top: 6px; font-size: 16px; font-weight: 900; }
.mkCard span { font-size: 13px; font-weight: 500; line-height: 1.3; height: 2.6em; overflow: hidden; }
.mkCard small { font-size: 11px; color: var(--fbTx2); }
.msRow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px var(--edge); background: var(--fbCard); text-align: left; color: var(--fbTx); border-bottom: 1px solid var(--fbLine); }
.msRow > div { flex: 1; min-width: 0; } .msRow b { font-size: 15px; font-weight: 700; }
.msRow p { margin: 2px 0; font-size: 13px; color: var(--fbTx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msRow small { font-size: 11px; color: var(--fbTx2); }
.msRow.unread b, .msRow.unread p { font-weight: 900; color: var(--fbTx); }
.msRow img { width: 48px; height: 48px; object-fit: contain; flex: none; border-radius: 8px; background: var(--fbBg); }
.msRow.closed { opacity: .55; }
.avWrap { position: relative; flex: none; display: inline-flex; }
.online { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: #31c24d; box-shadow: 0 0 0 2px #fff; }
/* 社團的對話框 */
.mBox.clubM, .mBox.chatBox { background: #fff; color: #111418; }
.dealD { display: flex; flex-direction: column; gap: 6px; }
.dealD .fbImg { margin: -4px -4px 4px; }
.seller { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; padding: 10px; border-radius: 12px; background: #eef0f3; }
.seller .av { width: 36px; height: 36px; font-size: 14px; } .seller b { font-size: 14px; font-weight: 900; } .seller p { margin: 2px 0 0; font-size: 13px; color: #4a5059; }
.mBox.chatBox { padding: 0; overflow: hidden; }
.chat header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #e1e4e8; }
.chat header div { flex: 1; } .chat header b { display: block; font-weight: 900; font-size: 15px; } .chat header small { font-size: 12px; color: #626a73; }
.chat .av { width: 38px; height: 38px; font-size: 15px; }
.chat .av.xs { width: 26px; height: 26px; font-size: 11px; }
.xBtn { width: 34px; height: 34px; border-radius: 50%; background: #eef0f3; font-weight: 900; font-size: 20px; color: #2f6fd8; flex: none; }
.chatItem { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 14px; border-radius: 0; background: #f6f7f9; border-bottom: 1px solid #e1e4e8; }
.chatItem img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: #fff; }
.chatItem div { display: flex; flex-direction: column; } .chatItem small { font-size: 11px; color: #626a73; } .chatItem b { font-size: 13px; font-weight: 900; color: #111418; } .chatItem span { font-size: 12px; color: #2f6fd8; font-weight: 700; }
.msgs { display: flex; flex-direction: column; gap: 4px; max-height: 34vh; overflow-y: auto; padding: 12px 14px; }
.mrow { display: flex; align-items: flex-end; gap: 6px; }
.mrow.me { justify-content: flex-end; }
.avSp { width: 26px; flex: none; }
.mrow.me .avSp { display: none; }
.mrow p { margin: 0; max-width: 75%; padding: 8px 12px; border-radius: 18px; font-size: 14px; line-height: 1.45; }
.mrow.them p { background: #eceef1; color: #111418; }
.mrow.me p { background: linear-gradient(135deg, #3f80ea, #2f6fd8); color: #fff; }
.quick, .chatBtns, .counter { padding: 0 14px 14px; }
.quick { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; border-top: 1px solid #e1e4e8; }
.qBtn { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 11px; border-radius: 12px; background: #eef0f3; color: #111418; font-weight: 900; font-size: 15px; }
.qBtn small { font-size: 11px; font-weight: 700; opacity: .8; }
.qBtn.ok { background: #2f6fd8; color: #fff; } .qBtn.no { color: #d0342c; }
.quick .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.counter { text-align: center; padding-top: 8px; border-top: 1px solid #e1e4e8; } .counter small { display: block; font-size: 12px; color: #626a73; font-weight: 700; } .counter b { font-size: 26px; font-weight: 900; color: #2f6fd8; }
.chat .mText { padding: 0 14px 14px; color: #626a73; }
.fbg input[type=range], .chat input[type=range] { accent-color: #2f6fd8; }
.v-club .stickyGo { background: linear-gradient(rgba(238, 240, 243, 0), #eef0f3 40%); }
/* 免責提醒 */
.disclaimer { margin: 6px auto 0; max-width: 320px; font-size: 11px; line-height: 1.6; color: var(--text2); opacity: .85; text-align: center; font-weight: 500; }
.mBox .disclaimer { max-width: none; margin-top: 4px; }
.disclaimer.club { color: #626a73; padding: 6px var(--edge) 4px; max-width: none; }