/* 版面：粉彩印刷海報。鈷藍、螢光粉、向日葵黃三色套印，平塗色塊、小圓角、不用陰影 */
:root {
  --bar-off: var(--bar-h, 58px);   /* 頂欄佔掉的高度；頂欄收起時是 0 */
  --blue: #2f55d4; --blue-2: #4b6fe6; --ink: #1d2a6b; --ink-dim: #5b6394;
  --pink: #ff4d8d; --pink-2: #e8367a; --sun: #ffc21a; --mint: #00a39a; --orange: #ff7a2f;
  --lilac: #eceaff; --lilac-2: #d9d3ff; --card: #ffffff; --line: #d9d3ff;
  --f-body: "Huninn", "PingFang TC", "Microsoft JhengHei", sans-serif;   /* 粉圓體 */
  --f-latin: var(--f-body);
  --r: 6px; --r-lg: 10px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { background: var(--blue); color: var(--ink); font-family: var(--f-body); font-weight: 500; font-size: 16px; line-height: 1.6; position: fixed; inset: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
h1, h2, h3 { text-wrap: balance; }

/* ---------- 舞台 ---------- */
#stage { position: absolute; inset: 0; background: var(--blue); }
#stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
.grain { display: none; }

/* ---------- 頂欄 ---------- */
.bar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: calc(9px + var(--sat)) max(16px, var(--sar)) 9px max(16px, var(--sal)); background: var(--blue); color: #fff; transition: transform .45s cubic-bezier(.3, .7, .3, 1); }
/* 頂欄自動收起：讀入 5 秒後往上收；滑鼠在最上方停 2 秒再出現，移開 1 秒後收起（js/app.js 的 barAuto） */
body.bar-hidden { --bar-off: 0px; }
body.bar-hidden .bar { transform: translateY(-100%); }
.status, .tag.zone-pill { transition: top .45s cubic-bezier(.3, .7, .3, 1); }
#card { transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .25s, top .45s, max-height .45s; }
/* 沒有滑鼠的裝置（手機、平板）：頂欄收起時，最上方中間露出一個小拉環，點了頂欄就出來 */
.bar-tab { position: absolute; top: 0; left: 50%; z-index: 6; transform: translate(-50%, -110%); border: 0; border-radius: 0 0 12px 12px; background: var(--blue); color: #fff;
  font: inherit; font-size: 13px; font-weight: 900; letter-spacing: .1em; padding: calc(3px + var(--sat)) 18px 5px; cursor: pointer; transition: transform .35s; box-shadow: 0 2px 0 rgba(29, 42, 107, .25); }
body.bar-hidden .bar-tab { transform: translate(-50%, 0); }
@media (hover: hover) and (pointer: fine) { .bar-tab { display: none; } }
@media (max-width: 520px) { .bar-tab { padding: calc(2px + var(--sat)) 14px 4px; font-size: 15px; } .bar-tab .t { display: none; } }   /* 窄螢幕只留箭頭，才不會碰到左右的按鈕 */
@media (prefers-reduced-motion: reduce) { .bar, .bar-tab, .status, .tag.zone-pill, .hint, #card { transition-duration: .01s; } }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: #fff; font-size: 21px; font-weight: 900; letter-spacing: .08em; }
.logo svg { width: 34px; height: 34px; flex: none; border-radius: 6px; box-shadow: 0 0 0 2px #fff; }
.bar .sub { font-family: var(--f-latin); font-size: 13px; color: var(--sun); letter-spacing: .04em; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.modes { display: inline-flex; background: var(--ink); border-radius: var(--r); padding: 3px; gap: 2px; }
.modes button { border: 0; background: transparent; border-radius: 4px; min-height: 34px; padding: 3px 14px; font-size: 15px; color: #fff; font-weight: 700; }
.modes button[aria-pressed="true"] { background: var(--sun); color: var(--ink); }
.link-btn { background: none; border: 0; padding: 6px 4px; color: #fff; font-size: 15px; font-weight: 700; white-space: nowrap; text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: 3px; text-underline-offset: 5px; }

/* ---------- 畫面上的色塊 ---------- */
.status { position: absolute; top: calc(var(--bar-off) + 10px); right: max(12px, var(--sar)); z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.status > * { pointer-events: auto; }
/* 功能區收合：只剩右上角的「☰」 */
.menu-btn { width: 40px; height: 40px; border: 0; border-radius: var(--r); background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.menu-btn .m-close { display: none; }
.menu-btn[aria-expanded="true"] { background: var(--pink); }
.menu-btn[aria-expanded="true"] .m-open { display: none; }
.menu-btn[aria-expanded="true"] .m-close { display: inline; }
.status.collapsed > :not(.menu-btn) { display: none; }
/* 展開時：整個功能區包在一個有外框的面板裡，右上角的 × 嵌在外框的角上，像面板的把手 */
.status:not(.collapsed) { background: var(--lilac); border-radius: var(--r-lg); padding: 8px; box-shadow: 0 0 0 3px var(--ink), 0 4px 0 3px rgba(29, 42, 107, .25); }
.status:not(.collapsed) .menu-btn { margin: -8px -8px 2px 0; border-radius: 0 var(--r-lg) 0 var(--r-lg); width: 44px; height: 40px; }
/* 觸控裝置的窄螢幕：頂欄收起時上方中間有拉環，展開的面板往下讓一點，才不會壓到拉環 */
@media (max-width: 520px) and (hover: none), (max-width: 520px) and (pointer: coarse) { body.bar-hidden .status:not(.collapsed) { top: calc(var(--sat) + 40px); } }
/* 有新版本的提示 */
.update-bar { position: absolute; top: calc(var(--bar-off) + 10px); left: 50%; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 6px 6px 6px 16px; font-weight: 700; box-shadow: 0 3px 0 rgba(29, 42, 107, .3); transition: top .45s; }
.update-bar .btn { padding: 6px 16px; min-height: 0; }
.update-x { border: 0; background: none; color: #fff; font-size: 20px; line-height: 1; padding: 4px 8px; cursor: pointer; }
@media (max-width: 760px) { .update-bar { top: auto; bottom: calc(80px + var(--sab)); } }
.tag { background: var(--ink); border: 0; border-radius: 4px; padding: 3px 10px; font-size: 14px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; color: #fff; }
.tag.zone-pill { position: absolute; top: calc(var(--bar-off) + 10px); left: max(12px, var(--sal)); z-index: 3; background: var(--sun); color: var(--ink); font-weight: 900; padding: 4px 12px; }
.tag.zone-pill small { font-family: var(--f-latin); font-weight: 700; font-size: 11px; letter-spacing: .16em; margin-left: 6px; }
.seg { display: inline-flex; background: var(--ink); border-radius: var(--r); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; width: 36px; height: 30px; border-radius: 4px; display: grid; place-items: center; }
.seg button[aria-pressed="true"] { background: var(--pink); }
.seg svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.row-btns { display: flex; gap: 4px; }
.seg.view button:active { background: var(--blue); }
#needle { transition: none; }
#needle path { fill: #fff; stroke: none; }
#needle path.n { fill: var(--pink); }
.tag-btn { cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; }
.tag-btn[aria-pressed="true"] { background: var(--pink); }
.hint { position: absolute; top: calc(var(--bar-off) + 52px); left: 50%; transform: translateX(-50%); z-index: 3; background: var(--pink); color: #fff; font-weight: 700; border-radius: var(--r); padding: 7px 16px; font-size: 14px; width: max-content; max-width: calc(100% - 32px); text-align: center; transition: opacity .4s, top .45s; pointer-events: none; }
.hint.out { opacity: 0; }

/* ---------- 底部按鈕 ---------- */
.dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 10px max(16px, var(--sar)) calc(14px + var(--sab)) max(16px, var(--sal)); pointer-events: none; }
.dock > * { pointer-events: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 8px 18px; border: 0; border-radius: var(--r); background: var(--card); color: var(--ink); font-size: 16px; font-weight: 900; text-decoration: none; transition: transform .12s, background .12s; }
.btn:hover { background: var(--lilac); }
.btn:active { transform: translateY(2px); }
.btn-accent { background: var(--pink); color: #fff; }
.btn-accent:hover { background: var(--pink-2); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--ink); }
.btn-plain { background: var(--card); }
.dock .btn-plain { background: var(--sun); }
.btn-sm { min-height: 38px; padding: 4px 14px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }

/* ---------- 面板 ---------- */
.sheet { position: absolute; z-index: 6; background: var(--card); display: flex; flex-direction: column; transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .25s; box-shadow: 0 0 0 3px var(--ink); }
.sheet-handle { display: none; }
.sheet .close, .dialog .close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: var(--r); border: 0; background: var(--sun); color: var(--ink); font-size: 22px; font-weight: 700; line-height: 1; display: grid; place-items: center; z-index: 2; }
.sheet .head { padding: 18px 18px 14px; background: var(--blue); color: #fff; }
.sheet .head .muted { color: #dfe4ff; }
.sheet .head h2 { color: #fff; }
.sheet .body { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; min-height: 0; padding: 14px 18px calc(18px + var(--sab)); }
.eyebrow { font-family: var(--f-latin); font-size: 12px; letter-spacing: .2em; color: var(--pink); font-weight: 700; text-transform: uppercase; }
.sheet .head .eyebrow { color: var(--sun); }
.sheet h2 { margin: 2px 0 4px; font-size: 25px; line-height: 1.25; color: var(--ink); font-weight: 900; }
.sheet h3 { margin: 18px 0 8px; font-size: 13px; color: var(--pink); letter-spacing: .14em; font-weight: 900; }
.muted { color: var(--ink-dim); font-size: 14px; }

#sidebar { top: 0; right: 0; bottom: 0; width: 350px; transform: translateX(105%); padding-top: var(--sat); background: var(--card); }
#sidebar .head { padding-top: calc(18px + var(--sat)); margin-top: calc(-1 * var(--sat)); }
#sidebar.open { transform: none; }
#card { top: calc(var(--bar-off) + 52px); left: max(16px, var(--sal)); bottom: 16px; width: 360px; border-radius: var(--r-lg); transform: translateX(-120%); max-height: calc(100% - var(--bar-off) - 68px); overflow: hidden; }
#card.open { transform: none; }
#chat { left: 50%; bottom: calc(80px + var(--sab)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; width: min(420px, calc(100% - 32px)); border-radius: var(--r-lg); overflow: hidden; }
#chat.open { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
#chat .head .muted { color: #dfe4ff; }

.search { width: 100%; border: 0; border-radius: var(--r); padding: 10px 14px; background: #fff; color: var(--ink); font-size: 16px; margin-top: 10px; }
.search:focus { outline: 3px solid var(--sun); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { border: 0; background: var(--lilac); border-radius: 4px; padding: 3px 12px; font-size: 14px; font-weight: 700; min-height: 32px; color: var(--ink); }
.head .chip { background: var(--blue-2); color: #fff; }
.chip[aria-pressed="true"], .chip.on, .head .chip[aria-pressed="true"], .head .chip.on { background: var(--sun); color: var(--ink); }
.swatch { width: 30px; height: 30px; border-radius: 4px; border: 0; padding: 0; box-shadow: inset 0 0 0 2px rgba(29,42,107,.15); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--r); cursor: pointer; }
.list li:hover { background: var(--lilac); }
.list .awn { width: 16px; height: 16px; border-radius: 3px; flex: none; }
.list .nm { font-weight: 900; }
.list .tg { font-size: 12px; color: var(--ink-dim); }
.list .st { margin-left: auto; font-size: 13px; color: var(--ink-dim); white-space: nowrap; font-weight: 700; }
.list .st .v { color: var(--mint); } .list .st .f { color: var(--pink); }
.island-head { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 6px; padding: 0 8px 4px; font-weight: 900; color: var(--blue); border-bottom: 3px solid var(--lilac-2); }
.island-head small { font-family: var(--f-latin); color: var(--pink); font-weight: 700; font-size: 11px; letter-spacing: .16em; }

/* ---------- 店家卡 ---------- */
.card-top { display: flex; align-items: center; gap: 14px; padding-right: 40px; }
.card-awning { width: 54px; height: 54px; border-radius: var(--r); flex: none; position: relative; overflow: hidden; }
.card-awning::after { content: ""; position: absolute; left: 12px; right: 12px; top: 8px; height: 15px; border-radius: 15px 15px 0 0; background: rgba(255,255,255,.95); }
.card-awning::before { content: ""; position: absolute; left: 10px; right: 10px; bottom: 9px; height: 22px; border-radius: 2px; background: rgba(255,255,255,.7); }
.s-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 6px; }
.s-tag { font-size: 12px; font-weight: 700; border-radius: 3px; padding: 1px 8px; background: var(--lilac); color: var(--ink); }
.s-tag.open { background: var(--sun); color: var(--ink); } .s-tag.closed { background: #e4e2ef; color: var(--ink-dim); }
.say { background: var(--lilac); border-left: 5px solid var(--pink); border-radius: 0 var(--r) var(--r) 0; padding: 12px 14px; margin: 12px 0 4px; font-size: 15px; color: var(--ink); }
.say b { display: block; font-size: 12px; color: var(--ink-dim); margin-top: 6px; font-weight: 500; }
.goods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.good { border-radius: var(--r); background: var(--lilac); overflow: hidden; text-align: center; }
.good .ph { height: 74px; display: grid; place-items: center; font-size: 36px; background: #fff; margin: 5px 5px 0; border-radius: 4px; }
.good .ph img { width: 100%; height: 100%; object-fit: cover; }
.good .n { font-size: 13px; font-weight: 900; padding: 6px 4px 0; line-height: 1.25; }
.good .p { font-family: var(--f-latin); font-size: 13px; font-weight: 700; color: var(--pink-2); padding: 0 4px 8px; font-variant-numeric: tabular-nums; }
.card-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.card-acts .btn { flex: 1 1 auto; }
#card .btn:not(.btn-primary):not(.btn-accent), .dialog .btn-plain { background: var(--lilac); }
.note { font-size: 12px; color: var(--ink-dim); margin-top: 12px; }

/* ---------- 對話框 ---------- */
.dialog { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(29, 42, 107, .6); padding: 16px; }
.dialog .box { background: var(--card); border-radius: var(--r-lg); width: min(560px, 100%); max-height: calc(100% - 32px); overflow: auto; padding: 22px 22px calc(22px + var(--sab)); position: relative; border-top: 10px solid var(--pink); }
.dialog h2 { margin: 0 0 6px; font-size: 23px; font-weight: 900; padding-right: 40px; }
.field { margin-top: 14px; }
.field label, .field .lab { display: block; font-weight: 900; font-size: 14px; margin-bottom: 6px; color: var(--blue); }
.input { width: 100%; border: 0; border-radius: var(--r); padding: 10px 12px; background: var(--lilac); font-size: 16px; }
.input:focus { outline: 3px solid var(--blue); background: #fff; }
.char-layout { display: grid; grid-template-columns: 160px 1fr; gap: 16px; }
#charPreview { width: 160px; height: 210px; border-radius: var(--r); background: var(--blue); display: block; }
@media (max-width: 520px) { .char-layout { grid-template-columns: 1fr; } #charPreview { width: 100%; height: 170px; } }
#mapCanvas { width: 100%; max-width: 100%; aspect-ratio: 1000 / 560; border-radius: var(--r); background: var(--blue); display: block; cursor: pointer; touch-action: manipulation; }
.help ol { padding-left: 22px; margin: 10px 0; } .help li { margin: 6px 0; } .help li::marker { color: var(--pink); font-weight: 900; }
kbd { border: 0; border-radius: 3px; padding: 0 6px; font-family: var(--f-latin); font-weight: 700; font-size: 13px; background: var(--ink); color: #fff; }
.meter { position: relative; height: 34px; border-radius: var(--r); background: var(--lilac); margin: 16px 0 6px; overflow: hidden; }
.meter .zone { position: absolute; top: 0; bottom: 0; background: var(--mint); }
.meter .dot { position: absolute; top: 50%; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: var(--pink); border: 3px solid #fff; transform: translateY(-50%); }
.game-msg { min-height: 1.6em; font-size: 16px; margin: 8px 0 0; }
.game-msg .win { color: var(--mint); font-size: 18px; font-weight: 900; }
.game-box { width: min(440px, 100%); }

/* ---------- 3D 上的標籤 ---------- */
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; will-change: transform; white-space: nowrap; translate: -50% -100%; }
.lbl.tag { background: var(--ink); color: #fff; border-radius: 3px; padding: 1px 8px 1px 3px; font-size: 13px; }
.lbl.tag b { display: inline-block; background: var(--sun); color: var(--ink); border-radius: 2px; padding: 0 6px; margin-right: 4px; font-size: 12px; font-weight: 900; }
/* 玩家的名牌：比 NPC 的大、粉紅框、下面一個小箭頭指著自己 */
.lbl.tag.me { font-size: 14px; padding: 2px 9px 2px 3px; border: 2px solid var(--pink); border-radius: 6px; box-shadow: 0 2px 0 rgba(29, 42, 107, .25); transform-origin: 50% 100%; }
.lbl.tag.me b { background: var(--pink); color: #fff; font-size: 13px; padding: 0 7px; line-height: 19px; vertical-align: middle; }
.lbl.tag.me.solo { padding: 2px 3px; }
.lbl.tag.me.solo b { margin-right: 0; }
.lbl.tag.me::after { content: ''; position: absolute; left: 50%; bottom: -9px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--pink); border-bottom: 0; }
.lbl.bubble { background: #fff; border-radius: var(--r); padding: 4px 12px; font-size: 14px; font-weight: 700; color: var(--ink); margin-top: -8px; box-shadow: 0 0 0 2px var(--ink); }
.lbl.bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 0; height: 0; border: 7px solid transparent; border-top-color: var(--ink); border-bottom: 0; transform: translateX(-50%); }
.lbl.bubble.mine { background: var(--sun); }
.lbl.pill { background: #fff; border-radius: 4px; padding: 4px 13px 4px 6px; font-size: 16px; font-weight: 900; color: var(--ink); display: inline-flex; align-items: center; gap: 7px; box-shadow: 0 0 0 3px var(--ink); }
.lbl.pill i { width: 18px; height: 18px; border-radius: 3px; display: inline-block; }
.lbl.badge { display: flex; gap: 3px; }
.lbl.badge span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 3px; color: #fff; font-size: 12px; font-weight: 900; }
.lbl.badge .v { background: var(--mint); } .lbl.badge .f { background: var(--pink); }

/* ---------- 提示、載入 ---------- */
.toast { position: absolute; left: 50%; bottom: calc(88px + var(--sab)); transform: translate(-50%, 10px); background: var(--ink); color: #fff; font-weight: 700; border-radius: var(--r); padding: 8px 18px; font-size: 15px; opacity: 0; transition: .25s; z-index: 30; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--blue); color: #fff; transition: opacity .5s; }
.splash.out { opacity: 0; pointer-events: none; }
.splash .logo { font-size: 34px; flex-direction: column; gap: 12px; }
.splash .logo svg { width: 84px; height: 84px; box-shadow: 0 0 0 4px #fff; animation: bob 2.4s ease-in-out infinite; }
.splash p { margin-top: 12px; color: var(--sun); text-align: center; font-weight: 700; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.fade { position: fixed; inset: 0; background: var(--blue); opacity: 0; pointer-events: none; transition: opacity .35s; z-index: 15; }
.fade.on { opacity: 1; }

@media (min-width: 761px) { body.sidebar-open .status { right: 366px; } body.sidebar-open .dock { right: 350px; } body.sidebar-open .hint { left: calc(50% - 175px); } }

/* ---------- 手機 ---------- */
@media (max-width: 760px) {
  .hide-sm { display: none; }
  .bar { gap: 8px; padding-left: max(12px, var(--sal)); padding-right: max(12px, var(--sar)); }
  .logo { font-size: 18px; } .logo svg { width: 28px; height: 28px; }
  .bar .sub { display: none; }
  .modes button { min-height: 32px; padding: 3px 11px; font-size: 14px; }
  .dock { flex-wrap: nowrap; gap: 5px; padding-left: max(8px, var(--sal)); padding-right: max(8px, var(--sar)); }
  .dock .btn { padding: 6px 11px; font-size: 15px; min-height: 42px; min-width: 0; flex: 0 1 auto; }
  .hint { top: auto; bottom: calc(72px + var(--sab)); }
  .status { gap: 5px; }
  .status .tag { font-size: 12px; }
  .sheet { left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; width: auto !important; max-height: none !important; border-radius: var(--r-lg) var(--r-lg) 0 0 !important; height: 56vh; transform: translateY(105%) !important; overflow: hidden; }
  .sheet.open { transform: none !important; }
  .sheet.full { height: calc(100vh - var(--sat) - 20px); height: calc(100dvh - var(--sat) - 20px); }
  .sheet-handle { display: block; width: 100%; background: var(--blue); border: 0; padding: 9px 0 2px; }
  #card .sheet-handle { background: #fff; }
  .sheet-handle i { display: block; width: 44px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.6); margin: 0 auto; }
  #card .sheet-handle i { background: var(--lilac-2); }
  .sheet .head { padding-top: 6px; }
  #sidebar { padding-top: 0; }
  #sidebar .head { margin-top: 0; padding-top: 6px; }
  #chat { height: auto !important; opacity: 1; }
  #chat .body { padding-bottom: calc(80px + var(--sab)); }
  .good .ph { height: 62px; font-size: 30px; }
  .lbl.pill { font-size: 13px; padding: 3px 10px 3px 5px; }
  .lbl.pill i { width: 14px; height: 14px; }
}
@media (max-width: 380px) { .goods { grid-template-columns: repeat(2, 1fr); } }
/* 還沒上架的集數：清單裡淡一點 */
.list li.soon { opacity: .55; }
.list li.soon .st { font-weight: 700; }
