/* 奧德賽：諸神誓約 — 遊戲介面
   色票依 docs/ART_BIBLE.md：深淵黑藍底、深海藍面板、古金細線。 */
:root {
  --bg: #080D14; --panel: #101B27; --raised: #182634; --sunk: #0B131D;
  --gold: #D5AE68; --gold-light: #F1D79A; --gold-dim: #8C7448;
  --line: #2A3747; --line-strong: #4A5260;
  --text: #EAE4D8; --muted: #98A6B3; --faint: #64727F;
  --hp: #B94D50; --mp: #508FBF; --exp: #C9A24E; --ok: #65AC8D; --danger: #D85B55;
  --r-normal: #c9c6bd; --r-magic: #5aa2ff; --r-rare: #f2cf5b; --r-set: #6fd27a; --r-unique: #c98a3c;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --radius: 4px;
  /* v1.8.4 主題：themes.js 會依選擇的配色覆寫這些值 */
  --acc-rgb: 213,174,104; --tile: #131f2c; --tile-2: #172433; --tile-hi: #1f2d3a;
  --btn-a: #e2c07e; --btn-b: #b8914c; --btn-ink: #1a1206; --plate-a: #111d2a; --plate-b: #0d1621; --tabbar: #0a121b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--sans); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--gold-light); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: .02em; }

/* --------------------------------------------------------------- buttons */
.btn { appearance: none; border: 1px solid var(--line-strong); background: var(--raised); padding: .45em 1em; border-radius: var(--radius); cursor: pointer; line-height: 1.3; }
.btn:hover { border-color: var(--gold-dim); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(var(--btn-a), var(--btn-b)); color: var(--btn-ink); border-color: var(--gold-light); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { border-color: #7b3b3a; color: #f0b1ad; }
.btn.small { padding: .2em .65em; font-size: 13px; }
.btn.ghost { background: transparent; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin-bottom: 12px; }
/* v1.10.40 下拉選單、輸入框不可以被長名稱撐寬（手機上會把整個視窗往右推）；放不下的字用「…」 */
select { max-width: 100%; min-width: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.field select, .field input { width: 100%; min-width: 0; }
#pop-body { overflow-x: hidden; }
#pop-body > *, .enchant-box, .enchant-box > * { min-width: 0; max-width: 100%; }
.btn.asking { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(230, 190, 110, .35) inset; }
.field label { color: var(--muted); font-size: 13px; }
.field input, .field select { background: var(--sunk); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .55em .7em; }
.field input:focus { border-color: var(--gold); outline: none; }

/* Greek key band — the one ornament, used only to frame the battle stage and the title */
.meander { height: 10px; background: var(--gold); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10' viewBox='0 0 20 10'%3E%3Cpath d='M0 9.5h4.5V3.5h7v4h-3v-2' fill='none' stroke='%23D5AE68' stroke-width='1'/%3E%3Cpath d='M11.5 7.5V9.5H20' fill='none' stroke='%23D5AE68' stroke-width='1'/%3E%3C/svg%3E") repeat-x left center / 20px 10px; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10' viewBox='0 0 20 10'%3E%3Cpath d='M0 9.5h4.5V3.5h7v4h-3v-2' fill='none' stroke='%23D5AE68' stroke-width='1'/%3E%3Cpath d='M11.5 7.5V9.5H20' fill='none' stroke='%23D5AE68' stroke-width='1'/%3E%3C/svg%3E") repeat-x left center / 20px 10px; opacity: .7; }

/* --------------------------------------------------------------- auth & select */
.screen-center { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background:
  linear-gradient(rgba(8,13,20,.55), rgba(8,13,20,.85)), url("/assets/ui/login_bg.webp") center / cover no-repeat,
  radial-gradient(ellipse 80% 60% at 50% 0%, #15263a 0%, transparent 70%), var(--bg); }
.title-block .emblem { width: 72px; height: 72px; display: block; margin: 0 auto 8px; }
.title-block { text-align: center; margin-bottom: 28px; }
.title-block h1 { font-size: clamp(30px, 7vw, 46px); color: var(--gold-light); font-weight: 700; letter-spacing: .12em; }
.title-block .sub { color: var(--muted); margin-top: 6px; font-family: var(--serif); }
.title-block .meander { width: 220px; margin: 14px auto 0; }
.auth-card { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--gold-dim); padding: 22px; border-radius: var(--radius); }
.auth-card .row { display: flex; gap: 10px; }
.auth-card .row .btn { flex: 1; }
.form-error { color: var(--danger); min-height: 1.4em; font-size: 14px; }
.foot-link { text-align: center; margin-top: 16px; font-size: 14px; }

.select-wrap { width: min(860px, 100%); }
.char-list { display: grid; gap: 10px; margin-bottom: 26px; }
.char-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold-dim); padding: 12px 16px; border-radius: var(--radius); }
.char-row h3 { font-size: 18px; }
.char-row .meta { color: var(--muted); font-size: 14px; }
.idle-badge { color: var(--ok); }
.class-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.class-opt { display: flex; flex-direction: column; justify-content: flex-start; text-align: left; background: var(--panel); border: 1px solid var(--line); padding: 14px; border-radius: var(--radius); cursor: pointer; }
.class-opt[aria-pressed="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-dim); }
.class-opt h3 { font-size: 17px; color: var(--gold-light); }
.class-opt .role { font-size: 13px; color: var(--muted); }
.class-opt p { font-size: 13px; margin: 6px 0 0; color: #c6c0b4; }

/* --------------------------------------------------------------- game layout
   版面架構：
   手機：戰場佔滿上半部、角色資訊浮在戰場上（玻璃卡），下方頁籤＋內容；點目前頁籤可收合內容讓戰場變大
   桌機：左角色牌 | 中戰場＋日誌／聊天 | 右頁籤側欄，最下方整條經驗條 */
.game { min-height: 100dvh; background: var(--bg); }
.d-only { display: none !important; }
.m-only { display: block; }

/* shared pieces */
.avatar { position: relative; width: 40px; height: 52px; border: 1px solid var(--gold-dim); border-radius: 3px; overflow: hidden; display: grid; place-items: center; font-family: var(--serif); color: var(--gold-light); background: var(--sunk); flex: none; }
.avatar img.art, .char-thumb img.art, .class-art img.art, .char-portrait img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.coin { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.char-thumb { position: relative; width: 45px; height: 60px; border: 1px solid var(--gold-dim); border-radius: 3px; overflow: hidden; display: grid; place-items: center; font-family: var(--serif); color: var(--gold-light); background: var(--sunk); }
.class-art { position: relative; aspect-ratio: 3 / 4; margin: -14px -14px 10px; overflow: hidden; display: grid; place-items: center; font: 600 40px var(--serif); color: var(--gold-dim); background: var(--sunk); border-bottom: 1px solid var(--line); }
.class-opt[aria-pressed="true"] .class-art { border-bottom-color: var(--gold); }
.char-portrait { position: relative; float: right; width: 110px; aspect-ratio: 3 / 4; margin: 0 0 10px 14px; border: 1px solid var(--gold-dim); border-radius: 4px; overflow: hidden; display: grid; place-items: center; font: 600 36px var(--serif); color: var(--gold-dim); background: var(--sunk); }
.tab-ic { display: block; width: 22px; height: 22px; margin: 0 auto 2px; }
.bars { display: grid; gap: 3px; min-width: 0; }
.bar { position: relative; height: 16px; background: var(--sunk); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 0; transition: width .35s; }
.bar span { position: relative; display: block; font-size: 11px; line-height: 14px; padding-left: 6px; color: #f3eee4; text-shadow: 0 1px 1px #000; }
.bar.hp i { background: linear-gradient(90deg, #7f2e31, var(--hp)); }
.bar.mp i { background: linear-gradient(90deg, #2c5778, var(--mp)); }
.bar.exp { height: 10px; } .bar.exp i { background: linear-gradient(90deg, #8a6a2c, var(--exp)); } .bar.exp span { font-size: 9px; line-height: 8px; }

/* character plate (left on desktop, floating glass card on phone) */
.plate { display: grid; gap: 6px; }
.plate-top { display: flex; gap: 10px; align-items: center; }
.plate-id { flex: 1; min-width: 0; line-height: 1.25; }
.plate-id .name { font-family: var(--serif); font-size: 17px; color: var(--gold-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate-id .cls { font-size: 12px; color: var(--muted); }
.plate-gold { color: var(--gold-light); font-size: 14px; white-space: nowrap; }
.plate-stats { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.plate-stats b { color: var(--text); font-weight: 500; }
.plate-box { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; font-size: 13px; color: var(--muted); display: grid; gap: 2px; }
.plate-box b { color: var(--text); font-weight: 500; }
.plate-links { display: flex; flex-wrap: wrap; gap: 6px; }
.plate-links a.btn { text-decoration: none; color: inherit; font-size: 13px; }
.buffs { display: flex; flex-wrap: wrap; gap: 5px; font-size: 12px; }
.buffs:empty { display: none; }
.buffs span { border: 1px solid var(--line); background: rgba(16,27,39,.85); padding: 0 6px; border-radius: 2px; color: var(--gold-light); }

/* arena */
.arena { display: grid; gap: 10px; align-content: start; min-width: 0; }
.stage-frame { border: 1px solid var(--gold-dim); padding: 4px; background: #05090e; }
.stage-frame .meander { margin: 0 2px; }
.stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0b1520 center / cover no-repeat; }
.stage.no-art { background: radial-gradient(ellipse 70% 55% at 50% 38%, #24384d 0%, #0f1b28 55%, #070c12 100%); }
.stage.no-art::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 32%; background: linear-gradient(#0c151f00, #101820 30%, #0a1017); }
.stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,9,14,.55) 0%, transparent 30%, transparent 60%, rgba(5,9,14,.8) 100%); pointer-events: none; }
.marquee { position: absolute; top: 0; left: 0; right: 0; z-index: 6; background: linear-gradient(90deg, rgba(60,40,10,.92), rgba(16,27,39,.92)); border-bottom: 1px solid var(--gold-dim); color: var(--gold-light); font-size: 13px; padding: 3px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marquee[data-type="drop"] { color: var(--r-unique); }
.marquee[data-type="relic"] { color: #ffd27a; font-weight: 700; background: linear-gradient(90deg, rgba(90,60,10,.95), rgba(40,30,12,.95)); border-bottom-color: #ffcf8a; animation: marquee-glow 1.2s ease-in-out infinite alternate; }
@keyframes marquee-glow { from { box-shadow: 0 0 0 rgba(255,207,138,0); } to { box-shadow: 0 0 14px rgba(255,207,138,.6); } }
.stage-zone { position: absolute; top: 12px; left: 0; right: 0; text-align: center; z-index: 2; pointer-events: none; }
.stage-zone h2 { font-size: clamp(16px, 2.6vw, 24px); color: var(--gold-light); text-shadow: 0 2px 6px #000; letter-spacing: .08em; }
.stage-zone .tag { font-size: 12px; color: #cfc8ba; text-shadow: 0 1px 3px #000; }
.stage-phase { position: absolute; top: 12px; right: 12px; z-index: 3; font-size: 12px; color: #d9d2c4; background: rgba(8,13,20,.7); border: 1px solid var(--line); padding: 2px 8px; border-radius: 2px; }
.actor { position: absolute; bottom: 16%; z-index: 2; display: grid; justify-items: center; gap: 6px; transition: transform .15s; }
button.actor { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.actor.hero { left: 12%; }
.actor.mob { right: 12%; }
.sil { position: relative; overflow: hidden; width: clamp(56px, 11vw, 110px); aspect-ratio: 3 / 4; display: grid; place-items: center; font-family: var(--serif); font-size: clamp(20px, 4vw, 38px); color: var(--gold-light);
  background: radial-gradient(ellipse at 50% 30%, rgba(var(--acc-rgb), .18), rgba(8,13,20,.6) 70%); border: 1px solid rgba(var(--acc-rgb), .35); border-radius: 50% 50% 6px 6px; }
.sil img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.sil.has-sprite { background: none; border: 0; border-radius: 0; width: clamp(110px, 21vw, 250px); aspect-ratio: 1; overflow: visible; }
.sil .sprite { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-repeat: no-repeat; background-position: 0 0; pointer-events: none; }
.actor.hero.hit .sil.has-sprite { transform: none; }
.actor.mob .sil { color: #e8c9c4; border-color: rgba(185,77,80,.45); background: radial-gradient(ellipse at 50% 30%, rgba(185,77,80,.22), rgba(8,13,20,.6) 70%); }
.actor.mob.boss .sil { width: clamp(80px, 15vw, 150px); border-color: var(--r-unique); }
.actor.mob:hover .stele { border-color: var(--gold-dim); }
.actor.hit { transform: translateX(6px); } .actor.hero.hit { transform: translateX(-6px); }
.actor.gone { opacity: 0; pointer-events: none; transition: opacity .4s; }
.stele { min-width: 110px; max-width: 46vw; text-align: center; background: linear-gradient(#1f2b38, #121b25); border: 1px solid #3c4a5a; border-top-color: #5b6a7b; padding: 3px 10px 5px; clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%, 0 6px); }
.stele .nm { font-family: var(--serif); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stele .lv { font-size: 11px; color: var(--muted); }
.stele .bar { height: 6px; margin-top: 3px; }
.gauge .bar span, .stele .bar span { display: none; }
.actor.boss .stele { border-color: var(--r-unique); } .actor.boss .stele .nm { color: var(--r-unique); }
.floater { position: absolute; z-index: 4; font-weight: 700; font-size: clamp(14px, 2.4vw, 20px); text-shadow: 0 2px 2px #000, 0 0 6px #000; pointer-events: none; animation: rise 1s ease-out forwards; }
.floater.crit { color: #ffd36b; font-size: clamp(18px, 3.2vw, 28px); }
.floater.taken { color: #ff8f86; } .floater.heal { color: #86e0ac; } .floater.miss { color: #a9b3bd; font-weight: 400; }
.floater.loot { color: var(--r-rare); font-size: 14px; } .floater.loot.unique { color: var(--r-unique); } .floater.loot.set { color: var(--r-set); } .floater.loot.magic { color: var(--r-magic); }
@keyframes rise { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-48px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .floater { animation-duration: .01s; } .actor { transition: none; } .bar i { transition: none; } }
.stage-controls { position: absolute; bottom: 10px; left: 0; right: 0; z-index: 5; display: flex; justify-content: center; gap: 10px; align-items: center; }
.hunt-btn { min-width: 132px; padding: .55em 1.2em; font-size: 15px; }
.gauge { width: min(240px, 46%); }
.gauge .bar { height: 8px; } .gauge .bar i { background: var(--r-unique); }
.gauge small { display: block; font-size: 11px; color: #d6cdb9; text-shadow: 0 1px 2px #000; text-align: center; }

/* town (not hunting): NPC grid on the stage */
.town { position: absolute; inset: 46px 12px 56px; z-index: 4; display: grid; align-content: center; gap: 8px; }
.town .town-title { text-align: center; font-family: var(--serif); color: var(--gold-light); font-size: 15px; letter-spacing: .3em; text-shadow: 0 1px 3px #000; }
.town .npcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-width: 760px; width: 100%; margin: 0 auto; }
.npc { text-align: left; background: rgba(11,19,29,.86); background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; cursor: pointer; color: var(--text); font: inherit; }
.npc:hover { border-color: var(--gold); }
.npc b { display: block; font-family: var(--serif); color: var(--gold-light); font-size: 14px; font-weight: 600; }
.npc small { color: var(--muted); font-size: 12px; }

/* feed (desktop): battle log + chat */
.feed { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 0; }
.feed-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-rows: auto 1fr auto; min-height: 0; }
.feed-box h3 { font-size: 14px; color: var(--gold-light); padding: 7px 10px; border-bottom: 1px solid var(--line); margin: 0; }
.feed-box .log, .feed-box .chat-box { border: 0; height: auto; min-height: 0; }
.feed-box .chat-form { padding: 6px; margin: 0; border-top: 1px solid var(--line); }
.log { background: var(--sunk); border: 1px solid var(--line); height: 190px; overflow-y: auto; padding: 6px 10px; font-size: 13px; line-height: 1.6; }
.log div { color: #c8c2b6; }
.log .k-kill { color: #e8e2d4; } .log .k-lvl { color: var(--gold-light); font-weight: 600; } .log .k-death { color: var(--danger); font-weight: 600; }
.log .k-drop { color: var(--r-normal); } .log .r-magic { color: var(--r-magic); } .log .r-rare { color: var(--r-rare); } .log .r-set { color: var(--r-set); } .log .r-unique { color: var(--r-unique); }
.log .k-boss { color: var(--r-unique); }

/* rail: tabs + panel */
.rail { display: grid; grid-template-rows: auto 1fr; min-height: 0; background: var(--panel); }
.tabs { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 4px; color: var(--muted); cursor: pointer; font-size: 14px; position: relative; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--gold-light); border-bottom-color: var(--gold); background: rgba(var(--acc-rgb), .06); }
.tabs .dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.panel { overflow-y: auto; padding: 14px 16px 40px; min-height: 0; }
.expline { position: relative; height: 14px; background: var(--sunk); border-top: 1px solid var(--gold-dim); }
.expline i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #6e5420, var(--gold)); transition: width .4s; }
.expline span { position: relative; display: block; text-align: center; font-size: 10.5px; line-height: 13px; color: #fff; text-shadow: 0 1px 2px #000; }

/* ---------- phone (< 1100px): full-bleed stage with floating plate, tabs + sheet below */
@media (max-width: 1099px) {
  :root { --stage-h: clamp(340px, 54svh, 520px); }
  body.sheet-min { --stage-h: calc(100svh - 52px); }
  .game { display: grid; grid-template-rows: auto auto 1fr; position: relative; }
  .arena { order: 1; position: sticky; top: 0; z-index: 10; gap: 0; }
  .stage-frame { border: 0; padding: 0; }
  .stage-frame .meander { display: none; }
  .stage { aspect-ratio: auto; height: var(--stage-h); }
  .plate { position: fixed; z-index: 11; top: 8px; left: 8px; right: 8px; padding: 8px 10px; background: rgba(12,20,30,.74); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(var(--acc-rgb), .3); border-radius: 10px; gap: 4px; }
  .plate .bars { grid-template-columns: 1fr 1fr; }
  .plate .bar.exp { grid-column: 1 / -1; }
  .plate-stats { font-size: 11.5px; gap: 10px; }
  /* zone name + phase sit just under the floating plate */
  .stage-zone { top: 136px; }
  .stage-zone h2 { font-size: 16px; }
  .stage-zone .tag { display: none; }
  .stage-phase { top: 138px; right: 10px; font-size: 11px; }
  .marquee { top: auto; bottom: 0; }
  .actor { bottom: 64px; }
  .actor.hero { left: 6%; }
  .actor.mob { right: 6%; }
  .sil.has-sprite { width: min(42vw, 230px); }
  .stele { min-width: 96px; padding: 2px 8px 4px; }
  .stage-controls { bottom: 12px; }
  .hunt-btn { min-width: 0; font-size: 14px; }
  /* town: compact NPC buttons between the zone name and the hunt button */
  .town { inset: 168px 10px 58px; overflow-y: auto; align-content: start; }
  .town .town-title { display: none; }
  .town .npcs { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .npc { padding: 6px 6px; text-align: center; }
  .npc b { font-size: 13px; }
  .npc small { display: none; }
  .rail { order: 2; }
  .tabs { position: sticky; top: var(--stage-h); z-index: 9; background: var(--panel); }
  body.sheet-min .panel { display: none; }
  .tabs button { padding: 10px 2px; font-size: 13.5px; }
  .panel { padding-bottom: 80px; }
  .log { height: 150px; }
}
/* ---------- desktop (≥ 1100px): plate | arena | rail, exp line at the bottom */
@media (min-width: 1100px) {
  .d-only { display: initial !important; }
  .feed.d-only { display: grid !important; }
  .plate-box.d-only { display: grid !important; }
  .plate-links.d-only { display: flex !important; }
  .expline.d-only { display: block !important; }
  .m-only { display: none !important; }
  .game { display: grid; height: 100dvh; grid-template-columns: 260px minmax(0, 1fr) minmax(380px, 30vw); grid-template-rows: minmax(0, 1fr) 14px; gap: 0; }
  .plate { grid-column: 1; grid-row: 1; align-content: start; padding: 14px; border-right: 1px solid var(--line); background: var(--panel); overflow-y: auto; }
  .plate .avatar { width: 54px; height: 72px; }
  .arena { grid-column: 2; grid-row: 1; padding: 12px; grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; }
  .rail { grid-column: 3; grid-row: 1; border-left: 1px solid var(--line); min-height: 0; }
  .expline { grid-column: 1 / -1; grid-row: 2; }
  .stage { max-height: calc(100dvh - 260px); width: 100%; margin: 0 auto; }
}
.panel h3 { font-size: 16px; color: var(--gold-light); margin: 18px 0 8px; }
.panel h3:first-child { margin-top: 0; }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }

/* zones */
.chapter { margin-bottom: 14px; }
.chapter > summary { cursor: pointer; font-family: var(--serif); color: var(--text); padding: 6px 0; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.chapter > summary::-webkit-details-marker { display: none; }
.chapter > summary small { color: var(--faint); font-family: var(--sans); }
.chapter .story { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.zone-btn { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; background: var(--raised); border: 1px solid var(--line); padding: 9px 12px; border-radius: var(--radius); margin-bottom: 6px; cursor: pointer; }
.zone-btn[aria-current="true"] { border-color: var(--gold); }
.zone-btn:disabled { opacity: .45; cursor: not-allowed; }
.zone-btn .zn { font-weight: 500; }
.zone-btn .zl { font-size: 13px; color: var(--muted); text-align: right; }
.zone-btn .zd { grid-column: 1 / -1; font-size: 12px; color: var(--faint); }
.zone-btn .warn { color: #e0a36b; }

/* character */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 18px; font-size: 14px; }
.stat-grid div { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--line); padding: 2px 0; }
.stat-grid dt { color: var(--muted); } .stat-grid dd { margin: 0; }
.attr-row { display: grid; grid-template-columns: 70px 40px 1fr auto; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px dotted var(--line); font-size: 14px; }
.attr-row small { color: var(--faint); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.slot { display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: center; background: var(--sunk); border: 1px solid var(--line); padding: 5px; border-radius: var(--radius); cursor: pointer; text-align: left; min-height: 52px; }
.slot .sn { font-size: 11px; color: var(--faint); }
.slot .in { font-size: 13px; line-height: 1.3; }

/* items */
.icon { width: 40px; height: 40px; display: grid; place-items: center; background: var(--sunk); border: 1px solid var(--r-normal); border-radius: 3px; font-family: var(--serif); font-size: 17px; color: #cfc8ba; overflow: hidden; position: relative; }
.icon img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.sil img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #0e1823; }
.sil { position: relative; overflow: hidden; }
.icon .en { position: absolute; right: 1px; bottom: 0; font: 600 11px var(--sans); color: var(--gold-light); text-shadow: 0 0 2px #000; }
.icon .qty { position: absolute; right: 2px; bottom: 0; font: 11px var(--sans); color: #fff; text-shadow: 0 0 2px #000; }
.rar-normal { --rc: var(--r-normal); } .rar-magic { --rc: var(--r-magic); } .rar-rare { --rc: var(--r-rare); } .rar-set { --rc: var(--r-set); } .rar-unique { --rc: var(--r-unique); }
.icon[class*="rar-"] { border-color: var(--rc); }
.name[class*="rar-"] { color: var(--rc); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.filters button { background: var(--sunk); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: 13px; color: var(--muted); cursor: pointer; }
.filters button[aria-pressed="true"] { color: var(--gold-light); border-color: var(--gold-dim); }
.grid-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.grid-items button { padding: 0; background: none; border: 0; cursor: pointer; }
.grid-items button[aria-pressed="true"] .icon { box-shadow: 0 0 0 2px var(--gold-light); }
.item-card { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-top: 12px; }
.item-card .head { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; }
.item-card .name { font-family: var(--serif); font-size: 16px; }
.item-card .sub { font-size: 12px; color: var(--muted); }
.item-card ul { list-style: none; padding: 0; margin: 8px 0; font-size: 14px; }
.item-card li.aff { color: var(--r-magic); } .item-card li.aff.g-gold { color: #e0a24c; } .item-card li.aff.g-gray { color: #b9c3cd; } .item-card li.aff.g-blue { color: #5aa2ff; }
.item-card li.sec { margin-top: 6px; color: var(--muted); font-size: 12px; letter-spacing: .06em; list-style: none; }
.item-card li.div { color: var(--gold-light); }
.item-card .head .en { font-size: 12px; color: var(--muted); font-style: italic; letter-spacing: .02em; }
.divine-slots { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0; font-size: 14px; }
.divine-slots dt { color: var(--muted); } .divine-slots dd { margin: 0; color: var(--gold-light); }
.item-card li.bad { color: var(--danger); }
.item-card .lore { font-family: var(--serif); font-size: 13px; color: #b6a27b; margin: 6px 0; }
.item-card .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
/* v1.10.32 物品卡（暗黑式、位置固定）：名稱 → 左大圖｜右數值 → 各區塊 → 使用條件 → 價格 → 典故 */
.item-card.ic { padding: 14px 14px 12px; }
.ic-title { text-align: center; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.ic-title .name { font-family: var(--serif); font-size: 19px; line-height: 1.3; }
.ic-title .name small { font-size: 13px; color: var(--muted); }
.ic-title .en { font-size: 12px; color: var(--muted); font-style: italic; letter-spacing: .02em; }
.ic-title .sub { font-size: 12.5px; color: #a9b2bc; margin-top: 3px; }
.item-card.ic.rar-unique { border-color: rgba(201,138,60,.45); } .item-card.ic.rar-unique .ic-title { border-bottom-color: rgba(201,138,60,.35); }
.item-card.ic.rar-rare { border-color: rgba(242,207,91,.35); } .item-card.ic.rar-rare .ic-title { border-bottom-color: rgba(242,207,91,.28); }
.item-card.ic.rar-set { border-color: rgba(111,210,122,.35); } .item-card.ic.rar-set .ic-title { border-bottom-color: rgba(111,210,122,.28); }
.item-card.ic.rar-magic { border-color: rgba(90,162,255,.35); } .item-card.ic.rar-magic .ic-title { border-bottom-color: rgba(90,162,255,.28); }
.ic-main { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; }
.ic-art .icon.big { width: 112px; height: 112px; border-radius: 8px; font-size: 44px; }
.icon.big .en { font-size: 14px; right: 5px; bottom: 3px; } .icon.big .lk { font-size: 12px; left: 5px; top: 3px; }
.ic-stats, .ic-sec ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; line-height: 1.5; }
.ic-stats li.core { color: #e8e2d4; } .ic-stats li.bonus { color: #8fb8ff; } .ic-stats li.desc { color: var(--muted); font-size: 13px; }
.ic-stats b.num { font-weight: 600; }
.ic-sec { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); }
.ic-sec h4 { margin: 0 0 6px; font-size: 12px; font-weight: 500; letter-spacing: .08em; color: var(--muted); }
.ic-sec li.core { color: #e8e2d4; }
.ic-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.ic-meta span { font-size: 12px; color: #a9b2bc; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; }
.ic-price { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.ic-lore { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); font-family: var(--serif); font-style: italic; font-size: 13px; line-height: 1.75; color: #8b939c; text-align: center; }
@media (min-width: 720px) { .ic-main { grid-template-columns: 144px minmax(0, 1fr); } .ic-art .icon.big { width: 144px; height: 144px; font-size: 56px; } }
.bag-meta { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 8px; }

/* enchant */
.enchant-box { background: var(--sunk); border: 1px solid var(--line); padding: 14px; border-radius: var(--radius); }
.rates { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 6px; margin: 12px 0; }
.rates div { background: var(--panel); border: 1px solid var(--line); padding: 8px 4px; border-radius: var(--radius); }
.rates b { display: block; font-size: 20px; font-weight: 600; }
.rates .s b { color: var(--ok); } .rates .k b { color: var(--muted); } .rates .x b { color: var(--danger); }
.enchant-result { font-family: var(--serif); font-size: 18px; text-align: center; min-height: 32px; margin-top: 10px; }
.enchant-result.success { color: var(--gold-light); } .enchant-result.break { color: var(--danger); } .enchant-result.stay { color: var(--muted); }
.list-rows > div { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dotted var(--line); }
.list-rows .t { font-size: 14px; } .list-rows small { display: block; color: var(--muted); font-size: 12px; }

/* settings */
.set-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dotted var(--line); font-size: 14px; }
.set-row small { display: block; color: var(--faint); font-size: 12px; }
.set-row input[type="number"] { width: 76px; background: var(--sunk); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 3px 6px; text-align: right; }
.set-row select { background: var(--sunk); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 3px 6px; }
.set-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--gold); }

/* world */
.chat-box { background: var(--sunk); border: 1px solid var(--line); height: 230px; overflow-y: auto; padding: 6px 10px; font-size: 13px; }
.chat-box .who { color: var(--gold-light); }
.chat-box .ann { color: var(--r-rare); }
.chat-form { display: flex; gap: 6px; margin-top: 6px; }
.chat-form input { flex: 1; background: var(--sunk); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .4em .6em; }
.wb-card { background: var(--sunk); border: 1px solid var(--r-unique); padding: 12px; border-radius: var(--radius); margin-bottom: 10px; }
.wb-card h4 { margin: 0 0 6px; font-family: var(--serif); color: var(--r-unique); font-size: 16px; }
.wb-card .bar i { background: var(--hp); }

/* modal & toast */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--gold-dim); border-radius: var(--radius); padding: 0; width: min(520px, calc(100vw - 32px)); max-height: 86dvh; }
dialog::backdrop { background: rgba(3,6,10,.75); }
dialog .dlg-head { padding: 16px 18px 6px; } dialog .dlg-head h2 { color: var(--gold-light); font-size: 20px; }
dialog .dlg-body { padding: 6px 18px 12px; overflow-y: auto; max-height: 60dvh; font-size: 14px; }
dialog .dlg-foot { padding: 10px 18px 16px; text-align: right; }
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.report-grid div { background: var(--sunk); border: 1px solid var(--line); padding: 8px; text-align: center; border-radius: var(--radius); }
.report-grid b { display: block; font-size: 18px; color: var(--gold-light); font-weight: 600; }
.report-grid small { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--raised); border: 1px solid var(--gold-dim); padding: 8px 16px; border-radius: var(--radius); z-index: 100; max-width: calc(100vw - 32px); font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.toast.err { border-color: var(--danger); color: #f5c2bd; }
.conn { position: fixed; top: 0; left: 0; right: 0; z-index: 200; background: #5a2a26; color: #fff; text-align: center; font-size: 13px; padding: 4px; }

/* popups (item / forge / shop / monster / mail / world boss / drops) */
#pop { width: min(560px, calc(100vw - 24px)); }
#pop .dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
#pop .dlg-head h2 small { font-family: var(--sans); font-size: 13px; font-weight: 400; }
#pop .dlg-body { max-height: 72dvh; padding-top: 10px; }
.dlg-x { background: none; border: 1px solid var(--line); color: var(--muted); width: 30px; height: 30px; border-radius: var(--radius); cursor: pointer; flex: none; }
.dlg-x:hover { color: var(--text); border-color: var(--gold-dim); }
#pop .item-card { margin-top: 0; }
.pop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pop-actions .btn { flex: 1 1 auto; }
.icon .lk { position: absolute; left: 1px; top: 0; font: 10px var(--sans); color: #e0a36b; text-shadow: 0 0 2px #000; }
.mob-head { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
.mob-head .sil { width: 96px; color: #e8c9c4; border-color: rgba(185,77,80,.45); }
.drop-list { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 14px; font-size: 14px; }
.lore { font-family: var(--serif); font-size: 13px; color: #b6a27b; }
.chat-box .ann { color: var(--r-rare); }
.hint.bad, .divine-slots dd.bad { color: var(--danger); }

/* v1.6 天梯與工坊 */
.tower-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.tower-head div { background: var(--sunk, #0b131d); border: 1px solid var(--line, #2a3747); border-radius: 4px; padding: 8px 10px; }
.tower-head b { display: block; font-size: 20px; color: var(--gold-light); }
.tower-head small { color: var(--muted); font-size: 12px; }
.mats { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.mats li.bad { color: var(--danger); }

/* v1.7 諸神恩寵 */
.patron { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.patron-art { position: relative; width: 84px; height: 112px; border: 1px solid var(--gold-dim, #8c7448); border-radius: 4px; display: grid; place-items: center; font: 700 34px var(--serif); color: var(--gold-dim, #8c7448); overflow: hidden; background: radial-gradient(circle at 50% 35%, #6b4a12, #1f1404 80%); }
.patron h3 { margin: 2px 0 6px; }
.patron .bar { height: 6px; background: var(--sunk, #0b131d); border-radius: 3px; overflow: hidden; }
.patron .bar i { display: block; height: 100%; background: linear-gradient(90deg, #b8914c, #f1d79a); }
.fx { padding-left: 18px; margin: 10px 0; font-size: 14px; display: grid; gap: 4px; }
.fx .ok { color: var(--ok, #65ac8d); }
.offer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.offer select, .offer input { background: var(--sunk, #0b131d); color: var(--text); border: 1px solid var(--line, #2a3747); border-radius: 4px; padding: 5px 8px; font: inherit; font-size: 14px; }
.offer input { width: 110px; }
.gods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.god { text-align: left; background: var(--sunk, #0b131d); border: 1px solid var(--line, #2a3747); border-radius: 4px; padding: 6px 8px; color: var(--text); font: inherit; cursor: pointer; }
.god b { display: block; font-size: 14px; } .god small { color: var(--muted); font-size: 12px; }
.god.on { border-color: var(--gold, #d5ae68); } .god:disabled { cursor: default; opacity: .75; } .god.on:disabled { opacity: 1; }
.patron-art img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* v1.7.2 點怪物看掉落 */
.drop-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.drop-title small { font: 12px var(--sans); }
.drop-box { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--radius); max-height: 46dvh; overflow-y: auto; overscroll-behavior: contain; margin: 4px 0 12px; }
.drop-group { position: sticky; top: 0; z-index: 1; background: var(--raised, #13202d); color: var(--gold-light); font: 600 12px var(--sans); padding: 4px 10px; border-bottom: 1px solid var(--line); }
.drop-group small { color: var(--muted); font-weight: 400; }
.drop-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,.05); }
.drop-row:last-child { border-bottom: 0; }
.drop-row .drop-n { min-width: 0; display: grid; font-size: 14px; }
.drop-row .drop-n .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rc, var(--text)); }
.drop-row .drop-n small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-row .drop-p { color: var(--gold-light); font-weight: 700; font-size: 14px; }
.drop-row.other { opacity: .55; }
.mon-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-decoration-color: rgba(201,198,189,.45); text-underline-offset: 2px; cursor: pointer; }
.mon-link:hover { color: var(--gold-light); }

/* ===== v1.7.4 角色牌精緻化、主角輪廓、右欄比例 ===== */
.avatar-wrap { position: relative; flex: none; }
.lv-badge { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); z-index: 1; white-space: nowrap; font-size: 10.5px; line-height: 15px; padding: 0 7px; border-radius: 8px;
  color: var(--gold-light); background: linear-gradient(#3b2d15, #1a1309); border: 1px solid var(--gold-dim); box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.lv-badge:empty { display: none; }
.plate-id { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: baseline; }
.plate-id .name, .plate-id .cls { grid-column: 1; }
.plate-gold { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.plate-gold::after { content: " 金"; font-size: .85em; color: var(--gold-dim); }
.bar span em { font-style: normal; opacity: .72; margin-right: 6px; font-size: .9em; }
.plate-stats small { color: var(--muted); margin-right: 3px; font-size: inherit; }

/* 主角：亮背景上也看得清楚（深色描邊＋腳下陰影） */
.sil .sprite { filter: drop-shadow(0 0 1px rgba(0,0,0,.9)) drop-shadow(0 2px 1px rgba(0,0,0,.45)); }
/* 以原尺寸（每格高 224px）顯示最清楚；不放大 */
.sil.has-sprite { width: clamp(110px, 21vw, 224px); }
.sil.has-sprite::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 52%; height: 10%; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.6) 0%, rgba(0,0,0,.25) 45%, transparent 72%); pointer-events: none; }
.stage:not(.no-art)::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 70% at 50% 62%, rgba(6,10,16,.05) 0%, rgba(6,10,16,.32) 100%); pointer-events: none; }

@media (min-width: 1100px) {
  .game { grid-template-columns: 272px minmax(0, 1fr) clamp(340px, 24vw, 440px); }
  .plate { padding: 18px 16px; gap: 12px; background: linear-gradient(180deg, #14233350 0%, transparent 260px), var(--panel); }
  .plate-top { gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .plate .avatar { width: 66px; height: 86px; border: 1px solid var(--gold); border-radius: 4px; box-shadow: 0 0 0 3px var(--sunk), 0 0 0 4px var(--gold-dim), 0 8px 16px rgba(0,0,0,.5); }
  .plate-id { grid-template-columns: 1fr; row-gap: 1px; }
  .plate-id .name { font-size: 20px; letter-spacing: .03em; }
  .plate-id .cls { font-size: 12.5px; }
  .plate-gold { grid-column: 1; grid-row: auto; margin-top: 7px; font-size: 15px; display: flex; align-items: center; gap: 2px; }
  .plate .bars { gap: 6px; }
  .plate .bar { height: 20px; border-radius: 10px; border-color: #2a3a4c; background: #0a1119; box-shadow: inset 0 1px 3px rgba(0,0,0,.7); }
  .plate .bar i { border-radius: 10px; }
  .plate .bar i::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 45%; border-radius: 10px 10px 0 0; background: linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,0)); }
  .plate .bar span { text-align: center; padding: 0; font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: .02em; }
  .plate-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .plate-stats span { display: grid; justify-items: center; background: var(--sunk); border: 1px solid var(--line); border-radius: 4px; padding: 4px 0 3px; }
  .plate-stats small { margin: 0; font-size: 10.5px; letter-spacing: .04em; }
  .plate-stats b { font-size: 15px; color: var(--gold-light); font-weight: 600; }
  .plate-box { padding: 0; gap: 0; overflow: hidden; }
  .g-head { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 10px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(var(--acc-rgb), .16), rgba(var(--acc-rgb), 0)); }
  .g-head span { font-family: var(--serif); color: var(--gold-light); font-size: 14px; }
  .g-head small { font-size: 11.5px; color: var(--muted); }
  .g-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
  .g-cell { background: var(--sunk); padding: 7px 10px; display: grid; gap: 1px; min-width: 0; }
  .g-cell small { font-size: 11px; color: var(--muted); }
  .g-cell b { font-size: 17px; color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
  .g-cell i { font-style: normal; font-size: 11px; color: var(--gold-dim); }
  .plate-links.d-only { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .plate-links .btn { text-align: center; padding: .45em .2em; }
}

/* ===== v1.7.5 背包／裝備欄 ===== */
.seg-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 3px; margin-bottom: 10px; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; }
.seg-tabs button { background: none; border: 1px solid transparent; border-radius: 6px; padding: 6px 0; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.seg-tabs button[aria-selected="true"] { background: linear-gradient(var(--tile-hi), var(--tile-2)); border-color: var(--gold-dim); color: var(--gold-light); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.bag-meta { align-items: center; gap: 10px; flex-wrap: wrap; }
.bag-cap { display: grid; gap: 4px; min-width: 120px; flex: 1; }
.bag-cap b { color: var(--text); font-weight: 600; }
.bag-cap i { display: block; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--gold-dim) var(--p), #1a2735 var(--p)); }
.bag-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { padding: 3px 12px; }

.cell-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.cell { position: relative; aspect-ratio: 1; padding: 0; display: grid; place-items: center; cursor: pointer; border-radius: 8px;
  background: linear-gradient(160deg, var(--tile-2), var(--sunk)); border: 1px solid var(--line); box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }
.cell:hover { border-color: var(--gold-dim); }
.cell:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 1px; }
.cell.blank { cursor: default; opacity: .45; }
.cell.rar-magic { border-color: rgba(90,162,255,.55); } .cell.rar-rare { border-color: rgba(242,207,91,.6); }
.cell.rar-set { border-color: rgba(111,210,122,.65); } .cell.rar-unique { border-color: rgba(201,138,60,.8); box-shadow: inset 0 0 10px rgba(201,138,60,.25); }
.cell.bl-blessed { box-shadow: inset 0 0 0 1px rgba(241,215,154,.35), 0 0 6px rgba(241,215,154,.25); }
.cell.bl-cursed { box-shadow: inset 0 0 0 1px rgba(185,77,80,.5); }
.cell-ic { position: relative; width: 84%; height: 84%; border-radius: 6px; display: grid; place-items: center; overflow: hidden; font-family: var(--serif); font-size: 18px; color: #cfc8ba; background: #0e1823; }
.cell-ic img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.c-en { position: absolute; left: 4px; top: 2px; z-index: 1; font-size: 11px; font-weight: 700; color: var(--gold-light); text-shadow: 0 0 2px #000, 0 0 2px #000; }
.c-qty { position: absolute; right: 4px; bottom: 2px; z-index: 1; font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.c-lk { position: absolute; right: 3px; top: 2px; z-index: 1; font-size: 10px; color: #e0a36b; text-shadow: 0 0 2px #000; }
.c-dv { position: absolute; left: 4px; bottom: 1px; z-index: 1; font-size: 11px; color: #b9a6ff; text-shadow: 0 0 2px #000; }

.eq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.eq-card { position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; padding: 6px 6px 7px; min-height: 112px; border-radius: 8px; text-align: center; cursor: pointer; font: inherit; color: inherit;
  background: linear-gradient(160deg, var(--tile-2), var(--sunk)); border: 1px solid var(--line); }
.eq-card:hover { border-color: var(--gold-dim); }
.eq-card.empty { cursor: default; opacity: .6; }
.eq-card.rar-magic { border-color: rgba(90,162,255,.5); } .eq-card.rar-rare { border-color: rgba(242,207,91,.55); } .eq-card.rar-set { border-color: rgba(111,210,122,.6); } .eq-card.rar-unique { border-color: rgba(201,138,60,.8); }
.eq-card .eq-sn { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.eq-card .cell-ic { width: 52px; height: 52px; flex: none; }
.eq-card .eq-ph { width: 52px; height: 52px; border-radius: 6px; border: 1px dashed #2a3949; }
.eq-card .eq-nm { font-size: 12px; line-height: 1.3; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--rc, var(--text)); }
.eq-card .c-en { top: 4px; left: 6px; font-size: 12px; }
/* v1.14.17z10b 裝備格名稱兩排置中，+N 在第一排左邊 */
.eq-nml { display: grid; justify-items: center; gap: 1px; max-width: 100%; min-width: 0; text-align: center; line-height: 1.3; }
.eq-nml .c-en { position: static; display: inline-block; margin-right: 4px; font-size: 12px; line-height: 15px; vertical-align: 1px; }
.eq-pre { max-width: 100%; font-size: 11.5px; color: #c9a6ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq-pre.blessed { color: #f6d77a; } .eq-pre.cursed { color: var(--danger); }
.eq-nml .eq-nm { -webkit-line-clamp: 2; }
.patron-card .eq-nm b { color: var(--gold-light); }

/* 右欄頁籤（桌機：3×2 方塊按鈕；手機：底部一列） */
@media (min-width: 1100px) {
  .tabs { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
  .tabs button { border: 1px solid #2a3949; border-radius: 8px; padding: 9px 0; background: linear-gradient(#17242f, #101a24); font-size: 14.5px; letter-spacing: .08em; color: #cfc8ba; }
  .tabs button:hover { border-color: var(--gold-dim); color: var(--gold-light); }
  .tabs button[aria-selected="true"] { color: var(--gold-light); border-color: var(--gold); background: linear-gradient(var(--tile-hi), var(--tile-2)); box-shadow: inset 0 0 0 1px rgba(241,215,154,.12), 0 0 8px rgba(var(--acc-rgb), .15); }
  .tabs button[aria-selected="true"]::after { display: none; }
  .panel { padding: 12px 14px 24px; }
}
@media (max-width: 420px) { .cell-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } .eq-card { min-height: 104px; } }

/* ===== v1.7.7 怪群＋四屬性 ===== */
:root { --el-fire: #ff8a4c; --el-water: #5cb8ff; --el-wind: #7fe0b0; --el-earth: #d8b06a; --el-holy: #f6e7a8; }
.mobs { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.mobs .actor { pointer-events: auto; transition: transform .15s, opacity .4s, right .35s, bottom .35s; }
.actor.mob { right: 12%; bottom: 16%; }
.actor.mob.s1 { right: 27%; bottom: 25%; z-index: 1; }
.actor.mob.s2 { right: 2%; bottom: 31%; z-index: 1; }
.actor.mob.s3 { right: 30%; bottom: 7%; z-index: 3; }
.actor.mob.s4 { right: 16%; bottom: 40%; z-index: 0; }
.actor.mob.s5 { right: 40%; bottom: 30%; z-index: 0; }
.actor.mob:not(.s0) .sil { width: clamp(46px, 8.5vw, 92px); }
.actor.mob:not(.s0) .stele { min-width: 84px; padding: 2px 6px 4px; }
.actor.mob:not(.s0) .stele .lv { display: none; }
.actor.mob:not(.s0) .stele .nm { font-size: 12px; }
.actor.mob.enter { opacity: 0; transform: translateX(14px); }
.actor.mob.gone { opacity: 0; transform: translateY(6px) scale(.92); }
.el-badge { display: inline-block; margin-right: 4px; font: 700 10px/1 var(--sans); padding: 1px 3px; border-radius: 3px; background: rgba(5,9,14,.82); border: 1px solid currentColor; vertical-align: 1px; }
.el-badge.el-fire, .sk-tag.el-fire, .floater.el-fire { color: var(--el-fire); } .el-badge.el-water, .sk-tag.el-water, .floater.el-water { color: var(--el-water); }
.el-badge.el-wind, .sk-tag.el-wind, .floater.el-wind { color: var(--el-wind); } .el-badge.el-earth, .sk-tag.el-earth, .floater.el-earth { color: var(--el-earth); }
.sk-tag.el-holy, .floater.el-holy { color: var(--el-holy); } .sk-tag.el-weapon { color: var(--gold-light); }
.floater.crit { color: #ffd36b; }
.floater.dot { font-size: 12px; font-weight: 600; opacity: .9; }
.floater.react { color: #fff; font-size: clamp(13px, 2vw, 17px); letter-spacing: .1em; text-shadow: 0 0 6px #7fe0ff, 0 2px 2px #000; }
.stele .sts { display: flex; gap: 2px; justify-content: center; min-height: 0; }
.stele .sts:empty { display: none; }
.st { font: 700 10px/1 var(--sans); font-style: normal; padding: 1px 3px; border-radius: 2px; margin-top: 2px; background: rgba(0,0,0,.45); }
.st-burn { color: var(--el-fire); } .st-soak { color: var(--el-water); } .st-crack { color: var(--el-earth); } .st-venom { color: #a6e36a; } .st-stun { color: #e7e2a0; }
.sk-tag { font-style: normal; font-size: 11px; margin-left: 6px; padding: 0 5px; border: 1px solid currentColor; border-radius: 3px; vertical-align: 1px; }
.sk-tag.aoe { color: #e8c58a; }
.clear-style { display: grid; gap: 3px; padding: 9px 11px; margin-bottom: 10px; border: 1px solid var(--gold-dim); border-radius: 8px; background: linear-gradient(90deg, rgba(var(--acc-rgb), .12), rgba(var(--acc-rgb), 0)); font-size: 13px; color: #d9d2c4; }
.clear-style b { color: var(--gold-light); font-family: var(--serif); font-size: 14px; }
@media (max-width: 1099px) {
  .actor.mob { right: 4%; bottom: 64px; }
  .actor.mob.s1 { right: 33%; bottom: 74px; } .actor.mob.s2 { right: 18%; bottom: 128px; }
  .actor.mob.s3 { right: 2%; bottom: 150px; } .actor.mob.s4 { right: 44%; bottom: 128px; } .actor.mob.s5 { right: 30%; bottom: 168px; }
  .actor.mob:not(.s0) .sil { width: clamp(40px, 12vw, 64px); }
  .actor.mob:not(.s0) .stele { min-width: 0; width: clamp(40px, 12vw, 64px); padding: 2px 3px; clip-path: none; background: none; border: 0; }
  .actor.mob:not(.s0) .stele .nm { display: none; }
  .actor.mob:not(.s0) .stele .bar { margin-top: 0; }
}

/* ===== v1.7.8 大收斂：4 頁籤、戰力、下一個目標、解鎖卡、更多清單 ===== */
.tabs { grid-template-columns: repeat(6, 1fr); }
@media (min-width: 1100px) { .tabs { grid-template-columns: repeat(3, 1fr); } }
.plate-stats .power { display: flex; align-items: baseline; gap: 8px; padding: 5px 10px; border: 1px solid var(--gold-dim); border-radius: 6px; background: linear-gradient(90deg, rgba(var(--acc-rgb), .16), rgba(var(--acc-rgb), .02)); grid-column: 1 / -1; }
.plate-stats .power small { font-size: 11.5px; color: var(--gold); letter-spacing: .12em; margin: 0; }
.plate-stats .power b { font-size: 18px; color: var(--gold-light); font-weight: 700; letter-spacing: .02em; }
@media (min-width: 1100px) { .plate-stats { display: block; } .plate-stats .power { justify-content: space-between; } .plate-stats .power b { font-size: 22px; } }
@media (max-width: 1099px) { .plate-stats .power { padding: 2px 8px; } .plate-stats .power b { font-size: 15px; } }
.power-big { display: grid; justify-items: center; gap: 2px; padding: 12px; margin-bottom: 12px; border: 1px solid var(--gold-dim); border-radius: 10px; background: radial-gradient(circle at 50% 0, rgba(var(--acc-rgb), .18), transparent 70%); text-align: center; }
.power-big small { color: var(--gold); letter-spacing: .2em; }
.power-big b { font-size: 30px; color: var(--gold-light); line-height: 1.1; }
.power-chip { font-size: 13px; color: var(--muted); } .power-chip b { color: var(--gold-light); font-size: 15px; }
/* 背包綠色箭頭 */
.cell .c-up { position: absolute; right: 3px; top: 2px; font-size: 11px; line-height: 1; color: #6fe08a; text-shadow: 0 0 4px rgba(60,200,100,.8), 0 1px 1px #000; animation: upPulse 1.6s ease-in-out infinite; }
@keyframes upPulse { 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .cell .c-up { animation: none; } }
/* 下一個目標（戰場中央下方一句話） */
.goal { position: absolute; left: 50%; transform: translateX(-50%); bottom: 58px; z-index: 6; display: flex; align-items: center; gap: 8px; max-width: min(92%, 520px); padding: 6px 8px 6px 12px; border-radius: 999px; background: rgba(8,13,20,.82); border: 1px solid rgba(var(--acc-rgb), .45); box-shadow: 0 4px 14px rgba(0,0,0,.45); font-size: 13px; color: #e8e1d2; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.goal.hidden { display: none; }
.goal .goal-ic { color: #6fe08a; font-weight: 700; }
.goal .goal-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.goal .btn { flex: none; border-radius: 999px; padding: 3px 12px; }
@media (max-width: 1099px) { .goal { top: 174px; bottom: auto; left: 10px; right: 10px; transform: none; max-width: none; font-size: 12px; padding: 4px 6px 4px 10px; } .goal .goal-t { flex: 1; } .goal .goal-t { white-space: normal; line-height: 1.3; } #stage:has(.goal:not(.hidden)) .town { top: 216px; } .stage-zone { top: 148px; } .stage-phase { top: 150px; } .town { top: 182px; } }
/* 解鎖卡 */
.unlock-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--gold-dim); border-radius: 10px; background: linear-gradient(90deg, rgba(var(--acc-rgb), .12), transparent); margin-bottom: 8px; }
.unlock-card .u-ic { font-size: 26px; text-align: center; }
.unlock-card b { color: var(--gold-light); font-family: var(--serif); font-size: 16px; }
.unlock-card p { margin: 2px 0 0; font-size: 13px; color: #d9d2c4; }
/* 更多：iOS 設定式清單 */
.more-list { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 14px; background: var(--raised); }
.more-row { display: grid; grid-template-columns: 30px 1fr auto auto; align-items: center; gap: 10px; padding: 11px 12px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); text-align: left; cursor: pointer; font: inherit; text-decoration: none; position: relative; }
.more-row:last-child { border-bottom: 0; }
.more-row:hover { background: rgba(var(--acc-rgb), .06); }
.more-row .m-ic { font-size: 18px; text-align: center; }
.more-row .m-t { display: grid; font-size: 15px; } .more-row .m-t small { font-size: 12px; color: var(--muted); }
.more-row .m-go { color: var(--muted); font-size: 18px; }
.more-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); position: static; }
.more-back { background: none; border: 0; color: var(--gold-light); font: inherit; font-size: 14px; padding: 2px 0 6px; cursor: pointer; }
.more-back + h3 { margin-top: 0; }
/* 設定：開關 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .2s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #e8e1d2; transition: transform .2s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.unit { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.unit input { width: 64px; }
.adv { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px 10px; }
.adv-h { padding: 6px 0; color: var(--gold-light); font-size: 14px; }   /* v1.10.37 不摺疊：標題常駐 */
.sk-tag.rec { color: #6fe08a; }
.seg-tabs .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); margin-left: 4px; vertical-align: 2px; }

/* ===== v1.7.9 男女角色 ===== */
.gender-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; font-size: 14px; }
.gender-pick { display: inline-grid; grid-auto-flow: column; gap: 3px; padding: 3px; background: var(--sunk); border: 1px solid var(--line); border-radius: 999px; }
.gender-pick button { min-width: 56px; padding: 5px 14px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.gender-pick button[aria-pressed="true"] { background: linear-gradient(var(--tile-hi), var(--tile-2)); color: var(--gold-light); box-shadow: inset 0 0 0 1px var(--gold-dim); }
/* 新立繪是去背全身（寬度不固定）：完整顯示、腳踩底部，背後一層暗金光 */
.char-portrait img.art { object-fit: contain; object-position: center bottom; padding: 6px 4px 2px; }
.char-portrait { background: radial-gradient(ellipse at 50% 85%, rgba(var(--acc-rgb), .22), transparent 62%), var(--sunk); }
.class-art:has(img.art), .char-portrait:has(img.art), .avatar:has(img.art), .char-thumb:has(img.art) { color: transparent; }
/* v1.10.30 有圖就不顯示示意字：去背的裝備、道具、怪物、NPC、Buff 圖示，字原本會從透明的地方透出來（圖讀不到時 img 會被移除，字又會出現） */
.icon:has(> img.art), .cell-ic:has(> img.art), .bf-ic:has(> img.art), .sil:has(> img.art), .vil-ic:has(> img.art), .patron-art:has(> img.art), .m-ic:has(> img.art) { color: transparent; text-shadow: none; }
/* v1.8.0 商店：別職業的裝備淡化 */
.list-rows > div.other { opacity: .55; }

/* =====================================================================
   v1.8.2 手機版重做：固定 App 外框（不再整頁捲動、不會被放大或切邊）
   上：角色卡（約 90px）／中：戰場（約 40% 螢幕高）／下：內容面板（自己捲動）／最下：頁籤列（iPhone 式）
   ===================================================================== */
@media (max-width: 1099px) {
  :root { --stage-h: clamp(230px, 40svh, 380px); --hunt-w: min(30%, 124px); }
  body.sheet-min { --stage-h: 170px; }                       /* 再點一次目前頁籤：戰場縮小、內容變大 */
  body:has(#screen-game:not(.hidden)) { overflow: hidden; overscroll-behavior: none; }
  input, select, textarea { font-size: 16px !important; }    /* 小於 16px 時 iOS 會自動放大畫面、之後就被切邊 */

  #screen-game.game { position: fixed; inset: 0; display: flex; flex-direction: column; height: auto; overflow: hidden; padding-top: env(safe-area-inset-top); }   /* v1.19.23 存到桌面（App 模式）下面多一條空白：100dvh 有時比整個畫面矮 → 用 inset: 0 撐滿 */
  .game > * { min-width: 0; }

  /* ---- 角色卡 */
  .plate { order: 0; flex: none; position: relative; inset: auto; z-index: 3; margin: 0; padding: 8px 12px 7px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: linear-gradient(var(--plate-a), var(--plate-b)); backdrop-filter: none; -webkit-backdrop-filter: none;
    display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 5px; align-items: center; }
  .plate .plate-top { display: contents; }
  .plate .avatar-wrap { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .plate .avatar { width: 46px; height: 58px; }
  .plate .lv-badge { font-size: 10px; line-height: 14px; bottom: -6px; padding: 0 6px; }
  .plate .plate-id { grid-column: 2; grid-row: 1; }
  .plate .plate-id .name { font-size: 15.5px; }
  .plate .plate-id .cls { font-size: 11.5px; }
  .plate .plate-gold { font-size: 13px; }
  .plate .plate-stats { grid-column: 3; grid-row: 1; display: block; font-size: 11px; }
  .plate .plate-stats .power { padding: 2px 8px; gap: 5px; }
  .plate .plate-stats .power small { font-size: 10.5px; letter-spacing: .06em; }
  .plate .plate-stats .power b { font-size: 15px; }
  .plate .bars { grid-column: 2 / -1; grid-row: 2; grid-template-columns: 1fr 1fr; gap: 4px 6px; }
  .plate .bar { height: 15px; } .plate .bar span { font-size: 10.5px; line-height: 13px; }
  .plate .bar.exp { grid-column: 1 / -1; height: 9px; } .plate .bar.exp span { font-size: 8.5px; line-height: 7px; }
  .plate .buffs { grid-column: 1 / -1; grid-row: 3; }
  .plate .buffs:empty { display: none; }

  /* ---- 戰場 */
  .arena { order: 1; flex: none; position: relative; top: auto; z-index: 1; display: block; }
  .stage-frame { border: 0; padding: 0; background: #05090e; }
  .stage-frame .meander { display: none; }
  .stage { height: var(--stage-h); aspect-ratio: auto; background-position: center 62%; transition: height .25s; }
  .stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; z-index: 1; pointer-events: none; background: linear-gradient(rgba(5,9,14,0), rgba(5,9,14,.78)); }
  .stage-zone { top: 6px; left: 10px; right: calc(var(--hunt-w) + 8px); text-align: left; }
  .stage-zone h2 { font-size: 15px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stage-zone .tag { display: none; }
  .stage-phase { top: 7px; right: 8px; font-size: 11px; padding: 1px 7px; }
  .marquee { top: auto; bottom: 52px; font-size: 12px; }
  #stage .goal, .goal { top: auto; bottom: 8px; left: 8px; right: calc(var(--hunt-w) + 14px); transform: none; max-width: none; height: 38px; padding: 0 6px 0 10px; font-size: 12px; z-index: 6; }
  .goal .goal-t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
  .goal .btn { padding: 3px 10px; font-size: 12px; }
  .goal .goal-ic { display: none; }
  .stage-controls { position: static; }
  .stage-controls .hunt-btn { position: absolute; z-index: 6; right: 8px; bottom: 8px; width: var(--hunt-w); min-width: 0; height: 38px; padding: 0 10px; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stage-controls .gauge { position: absolute; z-index: 3; top: 30px; left: 10px; width: min(56%, 240px); }
  .gauge small { text-align: left; font-size: 10.5px; }

  /* 角色與怪物：地面線在底部操作列上方；怪物最多 6 隻，排成不重疊的兩排 */
  .actor { bottom: 54px; gap: 3px; }
  .actor.hero { left: 2%; }
  .actor.hero .stele { display: none; }                        /* 名字等級已經在上方角色卡 */
  .sil.has-sprite { width: min(34vw, calc(var(--stage-h) * .5)); }
  .stele { min-width: 0; max-width: 34vw; padding: 1px 7px 3px; }
  .stele .nm { font-size: 11.5px; } .stele .lv { font-size: 10px; line-height: 1.2; }
  .actor.mob .sil { width: min(20vw, calc(var(--stage-h) * .26)); }
  .actor.mob.boss .sil { width: min(22vw, calc(var(--stage-h) * .3)); }
  .actor.mob.s0 { right: 3%; bottom: 54px; z-index: 3; }
  .actor.mob.s1 { right: 27%; bottom: 58px; z-index: 2; }
  .actor.mob.s2 { right: 14%; bottom: calc(54px + 30%); z-index: 1; }
  .actor.mob.s3 { right: 46%; bottom: 62px; z-index: 2; }
  .actor.mob.s4 { right: 37%; bottom: calc(54px + 32%); z-index: 1; }
  .actor.mob.s5 { right: 1%; bottom: calc(54px + 36%); z-index: 0; }
  .actor.mob:not(.s0) .sil { width: min(14vw, calc(var(--stage-h) * .19)); }
  .actor.mob:not(.s0) .stele { width: min(14vw, calc(var(--stage-h) * .19)); min-width: 0; padding: 0; background: none; border: 0; clip-path: none; }
  .actor.mob:not(.s0) .stele .nm, .actor.mob:not(.s0) .stele .lv { display: none; }
  .actor.mob:not(.s0) .stele .bar { margin-top: 0; height: 5px; }
  body.sheet-min .actor.mob:not(.s0):not(.s1):not(.s2) { display: none; }
  .floater { font-size: 14px; max-width: 40vw; white-space: nowrap; }
  .floater.crit { font-size: 18px; }

  /* 城鎮 NPC：2 × 2 */
  .town { inset: 34px 8px 54px; align-content: center; overflow-y: auto; z-index: 4; }
  #stage:has(.goal:not(.hidden)) .town { top: 34px; }
  .town .town-title { display: none; }
  .town .npcs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .npc { padding: 7px 10px; text-align: left; }
  .npc b { font-size: 14px; }
  .npc small { display: block; font-size: 11px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* ---- 內容面板＋最下方頁籤列 */
  .rail { order: 2; flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .panel { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 12px 14px 20px; }
  body.sheet-min .panel { display: block; }
  .tabs { order: 2; flex: none; position: relative; top: auto; z-index: 5; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; padding: 0 2px env(safe-area-inset-bottom); border-top: 1px solid var(--line-strong); border-bottom: 0; background: var(--tabbar); }
  .tabs button { padding: 9px 0 8px; font-size: 13px; border: 0; border-top: 2px solid transparent; border-radius: 0; background: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .tabs button[aria-selected="true"] { color: var(--gold-light); border-top-color: var(--gold); background: linear-gradient(rgba(var(--acc-rgb), .12), transparent); }
  .tabs .dot { top: 5px; right: 10%; }
  .tabs .tab-ic { display: none; }

  /* ---- 彈窗改成底部抽屜 */
  dialog, #pop { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 14px 14px 0 0; border-left: 0; border-right: 0; border-bottom: 0; max-height: 90dvh; padding-bottom: env(safe-area-inset-bottom); }
  #pop .dlg-body, dialog .dlg-body { max-height: calc(90dvh - 70px); }
  #pop .dlg-head { padding: 12px 14px 8px; } #pop .dlg-head h2 { font-size: 17px; }
  .pop-actions { flex-wrap: wrap; }
  .pop-actions .btn { flex: 1 1 auto; }

  /* ---- 面板內常見元件：不要超出寬度 */
  .panel img, .panel table { max-width: 100%; }
  .list-rows > div { min-width: 0; }
  .zone-btn .zd { white-space: normal; }
  .log { height: 140px; }
  .toast { bottom: calc(60px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); }
}
@media (max-width: 380px) {
  .tabs button { font-size: 12px; }
  .plate .plate-stats .power small { display: none; }
}
/* 手機選角：職業卡 2 × 2，描述精簡 */
@media (max-width: 640px) {
  .class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .class-opt { padding: 10px; }
  .class-art { margin: -10px -10px 8px; aspect-ratio: 4 / 5; }
  .class-opt h3 { font-size: 15px; } .class-opt .role { font-size: 11.5px; }
  .class-opt p { font-size: 12px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0 0; }
  .auth-card { padding: 16px 14px; }
  .char-row { padding: 10px 12px; gap: 10px; } .char-row h3 { font-size: 16px; } .char-row .meta { font-size: 12.5px; }
  .gender-row small { flex-basis: 100%; }
}

/* =====================================================================
   v1.8.4 介面整理（參考使用者提供的截圖）：
   每一區都有框線＋比面板淺一階的底色；清單每列是一格一格的框；目前選中的格子用主色框起來。
   顏色全部走主題變數（themes.js），換主題時介面跟著變、圖示與品級顏色不變。
   ===================================================================== */
.panel { background: var(--panel); }
.box { background: var(--tile); border: 1px solid rgba(var(--acc-rgb), .26); border-radius: 12px; padding: 10px 12px 12px; margin: 0 0 12px; }
.panel .box > h3.box-h, .box > .box-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 10px; padding-bottom: 7px; border-bottom: 1px solid rgba(var(--acc-rgb), .22); font-family: var(--serif); font-size: 16px; color: var(--gold-light); }
.box > .box-h small { font-family: var(--sans); font-size: 12px; color: var(--muted); font-weight: 400; }
.box > :last-child { margin-bottom: 0; }
.box .hint:first-of-type { margin-top: 0; }
.box .log, .box .chat-box { background: var(--sunk); border-color: var(--line); border-radius: 8px; }

/* 一格一格的清單（技能、信箱、商店、世界王時間表…） */
.list-rows { display: grid; gap: 6px; }
.list-rows > div { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--tile-2); }

/* 獵場：章節＝一個框；每個獵場＝一格；目前所在＝主色框 */
.chapter.box { padding: 0; overflow: hidden; }
.chapter.box > summary { padding: 10px 12px; align-items: center; font-size: 15.5px; color: var(--gold-light); }
.chapter.box > summary::before { content: '▸'; color: var(--gold); margin-right: 6px; transition: transform .15s; display: inline-block; }
.chapter.box[open] > summary::before { transform: rotate(90deg); }
.chapter.box > summary > span { flex: 1; }
.chapter.box[open] > summary { border-bottom: 1px solid rgba(var(--acc-rgb), .2); }
.chapter.box .story { padding: 8px 12px 0; }
.chapter.box .zones { padding: 8px 10px 4px; }
.zone-btn { background: var(--tile-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; color: var(--text); }
.zone-btn:not(:disabled):hover { border-color: rgba(var(--acc-rgb), .55); }
.zone-btn[aria-current="true"] { border: 1.5px solid var(--gold); background: linear-gradient(90deg, rgba(var(--acc-rgb), .2), rgba(var(--acc-rgb), .06)); box-shadow: 0 0 14px rgba(var(--acc-rgb), .16); }
.zone-btn .zn { font-size: 15px; }
.zone-btn .zn .pop { color: var(--gold-light); font-size: 13.5px; }
.zone-btn .zl { font-size: 13.5px; align-self: center; }
.zone-btn .zl .cur { color: var(--gold-light); margin-left: 6px; }

/* 設定：每一項是一格 */
.set-row { background: var(--tile-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.set-row:last-child { margin-bottom: 0; }
.adv { background: var(--tile); border-color: rgba(var(--acc-rgb), .22); }
.adv > .adv-h { margin-bottom: 6px; }
.adv .set-row { background: var(--tile-2); }
.more-list { background: var(--tile-2); border-color: var(--line); }
.more-row:hover { background: rgba(var(--acc-rgb), .08); }

/* 分段按鈕、篩選 */
.seg-tabs { background: var(--sunk); border-color: rgba(var(--acc-rgb), .22); border-radius: 10px; }
.seg-tabs button { border-radius: 8px; }
.filters button { background: var(--tile-2); }
.filters button[aria-pressed="true"] { background: rgba(var(--acc-rgb), .22); color: var(--gold-light); border-color: var(--gold); }

/* 角色牌與頁籤列：主色細線收邊 */
@media (max-width: 1099px) {
  .plate { border-bottom: 1px solid rgba(var(--acc-rgb), .45); }
  .tabs { border-top: 1px solid rgba(var(--acc-rgb), .45); }
  .tabs button[aria-selected="true"] { background: rgba(var(--acc-rgb), .28); color: var(--gold-light); font-weight: 700; border-top-color: var(--gold); }
}

/* ---- 彈窗：大框框（手機也是置中的大卡片，不再從下方滑出） */
dialog { background: var(--panel); border: 2px solid rgba(var(--acc-rgb), .7); border-radius: 16px; box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 18px 48px rgba(0,0,0,.6), 0 0 28px rgba(var(--acc-rgb), .18); }
dialog[open] { display: flex; flex-direction: column; }
dialog .dlg-head, #pop .dlg-head { flex: none; border-bottom: 1px solid rgba(var(--acc-rgb), .28); padding: 14px 16px 10px; }
dialog .dlg-body, #pop .dlg-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; max-height: none; padding: 12px 16px; overscroll-behavior: contain; }
dialog .dlg-foot { flex: none; padding: 10px 16px 14px; border-top: 1px solid rgba(var(--acc-rgb), .18); text-align: center; }
dialog .dlg-foot .btn { width: 100%; padding: .7em 1em; font-size: 16px; border-radius: 10px; }
dialog .dlg-foot[hidden] { display: none; }
#pop.full { width: min(760px, calc(100vw - 24px)); height: min(920px, calc(100dvh - 24px)); max-height: none; }
@media (max-width: 1099px) {
  dialog, #pop { width: calc(100vw - 20px); max-width: none; margin: auto; border: 2px solid rgba(var(--acc-rgb), .7); border-radius: 16px; padding-bottom: 0;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  #pop .dlg-body, dialog .dlg-body { max-height: none; }
  #pop.full { width: calc(100vw - 20px); height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  dialog .dlg-foot { padding-bottom: 12px; }
}

/* ---- 設定：配色 */
.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.theme-opt { display: grid; gap: 7px; padding: 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--tile-2); color: var(--text); font: inherit; cursor: pointer; text-align: center; }
.theme-opt:hover { border-color: rgba(var(--acc-rgb), .55); }
.theme-opt[aria-pressed="true"] { border-color: var(--gold-light); box-shadow: 0 0 0 2px rgba(var(--acc-rgb), .35); }
.theme-opt .sw { height: 38px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.theme-opt b { font-weight: 600; font-size: 14px; }
.theme-opt[aria-pressed="true"] b::after { content: ' ✓'; color: var(--gold-light); }
/* 設定：音效 */
.vol { display: grid; grid-template-columns: auto 1fr 38px; gap: 10px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--muted); }
.vol input[type="range"] { width: 100%; accent-color: var(--gold); }
.vol output { text-align: right; font-variant-numeric: tabular-nums; }
.set-row .set-main { min-width: 0; }
.audio-status { font-size: 12.5px; color: var(--muted); margin: 8px 2px 0; }

/* ---- 離線掛機收益 */
#dlg { width: min(480px, calc(100vw - 20px)); }
#dlg .dlg-head { text-align: center; }
#dlg .dlg-head h2 { font-size: 22px; letter-spacing: .06em; }
#dlg .dlg-head h2 .moon { color: var(--gold); margin-right: 6px; font-weight: 400; }
.rp-sub { text-align: center; color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.rp-sub b { color: var(--text); font-weight: 500; }
.rp-stop { text-align: center; color: var(--danger); margin: -6px 0 12px; font-size: 13.5px; }
.rp-stats { display: grid; gap: 2px; }
.rp-stat { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 6px 4px; font-size: 16px; }
.rp-stat .ic { font-size: 18px; text-align: center; line-height: 1; }
.rp-stat .v { font-variant-numeric: tabular-nums; color: var(--gold-light); font-weight: 600; }
.rp-stat.bad .v { color: var(--danger); }
.rp-loot { display: grid; gap: 6px; }
.rp-loot > div { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px 10px 6px 6px; border-radius: 10px; background: var(--tile-2); border: 1px solid var(--line); }
.rp-loot .icon { width: 46px; height: 46px; border-radius: 8px; font-size: 18px; }
.rp-loot .icon img.art { border-radius: 7px; }
.rp-loot .nm { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-loot .nm small { display: block; font-size: 11.5px; color: var(--muted); }
.rp-loot .q { color: var(--gold-light); font-variant-numeric: tabular-nums; }
.rp-note { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.6; }
.set-row:has(select) { grid-template-columns: 1fr; gap: 8px; }
.set-row:has(select) select { width: 100%; }
.chat-form .btn { flex: none; white-space: nowrap; }
/* 桌機：日誌、聊天、本場狩獵也是同一種框 */
.feed-box, .plate-box { border: 1px solid rgba(var(--acc-rgb), .26); border-radius: 12px; background: var(--tile); overflow: hidden; }

/* =====================================================================
   v1.8.5 共用元件：整個遊戲只有一種按鈕、一種標籤列、一種「選中」、一種工具列、一種小標籤。
   以後新增畫面請只用這幾個 class，不要另外寫顏色或尺寸（避免越改越亂）。
     .btn / .btn.small / .btn.primary / .btn.danger      按鈕
     .seg-tabs > button[aria-selected]                   標籤列（樣式＝角色頁「裝備｜能力」）
     .toolbar > .tb-info + .acts                         工具列：左邊資訊、右邊按鈕
     .sk-tag                                              小標籤（推薦、範圍、屬性…）
     選中狀態一律：--sel-bg 底、--sel-bd 框、--sel-tx 字
   ===================================================================== */
:root { --ctl-h: 40px; --ctl-h-sm: 32px; --ctl-r: 8px; --sel-bg: rgba(var(--acc-rgb), .2); --sel-bd: var(--gold); --sel-tx: var(--gold-light); }

/* 按鈕 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--ctl-h); padding: 0 16px; border-radius: var(--ctl-r);
  border: 1px solid var(--line-strong); background: var(--tile-2); color: var(--text); font-size: 15px; line-height: 1.25; text-align: center; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--gold-dim); background: var(--tile-hi); }
.btn.small { min-height: var(--ctl-h-sm); padding: 0 12px; font-size: 13.5px; }
.btn.primary { background: linear-gradient(var(--btn-a), var(--btn-b)); color: var(--btn-ink); border-color: var(--gold-light); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: linear-gradient(var(--btn-a), var(--btn-b)); filter: brightness(1.08); }
.btn.danger { border-color: rgba(216,91,85,.55); background: rgba(216,91,85,.1); color: #f2b8b3; }
.btn.danger:hover:not(:disabled) { border-color: var(--danger); background: rgba(216,91,85,.18); }
.btn.ghost { background: transparent; }
.pop-actions .btn, .dlg-foot .btn { white-space: normal; padding-block: 6px; }

/* 標籤列（角色頁「裝備｜能力」的樣式，背包篩選、商店、鐵匠全部用這一種） */
.seg-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; margin: 0 0 12px; background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; }
.seg-tabs button { min-height: 36px; padding: 0 6px; border: 1px solid transparent; border-radius: 7px; background: none; color: var(--muted); font: inherit; font-size: 14.5px; cursor: pointer; position: relative; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-tabs button:hover { color: var(--text); }
.seg-tabs button[aria-selected="true"] { background: var(--sel-bg); border-color: var(--sel-bd); color: var(--sel-tx); font-weight: 600; box-shadow: none; }

/* 底部／右側頁籤：選中狀態與標籤列一致 */
@media (max-width: 1099px) {
  .tabs button { font-size: 13.5px; }
  .tabs button[aria-selected="true"] { background: var(--sel-bg); color: var(--sel-tx); font-weight: 600; border-top: 2px solid var(--sel-bd); }
}
@media (min-width: 1100px) {
  .tabs button { border: 1px solid var(--line); border-radius: var(--ctl-r); background: var(--tile-2); color: var(--muted); min-height: var(--ctl-h); }
  .tabs button:hover { border-color: var(--gold-dim); color: var(--text); }
  .tabs button[aria-selected="true"] { background: var(--sel-bg); border-color: var(--sel-bd); color: var(--sel-tx); font-weight: 600; box-shadow: none; }
}

/* 其他「選中」：獵場、配色、性別 */
.zone-btn[aria-current="true"] { border-color: var(--sel-bd); background: var(--sel-bg); box-shadow: none; }
.theme-opt[aria-pressed="true"] { border-color: var(--sel-bd); background: var(--sel-bg); box-shadow: none; }

/* 工具列：左邊資訊、右邊按鈕（背包、裝備、商店…） */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; min-height: var(--ctl-h-sm); margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.toolbar .tb-info b { color: var(--gold-light); font-size: 15px; font-weight: 600; }
.toolbar .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-left: auto; }
.toolbar .tb-note { font-size: 13px; color: var(--muted); }

/* 小標籤 */
.sk-tag { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; margin-left: 5px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 500; line-height: 1; vertical-align: 2px; background: rgba(255,255,255,.04); }

/* 彈窗按鈕：主要動作整條在最上面、出售整條在最下面，其餘兩兩一排（每個物品都同一個位置） */
.pop-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.pop-actions .btn { width: 100%; }
.pop-actions .btn.primary { grid-column: 1 / -1; order: -1; }
.pop-actions .btn.danger { grid-column: 1 / -1; order: 1; }
.pop-actions .btn:only-child { grid-column: 1 / -1; }
.hunt-btn, .goal .btn, .stage .btn { min-height: 0; }
@media (min-width: 1100px) { .stage-controls .hunt-btn { min-height: var(--ctl-h); padding: 0 24px; font-size: 15px; } }

/* =====================================================================
   v1.8.6 怪物：不要外框與背景，直接顯示去背的怪物圖，腳踩地面；每隻怪固定位置不換位
   怪物圖規格：512×512（首領 768×768）透明底、面向左、腳底貼齊圖片底部（data/assets.json monsters）
   ===================================================================== */
.actor.mob .sil, .actor.mob.boss .sil { background: none; border: 0; border-radius: 0; overflow: visible; aspect-ratio: 1 / 1;
  color: rgba(255,236,230,.9); text-shadow: 0 2px 6px #000, 0 0 14px rgba(0,0,0,.85); }
.actor.mob .sil img.art { object-fit: contain; object-position: center bottom; background: transparent; filter: drop-shadow(0 2px 2px rgba(0,0,0,.75)) drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.actor.mob .sil::after { content: ""; position: absolute; z-index: -1; left: 50%; bottom: -2%; width: 62%; height: 9%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.55), transparent 70%); pointer-events: none; }
.mobs .actor { transition: transform .15s, opacity .4s; }      /* 位置不做滑動動畫 */
.actor.mob.gone { transform: none; }
.actor.mob .sil { width: clamp(84px, 13vw, 160px); }
.actor.mob.boss .sil { width: clamp(120px, 19vw, 230px); }
.actor.mob:not(.s0) .sil { width: clamp(64px, 10vw, 124px); }
@media (max-width: 1099px) {
  .actor.mob .sil { width: min(26vw, calc(var(--stage-h) * .36)); }
  .actor.mob.boss .sil { width: min(32vw, calc(var(--stage-h) * .46)); }
  .actor.mob:not(.s0) .sil { width: min(18vw, calc(var(--stage-h) * .25)); }
  .actor.mob:not(.s0) .stele { width: min(18vw, calc(var(--stage-h) * .25)); }
}
.mob-head .sil { background: var(--tile-2); border: 1px solid var(--line); border-radius: 10px; aspect-ratio: 1 / 1; }
.mob-head .sil img.art { object-fit: contain; object-position: center bottom; background: transparent; }

/* 選角：職業卡的圖一定佔滿整張卡的寬度（iPhone Safari 在 flex 裡會把 aspect-ratio 的圖縮成一小塊） */
.class-opt { display: block; }
.class-art { display: block; width: calc(100% + 28px); height: auto; }
.class-art img.art { object-fit: cover; object-position: top; }
@media (max-width: 640px) { .class-art { width: calc(100% + 20px); } }
.class-art:not(:has(img.art)) { display: grid; place-items: center; }

/* v1.8.7 新版本提示（自動重新載入失敗時才會出現） */
.update-bar { position: fixed; z-index: 300; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translateX(-50%); min-height: var(--ctl-h); padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--gold-light); background: linear-gradient(var(--btn-a), var(--btn-b)); color: var(--btn-ink); font: 600 14px var(--sans); box-shadow: 0 6px 20px rgba(0,0,0,.5); cursor: pointer; }

/* =====================================================================
   v1.8.8 登入畫面：分頁（共用 .seg-tabs）、輸入框附圖示、眼睛看密碼、記住帳號、保持登入、加到手機桌面
   ===================================================================== */
.auth-screen { padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse 90% 55% at 50% 0%, rgba(var(--acc-rgb), .16), transparent 70%), linear-gradient(rgba(8,13,20,.35), rgba(8,13,20,.9)), url("/assets/ui/login_bg.webp") center / cover no-repeat, var(--bg); }
.auth-wrap { width: min(420px, 100%); }
.auth-screen .title-block { margin-bottom: 20px; }
.auth-screen .emblem { width: 84px; height: 84px; margin-bottom: 10px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 0 1px rgba(var(--acc-rgb), .35); }
.auth-screen .auth-card { width: 100%; padding: 16px 18px 16px; border-radius: 16px; background: rgba(16,27,39,.9); background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid rgba(var(--acc-rgb), .35); border-top: 1px solid rgba(var(--acc-rgb), .35); box-shadow: 0 20px 50px rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.auth-card .seg-tabs { margin-bottom: 16px; }
.auth-card .field { margin-bottom: 12px; }
.auth-card .field label { font-size: 13.5px; color: var(--muted); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .in-ic { position: absolute; left: 12px; width: 18px; height: 18px; fill: var(--muted); pointer-events: none; }
.input-wrap input { width: 100%; min-height: 46px; padding: 0 46px 0 40px; border-radius: 10px; background: var(--sunk); border: 1px solid var(--line-strong); font-size: 16px; color: var(--text); }
.input-wrap input::placeholder { color: var(--faint); }
.input-wrap input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--acc-rgb), .18); }
.input-wrap:focus-within .in-ic { fill: var(--gold-light); }
.input-wrap .eye { position: absolute; right: 3px; width: 40px; height: 40px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.input-wrap .eye svg { width: 21px; height: 21px; fill: var(--muted); }
.input-wrap .eye[aria-pressed="true"] svg { fill: var(--gold-light); }
.auth-opts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 2px 0 4px; }
.chk { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: 14px; color: var(--text); cursor: pointer; user-select: none; }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk i { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--sunk); display: grid; place-items: center; flex: none; }
.chk input:checked + i { background: var(--gold); border-color: var(--gold); }
.chk input:checked + i::after { content: ""; width: 5px; height: 10px; border: solid var(--btn-ink); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.chk input:focus-visible + i { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.auth-card .form-error { min-height: 1.5em; margin: 2px 0 6px; }
.auth-go { width: 100%; min-height: 48px; font-size: 17px; letter-spacing: .12em; border-radius: 12px; }
.auth-install { width: 100%; min-height: 44px; margin-top: 10px; border-radius: 12px; white-space: normal; }
.auth-card .foot-link { margin-top: 14px; font-size: 13px; }
.auth-card .foot-link a { color: var(--muted); }
.auth-notice { display: grid; gap: 6px; padding: 10px 12px; margin-bottom: 12px; border-radius: 10px; border: 1px solid rgba(216,91,85,.5); background: rgba(216,91,85,.1); font-size: 13.5px; }
.auth-notice b { color: #f2b8b3; } .auth-notice span { color: var(--muted); } .auth-notice .btn { justify-self: start; }
.auth-ver { text-align: center; color: var(--faint); font-size: 12px; margin: 14px 0 0; }
.install-guide { display: grid; justify-items: center; text-align: center; gap: 10px; }
.install-guide img { border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.install-guide p { margin: 0; color: var(--muted); font-size: 14px; }
.install-guide ol { text-align: left; margin: 0; padding-left: 22px; line-height: 2; font-size: 15px; }
/* v1.8.8 登入背景（直式星空神殿）：手機鋪滿、上方保持清楚；電腦上圖置中，兩側用同一張圖的模糊版補滿 */
.screen-center, .auth-screen { background:
  linear-gradient(180deg, rgba(5,9,14,.05) 0%, rgba(5,9,14,.25) 38%, rgba(5,9,14,.72) 78%, rgba(5,9,14,.88) 100%),
  url("/assets/ui/login_bg.webp") center top / cover no-repeat, var(--bg); background-attachment: scroll; }
@media (min-aspect-ratio: 4/5) {
  .screen-center, .auth-screen { background:
    linear-gradient(180deg, rgba(5,9,14,.1) 0%, rgba(5,9,14,.35) 45%, rgba(5,9,14,.8) 100%),
    url("/assets/ui/login_bg_wide.webp") center / cover no-repeat,   /* v1.14.17x 電腦版橫圖（有就蓋住下面的直式圖＋模糊兩側） */
    url("/assets/ui/login_bg.webp") center top / auto 100% no-repeat,
    linear-gradient(90deg, rgba(5,9,14,.55), rgba(5,9,14,.1) 30%, rgba(5,9,14,.1) 70%, rgba(5,9,14,.55)), url("/assets/ui/login_bg_blur.webp") center / cover no-repeat, var(--bg); }
}
.screen-center { min-height: 100dvh; }
.auth-screen .title-block h1 { text-shadow: 0 2px 12px rgba(0,0,0,.85), 0 0 24px rgba(0,0,0,.6); }
.auth-screen .title-block .sub { color: #d9d2c4; text-shadow: 0 1px 6px #000; }

/* v1.8.10 美術檢查模式：戰場上標出圖檔名稱（點一下開對照表） */
.art-tag { display: inline-block; max-width: 100%; padding: 2px 7px; border-radius: 6px; border: 1px solid #f2cf5b; background: rgba(5,9,14,.88); color: #f2cf5b; font: 600 11px/1.35 ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; pointer-events: auto; }
.art-tag.miss { border-color: #f0a66b; color: #f0a66b; }
.art-tag:hover { background: #f2cf5b; color: #15110a; }
.stage > .art-tags { position: absolute; z-index: 20; left: 50%; top: 40px; transform: translateX(-50%); max-width: 92%; }
.actor .art-tag { position: absolute; z-index: 21; left: 50%; bottom: -4px; transform: translateX(-50%); max-width: 42vw; }
#mobs .actor .art-tag, .actor.hero .art-tag { bottom: auto; top: -20px; }
body.art-check .actor.mob .sil { outline: 1px dashed rgba(242,207,91,.6); outline-offset: 2px; }
body.art-check .stage { outline: 2px dashed rgba(242,207,91,.5); outline-offset: -2px; }

/* v1.8.11 配點視窗 */
.ap-head { display: grid; gap: 4px; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--sel-bg); border: 1px solid var(--sel-bd); }
.ap-head span { font-size: 16px; } .ap-head b { color: var(--gold-light); font-size: 22px; }
.ap-head small { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.ap-list { display: grid; gap: 6px; }
.ap-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px 64px 40px; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--tile-2); border: 1px solid var(--line); }
.ap-n b { display: block; font-size: 15px; } .ap-n small { display: block; color: var(--faint); font-size: 11.5px; line-height: 1.35; }
.ap-b { width: 40px; min-height: 36px; padding: 0; font-size: 18px; }
.ap-v { text-align: center; font-size: 20px; font-weight: 600; color: var(--text); }
.ap-v i { display: block; font-style: normal; font-size: 11.5px; font-weight: 600; } .ap-v i.up { color: #6fe08a; } .ap-v i.dn { color: #f0a66b; }

/* v1.8.11 聊天／公告／獲得 標籤、聊天變高、經驗條變大 */
.feed-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.feed-head .feed-tabs { flex: 1; margin: 0; padding: 3px; }
.feed-head small { flex: none; font-size: 12px; }
.feed-tabs button { min-height: 30px; font-size: 13.5px; }
.feed-tabs .badge { display: inline-block; min-width: 18px; margin-left: 5px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10.5px; line-height: 16px; font-weight: 700; vertical-align: 1px; }
.chat-box > div { padding: 1px 0; line-height: 1.55; }
.chat-box time, .log time { color: var(--faint); font-size: 11px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.chat-box .ann { color: var(--r-rare); }
.chat-box .r-normal { color: var(--r-normal); } .chat-box .r-magic { color: var(--r-magic); } .chat-box .r-rare { color: var(--r-rare); } .chat-box .r-set { color: var(--r-set); } .chat-box .r-unique { color: var(--r-unique); }
.chat-box .hint { margin: 6px 0; }
.feed-tabbed { grid-template-rows: auto minmax(0, 1fr) auto; }
.feed-tabbed .chat-box { padding: 6px 10px; }
.feed-m { padding: 0; overflow: hidden; }
.feed-m .chat-box.tall { height: min(440px, 46dvh); border: 0; border-radius: 0; background: var(--sunk); padding: 8px 12px; }
.feed-m .chat-form { padding: 8px; margin: 0; border-top: 1px solid var(--line); }
@media (min-width: 1100px) {
  /* 戰場讓出空間給下方的日誌與聊天（約 300px 高） */
  .stage { max-height: max(380px, calc(100dvh - 400px)); }
  .feed { min-height: 260px; }
  .game { grid-template-rows: minmax(0, 1fr) 24px; }
  .expline { height: 24px; }
  .expline span { font-size: 12.5px; line-height: 23px; letter-spacing: .02em; }
  .expline span b { color: var(--gold-light); } .expline span span { color: #d9d2c4; }
}
@media (max-width: 1099px) {
  .plate .bar.exp { height: 14px; } .plate .bar.exp span { font-size: 10px; line-height: 13px; }
}

/* =====================================================================
   v1.8.12 選角：角色欄位 → 建立角色（選職業 → 分配點數 → 取名）；選角畫面不用登入背景
   ===================================================================== */
#screen-select.screen-center { background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(var(--acc-rgb), .1), transparent 70%), var(--bg); place-items: start center; padding-top: max(28px, env(safe-area-inset-top)); }
.select-wrap { width: min(880px, 100%); }
.sel-title { margin-bottom: 18px; }
.sel-title h1 { font-size: clamp(26px, 5vw, 36px); }
.slot-list { display: grid; gap: 10px; }
.slot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 84px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--tile-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.slot:hover, .slot:focus-visible { border-color: var(--sel-bd); background: var(--sel-bg); }
.slot .char-thumb { width: 48px; height: 64px; border-radius: 6px; }
.slot-t h3 { font-size: 18px; margin: 0 0 2px; color: var(--gold-light); }
.slot-t .meta { color: var(--muted); font-size: 13.5px; }
.slot-acts { display: flex; gap: 6px; align-items: center; }
.slot-del { color: var(--muted); }
.slot-del:hover { color: #f2b8b3; border-color: rgba(216,91,85,.6); }
.slot.empty { display: grid; grid-template-columns: 1fr; border-style: dashed; color: var(--muted); background: transparent; }
.slot.empty span { font-size: 15px; }
.sel-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.create-card { width: 100%; padding: 16px 18px 18px; border-radius: 14px; }
.create-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-bottom: 6px; }
.create-head h2 { text-align: center; font-size: 22px; color: var(--gold-light); }
.create-step { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 16px; color: var(--gold-light); }
.create-step b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--btn-ink); font: 700 13px var(--sans); }
.create-step small { margin-left: auto; font-family: var(--sans); font-size: 13px; }
.create-sub { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 8px; }
.create-acts { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 8px; }
.create-acts .btn { min-height: 46px; }
.create-acts .btn.hidden + .btn { grid-column: 1 / -1; }
.create-card .field input { min-height: 46px; font-size: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 640px) { .slot { grid-template-columns: auto minmax(0, 1fr); } .slot-acts { grid-column: 1 / -1; justify-content: flex-end; } }

/* ---- v1.8.13 手機聊天：送出鍵不被切掉、高度縮短不用下滑；提示浮在視窗上；不能穿的裝備；設定分頁 ---- */
.chat-form input { min-width: 0; width: 100%; }
.chat-form { align-items: stretch; box-sizing: border-box; max-width: 100%; }
.chat-form .btn { min-width: 64px; }
.feed-m .chat-box.tall { height: clamp(240px, 46dvh, 520px); }   /* v1.14.3 手機聊天區太小 */
.feed-head { flex-wrap: nowrap; } .feed-head .feed-tabs { min-width: 0; } .feed-head .feed-tabs button { white-space: nowrap; padding-inline: 6px; }
.feed-m .chat-form { position: sticky; bottom: 0; background: var(--panel); }
dialog .toast { top: calc(14px + env(safe-area-inset-top)); bottom: auto; z-index: 5; }
.cell.no-eq .cell-ic { opacity: .45; filter: grayscale(.7); }
.cell .c-no { position: absolute; right: 3px; top: 2px; font-size: 11px; line-height: 1; color: #f0857b; text-shadow: 0 1px 1px #000; }
.set-tabs { margin: 0 0 12px; position: sticky; top: -12px; z-index: 2; }
.chat-box .sp { background: rgba(var(--acc-rgb), .08); border-radius: 4px; }
@media (max-width: 1099px) { .stage-controls .hunt-btn { display: block; line-height: 38px; text-align: center; } }
.feed-m .chat-box.tall { height: clamp(120px, calc(100dvh - 620px), 260px); }

/* ---- v1.8.14 背包一排 5 格、右側面板加寬；能力頁右上改放職業立繪（建立角色時那張） ---- */
.cell-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 1100px) { .game { grid-template-columns: 272px minmax(0, 1fr) clamp(380px, 25vw, 480px); } }
.char-portrait { width: 128px; }
.char-portrait img.art.portrait { object-fit: contain; object-position: center bottom; padding: 0; }   /* v1.12.9 3:4、2:3 都整個人放得下 */

/* ---- v1.8.15 技能書：學得會的發亮、不能學的變灰＋✕；倉庫 ---- */
.cell.bk-ok { border-color: rgba(var(--acc-rgb), .85); box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .35), 0 0 12px rgba(var(--acc-rgb), .35) inset; }
.cell.bk-ok .cell-ic { filter: brightness(1.15) saturate(1.1); }
.cell .c-lv { position: absolute; left: 3px; top: 2px; font-size: 10px; line-height: 1; color: var(--gold-light); text-shadow: 0 1px 1px #000; }
.bad { color: #f0857b; }

/* ---- v1.8.16 自訂背景音樂 ---- */
.bgm-list { display: grid; gap: 8px; }
.bgm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; background: var(--tile); border: 1px solid var(--line); border-radius: 10px; }
.bgm-t { display: grid; gap: 2px; min-width: 0; }
.bgm-t small { color: var(--muted); font-size: 12px; }
.bgm-t .bgm-now { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bgm-t .bgm-now.mine { color: var(--gold-light); }
.bgm-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.bgm-acts label.btn { cursor: pointer; }
@media (max-width: 520px) { .bgm-row { grid-template-columns: 1fr; } .bgm-acts { justify-content: flex-start; } }
.file-hide { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.bgm-acts label.btn { position: relative; }

/* ---- v1.9.0 防禦高度：獵場危險度標籤、你的 AC／MR ---- */
.fit { display: inline-block; font-style: normal; font-size: 12px; line-height: 1; padding: 3px 7px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; font-weight: 600; }
.fit-easy { color: #8fd4a0; } .fit-fit { color: #7fc8f0; } .fit-hard { color: #f0cf6e; } .fit-danger { color: #f29a4e; } .fit-deadly { color: #ff6b6b; background: rgba(255, 80, 80, .12); }
.zone-btn .zdef { display: block; font-size: 13px; color: var(--text); margin: 2px 0; }
.zone-btn .zdef b { color: var(--gold-light); font-weight: 600; }
.zone-btn .zdef small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.zone-btn .zl { display: inline-flex; gap: 6px; align-items: center; }
.def-now { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 4px 0 8px; }
.def-now > span { background: var(--tile); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; display: grid; gap: 2px; text-align: center; }
.def-now small { color: var(--muted); font-size: 11px; } .def-now b { color: var(--gold-light); font-size: 15px; }
.trait-box p { margin: 0 0 6px; font-size: 14px; line-height: 1.6; }
.plate-stats .defs { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.plate-stats .defs b { color: var(--text); font-size: 13px; }
.floater.taken.magic, .float.taken.magic, .taken.magic { color: #c79bff !important; text-shadow: 0 0 6px rgba(160, 90, 255, .7), 0 1px 2px #000; }
.mpheal { color: #7fd0ff !important; }
.plate-stats .defs { grid-column: 1 / -1; display: flex !important; justify-items: initial; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px !important; background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; margin: 0; }
.plate-stats .defs > span { display: inline-flex !important; gap: 4px; align-items: baseline; background: none !important; border: 0 !important; padding: 0 !important; font-size: 12px; color: var(--muted); }
.plate-stats .defs b { font-size: 15px; }
.plate-stats .defs .fit { margin-left: auto; }

/* ---- v1.10.0 寶石、商城、等級上限 ---- */
.gem-ic { display: inline-block; width: 12px; height: 12px; transform: rotate(45deg); background: linear-gradient(135deg, #ffd6e8 0%, #ff6fa8 45%, #c2185b 100%); border-radius: 2px; box-shadow: 0 0 6px rgba(255, 90, 160, .6); vertical-align: -1px; margin-right: 6px; }
.gem-chip { display: inline-flex; align-items: center; gap: 0; margin-left: 10px; padding: 2px 4px 2px 8px; border: 1px solid rgba(255, 110, 170, .45); border-radius: 999px; background: rgba(255, 110, 170, .08); color: #ffc3dc; font-size: 13px; cursor: pointer; }
.gem-chip b { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 110, 170, .2); font-size: 11px; color: #fff; font-weight: 600; }
.plate-gold { display: flex; align-items: center; flex-wrap: wrap; row-gap: 4px; }
.cap-txt { color: #ffb36b; } .mult-txt { color: #8fd4a0; }
.mall-acct { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.mall-gems { display: grid; justify-items: center; gap: 2px; padding: 8px 14px; border: 1px solid rgba(255, 110, 170, .4); border-radius: 10px; background: rgba(255, 110, 170, .07); }
.mall-gems b { font-size: 22px; color: #ffd6e8; } .mall-gems small { color: var(--muted); font-size: 11px; }
.mall-state { font-size: 14px; line-height: 1.7; } .mall-state small { color: var(--muted); }
.mall-list { display: grid; gap: 8px; }
.mall-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--tile); }
.mall-item.hl { border-color: rgba(var(--acc-rgb), .8); background: linear-gradient(135deg, rgba(var(--acc-rgb), .12), var(--tile)); }
.mall-item .mi-t { display: grid; gap: 3px; } .mall-item .mi-t small { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.mall-item .mi-t small.mi-box { color: var(--gold-light); }
.mall-item .btn { min-width: 96px; white-space: nowrap; }
.mall-how { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.8; }
@media (max-width: 520px) { .mall-acct { grid-template-columns: 1fr; } .mall-item { grid-template-columns: 1fr; } }
.expline span span { display: inline; }
.plate-gold::after { order: 1; } .plate-gold .gem-chip { order: 2; }

/* ---- v1.9.1 三詞裝備（祝福的＋遠古系＋屬性系）柔光：在圖示後面，顏色跟屬性，慢慢呼吸，不刺眼 ---- */
.glow { --glow: 255, 214, 120; position: relative; isolation: isolate; }
.glow-fire { --glow: 255, 140, 80; } .glow-water { --glow: 110, 180, 255; } .glow-wind { --glow: 120, 230, 160; } .glow-earth { --glow: 230, 190, 110; } .glow-holy { --glow: 255, 236, 170; }
.cell.glow .cell-ic, .eq-card.glow .cell-ic, .icon.glow { position: relative; }
.cell.glow .cell-ic::before, .eq-card.glow .cell-ic::before, .icon.glow::before {
  content: ''; position: absolute; inset: -18%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--glow), .55) 0%, rgba(var(--glow), .22) 42%, rgba(var(--glow), 0) 70%);
  animation: softGlow 3.6s ease-in-out infinite;
}
.cell.glow, .eq-card.glow { box-shadow: inset 0 0 14px rgba(var(--glow), .16); border-color: rgba(var(--glow), .45); }
@keyframes softGlow { 0%, 100% { opacity: .55; transform: scale(.94); } 50% { opacity: .9; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .cell.glow .cell-ic::before, .eq-card.glow .cell-ic::before, .icon.glow::before { animation: none; opacity: .75; } }
/* 柔光放在圖示框裡（框會裁切、底色不透明）：底色 → 光 → 圖 */
.cell.glow .cell-ic::before, .eq-card.glow .cell-ic::before, .icon.glow::before { inset: 0; z-index: 0; border-radius: inherit; }
.cell.glow .cell-ic > img, .eq-card.glow .cell-ic > img, .icon.glow > img { z-index: 1; }
.glow .cell-ic, .icon.glow { overflow: hidden; }
@media (max-width: 1099px) { .gem-chip { margin-left: 6px; padding: 2px 8px; } .gem-chip b { display: none; } }

/* ---- v1.10.3 守護神介紹 ---- */
.god[aria-pressed="true"] { border-color: var(--gold); background: rgba(var(--acc-rgb), .12); }
.god .fit { font-size: 10px; padding: 2px 5px; margin-left: 4px; vertical-align: 1px; }
.god-detail { margin-top: 10px; }
.god-detail .lore { font-size: 13px; color: var(--muted); margin: 4px 0 0; line-height: 1.6; }
.god-detail .fx li { line-height: 1.7; }

/* ---- v1.10.4 聊天：打字列在標籤下、最新在上；人物縮小；攻擊特效碰到格子邊緣時淡出 ---- */
.feed-box .chat-form, .feed-m .chat-form { border-top: 0; border-bottom: 1px solid var(--line); position: static; }
.chat-box.newest-top > div:first-child { animation: newMsg .6s ease-out; }
@keyframes newMsg { from { background: rgba(var(--acc-rgb), .18); } to { background: transparent; } }
.sil.has-sprite { width: clamp(96px, 17vw, 190px); }
@media (max-width: 1099px) { .sil.has-sprite { width: min(28vw, calc(var(--stage-h) * .42)); } }
.actor.hero .sil .sprite { -webkit-mask-image: linear-gradient(to right, #000 0, #000 86%, transparent 100%); mask-image: linear-gradient(to right, #000 0, #000 86%, transparent 100%); }
/* v1.10.4 三詞柔光：很多裝備圖本身有底色（不透明），光被蓋住 → 再加一層疊在圖上的柔光（screen 混色，只提亮不遮圖） */
.cell.glow .cell-ic::after, .eq-card.glow .cell-ic::after, .icon.glow::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; mix-blend-mode: screen;
  background: radial-gradient(circle at 50% 55%, rgba(var(--glow), .42) 0%, rgba(var(--glow), .14) 45%, rgba(var(--glow), 0) 72%);
  box-shadow: inset 0 0 10px rgba(var(--glow), .45);
  animation: softGlow2 3.6s ease-in-out infinite;
}
@keyframes softGlow2 { 0%, 100% { opacity: .45; } 50% { opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .cell.glow .cell-ic::after, .eq-card.glow .cell-ic::after, .icon.glow::after { animation: none; opacity: .6; } }
@media (max-width: 1099px) { .plate-gold { flex-direction: column; align-items: flex-end; row-gap: 3px; } .plate-gold .gem-chip { margin-left: 0; font-size: 12px; padding: 1px 7px; } .plate-gold::after { display: none; } }
.feed-tabbed { grid-template-rows: auto auto minmax(0, 1fr); }   /* 標籤 → 打字列 → 訊息（最新在上） */
.feed-tabbed > .chat-box { grid-row: 3; } .feed-tabbed > .chat-form { grid-row: 2; }

/* v1.10.5 戰鬥特效：戰場上方一層透明畫布（在角色之上、傷害數字之下），不擋點擊 */
.vfx-layer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.seg-tabs.vfx-q { margin: 4px 0 8px; }
.seg-tabs.vfx-q button[aria-checked="true"] { background: linear-gradient(var(--tile-hi), var(--tile-2)); border-color: var(--gold-dim); color: var(--gold-light); }
.hint.credit { opacity: .7; font-size: 11px; }

/* v1.10.6 技能頁：每個技能自己的「自動施放」開關 */
.sk-auto { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.sk-auto > span:first-child { font-size: 12px; color: var(--muted); }
.skill-rows .switch { flex: none; }
.skill-warn { margin: 0 0 10px; padding: 8px 10px; border: 1px solid rgba(220,150,80,.5); background: rgba(120,70,20,.18); border-radius: 6px; font-size: 13px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.more-list.goskills { margin: 0 0 8px; } .more-list.goskills .more-row { width: 100%; }

/* ===== v1.10.8 角色牌整理：戰力＋防禦一張卡、寶石與信箱、持續技能圖示、玩家資料卡 ===== */
/* 戰力卡：上面戰力、下面 AC｜MR（不再放獵場危險度） */
.plate-stats .pw-card, .pw-card { display: grid; gap: 3px; padding: 6px 10px 5px; border: 1px solid var(--gold-dim); border-radius: 8px;
  background: linear-gradient(180deg, rgba(var(--acc-rgb), .14), rgba(var(--acc-rgb), .03) 60%), var(--sunk); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); min-width: 0; }
.pw-card .pw-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pw-card .pw-top small { font-size: 11px; color: var(--gold); letter-spacing: .14em; margin: 0; }
.pw-card .pw-top b { font-size: 19px; color: var(--gold-light); font-weight: 700; letter-spacing: .02em; line-height: 1.1; }
.pw-card .pw-def { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--muted); border-top: 1px solid rgba(var(--acc-rgb), .18); padding-top: 3px; }
.pw-card .pw-def b { color: var(--text); font-size: 13px; font-weight: 600; margin-left: 3px; }
.pw-card .pw-def i { width: 1px; align-self: stretch; background: rgba(var(--acc-rgb), .22); }
.plate-stats { display: block !important; }
@media (min-width: 1100px) { .pw-card { padding: 9px 12px 7px; } .pw-card .pw-top b { font-size: 24px; } .pw-card .pw-def { font-size: 12px; justify-content: flex-start; gap: 12px; } .pw-card .pw-def b { font-size: 15px; } }
@media (max-width: 1099px) { .plate .plate-stats { min-width: 118px; } .pw-card .pw-def { justify-content: space-around; } }

/* 寶石：切割紅寶石（金邊），深色底金框，價值感 */
.gem-ic { display: inline-block; width: 15px; height: 15px; transform: none; border-radius: 0; box-shadow: none; vertical-align: -2px; margin-right: 5px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ff6b8b'/%3E%3Cstop offset='1' stop-color='%23d01445'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23c1123f'/%3E%3Cstop offset='1' stop-color='%236e0722'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M2 9 6 4h12l4 5-10 12z' fill='url(%23b)'/%3E%3Cpath d='M2 9 6 4l2 5z' fill='%23f04a6f'/%3E%3Cpath d='M6 4h6L8 9z' fill='%23ffb3c4'/%3E%3Cpath d='M12 4l4 5H8z' fill='url(%23a)'/%3E%3Cpath d='M12 4h6l-2 5z' fill='%23ff8fa8'/%3E%3Cpath d='M18 4l4 5h-6z' fill='%23d81e4c'/%3E%3Cpath d='M8 9h8l-4 12z' fill='%23e0244f'/%3E%3Cpath d='M2 9h6l4 12z' fill='%239c0f35'/%3E%3Cpath d='M2 9 6 4h12l4 5-10 12z' fill='none' stroke='%23f0cf7a' stroke-width='1' stroke-linejoin='round'/%3E%3Cpath d='M15.5 5.2l.5 1.3 1.3.5-1.3.5-.5 1.3-.5-1.3-1.3-.5 1.3-.5z' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 3px rgba(255, 70, 110, .45)); }
.gem-chip { margin-left: 8px; padding: 3px 4px 3px 8px; border: 1px solid rgba(214, 178, 94, .6); border-radius: 999px; background: linear-gradient(180deg, #2a1d14, #120c08); color: #f6e5b8; font-size: 13px; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .12), 0 1px 3px rgba(0,0,0,.5); }
.gem-chip:hover { border-color: var(--gold); }
.gem-chip b { margin-left: 7px; padding: 1px 8px; border-radius: 999px; background: linear-gradient(180deg, #e9c66f, #b88a2e); color: #2a1a06; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.mall-gems { border-color: rgba(214, 178, 94, .55); background: linear-gradient(180deg, #2a1d14, #120c08); }
.mall-gems b { color: #f6e5b8; } .mall-gems .gem-ic { width: 26px; height: 26px; margin: 0 0 2px; }
/* 信箱 */
.mail-chip { position: relative; display: inline-grid; place-items: center; width: 28px; height: 26px; margin-left: 6px; padding: 0; border: 1px solid rgba(214, 178, 94, .45); border-radius: 999px;
  background: linear-gradient(180deg, #1d2633, #0d131b); cursor: pointer; order: 3; }
.mail-chip:hover, .mail-chip.has { border-color: var(--gold); }
.mail-ic { width: 15px; height: 15px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2c47a' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='3' y='5.5' width='18' height='13' rx='2'/%3E%3Cpath d='M3.5 7l8.5 6.5L20.5 7'/%3E%3C/svg%3E") center / contain no-repeat; }
.mail-chip b { position: absolute; top: -6px; right: -7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #d9443c; color: #fff; font-size: 10px; line-height: 16px; font-weight: 700; box-shadow: 0 0 0 2px var(--panel); }
.mail-chip b[hidden] { display: none; }
@media (max-width: 1099px) { .gem-chip { padding: 2px 9px 2px 7px; } .plate-gold .mail-chip { margin-left: 5px; } }
/* 持續中的技能／藥水：圖示＋名稱 */
.buffs .bf { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 2px; border-radius: 999px; border-color: rgba(214, 178, 94, .4); }
.bf-ic { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; overflow: hidden; font-style: normal; font-size: 11px; color: var(--gold-light);
  background: radial-gradient(circle at 50% 35%, #3a2e18, #120d07); border: 1px solid var(--gold-dim); }
.bf-ic img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 聊天：名字可以點 */
.chat-box .who, button.who { background: none; border: 0; padding: 0; font: inherit; color: var(--gold-light); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(214, 178, 94, .35); text-underline-offset: 3px; }
.chat-box .who:hover { text-decoration-color: var(--gold); }
/* 玩家資料卡 */
.pf-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 8px; }
.pf-pic { position: relative; width: 64px; height: 82px; border: 1px solid var(--gold-dim); border-radius: 6px; overflow: hidden; display: grid; place-items: center; background: var(--sunk); font-size: 22px; color: var(--gold-light); }
.pf-pic img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-id { display: grid; gap: 2px; min-width: 0; } .pf-id b { font-size: 18px; color: var(--gold-light); font-family: var(--serif); overflow: hidden; text-overflow: ellipsis; }
.pf-id span { font-size: 13px; color: var(--muted); } .pf-on { font-size: 12px !important; } .pf-on.on { color: var(--ok) !important; }
.pf-pw { min-width: 120px; }
.pf-meta { font-size: 13px; color: var(--muted); margin: 0 0 8px; } .pf-meta b { color: var(--text); }
.pf-lock { margin: 14px 0 4px; padding: 14px; text-align: center; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); }
.pf-eq .eq-card.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.pf-peek { margin-top: 10px; }
@media (max-width: 520px) { .pf-head { grid-template-columns: auto minmax(0, 1fr); } .pf-pw { grid-column: 1 / -1; } }
.plate-stats .pw-card span { display: inline !important; background: none !important; border: 0 !important; padding: 0 !important; border-radius: 0; justify-items: initial; }

/* v1.10.9 角色 → 守護神 標籤 */
.temple-tab .patron { margin-top: 0; }
.god.locked { cursor: default; opacity: .6; }
.god-locked .gods { margin: 10px 0; }

/* =====================================================================
   v1.10.9 戰場統一 2.2:1（11:5）：電腦、手機都整張顯示、等比例縮放
   - 獵場圖規格 1980×900；舊的 16:9 圖照樣能用（上下會被裁掉一點）
   - 手機：戰場高度 = 螢幕寬 ÷ 2.2，操作列（提示＋返回城鎮）放在圖的下方，不擋圖，也讓出空間看裝備
   ===================================================================== */
.stage { aspect-ratio: 11 / 5; }
@media (max-width: 1099px) {
  :root { --art-h: min(calc(100vw / 2.2), 46svh); --bar-h: 48px; --stage-h: calc(var(--art-h) + var(--bar-h)); }
  body.sheet-min { --art-h: min(calc(100vw / 3.4), 30svh); }
  .stage { height: var(--stage-h); aspect-ratio: auto; padding-bottom: var(--bar-h); box-sizing: border-box;
    background-origin: content-box; background-clip: content-box; background-position: center 58%; }
  .stage.no-art { background-origin: padding-box; background-clip: padding-box; }
  .stage::after { top: auto; bottom: 0; height: var(--bar-h); z-index: 1; background: linear-gradient(#0c131c, #070b10); border-top: 1px solid rgba(var(--acc-rgb), .28); }
  .stage:not(.no-art)::before { bottom: var(--bar-h); }
  #stage .goal, .goal { bottom: 5px; }
  .stage-controls .hunt-btn { bottom: 5px; }
  .marquee { bottom: calc(var(--bar-h) + 4px); }
  /* 角色與怪物：腳踩在圖的 88% 高度；大小跟著圖的高度走 */
  .actor, .actor.mob.s0 { bottom: calc(var(--bar-h) + var(--art-h) * .1); }
  .actor.mob.s1 { bottom: calc(var(--bar-h) + var(--art-h) * .12); }
  .actor.mob.s3 { bottom: calc(var(--bar-h) + var(--art-h) * .14); }
  .actor.mob.s2 { bottom: calc(var(--bar-h) + var(--art-h) * .36); }
  .actor.mob.s4 { bottom: calc(var(--bar-h) + var(--art-h) * .38); }
  .actor.mob.s5 { bottom: calc(var(--bar-h) + var(--art-h) * .42); }
  .sil.has-sprite { width: calc(var(--art-h) * .62); }
  .actor.mob .sil { width: calc(var(--art-h) * .34); }
  .actor.mob.boss .sil { width: calc(var(--art-h) * .42); }
  .actor.mob:not(.s0) .sil, .actor.mob:not(.s0) .stele { width: calc(var(--art-h) * .24); }
  .stele { padding: 0 6px 2px; } .stele .nm { font-size: 10.5px; } .stele .lv { font-size: 9.5px; }
  .stage-zone { top: 4px; } .stage-zone h2 { font-size: 14px; }
  .stage-phase { top: 5px; font-size: 10.5px; }
  .stage-controls .gauge { top: 24px; }
  .floater { font-size: 13px; } .floater.crit { font-size: 16px; }
}

/* v1.10.10 怪物（與主角）名稱下方不再有框：只留文字、血條與狀態，深色描邊確保在亮背景上看得清楚 */
.stele, .actor.mob:not(.s0) .stele { background: none !important; border: 0 !important; clip-path: none !important; box-shadow: none; padding: 0 2px !important; min-width: 0; }
.stele .nm { text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.9); }
.stele .lv { text-shadow: 0 1px 2px #000; color: #d6d0c2; }
.stele .bar { box-shadow: 0 1px 3px rgba(0,0,0,.7); }
.stele .nm .el-badge { box-shadow: 0 1px 2px rgba(0,0,0,.6); }
.actor.boss .stele .nm { text-shadow: 0 1px 2px #000, 0 0 8px rgba(0,0,0,.9); }
/* 怪物大小統一（v1.10.10）：一般約舞台高度 38%、首領 50%、旁邊的怪 25% */
@media (min-width: 1100px) {
  .actor.mob .sil { width: clamp(84px, 12.5vw, 170px); }
  .actor.mob.boss .sil { width: clamp(110px, 17vw, 230px); }
  .actor.mob:not(.s0) .sil { width: clamp(52px, 8vw, 112px); }
  .actor.mob:not(.s0) .stele { width: auto; min-width: 70px; }
}
@media (max-width: 1099px) {
  .actor.mob .sil { width: calc(var(--art-h) * .38); }
  .actor.mob.boss .sil { width: calc(var(--art-h) * .5); }
  .actor.mob:not(.s0) .sil, .actor.mob:not(.s0) .stele { width: calc(var(--art-h) * .25); }
}

/* v1.10.11 畫面固定：點兩下不會放大、雙指不會縮放、不會被拖出邊框（像 App 一樣） */
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior: none; }
button, a, .cell, .eq-card, .actor, .tabs, .stage { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
#screen-game { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#screen-game input, #screen-game textarea, #screen-game .chat-box, #screen-game .log { -webkit-user-select: text; user-select: text; }

/* v1.10.12 狩獵場：地圖｜村莊｜世界王；地圖攤平成 1-1、1-2… */
.hunt-tabs { margin-bottom: 10px; }
.map-list { display: grid; gap: 8px; }
.zone-btn .zcode { display: inline-block; min-width: 38px; margin-right: 4px; padding: 0 6px; border-radius: 4px; text-align: center; font-size: 13px; color: #1b1307; background: linear-gradient(#e2c27a, #b48a3e); font-weight: 700; }
.zone-btn[aria-current="true"] .zcode { background: linear-gradient(#ffe7a6, #d9a84e); }
.zone-btn .zch { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 1px; }
.vil-ic { position: relative; overflow: hidden; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--gold-dim); display: grid; place-items: center; background: var(--sunk); color: var(--gold-light); font-family: var(--serif); }
.vil-ic img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vil-row[disabled] { opacity: .5; cursor: default; }

/* v1.10.13 排行榜 */
.rank-tabs { margin-bottom: 8px; }
.rank-cls { margin: 0 0 8px; }
.rk-mine { margin: 2px 0 8px; font-size: 13px; color: var(--muted); } .rk-mine b { color: var(--gold-light); }
.rk-list { display: grid; gap: 4px; }
.rk-row { display: grid; grid-template-columns: 34px 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 6px 10px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--tile); border: 1px solid var(--line); border-radius: 8px; }
.rk-row:hover { border-color: var(--gold-dim); }
.rk-row.me { border-color: var(--gold); background: linear-gradient(90deg, rgba(var(--acc-rgb), .16), var(--tile)); }
.rk-n { font-size: 15px; font-weight: 700; color: var(--muted); text-align: center; }
.rk-row.top1 .rk-n { color: #ffd76a; } .rk-row.top2 .rk-n { color: #d9dee6; } .rk-row.top3 .rk-n { color: #e0a16b; }
.rk-row.top1 { border-color: rgba(255, 215, 106, .5); }
.rk-pic { position: relative; width: 34px; height: 40px; border-radius: 6px; overflow: hidden; border: 1px solid var(--gold-dim); background: var(--sunk); display: grid; place-items: center; color: var(--gold-light); font-family: var(--serif); }
.rk-pic img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.rk-t { min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-t small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.rk-on { font-style: normal; color: var(--ok); font-size: 9px; margin-left: 5px; vertical-align: 2px; }
.rk-v { text-align: right; white-space: nowrap; } .rk-v b { color: var(--gold-light); font-size: 15px; } .rk-v small { margin-left: 3px; font-size: 11px; color: var(--muted); }
.sel-note { grid-column: 1 / -1; margin: 6px 2px 0; font-size: 12.5px; }

/* =====================================================================
   v1.10.15 三詞裝備的光更明顯：
   - 圖示上每 3 秒掃過一道斜光（屬性色），看得出「在閃」
   - 格子外框跟著呼吸發光
   - 系統開了「減少動態效果」也照樣會閃（放慢一半），以前在這種電腦上完全不會動
   ===================================================================== */
.cell.glow .cell-ic::before, .eq-card.glow .cell-ic::before, .icon.glow::before {
  background: radial-gradient(circle, rgba(var(--glow), .75) 0%, rgba(var(--glow), .3) 45%, rgba(var(--glow), 0) 72%);
  animation: glowCore 2.4s ease-in-out infinite;
}
@keyframes glowCore { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.06); } }
.cell.glow .cell-ic::after, .eq-card.glow .cell-ic::after, .icon.glow::after {
  background:
    linear-gradient(115deg, rgba(255,255,255,0) 38%, rgba(255,255,255,.75) 48%, rgba(var(--glow), .55) 52%, rgba(255,255,255,0) 62%) no-repeat,
    radial-gradient(circle at 50% 55%, rgba(var(--glow), .35) 0%, rgba(var(--glow), 0) 70%);
  background-size: 260% 100%, 100% 100%;
  background-position: 140% 0, 0 0;
  box-shadow: inset 0 0 12px rgba(var(--glow), .6);
  opacity: 1;
  animation: glowSweep 3s ease-in-out infinite;
}
@keyframes glowSweep { 0% { background-position: 140% 0, 0 0; } 55%, 100% { background-position: -40% 0, 0 0; } }
.cell.glow, .eq-card.glow { animation: glowEdge 2.4s ease-in-out infinite; border-color: rgba(var(--glow), .75); }
@keyframes glowEdge { 0%, 100% { box-shadow: inset 0 0 10px rgba(var(--glow), .18), 0 0 4px rgba(var(--glow), .25); } 50% { box-shadow: inset 0 0 16px rgba(var(--glow), .32), 0 0 12px rgba(var(--glow), .55); } }
.eq-card.glow .eq-nm { text-shadow: 0 0 8px rgba(var(--glow), .55); }
@media (prefers-reduced-motion: reduce) {
  .cell.glow .cell-ic::before, .eq-card.glow .cell-ic::before, .icon.glow::before { animation: glowCore 4.8s ease-in-out infinite; }
  .cell.glow .cell-ic::after, .eq-card.glow .cell-ic::after, .icon.glow::after { animation: glowSweep 6s ease-in-out infinite; opacity: 1; }
  .cell.glow, .eq-card.glow { animation: glowEdge 4.8s ease-in-out infinite; }
}

/* v1.10.16 地圖分頁：一張地圖一行，不用滑很久就能點到 */
.map-list.compact { display: grid; gap: 4px; }
.map-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 26px; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 5px 6px 5px 8px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--tile); border: 1px solid var(--line); border-radius: 8px; }
.map-row:hover { border-color: var(--gold-dim); }
.map-row[aria-current="true"] { border-color: var(--gold); background: linear-gradient(90deg, rgba(var(--acc-rgb), .18), var(--tile)); }
.map-row .zcode { min-width: 36px; padding: 1px 5px; border-radius: 4px; text-align: center; font-size: 12.5px; color: #1b1307; background: linear-gradient(#e2c27a, #b48a3e); font-weight: 700; }
.map-row .mn { min-width: 0; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-row .mn small { color: var(--muted); font-size: 12px; margin-left: 2px; }
.map-row .mn i { margin-left: 6px; }
.map-row .cur-tag { font-style: normal; font-size: 11px; color: var(--gold-light); border: 1px solid var(--gold-dim); border-radius: 999px; padding: 0 6px; vertical-align: 1px; }
.map-row .mr { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } .map-row .mr small { color: var(--muted); font-size: 12px; min-width: 44px; text-align: right; }
.map-row .mi { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--muted); font-size: 15px; }
.map-row .mi:hover { color: var(--gold-light); background: rgba(var(--acc-rgb), .12); }
@media (max-width: 1099px) { .map-row { min-height: 38px; } .map-row .mn { font-size: 14px; } }

/* v1.10.18 大王時間 */
.wb-mvp { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0; font-size: 13px; }
.wb-mvp span { color: var(--muted, #9aa); }
.wb-mvp b { color: var(--gold-light, #f0d68a); margin-left: 4px; }
.wb-on { color: #6fd3a8; font-size: 11px; }
.list-rows > div.me { background: rgba(var(--acc-rgb), .14); }
.wb-rules { margin: 8px 0 12px; font-size: 13px; }
.wb-rules .adv-h { color: var(--gold-light, #f0d68a); padding: 0; }
.wb-rules ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }

/* v1.10.21 背包第二層篩選、交易所 */
.seg-tabs.sub { margin-top: -4px; }
.seg-tabs.sub button { font-size: 13px; padding-block: 6px; }
.mk-search { display: flex; gap: 6px; margin: 8px 0; }
.mk-search input { flex: 1; min-width: 0; }
.mk-search select { max-width: 9em; }
.mk-list { display: flex; flex-direction: column; gap: 6px; }
.mk-row { display: flex; align-items: center; gap: 8px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; }
.mk-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.mk-ic { position: relative; flex: none; width: 46px; height: 46px; }
.mk-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mk-t .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-t small { font-size: 12px; line-height: 1.35; }
.mk-bo { color: #ff8a7a; }
.mk-time { color: var(--gold-light, #f0d68a); }
.mk-btns { display: flex; flex-direction: column; gap: 4px; flex: none; }
.mk-btns .btn { min-width: 4.2em; }
.mk-n { display: inline-block; min-width: 1.4em; padding: 0 4px; border-radius: 9px; background: #c0392b; color: #fff; font-size: 11px; line-height: 1.5; }
.mk-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 10px 0; }
.mk-sum { margin-bottom: 10px; font-size: 14px; }
.mk-sell, .mk-bid { display: grid; gap: 10px; margin-top: 10px; }
.mk-sell label, .mk-bid label { display: grid; gap: 4px; font-size: 13px; color: var(--muted, #9aa); }
.mk-sell input, .mk-sell select, .mk-bid input { font-size: 16px; }

/* v1.10.22 上架視窗 */
.mk-sell-head { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 4px; }
.mk-sell-head .cell-ic { width: 64px; height: 64px; }
.mk-sell-head .name { font-size: 17px; }
.mk-f { display: grid !important; grid-template-columns: 4em minmax(0, 1fr) auto; align-items: center; gap: 8px !important; font-size: 14px !important; color: inherit !important; }
.mk-f > span:first-child { text-align: right; color: var(--muted, #9aa); }
.mk-mode { display: flex; gap: 16px; }
.mk-mode label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.mk-recent { margin: 0; text-align: center; font-size: 13px; color: #6fd3a8; }
.log.tall { max-height: 62svh; overflow: auto; }
.gains-tab .g-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gains-tab .g-cell { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; display: grid; gap: 2px; min-width: 0; }
.gains-tab .g-cell small { font-size: 12px; color: var(--muted); }
.gains-tab .g-cell b { font-size: 18px; color: var(--text); font-weight: 600; }
.gains-tab .g-cell i { font-style: normal; font-size: 12px; color: var(--gold-dim); }
/* v1.10.23 暗金特殊屬性 */
.item-card li.proc { color: var(--r-unique); }
/* v1.10.23 抽抽樂 */
.lt-buy { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.lt-buy .btn { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; }
.lt-buy .btn small { font-size: 11px; opacity: .85; font-weight: 400; }
.lt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.lt-card { border: 1px solid var(--tc); border-radius: var(--radius); padding: 8px; background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 18%, transparent), transparent); display: grid; gap: 4px; font-size: 13px; }
.lt-card b { color: var(--tc); font-size: 12px; }
.lt-card.t5 { box-shadow: 0 0 14px var(--tc); animation: lt-glow 1.6s ease-in-out infinite; }
.lt-card.t4 { box-shadow: 0 0 8px var(--tc); }
@keyframes lt-glow { 50% { box-shadow: 0 0 26px var(--tc); } }
.lt-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lt-row .vil-ic { color: #ff9f5a; }

/* v1.10.35 彈窗裡的主要按鈕固定在視窗底部（手機上不用捲到最下面才看到「確認分配」） */
.pop-actions.sticky-foot { position: sticky; bottom: -12px; z-index: 3; margin: 14px -16px -12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--panel); border-top: 1px solid rgba(var(--acc-rgb), .28); box-shadow: 0 -12px 18px rgba(0,0,0,.35); }
.pop-actions.sticky-foot .btn.primary { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .ap-row { grid-template-columns: minmax(0, 1fr) 38px 54px 38px; gap: 6px; padding: 6px 10px; }
  .ap-n small { font-size: 11px; line-height: 1.3; }
  .ap-v { font-size: 18px; }
  .ap-b { width: 38px; min-height: 34px; }
}
/* v1.10.36／37 物品視窗的按鈕：三欄小按鈕，全部直接列出（不摺疊） */
.act-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.btn.act { display: grid; place-items: center; align-content: center; gap: 1px; min-height: 48px; padding: 6px 4px; font-size: 14px; line-height: 1.25; white-space: normal; }
.btn.act small { font-size: 11px; font-weight: 400; color: var(--muted); }
.btn.act.danger small { color: inherit; opacity: .8; }
/* v1.10.36 鐵匠（強化／神賜）從物品進來：上面只顯示這一件 */
.focus-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.focus-item b { font-family: var(--serif); font-size: 16px; } .focus-item small { display: block; font-size: 12px; color: var(--muted); }
/* v1.10.39 鐵匠・製作：每一區分開（卷軸鍛造在最上面） */
.ws-sec { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(var(--acc-rgb), .18); }
.ws-sec:first-of-type { border-top: 0; padding-top: 0; }
.ws-sec h3 { margin: 0 0 4px; } .ws-sec h3 small { font-size: 12px; font-weight: 400; }
.btn.act.primary small { color: rgba(40, 28, 8, .75); }

/* =====================================================================
   v1.10.43 人物與怪物：小一點（類似天堂）、大小差距不要太大、動作流暢
   - 大小一律跟著「戰場圖的高度」（--art-h）：主角約 36%、怪物約 30%、旁邊的怪約 26%、首領約 37%
   - 電腦版也用同一套比例（--art-h = 戰場高度，container query）
   - 動畫：待機呼吸（CSS）＋攻擊補間（app.js heroAttack，兩層交叉淡化）＋前衝／後座＋受擊閃光；怪物各自呼吸、出手前撲、被打退、倒下
   ===================================================================== */
@media (min-width: 1100px) {
  .stage { container-type: size; --art-h: 100cqh; }
  .sil.has-sprite { width: clamp(96px, calc(var(--art-h) * .42), 200px); }
  .actor.mob .sil { width: clamp(64px, calc(var(--art-h) * .37), 170px); }
  .actor.mob.boss .sil { width: clamp(84px, calc(var(--art-h) * .46), 210px); }
  .actor.mob:not(.s0) .sil { width: clamp(56px, calc(var(--art-h) * .33), 150px); }
  .actor.mob:not(.s0) .stele { width: auto; min-width: 70px; }
}
@media (max-width: 1099px) {
  .sil.has-sprite { width: calc(var(--art-h) * .42); }
  .actor.mob .sil { width: calc(var(--art-h) * .36); }
  .actor.mob.boss .sil { width: calc(var(--art-h) * .45); }
  .actor.mob:not(.s0) .sil, .actor.mob:not(.s0) .stele { width: calc(var(--art-h) * .31); }
}
/* 主角：外框裡三層——前衝（move）＞受擊（hurt）＞呼吸（breathe）＞兩張精靈圖（a 目前、b 下一格淡入） */
.sil.has-sprite .spr-move, .sil.has-sprite .spr-hurt, .sil.has-sprite .spr-breathe, .sil.has-sprite .spr-scale { position: absolute; inset: 0; pointer-events: none; }
.sil.has-sprite .spr-scale { transform-origin: 50% 95.5%; }   /* v1.14.17e 依待機身高統一大小，以腳底為中心縮放 */
.sil.has-sprite .spr-breathe { transform-origin: 50% 96%; animation: odysBreathe var(--br, 2.8s) ease-in-out infinite; }
.sil .sprite.b { opacity: 0; }
@keyframes odysBreathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: translateY(-.6%) scale(1.008, 1.022); } }
/* 怪物：各自的呼吸節奏（renderMobs 給每隻不同的 --br、--bd），腳底為軸 */
.actor.mob .sil img.art { transform-origin: 50% 98%; animation: odysMobIdle var(--br, 2.6s) ease-in-out var(--bd, 0s) infinite; will-change: transform; }
@keyframes odysMobIdle { 0%, 100% { transform: scale(1, 1) translateY(0); } 50% { transform: scale(1.025, .975) translateY(.4%); } 25%, 75% { transform: scale(.99, 1.015) translateY(-.8%); } }
.actor.mob .sil { transition: none; }
/* 出場：從地面淡入、稍微放大；倒下：閃一下白、往後倒、沉下去淡出 */
.actor.mob.enter { opacity: 0; transform: translateY(4%) scale(.9); }
.mobs .actor.mob { transition: transform .35s cubic-bezier(.2, .8, .3, 1), opacity .35s, right .35s, bottom .35s; }
.actor.mob.gone { opacity: 1; transform: none; transition: none; }
.actor.mob.gone .sil img.art { animation: odysMobDie .6s cubic-bezier(.4, 0, .7, 1) forwards; }
.actor.mob.gone .stele { opacity: 0; transition: opacity .25s; }
@keyframes odysMobDie { 0% { transform: none; filter: brightness(2.2) saturate(.4); opacity: 1; } 18% { transform: translateX(4%) rotate(4deg); filter: brightness(1.4); opacity: 1; }
  100% { transform: translate(10%, 10%) rotate(14deg) scale(.92, .8); filter: brightness(.6); opacity: 0; } }
/* 舊的「被打一下就整個角色往旁邊跳 6px」改成 app.js 的受擊動畫 */
.actor.hit, .actor.hero.hit { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .sil.has-sprite .spr-breathe, .actor.mob .sil img.art, .actor.mob.gone .sil img.art { animation: none; }
  .actor.mob.gone { opacity: 0; transition: opacity .3s; }
}
/* 怪物有圖時不顯示示意字（.actor.mob .sil 的字色權重比較高，要再寫一次）；倒下淡出時也不會露出來 */
.actor.mob .sil:has(> img.art), .actor.mob.gone .sil { color: transparent; text-shadow: none; }

/* =====================================================================
   v1.10.44 使用者：「比例變太小了」→ 放大回接近原本（主角約舞台高度 48%、怪 34%、旁邊的怪 30%、首領 42%）
   攻擊特效邊緣淡出只留最右邊 5%（原本 14% 會把刀光、法術淡掉，看起來像被切到）
   手機的公告跑馬燈移到戰場上方（原本在下方會蓋住角色的腳）
   ===================================================================== */
@media (min-width: 1100px) {
  .sil.has-sprite { width: clamp(110px, calc(var(--art-h) * .55), 250px); }
  .actor.mob .sil { width: clamp(70px, calc(var(--art-h) * .42), 190px); }
  .actor.mob.boss .sil { width: clamp(90px, calc(var(--art-h) * .52), 230px); }
  .actor.mob:not(.s0) .sil { width: clamp(60px, calc(var(--art-h) * .37), 165px); }
}
@media (max-width: 1099px) {
  .sil.has-sprite { width: calc(var(--art-h) * .56); }
  .actor.mob .sil { width: calc(var(--art-h) * .41); }
  .actor.mob.boss .sil { width: calc(var(--art-h) * .5); }
  .actor.mob:not(.s0) .sil, .actor.mob:not(.s0) .stele { width: calc(var(--art-h) * .36); }
  .marquee { top: 0; bottom: auto; z-index: 7; }
}
.actor.hero .sil .sprite { -webkit-mask-image: linear-gradient(to right, #000 0, #000 95%, transparent 100%); mask-image: linear-gradient(to right, #000 0, #000 95%, transparent 100%); }

/* v1.10.47 神賜詞條分顏色＋效果說明：祝福金、詛咒紅、遠古紫、屬性依元素（火橙、水藍、風綠、地土黃） */
.dv-bless { color: #f6d77a; } .dv-curse { color: var(--danger); } .dv-anc { color: #c9a6ff; } .dv-el { color: #8fd6c8; }
.dv-el.el-fire { color: var(--el-fire); } .dv-el.el-water { color: var(--el-water); } .dv-el.el-wind { color: var(--el-wind); } .dv-el.el-earth { color: var(--el-earth); }
.divine-slots { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; }
.divine-slots dd b { font-weight: 700; }
.divine-slots dd small, .item-card li.div small, .enchant-result small { display: block; font-size: 12.5px; line-height: 1.45; color: #b8b2a6; font-weight: 400; margin-top: 1px; }
.item-card li.div { color: var(--text); } .item-card li.div b { font-weight: 700; }
.item-card li.div.dv-bless b { color: #f6d77a; } .item-card li.div.dv-curse b, .item-card li.div.dv-curse small { color: var(--danger); }
.item-card li.div.dv-anc b { color: #c9a6ff; } .item-card li.div.dv-el b { color: inherit; }
.item-card li.div.dv-el.el-fire b { color: var(--el-fire); } .item-card li.div.dv-el.el-water b { color: var(--el-water); } .item-card li.div.dv-el.el-wind b { color: var(--el-wind); } .item-card li.div.dv-el.el-earth b { color: var(--el-earth); }
.enchant-result small { text-align: center; font-size: 13px; }
.dv-odds { margin: 4px 0 10px; } .dv-odds .hint { margin: 0 0 4px; }
.dv-odds ul { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 5px; font-size: 12.5px; line-height: 1.5; color: #b8b2a6; }
.dv-odds li b { margin-right: 6px; font-size: 13px; }
.sk-tag.mythic { color: var(--r-unique); border-color: var(--r-unique); }   /* v1.10.47 神話技能 */

/* =====================================================================
   v1.10.48 手機版面比例（參考使用者提供的截圖）：上方角色卡變矮、戰場變高、留白
   - 角色卡四行：名字｜寶石＋信箱、職業｜金幣、戰力｜AC MR、經驗條；頭像改圓形
   - HP／MP 與持續效果移到戰場左上（app.js placeHud）；地圖名、狀態、首領進度在右上
   - 戰場圖高度 = 螢幕寬 ÷ 1.56（原本 ÷ 2.2），左右會裁掉一點；人物比例稍微收，看起來不擠
   ===================================================================== */
.pg-gold, .pg-acct { display: contents; }
.stage-hud { display: none; }
@media (max-width: 1099px) {
  :root { --art-h: min(calc(100vw / 1.56), 37svh); --bar-h: 46px; --stage-h: calc(var(--art-h) + var(--bar-h)); }
  body.sheet-min { --art-h: min(calc(100vw / 3.4), 30svh); --stage-h: calc(var(--art-h) + var(--bar-h)); }
  .stage { background-position: center 55%; }

  /* ---- 角色卡 */
  .plate { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-rows: auto auto auto auto; column-gap: 12px; row-gap: 2px; padding: 7px 14px 8px; align-items: center; }
  .plate .pg-acct .gem-chip { height: 24px; } .plate .pg-acct .mail-chip { height: 24px; width: 30px; }
  .plate .avatar-wrap { grid-column: 1; grid-row: 1 / 5; align-self: center; }
  .plate .avatar { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--gold); box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 12px rgba(var(--acc-rgb), .35); }
  .plate .avatar img.art { object-position: 50% 8%; }
  .plate .lv-badge { bottom: -5px; }
  .plate .plate-id { display: contents; }
  .plate .plate-id .name { grid-column: 2; grid-row: 1; font-size: 17px; line-height: 1.2; }
  .plate .plate-id .cls { grid-column: 2; grid-row: 2; font-size: 12px; line-height: 1.3; }
  .plate .plate-gold { grid-column: 3; grid-row: 1 / 3; display: grid; justify-items: end; align-content: center; gap: 3px; font-size: 14px; }
  .plate .plate-gold::after { display: none; }
  .plate .pg-acct { display: flex; align-items: center; gap: 6px; }
  .plate .pg-acct .gem-chip, .plate .pg-acct .mail-chip { margin: 0; }
  .plate .pg-gold { display: flex; align-items: center; gap: 4px; color: var(--gold-light); font-size: 15px; letter-spacing: .02em; }
  .plate .pg-gold .coin { width: 16px; height: 16px; }
  .plate .plate-stats { grid-column: 2 / 4; grid-row: 3; min-width: 0; }
  .plate .pw-card { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0; border: 0; background: none; box-shadow: none; }
  .plate .pw-card .pw-top { justify-content: flex-start; gap: 6px; }
  .plate .pw-card .pw-top small { font-size: 11px; letter-spacing: .1em; }
  .plate .pw-card .pw-top b { font-size: 15px; }
  .plate .pw-card .pw-def { border: 0; padding: 0; gap: 10px; font-size: 11.5px; justify-content: flex-end; }
  .plate .pw-card .pw-def i { display: none; }
  .plate .pw-card .pw-def b { font-size: 13.5px; }
  .plate .bars { grid-column: 2 / 4; grid-row: 4; display: block; }
  .plate .bar.exp { height: 14px; border-radius: 7px; } .plate .bar.exp i { border-radius: 7px; }
  .plate .bar.exp span { font-size: 10px; line-height: 12px; text-align: center; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* ---- 戰場左上：HP、MP、持續效果 */
  .stage-hud { display: grid; position: absolute; z-index: 5; top: 8px; left: 8px; width: min(44%, 210px); gap: 4px; pointer-events: none; transition: transform .25s; }
  .stage-hud .bar { height: 18px; border-radius: 9px; border: 1px solid rgba(0,0,0,.65); background: rgba(6,10,15,.72); box-shadow: 0 1px 4px rgba(0,0,0,.55); }
  .stage-hud .bar i { border-radius: 9px; }
  .stage-hud .bar i::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 45%; border-radius: 9px 9px 0 0; background: linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,0)); }
  .stage-hud .bar span { text-align: center; padding: 0 4px; font-size: 11.5px; line-height: 16px; font-weight: 600; white-space: nowrap; }
  .stage-hud .buffs { gap: 3px; margin-top: 1px; }
  .stage-hud .buffs > span { font-size: 10.5px; line-height: 18px; padding: 0 6px 0 1px; background: rgba(8,13,20,.8); }
  .stage-hud .bf-ic { width: 16px; height: 16px; font-size: 9px; }

  /* ---- 戰場右上：地圖名、戰鬥狀態、首領進度 */
  .stage-zone { top: 7px; left: auto; right: 10px; width: 52%; text-align: right; transition: transform .25s; }
  .stage-zone h2 { font-size: 15.5px; }
  .stage-phase { top: 31px; right: 10px; transition: transform .25s; }
  .stage-controls .gauge { top: 55px; left: auto; right: 10px; width: min(44%, 210px); transition: transform .25s; }
  .gauge small { text-align: right; }
  /* 公告跑馬燈出現時，上方資訊往下讓一格 */
  #stage:has(.marquee:not(.hidden)) :is(.stage-hud, .stage-zone, .stage-phase, .gauge) { transform: translateY(22px); }

  /* ---- 城鎮 NPC 讓出上方資訊 */
  .town, #stage:has(.goal:not(.hidden)) .town { top: 78px; bottom: calc(var(--bar-h) + 6px); }

  /* ---- 人物：戰場變高，比例稍微收（實際大小比原本大一點），後排怪往下靠 */
  .sil.has-sprite { width: calc(var(--art-h) * .5); }
  .actor.mob .sil { width: calc(var(--art-h) * .36); }
  .actor.mob.boss .sil { width: calc(var(--art-h) * .45); }
  .actor.mob:not(.s0) .sil, .actor.mob:not(.s0) .stele { width: calc(var(--art-h) * .31); }
  .actor.mob.s2 { bottom: calc(var(--bar-h) + var(--art-h) * .31); }
  .actor.mob.s4 { bottom: calc(var(--bar-h) + var(--art-h) * .33); }
  .actor.mob.s5 { bottom: calc(var(--bar-h) + var(--art-h) * .36); }
}
@media (max-width: 380px) { .plate { column-gap: 9px; padding: 8px 10px 9px; } .plate .pw-card .pw-top small { display: inline; } }

/* v1.10.49 背包排序＋只顯示我能用的（背包、倉庫共用） */
.bag-opts { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin: -2px 0 10px; }
.bag-opts .chk { min-height: 40px; font-size: 14px; min-width: 0; }
.bag-opts .chk small { margin-left: 4px; color: var(--muted); font-size: 12px; }
.bag-sort { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 13px; color: var(--muted); min-width: 0; }
.bag-sort select { min-height: 40px; min-width: 0; max-width: 150px; padding: 0 10px; background: var(--sunk); border: 1px solid var(--line-strong); border-radius: var(--radius); }

/* v1.10.50 神器（神器之路的四把職業神器＋之後的九神神器）：赤金色，比神兵高一階 */
:root { --r-artifact: #ff7a45; }
.rar-artifact { --rc: var(--r-artifact); }
.name.rar-artifact, .rar-artifact.name, .item-card.ic.rar-artifact .ic-title .name { color: var(--r-artifact); }
.item-card.ic.rar-artifact { border-color: rgba(255,122,69,.6); } .item-card.ic.rar-artifact .ic-title { border-bottom-color: rgba(255,122,69,.4); }
.cell.rar-artifact, .eq-card.rar-artifact { border-color: rgba(255,122,69,.9); box-shadow: inset 0 0 12px rgba(255,122,69,.3); }
.art-road .ar-head { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 8px; }
.art-road .ar-head .icon { width: 72px; height: 72px; font-size: 28px; }
.art-road .ar-head b { font-size: 17px; display: block; }
.art-road .ar-head small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.art-road .ar-head small.en { font-style: italic; }
.art-road .ar-head small.r-proc { color: var(--r-unique); }
.ar-done { color: var(--ok); font-weight: 600; }
.ar-steps { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 6px; }
.ar-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--tile-2); }
.ar-steps li i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-style: normal; font-size: 13px; color: var(--btn-ink); }
.ar-steps li.ok i { background: var(--ok); border-color: var(--ok); }
.ar-steps li small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.5; margin-top: 2px; }
.ar-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ar-row.me { border-color: rgba(255,122,69,.6) !important; }
.art-road .pop-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.art-road .pop-actions .btn { flex: 1 1 auto; min-height: 40px; }
.art-road .pop-actions .btn small { display: block; font-size: 11.5px; font-weight: 400; opacity: .85; }
.btn[data-trial] { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.3; }
.btn[data-trial] small { display: block; font-size: 11.5px; font-weight: 400; opacity: .85; }

/* =====================================================================
   v1.10.51 使用者回饋：勾選放進工具列、受詛咒紅框、神賜說明放右邊、遠古四階四色、倉庫金幣
   ===================================================================== */
.toolbar .chk.mine { min-height: 40px; font-size: 14px; gap: 7px; }
.toolbar .chk.mine small { margin-left: 2px; font-size: 12px; color: var(--muted); }
.bag-opts { display: none; }
/* 受詛咒的格子：細的淡紅框 */
.cell.bl-cursed, .eq-card.bl-cursed { border-color: rgba(224, 96, 96, .7) !important; box-shadow: inset 0 0 0 1px rgba(224, 96, 96, .35); }
/* 遠古系四階：遠古 綠、永恆 藍、不朽 紫、太初 橙金 */
.dv-anc-1 { color: #7fd38a !important; } .dv-anc-2 { color: #6fb7ff !important; } .dv-anc-3 { color: #c9a6ff !important; } .dv-anc-4 { color: #ffb347 !important; }
.item-card li.div.dv-anc-1 b { color: #7fd38a; } .item-card li.div.dv-anc-2 b { color: #6fb7ff; } .item-card li.div.dv-anc-3 b { color: #c9a6ff; } .item-card li.div.dv-anc-4 b { color: #ffb347; }
/* 神賜：系別｜詞條｜效果（效果靠右、不換到下一行） */
.dv-slots { display: grid; gap: 6px; margin: 4px 0 10px; }
.dv-slot { display: grid; grid-template-columns: 52px auto minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--tile-2); }
.dv-slot .dv-fam { font-size: 12.5px; color: var(--muted); }
.dv-slot b { font-size: 15px; white-space: nowrap; }
.dv-slot .dv-fx { text-align: right; font-size: 12.5px; color: #b8b2a6; line-height: 1.45; min-width: 0; }
.item-card li.div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.item-card li.div small { display: inline; text-align: right; margin: 0; min-width: 0; }
/* 倉庫金幣 */
.wh-gold { border: 1px solid rgba(var(--acc-rgb), .3); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; background: var(--tile); display: grid; gap: 8px; }
.wh-g-now { display: flex; gap: 18px; } .wh-g-now span { display: grid; } .wh-g-now small { font-size: 12px; color: var(--muted); } .wh-g-now b { font-size: 18px; color: var(--gold-light); }
.wh-g-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; min-width: 0; }
.wh-g-row:has(.btn.small) { grid-template-columns: 1fr 1fr; }
.wh-g-row input { width: 100%; min-width: 0; min-height: 40px; background: var(--sunk); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0 10px; }
.wh-g-row .btn { min-height: 40px; min-width: 0; padding-left: 12px; padding-right: 12px; }
.btn.uncurse { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.3; } .btn.uncurse small { display: block; font-size: 11.5px; font-weight: 400; opacity: .85; }
.item-card li.div .dv-name { white-space: nowrap; flex: none; }
/* v1.10.52 神器頁：四職業對照（原本套用 .list-rows 的三欄格線，文字被擠成直的） */
.ar-list { display: grid; gap: 6px; }
.ar-list .ar-row { display: block; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--tile-2); min-width: 0; }
.ar-list .ar-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.5; }

/* v1.10.55 物品視窗「和身上比較」：三欄（項目｜身上｜這件），長名稱不撐寬 */
.sec-cmp .cmp { display: grid; gap: 2px; }
.sec-cmp .cmp-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.sec-cmp .cmp-row > span { min-width: 0; overflow-wrap: anywhere; }
.sec-cmp .cmp-row > span:nth-child(n+2) { text-align: right; }
.sec-cmp .cmp-h > span { font-size: .78em; color: var(--muted, #9aa3ad); }
.sec-cmp .cmp-nm { font-weight: 600; color: var(--rc, var(--text)); }
.sec-cmp .cmp-nm.rar-artifact { color: var(--r-artifact); }
.sec-cmp .cmp-row small { margin-left: 4px; font-size: .78em; }
.sec-cmp .ok { color: var(--ok, #6fcf7f); }
.sec-cmp .bad { color: var(--danger, #e06060); }
.sec-cmp .cmp-pw { margin: 0 0 4px; }

/* v1.10.56 神器欄：裝備欄下方一排三格；還沒開放的格子寫「Lv.55 開放」 */
.eq-h { margin: 10px 0 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.eq-h small { margin-left: 6px; font-size: 11px; color: var(--faint); }
.eq-relic { margin-bottom: 6px; }
.eq-card.locked { opacity: .45; border-style: dashed; }
.eq-card.rar-artifact { border-color: rgba(255,122,69,.75); }
.ar-row .r-proc, .ar-head .r-proc { color: var(--r-artifact, #ff7a45); }

/* v1.10.57 物品卡：強化加的數值（天堂式「2 +6」） */
.ic-stats .enc { color: var(--gold-light, #f2cf5b); }
/* v1.10.58 配點：到自然值上限的能力標「上限」 */
.ap-v .ap-cap { display: block; font-size: 10px; color: var(--gold-light); line-height: 1; }

/* v1.10.62 角色 AC 分開寫「AC −14 −6」：強化卷軸加的部分金色（跟物品卡的強化數值一樣） */
.ac-enc { color: var(--gold-light, #f2cf5b); font-weight: inherit; margin-left: .15em; }
.def-now b.num:has(.ac-enc) { color: var(--text); white-space: nowrap; font-size: 14px; letter-spacing: -.02em; }

/* v1.11.0 突破試煉視窗：三個步驟由上往下；修行進度條；按鈕整列（至少 40px 高） */
.bt-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.bt-step { background: var(--sunk, #0b131d); border: 1px solid var(--line, #2a3747); border-radius: 4px; padding: 8px 10px; min-width: 0; }
.bt-step.ok { border-color: rgba(111,207,127,.45); }
.bt-step > b { font-size: 14px; color: var(--gold-light); }
.bt-step p { margin: 4px 0 6px; font-size: 13px; overflow-wrap: anywhere; }
.bt-step .pop-actions { margin: 6px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.bt-step .pop-actions .btn { min-height: 44px; }
.bt-step .pop-actions .btn small { display: block; font-size: 11px; opacity: .8; font-weight: 400; }
.bt-step .item-card { margin: 6px 0 0; }
.bt-bar { position: relative; height: 22px; border-radius: 3px; background: rgba(255,255,255,.06); overflow: hidden; }
.bt-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2f6f8f, #5fb3c9); }
.bt-bar span { position: relative; display: block; text-align: center; font-size: 12px; line-height: 22px; color: var(--text); }

/* v1.11.1 強化、神賜：按鈕位置固定（說明固定兩行高、按鈕兩格並排、結果固定高度），連點不會跳來跳去 */
.forge-note { min-height: 3.2em; margin: 0; }
#pop .forge-acts .btn { min-height: 44px; }
#pop .forge-acts .btn small { display: block; font-size: 11px; opacity: .8; font-weight: 400; }
.enchant-result { min-height: 2.6em; }
.dv-result { min-height: 3.6em; margin: 6px 0 8px; }
/* v1.11.1 確認中的按鈕：說明換到第二行 */
#pop .pop-actions .btn.asking small { display: block; font-size: 11px; font-weight: 400; opacity: .85; }
/* v1.12.0 地圖星級 */
.zst, .map-row .mr small.zst { color: var(--gold-light, #f2cf5b); font-size: 11px; margin-right: 4px; white-space: nowrap; }

/* v1.12.1 世界王場地：人物縮小、王放大、上方血條、即時輸出排名（一般怪暫時不顯示，狩獵在背後照常進行） */
#stage.wb-mode #mobs, #stage.wb-mode .gauge { display: none; }
#stage.wb-mode.no-art { background: radial-gradient(ellipse 75% 60% at 68% 45%, #3a1d22 0%, #1a1016 50%, #07070b 100%); }
#stage.wb-mode .actor.hero { scale: .72; transform-origin: 50% 100%; }
.wb-boss { position: absolute; right: 3%; bottom: 7%; height: 80%; aspect-ratio: 1; z-index: 2; pointer-events: none; animation: wbIdle 3.4s ease-in-out infinite; }
.wb-boss .wb-sil { position: relative; width: 100%; height: 100%; display: grid; place-items: center; font: 600 clamp(42px, 9vw, 96px) var(--serif); color: #f0c9b8;
  background: radial-gradient(circle at 50% 45%, rgba(178,58,40,.35), rgba(8,10,14,0) 65%); }
.wb-boss .wb-sil img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 8px 14px rgba(0,0,0,.7)); }
.wb-boss.hit .wb-sil { animation: wbHit .25s ease-out; }
@keyframes wbIdle { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-1.5%) scale(1.015); } 82% { transform: translateX(-3%) scale(1.03); } }
@keyframes wbHit { 0% { filter: brightness(1.8); transform: translateX(2%); } 100% { filter: none; transform: none; } }
.wb-hud { position: absolute; top: 54px; right: 3%; width: min(48%, 380px); z-index: 4; text-align: center; pointer-events: none; }
.wb-hud .wb-name { font-size: 13px; color: #e8dccb; text-shadow: 0 1px 3px #000; display: flex; gap: 6px; justify-content: center; align-items: baseline; flex-wrap: wrap; }
.wb-hud .wb-name i { font-style: normal; font-size: 11px; color: #ffd27a; border: 1px solid rgba(255,210,122,.5); border-radius: 3px; padding: 0 4px; }
.wb-hud .wb-name b { color: #ffcf8a; font-family: var(--serif); font-size: 16px; }
.wb-hud .wb-name small { color: #c9c0b0; }
.wb-hp { position: relative; height: 16px; margin-top: 3px; border-radius: 3px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.18); overflow: hidden; }
.wb-hp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #8f1d1d, #d24632); transition: width .6s; }
.wb-hp span { position: relative; display: block; font-size: 11px; line-height: 16px; color: #fff; text-shadow: 0 1px 2px #000; }
.wb-me { margin-top: 3px; font-size: 12px; color: #e8dccb; text-shadow: 0 1px 3px #000; }
.wb-me b { color: #ffd27a; }
.wb-rank { position: absolute; left: 12px; top: 54px; width: min(30%, 230px); z-index: 4; background: rgba(6,9,14,.62); border: 1px solid rgba(255,255,255,.12); border-radius: 4px; padding: 5px 8px; pointer-events: none; }
.wb-rank h4 { margin: 0 0 3px; font-size: 11px; color: #ffd27a; font-weight: 500; }
.wb-rank ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.wb-rank li { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) auto; gap: 4px; font-size: 11.5px; color: #ddd4c4; }
.wb-rank li b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-rank li.me b, .wb-rank li.me span { color: #ffd27a; }
.wb-rank li.dead { opacity: .5; }
.floater.wb-dmg { color: #ffb15a; font-size: clamp(14px, 2.2vw, 22px); font-weight: 700; text-shadow: 0 2px 4px #000; }
@media (max-width: 1099px) {
  .wb-hud { top: auto; bottom: calc(var(--bar-h, 48px) + 4px); right: 2%; width: 56%; }
  .wb-rank { left: 6px; top: 84px; width: 42%; padding: 3px 6px; }
  .wb-rank li { font-size: 10.5px; }
  .wb-boss { height: 70%; bottom: calc(var(--bar-h, 48px) + 50px); right: 6%; }
}

/* ---- v1.12.3 技能冷卻列：暗色遮罩往下退＝冷卻中；亮框＝可以放；剛施放閃一下 */
.skillbar { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; pointer-events: none; }
.skillbar.hidden, .skillbar:empty { display: none; }
.skillbar .sb { position: relative; width: 34px; height: 34px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(214,178,94,.45); background: rgba(8,13,20,.82); box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.skillbar .sb-ic { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 15px; color: var(--gold-light); }
.skillbar .sb-ic img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.skillbar .sb-ic:has(> img.art) { color: transparent; }
.skillbar .sb-cd { position: absolute; left: 0; right: 0; top: 0; height: 0; background: rgba(4,7,12,.72); }
.skillbar .sb-t { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.skillbar .sb.ready { border-color: var(--gold-light); box-shadow: 0 0 0 1px rgba(242,207,91,.35), 0 0 8px rgba(242,207,91,.45); }
.skillbar .sb.sb-cast { animation: sb-cast .45s ease-out; }
@keyframes sb-drain { from { height: 100%; } to { height: 0; } }
@keyframes sb-cast { 0% { transform: scale(1.18); box-shadow: 0 0 14px rgba(255,236,170,.9); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .skillbar .sb.sb-cast { animation: none; } }
@media (max-width: 1099px) {
  .stage-hud .skillbar { gap: 3px; margin-top: 1px; width: max-content; max-width: calc(100vw - 150px); }
  .stage-hud .skillbar .sb { width: 24px; height: 24px; border-radius: 5px; }
  .stage-hud .skillbar .sb-ic { font-size: 12px; }
  .stage-hud .skillbar .sb-t { font-size: 11px; }
}

/* =====================================================================
   v1.12.6 手機技能冷卻列擋到人物（使用者回報）：
   從左上（HP／MP、持續效果下面）移到戰場下緣、人物腳下的空地（人物站在 bar-h + art-h × 0.1，下面這條是空的），排成一排
   ===================================================================== */
@media (max-width: 1099px) {
  #stage > .skillbar { position: absolute; z-index: 4; left: 8px; right: calc(var(--hunt-w, 120px) + 14px); bottom: calc(var(--bar-h) + 3px); margin: 0; gap: 3px; flex-wrap: nowrap; overflow: hidden; }
  #stage > .skillbar .sb { flex: none; width: clamp(18px, var(--art-h) * .1 - 2px, 24px); height: clamp(18px, var(--art-h) * .1 - 2px, 24px); border-radius: 5px; }
  #stage.wb-mode > .skillbar { display: none; }   /* 世界王場地：下緣是王的血條與輸出 */
  body.sheet-min #stage > .skillbar { display: none; }   /* 戰場縮小時空間不夠，不擋人物 */
  #stage > .skillbar .sb-ic { font-size: 11px; }
  #stage > .skillbar .sb-t { font-size: 11px; }
}

/* v1.12.8 物品視窗：上鎖開關（不佔動作按鈕）；裝備欄換裝清單；換裝提醒「這次不提醒」 */
.lock-sw { float: right; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: -4px 0 4px 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--sunk); color: var(--muted); font-size: 13px; cursor: pointer; }
.lock-sw i { position: relative; width: 30px; height: 18px; border-radius: 9px; background: var(--line); transition: background .15s; }
.lock-sw i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text, #eee); transition: transform .15s; }
.lock-sw.on { color: var(--gold-light, #f0d48a); border-color: var(--gold-dim, #8a6d2c); }
.lock-sw.on i { background: var(--gold, #c9a243); }
.lock-sw.on i::after { transform: translateX(12px); }
.sp-list { display: grid; gap: 6px; }
.sp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); }
.sp-main { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; padding: 2px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.sp-main .cell-ic { flex: none; width: 40px; height: 40px; }
.sp-t { display: grid; min-width: 0; }
.sp-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-t small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.sp-d { display: grid; justify-items: end; font-size: 14px; }
.sp-d small { font-size: 10px; color: var(--faint, #888); }
.sp-row .btn.small { min-height: 40px; }
.goal-x { min-width: 32px; padding: 0 8px; margin-left: 4px; background: transparent; }

/* v1.13.3 裝備欄暗黑式排列（像人物紙娃娃）：左手武器、右手副手，中間由上到下 頭盔 盔甲 腰帶 長靴 */
.eq-grid.eq-doll { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas:
  "weapon helm amulet"
  "weapon armor shield"
  "gloves armor cloak"
  "ring1 belt ring2"
  ". boots ."; }
.eq-grid.eq-doll .eq-card[style*="grid-area:weapon"], .eq-grid.eq-doll .eq-card[style*="grid-area:armor"] { align-content: center; }
.eq-grid.eq-relic .eq-card { grid-area: auto !important; }

/* v1.13.4 手機分頁圖示、交易所搜尋、武器單手／雙手切換 */
@media (max-width: 1099px) { .tabs .tab-ic { display: block; width: 20px; height: 20px; margin: 0 auto 1px; } .tabs button { padding-top: 6px; } }
.tab-ic-none { visibility: hidden; }
.mk-search { display: flex; gap: 6px; margin: 0 0 8px; }
.mk-search input { flex: 1; min-width: 0; min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunk); color: var(--text); font: inherit; }
.sp-hand { margin: 4px 0 2px; }

/* v1.13.5 美術防盜：不能長按存圖、拖曳、選取圖片 */
img, .sil, .sprite, .stage { -webkit-touch-callout: none; -webkit-user-drag: none; user-drag: none; -webkit-user-select: none; user-select: none; }

/* v1.13.6 神殿：分塊、每一列標題＋說明；供奉一鍵補滿 */
.tp-card { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); }
.tp-h { margin: 0 0 6px; font-size: 15px; color: var(--gold-light); } .tp-h small { margin-left: 6px; color: var(--muted); font-weight: 400; font-size: 12px; }
.tp-row { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 14px; line-height: 1.5; }
.tp-row:first-of-type { border-top: 0; } .tp-row > b { color: var(--text); font-weight: 600; } .tp-row small { color: var(--muted); }
.tp-style { margin: 2px 0 6px; font-weight: 600; color: var(--gold-light); }
/* v1.13.19 使用者：守護神介面還是超出（電腦版右欄窄，四欄排不下）→ 一律兩排：名稱＋補滿／數量＋供奉這些 */
.tp-offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; margin: 8px 0; padding-top: 8px; border-top: 1px dashed var(--line); }
.tp-offer .btn { white-space: nowrap; }
.tp-offer > span { min-width: 0; }
.tp-offer > span { display: grid; font-size: 14px; } .tp-offer > span small { color: var(--muted); font-size: 11px; }
.tp-offer input { min-width: 0; min-height: 40px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
@media (max-width: 420px) { .tp-row { grid-template-columns: 1fr; gap: 2px; } }
.tp-card, .god-detail, .god-detail .patron > div { min-width: 0; overflow-wrap: anywhere; }
.god { min-width: 0; overflow: hidden; } .god b, .god small { overflow-wrap: anywhere; }
.god .fit { white-space: nowrap; }
/* v1.13.6 使用者：名字要整列顯示完整，不要「…」 */
.sp-t b { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }
.sp-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.eq-nm { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; -webkit-line-clamp: unset !important; display: block !important; }

.sp-nm { grid-column: 1 / -1; display: block; width: 100%; padding: 2px 4px 0; border: 0; background: none; text-align: left; font: inherit; font-weight: 700; font-size: 15px; line-height: 1.35; white-space: normal; cursor: pointer; }

/* v1.13.7 電腦版分頁圖示大一點 */
@media (min-width: 1100px) { .tab-ic { width: 30px; height: 30px; } }

/* v1.13.9 傷害數字半透明、不完全蓋住圖（v1.13.11 拿掉技能卡） */
.floater { opacity: .82; text-shadow: 0 1px 2px rgba(0,0,0,.9); }
.floater.crit { opacity: .9; }
.k-dmg { font-size: 12px; color: var(--muted); } .k-dmg b { color: var(--text); } .k-dmg .k-crit { color: #ffd36b; } .k-dmg .k-taken { color: #ff8f86; }
.log-detail { margin-left: 8px; font-size: 12px; padding: 2px 8px; min-height: 0; vertical-align: middle; } .log-detail[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-light); }
/* 技能冷卻列的圖示大一點 */
@media (min-width: 1100px) { .skillbar .sb { width: 34px; height: 34px; } }
@media (max-width: 1099px) { #stage > .skillbar .sb { width: clamp(22px, var(--art-h) * .11, 30px); height: clamp(22px, var(--art-h) * .11, 30px); } }

/* v1.13.11 能力 › 技能：技能圖放大（使用者：目前太小） */
.skill-rows > div { grid-template-columns: 64px minmax(0, 1fr) auto; }
.skill-rows .icon { width: 64px; height: 64px; border-radius: 8px; font-size: 26px; }
.skill-rows .icon img.art { border-radius: 7px; }
@media (min-width: 1100px) { .skill-rows > div { grid-template-columns: 76px minmax(0, 1fr) auto; } .skill-rows .icon { width: 76px; height: 76px; } }

/* v1.13.11 鐵匠：卷軸卡片（強化兩張：一般／祝福；神賜一張），① 裝備 → ② 卷軸 → 主按鈕 */
.enchant-box .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.forge-st { margin: 8px 0 4px; } .forge-st .ok { color: var(--ok); } .forge-st .bad { color: var(--danger); }
.scr-pick { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 700px) { .scr-pick:not(.one) { grid-template-columns: 1fr 1fr; } }
.scr-card { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 64px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
div.scr-card { cursor: default; }
.scr-card.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; background: rgba(var(--acc-rgb), .10); }
.scr-card.blessed b { color: var(--gold-light); }
.scr-card .cell-ic { width: 44px; height: 44px; }
.scr-t { min-width: 0; display: grid; gap: 2px; } .scr-t b { font-size: 14px; } .scr-t small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.scr-t .scr-odds { color: var(--text); }
.scr-q { font-size: 12px; color: var(--muted); white-space: nowrap; }
#pop .enchant-box .pop-actions .btn small, #pop .pop-actions .btn.uncurse small { display: block; font-size: 11.5px; font-weight: 400; opacity: .85; }
#pop .pop-actions .btn:has(small) { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.3; min-height: 44px; }

/* v1.13.11 世界王結束：停在場地顯示自己的戰利品與排行，點任何地方回到地圖 */
#stage.wb-done .wb-boss, #stage.wb-done .wb-hud, #stage.wb-done .wb-rank { display: none; }
.wb-result { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 10px; background: rgba(5, 6, 10, .55); cursor: pointer; }
.wbr-card { width: min(92%, 460px); max-height: 100%; overflow: auto; padding: 12px 14px; border: 1px solid rgba(255, 207, 138, .55); border-radius: 12px; background: rgba(14, 12, 16, .92); box-shadow: 0 0 24px rgba(210, 70, 50, .35); color: var(--text); }
.wbr-card h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 17px; color: #ffcf8a; text-align: center; }
.wbr-card h4 { margin: 10px 0 4px; font-size: 13px; color: var(--gold-light); } .wbr-card h4 small { color: var(--muted); font-weight: 400; }
.wbr-me { margin: 0; text-align: center; font-size: 13px; }
.wbr-loot { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wbr-loot li { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.wbr-loot .cell-ic { position: relative; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--sunk); font-size: 13px; overflow: hidden; }
.wbr-loot .cell-ic img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.wbr-draw { margin: 8px 0 0; font-size: 12.5px; color: #ffd27a; }
.wbr-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 12.5px; }
.wbr-top li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px; padding: 2px 4px; border-radius: 4px; }
.wbr-top li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.wbr-top li.me { background: rgba(var(--acc-rgb), .18); color: var(--gold-light); }
.wbr-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 10px; }
.wbr-acts .hint { margin: 0; }
#pop .forge-acts { display: grid; grid-template-columns: 1fr; }
.dv-result:empty, .enchant-result:empty { min-height: 0; margin: 4px 0 0; }
/* 戰利品排成小標籤（手機戰場矮，一眼看完） */
.wbr-loot { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.wbr-loot li { gap: 5px; }
.wbr-loot .cell-ic { width: 24px; height: 24px; font-size: 11px; border-radius: 5px; }
@media (max-width: 1099px) { .wbr-card { padding: 8px 10px; } .wbr-card h3 { font-size: 15px; } .wbr-card h4 { margin: 6px 0 3px; } .wbr-acts { margin-top: 6px; } }
/* 技能列：右邊的狀態不要把說明擠成一條 */
.skill-rows > div > div:last-child { max-width: 32vw; }
@media (min-width: 1100px) { .skill-rows > div > div:last-child { max-width: 220px; } }
/* v1.13.12 眾神古卷：九神神器清單＋打開按鈕（同一塊，清單在上） */
.rp-pick { display: grid; gap: 6px; width: 100%; }
.rp-pick .scr-card .cell-ic { position: relative; display: grid; place-items: center; border-radius: 8px; overflow: hidden; }
.rp-pick > .btn { margin-top: 4px; width: 100%; }
.pop-actions .rp-pick > .btn.primary { order: 0; position: sticky; bottom: 0; box-shadow: 0 -6px 12px rgba(0,0,0,.45); }

/* v1.13.14 物品視窗按鈕固定四排：① 裝備／使用（主按鈕一整列）② 加屬性 ③ 上架、倉庫 ④ 出售、拆解；每排等寬、字不換行 */
#pop .act-main { display: grid; gap: 8px; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); }
#pop .act-main.n2 { --n: 2; } #pop .act-main.n3 { --n: 3; }
#pop .act-main > p, #pop .act-main > div, #pop .act-main > .btn.primary { grid-column: 1 / -1; }
#pop .act-main .btn { min-height: 48px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.3; white-space: nowrap; }
#pop .act-main .btn small { display: block; font-size: 11.5px; font-weight: 400; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.act-row { display: grid; gap: 8px; margin-top: 8px; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); }
.act-row.n2 { --n: 2; } .act-row.n3 { --n: 3; } .act-row.n4 { --n: 2; }
.act-row .btn.act { white-space: nowrap; overflow: hidden; }
.act-row .btn.act small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cmp-worn { margin: 0 0 6px; font-size: 13px; color: var(--muted); } .cmp-worn .cmp-nm { font-size: 13px; }
/* v1.13.14 本場狩獵：重置統計 */
.g-head { align-items: center; gap: 8px; } .g-head small { margin-left: auto; }
.g-reset { font: 12px var(--sans); color: var(--gold-light); background: transparent; border: 1px solid rgba(var(--acc-rgb), .45); border-radius: 6px; padding: 3px 10px; min-height: 28px; cursor: pointer; }
.g-reset:hover { background: rgba(var(--acc-rgb), .14); }
.gains-tab .box-h { display: flex; align-items: center; gap: 8px; } .gains-tab .box-h small { margin-left: auto; }
.gains-tab .g-reset { min-height: 40px; padding: 4px 14px; }
/* v1.13.16 戰力分析：每秒傷害、耐打 */
.cmp-why { margin: 2px 0 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); font-size: 13px; }
.cw-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; gap: 8px; align-items: baseline; padding: 3px 0; }
.cw-row small { display: block; font-size: 11px; color: var(--muted); }
.cw-row i { font-style: normal; text-align: right; }
.cmp-why .hint { margin: 4px 0 0; font-size: 11.5px; }
.cw-row { grid-template-columns: minmax(0, 1fr) auto 64px; } .cw-row > small { grid-column: 1 / -1; margin-top: -2px; }

/* v1.14.3 寶物：離線報告大卡片、一般收穫收成一行、背包最近的寶物 */
.rp-treasure { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .35), 0 0 18px rgba(var(--acc-rgb), .18); }
.rp-treasure .box-h { color: var(--gold); }
.rp-loot.big > div { padding: 8px 10px; background: linear-gradient(90deg, rgba(var(--acc-rgb), .14), transparent); border-radius: 10px; }
.rp-loot.big .icon { box-shadow: 0 0 10px rgba(var(--acc-rgb), .5); }
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--tile); font-size: 13px; }
.rp-chip small { color: var(--muted); font-size: 11px; }
.bag-treasure .box-h { display: flex; justify-content: space-between; align-items: center; color: var(--gold); }
.rp-chip.tr { border-color: var(--gold-dim); }

/* v1.14.4 技能說明：戰鬥畫面的技能、增益可以點 */
#buffs .bf[data-skinfo], #skillbar .sb { pointer-events: auto; cursor: pointer; }
.sk-pop { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.sk-pop .icon.big { width: 56px; height: 56px; flex: none; }
.sk-pop p { margin: 0; line-height: 1.6; }

/* v1.14.5 出戰技能名額 */
.sk-slots { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 10px; padding: 8px 10px; border: 1px solid var(--gold-dim); border-radius: 10px; background: rgba(var(--acc-rgb), .08); }
.sk-slots b { color: var(--gold); }

/* v1.14.6 神血兌換 */
.tw-ex .list-rows > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.tw-ex .ex-btns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* v1.14.7 NPC 立繪亮點：電腦版左邊大立繪、手機版上方橫幅 */
#pop.npc-pop {   /* v1.15.26 原本叫 .npc，吃到村莊 NPC 按鈕的 .npc b／small 樣式（粗體變金色大字、括號跑掉） */ width: min(980px, calc(100vw - 24px)); }
.npc-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.npc-hero { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; }
.npc-art { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; border: 1px solid var(--gold-dim); background: radial-gradient(ellipse at 50% 30%, rgba(var(--acc-rgb), .18), var(--sunk)); display: grid; place-items: center; font-size: 64px; color: var(--gold-dim); box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 0 40px rgba(0, 0, 0, .5); }
.npc-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.npc-cap b { display: block; font-family: var(--serif, inherit); font-size: 20px; color: var(--gold); letter-spacing: .08em; }
.npc-cap small { color: var(--muted); }
.npc-cap p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.npc-main { min-width: 0; }
@media (max-width: 760px) {
  .npc-wrap { grid-template-columns: 1fr; gap: 10px; }
  .npc-hero { position: relative; display: block; }
  .npc-art { aspect-ratio: auto; height: 170px; font-size: 48px; }
  .npc-art img { object-position: 50% 20%; }
  .npc-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; border-radius: 0 0 14px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
  .npc-cap p { display: none; }
}

/* v1.14.11 Android 點按會整塊閃藍（Chrome 對有點擊事件的元素畫高亮）→ 全部關掉 */
* { -webkit-tap-highlight-color: transparent; }
.npc-mini { display: inline-block; width: 30px; height: 30px; margin-right: 8px; vertical-align: -6px; border-radius: 50%; overflow: hidden; border: 1px solid var(--gold-dim); position: relative; background: var(--sunk); }
.npc-mini img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.tw-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 2px 0 8px; font-size: 13px; color: var(--muted); }
.tw-bar b { color: var(--gold); }
.tw-rules summary { cursor: pointer; list-style: none; }
.tw-rules summary::after { content: '＋'; float: right; color: var(--muted); }
.tw-rules[open] summary::after { content: '－'; }

/* v1.14.12 鐵匠：點圖示選裝備、按鈕文字不超出 */
.gpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; max-height: 220px; overflow-y: auto; padding: 2px; }
.gpick .cell[aria-pressed="true"] { outline: 2px solid var(--gold-light); outline-offset: 1px; box-shadow: 0 0 10px rgba(var(--acc-rgb), .5); }
.gp-h { margin: 8px 0 4px; font-size: 12px; color: var(--muted); }
#pop .act-grid .btn, #pop .pop-actions .btn { min-width: 0; white-space: normal; }
#pop .btn small { display: block; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.seg-tabs.small button { font-size: 13px; padding-inline: 6px; }

/* v1.14.13 村莊：四欄 NPC 立繪卡 */
.vil-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.vil-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--tile); color: var(--text); font: inherit; cursor: pointer; }
.vil-card:hover { border-color: var(--gold-dim); }
.vil-card:disabled { opacity: .45; cursor: default; }
.vil-art { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 9px; overflow: hidden; display: grid; place-items: center; font-size: 28px; color: var(--gold-dim); background: radial-gradient(ellipse at 50% 30%, rgba(var(--acc-rgb), .16), var(--sunk)); }
.vil-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.vil-card b { font-size: 13px; line-height: 1.25; text-align: center; color: var(--gold-light); }
.vil-card small { font-size: 11px; color: var(--muted); }
.vil-badge { position: absolute; top: 4px; right: 4px; padding: 1px 6px; border-radius: 999px; background: var(--danger, #c0392b); color: #fff; font-style: normal; font-size: 11px; }
@media (max-width: 360px) { .vil-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* v1.14.13 統計日誌在手機上加高 */
@media (max-width: 760px) { .log-box, #kill-log, .feed-log { min-height: 46dvh; } }

/* v1.14.13 能力頁精簡：防禦高度的說明文字收掉 */
.def-box .hint, .def-box .def-help { display: none; }

/* v1.14.17g 金色按鈕裡的小字（今日剩幾次、花費…）原本是灰色，在金底上看不到 → 一律深棕色 */
.btn.primary small, .btn.primary .muted, #pop .btn.primary small, #pop .pop-actions .btn.primary small { color: rgba(40, 28, 8, .8) !important; opacity: 1; }
.btn.primary:disabled small { color: rgba(40, 28, 8, .65) !important; }

/* v1.14.17r 背景和人物分層（使用者：背景跟人物顏色太接近，但背景很美，不想整片變淡）
   ① 背景只在主角、怪物站的地方壓暗一圈，上方和中間的景不動；整體只暗一點點
   ② 主角：深色細描邊＋職業色輪廓光（--rim 由 app.js 依職業設定）；加在兩層動作圖的外層，交叉淡化時不會亮兩次
   想調濃淡改這四個數字：--bg-dim 整體、--pool-hero 主角身後、--pool-mob 怪物身後、--rim-a 輪廓光（0＝沒有） */
.stage { --bg-dim: .12; --pool-hero: .42; --pool-mob: .3; --rim-a: .42; }
.stage:not(.no-art)::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 28% 38% at 19% 72%, rgba(4,7,11,var(--pool-hero)), rgba(4,7,11,0) 75%),
    radial-gradient(ellipse 36% 40% at 74% 68%, rgba(4,7,11,var(--pool-mob)), rgba(4,7,11,0) 75%),
    rgba(4,7,11,var(--bg-dim)); }
.actor.hero .sil .sprite { filter: none; }
.actor.hero .sil.has-sprite .spr-scale { filter: drop-shadow(0 0 1px rgba(0,0,0,.85)) drop-shadow(0 0 1.5px rgba(var(--rim, 255,236,200), .65)) drop-shadow(0 0 7px rgba(var(--rim, 255,236,200), var(--rim-a))); }

/* v1.14.17x 介面大圖：章節標題列、章節開場、村莊全景、抽抽樂神品演出（沒圖時只剩文字，不借圖） */
.map-list .ch-head { position: relative; display: flex; align-items: center; min-height: 42px; margin: 10px 0 2px; padding: 0 12px; overflow: hidden; border: 1px solid rgba(213,174,104,.28); border-radius: 8px; background: linear-gradient(90deg, rgba(213,174,104,.14), rgba(213,174,104,0) 70%); }
.map-list .ch-head:first-child { margin-top: 0; }
.ch-head img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 50%; filter: brightness(.6) saturate(.9); }
.ch-head span { position: relative; display: flex; align-items: baseline; gap: 8px; text-shadow: 0 1px 4px #000, 0 0 10px rgba(0,0,0,.8); }
.ch-head b { font-family: var(--serif); font-size: 14px; letter-spacing: .08em; color: var(--gold-light, #f0d9a6); }
.ch-head small { font-size: 11px; color: #ddd4c2; }
.ch-intro { position: absolute; inset: 0; z-index: 15; display: grid; place-items: center; overflow: hidden; background: rgba(4,6,10,.62); cursor: pointer; animation: chIntro 4.3s ease forwards; }
.ch-intro img.art { position: absolute; left: 0; top: 50%; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; transform: translateY(-50%); opacity: .92;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); }
.ch-intro .ch-t { position: relative; max-width: 86%; text-align: center; text-shadow: 0 2px 10px #000, 0 0 24px rgba(0,0,0,.9); }
.ch-intro small { display: block; font-size: clamp(11px, 1.6vw, 14px); letter-spacing: .4em; color: #e8dcc0; }
.ch-intro b { display: block; margin: 4px 0 6px; font-family: var(--serif); font-size: clamp(22px, 4.4vw, 42px); letter-spacing: .14em; color: #f3d48f; animation: chIntroT 4.3s ease forwards; }
.ch-intro p { margin: 0 auto; max-width: 34em; font-size: clamp(11px, 1.5vw, 14px); line-height: 1.6; color: #e9e2d2; }
@keyframes chIntro { 0% { opacity: 0; } 10% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; } }
@keyframes chIntroT { 0% { letter-spacing: .5em; opacity: 0; } 18% { letter-spacing: .14em; opacity: 1; } 100% { letter-spacing: .18em; } }
.wb-result { background-position: center; background-size: cover; background-repeat: no-repeat; }
.vil-pano { position: relative; margin: 0 0 10px; aspect-ratio: 3 / 1; max-height: 240px; overflow: hidden; border-radius: 8px; }
.vil-pano img.art { width: 100%; height: 100%; object-fit: cover; display: block; }
.vil-pano::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(10,14,20,.85)); pointer-events: none; }
dialog.lt-reveal { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; color: #fff; cursor: pointer;
  background: radial-gradient(ellipse 70% 55% at 50% 38%, color-mix(in srgb, var(--tc) 30%, transparent), rgba(4,6,10,.95) 72%); }
dialog.lt-reveal[open] { display: grid; place-items: end center; animation: ltrIn .45s ease; }
dialog.lt-reveal::backdrop { background: rgba(0,0,0,.75); }
dialog.lt-reveal img.art { position: absolute; left: 50%; top: 0; height: 100%; width: auto; max-width: 100vw; object-fit: cover; transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 96%); mask-image: linear-gradient(180deg, #000 55%, transparent 96%); }
.ltr-t { position: relative; z-index: 1; width: min(92vw, 520px); padding: 0 16px calc(40px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.ltr-t b { display: block; font-family: var(--serif); font-size: clamp(36px, 9vw, 68px); letter-spacing: .3em; color: var(--tc); text-shadow: 0 0 22px var(--tc), 0 2px 8px #000; animation: ltrGlow 1.4s ease-in-out infinite alternate; }
.ltr-t ul { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; gap: 4px; font-size: 16px; text-shadow: 0 1px 5px #000; }
.ltr-t small { color: #cfc8ba; font-size: 12px; }
@keyframes ltrIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes ltrGlow { from { text-shadow: 0 0 12px var(--tc), 0 2px 8px #000; } to { text-shadow: 0 0 34px var(--tc), 0 2px 8px #000; } }
@media (prefers-reduced-motion: reduce) { .ch-intro, .ch-intro b, dialog.lt-reveal[open], .ltr-t b { animation: none; } }

/* v1.14.17y 天梯傳送符：左上角羅馬數字（第幾區）＋起始樓層 */
.cell .c-tw { position: absolute; left: 4px; top: 2px; display: flex; flex-direction: column; align-items: flex-start; line-height: 1; pointer-events: none; }
.cell .c-tw b { font-family: var(--serif, serif); font-size: 17px; font-weight: 700; letter-spacing: -.02em;
  background: linear-gradient(180deg, #fff3cf 0%, #f0c96a 48%, #a8742a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.9)) drop-shadow(0 0 3px rgba(0,0,0,.7)); }
.cell .c-tw small { margin-top: 1px; font-size: 9px; letter-spacing: .04em; color: #e8d6a8; text-shadow: 0 1px 1px #000, 0 0 3px #000; }

/* v1.14.17z4 裝備視覺整理（使用者：各種顏色閃光很怪，要清楚明瞭）
   ① 不再依屬性亂閃：舊的光暈、掃光、呼吸外框全部關掉
   ② 只有神兵強化到「大覺醒」以上才有外框，一階一個樣子（靜態）
   ③ 「+N」只分四種：安定值內白、超過安定值金、強化里程（大覺醒以上）有底色的小牌子、神器覺醒橘 */
/* v1.14.17z5 使用者：拿掉發光很醜 → 發光恢復（三詞裝備照屬性色）；神兵強化里程用同一套光，顏色跟著階段，越高階外框越粗 */
.glow-awaken { --glow: 240, 162, 74; } .glow-chosen { --glow: 255, 214, 90; } .glow-might { --glow: 255, 104, 72; } .glow-legend { --glow: 255, 236, 170; }
.cell.glow-chosen, .eq-card.glow-chosen { box-shadow: inset 0 0 0 1px rgba(var(--glow), .8), inset 0 0 14px rgba(var(--glow), .2); }
.cell.glow-might, .eq-card.glow-might, .cell.glow-legend, .eq-card.glow-legend { box-shadow: inset 0 0 0 2px rgba(var(--glow), .85), inset 0 0 16px rgba(var(--glow), .25), 0 0 10px rgba(var(--glow), .35); }
.c-en, .icon .en { font-weight: 800; letter-spacing: -.02em; text-shadow: 0 1px 0 #000, 0 0 3px #000, 0 0 3px #000; }
.c-en.en-safe, .icon .en.en-safe { color: #f3f1ea; }
.c-en.en-over, .icon .en.en-over { color: #ffd451; }
.c-en.en-relic, .icon .en.en-relic { color: #ff9e6b; }
.c-en.en-ms, .icon .en.en-ms { padding: 0 4px; border-radius: 4px; line-height: 15px; color: #1a0f05; text-shadow: none; box-shadow: 0 1px 2px rgba(0,0,0,.7); }
.en-ms.en-awaken { background: #f0a24a; } .en-ms.en-chosen { background: #f2cf5b; } .en-ms.en-might { background: #e8553a; color: #fff !important; } .en-ms.en-legend { background: linear-gradient(90deg, #fff0b8, #f2b33d); }
.ic-title .name-pre { margin-bottom: 2px; font-size: 13px; letter-spacing: .04em; color: #cfe0f5; }
.ic-title .name-pre.blessed { color: #ffe08a; } .ic-title .name-pre.cursed { color: #ff8f8f; }
.ms-tag { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; font-style: normal; font-size: 11px; font-weight: 700; line-height: 16px; vertical-align: 2px; color: #1a0f05; background: #9aa3ad; }
.ms-tag.ms-glimmer { background: #c9ccd2; } .ms-tag.ms-awaken { background: #f0a24a; } .ms-tag.ms-chosen { background: #f2cf5b; } .ms-tag.ms-might { background: #e8553a; color: #fff; } .ms-tag.ms-legend { background: linear-gradient(90deg, #fff0b8, #f2b33d); }
/* v1.14.17z8 強化里程：梯子（一階一格，達到亮起、下一階外框閃、未達淡掉） */
.ic-sec.sec-ms { position: relative; margin-top: 14px; padding: 10px 12px 12px; border: 1px solid rgba(201,138,60,.32); border-radius: 10px;
  background: linear-gradient(180deg, rgba(201,138,60,.10), rgba(201,138,60,.02) 55%, rgba(0,0,0,.12)); box-shadow: inset 0 1px 0 rgba(255,230,180,.08), inset 0 0 0 1px rgba(0,0,0,.25); }
.ic-sec.sec-ms::before, .ic-sec.sec-ms::after { content: ''; position: absolute; top: -1px; width: 10px; height: 10px; border-top: 1px solid #c98a3c; }
.ic-sec.sec-ms::before { left: -1px; border-left: 1px solid #c98a3c; border-top-left-radius: 10px; } .ic-sec.sec-ms::after { right: -1px; border-right: 1px solid #c98a3c; border-top-right-radius: 10px; }
.sec-ms h4 { display: flex; align-items: baseline; justify-content: space-between; color: #d9b87a; letter-spacing: .12em; }
.sec-ms h4 span { font-family: var(--serif); font-size: 12px; letter-spacing: .04em; color: #f3b268; }
.ms-ladder { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; position: relative; }
.ms-ladder::before { content: ''; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(180deg, rgba(201,138,60,.55), rgba(255,255,255,.08)); border-radius: 2px; }
.ms-step { position: relative; display: grid; grid-template-columns: 44px auto 1fr; align-items: center; gap: 8px; font-size: 13px; line-height: 1.35; }
.ms-step .ms-lv { position: relative; z-index: 1; display: block; text-align: center; font-size: 12.5px; font-weight: 700; line-height: 20px; border-radius: 10px; font-variant-numeric: tabular-nums;
  color: #8b8579; background: #1d1a15; border: 1px solid rgba(255,255,255,.12); }
.ms-step .ms-nm { font-style: normal; font-weight: 700; font-family: var(--serif); min-width: 3em; }
.ms-step .ms-fx { color: #b8b2a6; font-size: 12.5px; }
.ms-step.off .ms-lv { color: #5f5a52; border-color: rgba(255,255,255,.07); } .ms-step.off .ms-nm { color: #7d776c; } .ms-step.off .ms-fx { color: #6f6a61; }
.ms-step.on .ms-lv { color: #1a0f05; border-color: transparent; box-shadow: 0 0 8px var(--msc, rgba(240,162,74,.5)), inset 0 1px 0 rgba(255,255,255,.45); background: var(--msb, #f0a24a); }
.ms-step.on .ms-nm { color: var(--msn, #f0c27a); } .ms-step.on .ms-fx { color: #e8e2d4; }
.ms-step.next .ms-lv { color: #f2cf5b; border-color: #c98a3c; animation: msNext 1.8s ease-in-out infinite; }
.ms-step.next .ms-nm { color: #e8e2d4; } .ms-step.next .ms-fx { color: #cfc8b9; }
@keyframes msNext { 0%, 100% { box-shadow: 0 0 0 0 rgba(242,207,91,0); } 50% { box-shadow: 0 0 0 3px rgba(242,207,91,.18), 0 0 10px rgba(242,207,91,.35); } }
.ms-step.ms-glimmer { --msb: linear-gradient(180deg, #eef0f3, #b9bec6); --msc: rgba(220,225,232,.45); --msn: #dfe3e8; }
.ms-step.ms-awaken { --msb: linear-gradient(180deg, #ffc27a, #e08a2e); --msc: rgba(240,162,74,.55); --msn: #f3b268; }
.ms-step.ms-chosen { --msb: linear-gradient(180deg, #fff0a0, #e7b93a); --msc: rgba(242,207,91,.6); --msn: #f6d77a; }
.ms-step.ms-might { --msb: linear-gradient(180deg, #ff8a6a, #d23f25); --msc: rgba(232,85,58,.6); --msn: #ff8a6a; }
.ms-step.ms-legend { --msb: linear-gradient(90deg, #fff6d0, #f2b33d 60%, #fff0b8); --msc: rgba(255,226,140,.7); --msn: #ffe7a3; }
.ms-step.on.ms-might .ms-lv { color: #fff; }
@media (prefers-reduced-motion: reduce) { .ms-step.next .ms-lv { animation: none; box-shadow: 0 0 6px rgba(242,207,91,.35); } }
.div.dv-off { opacity: .55; }
.dv-res { font-style: normal; font-size: 11px; color: #f2cf5b; }
.dv-god b, b.dv-god { color: #f2cf5b; }

/* v1.14.17z10 物品卡、神賜頁整理：神賜詞條「名稱一行、效果一行」左對齊；上鎖開關自己一排靠右，不壓到標題 */
.item-card li.div { display: block; }
.item-card li.div .dv-name { white-space: normal; }
.item-card li.div small { display: block; text-align: left; margin-top: 2px; }
.dv-slot { grid-template-columns: auto 1fr; grid-template-areas: "fam name" "fx fx"; gap: 2px 10px; align-items: baseline; }
.dv-slot .dv-fam { grid-area: fam; white-space: nowrap; } .dv-slot > b, .dv-slot > .muted:not(.dv-fx) { grid-area: name; }
.dv-slot .dv-fx { grid-area: fx; text-align: left; }
.lock-sw { float: none; display: flex; width: fit-content; min-height: 32px; margin: 0 0 10px auto; }
.attr-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* v1.15.0 桌面 App 裡的資料站視窗：滿版、iframe 吃滿，上方一條細標題列＋關閉；瀏海、底部手勢列留安全距離 */
#codex-dlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; inset: 0; border: 0; border-radius: 0; box-shadow: none; padding: 0; background: var(--bg); }
#codex-dlg[open] { display: flex; flex-direction: column; }
#codex-dlg::backdrop { background: rgba(3,6,10,.9); }
#codex-dlg .cxd-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px; border-bottom: 1px solid rgba(var(--acc-rgb), .28); background: var(--panel); }
#codex-dlg .cxd-head b { color: var(--gold-light); font-family: var(--serif); font-size: 16px; letter-spacing: .08em; }
#codex-dlg .cxd-head .dlg-x { width: 36px; height: 36px; font-size: 16px; }
#codex-dlg iframe { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: var(--bg); padding-bottom: env(safe-area-inset-bottom, 0px); }

/* ===== v1.15.1 交易所改版：分類捲軸、篩選、排序、指定交易；手機滿版 ===== */
.mk-cats { display: flex; gap: 6px; overflow-x: auto; margin: 0 -2px 8px; padding: 2px 2px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mk-cats::-webkit-scrollbar { display: none; }
.mk-chip { flex: none; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--sunk); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.mk-chip[aria-selected="true"] { border-color: var(--sel-bd); background: var(--sel-bg); color: var(--sel-tx); font-weight: 600; }
.mk-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.mk-fbtn { flex: none; min-height: 36px; }
.mk-fbtn.on { border-color: var(--gold-dim); color: var(--gold-light); }
.mk-fbtn b { display: inline-block; min-width: 1.5em; padding: 0 5px; border-radius: 9px; background: var(--gold); color: var(--btn-ink); font-size: 12px; line-height: 1.5; }
.mk-sort { flex: 1; min-width: 0; }
.mk-sort select, .mk-fl select { width: 100%; min-height: 36px; padding: 0 28px 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunk); color: var(--text); font: inherit; font-size: 14px; }
.mk-total { flex: none; color: var(--muted); font-size: 13px; white-space: nowrap; }
.mk-ref { flex: none; min-width: 36px; min-height: 36px; padding: 0; }
.mk-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; margin: 0 0 10px; padding: 10px; border: 1px solid rgba(var(--acc-rgb), .22); border-radius: 10px; background: linear-gradient(rgba(var(--acc-rgb), .05), transparent); }
.mk-filters .hint { grid-column: 1 / -1; margin: 0; }
.mk-fl { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mk-fl > span { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
@media (min-width: 1100px) { .mk-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mk-on { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.mk-tag { min-height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--gold-dim); background: rgba(var(--acc-rgb), .12); color: var(--gold-light); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.mk-tag.clr { border-color: var(--line); background: none; color: var(--muted); }
.mk-pre { font-size: 12px; color: var(--gold); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.mk-badge { padding: 0 7px; border-radius: 6px; border: 1px solid var(--line); font-size: 11.5px; line-height: 1.6; color: var(--muted); white-space: nowrap; }
.mk-badge.me { border-color: #5fb88f; color: #8fe0bb; background: rgba(95, 184, 143, .12); }
.mk-badge.st { border-color: var(--gold-dim); color: var(--gold-light); }
.mk-row.forme { border-color: rgba(95, 184, 143, .6); box-shadow: inset 3px 0 0 #5fb88f; }
.mk-forme .box-h small { color: #8fe0bb; }
.mk-f.mk-to small { grid-column: 2 / -1; font-size: 12px; line-height: 1.4; }
.mk-f.mk-to { grid-template-columns: 4em minmax(0, 1fr) !important; }

@media (max-width: 1099px) {
  /* 交易所滿版：戰場與血條先收起來（伺服器照樣在打），角色卡只留名字、金幣 */
  body.tab-market .arena { display: none; }
  body.tab-market .plate .bars, body.tab-market .plate .buffs { display: none; }
  body.tab-market .plate { row-gap: 0; padding-top: 6px; padding-bottom: 6px; }
  body.tab-market .plate .avatar { height: 46px; }
  body.tab-market .panel { padding: 10px 12px 18px; }
  .mk-row { padding: 8px 10px; border-radius: 10px; }
  .mk-ic { width: 54px; height: 54px; }
  .mk-t .name { font-size: 15.5px; }
  .mk-t small { font-size: 13px; }
}
/* v1.15.1 篩選改成一排膠囊（左右滑）：點了跳出手機原生選單；選了的亮金色 */
.mk-pills { display: flex; gap: 6px; overflow-x: auto; margin: 0 -2px 6px; padding: 2px 2px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mk-pills::-webkit-scrollbar { display: none; }
.mk-pill { position: relative; flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunk); color: var(--text); font-size: 13.5px; white-space: nowrap; cursor: pointer; }
.mk-pill i { font-style: normal; font-size: 10px; color: var(--muted); }
.mk-pill select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.mk-pill.on { border-color: var(--sel-bd); background: var(--sel-bg); color: var(--sel-tx); font-weight: 600; }
.mk-pill.on i { color: var(--sel-tx); }
.mk-pill.sort { color: var(--gold-light); border-color: var(--gold-dim); }
.mk-pill.clr { font: inherit; font-size: 13px; color: var(--muted); background: none; }
.mk-meta { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.mk-meta b { color: var(--text); }
.mk-meta .mk-ref { min-height: 28px; padding: 0 4px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.mk-cats { margin-bottom: 6px; }
.mk-chip { min-height: 32px; padding: 0 13px; font-size: 13.5px; }
/* v1.15.1 使用者（電腦版截圖）：右邊欄的篩選膠囊被切到 → 電腦版版面不動，分類與篩選膠囊改成換行排（兩排），全部看得到 */
@media (min-width: 1100px) {
  .mk-cats, .mk-pills { flex-wrap: wrap; overflow: visible; margin-left: 0; margin-right: 0; }
  .mk-cats { gap: 5px; } .mk-pills { gap: 5px; }
  .mk-chip { padding: 0 11px; } .mk-pill { padding: 0 8px 0 10px; }
}

/* ---- v1.15.2 鐵匠：強化按鈕固定在強化框的底部（在框裡捲動時一直看得到，不用滑上滑下）---- */
#pop .enchant-box .forge-acts { position: sticky; bottom: -12px; z-index: 2; margin: 8px -14px -14px; padding: 8px 14px 14px; background: var(--sunk); border-top: 1px solid var(--line); box-shadow: 0 -8px 12px -8px rgba(0,0,0,.6); }
/* ---- v1.15.2 物品卡：每件裝備的戰力（身上：這件貢獻；背包：身上那件 vs 這件）、逐項比較收合 ---- */
.ic-power { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; margin: 2px 0 8px; padding: 8px 12px; border: 1px solid rgba(var(--acc-rgb), .35); border-radius: 10px; background: linear-gradient(180deg, rgba(var(--acc-rgb), .12), rgba(var(--acc-rgb), .04)); }
.ic-power > small { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.ic-power .pw-l { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.ic-power .pw-v { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--gold-light); line-height: 1.1; }
.ic-power .pw-v.bad { color: var(--danger); } .ic-power .pw-v.ok { color: var(--ok, #6fcf7f); }
.ic-power .pw-cmp { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; font-size: 13px; }
.ic-power .pw-cmp > span { display: grid; gap: 1px; } .ic-power .pw-cmp > span:last-child { text-align: right; }
.ic-power .pw-cmp small { font-size: 11px; color: var(--muted); } .ic-power .pw-cmp b { font-family: var(--serif); font-size: 18px; }
.ic-power .pw-cmp i { font-style: normal; color: var(--muted); }
.cmp-reason { margin: 0 0 6px; font-size: 12.5px; line-height: 1.5; color: #d6cfbf; }
.cmp-reason b { color: var(--r-unique); font-weight: 500; }
.sec-cmp details { margin-top: 6px; } .sec-cmp details > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); padding: 4px 0; list-style: none; }
.sec-cmp details > summary::before { content: '▸ '; } .sec-cmp details[open] > summary::before { content: '▾ '; }
.sec-cmp details > summary::-webkit-details-marker { display: none; }

/* ---- v1.15.4 選角：卡片多寫特性／武器／擅長；配點一鍵配法 ---- */
.class-facts { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: grid; gap: 3px; font-size: 12.5px; line-height: 1.45; color: #c6c0b4; }
.class-facts b { display: inline-block; min-width: 2.6em; margin-right: 4px; font-weight: 500; color: var(--gold-light); }
.cs-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; }
.cs-rules { line-height: 1.7; }

/* ---- v1.15.6 選角：頭像列當選擇鈕、選到的職業放大一張立繪 ---- */
.class-grid { display: block; margin: 10px 0 16px; }
.cls-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cls-tab { display: grid; justify-items: center; gap: 4px; padding: 10px 6px 9px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); cursor: pointer; text-align: center; }
.cls-tab b { font-family: var(--serif); font-size: 15px; color: var(--gold-light); letter-spacing: .04em; }
.cls-tab small { font-size: 11.5px; color: var(--muted); }
.cls-tab[aria-selected="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-dim), 0 0 14px rgba(var(--acc-rgb), .25); background: rgba(var(--acc-rgb), .08); }
.cls-face { position: relative; width: 72px; height: 96px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; font: 600 28px var(--serif); color: var(--gold-dim); border: 1px solid var(--gold-dim); background: radial-gradient(circle at 50% 30%, #2a2214 0%, #0d0b08 80%); }
.cls-face img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cls-face:has(img.art) { color: transparent; }
.cls-tab[aria-selected="true"] .cls-face { border-color: var(--gold); }
.cls-stage { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px; margin-top: 12px; padding: 14px; border: 1px solid var(--gold-dim); border-radius: var(--radius); background: linear-gradient(180deg, rgba(24, 38, 52, .55), rgba(11, 19, 29, .8)); }
.cls-big { position: relative; border-radius: 10px; overflow: hidden; display: grid; place-items: center; font: 600 48px var(--serif); color: var(--gold-dim); background: radial-gradient(ellipse at 50% 85%, rgba(213, 174, 104, .22) 0%, transparent 60%), radial-gradient(ellipse at 50% 30%, #1a2230 0%, #07090d 85%); }
/* v1.15.6b 使用者（iPhone 截圖）：框在、圖不在 → Safari 的 aspect-ratio 容器裡「height: 100%」的絕對定位圖會算成 0。改成圖自己是 3:4、撐起框，不用百分比高度 */
.cls-big img.art { position: static; display: block; width: 100%; aspect-ratio: 3 / 4; height: auto; object-fit: contain; object-position: center bottom; }   /* 全身圖整張放進去、腳對齊底部：不同張不會有大有小 */
.cls-big:not(:has(img.art)) { aspect-ratio: 3 / 4; }
.cls-big:has(img.art) { color: transparent; font-size: 0; line-height: 0; display: block; }
.cls-info h3 { font-size: 20px; color: var(--gold-light); } .cls-info h3 small { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.cls-info > p { font-size: 14px; color: #c6c0b4; line-height: 1.7; margin: 8px 0 0; }
.cls-info .class-facts { font-size: 13.5px; }
@media (max-width: 640px) { .cls-face { width: 56px; height: 74px; } .cls-tab b { font-size: 13.5px; } .cls-tab small { display: none; } .cls-stage { grid-template-columns: minmax(0, 1fr); } .cls-big { max-width: 240px; margin: 0 auto; width: 100%; } }

/* v1.15.7 世界王頁：每隻一條橫幅（場地圖淡化當底、王的立繪在右邊）、開王提醒 */
.wbx { display: flex; flex-direction: column; gap: 10px; }
.wb-sec { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 -4px; padding-bottom: 6px; border-bottom: 1px solid rgba(213,174,104,.22); }
.wb-sec b { white-space: nowrap; font-family: var(--serif); font-size: 16px; letter-spacing: .12em; color: var(--gold-light); }
.wb-sec small { color: var(--muted); font-size: 12px; }
.wb-sub { margin: 0; }
.wb-list { display: flex; flex-direction: column; gap: 8px; }
.wb-ban { position: relative; display: block; min-height: 88px; overflow: hidden; border: 1px solid rgba(213,174,104,.28); border-radius: 8px; background: linear-gradient(100deg, #1a1410, var(--sunk) 70%); cursor: pointer; isolation: isolate; transition: border-color .2s, box-shadow .2s; }
.wb-ban:hover { border-color: var(--gold); }
.wb-ban > img.art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; filter: brightness(.62) saturate(.9); }
.wb-ban::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8,13,20,.92) 0%, rgba(8,13,20,.6) 45%, rgba(8,13,20,.05) 85%); pointer-events: none; }
.wb-fig { position: absolute; right: 2%; top: 4px; bottom: 0; z-index: -1; width: 32%; pointer-events: none; }
.wb-fig img.art { width: 100%; height: 100%; object-fit: contain; object-position: right bottom; filter: drop-shadow(0 6px 12px rgba(0,0,0,.8)); }
.wb-ban-in { position: relative; display: flex; align-items: center; gap: 14px; min-height: 88px; padding: 10px 14px; text-shadow: 0 1px 4px #000, 0 0 10px rgba(0,0,0,.85); }
.wb-when { display: flex; flex-direction: column; align-items: center; min-width: 58px; padding-right: 14px; border-right: 1px solid rgba(213,174,104,.35); }
.wb-when b { font-size: 22px; line-height: 1.1; color: var(--text); letter-spacing: .02em; }
.wb-when small { font-size: 11px; color: var(--muted); letter-spacing: .1em; }
.wb-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wb-nm { font-family: var(--serif); font-size: 18px; letter-spacing: .1em; color: var(--gold-light); }
.wb-who small, .wb-ban-in > small { font-size: 12px; color: #ddd4c2; }
.wb-left { white-space: nowrap; flex: none; margin-left: auto; align-self: flex-end; font-size: 12px; color: #ddd4c2; background: rgba(8,13,20,.55); padding: 2px 8px; border-radius: 999px; }
.wb-tag { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold-light); background: rgba(213,174,104,.15); letter-spacing: .08em; }
.wb-tag.live { border-color: #e2563f; color: #ffd6cc; background: rgba(226,86,63,.3); animation: wbPulse 1.6s ease-in-out infinite; }
@keyframes wbPulse { 50% { box-shadow: 0 0 0 4px rgba(226,86,63,.15); } }
.wb-ban.next { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(213,174,104,.25), 0 0 18px rgba(213,174,104,.18); }
.wb-ban.next .wb-when b { color: var(--gold-light); }
/* 進行中：大一點、血條、右上角 ⓘ */
.wb-live { cursor: default; min-height: 140px; border-color: rgba(226,86,63,.6); box-shadow: 0 0 22px rgba(226,86,63,.15); }
.wb-live .wb-fig { width: 40%; }
.wb-live .wb-ban-in { flex-direction: column; align-items: stretch; gap: 4px; min-height: 140px; padding-right: 38%; }
.wb-ban-top { display: flex; align-items: center; gap: 8px; }
.wb-ban-top small { color: #ffd6cc; font-size: 12px; }
.wb-live .wb-nm { font-size: 22px; }
.wb-hpbar { margin-top: 4px; }
.wb-hpbar i { background: var(--hp); }
.wb-i { position: absolute; top: 8px; right: 10px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--gold-light); background: rgba(8,13,20,.6); cursor: pointer; }
.wb-top { margin-top: -2px; }
.wb-ban.slim { min-height: 54px; cursor: default; }
.wb-ban.slim .wb-ban-in { min-height: 54px; }
.wb-ban.slim .wb-fig { width: 22%; }
.wb-last { display: flex; flex-direction: column; gap: 6px; }
/* 開王提醒 */
.wb-notify { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); }
.wb-notify.on { border-color: rgba(213,174,104,.5); background: linear-gradient(90deg, rgba(213,174,104,.12), var(--sunk) 70%); }
.wb-bell { font-size: 20px; filter: grayscale(1) opacity(.5); }
.wb-notify.on .wb-bell { filter: none; animation: wbRing 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes wbRing { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(14deg); } 88% { transform: rotate(-12deg); } 92% { transform: rotate(8deg); } 96% { transform: rotate(-4deg); } }
.wb-n-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wb-n-t b { font-family: var(--serif); letter-spacing: .08em; color: var(--gold-light); }
.wb-n-t small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.wb-n-t small .btn { margin-left: 4px; padding: 1px 8px; font-size: 12px; }
.wb-notify select { background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .3em .4em; color: var(--text); font-size: 13px; }
.wb-notify select:disabled { opacity: .45; }
details.wb-rules > summary { cursor: pointer; color: var(--gold-light); font-size: 13px; padding: 4px 0; }
@media (prefers-reduced-motion: reduce) { .wb-tag.live, .wb-notify.on .wb-bell { animation: none; } }
@media (max-width: 599px) {
  .wb-ban, .wb-ban-in { min-height: 76px; }
  .wb-ban-in { gap: 10px; padding: 8px 10px; }
  .wb-when { min-width: 48px; padding-right: 10px; }
  .wb-when b { font-size: 19px; }
  .wb-nm { font-size: 16px; letter-spacing: .04em; }
  .wb-sec small { font-size: 11px; }
  .wb-fig { width: 38%; }
  .wb-live .wb-ban-in { padding-right: 30%; }
  .wb-notify { flex-wrap: wrap; }
  .wb-notify .wb-n-t { flex-basis: calc(100% - 100px); }
  .wb-notify select { margin-left: 30px; }
}

/* v1.15.8 神器殘片進度（神器頁九神神器每一列） */
.ar-frag { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ar-fbar { flex: 1; display: flex; height: 6px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); overflow: hidden; }
.ar-fbar i { display: block; flex: none; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-light)); }
.ar-fbar i.any { background: rgba(213,174,104,.4); }   /* 共用殘片補上的部分 */
.ar-frag small.num { flex: none; color: var(--muted); font-size: 12px; }
.ar-frag .btn { flex: none; }
.ar-frag .btn small { display: block; font-size: 10px; font-weight: 400; opacity: .8; }

/* ---- v1.15.9 世界王四榜（輸出／承傷／治療／破綻） ---- */
.wb-boards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0; }
.wb-board { display: grid; gap: 2px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); font-size: 12.5px; min-width: 0; }
.wb-board > b { font-family: var(--serif); font-size: 13px; color: var(--gold-light); display: flex; align-items: baseline; gap: 4px; }
.wb-board > b small { font-family: var(--sans); font-size: 10.5px; color: var(--muted); font-weight: 400; }
.wb-board > span { display: flex; align-items: baseline; gap: 4px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-board > span i { font-style: normal; color: var(--muted); font-size: 11px; width: 1em; }
.wb-board > span em { font-style: normal; margin-left: auto; color: var(--muted); font-size: 11px; }
.wb-board > span.me { color: var(--gold-light); }
.wb-board.me1 { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-dim); }
.wb-board .wb-mine { color: var(--gold-light); font-size: 11px; margin-top: 2px; }
.wb-expose { margin: 0 0 6px; color: #e9b96a; }
.wbr-card .wb-boards { margin: 4px 0 10px; }
@media (max-width: 599px) { .wb-boards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- v1.15.10 公告依類型上色；神兵名字金色可點；左欄世界王小卡 ---- */
.chat-box .ann { color: #d9d2c4; }
.chat-box .ann[data-type="drop"] { color: #e3c98a; }
.chat-box .ann[data-type="worldboss"], .chat-box .ann[data-type="bow"] { color: #9fc6ff; }
.chat-box .ann[data-type="enchant"] { color: #f0a86a; }
.chat-box .ann[data-type="favor"], .chat-box .ann[data-type="trial"] { color: #c9a0ff; }
.chat-box .ann[data-type="level"], .chat-box .ann[data-type="book"], .chat-box .ann[data-type="boss"] { color: #b8c4cf; }
.ann-item { appearance: none; border: 0; background: none; padding: 0; margin: 0; font: inherit; cursor: pointer; color: var(--r-unique); font-weight: 600; text-decoration: underline dotted; text-underline-offset: 2px; }
.ann-item:hover { color: var(--gold-light); }
.marquee .ann-item { color: var(--gold-light); }
.g-firsts { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; padding: 6px 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.g-firsts small { grid-column: 1 / -1; font-size: 11px; }
.g-firsts span b { color: var(--text); font-weight: 500; }
#plate-wb .g-head .g-reset { font-size: 11.5px; }

/* ---- v1.15.10 背包｜裝備欄｜神器 分頁小圖 ---- */
.seg-tabs.seg-icons button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 0; }
.seg-ic { position: relative; width: 24px; height: 24px; border-radius: 6px; overflow: hidden; display: grid; place-items: center; font-size: 11px; color: var(--gold-dim); background: var(--sunk); border: 1px solid var(--line); flex: none; }
.seg-ic img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.seg-ic:has(img.art) { color: transparent; }
.seg-tabs button[aria-selected="true"] .seg-ic { border-color: var(--gold-dim); }
@media (max-width: 380px) { .seg-ic { width: 20px; height: 20px; } }

/* v1.15.14 技能還沒學會：掉落的地圖，點了直接過去打 */
.sk-src { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.sk-src .btn { text-align: left; }
.sk-src .btn small { display: block; font-size: 11px; opacity: .75; font-weight: 400; }

/* ---- v1.15.15 手機：聊天四個分頁一排、聊天區加高；技能列的開關／「去哪張地圖」移到下一行 ---- */
.chat-top button { padding-inline: 2px; white-space: nowrap; }
.chat-top .badge { display: inline-block; width: 7px; height: 7px; margin-left: 3px; border-radius: 50%; background: var(--danger); font-size: 0; vertical-align: 7px; }   /* 分頁太窄放不下數字，用紅點表示有新通知 */
@media (max-width: 1099px) {
  /* 少了一排頻道標籤：聊天內容從 100dvh−620 改成 100dvh−560，最高 360px */
  .feed-m .chat-box.tall { height: clamp(180px, calc(100dvh - 560px), 360px); }
  .feed-m .chat-form { position: static; }
  /* 技能列：手機寬度不夠放「圖示｜說明｜開關」三欄，右欄（開關、候補、去哪張地圖）改到說明下面一整排 */
  .skill-rows > div { grid-template-columns: 56px minmax(0, 1fr); row-gap: 6px; }
  .skill-rows .icon { width: 56px; height: 56px; font-size: 22px; }
  .skill-rows > div > div:last-child { grid-column: 1 / -1; max-width: none; text-align: right; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
  .skill-rows .sk-src { width: 100%; justify-content: stretch; }
  .skill-rows .sk-src .btn { flex: 1 1 45%; min-width: 0; padding: 6px 8px; display: block; text-align: left; white-space: normal; line-height: 1.35; }
  .skill-rows .sk-src .btn small { white-space: normal; text-align: left; }
  .skill-rows .t small { line-height: 1.45; }
}
/* 電腦版也一樣：還沒學會、列著「去哪張地圖」的技能列，按鈕換到說明下面一整行（右側面板只有 440px，三欄放不下） */
.skill-rows > div.src-row { grid-template-columns: 64px minmax(0, 1fr); row-gap: 6px; }
@media (min-width: 1100px) { .skill-rows > div.src-row { grid-template-columns: 76px minmax(0, 1fr); } }
.skill-rows > div.src-row > div:last-child { grid-column: 1 / -1; max-width: none; text-align: left; }
.skill-rows > div.src-row .sk-src { justify-content: stretch; }
.skill-rows > div.src-row .sk-src .btn { flex: 1 1 45%; min-width: 0; display: block; text-align: left; white-space: normal; line-height: 1.35; padding: 6px 10px; }
.skill-rows > div.src-row .sk-src .btn small { white-space: normal; }

/* ---- v1.15.17 信箱：領過的信（灰）＋「下一步」視窗（領信→打開禮包→使用月卡） ---- */
.mail-done-h { margin: 14px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.list-rows > div.claimed { opacity: .6; }
.list-rows > div.claimed .ok { color: var(--ok); }
dialog.next-step { border: 0; padding: 0; background: transparent; max-width: min(92vw, 420px); width: 100%; }
dialog.next-step::backdrop { background: rgba(0,0,0,.6); }
.ns-box { background: var(--panel); border: 1px solid rgba(var(--acc-rgb), .45); border-radius: 14px; padding: 16px 18px; box-shadow: 0 12px 40px rgba(0,0,0,.6); color: var(--text); }
.ns-box h3 { margin: 0 0 10px; font-size: 17px; color: var(--gold-light); }
.ns-box ul { margin: 0 0 12px; padding-left: 18px; line-height: 1.7; font-size: 14px; }
.ns-box .pop-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; }
.ns-box .pop-actions .btn.primary { font-size: 15px; }

/* ---- v1.15.19 背包：禮包／月卡／古卷／命運之線 亮框＋標籤（跟學得會的技能書一樣顯眼；禮包、月卡會呼吸） ---- */
.cell.sp-item { border-color: rgba(var(--acc-rgb), .85); box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .35), 0 0 12px rgba(var(--acc-rgb), .35) inset; }
.cell.sp-item .cell-ic { filter: brightness(1.12) saturate(1.1); }
.cell .c-sp { position: absolute; left: 3px; top: 2px; font-size: 10px; line-height: 1; color: var(--gold-light); font-weight: 700; letter-spacing: .5px; text-shadow: 0 1px 2px #000, 0 0 4px #000; }   /* 跟技能書的 Lv 標籤同一種：金色小字，不要色塊 */
.cell.sp-gift { animation: spGift 1.8s ease-in-out infinite; }
@keyframes spGift { 0%, 100% { box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .35), 0 0 12px rgba(var(--acc-rgb), .35) inset; } 50% { box-shadow: 0 0 0 2px rgba(var(--acc-rgb), .9), 0 0 18px rgba(var(--acc-rgb), .55) inset, 0 0 14px rgba(var(--acc-rgb), .45); } }
@media (prefers-reduced-motion: reduce) { .cell.sp-gift { animation: none; } }
.chk.mine small { display: inline; margin-left: 4px; font-size: 11.5px; color: var(--gold-light); }

/* ---- v1.15.20 神器頁：每列左邊小圖（持有→神器圖、沒有→殘片圖） ---- */
.ar-list .ar-row.has-ic { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: start; }
.ar-ic { position: relative; width: 52px; height: 52px; border-radius: 8px; background: var(--sunk); border: 1px solid var(--line); display: grid; place-items: center; font-size: 20px; color: var(--muted); overflow: hidden; }
.ar-ic img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ar-body { min-width: 0; }

/* ---- v1.15.25 九神卡片、守護神橫幅、設定群組標題 ---- */
.god-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.god-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 0 8px; min-width: 0; background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font: inherit; cursor: pointer; overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .15s; }
.god-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.god-card.on { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(213,174,104,.3), 0 0 16px rgba(213,174,104,.22); }
.god-card.sel { border-color: var(--gold-light); box-shadow: 0 0 0 2px rgba(255,226,150,.45); }
.god-art { position: relative; width: 100%; aspect-ratio: 3 / 4; display: grid; place-items: center; font: 700 36px var(--serif); color: var(--gold-dim); background: radial-gradient(circle at 50% 30%, #4a3410, #120c04 80%); overflow: hidden; }
.god-art img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.god-art:has(img.art) { color: transparent; }
.god-art::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(to top, rgba(11,17,24,.95), rgba(11,17,24,0)); pointer-events: none; }
.god-card b { position: relative; margin-top: -22px; font-family: var(--serif); font-size: 16px; color: var(--gold-light); text-shadow: 0 1px 3px #000; }
.god-card small { font-size: 11.5px; color: var(--muted); padding: 0 6px; text-align: center; overflow-wrap: anywhere; }
.god-tag { position: absolute; top: 6px; left: 6px; font-style: normal; font-size: 10.5px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--gold); color: #1a1206; background: var(--gold-light); font-weight: 700; letter-spacing: .05em; }
.god-tag.lv { color: var(--gold-light); background: rgba(8,13,20,.8); }
.god-ban { cursor: default; min-height: 150px; margin-bottom: 10px; }
.god-ban:hover { border-color: rgba(213,174,104,.28); }
.god-ban > img.art { object-position: center 20%; }
.god-ban .wb-ban-in { min-height: 150px; align-items: center; }
.god-ban-art { position: relative; flex: none; width: 96px; height: 128px; border-radius: 8px; border: 1px solid var(--gold-dim); overflow: hidden; background: #120c04; display: grid; place-items: center; font: 700 34px var(--serif); color: var(--gold-dim); }
.god-ban-art img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.god-ban-art:has(img.art) { color: transparent; }
.god-style { margin: 6px 0 0; font-size: 13px; color: var(--gold-light); }
.god-lore { margin: 0 0 10px; }
@media (max-width: 420px) { .god-cards { gap: 6px; } .god-card b { font-size: 14px; } .god-card small { font-size: 10.5px; } }
.set-group-h { margin: 12px 0 6px; font: 600 13px var(--sans); color: var(--gold-light); letter-spacing: .06em; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.set-group-h:first-of-type { margin-top: 4px; }

/* ---- v1.15.26 能力頁：上方兩欄（戰力＋防禦｜立繪）、能力值每列寫影響 ---- */
.ch-head { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 12px; align-items: center; }
.ch-left { min-width: 0; }
.ch-left .power-big { margin: 0 0 8px; }
.ch-left .def-now { margin: 0; }
.ch-left .hint { margin: 8px 0 0; }
.ch-port { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ch-port .char-portrait { float: none; margin: 0; width: 132px; border-radius: 10px; border-color: rgba(213,174,104,.55); box-shadow: 0 0 0 1px rgba(213,174,104,.2), 0 8px 20px rgba(0,0,0,.45); }
.ch-port small { font-size: 12px; color: var(--muted); }
.attr-list { display: grid; gap: 4px; }
.attr-row2 { display: grid; grid-template-columns: 3.2em 3em minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px dotted var(--line); }
.attr-row2 > b { font-size: 14px; }
.attr-row2 > .num { font-size: 18px; font-weight: 700; color: var(--gold-light); text-align: right; }
.attr-row2 > small { font-size: 12px; color: var(--muted); line-height: 1.45; }
.attr-row2 > small i { font-style: normal; color: var(--faint, #7f8a99); }
@media (max-width: 380px) { .ch-head { grid-template-columns: minmax(0, 1fr) 104px; } .ch-port .char-portrait { width: 104px; } }
.sk-slots b { font-size: 14px; }
.ch-left .def-now { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ch-left .def-now > span { min-width: 0; padding: 6px 8px; }
.ch-left .def-now small { white-space: nowrap; font-size: 11px; }
.ch-left .def-now b.num { font-size: 16px; }

/* v1.15.28 登入頁 LINE 群連結 */
.auth-card .foot-link.auth-line { margin-top: 8px; }
.auth-card .foot-link.auth-line a { color: #4cc764; font-weight: 600; }
/* v1.15.28 怪物卡回上一頁 */
#pop .pop-back { margin: 0 0 10px; padding: 4px 10px; font-size: 13px; }
/* v1.15.29 世界王結果：關閉鈕在上面 */
.wbr-card { position: relative; }
.wbr-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.35); color: var(--gold-light); font-size: 16px; cursor: pointer; }
.wbr-acts.top { margin: 6px 0 2px; }
.wbr-acts.top .btn { padding: 6px 14px; font-size: 13px; }
.wbr-foot { text-align: center; margin: 8px 0 0; }
.wbr-card h3 { padding: 0 32px; }
/* v1.15.31 神話技能浮字 */
.floater.wb-mythic { font-size: 22px; font-weight: 800; color: #ffd27a; text-shadow: 0 0 10px rgba(255,180,60,.8), 0 2px 2px #000; }
/* v1.15.32 使用者：鐵匠強化的格子看不出哪件穿在身上 → 穿著的加「E」角標＋細金框 */
.cell .c-eq { position: absolute; left: 3px; bottom: 2px; z-index: 1; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 4px; background: #d9a441; color: #1a1206; font-size: 10px; font-weight: 800; line-height: 14px; text-align: center; box-shadow: 0 1px 2px #000; }
.cell.worn .c-dv { left: 20px; }
.cell.worn { box-shadow: inset 0 0 0 1px rgba(217,164,65,.7); }
/* v1.15.33／34 使用者：地圖列的名字被吃掉（「波呂斐摩斯洞窟（…」），右邊「輕鬆」那邊還有空間；不要改成上下兩排 → 維持一行，右欄整個收緊、「輕鬆」往右靠 */
.map-row .mr { gap: 3px; }
.map-row .mr small { min-width: 36px; font-size: 11.5px; }
.map-row .mr .fit { padding: 3px 5px; font-size: 11.5px; }
.map-row .mr .zst { margin-right: 0; min-width: 0; }
.map-row .mr .cur-tag { padding: 0 4px; }
@media (max-width: 1099px) {
  .map-row { gap: 5px; padding-left: 6px; padding-right: 0; }
  .map-row .zcode { min-width: 32px; padding: 1px 4px; font-size: 12px; }
  .map-row .mn small { font-size: 11px; margin-left: 0; }
  .map-row .mi { width: 22px; }
}
/* v1.15.35 使用者：地圖列「戰鬥中」字不用寫，框起來就好（右邊才不擠）→ 目前所在的列：金框＋左邊金色豎條；休息中淡一點 */
.map-row[aria-current="true"] { box-shadow: inset 3px 0 0 var(--gold), 0 0 0 1px rgba(226,194,122,.35); }
.map-row[aria-current="true"][data-state="rest"] { box-shadow: inset 3px 0 0 var(--gold-dim); border-color: var(--gold-dim); }
/* v1.15.43 能力頁特殊屬性：兩欄小卡 */
.adv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 1100px) { .adv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.adv-cell { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 6px; align-items: baseline; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); }
.adv-cell > b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-cell > span { font-size: 15px; font-weight: 700; color: var(--gold-light); white-space: nowrap; }
.adv-cell > small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-procs { margin-top: 8px; } .adv-procs summary { cursor: pointer; color: var(--gold-light); font-size: 13px; padding: 4px 0; } .adv-procs .fx { margin: 4px 0 0; font-size: 12.5px; }
/* v1.15.45 登入頁 Discord＋LINE 並排 */
.auth-card .foot-link.auth-line .lk-discord { color: #7d8cff; font-weight: 600; }
.auth-card .foot-link.auth-line .sep { color: var(--muted); margin: 0 6px; }
/* v1.15.46 聊天框下的社群連結 */
.chat-links { margin: 4px 0 2px; font-size: 12px; text-align: center; }
.chat-links a { color: var(--gold-light); text-decoration: none; }
.chat-links .sep { color: var(--muted); margin: 0 6px; }
/* v1.15.48 能力頁：防禦只留 AC／MR 兩格；暗金清單乾淨排版；特殊屬性格子不撐寬 */
.def-now.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adv-grid, .adv-cell, .adv-cell > * { min-width: 0; }
.proc-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); overflow: hidden; }
.proc-row { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 7px 10px; font-size: 13px; line-height: 1.35; border-top: 1px solid var(--line); }
.proc-row:first-child { border-top: 0; }
.proc-row > b { color: var(--gold-light); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proc-row > span { color: var(--text); overflow-wrap: anywhere; }
.adv-procs { display: none; }
/* HUD：寶石＋信箱永遠同一排（電腦版信箱原本掉到第三行） */
.plate-gold { display: grid; justify-items: end; align-content: center; gap: 3px; }
.plate-gold::after { display: none; }
.pg-acct { display: flex; align-items: center; gap: 6px; }
.pg-gold { display: flex; align-items: center; gap: 4px; }
.pg-acct .gem-chip, .pg-acct .mail-chip { margin-left: 0; }
/* v1.15.49 戰力卡四格（AC、MR、迴避、減傷）2×2 等寬；交易所領取清單每筆一個物品圖示 */
.ch-left .def-now.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ch-left .def-now.four > span { padding: 5px 6px; }
.ch-left .def-now.four b.num { font-size: 15px; white-space: nowrap; }
.mk-claims .mk-cic .icon { width: 40px; height: 40px; }
/* v1.15.50 戰鬥數值一列一行不斷行；殘片換共用的確認按鈕不撐破卡片（允許換行、縮小） */
.stat-grid dt, .stat-grid dd { white-space: nowrap; }
.stat-grid dd { padding-left: 6px; }
.ar-frag { flex-wrap: wrap; }
.ar-frag .btn.asking { flex: 1 1 100%; white-space: normal; line-height: 1.25; }
.proc-row > b small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); white-space: normal; line-height: 1.3; }   /* v1.15.51 使用者：來源裝備名要全部顯示、不要… */
.proc-row > b { white-space: normal; overflow: visible; text-overflow: clip; }
.proc-row { grid-template-columns: 7.5em minmax(0, 1fr); }
.pw-card .pw-def4 { gap: 4px; justify-content: space-between; white-space: nowrap; }
.pw-card .pw-def4 span { display: inline-flex; align-items: baseline; gap: 2px; }
.pw-card .pw-def4 b { margin-left: 2px; }
@media (max-width: 1099px) { .pw-card .pw-def4 { font-size: 10.5px; } .pw-card .pw-def4 b { font-size: 12px; } }
/* ---- v1.15.52 怪物圖鑑：一次只展開一章（手風琴）、兩欄小卡、沒打過的是剪影、門檻小點、章節禮 ---- */
.bst-top .hint { margin-bottom: 0; }
.bst-sec { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--tile); overflow: hidden; }
.bst-sec.open { border-color: var(--gold-dim); }
.bst-h { display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; background: none; border: 0; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.bst-sec.open .bst-h { background: linear-gradient(var(--tile-hi), var(--tile-2)); border-bottom: 1px solid var(--line); }
.bst-hn { font-family: var(--serif); font-size: 15px; color: var(--gold-light); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bst-hn small { display: block; font-family: var(--sans); font-size: 11px; color: var(--muted); }
.bst-hs { font-size: 12px; color: var(--muted); white-space: nowrap; }
.bst-hs .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); margin-left: 5px; vertical-align: 1px; }
.bst-h .chev { width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); margin-top: -4px; justify-self: center; transition: transform .15s; }
.bst-sec.open .bst-h .chev { transform: rotate(-135deg); margin-top: 4px; }
.bst-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px; }
@media (min-width: 560px) { .bst-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bst-card { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 8px 6px 6px; min-width: 0; background: var(--tile-2); border: 1px solid var(--line); border-radius: 9px; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.bst-card:active { background: var(--tile-hi); }
.bst-card.claim { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .25), 0 0 10px rgba(var(--acc-rgb), .18); }
.bst-card.unseen { opacity: .55; }
.bst-ic { position: relative; width: 44px; height: 44px; border-radius: 7px; background: var(--sunk); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--serif); font-size: 16px; color: #8d8574; overflow: hidden; }
.bst-ic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bst-ic.rk-elite { border-color: #5b7fb0; } .bst-ic.rk-boss { border-color: var(--gold-dim); }
.bst-card.unseen .bst-ic i { font-style: normal; font-size: 20px; color: #4d5663; }
.bst-t { min-width: 0; display: grid; gap: 2px; }
.bst-t > b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bst-t > small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bst-t > small i { font-style: normal; color: var(--gold-light); }
.bst-bar { display: block; height: 4px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); overflow: hidden; }
.bst-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); }
.bst-next { display: flex; align-items: center; gap: 3px; }
.bst-next .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--sunk); border: 1px solid var(--line); margin-left: 1px; }
.bst-next .pip:first-of-type { margin-left: auto; }
.bst-next .pip.on { background: var(--gold); border-color: var(--gold); } .bst-next .pip.got { background: var(--ok); border-color: var(--ok); }
.bst-claim { position: absolute; top: -1px; right: -1px; padding: 2px 7px; border-radius: 0 9px 0 8px; background: var(--gold); color: #1a1407; font-size: 11px; font-weight: 700; }
.bst-gift { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 8px 8px; padding: 8px 10px; border-radius: 8px; background: var(--sunk); border: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.bst-gift.ready { border-style: solid; border-color: var(--gold-dim); color: var(--text); }
.bst-gift .btn { flex: none; }
/* 怪物卡裡的圖鑑區塊 */
.bst-info .bst-tier { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dotted var(--line); font-size: 13px; }
.bst-info .bst-tier > b { color: var(--muted); font-weight: 500; }
.bst-info .bst-tier.on > b { color: var(--gold-light); }
.bst-info .bst-tier > span { min-width: 0; } .bst-info .bst-tier > span small { display: block; color: var(--muted); font-size: 12px; }
.bst-info .bst-tier > em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.bst-info .bst-tier.on > em { color: var(--gold-light); } .bst-info .bst-tier.got > em { color: var(--ok); }
/* ---- v1.15.58 英雄史詩錄（收藏）：每頁一張卡、格子兩欄、已登錄亮框、集滿金框 ---- */
.col-page.done { border-color: var(--gold-dim); box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .18); }
.col-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 560px) { .col-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.col-slot { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 8px; min-width: 0; background: var(--tile-2); border: 1px solid var(--line); border-radius: 9px; }
.col-slot .btn { grid-column: 1 / -1; }
.col-slot.got { border-color: rgba(var(--acc-rgb), .5); }
.col-slot.can { border-color: var(--gold); }
.col-slot > span { min-width: 0; display: grid; gap: 2px; }
.col-slot > span b { font-size: 12.5px; font-weight: 600; white-space: normal; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }   /* 名字全部顯示、最多兩行 */
.col-slot > span small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-slot .icon.empty { color: #4d5663; font-size: 18px; opacity: .8; }
.col-slot .icon.empty img { opacity: .35; filter: grayscale(1); }
.col-bonus { margin: 8px 0 0; font-size: 12.5px; color: var(--gold-light); }
.col-pick > div { grid-template-columns: auto 1fr auto; }
/* v1.15.59 玩家建議：常駐狀態只放圖示（點了才說明），畫面乾淨、浮字不被遮 */
.buffs .bf.ic-only { padding: 1px; gap: 0; pointer-events: auto; cursor: pointer; }
.buffs .bf.ic-only .bf-ic { width: 22px; height: 22px; font-size: 11px; }
.stage-hud .bf.ic-only .bf-ic { width: 20px; height: 20px; font-size: 10px; }
.buffs .bf.st-sleep { border-color: rgba(170,150,200,.6); } .buffs .bf.st-sleep .bf-ic { color: #c9b6e6; }
.buffs .bf.st-poison { border-color: rgba(120,190,100,.6); } .buffs .bf.st-poison .bf-ic { color: #9fe08a; }
.buffs .bf.st-curse { border-color: rgba(210,110,110,.6); } .buffs .bf.st-curse .bf-ic { color: #f0a0a0; }
/* v1.15.59 玩家編號 */
.pid-row { display: flex; align-items: center; gap: 10px; margin: 4px 0; } .pid-row b { font-size: 22px; color: var(--gold-light); letter-spacing: .04em; }
/* v1.15.64 手機：人物腳下的技能冷卻列可以收起（左邊一顆小鈕）；電腦版不顯示這顆鈕 */
.sk-min { display: none; }
@media (max-width: 1099px) {
  #stage > .sk-min { display: inline-grid; place-items: center; position: absolute; z-index: 5; left: 8px; bottom: calc(var(--bar-h) + 3px); height: clamp(18px, var(--art-h) * .1 - 2px, 24px); min-width: 22px; padding: 0 5px; border-radius: 5px; border: 1px solid rgba(214,178,94,.45); background: rgba(8,13,20,.82); color: var(--gold-light); font: 600 11px var(--sans); cursor: pointer; }
  #stage > .skillbar { left: 36px; }
  #stage.skbar-off > .skillbar { display: none; }
  #stage.wb-mode > .sk-min { display: none; }
}
/* v1.15.61 兌換碼 */
.code-form { display: flex; gap: 8px; margin: 4px 0; } .code-form input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
/* v1.15.62 建議箱 */
.fb-form { display: grid; gap: 8px; margin: 4px 0; } .fb-form textarea { width: 100%; box-sizing: border-box; resize: vertical; } .fb-form .btn { justify-self: end; }
/* v1.15.66 能力面板五個分頁：手機不放小圖、字縮一點，五個都看得到 */
@media (max-width: 560px) {
  .seg-tabs.seg-icons.many .seg-ic { display: none; }
  .seg-tabs.seg-icons.many button { gap: 2px; padding: 7px 0; font-size: 12.5px; letter-spacing: 0; min-width: 0; }
  .seg-tabs.seg-icons.many .mk-n { min-width: 1.2em; padding: 0 3px; font-size: 10px; }
}

/* v1.15.68 商店自己填數量、殘片換幾次、信箱全部領取 */
.shop-buy { display: flex; gap: 4px; align-items: center; }
.shop-qty, .rconv-n input { width: 4.6em; padding: 5px 6px; font: inherit; font-size: 14px; background: var(--sunk); color: inherit; border: 1px solid var(--line); border-radius: 6px; }
.rconv-n { display: inline-flex; gap: 3px; align-items: center; }
.bst-all { margin: 0 0 8px; text-align: right; }
@media (max-width: 420px) { .shop-qty { width: 3.8em; } }

/* v1.15.69 任務（先知）：每一列一個任務，可完成的金框 */
.q-row { margin-bottom: 8px; }
.q-row.q-ready { border-color: var(--gold-dim); box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .35) inset; }
.q-row.q-done, .q-row.q-lock { opacity: .7; }
.q-row.q-done .box-h, .q-row.q-lock .box-h { margin-bottom: 0; }
.q-need { margin: 6px 0; padding-left: 18px; }
.q-need li.ok { color: var(--ok, #7fbf7f); }

/* v1.15.69 一鍵出售 */
.sb-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.sb-pick .btn { display: flex; flex-direction: column; align-items: center; }

/* v1.15.69 商店：提醒水會自動補 */
.shop-tip { margin: 0 0 6px; padding: 7px 10px; border: 1px solid var(--gold-dim); border-radius: 8px; background: rgba(var(--acc-rgb), .08); font-size: 13.5px; }

/* v1.15.69 掉落表的道具可以點 */
.drop-row.tap { cursor: pointer; }
.drop-row.tap:hover, .drop-row.tap:focus-visible { background: rgba(var(--acc-rgb), .08); outline: none; }

/* v1.15.71 使用者：裝備欄的圖可以大一點 */
.eq-card .cell-ic { width: 64px; height: 64px; }
@media (max-width: 560px) { .eq-card .cell-ic { width: 56px; height: 56px; } }
/* v1.15.71 九神降臨：裝備欄進度條 */
.dsc-bar { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); }
.dsc-bar.off { display: block; font-size: 13px; color: var(--muted); }
.dsc-bar.off span { color: var(--gold-light); margin-right: 6px; }
.dsc-bar.full { border-color: var(--gold-dim); box-shadow: 0 0 14px rgba(var(--acc-rgb), .35), inset 0 0 18px rgba(var(--acc-rgb), .12); }
.dsc-ic { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #0006; border: 1px solid var(--gold-dim); color: var(--gold-light); }
.dsc-ic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dsc-t { flex: 1; min-width: 0; }
.dsc-t b { color: var(--gold-light); }
.dsc-t small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.dsc-track { position: relative; display: block; height: 7px; margin: 9px 0 10px; border-radius: 4px; background: #0007; }
.dsc-track em { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, #a9822f, #f1d27a); }
.dsc-track i { position: absolute; top: -3px; width: 2px; height: 13px; background: var(--line); font-style: normal; }
.dsc-track i b { position: absolute; top: 13px; left: -6px; font-size: 10px; color: var(--muted); }
.dsc-track i.on { background: var(--gold-light); }
.dsc-track i.on b { color: var(--gold-light); }
/* 戰場左上的神：平常半透明俯視，出手時亮起來放大 */
#dsc-god { position: absolute; left: 8px; top: 8px; width: 22%; max-width: 210px; aspect-ratio: 3 / 4; z-index: 3; pointer-events: none; opacity: .38; filter: drop-shadow(0 0 12px rgba(241, 210, 122, .35)); transform-origin: top left; transition: opacity .6s; }
#dsc-god img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 12px; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
#dsc-god > b { color: var(--gold-light); font-size: 20px; }
#dsc-god .dsc-say { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; font-weight: 700; color: #ffe9a8; text-shadow: 0 0 8px #000, 0 0 14px rgba(241, 210, 122, .8); opacity: 0; font-size: 15px; }
#dsc-god.act { animation: dscAct 2.2s ease-out; }
#dsc-god.act .dsc-say { animation: dscSay 2.2s ease-out; }
@keyframes dscAct { 0% { opacity: .38; transform: scale(1); } 12% { opacity: 1; transform: scale(1.12); filter: drop-shadow(0 0 26px rgba(255, 230, 150, .95)) brightness(1.35); } 70% { opacity: .95; } 100% { opacity: .38; transform: scale(1); } }
@keyframes dscSay { 0%, 8% { opacity: 0; transform: translateY(6px); } 20%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #dsc-god.act, #dsc-god.act .dsc-say { animation: none; } }

/* v1.15.75 使用者（手機）：降臨的神和大字把血條、技能、人物都擋光了 →
   神像放到戰場「最底層」（背景之上、人物／血條／怪物／數字之下），平常更淡；出手時亮起但不放大；字小一行 */
.stage { isolation: isolate; }
#dsc-god { z-index: -1; opacity: .3; }
#dsc-god.act { animation-name: dscActLow; }
@keyframes dscActLow { 0% { opacity: .3; } 15% { opacity: .85; filter: drop-shadow(0 0 22px rgba(255, 230, 150, .9)) brightness(1.25); } 70% { opacity: .75; } 100% { opacity: .3; } }
#dsc-god .dsc-say { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) {
  #dsc-god { left: 50%; top: 4px; width: 34%; transform: translateX(-50%); opacity: .22; }
  #dsc-god .dsc-say { font-size: 11px; bottom: 2%; }
}

/* v1.15.85 九神降臨：三階效果列表 */
.dsc-steps { list-style: none; margin: 4px 0 2px; padding: 0; display: grid; gap: 3px; }
.dsc-steps li { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.dsc-steps li > b { flex: none; min-width: 3.2em; color: var(--muted); }
.dsc-steps li.on, .dsc-steps li.on > b { color: var(--gold-light); }
.dsc-steps li span b { color: inherit; }
.dsc-how { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); opacity: .85; }

/* v1.15.86 裝備左右對照：分基本素質／能力，標新增、移除 */
.cmp .cmp-sub { list-style: none; margin: 8px 0 2px; font-size: 12px; color: var(--gold-light); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.cmp-tag { font-style: normal; font-size: 10.5px; margin-left: 5px; padding: 0 5px; border-radius: 999px; vertical-align: 1px; }
.cmp-tag.add { background: rgba(110, 190, 120, .18); color: #8fd39a; }
.cmp-tag.del { background: rgba(220, 90, 80, .18); color: #ee8a80; }
.cmp-lr > summary { cursor: pointer; display: inline-block; padding: 4px 10px; border: 1px solid var(--gold-dim); border-radius: 999px; color: var(--gold-light); font-size: 13px; margin: 4px 0; }

/* v1.15.86 使用者：地圖右邊的 ⓘ 大家不知道能點 → 改成小小的「掉落」字框（細金邊、淡色，不搶眼） */
.map-row .mi { width: auto; height: auto; padding: 2px 7px; border-radius: 999px; border: 1px solid rgba(var(--acc-rgb), .35); color: var(--gold-light); opacity: .8; font-size: 11.5px; line-height: 1.3; white-space: nowrap; }
.map-row .mi:hover { opacity: 1; background: rgba(var(--acc-rgb), .12); }
@media (max-width: 560px) { .map-row .mi { width: auto; padding: 1px 5px; font-size: 10.5px; } }
@media (max-width: 420px) {   /* 窄手機：地圖名稱要一行放得下（使用者 1.15.35），只留有細金框的 ⓘ，看得出是按鈕 */
  .map-row .mi { font-size: 0; width: 22px; height: 22px; padding: 0; display: grid; place-items: center; }
  .map-row .mi::before { content: 'ⓘ'; font-size: 13px; }
}

/* v1.15.87 信箱：已領取區塊右邊「全部刪除」 */
.mail-done-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* v1.15.88 九神降臨列精簡：一行＋細進度條，效果收進「效果」 */
.dsc-bar { padding: 6px 10px; gap: 8px; margin-bottom: 8px; align-items: flex-start; }
.dsc-ic { width: 34px; height: 34px; margin-top: 2px; }
.dsc-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dsc-line small { margin: 0; font-size: 11.5px; }
.dsc-track { height: 4px; margin: 6px 0 2px; }
.dsc-track i { top: -2px; height: 8px; }
.dsc-track i b { display: none; }
.dsc-more > summary { cursor: pointer; font-size: 11.5px; color: var(--gold-light); opacity: .85; margin-top: 3px; list-style: none; }
.dsc-more > summary::-webkit-details-marker { display: none; }
.dsc-more > summary::after { content: ' ▾'; }
.dsc-more[open] > summary::after { content: ' ▴'; }
.dsc-steps { margin-top: 4px; }

/* v1.15.90 使用者截圖：「掉落」字框被切掉——地圖列最後一欄寫死 26px → 改成 auto；窄手機（只顯示 ⓘ）維持 22px */
.map-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.map-row .mi { justify-self: end; }
@media (max-width: 420px) { .map-row { grid-template-columns: auto minmax(0, 1fr) auto 22px; } }

/* v1.15.93 建立角色：守護神站在英雄後面（左上俯視、金光），右邊推薦三位神 */
.cls-big { position: relative; isolation: isolate; overflow: hidden; }
.cls-god { position: absolute; inset: -4% -10% auto -14%; height: 78%; z-index: -1; opacity: .55; pointer-events: none; filter: drop-shadow(0 0 24px rgba(241, 210, 122, .45)); animation: cgFloat 6s ease-in-out infinite; }
.cls-god img { width: 100%; height: 100%; object-fit: contain; object-position: left top; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.cls-big::after { content: ''; position: absolute; inset: auto 0 0 0; height: 30%; z-index: -1; background: radial-gradient(ellipse at 50% 100%, rgba(241, 210, 122, .22), transparent 70%); }
@keyframes cgFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .cls-god { animation: none; } }
.cg-box { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.cg-box h4 { margin: 0 0 8px; color: var(--gold-light); font-size: 15px; }
.cg-box h4 small { font-weight: 400; color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.cg-recs { display: grid; gap: 6px; }
.cg-chip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; text-align: left; font: inherit; color: inherit; background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.cg-chip:hover { border-color: var(--gold-dim); }
.cg-chip.on { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .4), 0 0 18px rgba(var(--acc-rgb), .25); background: linear-gradient(90deg, rgba(var(--acc-rgb), .14), var(--sunk)); }
.cg-face { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #0006; border: 1px solid var(--gold-dim); color: var(--gold-light); }
.cg-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cg-t { min-width: 0; }
.cg-t b { display: block; color: var(--gold-light); font-size: 14px; }
.cg-t b i { font-style: normal; font-size: 10.5px; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--gold); color: #1a1408; vertical-align: 1px; }
.cg-t small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.cg-more { margin-top: 6px; }
.cg-more > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.cg-others { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin-top: 6px; }
.cg-others .cg-chip { padding: 4px 6px; gap: 6px; }
.cg-others .cg-face { width: 30px; height: 30px; }
.cg-now { margin: 8px 0 0; font-size: 13px; line-height: 1.5; }
.cg-now b { color: var(--gold-light); }

/* v1.15.94 JOJO 替身風：神站在英雄背後、比英雄大、半透明＋彩色描邊光暈，緩慢呼吸；「ゴゴゴ」 */
.cls-god { inset: -6% -22% 8% -22% !important; height: auto !important; opacity: .62; mix-blend-mode: screen; transform-origin: 50% 70%;
  filter: drop-shadow(0 0 1.5px var(--aura)) drop-shadow(0 0 10px var(--aura)) drop-shadow(0 0 28px var(--aura)) saturate(1.15);
  animation: standIn .7s cubic-bezier(.2, .9, .3, 1.2) both, standBreath 4.5s ease-in-out .7s infinite; }
.cls-god img { object-fit: contain !important; object-position: 50% 0 !important; -webkit-mask-image: linear-gradient(#000 60%, transparent 96%) !important; mask-image: linear-gradient(#000 60%, transparent 96%) !important; }
@keyframes standIn { from { opacity: 0; transform: translate(-6%, 6%) scale(.85); filter: blur(6px) drop-shadow(0 0 30px var(--aura)); } to { opacity: .62; } }
@keyframes standBreath { 0%, 100% { transform: translateY(0) scale(1.08); } 50% { transform: translateY(-6px) scale(1.11); } }
.cls-menace { position: absolute; right: 4%; top: 8%; z-index: 2; display: grid; gap: 2px; pointer-events: none; }
.cls-menace i { font: 900 26px/1 var(--serif); font-style: normal; color: #b67cff; -webkit-text-stroke: 1.5px #1a0826; text-shadow: 2px 2px 0 #1a0826, 0 0 10px rgba(182, 124, 255, .6); transform: skew(-8deg) rotate(-6deg); animation: menace 1.6s ease-in-out infinite; }
.cls-menace i:nth-child(2) { margin-left: 14px; animation-delay: .2s; } .cls-menace i:nth-child(3) { margin-left: 4px; animation-delay: .4s; } .cls-menace i:nth-child(4) { margin-left: 18px; animation-delay: .6s; }
@keyframes menace { 0%, 100% { opacity: .55; transform: skew(-8deg) rotate(-6deg) scale(1); } 50% { opacity: 1; transform: skew(-8deg) rotate(-6deg) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .cls-god, .cls-menace i { animation: none; } }
.cg-stand { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.stand-hex { flex: none; width: 150px; height: auto; }
.stand-hex .sh-ring { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 1; }
.stand-hex text { font-size: 9px; fill: var(--muted); }
.stand-hex .sh-v { font: 900 12px var(--serif); fill: var(--gold-light); }
.cg-sname { font: 900 18px var(--serif); color: var(--gold-light); letter-spacing: .05em; text-shadow: 0 0 10px rgba(var(--acc-rgb), .5); }
.cg-stand .cg-now small { color: var(--muted); margin-left: 4px; }
@media (max-width: 640px) { .cg-stand { flex-direction: column; align-items: stretch; } .stand-hex { width: 170px; margin: 0 auto; } .cls-menace i { font-size: 20px; } }

/* v1.15.96 使用者：JOJO 的「ゴゴゴ」不要（破壞希臘感）→ 拿掉；改成底部石刻希臘文神名＋往上飄的金色光塵 */
.cls-menace { display: none !important; }
.cls-inscr { position: absolute; left: 0; right: 0; bottom: 5%; z-index: 2; text-align: center; pointer-events: none;
  font: 600 clamp(20px, 3.4vw, 34px)/1 'Times New Roman', Georgia, serif; letter-spacing: .32em; text-indent: .32em;
  color: rgba(241, 210, 122, .22); text-shadow: 0 1px 0 rgba(0, 0, 0, .7), 0 -1px 0 rgba(255, 240, 200, .12); animation: inscrIn 1.2s ease both; }
@keyframes inscrIn { from { opacity: 0; letter-spacing: .6em; } to { opacity: 1; } }
.cls-motes { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.cls-motes i { position: absolute; bottom: -6px; width: 3px; height: 3px; border-radius: 50%; background: #ffe6a0; box-shadow: 0 0 6px 2px rgba(255, 220, 140, .55); opacity: 0; animation: mote 7s linear infinite; }
.cls-motes i:nth-child(1) { left: 12%; animation-delay: 0s; } .cls-motes i:nth-child(2) { left: 24%; animation-delay: 1.4s; } .cls-motes i:nth-child(3) { left: 37%; animation-delay: 2.8s; }
.cls-motes i:nth-child(4) { left: 49%; animation-delay: .7s; } .cls-motes i:nth-child(5) { left: 61%; animation-delay: 3.5s; } .cls-motes i:nth-child(6) { left: 72%; animation-delay: 2.1s; }
.cls-motes i:nth-child(7) { left: 84%; animation-delay: 4.2s; } .cls-motes i:nth-child(8) { left: 30%; animation-delay: 5s; } .cls-motes i:nth-child(9) { left: 55%; animation-delay: 5.7s; } .cls-motes i:nth-child(10) { left: 90%; animation-delay: 6.3s; }
@keyframes mote { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translate(18px, -420px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cls-motes { display: none; } .cls-inscr { animation: none; } }
/* 換神時立繪不閃：替身淡入、職業切換時整塊淡入 */
.cls-stage { animation: clsIn .35s ease both; }
@keyframes clsIn { from { opacity: .4; } to { opacity: 1; } }

/* v1.15.98 神降臨公告：跟神器一樣的金色跑馬燈 */
.marquee[data-type="descent"] { color: #ffe7a0; font-weight: 700; background: linear-gradient(90deg, rgba(90,60,10,.95), rgba(140,100,25,.95), rgba(90,60,10,.95)); border-bottom-color: #ffcf8a; text-shadow: 0 0 8px rgba(255, 220, 120, .8); animation: marquee-glow 1.2s ease-in-out infinite alternate; }

/* v1.15.101 角色資料卡：守護神 */
.pf-god { display: flex; align-items: center; gap: 10px; margin: 6px 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); }
.pf-god.full { border-color: var(--gold); box-shadow: 0 0 14px rgba(var(--acc-rgb), .3); }
.pf-god-ic { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--gold-dim); background: #0006; color: var(--gold-light); }
.pf-god-ic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pf-god b { display: block; color: var(--gold-light); }
.pf-god small { color: var(--muted); }

/* v1.15.102 上架：總價自動算（不能直接改） */
.mk-total { margin: 4px 0 2px; padding: 8px 10px; border-radius: 8px; background: var(--sunk); border: 1px solid var(--line); text-align: center; }
.mk-total b { font-size: 18px; color: var(--gold-light); margin: 0 4px; }
.mk-total small { display: block; font-size: 11.5px; }

/* v1.15.103 傷害數字「大」 */
.floater.fx-big { font-size: clamp(18px, 2.9vw, 26px) !important; }
.floater.fx-big.crit { font-size: clamp(22px, 3.4vw, 32px) !important; }

/* v1.15.109 突破任務：供品金額 */
.q-cost { margin: 6px 0; font-size: 14px; }
.q-cost b { color: var(--gold-light); font-size: 16px; margin: 0 3px; }
.q-cost small { margin-left: 4px; }
.q-cost small.bad { color: var(--danger); } .q-cost small.ok { color: var(--ok, #7fbf7f); }

/* v1.15.113 神殿：改拜戰力預估 */
.god-card .fpv { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.god-card .fpv.up { color: var(--ok, #7fbf7f); } .god-card .fpv.dn { color: var(--danger); }

/* v1.15.114 神器掉落：日誌紅字、浮字紅光 */
.log .k-relic { color: #ff5a4a; font-weight: 800; text-shadow: 0 0 6px rgba(255, 70, 50, .55); }
.floater.loot.relic { color: #ff6a50; font-size: clamp(18px, 3vw, 28px); text-shadow: 0 0 10px rgba(255, 80, 40, .9), 0 2px 2px #000; }
/* v1.15.114 確認中的按鈕（例：神殿供奉）字太長會超出 → 可以換行 */
.btn.asking { white-space: normal; height: auto; line-height: 1.35; }
.btn.asking small { display: block; white-space: normal; }

/* v1.15.115 世界王四榜：一排分頁、一次一榜 */
.wb-boards2 { margin: 8px 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); }
.wbt-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.wbt { padding: 5px 4px; font: inherit; font-size: 13px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.wbt small { margin-left: 3px; font-size: 11px; color: var(--gold-light); }
.wbt.on { color: var(--gold-light); border-color: var(--gold-dim); background: rgba(var(--acc-rgb), .12); }
.wbt.me1 small { color: #ffe08a; }
.wbt-desc { margin: 6px 2px 4px; font-size: 12.5px; color: var(--muted); }
.wbt-desc small { margin-left: 6px; color: var(--gold-light); opacity: .85; }
.wbt-list { margin: 0; padding-left: 22px; }
.wbt-list li { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; padding: 1px 0; }
.wbt-list li.me { color: var(--gold-light); font-weight: 700; }
.wb-boards2 .wb-mine { margin: 4px 2px 0; font-size: 12.5px; color: var(--gold-light); }
.wbt-hint { margin: 4px 2px 0; font-size: 11.5px; color: var(--muted); opacity: .85; }

/* ============ v1.16.22 世界王四榜前五名（地圖旁小卡） ============ */
.wb-top5 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 6px 10px 8px; border-top: 1px solid var(--line); font-size: 12px; }
.wt5-col > b { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.wt5-col ol { list-style: none; margin: 0; padding: 0; counter-reset: wt5; }
.wt5-col li { counter-increment: wt5; display: flex; gap: 4px; align-items: baseline; line-height: 1.45; min-width: 0; }
.wt5-col li::before { content: counter(wt5); color: var(--muted); font-size: 10px; width: 9px; flex: none; }
.wt5-col li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt5-col li em { font-style: normal; color: var(--muted); font-size: 11px; }
.wt5-col li.me span { color: var(--gold); font-weight: 700; }
.wt5-me { display: block; color: var(--gold); font-size: 11px; margin-top: 2px; }
@media (max-width: 520px) { .wb-top5 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; } }

/* ============ v1.16.22 木人樁（精簡條件卡＋大結果＋收合比較表） ============ */
.dm-cfg { display: grid; gap: 6px; padding: 10px 12px; background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; }
.dm-row { display: grid; grid-template-columns: 3.2em 1fr; align-items: center; gap: 8px; min-height: 32px; }
.dm-lbl { color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.dm-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.dm-seg button { flex: 0 0 auto; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; line-height: 1.2; }
.dm-seg button:hover { border-color: var(--gold-dim); color: var(--text); }
.dm-seg button.on { border-color: var(--gold); color: #1a1408; background: linear-gradient(var(--gold-light), var(--gold)); font-weight: 600; }
.dm-sel { width: 100%; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel, #121a24); color: var(--text); font: inherit; font-size: 13px; }
.dm-try { font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dm-try small { color: var(--muted); font-size: 11px; }
.dm-go { margin-top: 4px; width: 100%; }
.dm-res { margin-top: 10px; padding: 12px; border: 1px solid var(--gold-dim); border-radius: 12px; background: radial-gradient(120% 90% at 0% 0%, rgba(213, 174, 104, .10), transparent 60%); }
.dm-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 22px; }
.dm-hero > div small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.dm-hero > div b { font-size: 30px; line-height: 1.1; color: var(--gold-light); font-weight: 700; }
.dm-hero > div .dm-d { display: inline-block; margin-left: 6px; font-size: 13px; font-weight: 600; }
.dm-hero p { margin: 0 0 0 auto; text-align: right; font-size: 12px; color: var(--muted); }
.dm-kvs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 8px; }
.dm-kv { padding: 6px 8px; border-radius: 8px; background: var(--sunk); }
.dm-kv small { display: block; color: var(--muted); font-size: 11px; }
.dm-kv b { font-size: 15px; }
.dm-note { margin: 0 0 8px; font-size: 13px; }
.dm-parts { display: grid; gap: 5px; }
.dm-part { display: grid; grid-template-columns: 8.5em 1fr 3.4em; align-items: center; gap: 8px; font-size: 12px; }
.dm-part span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-part i { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--gold), rgba(213, 174, 104, .25)); }
.dm-part.dsc i { background: linear-gradient(90deg, #ffe08a, #fff4c8); box-shadow: 0 0 6px rgba(255, 224, 138, .6); }
.dm-part em { font-style: normal; text-align: right; color: var(--muted); }
.dm-hist { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 4px 10px; }
.dm-hist summary { cursor: pointer; padding: 6px 0; font-size: 14px; }
.dm-hist summary small { color: var(--muted); font-size: 11px; margin-left: 6px; }
.dm-log { display: grid; grid-template-columns: 22px 1fr auto 3.6em 22px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.dm-l-t { min-width: 0; }
.dm-l-t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.dm-l-t small, .dm-log .num small { color: var(--muted); font-size: 11px; }
.dm-l-d { text-align: right; }
.dm-log.base .dm-l-t b { color: var(--gold-light); }
.dm-star, .dm-x { background: none; border: 0; padding: 0; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.dm-log.base .dm-star { color: var(--gold); }
.dm-x:hover { color: var(--danger, #e06c6c); }
.dm-foot { margin-top: 8px; font-size: 11px; }
@media (max-width: 520px) { .dm-kvs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dm-hero p { margin-left: 0; text-align: left; width: 100%; } .dm-part { grid-template-columns: 6.5em 1fr 3em; } }

/* ============ v1.16.22 我的世界王紀錄 ============ */
.wbm-list { display: grid; gap: 6px; }
.wbm-row { display: grid; grid-template-columns: 1.4fr .8fr 1.4fr; gap: 6px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.wbm-row small { display: block; color: var(--muted); font-size: 11px; }
.wbm-row > small.muted { grid-column: 1 / -1; }
@media (max-width: 520px) { .wbm-row { grid-template-columns: 1fr 1fr; } .wbm-row > div:last-of-type { grid-column: 1 / -1; } }

/* ============ v1.16.22 聊天分享的裝備 ============ */
.chat-item { background: none; border: 0; padding: 0 1px; font: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }

/* ============ v1.16.22 一鍵出售：自己挑 ============ */
.sb-list { display: grid; gap: 4px; max-height: 52vh; overflow-y: auto; margin: 6px 0; }
.sb-row { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.sb-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-row em { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; }
.sb-row small { font-size: 11px; }
.sb-chk { width: 16px; height: 16px; flex: none; border: 1.5px solid var(--muted); border-radius: 4px; }
.sb-row.on { border-color: var(--gold); background: rgba(232, 198, 106, .08); }
.sb-row.on .sb-chk { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .35); }

/* ============ v1.16.22 省電模式：黑畫面、停掉動畫 ============ */
#saver { position: fixed; inset: 0; z-index: 9999; background: #000; color: #8a8a8a; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: env(safe-area-inset-top, 0) 16px env(safe-area-inset-bottom, 0); }
#saver[hidden] { display: none; }
#saver .sv-box { display: grid; gap: 6px; text-align: center; font-size: 14px; max-width: 420px; }
#saver .sv-box > b { color: #bfa76a; font-size: 18px; }
#saver .sv-loot { font-size: 12px; color: #777; }
#saver .sv-loot time { display: none; }
#saver small { margin-top: 14px; color: #555; font-size: 12px; }
body.saver *, body.saver *::before, body.saver *::after { animation-play-state: paused !important; transition: none !important; }
body.saver #stage { visibility: hidden; }
.dm-d.ok, .dm-l-d .ok { color: #7fd38a; } .dm-d.bad, .dm-l-d .bad { color: #e47b6e; }

/* ============================================================ v1.17.0 神話戰記：牌面 ============================================================ */
.mc { --w: 180px; --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg; --set: #c9a24a; width: var(--w); aspect-ratio: 5 / 7; perspective: 900px; position: relative; flex: none; font-size: calc(var(--w) / 15); color: #f4ead2; user-select: none; -webkit-user-select: none; }
.mc-s { --w: 104px; } .mc-m { --w: 150px; } .mc-l { --w: min(260px, 70vw); }
.mc-in { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.mc.live .mc-in { transition: transform .08s linear; }
.mc.back .mc-in { transform: rotateY(180deg); }
.mc-face, .mc-back { position: absolute; inset: 0; border-radius: 7% / 5%; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
/* 牌框：普通石、稀有青銅、史詩銀紫、傳說金浮雕 */
.mc-face { --fr: linear-gradient(160deg, #8d8b86, #4c4a46 45%, #7a7771); background: #0c0f14; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .9), inset 0 0 0 calc(var(--w) / 36) transparent; }
.mc-face::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: calc(var(--w) / 30); background: var(--fr); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; z-index: 3; pointer-events: none; }
.r-rare .mc-face { --fr: linear-gradient(160deg, #e0a868, #7a4a22 40%, #c98a4c 70%, #5e3618); }
.r-epic .mc-face { --fr: linear-gradient(160deg, #e6e2ff, #7b62c9 35%, #c8c2ea 60%, #4a3a8c); }
.r-legend .mc-face { --fr: linear-gradient(160deg, #fff4c6, #c9932e 30%, #ffe08a 52%, #8a5a12 78%, #f5d27a); box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .9), 0 0 18px -2px rgba(255, 210, 120, .45); }
.mc.boss .mc-face { --fr: linear-gradient(160deg, #ff9d7a, #8c1f12 40%, #e2603e 65%, #4a0d06); }
.mc-art { position: absolute; inset: 0 0 34% 0; display: grid; place-items: center; font-size: calc(var(--w) / 3); color: rgba(255, 255, 255, .15); background: radial-gradient(120% 90% at 50% 20%, color-mix(in srgb, var(--set) 45%, #1b2230), #0b0f15 75%); }
.mc-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.mc-art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, #0b0f15); }
.mc-cost, .mc-pow { position: absolute; top: 4%; z-index: 4; width: 21%; aspect-ratio: 1; display: grid; place-items: center; font-weight: 800; font-size: 1.55em; line-height: 1; text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, .6); }
.mc-cost { left: 4%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #9fd4ff, #2b67c9 60%, #10306e); box-shadow: 0 0 0 2px rgba(255, 255, 255, .55), 0 2px 6px rgba(0, 0, 0, .6); }
.mc-pow { right: 4%; clip-path: polygon(50% 0, 100% 16%, 92% 70%, 50% 100%, 8% 70%, 0 16%); background: linear-gradient(160deg, #ffcf8a, #c4651c 55%, #6e2c06); }
.mc-plate { position: absolute; inset: auto 0 0 0; height: 37%; z-index: 2; padding: 4% 8% 5%; display: flex; flex-direction: column; align-items: center; text-align: center; background: linear-gradient(#141a24 0%, #0d1118 100%); border-top: 1px solid color-mix(in srgb, var(--set) 60%, transparent); }
.mc-name { font-family: var(--serif); font-size: 1.15em; letter-spacing: .06em; color: #fff3d1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.r-legend .mc-name { background: linear-gradient(#fff6d6, #e8b450); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mc-fx { margin: 3% 0 0; font-size: .74em; line-height: 1.35; color: #d8cfba; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mc-set { font-size: .62em; color: color-mix(in srgb, var(--set) 70%, #fff); letter-spacing: .08em; opacity: .9; }
.mc-s { font-size: calc(var(--w) / 12); } .mc-s .mc-fx { display: none; } .mc-s .mc-set { display: none; } .mc-s .mc-plate { height: 22%; justify-content: center; padding: 2% 6%; } .mc-s .mc-art { inset: 0 0 20% 0; } .mc-s .mc-name { font-size: 1em; }
.mc-qty, .mc-reg, .mc-new { position: absolute; z-index: 5; font-style: normal; font-size: .8em; font-weight: 700; }
.mc-qty { right: 5%; top: 30%; padding: 1px 6px; border-radius: 999px; background: rgba(0, 0, 0, .65); }
.mc-reg { left: 6%; top: 30%; width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center; background: #2f7d4a; color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
.mc-new { left: 50%; top: -3%; transform: translateX(-50%); padding: 1px 8px; border-radius: 999px; background: #e0553b; color: #fff; letter-spacing: .1em; }
/* 反光：一般牌只有一層柔光；閃卡多一層跟著手指移動的彩虹 */
.mc-glare { position: absolute; inset: 0; z-index: 6; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .3s; background: radial-gradient(farthest-corner circle at var(--mx) var(--my), rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .12) 30%, rgba(0, 0, 0, .25) 90%); mix-blend-mode: overlay; }
.mc.live .mc-glare { opacity: 1; }
.mc-shine { position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: inherit; mix-blend-mode: color-dodge; opacity: .28; transition: opacity .3s;
  background: repeating-linear-gradient(115deg, #c23a5c 0%, #c9a23a 7%, #3ac97a 14%, #3a9ac9 21%, #8a3ac9 28%, #c23a5c 35%), repeating-linear-gradient(25deg, rgba(255, 255, 255, .0) 0 3px, rgba(255, 255, 255, .22) 3px 4px);
  background-size: 300% 300%, 100% 100%; background-position: calc(var(--mx) * 1.6) calc(var(--my) * 1.4), 0 0; filter: saturate(1.3) contrast(1.1);
  -webkit-mask: radial-gradient(farthest-corner circle at var(--mx) var(--my), #000 10%, rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .25) 80%); mask: radial-gradient(farthest-corner circle at var(--mx) var(--my), #000 10%, rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .25) 80%); }
.mc.live .mc-shine { opacity: .6; }
.mc.foil:not(.live) .mc-shine { animation: mcSheen 6s ease-in-out infinite; }
@keyframes mcSheen { 0%, 100% { background-position: 0% 30%, 0 0; } 50% { background-position: 100% 70%, 0 0; } }
.mc.foil .mc-face { box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .9), 0 0 16px -2px rgba(160, 220, 255, .5); }
/* 牌背 */
.mc-back { transform: rotateY(180deg); display: grid; place-items: center; align-content: center; gap: 4%; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--set) 55%, #000) 0%, #0d1220 70%); box-shadow: inset 0 0 0 calc(var(--w) / 26) color-mix(in srgb, var(--set) 70%, #000), inset 0 0 0 calc(var(--w) / 18) rgba(255, 230, 170, .25); }
.mc-back span { font-family: var(--serif); font-size: 3em; color: color-mix(in srgb, var(--set) 60%, #fff3d1); text-shadow: 0 0 14px color-mix(in srgb, var(--set) 70%, transparent); }
.mc-back small { font-size: .7em; letter-spacing: .3em; color: rgba(255, 240, 210, .6); }
/* 沒收集到的：只有花費與稀有度的剪影 */
.mc.unk .mc-face { background: repeating-linear-gradient(135deg, #0e131b 0 8px, #111821 8px 16px); }
.mc.unk .mc-face::before { opacity: .35; }
.mc-q { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.4em; color: rgba(255, 255, 255, .18); }
.mc.unk .mc-set { display: block; position: absolute; bottom: 6%; width: 100%; text-align: center; }
@media (prefers-reduced-motion: reduce) { .mc-in { transition: none; } .mc.foil .mc-shine { animation: none; } }

/* ---- 牌冊 ---- */
.cb-head b { font-family: var(--serif); font-size: 18px; color: var(--gold-light); }
.cb-head small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.cb-packs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px; }
.cb-pack { flex: none; display: grid; grid-template-columns: 44px auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; padding: 6px 12px 6px 6px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--set) 60%, var(--line)); background: linear-gradient(120deg, color-mix(in srgb, var(--set) 22%, transparent), transparent); color: var(--text); font: inherit; cursor: pointer; }
.cb-pack-art { grid-row: 1 / 3; width: 44px; height: 58px; border-radius: 6px; overflow: hidden; background: color-mix(in srgb, var(--set) 40%, #000); }
.cb-pack-art img { width: 100%; height: 100%; object-fit: cover; }
.cb-pack small { color: var(--muted); font-size: 11px; }
.cb-sets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0; }
.cb-set { padding: 8px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); color: var(--muted); font: inherit; cursor: pointer; display: grid; gap: 2px; }
.cb-set b { font-family: var(--serif); font-size: 14px; }
.cb-set small { font-size: 11px; }
.cb-set.on { border-color: var(--set); color: #fff3d1; background: linear-gradient(color-mix(in srgb, var(--set) 28%, transparent), transparent); }
.cb-prog { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; font-size: 13px; margin: 4px 0 10px; }
.cb-prog small { color: var(--muted); font-size: 11px; margin-left: 4px; } .cb-prog i.ok { font-style: normal; margin-left: 6px; color: #7fd38a; }
.cb-bar { flex-basis: 100%; height: 5px; border-radius: 3px; background: var(--sunk); overflow: hidden; } .cb-bar em { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-light)); }
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; justify-items: center; }
.cb-cell { background: none; border: 0; padding: 0; cursor: pointer; }
.cb-cell:hover .mc { transform: translateY(-3px); } .cb-cell .mc { transition: transform .2s; }
@media (max-width: 520px) { .cb-sets { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .cb-grid .mc-s { --w: 28vw; } }
/* ---- 單張牌的視窗 ---- */
.mcd { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.mcd-card { display: grid; gap: 8px; justify-items: center; }
.mcd-v { width: 100%; margin: 0; }
.mcd-st { display: grid; gap: 6px; margin: 0 0 10px; } .mcd-st div { display: grid; grid-template-columns: 5em 1fr; gap: 8px; font-size: 13px; } .mcd-st dt { color: var(--muted); } .mcd-st dd { margin: 0; }
.mcd-lore { font-family: var(--serif); color: #cdbf9e; font-size: 13px; line-height: 1.7; border-left: 2px solid var(--gold-dim); padding-left: 10px; margin: 0 0 10px; }
@media (max-width: 620px) { .mcd { grid-template-columns: 1fr; justify-items: center; } .mcd-t { width: 100%; } }
/* ---- 開卡包演出 ---- */
#packfx { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; }
#packfx[hidden] { display: none; }
.pk-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(40, 32, 18, .92), rgba(4, 6, 10, .97) 70%); }
.pk-stage { position: relative; display: grid; justify-items: center; gap: 18px; padding: 20px; max-width: 100vw; }
.pk-pack { position: relative; width: 200px; aspect-ratio: 5 / 7.4; border-radius: 14px; cursor: pointer; overflow: hidden; display: grid; align-content: end; justify-items: center; padding-bottom: 18px; gap: 2px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--set) 70%, #fff) 0%, var(--set) 30%, color-mix(in srgb, var(--set) 40%, #000) 100%); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .9), 0 0 40px -6px color-mix(in srgb, var(--set) 70%, transparent); animation: pkFloat 2.4s ease-in-out infinite; }
.pk-art { position: absolute; inset: 9% 9% 30%; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 2px rgba(255, 240, 200, .5); background: #0b0f15; }
.pk-art img { width: 100%; height: 100%; object-fit: cover; }
.pk-pack b { position: relative; font-family: var(--serif); font-size: 22px; color: #fff6dc; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); letter-spacing: .1em; }
.pk-pack small { position: relative; color: rgba(255, 245, 220, .8); letter-spacing: .3em; font-size: 11px; }
.pk-tear { position: absolute; left: 0; right: 0; top: 6%; height: 2px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .7) 0 6px, transparent 6px 10px); }
.pk-pack.torn { animation: pkTear .45s ease-in forwards; }
@keyframes pkFloat { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-8px) rotate(1.5deg); } }
@keyframes pkTear { 0% { transform: scale(1); } 40% { transform: scale(1.06) rotate(-3deg); } 100% { transform: translateY(-60vh) rotate(-18deg) scale(.8); opacity: 0; } }
.pk-tip { color: rgba(255, 240, 210, .7); letter-spacing: .2em; font-size: 13px; margin: 0; }
.pk-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; max-width: min(900px, 96vw); }
.pk-row.many { gap: 8px; }
.pk-card { background: none; border: 0; padding: 0; cursor: pointer; opacity: 0; transform: translateY(40px) scale(.9); animation: pkIn .5s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: var(--d); }
@keyframes pkIn { to { opacity: 1; transform: none; } }
.pk-card.open.r-epic .mc-face { box-shadow: 0 0 0 2px rgba(200, 180, 255, .6), 0 0 30px 4px rgba(150, 120, 255, .55); }
.pk-card.open.r-legend .mc-face { box-shadow: 0 0 0 2px rgba(255, 230, 160, .8), 0 0 40px 8px rgba(255, 200, 90, .6); }
.pk-card.burst { position: relative; }
.pk-card.burst::after { content: ""; position: absolute; inset: -40%; z-index: -1; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 10deg, rgba(255, 220, 140, .55) 10deg 14deg, transparent 14deg 30deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 65%); mask: radial-gradient(circle, #000 20%, transparent 65%); animation: pkRays 3s linear infinite; }
@keyframes pkRays { to { transform: rotate(360deg); } }
.pk-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .pk-pack, .pk-card, .pk-card.burst::after { animation: none; opacity: 1; transform: none; } }

/* ============ v1.17.0 木人樁：兩套比較＋長條圖 ============ */
.dm-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dm-kind { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--sunk); color: var(--muted); font: inherit; cursor: pointer; }
.dm-kind i { font-style: normal; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 17px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--text); }
.dm-kind b { font-size: 15px; color: var(--text); } .dm-kind small { font-size: 11px; text-align: center; }
.dm-kind.on { border-color: var(--gold); background: linear-gradient(rgba(213, 174, 104, .16), transparent); } .dm-kind.on i { background: linear-gradient(var(--gold-light), var(--gold)); color: #1a1408; border-color: var(--gold); }
.dm-sets { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin: 10px 0; }
.dm-set { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); display: grid; gap: 4px; align-content: start; font-size: 13px; }
.dm-set > small { color: var(--muted); font-size: 11px; }
.dm-set.a { border-left: 4px solid #b9a27a; } .dm-set.b { border-left: 4px solid #5aa6e6; } .dm-set.b .btn { justify-self: start; }
.dm-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.dm-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border-radius: 999px; background: rgba(90, 166, 230, .12); border: 1px solid rgba(90, 166, 230, .35); font-size: 12px; }
.dm-tgt { margin: 0 0 8px; font-size: 13px; color: var(--text); } .dm-tgt small { color: var(--muted); font-size: 11px; }
.dm-cmp { margin-bottom: 10px; }
.dm-cmp-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 4px; } .dm-cmp-h .dm-d { font-weight: 600; }
.dm-bar { position: relative; display: grid; grid-template-columns: 1.4em 1fr auto; align-items: center; gap: 6px; height: 24px; margin: 3px 0; font-size: 12px; }
.dm-bar i { grid-column: 2; grid-row: 1; height: 16px; border-radius: 4px; min-width: 3px; transition: width .4s; }
.dm-bar.a i { background: linear-gradient(90deg, #8f7a55, #d6bd8a); } .dm-bar.b i { background: linear-gradient(90deg, #2f6aa6, #6fbdf5); }
.dm-bar span { grid-column: 1; grid-row: 1; font-weight: 700; color: var(--muted); } .dm-bar em { grid-column: 3; grid-row: 1; font-style: normal; min-width: 4.5em; text-align: right; }
.dm-kvs2 .dm-kv b { font-size: 13px; font-weight: 500; line-height: 1.5; }
.dm-verdict { margin: 8px 0 0; font-size: 14px; text-align: center; padding: 8px; border-radius: 8px; background: var(--sunk); }
@media (max-width: 520px) { .dm-sets { grid-template-columns: 1fr; } .dm-kvs2 { grid-template-columns: 1fr; } }
/* v1.17.0 木人樁：左邊身上、右邊想比的（一格一列） */
.dm-eqs { margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dm-eq { display: grid; grid-template-columns: 3.6em 1fr 1fr; gap: 8px; align-items: center; padding: 5px 10px; font-size: 13px; border-top: 1px solid var(--line); }
.dm-eq:first-child { border-top: 0; }
.dm-eq-h { background: var(--sunk); font-size: 12px; color: var(--muted); padding: 7px 10px; } .dm-eq-h span:nth-child(2) { color: #d6bd8a; } .dm-eq-h span:nth-child(3) { color: #6fbdf5; display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.dm-eq-s { color: var(--muted); font-size: 12px; }
.dm-eq-a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-eq .dm-sel { min-width: 0; width: 100%; padding: 4px 6px; font-size: 13px !important; height: 30px; }
.dm-eq.chg { background: rgba(90, 166, 230, .08); } .dm-eq.chg .dm-sel { border-color: #5aa6e6; color: #cfe8ff; }
@media (max-width: 520px) { .dm-eq { grid-template-columns: 3.2em 1fr; } .dm-eq .dm-sel { grid-column: 2; } .dm-eq-h span:nth-child(3) { grid-column: 2; } }


/* ============================================================ v1.17.3 神話戰記：對戰（重做） ============================================================ */
body.duel-on { overflow: hidden; }
.dc { --cw: 56px; position: relative; width: var(--cw); aspect-ratio: 5 / 7; border-radius: 7px; overflow: hidden; flex: none; background: #0b0f15; box-shadow: 0 3px 8px rgba(0, 0, 0, .65); }
.dc::before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; box-shadow: inset 0 0 0 2px #77736b; pointer-events: none; }
.dc.r-rare::before { box-shadow: inset 0 0 0 2px #c48a4c; } .dc.r-epic::before { box-shadow: inset 0 0 0 2px #a993ea; } .dc.r-legend::before { box-shadow: inset 0 0 0 2px #f0c862, inset 0 0 8px rgba(255, 210, 120, .5); }
.dc-art { position: absolute; inset: 0; background: radial-gradient(circle at 50% 30%, #2a3346, #0b0f15); }
.dc-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.dc-c, .dc-p { position: absolute; z-index: 3; top: 3px; min-width: 18px; height: 18px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000; }
.dc-c { left: 3px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #a8d8ff, #2b67c9 65%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.dc-p { right: 3px; padding: 0 4px; clip-path: polygon(50% 0, 100% 18%, 92% 72%, 50% 100%, 8% 72%, 0 18%); background: linear-gradient(#ffb15a, #9a4612); min-width: 20px; height: 21px; }
.dc-p.up { background: linear-gradient(#7ee08f, #1d7a3a); } .dc-p.dn { background: linear-gradient(#ff8a7a, #8a1d1d); }
.dc-n { position: absolute; z-index: 3; inset: auto 0 0; padding: 8px 2px 2px; font-size: 9px; text-align: center; color: #fff3d1; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc.hid .dc-art { background: radial-gradient(circle at 50% 40%, #3a2c14, #120d06 75%); } .dc.hid .dc-art img, .dc.hid .dc-p { display: none; }
.dc.hid .dc-art::after { content: "Ω"; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(240, 200, 98, .55); font-family: var(--serif); font-size: 22px; }
.dc.pend { opacity: .6; outline: 2px dashed #8fd0ff; outline-offset: 1px; }
.dc.rv { animation: dcRv .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--rv); }
@keyframes dcRv { 0% { transform: perspective(300px) rotateY(90deg) scale(.7); filter: brightness(2.2); } 55% { transform: perspective(300px) rotateY(0) scale(1.18); filter: brightness(1.4); } 100% { transform: none; filter: none; } }

/* ---- 大廳 ---- */
.dl-hero { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; overflow: hidden; background: radial-gradient(120% 120% at 0% 0%, rgba(213, 174, 104, .25), transparent 60%), linear-gradient(135deg, #1a1408, #0d1118); border: 1px solid var(--gold-dim); }
.dl-deck { position: relative; height: 150px; margin-left: 22px; }
.dl-deck > span { position: absolute; left: calc(var(--i) * 34px); top: calc(abs(var(--i) - 2) * 6px); transform: rotate(calc((var(--i) - 2) * 6deg)); transform-origin: 50% 120%; }
.dl-deck .mc { --w: 92px; }
.dl-cta { display: grid; gap: 8px; justify-items: stretch; min-width: 120px; }
.dl-play { font-size: 18px; padding: 12px 18px; letter-spacing: .2em; }
.dl-cta small { color: var(--muted); font-size: 11px; text-align: center; }
.dl-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.dl-how div { padding: 8px; border-radius: 10px; background: var(--sunk); border: 1px solid var(--line); }
.dl-how b { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--gold-light); }
.dl-how i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--gold); color: #1a1408; }
.dl-how small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); line-height: 1.45; }
.dl-h { margin: 14px 0 8px; font-size: 15px; color: var(--gold-light); font-family: var(--serif); } .dl-h small { font-family: inherit; font-size: 11px; color: var(--muted); margin-left: 6px; }
.dl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dl-st { position: relative; display: grid; grid-template-columns: 50px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(213, 174, 104, .35); color: #fff4d8; font: inherit; text-align: left; cursor: pointer;
  background: linear-gradient(90deg, rgba(8, 10, 14, .92) 30%, rgba(8, 10, 14, .55)), var(--bg) center / cover; transition: transform .15s, border-color .15s; }
.dl-st:hover { transform: translateY(-2px); border-color: var(--gold); }
.dl-no { position: absolute; left: 6px; top: 4px; font-size: 10px; color: var(--gold); }
.dl-av { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold-dim); background: #1b2230; }
.dl-av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.dl-t b { display: block; font-family: var(--serif); font-size: 15px; } .dl-t small { display: block; color: #cdbf9e; font-size: 11px; }
.dl-r { text-align: center; } .dl-r em { display: block; font-style: normal; font-size: 10px; color: #1a1408; background: var(--gold-light); border-radius: 999px; padding: 1px 6px; } .dl-r small { font-size: 10px; color: #e4d6b2; } .dl-r i { font-style: normal; color: #7fd38a; font-size: 20px; }
.dl-st.done { border-color: rgba(127, 211, 138, .4); }
@media (max-width: 560px) { .dl-list { grid-template-columns: 1fr; } .dl-hero { grid-template-columns: 1fr; } .dl-deck { height: 120px; margin: 0 auto; width: 230px; } .dl-deck .mc { --w: 76px; } .dl-deck > span { left: calc(var(--i) * 36px); } }
/* 組牌 */
.dk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dk-curve { display: flex; gap: 6px; align-items: flex-end; height: 60px; padding: 0 4px; }
.dk-curve span { display: grid; justify-items: center; gap: 2px; } .dk-curve i { display: block; width: 14px; min-height: 2px; border-radius: 3px 3px 0 0; background: linear-gradient(var(--gold-light), var(--gold-dim)); } .dk-curve small { font-size: 10px; color: var(--muted); }
.dk-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; margin: 10px 0; border-radius: 12px; background: var(--sunk); border: 1px solid var(--line); }
.dk-row .mc, .dk-pool .mc { --w: 74px; }
.dk-empty { width: 74px; aspect-ratio: 5 / 7; border-radius: 6px; border: 1px dashed var(--line); }
.dk-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; justify-items: center; }
.dk-c { background: none; border: 0; padding: 0; cursor: pointer; transition: transform .15s; } .dk-c:hover { transform: translateY(-3px); }
.dk-c.in { opacity: .35; }

/* ---- 對局 ---- */
#duel { position: fixed; inset: 0; z-index: 8000; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: radial-gradient(ellipse at 50% 45%, rgba(120, 86, 34, .35), transparent 65%), linear-gradient(#17110a, #0a0806); }
#duel[hidden] { display: none; }
.dd-wrap { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 100%; max-width: 820px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 8px) 8px calc(env(safe-area-inset-bottom, 0px) + 8px); color: #f2e6c8; }
.dd-top { display: grid; grid-template-columns: 1fr auto auto 36px; align-items: center; gap: 8px; }
.dd-who { display: flex; align-items: center; gap: 8px; min-width: 0; } .dd-who b { display: block; font-family: var(--serif); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dd-who small { color: #a8987a; font-size: 11px; }
.dd-av { width: 38px; height: 38px; flex: none; border-radius: 50%; overflow: hidden; border: 2px solid #a33a2a; background: #2a1a12; } .dd-av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.dd-turn { display: grid; justify-items: center; line-height: 1; } .dd-turn small { font-size: 10px; color: #a8987a; } .dd-turn b { font-size: 22px; color: #ffd98a; font-family: var(--serif); } .dd-turn i { font-style: normal; font-size: 12px; color: #a8987a; }
.dd-score { display: flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .45); } .dd-score small { font-size: 9px; color: #a8987a; } .dd-score b { font-size: 16px; } .dd-score .me { color: #ffd98a; } .dd-score .op { color: #ff9b8a; }
.dd-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(240, 200, 98, .4); background: rgba(0, 0, 0, .4); color: #e8d5a8; font-size: 16px; cursor: pointer; }
.dd-tip { margin: 0; padding: 8px 12px; border-radius: 10px; text-align: center; font-size: 13px; color: #fff3d1; background: linear-gradient(90deg, transparent, rgba(213, 174, 104, .22), transparent); border-top: 1px solid rgba(213, 174, 104, .3); border-bottom: 1px solid rgba(213, 174, 104, .3); min-height: 36px; }
.dd-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dd-loc { display: grid; grid-template-rows: auto auto auto; gap: 6px; padding: 6px 4px; border-radius: 14px; transition: background .2s, box-shadow .2s; }
.dd-loc.tgt { cursor: pointer; background: rgba(143, 208, 255, .08); box-shadow: 0 0 0 2px rgba(143, 208, 255, .6), 0 0 18px rgba(143, 208, 255, .25); animation: ddPulse 1.2s ease-in-out infinite; }
@keyframes ddPulse { 50% { box-shadow: 0 0 0 2px rgba(143, 208, 255, .9), 0 0 26px rgba(143, 208, 255, .45); } }
.dd-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; justify-items: center; }
.dd-cards .dc { --cw: min(60px, 13.5vw); }
.dd-slot { width: min(60px, 13.5vw); aspect-ratio: 5 / 7; border-radius: 7px; border: 1px dashed rgba(240, 200, 98, .14); }
.dd-c { background: none; border: 0; padding: 0; cursor: pointer; }
.dd-tile { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 104px; padding: 18px 6px; border-radius: 12px; text-align: center; overflow: visible;
  background: linear-gradient(rgba(12, 9, 4, .35), rgba(12, 9, 4, .78)), var(--bg, linear-gradient(#2a2418, #17130c)) center / cover; border: 1px solid rgba(240, 200, 98, .55); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .35), 0 6px 16px rgba(0, 0, 0, .6); }
.dd-loc.off .dd-tile { background: repeating-linear-gradient(135deg, #1a150d 0 8px, #15110a 8px 16px); border-style: dashed; }
.dd-ln b { font-family: var(--serif); font-size: 14px; letter-spacing: .06em; text-shadow: 0 1px 4px #000; } .dd-ln small { display: block; margin-top: 2px; font-size: 10.5px; line-height: 1.35; color: #f0e2bd; text-shadow: 0 1px 3px #000; }
.dd-s { position: absolute; left: 50%; transform: translateX(-50%); min-width: 34px; height: 26px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; font-size: 16px; background: #1d1810; border: 1px solid rgba(240, 200, 98, .4); color: #cdbf9e; }
.dd-s.op { top: -13px; } .dd-s.me { bottom: -13px; }
.w-me .dd-s.me { background: linear-gradient(#ffe08a, #c9871e); color: #241500; border-color: #fff0c0; box-shadow: 0 0 12px rgba(255, 200, 90, .7); }
.w-op .dd-s.op { background: linear-gradient(#ff8a7a, #a3271a); color: #fff; border-color: #ffc0b0; box-shadow: 0 0 12px rgba(255, 90, 70, .6); }
.w-me .dd-tile { box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .35), 0 6px 16px rgba(0, 0, 0, .6), 0 10px 24px -6px rgba(255, 200, 90, .55); }
.w-op .dd-tile { box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .35), 0 6px 16px rgba(0, 0, 0, .6), 0 -10px 24px -6px rgba(255, 90, 70, .45); }
.dd-lock { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 10px; background: #7a1d1d; padding: 1px 6px; border-radius: 4px; }
.dd-bot { position: sticky; bottom: 0; display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-top: auto; padding: 8px 4px calc(env(safe-area-inset-bottom, 0px) + 4px); background: linear-gradient(transparent, rgba(10, 8, 6, .96) 22%); }
.dd-en { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; align-content: center; color: #fff; background: radial-gradient(circle at 35% 30%, #a8d8ff, #2b67c9 60%, #10306e); box-shadow: 0 0 0 2px rgba(255, 255, 255, .55), 0 0 18px rgba(80, 160, 255, .55); }
.dd-en b { font-size: 24px; line-height: 1; } .dd-en small { font-size: 9px; }
.dd-hand { display: flex; gap: 6px; overflow-x: auto; padding: 14px 2px 4px; scrollbar-width: none; }
.dd-h { background: none; border: 0; padding: 0; cursor: pointer; transition: transform .15s; flex: none; }
.dd-h .mc { --w: 74px; }
.dd-h.sel { transform: translateY(-12px); } .dd-h.sel .mc-face { box-shadow: 0 0 0 3px #8fd0ff, 0 0 18px rgba(143, 208, 255, .7); }
.dd-h.no { filter: grayscale(.8) brightness(.55); }
.dd-end { min-width: 96px; display: grid; gap: 2px; padding: 10px 12px; } .dd-end small { font-size: 10px; opacity: .8; font-weight: 400; }
.dd-peek { position: fixed; inset: 0; z-index: 8100; display: grid; place-items: end center; background: rgba(0, 0, 0, .55); padding: 16px; }
.dd-peek-in { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; max-width: 520px; width: 100%; padding: 14px; border-radius: 16px; background: #120e08; border: 1px solid var(--gold-dim); animation: pkIn .25s both; }
.dd-peek-in .mc { --w: 130px; } .dd-peek-in b { font-family: var(--serif); font-size: 20px; color: #ffe7a8; } .dd-peek-in p { margin: 6px 0; font-size: 15px; color: #fff3d1; line-height: 1.5; } .dd-peek-in small { display: block; font-size: 12px; color: #b9a882; margin-top: 4px; }
.dd-guide { position: fixed; inset: 0; z-index: 8100; display: grid; place-items: center; background: rgba(0, 0, 0, .65); padding: 20px; }
.dd-guide-in { max-width: 360px; padding: 20px; border-radius: 16px; text-align: center; background: linear-gradient(#1d160b, #0f0b06); border: 1px solid var(--gold); box-shadow: 0 20px 60px rgba(0, 0, 0, .8); }
.dd-guide-in b { font-family: var(--serif); color: var(--gold-light); font-size: 18px; } .dd-guide-in p { font-size: 15px; line-height: 1.6; margin: 12px 0 16px; color: #fff3d1; }
.dd-guide-in i { font-style: normal; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #1a1408; margin-right: 6px; font-size: 13px; }
.dd-res { position: fixed; inset: 0; z-index: 8100; display: grid; place-items: center; background: rgba(0, 0, 0, .6); padding: 20px; }
.dd-res-in { min-width: 260px; padding: 24px 22px; border-radius: 18px; text-align: center; background: linear-gradient(#1d160b, #0f0b06); border: 1px solid var(--gold-dim); box-shadow: 0 20px 60px rgba(0, 0, 0, .85); animation: pkIn .45s both; }
.dd-res-in > b { display: block; font-family: var(--serif); font-size: 40px; letter-spacing: .3em; padding-left: .3em; }
.dd-res.win .dd-res-in > b { background: linear-gradient(#fff6d6, #e8b450); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 12px rgba(255, 200, 90, .5)); }
.dd-res.lose .dd-res-in > b { color: #e47b6e; } .dd-res.draw .dd-res-in > b { color: #cdbf9e; }
.dd-res-in > small { color: #a8987a; } .dd-rw { margin: 14px 0 4px; color: #cdbf9e; font-size: 13px; } .dd-rw b { color: #ffe7a8; font-size: 18px; }
@media (min-width: 720px) { .dd-cards .dc, .dd-slot { --cw: 64px; width: 64px; } .dd-h .mc { --w: 92px; } .dd-tile { min-height: 124px; } .dd-ln b { font-size: 16px; } .dd-ln small { font-size: 12px; } }
@media (max-width: 380px) { .dd-tile { min-height: 96px; padding: 16px 3px; } .dd-ln small { font-size: 9.5px; } }

/* ============ v1.17.4 神話戰記：地點改成直式場景牌、電腦版右邊說明欄 ============ */
.dd-wrap { max-width: 1120px; }
.dd-main { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
.dd-side { display: none; }
@media (min-width: 1000px) and (pointer: fine) {
  .dd-main { grid-template-columns: minmax(0, 1fr) 250px; }
  .dd-side { display: grid; gap: 10px; justify-items: center; position: sticky; top: 8px; padding: 14px; border-radius: 14px; background: linear-gradient(#1a140b, #0e0b07); border: 1px solid rgba(213, 174, 104, .35); min-height: 380px; align-content: start; }
  .dd-side .mc { --w: 190px; }
  .dd-side-t { text-align: center; } .dd-side-t b { font-family: var(--serif); font-size: 18px; color: #ffe7a8; } .dd-side-t p { margin: 6px 0; font-size: 14px; color: #fff3d1; line-height: 1.5; } .dd-side-t small { font-size: 12px; color: #b9a882; }
  .dd-side-empty { color: #cdbf9e; font-size: 13px; line-height: 1.6; } .dd-side-empty b { font-family: var(--serif); color: #ffe7a8; font-size: 16px; } .dd-side-empty ul { padding-left: 18px; margin: 6px 0; } .dd-side-empty li b { font-size: 13px; }
}
.dd-board { max-width: 760px; margin: 0 auto; width: 100%; }
.dd-loc { justify-items: center; }
/* 地點：一張直式的場景牌（寬度跟兩張牌一樣），名字是上方緞帶、效果是下方石板 */
.dd-tile { width: min(100%, 150px); aspect-ratio: 4 / 4.6; min-height: 0; padding: 0; display: grid; grid-template-rows: auto 1fr auto; justify-items: stretch; align-content: stretch; border-radius: 12px;
  background: var(--bg, linear-gradient(#2a2418, #17130c)) center / cover; border: 2px solid #c9a25a; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .5), 0 8px 18px rgba(0, 0, 0, .7); }
.dd-tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .55)); pointer-events: none; }
.dd-ln { position: relative; z-index: 1; margin: 18px -8px 0; padding: 4px 8px; text-align: center; background: linear-gradient(90deg, transparent, #7a1f14 12%, #a8321f 50%, #7a1f14 88%, transparent); box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.dd-ln b { font-size: 13px; color: #fff3d1; letter-spacing: .08em; }
.dd-lt { position: relative; z-index: 1; grid-row: 3; margin: 0 6px 18px; padding: 5px 6px; border-radius: 6px; font-size: 10.5px; line-height: 1.35; color: #f6ead0; text-align: center; background: rgba(14, 10, 6, .82); border: 1px solid rgba(213, 174, 104, .45); }
.dd-lback { grid-row: 1 / 4; display: grid; place-items: center; align-content: center; gap: 4px; background: radial-gradient(circle at 50% 40%, #3a2c14, #120d06 75%); border-radius: 10px; }
.dd-lback i { font-style: normal; font-family: var(--serif); font-size: 34px; color: rgba(240, 200, 98, .6); } .dd-lback small { font-size: 11px; color: #cdbf9e; }
.dd-loc.off .dd-tile { border-style: solid; border-color: rgba(201, 162, 90, .35); filter: none; }
.dd-s { z-index: 2; }
.dd-loc.tgt { box-shadow: none; background: none; animation: none; }
.dd-loc.tgt .dd-tile { border-color: #8fd0ff; box-shadow: 0 0 0 3px rgba(143, 208, 255, .55), 0 0 26px rgba(143, 208, 255, .45); animation: ddPulse2 1.1s ease-in-out infinite; cursor: pointer; }
.dd-loc.tgt .dd-cards.me .dd-slot { border-color: rgba(143, 208, 255, .5); }
@keyframes ddPulse2 { 50% { box-shadow: 0 0 0 3px rgba(143, 208, 255, .9), 0 0 36px rgba(143, 208, 255, .6); } }
.dd-cards { width: min(100%, 150px); }
.dd-slot { border-color: rgba(240, 200, 98, .08); }
@media (min-width: 720px) { .dd-tile { width: 150px; } .dd-cards .dc, .dd-slot { --cw: 64px; width: 64px; } }
.dd-tip { font-size: 14px; }
/* v1.17.6 自動出牌、教學關 */
.dd-btns { display: grid; gap: 6px; justify-items: stretch; }
.dd-auto { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; } .dd-auto .btn { padding: 4px 6px; font-size: 12px; } .dd-auto .btn.on { border-color: #8fd0ff; color: #cfe8ff; background: rgba(143, 208, 255, .15); }
.dd-board.n1 { grid-template-columns: minmax(0, 220px); justify-content: center; } .dd-board.n2 { grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: center; }
.dd-h.hint .mc-face { box-shadow: 0 0 0 3px #ffd98a, 0 0 22px rgba(255, 210, 120, .8); animation: ddHint 1s ease-in-out infinite; }
@keyframes ddHint { 50% { box-shadow: 0 0 0 3px #fff0c0, 0 0 34px rgba(255, 210, 120, 1); } }
.dl-st.tut { grid-column: 1 / -1; border-color: var(--gold); background: linear-gradient(90deg, rgba(60, 44, 14, .95) 30%, rgba(8, 10, 14, .55)), var(--bg) center / cover; }
.dl-st.tut .dl-no { color: #1a1408; background: var(--gold-light); padding: 0 6px; border-radius: 4px; }
/* v1.17.7 牌冊標題列：標題靠左、對戰按鈕靠右，不擠在一起 */
.cb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.cb-head > b { font-size: 20px; letter-spacing: .08em; }
.cb-head .btn { padding: 8px 18px; font-size: 14px; letter-spacing: .1em; }
.cb-head + .hint, .cb-head + .cb-packs { margin-top: 4px; }
/* v1.17.8 牌局改成視窗：旁邊半透明看得到遊戲，點旁邊縮小成右下角一顆按鈕 */
#duel { background: rgba(4, 3, 2, .55); padding: 1.5vh 12px; cursor: zoom-out; }
#duel .dd-wrap { cursor: auto; min-height: 0; max-width: 1080px; border-radius: 18px; border: 1px solid rgba(213, 174, 104, .45); box-shadow: 0 24px 80px rgba(0, 0, 0, .85);
  background: radial-gradient(ellipse at 50% 40%, rgba(120, 86, 34, .35), transparent 65%), linear-gradient(#17110a, #0a0806); padding: 10px 12px; }
.dd-tb { display: flex; gap: 6px; } .dd-top { grid-template-columns: 1fr auto auto auto; }
#duel.min { inset: auto 16px calc(env(safe-area-inset-bottom, 0px) + 84px) auto; padding: 0; background: none; overflow: visible; cursor: auto; }
.dd-pill { display: grid; gap: 2px; text-align: left; padding: 10px 16px; border-radius: 14px; cursor: pointer; color: #fff3d1; font: inherit;
  background: linear-gradient(#2a1f10, #120d06); border: 1px solid var(--gold); box-shadow: 0 10px 30px rgba(0, 0, 0, .7), 0 0 18px rgba(255, 200, 90, .25); animation: pkIn .3s both; }
.dd-pill b { font-family: var(--serif); color: var(--gold-light); font-size: 15px; } .dd-pill small { font-size: 12px; color: #cdbf9e; }
@media (max-width: 560px) { #duel { padding: 0; } #duel .dd-wrap { border-radius: 0; border: 0; min-height: 100%; } }

/* ============ v1.18.0 畫風選擇（史詩寫實／Q 版可愛） ============ */
.style-pick { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; margin-top: 12px; }
.sty-l { font-size: 13px; color: var(--muted); }
.sty-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sty { display: grid; gap: 2px; padding: 10px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--sunk); color: var(--text); font: inherit; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.sty b { font-size: 15px; } .sty small { font-size: 11px; color: var(--muted); }
.sty-epic[aria-checked="true"] { border-color: var(--gold); background: linear-gradient(rgba(213, 174, 104, .18), transparent); }
.sty-q b { font-family: var(--sans); letter-spacing: .05em; }
.sty-q[aria-checked="true"] { border-color: #f4a6c8; background: linear-gradient(135deg, rgba(255, 182, 213, .22), rgba(182, 220, 255, .14)); }
.sty-q[aria-checked="true"] b { color: #ffd0e4; }
.sty-q:hover { border-color: #f4a6c8; }

/* ============================================================ v1.18.4 奧德賽世界 Q：介面（B 方案：深色粉彩）
   只在 html[data-artstyle="q"] 生效（後台開關打開、玩家選了 Q 版；管理員可以先預覽）。
   字：粉圓（Huninn，Google Fonts；載不到就用思源黑體）；外型：大圓角、膠囊按鈕、按下去 Q 彈；裝飾：回紋換成小星星
   ============================================================ */
html[data-artstyle="q"] {
  --serif: "Huninn", "jf-openhuninn", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --sans: "Huninn", "jf-openhuninn", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --radius: 14px;
}
html[data-artstyle="q"] body { background-image: radial-gradient(circle at 12% 18%, rgba(255, 214, 232, .10) 0 1.5px, transparent 2px), radial-gradient(circle at 72% 64%, rgba(190, 230, 255, .09) 0 1.5px, transparent 2px), radial-gradient(circle at 40% 85%, rgba(255, 240, 190, .08) 0 1.2px, transparent 1.8px); background-size: 180px 180px, 240px 240px, 300px 300px; background-attachment: fixed; }
html[data-artstyle="q"] :is(h1, h2, h3, h4, b, strong) { font-weight: 400; letter-spacing: .04em; }
html[data-artstyle="q"] .btn { border-radius: 999px; transition: transform .12s cubic-bezier(.3, 1.6, .5, 1), filter .15s; }
html[data-artstyle="q"] .btn:active:not(:disabled) { transform: scale(.93); }
html[data-artstyle="q"] .btn.primary { box-shadow: 0 3px 0 rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .45); }
html[data-artstyle="q"] :is(.box, .auth-card, dialog, .pop, .dd-wrap, .dm-eqs, .cb-pack, .dl-st, .dl-hero, .dd-tile, .sty) { border-radius: 18px; }
html[data-artstyle="q"] .auth-card { border-top-width: 1px; box-shadow: 0 10px 40px rgba(255, 158, 199, .12); }
html[data-artstyle="q"] :is(input, select, textarea) { border-radius: 12px; }
html[data-artstyle="q"] .seg-tabs, html[data-artstyle="q"] .seg-tabs button { border-radius: 999px; }
/* 回紋 → 一排小星星 */
html[data-artstyle="q"] .meander { height: 12px; opacity: .8; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M12 1.5l1.6 3.3 3.6.5-2.6 2.5.6 3.6L12 9.7l-3.2 1.7.6-3.6-2.6-2.5 3.6-.5z' fill='%23fff'/%3E%3C/svg%3E") repeat-x left center / 24px 12px; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M12 1.5l1.6 3.3 3.6.5-2.6 2.5.6 3.6L12 9.7l-3.2 1.7.6-3.6-2.6-2.5 3.6-.5z' fill='%23fff'/%3E%3C/svg%3E") repeat-x left center / 24px 12px; }
html[data-artstyle="q"] .title-block h1 { letter-spacing: .1em; text-shadow: 0 3px 0 rgba(163, 92, 126, .55), 0 0 22px rgba(255, 158, 199, .35); }
html[data-artstyle="q"] .title-block .sub { letter-spacing: .2em; }
/* v1.18.8 奧德賽世界 Q：登入、選角背景換 Q 版（網址由 app.js 放進 --q-login、--q-login-wide）；遮罩改成淡淡的紫，圖比較亮 */
html[data-artstyle="q"] :is(.screen-center, .auth-screen) { background:
  linear-gradient(180deg, rgba(21, 17, 42, 0) 0%, rgba(21, 17, 42, .12) 40%, rgba(21, 17, 42, .62) 80%, rgba(21, 17, 42, .82) 100%),
  var(--q-login, url("/assets/ui/login_bg.webp")) center top / cover no-repeat, var(--bg); }
@media (min-aspect-ratio: 4/5) {
  html[data-artstyle="q"] :is(.screen-center, .auth-screen) { background:
    linear-gradient(180deg, rgba(21, 17, 42, .05) 0%, rgba(21, 17, 42, .25) 50%, rgba(21, 17, 42, .7) 100%),
    var(--q-login-wide, none) center / cover no-repeat,
    var(--q-login, url("/assets/ui/login_bg.webp")) center top / auto 100% no-repeat,
    radial-gradient(ellipse at 50% 30%, #3a2f6e, #15112a 70%); }
}

/* ============ v1.18.10 手機開包：牌左右相反、看到背面的 Ω、背景、關不掉 ============
   1. iPhone 的 Safari 遇到有遮罩（mask）、動畫中的父層時，backface-visibility 會失效 → 正面反著疊在背面上。
      改成翻到一半時直接把看不到的那一面藏起來（不靠 backface-visibility）
   2. 牌太多時整個畫面比螢幕高、又不能捲 → 按鈕跑到外面關不掉：可以捲、按鈕固定在下面、右上角一定有 ✕；手機一排三張 */
.mc-face { visibility: visible; transition: visibility 0s linear .22s; }
.mc.back .mc-face { visibility: hidden; }
.mc-back { visibility: hidden; transition: visibility 0s linear .22s; }
.mc.back .mc-back { visibility: visible; }
#packfx { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; place-items: start center; }
.pk-bg { position: fixed; }
.pk-stage { margin: auto 0; min-height: 100%; align-content: center; padding: calc(env(safe-area-inset-top, 0px) + 56px) 12px calc(env(safe-area-inset-bottom, 0px) + 96px); box-sizing: border-box; }
.pk-acts { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 12px 12px calc(env(safe-area-inset-bottom, 0px) + 12px); background: linear-gradient(transparent, rgba(4, 6, 10, .95) 35%); }
.pk-x { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 12px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 240, 210, .4); background: rgba(0, 0, 0, .55); color: #fff3d1; font-size: 18px; cursor: pointer; }
@media (max-width: 560px) { .pk-row { gap: 8px; } .pk-row .mc { --w: min(150px, 29vw); } }

/* ============ v1.18.13 裝備組合、背包排序、鐵匠一頁搞定（神賜、卷軸兌換） ============ */
.gs-box { margin-top: 12px; }
.gs-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n acts" "m acts"; gap: 2px 10px; align-items: center; padding: 8px 10px; margin-top: 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); }
.gs-row.on { border-color: var(--gold-dim); background: linear-gradient(90deg, rgba(213, 174, 104, .12), transparent); }
.gs-row .gs-n { grid-area: n; justify-self: start; background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; } .gs-row .gs-n small { color: var(--muted); font-weight: 400; }
.gs-row > .muted { grid-area: m; font-size: 12px; } .gs-acts { grid-area: acts; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.gs-row.empty .gs-n { cursor: default; color: var(--muted); }
.bag-sort { margin-left: 6px; } .bag-sort button { font-size: 12px; padding: 3px 9px; }
.forge-ex { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--line); font-size: 13px; }
.forge-ex small { margin-left: 4px; }
.forge-dv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 10px 0; padding: 10px; border-radius: 12px; border: 1px solid rgba(157, 134, 224, .35); background: linear-gradient(90deg, rgba(157, 134, 224, .10), transparent); }
.forge-dv-st { display: grid; gap: 2px; font-size: 14px; } .forge-dv-st small { font-size: 12px; } .forge-dv .pop-actions { margin: 0; }
@media (max-width: 520px) { .forge-dv { grid-template-columns: 1fr; } .gs-row { grid-template-columns: 1fr; grid-template-areas: "n" "m" "acts"; } .gs-acts { justify-content: flex-start; } }
/* v1.18.14 守護神分頁、改拜用哪套裝備比 */
.tp-tabs { margin-bottom: 10px; } .tp-tabs button { flex: 1; }
.fpv-sets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; } .fpv-sets .lbl { font-size: 13px; color: var(--muted); }
.fpv-sets .seg-tabs button { font-size: 12px; padding: 4px 10px; }
/* v1.18.16 木人樁：用哪位神算（恩寵滿級） */
.dm-gods { margin: 10px 0 4px; } .dm-gods .lbl { display: block; font-size: 13px; margin-bottom: 6px; } .dm-gods .lbl small { color: var(--muted); font-size: 11px; }
.dm-gchips { display: flex; gap: 6px; flex-wrap: wrap; }
.dm-g { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--sunk); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.dm-g:first-child { padding-left: 10px; }
.dm-g.on { border-color: var(--gold); background: linear-gradient(rgba(213, 174, 104, .18), transparent); color: var(--gold-light); }
.dm-gav { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; background: #1b2230; display: inline-block; } .dm-gav img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.dm-gtag { color: var(--gold-light); font-weight: 600; }
/* v1.18.17 世界王小卡：只寫我在四榜的名次＋看四榜按鈕 */
.wbm { display: grid; gap: 6px; margin-top: 6px; }
.wbm-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.wbm-c { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--sunk); color: var(--muted); }
.wbm-c b { color: var(--text); } .wbm-c.top { border-color: var(--gold-dim); color: var(--gold-light); } .wbm-c.top b { color: var(--gold-light); }
.wbm-go { justify-self: stretch; }
/* v1.18.18 木人樁打首領：四榜模擬 */
.dm-4b { margin: 6px 0 12px; padding: 10px; border-radius: 12px; border: 1px solid var(--gold-dim); background: linear-gradient(rgba(213, 174, 104, .08), transparent); }
.dm-4b-h { margin: 0 0 8px; font-weight: 600; } .dm-4b-h small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; margin-top: 2px; }
.dm-4b-g { display: grid; grid-template-columns: auto repeat(2, minmax(0, 1fr)); gap: 6px 10px; align-items: center; font-size: 13px; }
.dm-4b-g.two { grid-template-columns: auto repeat(3, minmax(0, 1fr)); }
.dm-4b-g > .h { font-size: 11px; color: var(--muted); }
.dm-4b-n { display: grid; } .dm-4b-n small { font-size: 10px; color: var(--muted); }
.dm-4b-g b { margin-right: 4px; } .dm-4b-g small.num { color: var(--muted); }
/* v1.18.21 木人樁：左右各選神、右邊套用組合、紀錄排版 */
.dm-hd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dm-gsel { font-size: 12px !important; padding: 3px 6px; height: 28px; max-width: 100%; }
.dm-eq-sets { grid-template-columns: 1fr !important; } .dm-sets-q { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; } .dm-sets-q small { color: var(--muted); }
.dm-log2 { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; } .dm-log2:first-of-type { border-top: 0; }
.dm-log2 b { color: var(--gold-light); } .dm-log-b { font-size: 11px; }
.dm-eq-h .dm-hd { justify-content: flex-start !important; display: flex !important; }
/* v1.19.0 能力值改版說明 */
.ap-respec { display: grid; gap: 6px; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; border: 1px solid var(--gold-dim); background: linear-gradient(90deg, rgba(213, 174, 104, .14), transparent); }
.ap-respec b { color: var(--gold-light); } .ap-respec small { color: var(--text); font-size: 12px; line-height: 1.5; } .ap-respec .pop-actions { margin: 0; justify-content: flex-start; }
.dm-dsc { font-size: 12px; color: var(--muted); } .dm-dsc b.ok { color: #7fd38a; }
/* v1.19.4 木人樁結果：左右兩欄對照表（左＝金、右＝藍，跟長條、欄頭同色） */
.dmc { display: grid; gap: 4px; margin: 8px 0 10px; }
.dmc-row { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) minmax(0, 1fr) 7.5em; gap: 6px; align-items: stretch; }
.dmc-row.one { grid-template-columns: 6.5em minmax(0, 1fr); }
.dmc-k { display: grid; align-content: center; font-size: 13px; font-weight: 600; } .dmc-k small { font-weight: 400; font-size: 10px; color: var(--muted); }
.dmc-v { position: relative; display: grid; align-content: center; gap: 3px; padding: 6px 8px; border-radius: 8px; background: var(--sunk); border: 1px solid transparent; font-size: 13px; overflow: hidden; }
.dmc-v i { display: block; height: 5px; border-radius: 3px; }
.dmc-v.a { border-left: 4px solid #c9a86a; } .dmc-v.a i { background: linear-gradient(90deg, #8f7a55, #d6bd8a); }
.dmc-v.b { border-left: 4px solid #5aa6e6; } .dmc-v.b i { background: linear-gradient(90deg, #2f6aa6, #6fbdf5); }
.dmc-v.win.a { background: rgba(214, 189, 138, .14); border-color: rgba(214, 189, 138, .55); border-left-color: #d6bd8a; }
.dmc-v.win.b { background: rgba(111, 189, 245, .14); border-color: rgba(111, 189, 245, .55); border-left-color: #6fbdf5; }
.dmc-v em { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 4px; }
.dmc-v.a em { background: #d6bd8a; color: #241a08; } .dmc-v.b em { background: #6fbdf5; color: #08202f; }
.dmc-w { display: grid; align-content: center; text-align: center; font-size: 12px; color: var(--muted); }
.dmc-w.a { color: #e3c98f; font-weight: 600; } .dmc-w.b { color: #8fd0ff; font-weight: 600; }
.dmc-h .dmc-v { background: none; padding: 2px 8px; } .dmc-h .dmc-v b { font-size: 13px; } .dmc-h .dmc-v small { font-size: 11px; color: var(--muted); }
.dmc-h .dmc-v.a b { color: #e3c98f; } .dmc-h .dmc-v.b b { color: #8fd0ff; }
.dmc-ta { color: #e3c98f; } .dmc-tb { color: #8fd0ff; }
@media (max-width: 520px) { .dmc-row { grid-template-columns: 4.8em minmax(0, 1fr) minmax(0, 1fr); } .dmc-row .dmc-w { grid-column: 2 / 4; text-align: right; padding-right: 4px; } .dmc-h .dmc-w { display: none; } }
/* v1.19.14 裝備上的神（一個字）：跟守護神一樣＝亮金，其他＝灰 */
.cell, .eq-card .cell-ic { position: relative; }
.c-god { position: absolute; left: 2px; bottom: 2px; min-width: 15px; height: 15px; padding: 0 2px; border-radius: 4px; font-size: 10px; line-height: 15px; text-align: center; font-weight: 700; background: rgba(20, 22, 30, .85); color: #9aa3b5; border: 1px solid rgba(255, 255, 255, .18); pointer-events: none; z-index: 2; }
.c-god.on { background: linear-gradient(#f3d58a, #c99a3e); color: #2a1a00; border-color: #ffe7a6; box-shadow: 0 0 6px rgba(243, 213, 138, .7); }
html[data-artstyle="q"] .c-god { border-radius: 8px; }
.cell.worn .c-god { left: 20px; }
/* v1.19.23 LOGO 圖：有圖就藏文字標題、徽記 */
.title-block .logo-img { display: block; width: min(420px, 82vw); height: auto; margin: 0 auto 4px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.title-block.has-logo h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.title-block.has-logo .emblem { display: none; }

/* v1.19.23 存到桌面（App 模式）：底部分頁列下面的安全區留太多 → 少留一點（還是避開 iPhone 的橫條） */
@media (display-mode: standalone) and (max-width: 1099px) {
  .tabs { padding-bottom: max(4px, calc(env(safe-area-inset-bottom, 0px) - 14px)) !important; }
}
/* v1.19.24 跟神對談（制式） */
.gt-box { display: grid; gap: 8px; }
.gt-head { display: flex; gap: 10px; align-items: center; } .gt-head small { display: block; font-size: 12px; }
.gt-av { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; background: var(--sunk); border: 1px solid var(--gold-dim); } .gt-av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.gt-qs { display: flex; flex-wrap: wrap; gap: 6px; }
.gt-say { display: grid; gap: 6px; } .gt-q { margin: 0; text-align: right; font-size: 13px; color: var(--muted); }
.gt-a { position: relative; padding: 10px 12px; border-radius: 4px 14px 14px 14px; background: linear-gradient(rgba(213, 174, 104, .12), rgba(213, 174, 104, .04)); border: 1px solid var(--gold-dim); font-size: 14px; line-height: 1.6; }
.gt-a > b { display: block; color: var(--gold-light); font-size: 12px; margin-bottom: 2px; } .gt-a p { margin: 2px 0; }
.gt-hi, .gt-bye { font-style: italic; color: var(--gold-light); }
.book-tabs { margin: 0 0 10px; } .book-tabs button { flex: 1; }   /* v1.19.26 圖鑑裡的兩本 */
/* v1.19.27 邀請朋友 */
.inv-box { display: grid; gap: 10px; }
.inv-cv { width: 100%; max-width: 420px; height: auto; aspect-ratio: 1080 / 1350; justify-self: center; border-radius: 12px; border: 1px solid var(--gold-dim); background: #111; }
.inv-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; } .inv-ctl select { max-width: 60vw; }
.inv-text { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--sunk); font-size: 13px; line-height: 1.6; }
.inv-acts { flex-wrap: wrap; } .inv-tiers { margin: 4px 0 6px; padding-left: 18px; font-size: 13px; line-height: 1.7; }
/* v1.19.30 主畫面「🎁 邀請」、邀請朋友說明 */
.inv-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--gold-dim); background: linear-gradient(90deg, rgba(243, 197, 90, .25), rgba(243, 197, 90, .08)); color: var(--gold-light); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; animation: invPulse 3s ease-in-out infinite; }
.inv-chip i { font-style: normal; font-size: 14px; }
@keyframes invPulse { 0%, 100% { box-shadow: 0 0 0 rgba(243, 197, 90, 0); } 50% { box-shadow: 0 0 10px rgba(243, 197, 90, .55); } }
@media (prefers-reduced-motion: reduce) { .inv-chip { animation: none; } }
.inv-hero { display: grid; gap: 10px; padding: 16px; margin-bottom: 12px; border-radius: 16px; border: 1px solid var(--gold-dim); background: radial-gradient(circle at 50% 0%, rgba(243, 197, 90, .22), transparent 70%), var(--panel); text-align: center; }
.inv-hero h3 { margin: 0; font-size: 22px; color: var(--gold-light); } .inv-hero > p { margin: 0; font-size: 14px; }
.inv-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0; padding: 0; list-style: none; }
.inv-steps li { display: grid; gap: 4px; padding: 10px 6px; border-radius: 10px; background: var(--sunk); font-size: 13px; line-height: 1.4; } .inv-steps b { font-size: 20px; color: var(--gold-light); }
.inv-gifts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; text-align: left; }
.inv-gift { padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14); background: var(--sunk); }
.inv-gift.big { border-color: var(--gold); background: linear-gradient(rgba(243, 197, 90, .16), rgba(243, 197, 90, .04)); }
.inv-gh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; } .inv-gh b { font-size: 16px; color: var(--gold-light); } .inv-gh small { color: var(--muted); }
.inv-gl { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.inv-g { display: grid; justify-items: center; gap: 2px; text-align: center; } .inv-g b { font-size: 13px; } .inv-g small { font-size: 10px; color: var(--muted); line-height: 1.2; }
.inv-gi { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: rgba(0, 0, 0, .25); overflow: hidden; font-size: 22px; } .inv-gi img { width: 100%; height: 100%; object-fit: contain; }
.inv-me { margin: 0; font-size: 13px; color: var(--muted); } .inv-me b { color: var(--gold-light); }
@media (max-width: 520px) { .inv-chip b { display: none; } .inv-chip { padding: 0 8px; } .inv-steps { grid-template-columns: 1fr; } }
/* v1.19.31 使用者截圖：上方多了「🎁 邀請」把左上角擠爆（金幣、戰力被切掉）→ 邀請改成跟信箱一樣大的小圓鈕（只有 🎁），不再擠 */
.inv-chip { width: 28px; height: 26px; padding: 0 !important; justify-content: center; gap: 0; margin-left: 6px; flex: none; }
.inv-chip b { display: none !important; }
.plate .pg-acct .inv-chip { height: 24px; width: 30px; margin: 0; }
.pg-acct { min-width: 0; flex-wrap: nowrap; }
/* v1.19.31 電腦版：邀請放左欄（世界王卡片下面），上方小圓鈕藏起來；手機版用上方小圓鈕 */
.plate-inv { display: none; }
@media (min-width: 1100px) {
  .plate .pg-acct .inv-chip, .inv-chip { display: none; }
  .plate-inv { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; width: calc(100% - 0px); margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--gold-dim); background: linear-gradient(90deg, rgba(243, 197, 90, .2), rgba(243, 197, 90, .05)); color: var(--text); font: inherit; text-align: left; cursor: pointer; animation: invPulse 3s ease-in-out infinite; }
  .plate-inv i { font-style: normal; font-size: 22px; } .plate-inv b { display: block; color: var(--gold-light); font-size: 14px; } .plate-inv small { color: var(--muted); font-size: 11px; } .plate-inv em { font-style: normal; color: var(--gold-light); font-size: 18px; }
  .plate-inv:hover { background: linear-gradient(90deg, rgba(243, 197, 90, .3), rgba(243, 197, 90, .08)); }
}
/* v1.19.42 組牌：每張下面寫號令 */
.dk-filter { margin: 6px 0 8px; } .dk-filter button { flex: 1; }
.dk-pool .dk-cx { display: grid; grid-template-rows: auto 1fr; gap: 4px; align-content: start; }
.dk-fx { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; line-height: 1.35; text-align: left; color: var(--text); padding: 0 2px; }
.dk-fx b { display: block; font-size: 12px; color: var(--gold-light); } .dk-fx i { font-style: normal; color: var(--muted); }
.dk-pool { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); justify-items: stretch; }
.dk-pool .dk-cx > :first-child { justify-self: center; }
.dk-pool .dk-cx { padding: 6px 4px; border-radius: 10px; background: var(--sunk); border: 1px solid transparent; } .dk-pool .dk-cx.in { border-color: var(--gold-dim); }
.gp-f { margin: 0 0 8px; flex-wrap: wrap; } .gp-f button small { opacity: .7; }   /* v1.19.54 */
/* v1.19.55 背包工具列：一排放得下（只顯示能用的｜排序下拉｜一鍵出售、倉庫、商店） */
.bag-sort-sel { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.bag-sort-sel select { height: 28px; padding: 0 22px 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--sunk); color: var(--text); font: inherit; font-size: 13px; }
@media (max-width: 760px) {
  .toolbar:has(.bag-sort-sel) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
  .toolbar .chk.mine small { display: none; }
  .toolbar:has(.bag-sort-sel) .acts { margin-left: auto; display: flex; gap: 6px; }
  .toolbar:has(.bag-sort-sel) .acts .btn { padding: 4px 10px; font-size: 13px; }
  .bag-sort-sel > span { display: none; }
}
/* v1.19.59 公告、跑馬燈裡的九神神器：紅色（跟神器框、掉落紀錄一樣） */
.ann-item.rar-relic, .marquee .ann-item.rar-relic { color: #ff5a4a; text-shadow: 0 0 6px rgba(255, 70, 50, .45); }
/* v1.19.60 公會 */
.g-create, .g-don { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .g-create input { flex: 1; min-width: 160px; }
.g-don label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; } .g-don input { width: 120px; }
.g-list, .g-members { display: grid; gap: 6px; }
.g-row, .g-mem { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--sunk); }
.g-row small, .g-mem small { display: block; font-size: 12px; color: var(--muted); }
.g-lv { display: inline-block; padding: 0 8px; border-radius: 999px; background: rgba(243, 197, 90, .18); color: var(--gold-light); font-size: 12px; font-weight: 700; }
.g-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; } .g-title b { font-size: 20px; color: var(--gold-light); } .g-title small { color: var(--muted); }
.g-bar { position: relative; height: 22px; margin: 10px 0 6px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.g-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #c99a3e, #f3d58a); } .g-bar span { position: relative; display: block; text-align: center; font-size: 12px; line-height: 22px; color: var(--text); text-shadow: 0 1px 2px #000; }
.g-notice { margin: 6px 0; font-size: 14px; } .g-staff { display: flex; gap: 12px; align-items: center; margin: 6px 0 0; }
.g-auras { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.g-aura { display: grid; gap: 2px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--sunk); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.g-aura b { color: var(--gold-light); } .g-aura span { font-size: 13px; } .g-aura em { font-style: normal; font-size: 11px; color: #7fe08a; }
.g-aura.on { border-color: var(--gold); background: linear-gradient(rgba(243, 197, 90, .2), rgba(243, 197, 90, .05)); box-shadow: 0 0 10px rgba(243, 197, 90, .25); }
.g-aura:disabled { cursor: default; opacity: .92; }
.g-chat { max-height: 260px; overflow-y: auto; } .g-sys { color: var(--gold-light); font-size: 13px; }
.g-dot { width: 8px; height: 8px; border-radius: 50%; background: #555; flex: none; } .g-dot.on { background: #6fdc7a; box-shadow: 0 0 6px #6fdc7a; }
.g-mem > div { flex: 1; min-width: 0; } .g-ops { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
/* v1.19.62 使用者截圖：公會標題那塊擠成一排（「開放加入」直排、經驗條的字被切）→ 一行一行往下排 */
.box.g-head { display: block; }
.g-head .g-title, .g-head .g-bar, .g-head .g-notice, .g-head .g-staff { width: 100%; }
.g-bar { height: auto; min-height: 22px; }
.g-bar span { padding: 2px 10px; line-height: 1.5; white-space: normal; }
.g-staff { flex-wrap: wrap; }
.g-staff .chk { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.g-dons { display: grid; gap: 4px; max-height: 220px; overflow-y: auto; font-size: 13px; } .g-dons time { color: var(--muted); margin-right: 6px; }
.g-mode { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; } .g-mode select { height: 30px; border-radius: 8px; } .g-apps { border-color: var(--gold-dim); }
/* v1.19.80 版面設定最上面：畫風像選桌布，左右兩張大圖 */
.wall-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wall { position: relative; display: grid; padding: 0; overflow: hidden; border-radius: 16px; border: 2px solid var(--line); background: var(--sunk); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.wall:hover { transform: translateY(-2px); }
.wall-img { display: block; aspect-ratio: 1200 / 630; background-size: cover; background-position: center; }
.wall-t { display: grid; gap: 2px; padding: 10px 12px 12px; } .wall-t b { font-size: 16px; } .wall-t small { font-size: 12px; color: var(--muted); }
.wall.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(243, 197, 90, .25), 0 8px 22px rgba(0, 0, 0, .35); }
.wall em { position: absolute; top: 8px; right: 8px; padding: 3px 10px; border-radius: 999px; font-style: normal; font-size: 12px; font-weight: 700; background: var(--gold); color: #1a1206; }
html[data-artstyle="q"] .wall.on { border-color: #ffb3d4; } html[data-artstyle="q"] .wall em { background: #ffb3d4; color: #3a1d4a; }
@media (max-width: 420px) { .wall-t b { font-size: 14px; } .wall-t small { font-size: 11px; } }
/* v1.19.85 LINE／Google 登入、綁定 */
.oauth-row { display: grid; gap: 8px; margin: 10px 0 4px; }
.oauth-or { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
.oauth-btn { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 12px; font-weight: 700; text-decoration: none; }
.oauth-btn.line { background: #06c755; color: #fff; border-color: #06c755; }
.oauth-btn.google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.bind-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bind-line { color: #06c755; } .bind-google { color: #8ab4f8; }
.attr-eff { display: block; margin-top: 2px; font-style: normal; color: var(--gold-light); font-size: 12px; }   /* v1.19.90 */
.limits-box { margin: 6px 0 0; font-size: 13px; } .limits-box summary { cursor: pointer; color: var(--gold-light); } .limits-box ul { margin: 6px 0 0 18px; display: grid; gap: 3px; }
.mech { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0; font-size: 14px; } .mech dt { font-weight: 700; color: var(--gold-light); white-space: nowrap; } .mech dd { margin: 0; } @media (max-width: 520px) { .mech { grid-template-columns: 1fr; } .mech dd { margin-bottom: 6px; } }   /* v1.19.92 */
.ap-msg { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: rgba(111, 220, 122, .14); border: 1px solid rgba(111, 220, 122, .5); color: #9fe8a8; font-weight: 600; } .ap-msg.bad { background: rgba(255, 90, 74, .12); border-color: rgba(255, 90, 74, .55); color: #ffb3a8; }   /* v1.19.96 */
/* v1.19.107 第一次用 LINE／Google 登入：綁舊帳號或建新帳號 */
.onew { display: grid; gap: 12px; max-width: 420px; }
.onew-box { border: 1px solid var(--line, rgba(255,255,255,.15)); border-radius: 10px; padding: 12px; display: grid; gap: 8px; }
.onew-box h3 { margin: 0; font-size: 1rem; }
.onew-box .hint { margin: 0; }
.onew-box input { width: 100%; box-sizing: border-box; padding: 8px 10px; }
#onew-err:empty { display: none; }
/* v1.19.108 App 內建瀏覽器不能用 Google 登入的提示 */
.oauth-hint { display: block; font-size: .85em; opacity: .8; padding: 6px 0; text-align: center; }
/* v1.19.133 神器欄的星階 */
.eq-nm .star-lv { color: #ffd27a; font-weight: 700; letter-spacing: 1px; }
#hud-gold { white-space: nowrap; }
/* v1.19.134 金幣完整數字不被切掉：那一格不縮小、不截斷，必要時字小一點 */
.plate-gold, .pg-gold, #hud-gold { overflow: visible; text-overflow: clip; min-width: max-content; }
@media (max-width: 1099px) { #hud-gold { font-size: clamp(11px, 3.2vw, 14px); letter-spacing: -0.2px; } }
/* v1.19.134 玩家（奶油賢者）：手牌太小看不到字 → 放大（手機四張約佔畫面一半寬以上），可以左右滑 */
.dd-h .mc { --w: clamp(96px, 23vw, 132px); }
.dd-hand { gap: 8px; }
