/* v1.21.152 特洛伊之夜 第三版：深夜藍＋古金，希臘回紋；手機優先 */
:root {
  --gold: #ecc879; --gold-2: #b98f40; --gold-3: #7a5b24; --ink: #070a12; --ink-2: #0e1422; --ink-3: #172033; --line: rgba(236,200,121,.28);
  --parch: #f1e6cf; --mist: #a3acbd; --faint: #6f7889; --red: #e2563f; --blue: #6fb4ff; --ok: #7fe3a0;
  --r-normal: #d8d2c4; --r-magic: #6fb4ff; --r-rare: #ffd35a; --r-unique: #ff8a4c; --r-legend: #ff3b3b;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif; --sans: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--parch); font-family: var(--sans); overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
img.noimg { visibility: hidden; }
canvas#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
[hidden] { display: none !important; }
.coin-ic { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin: 0 3px 0 8px; background: url(/assets-q/ui/coin.webp) center / contain no-repeat, url(/assets/ui/coin.webp) center / contain no-repeat; }
.muted { color: var(--mist); } .small { font-size: 12px; }

/* ---------------- 按鈕 ---------------- */
.btn { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 26px; border-radius: 12px; border: 1px solid #f5dc9c; background: linear-gradient(180deg, #f6dd9b, #d3a24c 55%, #b8862f); color: #1d1406; font: 700 17px/1 var(--serif); letter-spacing: .14em; box-shadow: 0 6px 18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.55); transition: transform .12s, filter .12s; }
.btn:hover { filter: brightness(1.07); } .btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { filter: grayscale(.7) brightness(.6); cursor: default; }
.btn.ghost { background: rgba(10,14,24,.55); color: var(--gold); border-color: var(--line); box-shadow: none; }
.btn.small { min-height: 36px; padding: 0 16px; font-size: 14px; }
.btn.big { min-height: 58px; padding: 0 44px; font-size: 21px; letter-spacing: .3em; }
.btn:focus-visible, .tabs button:focus-visible, .card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.iconbtn { cursor: pointer; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(0,0,0,.4); color: var(--gold); font-size: 18px; }

/* ---------------- 讀取 ---------------- */
.loading { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; text-align: center; gap: 10px; background: radial-gradient(ellipse at 50% 40%, #121a2c, #05070c 70%); transition: opacity .4s; }
.loading b { font: 900 40px/1.1 var(--serif); color: var(--gold); letter-spacing: .12em; }
.loading span { color: var(--mist); font-size: 14px; letter-spacing: .2em; }
.loading.out { opacity: 0; pointer-events: none; }

/* ---------------- 局內 HUD ---------------- */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.xpbar { position: absolute; top: 0; left: 0; right: 0; height: 7px; background: rgba(0,0,0,.65); }
.xpbar > i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #3d9bff, #a58cff, #ff9ad8); box-shadow: 0 0 12px rgba(160,150,255,.85); transition: width .15s; }
.hud-l { position: absolute; left: 10px; top: calc(14px + var(--safe-t)); display: flex; gap: 10px; align-items: flex-start; }
.lvb { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: radial-gradient(circle at 50% 35%, #3a2c16, #120d07); border: 2px solid var(--gold); box-shadow: 0 0 14px rgba(236,200,121,.4), inset 0 0 10px rgba(0,0,0,.6); }
.lvb small { font-size: 9px; letter-spacing: .2em; color: var(--gold-2); line-height: 1; }
.lvb b { font: 900 20px/1 var(--serif); color: var(--gold); }
.hpbox { padding-top: 4px; }
.bar { position: relative; height: 14px; border-radius: 7px; background: rgba(0,0,0,.6); overflow: hidden; border: 1px solid rgba(236,200,121,.35); width: min(250px, 44vw); }
.bar > i { position: absolute; inset: 0 auto 0 0; width: 0; }
.bar.hp > i { background: linear-gradient(180deg, #ff7b5c, #b8331f); transition: width .12s; }
.bar span { position: absolute; inset: 0; font: 700 10px/14px var(--sans); text-align: center; color: #fff; text-shadow: 0 1px 2px #000; }
.owned { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; max-width: min(280px, 48vw); }
.owned span { position: relative; width: 30px; height: 30px; border-radius: 8px; background: radial-gradient(circle at 50% 40%, rgba(60,46,24,.92), rgba(10,8,6,.92)); border: 1px solid rgba(236,200,121,.45); display: grid; place-items: center; overflow: hidden; }
.owned span.p { border-color: rgba(150,190,255,.5); background: radial-gradient(circle at 50% 40%, rgba(30,44,70,.92), rgba(8,10,16,.92)); }
.owned span.evo { border-color: #ff9a4a; box-shadow: 0 0 8px rgba(255,140,60,.8); }
.owned img { width: 86%; height: 86%; object-fit: contain; }
.owned b { position: absolute; right: 2px; bottom: 0; font: 900 10px/1.2 var(--serif); color: var(--gold); text-shadow: 0 0 3px #000, 0 0 3px #000; }
.plaque { position: absolute; left: 50%; transform: translateX(-50%); top: calc(14px + var(--safe-t)); text-align: center; padding: 4px 18px 6px; border-radius: 12px; background: linear-gradient(180deg, rgba(30,22,12,.86), rgba(10,7,4,.86)); border: 1px solid rgba(236,200,121,.45); }
.plaque span { display: block; font: 900 24px/1.1 var(--serif); color: var(--parch); letter-spacing: .08em; }
.plaque small { font-size: 11px; color: var(--mist); letter-spacing: .06em; white-space: nowrap; } .plaque small b { color: var(--gold); }
.bossbar { position: absolute; left: 50%; top: calc(78px + var(--safe-t)); transform: translateX(-50%); width: min(540px, 84vw); text-align: center; animation: bossIn .5s ease-out; }
.bossbar b { display: block; font: 700 15px/1.4 var(--serif); color: #ffb39d; text-shadow: 0 0 6px #000, 0 0 2px #000; letter-spacing: .1em; }
.bossbar .bar { width: 100%; height: 12px; border-color: rgba(255,130,100,.6); }
.bossbar .bar > i { background: linear-gradient(90deg, #7a160c, #e2563f, #ff9a7a); transition: width .2s; }
@keyframes bossIn { from { opacity: 0; transform: translate(-50%, -8px); } }
.ultbtn { pointer-events: auto; cursor: pointer; position: absolute; right: 16px; bottom: calc(70px + var(--safe-b)); width: 82px; height: 82px; border-radius: 50%; border: 0; padding: 0; background: radial-gradient(circle at 50% 40%, #241a30, #08060c); overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.6); }
.ultbtn img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); border-radius: 50%; object-fit: cover; object-position: 50% 15%; filter: grayscale(.85) brightness(.55); transition: filter .3s; }
.ultbtn svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ultbtn .trk { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 6; }
.ultbtn .val { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: 289; transition: stroke-dashoffset .2s; }
.ultbtn b { position: absolute; left: 0; right: 0; bottom: 8px; font: 900 13px/1 var(--serif); color: #fff; text-shadow: 0 0 4px #000, 0 0 4px #000; letter-spacing: .1em; }
.ultbtn.ready img { filter: none; } .ultbtn.ready { animation: ultPulse 1.2s ease-in-out infinite; }
@keyframes ultPulse { 50% { box-shadow: 0 0 0 4px rgba(236,200,121,.4), 0 0 30px rgba(236,200,121,.75); } }
.pausebtn { pointer-events: auto; cursor: pointer; position: absolute; right: 12px; top: calc(14px + var(--safe-t)); width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(236,200,121,.4); background: rgba(0,0,0,.45); color: var(--gold); font-size: 14px; }
@media (max-width: 640px) {
  .plaque { left: auto; right: 58px; transform: none; padding: 3px 10px 4px; } .plaque span { font-size: 19px; }
  .bossbar { top: calc(92px + var(--safe-t)); }
  .ultbtn { width: 74px; height: 74px; right: 14px; bottom: calc(26px + var(--safe-b)); }
}

/* ---------------- 首領登場、大招 ---------------- */
.cutin { position: fixed; inset: 0; z-index: 8; pointer-events: none; display: grid; align-items: center; background: rgba(0,0,0,.2); animation: fadeIO .8s ease forwards; }   /* 12-03 流暢度：切入演出 1.1→0.8 秒、背景淡一點（遊戲不再停住，看得到底下） */
.cutin-band { position: relative; height: min(220px, 34vh); display: flex; align-items: center; gap: 18px; padding: 0 6vw; background: linear-gradient(90deg, rgba(0,0,0,.9), rgba(30,18,10,.85) 40%, rgba(0,0,0,.9)); border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold); overflow: hidden; animation: bandIn 1.1s cubic-bezier(.2,.8,.2,1) forwards; }
.cutin-band img { height: 150%; align-self: flex-start; margin-top: -8%; filter: drop-shadow(0 0 18px rgba(255,220,140,.6)); animation: heroSlide .8s cubic-bezier(.2,.8,.2,1) forwards; }
.cutin-tx small { display: block; font-size: 14px; letter-spacing: .5em; color: var(--gold-2); }
.cutin-tx b { display: block; font: 900 clamp(32px, 8vw, 64px)/1.1 var(--serif); color: var(--gold); letter-spacing: .12em; text-shadow: 0 0 22px rgba(236,200,121,.5); }
.cutin.boss .cutin-band { border-color: #e2563f; background: linear-gradient(90deg, rgba(0,0,0,.92), rgba(60,10,6,.88) 40%, rgba(0,0,0,.92)); }
.cutin.boss .cutin-tx b { color: #ffb39d; text-shadow: 0 0 22px rgba(255,90,60,.6); }
.cutin.boss .cutin-band img { height: 120%; margin-top: -4%; filter: drop-shadow(0 0 18px rgba(255,80,50,.7)); }
.cutin-band img { flex: 0 0 auto; max-width: 48%; object-fit: contain; }
.cutin-tx { min-width: 0; } .cutin-tx b { white-space: nowrap; }
@media (max-width: 600px) { .cutin-band { height: 190px; gap: 10px; padding: 0 16px; } .cutin-band img { height: 125%; max-width: 46%; } .cutin-tx small { font-size: 12px; letter-spacing: .3em; } .cutin-tx b { font-size: clamp(26px, 9vw, 40px); white-space: normal; } }
@keyframes fadeIO { 0% { opacity: 0; } 12% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; } }
@keyframes bandIn { 0% { transform: scaleY(0); } 15% { transform: scaleY(1); } 85% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
@keyframes heroSlide { 0% { transform: translateX(-40%); opacity: 0; } 20% { transform: translateX(0); opacity: 1; } 80% { transform: translateX(4%); } 100% { transform: translateX(10%); opacity: 0; } }

/* ---------------- 覆蓋視窗（升級、寶箱、暫停、結算） ---------------- */
.ov { position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; padding: calc(16px + var(--safe-t)) 14px calc(16px + var(--safe-b)); background: radial-gradient(ellipse at 50% 40%, rgba(20,26,44,.72), rgba(3,5,9,.94) 70%); overflow-y: auto; touch-action: pan-y; animation: ovIn .2s ease-out; }
@keyframes ovIn { from { opacity: 0; } }
.ov-panel { width: min(720px, 100%); text-align: center; }
.ov-panel.narrow { width: min(420px, 100%); } .ov-panel.wide { width: min(860px, 100%); }
.kicker { font-size: 13px; letter-spacing: .4em; color: var(--gold-2); } .kicker b { color: var(--gold); letter-spacing: .1em; }
.ov h2 { margin: 4px 0 12px; font: 900 clamp(30px, 7vw, 44px)/1.15 var(--serif); color: var(--gold); letter-spacing: .1em; text-shadow: 0 0 24px rgba(236,200,121,.3); }
.ov-act { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; } .ov-act.col { flex-direction: column; align-items: stretch; }
.choices { display: grid; gap: 10px; }
.card { cursor: pointer; text-align: left; display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; background: linear-gradient(180deg, rgba(31,40,60,.95), rgba(12,16,26,.97)); border: 1px solid var(--line); color: var(--parch); position: relative; overflow: hidden; animation: cardIn .28s ease-out both; transition: transform .12s, border-color .12s; }
.card:nth-child(2) { animation-delay: .05s; } .card:nth-child(3) { animation-delay: .1s; } .card:nth-child(4) { animation-delay: .15s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.card:hover { transform: translateY(-2px); border-color: var(--gold); }
.card .pic { flex: 0 0 64px; height: 64px; border-radius: 12px; background: radial-gradient(circle at 50% 40%, rgba(80,60,30,.55), rgba(0,0,0,.4)); display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.08); }
.card .pic img { width: 92%; height: 92%; object-fit: contain; }
.card b { display: block; font: 700 17px/1.3 var(--serif); color: var(--gold); }
.card small { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.5; color: #cfd5e2; }
.card em { font-style: normal; font-size: 12px; color: #ffcf7a; }
.card .tag { position: absolute; right: 10px; top: 10px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(236,200,121,.16); color: var(--gold); border: 1px solid var(--line); }
.card.w { border-color: rgba(255,160,100,.45); } .card.god { border-color: rgba(150,200,255,.5); } .card.god .tag { background: rgba(120,180,255,.15); color: #bfe0ff; border-color: rgba(150,200,255,.4); }
.card.p { border-color: rgba(150,190,255,.38); }
.card .evohint { display: block; margin-top: 4px; font-size: 12px; color: #ffb27a; }
.pips { display: flex; gap: 3px; margin: 6px 0 2px; } .pips i { width: 15px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.13); } .pips i.on { background: var(--gold); } .pips i.next { background: rgba(236,200,121,.5); animation: pip 1s ease-in-out infinite; }
@keyframes pip { 50% { opacity: .35; } }
/* 寶箱 */
.chest-art { position: relative; width: 120px; height: 120px; margin: 0 auto 4px; }
.chest-art::before { content: ''; position: absolute; inset: -40px; background: conic-gradient(from 0deg, transparent, rgba(255,210,120,.35), transparent 20%, rgba(255,210,120,.35) 40%, transparent 50%, rgba(255,210,120,.35) 70%, transparent 80%); border-radius: 50%; animation: spin 6s linear infinite; }
.chest-art i { position: absolute; inset: 20px; border-radius: 16px; background: radial-gradient(circle at 50% 30%, #ffe6a8, #c8892e 55%, #6b3e14); box-shadow: 0 0 40px rgba(255,190,80,.8); animation: chestPop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes spin { to { transform: rotate(360deg); } } @keyframes chestPop { from { transform: scale(.3) rotate(-12deg); } }
.chest-got { display: grid; gap: 10px; margin: 6px 0 8px; }
.chest-got .card { animation-delay: calc(var(--i) * .35s + .3s); cursor: default; }
.chest-got .card.evo { border-color: #ff9a4a; background: linear-gradient(180deg, rgba(70,36,16,.95), rgba(20,10,6,.97)); box-shadow: 0 0 30px rgba(255,140,60,.45); }
.chest-got .card.evo b { color: #ffb070; font-size: 20px; }
.chest-gold { color: var(--gold); margin: 4px 0 10px; font: 700 16px/1.4 var(--serif); }
/* 暫停 */
.build { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0 14px; }
.build span { width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.35); display: grid; place-items: center; position: relative; }
.build img { width: 86%; height: 86%; object-fit: contain; } .build b { position: absolute; right: 3px; bottom: 1px; font: 900 11px/1 var(--serif); color: var(--gold); text-shadow: 0 0 3px #000; }
/* 結算 */
.res-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 12px; }
.res-stats div { padding: 10px 4px; border-radius: 12px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.06); }
.res-stats b { display: block; font: 900 24px/1.2 var(--serif); color: var(--gold); font-variant-numeric: tabular-nums; }
.res-stats span { font-size: 12px; color: var(--mist); letter-spacing: .15em; }
.res-xp { margin: 0 auto 10px; max-width: 460px; text-align: left; font-size: 13px; color: var(--mist); }
.res-xp .bar { width: 100%; height: 10px; margin-top: 5px; } .res-xp .bar > i { background: linear-gradient(90deg, #3d9bff, #a58cff); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.res-xp .up { color: var(--ok); font-weight: 700; margin-left: 6px; animation: pip 1s 3; }
.res-h { margin: 14px 0 8px; font: 700 16px/1.2 var(--serif); color: var(--gold); letter-spacing: .3em; }
.loot { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 20px; }
.res-note { color: var(--mist); font-size: 13px; line-height: 1.6; margin: 10px 0 0; }
@media (max-width: 520px) { .res-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- 物品格 ---------------- */
.item { --rc: var(--r-normal); position: relative; width: 74px; height: 74px; border-radius: 14px; display: grid; place-items: center; cursor: pointer; border: 1.5px solid color-mix(in srgb, var(--rc) 70%, transparent); background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc) 22%, #121826), #070a10 75%); box-shadow: inset 0 0 14px color-mix(in srgb, var(--rc) 25%, transparent); padding: 0; }
.item img { width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
.item .enh { position: absolute; right: 5px; bottom: 4px; font: 900 13px/1 var(--serif); color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.item .on { position: absolute; right: 4px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.item.r-magic { --rc: var(--r-magic); } .item.r-rare { --rc: var(--r-rare); } .item.r-unique { --rc: var(--r-unique); box-shadow: inset 0 0 16px rgba(255,138,76,.45), 0 0 12px rgba(255,138,76,.35); }
.item.empty { --rc: rgba(255,255,255,.2); cursor: default; } .item.empty span { font-size: 12px; color: var(--faint); }
.item.sel { outline: 2px solid var(--gold); outline-offset: 2px; }
.item.reveal { animation: reveal .6s cubic-bezier(.2,1.4,.4,1) both; animation-delay: calc(var(--i) * .22s + .4s); }
@keyframes reveal { 0% { opacity: 0; transform: scale(.2) rotateY(90deg); } 60% { opacity: 1; } }
.rc-normal { color: var(--r-normal); } .rc-magic { color: var(--r-magic); } .rc-rare { color: var(--r-rare); } .rc-unique { color: var(--r-unique); }

/* ---------------- 營地 ---------------- */
.hub { position: fixed; inset: 0; z-index: 4; display: flex; flex-direction: column; background: var(--ink); }
.hub-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .3; filter: saturate(.9) blur(2px); transform: scale(1.06); transition: background-image .4s; }
.hub-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, rgba(7,10,18,.25), rgba(7,10,18,.92) 75%), linear-gradient(180deg, rgba(7,10,18,.6), rgba(7,10,18,.2) 30%, rgba(7,10,18,.95)); }
.hub-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + var(--safe-t)) max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px)); }
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; } .brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.brand small { display: block; font-size: 10px; letter-spacing: .3em; color: var(--gold-2); } .brand b { display: block; font: 900 22px/1.1 var(--serif); color: var(--gold); letter-spacing: .1em; white-space: nowrap; }
.topr { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
@media (max-width: 600px) { .brand > div { display: none; } .goldchip { font-size: 14px; } .acct { max-width: 34vw; } }
.goldchip { display: inline-flex; align-items: center; padding: 6px 12px 6px 4px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid var(--line); font: 700 15px/1 var(--serif); color: var(--gold); font-variant-numeric: tabular-nums; }
.acct { cursor: pointer; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.45); color: var(--parch); font-size: 13px; }
.acct.guest { border-color: rgba(255,170,90,.6); color: #ffcf9a; animation: pip 2.4s ease-in-out infinite; }
.acct .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; } .acct .dot.sync { background: var(--gold); } .acct .dot.off { background: var(--red); }
.tabs { position: relative; display: flex; gap: 4px; margin: 2px 14px 0; padding: 4px; border-radius: 14px; background: rgba(0,0,0,.45); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { cursor: pointer; flex: 1 0 auto; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--mist); font: 700 15px/1 var(--serif); letter-spacing: .2em; }
.tabs button[aria-selected="true"] { color: var(--gold); background: linear-gradient(180deg, rgba(236,200,121,.18), rgba(236,200,121,.05)); border-color: var(--line); }
.hub-main { position: relative; flex: 1; overflow-y: auto; touch-action: pan-y; padding: 14px max(14px, env(safe-area-inset-right, 0px)) calc(24px + var(--safe-b)) max(14px, env(safe-area-inset-left, 0px)); }
.hub-main > section { max-width: 1100px; margin: 0 auto; padding-bottom: 20px; }
.h3 { margin: 18px 0 8px; font: 700 15px/1.2 var(--serif); color: var(--gold); letter-spacing: .25em; display: flex; align-items: baseline; gap: 10px; }
.h3 small { font: 400 12px/1 var(--sans); letter-spacing: 0; color: var(--faint); }
.panel { border-radius: 18px; background: linear-gradient(180deg, rgba(23,32,51,.82), rgba(10,14,24,.88)); border: 1px solid var(--line); padding: 14px; }
/* 出征 */
.go-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .go-grid { grid-template-columns: minmax(0, 1fr); } }
.heroshow { position: relative; overflow: hidden; text-align: center; display: flex; flex-direction: column; align-items: center; }
.heroshow .stage { position: relative; width: 100%; height: 270px; display: flex; justify-content: center; align-items: flex-end; }
.heroshow .art { position: relative; z-index: 1; height: 258px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.7)); animation: breathe 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
.heroshow .ring { position: absolute; left: 50%; bottom: -10px; width: 210px; height: 50px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(236,200,121,.32), transparent 70%); box-shadow: 0 0 0 2px rgba(236,200,121,.35) inset; }
@keyframes breathe { 50% { transform: translateY(-3px) scale(1.012); } }
@media (max-width: 860px) { .heroshow .stage { height: 210px; } .heroshow .art { height: 200px; } }
.heroshow .meta { position: relative; z-index: 1; margin-top: 16px; }
.heroshow .meta b { display: block; font: 900 24px/1.2 var(--serif); color: var(--gold); letter-spacing: .1em; }
.heroshow .meta small { color: var(--mist); }
.clsrow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px;   /* 12-02 五個職業一排（不換行、不疊到出征列） */
   margin-top: 10px; position: relative; z-index: 1; }
.clsrow button { cursor: pointer; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.45); padding: 4px 2px 6px; color: var(--mist); font-size: 12px; }
.clsrow button img { display: block; width: 100%; height: 52px; object-fit: cover; object-position: 50% 12%; border-radius: 8px; }
.clsrow button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 14px rgba(236,200,121,.3); }
.gtoggle { display: inline-flex; gap: 4px; margin-top: 8px; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid var(--line); position: relative; z-index: 1; }
.gtoggle button { cursor: pointer; border: 0; border-radius: 999px; padding: 5px 14px; background: none; color: var(--mist); font-size: 13px; } .gtoggle button[aria-pressed="true"] { background: rgba(236,200,121,.2); color: var(--gold); }
.chs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ch { cursor: pointer; position: relative; min-height: 132px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #0b1018 center / cover no-repeat; text-align: left; padding: 0; color: var(--parch); }
.ch::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(5,7,12,.9) 80%); }
.ch .tx { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 10px; }
.ch .tx small { display: block; font-size: 11px; letter-spacing: .25em; color: var(--gold-2); }
.ch .tx b { display: block; font: 900 20px/1.25 var(--serif); color: var(--gold); letter-spacing: .08em; }
.ch .tx span { font-size: 12px; color: var(--mist); }
.ch[aria-pressed="true"] { outline: 2px solid var(--gold); box-shadow: 0 0 22px rgba(236,200,121,.35); }
.ch.locked { cursor: not-allowed; filter: grayscale(.8) brightness(.6); }
.ch .star { position: absolute; z-index: 1; right: 10px; top: 10px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.6); color: var(--gold); border: 1px solid var(--line); }
/* 12-02 老闆：「為何第一個圖要靠左」→ 升級選卡的九神神器卡也叫 .card.god，被守護神格子的 .god 樣式蓋到（置中、沒留邊）；守護神格子的樣式限定在 .gods 裡 */
.gods { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.gods .god { cursor: pointer; position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: rgba(0,0,0,.4); padding: 0 0 6px; text-align: center; color: var(--parch); }
.gods .god img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 10%; }
.gods .god b { display: block; font: 700 14px/1.3 var(--serif); color: var(--gold); margin-top: 4px; }
.gods .god[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(236,200,121,.35); }
.gods .god.locked img { filter: grayscale(1) brightness(.35); } .gods .god.locked b { color: var(--faint); }
.gods .god .lock { position: absolute; inset: 0 0 auto; aspect-ratio: 1; display: grid; place-items: center; padding: 8px; font-size: 11px; line-height: 1.4; color: #e8dcc0; text-shadow: 0 1px 3px #000; }
.godinfo { margin-top: 10px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.6; }
.godinfo b { color: var(--gold); font-family: var(--serif); }
.gobar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(180deg, rgba(20,16,10,.92), rgba(8,6,4,.96)); border: 1px solid rgba(236,200,121,.5); box-shadow: 0 -10px 30px rgba(0,0,0,.5); }
.gobar .btn { flex: 0 0 auto; white-space: nowrap; }
.gobar .sum { min-width: 0; font-size: 13px; color: var(--mist); line-height: 1.5; }
@media (max-width: 600px) { .hub-main { padding-bottom: calc(110px + var(--safe-b)); } .gobar { position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 3; padding: 10px 12px; } .gobar .btn.big { min-height: 52px; padding: 0 26px; letter-spacing: .2em; } .heroshow .stage { height: 190px; } .heroshow .art { height: 180px; } } .gobar .sum b { color: var(--gold); font-family: var(--serif); font-size: 16px; }
/* 英雄 */
.slots { display: grid; grid-template-columns: repeat(4, 74px); gap: 10px; justify-content: center; }
.slotcell { display: grid; justify-items: center; gap: 3px; } .slotcell > small { font-size: 11px; color: var(--faint); letter-spacing: .2em; }
.statlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; font-size: 13.5px; }
.statlist div { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(255,255,255,.08); padding: 4px 0; } .statlist b { color: var(--gold); font-variant-numeric: tabular-nums; }
.inv { display: flex; flex-wrap: wrap; gap: 8px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { cursor: pointer; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--mist); font-size: 13px; } .chip[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }
.hero2 { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .hero2 { grid-template-columns: minmax(0, 1fr); } }
.lvbar { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; } .lvbar .bar { flex: 1; width: auto; } .lvbar .bar > i { background: linear-gradient(90deg, #3d9bff, #a58cff); }
/* 物品詳細 */
.idet { display: flex; gap: 14px; align-items: center; text-align: left; } .idet .item { flex: 0 0 auto; width: 92px; height: 92px; cursor: default; }
.idet h3 { margin: 0; font: 900 20px/1.3 var(--serif); }
.idet p { margin: 4px 0 0; font-size: 14px; color: var(--parch); }
/* 鐵匠 */
.forge { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; } @media (max-width: 760px) { .forge { grid-template-columns: minmax(0, 1fr); } }
.anvil { text-align: center; } .anvil .item { width: 120px; height: 120px; margin: 6px auto 10px; cursor: default; }
.anvil .rate { font: 900 32px/1 var(--serif); color: var(--gold); } .anvil .rate small { font-size: 13px; color: var(--mist); font-family: var(--sans); font-weight: 400; margin-left: 4px; }
.anvil .preview { margin: 10px 0; font-size: 14px; } .anvil .preview b { color: var(--ok); }
.anvil .res { min-height: 30px; font: 900 20px/1.4 var(--serif); }
.anvil .res.ok { color: var(--ok); animation: cardIn .3s; } .anvil .res.no { color: var(--red); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.anvil.hit .item { animation: hit .35s; } @keyframes hit { 30% { transform: scale(1.08); filter: brightness(1.8); } }
/* 神殿 */
.temple { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tp { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(23,32,51,.85), rgba(10,14,24,.9)); }
.tp img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; object-position: 50% 12%; flex: 0 0 auto; }
.tp .tx { flex: 1; min-width: 0; } .tp b { display: block; font: 700 16px/1.3 var(--serif); color: var(--gold); } .tp small { display: block; font-size: 12.5px; color: var(--mist); }
.tp .btn { min-height: 38px; padding: 0 12px; font-size: 14px; letter-spacing: .02em; white-space: nowrap; }
.tp.max .btn { visibility: hidden; }
/* 圖鑑 */
.codex { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.cx { text-align: center; padding: 6px 4px; border-radius: 12px; border: 1px solid rgba(255,255,255,.06); background: rgba(0,0,0,.3); }
.cx img { width: 64px; height: 64px; object-fit: contain; } .cx.no img { filter: brightness(0) opacity(.5); }
.cx b { display: block; font-size: 12px; color: var(--parch); line-height: 1.3; } .cx small { font-size: 11px; color: var(--gold); }
.cx.boss { border-color: rgba(255,120,90,.35); }
.evotbl { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px; } .evotbl > div { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(0,0,0,.28); min-width: 0; }
.evotbl img { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; } .evotbl .tx { flex: 1; min-width: 0; } .evotbl b { display: block; color: #ffb070; font: 700 15px/1.3 var(--serif); } .evotbl small { display: block; font-size: 12px; color: var(--mist); line-height: 1.4; } .evotbl .plus { color: var(--gold); font-weight: 700; }

/* ---------------- 視窗、提示 ---------------- */
.dlg { border: 0; padding: 0; background: transparent; color: var(--parch); max-width: min(440px, calc(100vw - 24px)); width: 100%; }
.dlg::backdrop { background: rgba(3,5,9,.75); }
.dlg-in { position: relative; padding: 22px 20px 18px; border-radius: 20px; background: linear-gradient(180deg, #172033, #0b1019); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.7); }
.dlg h2 { margin: 0 0 6px; font: 900 22px/1.3 var(--serif); color: var(--gold); letter-spacing: .08em; }
.dlg label { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--mist); }
.dlg input { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.4); color: var(--parch); font-size: 16px; -webkit-user-select: text; user-select: text; }
.dlg input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.dlg .err { min-height: 18px; margin: 8px 0 0; color: #ff9a86; font-size: 13px; }
.dlg-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; } .dlg-act .btn { flex: 1; }
.dlg-x { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.06); color: var(--mist); cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 60; padding: 10px 18px; border-radius: 12px; background: rgba(10,12,20,.95); border: 1px solid var(--line); color: var(--parch); font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.6); max-width: calc(100vw - 32px); text-align: center; animation: ovIn .2s; }
.optrow { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 15px; }
.switch { cursor: pointer; width: 50px; height: 28px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.4); position: relative; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--faint); transition: transform .15s, background .15s; }
.switch[aria-pressed="true"]::after { transform: translateX(22px); background: var(--gold); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* v1.21.155 開寶箱：寶箱圖（月卡寶箱）／覺醒時放覺醒技能圖；光芒改成柔和的光暈 */
.chest-art { width: 140px; height: 140px; }
.chest-art::before { inset: -26px; opacity: .55; }
.chest-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 22px rgba(255,190,80,.55)); animation: chestPop .5s cubic-bezier(.2,1.6,.4,1); }
.chest-art.evo img { inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); border-radius: 22px; box-shadow: 0 0 0 3px #f0d28a, 0 0 36px rgba(255,200,90,.85); }
/* 設定的按鈕：字不要擠成直的 */
.dlg-act { flex-wrap: wrap; }
.dlg-act .btn { flex: 1 1 auto; min-width: 7em; white-space: nowrap; }
.dlg-act a.btn { text-decoration: none; }

/* v1.21.156 接續上次的出征 */
.runbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 12px; border-radius: 16px; background: linear-gradient(180deg, rgba(16,40,28,.92), rgba(6,18,12,.96)); border: 1px solid #7fd4a0; box-shadow: 0 0 14px rgba(127,212,160,.25); }
.runbar .sum { flex: 1; min-width: 0; font-size: 13px; line-height: 1.5; color: var(--mist); } .runbar .sum b { color: #b9f5cf; font-size: 14.5px; }
.runbar .btn { flex: 0 0 auto; white-space: nowrap; } .runbar .btn.big { min-height: 44px; padding: 0 18px; } .runbar .btn:not(.big) { padding: 8px 10px; opacity: .8; }
/* v1.21.156 加到桌面（全螢幕）時畫布用整個螢幕高（有時候 100% 會少一截） */
@media (display-mode: standalone) { canvas#cv { height: 100vh; } }

/* v1.21.156 排行榜 */
.bd-open { margin-left: 8px; vertical-align: 2px; }
.bd-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } .bd-tabs button { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: inherit; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; } .bd-tabs button[aria-pressed="true"] { background: #e3b95c; color: #241703; border-color: #e3b95c; font-weight: 700; }
.bd-list { display: grid; gap: 4px; max-height: 52vh; overflow-y: auto; margin-top: 8px; }
.bd-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.05); }
.bd-row.me { background: rgba(227,185,92,.2); box-shadow: inset 0 0 0 1px #e3b95c; }
.bd-n { font-weight: 800; text-align: center; color: #e3b95c; } .bd-row:nth-child(-n+3) .bd-n { font-size: 18px; }
.bd-name { min-width: 0; display: grid; } .bd-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bd-name small { opacity: .65; font-size: 11.5px; }
.bd-s { font-variant-numeric: tabular-nums; font-weight: 700; } .bd-s i { font-style: normal; font-size: 11px; color: #7fd38a; }
.res-rank { margin-top: 8px; } .res-rank b { color: #e3b95c; }
.gobtns { display: flex; gap: 8px; flex: none; align-items: center; } .res-end { margin: 6px 0 0; color: var(--gold, #ffd84a); font-weight: 700; }
.gobtns .btn.locked { opacity: .55; }

/* 12-01 #51 天賦樹：乾淨、留白、字清楚 */
.tal { display: grid; gap: 14px; }
.tal-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tal-top b { display: block; font: 700 18px var(--serif); color: var(--gold); } .tal-top small { color: var(--mist); font-size: 12px; }
.tal-pts { text-align: center; min-width: 72px; } .tal-pts b { font: 900 30px/1 var(--serif); color: var(--parch); } .tal-pts small { display: block; color: var(--mist); font-size: 11px; margin-top: 2px; }
.tal-sum { font-size: 13px; color: var(--gold); padding: 8px 12px; border-radius: 10px; background: rgba(236,200,121,.07); border: 1px solid rgba(236,200,121,.16); }
.tal-tier { display: grid; gap: 8px; } .tal-tier.locked { opacity: .45; }
.tal-h { font-size: 12px; color: var(--mist); letter-spacing: .1em; display: flex; gap: 8px; align-items: baseline; } .tal-h small { letter-spacing: 0; color: var(--faint); }
.tal-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tal-node { position: relative; display: grid; justify-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: 14px; border: 1px solid rgba(236,200,121,.16); background: rgba(8,12,22,.6); cursor: pointer; text-align: center; -webkit-touch-callout: none; }
.tal-node:disabled { cursor: default; }
.tal-node .pic { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(236,200,121,.22); filter: grayscale(.85) brightness(.7); transition: filter .2s; }
.tal-node .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tal-node.on .pic { filter: none; border-color: var(--gold); box-shadow: 0 0 14px rgba(236,200,121,.35); }
.tal-node b { font-size: 13px; line-height: 1.3; } .tal-node small { font-size: 11px; color: var(--mist); }
.tal-node i { position: absolute; right: 8px; top: 6px; font-style: normal; font-size: 11px; color: var(--faint); } .tal-node.on i { color: var(--gold); } .tal-node.max i { color: var(--ok); }
.tal-act { display: flex; gap: 10px; justify-content: flex-end; }
@media (max-width: 480px) { .tabs button { padding: 0 6px; letter-spacing: .04em; font-size: 14px; } }   /* 12-01 #51 多了「天賦」：手機六個分頁一排放得下 */
/* 12-01 #51 職業覺醒 */
.awk { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--gold); background: linear-gradient(90deg, rgba(236,200,121,.16), rgba(236,200,121,.04)); }
.awk b { display: block; font: 700 16px var(--serif); color: var(--gold); } .awk small { display: block; color: var(--mist); font-size: 12px; margin-top: 2px; }
.awk.locked { border-color: rgba(236,200,121,.16); background: rgba(8,12,22,.5); opacity: .7; display: block; }
.awk.on { display: block; box-shadow: 0 0 18px rgba(236,200,121,.25); }
/* 12-01 #51 撿到裝備的提示 */
.geartoast { position: fixed; left: 50%; top: calc(var(--safe-t) + 118px); transform: translateX(-50%); z-index: 40; display: grid; gap: 6px; pointer-events: none; }
.gt { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 12px; background: rgba(7,10,18,.86); border: 1px solid var(--line); animation: gtin .25s ease-out; transition: opacity .4s, transform .4s; }
.gt.out { opacity: 0; transform: translateY(-8px); }
.gt img { width: 34px; height: 34px; object-fit: contain; } .gt small { display: block; font-size: 11px; color: var(--mist); } .gt b { font-size: 14px; }
.gt.magic { border-color: var(--r-magic); } .gt.magic b { color: var(--r-magic); } .gt.rare { border-color: var(--r-rare); box-shadow: 0 0 14px rgba(255,200,70,.35); } .gt.rare b { color: var(--r-rare); } .gt.unique { border-color: var(--r-unique); box-shadow: 0 0 18px rgba(255,120,60,.5); } .gt.unique b { color: var(--r-unique); }
@keyframes gtin { from { opacity: 0; transform: translateY(-10px); } }
/* 12-01 #51 裝備格：兩欄、圖＋部位＋名稱＋分數，稀有度看框線 */
.gscore { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 2px 10px; border-bottom: 1px solid rgba(236,200,121,.14); margin-bottom: 10px; }
.gscore span { color: var(--mist); font-size: 13px; } .gscore b { font: 900 24px var(--serif); color: var(--gold); }
.gslots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gslot { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 10px 6px 6px; border-radius: 12px; border: 1px solid rgba(236,200,121,.14); background: rgba(8,12,22,.55); text-align: left; cursor: pointer; }
.gslot .pic { width: 44px; height: 44px; border-radius: 10px; background: rgba(0,0,0,.35); display: grid; place-items: center; overflow: hidden; }
.gslot .pic img { width: 40px; height: 40px; object-fit: contain; }
.gslot .tx { min-width: 0; } .gslot small { display: block; font-size: 11px; color: var(--faint); } .gslot b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gslot i { font-style: normal; font: 700 15px var(--serif); color: var(--mist); }
.gslot.r-magic { border-color: rgba(111,180,255,.55); } .gslot.r-rare { border-color: rgba(255,211,90,.6); } .gslot.r-unique { border-color: rgba(255,138,76,.75); box-shadow: 0 0 10px rgba(255,138,76,.2); }
.gslot.empty { opacity: .55; }
.res-rank a { color: var(--gold); font-weight: 700; text-decoration: none; margin-left: 4px; }
.gslot b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; font-size: 12.5px; }
@media (max-width: 480px) { .gslot { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 6px; padding: 6px 8px 6px 6px; } .gslot .pic { width: 38px; height: 38px; } .gslot .pic img { width: 34px; height: 34px; } .gslot i { font-size: 13px; } }
/* 12-01 #51 傳說、插槽、卡片 */
.rc-legend { color: var(--r-legend) !important; }
/* 12-02 裝備 2.0：神兵（橘）流光、神器（紅）流光＋外發光；只動 transform／opacity，便宜 */
.item.r-legend { --rc: var(--r-legend); border-color: var(--r-legend) !important; box-shadow: inset 0 0 18px rgba(255,60,50,.5), 0 0 16px rgba(255,60,50,.55); }
.item.r-unique, .item.r-legend { overflow: hidden; }
.item.r-unique::after, .item.r-legend::after { content: ''; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 42%, rgba(255,240,220,.38) 50%, transparent 58%); transform: translateX(-60%); animation: shim 3.2s ease-in-out infinite; pointer-events: none; }
.item.r-legend::after { background: linear-gradient(115deg, transparent 40%, rgba(255,210,190,.5) 50%, transparent 60%); animation-duration: 2.4s; }
@keyframes shim { 0%, 55% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
.item .enh { z-index: 1; }
.gslot.r-legend { border-color: rgba(255,60,50,.9); box-shadow: 0 0 12px rgba(255,60,50,.35); }
.gt.legend { border-color: #ff3b3b; box-shadow: 0 0 20px rgba(255,60,50,.6); } .gt.legend b { color: #ff8a80; }
.legend-fx { color: #ff9be6; font-size: 13px; margin: 4px 0 0; }
.sockets { margin-top: 10px; display: grid; gap: 6px; } .sock-h { font-size: 12px; color: var(--mist); letter-spacing: .08em; }
.sock { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 1px dashed rgba(170,130,255,.4); justify-content: space-between; }
.sock.on { border-style: solid; background: rgba(170,130,255,.08); } .sock.on.boss { border-color: #ff8ce6; }
.sock img { width: 34px; height: 34px; object-fit: contain; } .sock span { flex: 1; min-width: 0; } .sock b { display: block; font-size: 13px; } .sock small { display: block; font-size: 11px; color: var(--mist); }
.cardpick { display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.cp { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid rgba(170,130,255,.35); background: rgba(8,12,22,.6); text-align: left; cursor: pointer; }
.cp.boss { border-color: #ff8ce6; box-shadow: 0 0 10px rgba(255,140,230,.25); } .cp img { width: 40px; height: 40px; object-fit: contain; } .cp span { flex: 1; } .cp b { display: block; font-size: 14px; } .cp small { color: var(--mist); font-size: 12px; } .cp i { font-style: normal; color: var(--gold); }
/* 12-01 #51 寵物、屬性 */
.pets { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.pet { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: 12px; border: 1px solid rgba(236,200,121,.16); background: rgba(8,12,22,.55); cursor: pointer; }
.pet[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 12px rgba(236,200,121,.3); }
.pet .pic { width: 52px; height: 52px; display: grid; place-items: center; } .pet .pic img { max-width: 52px; max-height: 52px; object-fit: contain; }
.pet b { font-size: 12px; line-height: 1.2; text-align: center; } .pet small { font-size: 10px; color: var(--faint); }
.pet.locked .pic { filter: grayscale(1) brightness(.45); } .pet.locked b { color: var(--faint); }
.pet .el { position: absolute; left: 6px; top: 6px; }
i.el { font-style: normal; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 99px; color: #0b0f18; background: var(--c); display: inline-block; line-height: 1.6; }
.pet-hint { margin: -4px 0 8px; font-size: 12px; color: var(--mist); line-height: 1.8; }
/* 12-01 #51 第三期：每日挑戰、戰報、稱號、榜單篩選 */
.daily { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--gold); background: linear-gradient(90deg, rgba(236,200,121,.14), rgba(10,14,24,.7)); }
.daily small { display: block; color: var(--gold); font-size: 11px; letter-spacing: .12em; } .daily b { display: block; font: 700 16px var(--serif); } .daily span { display: block; color: var(--mist); font-size: 12px; }
.daily-act { display: flex; gap: 6px; flex: none; }
/* 12-02 活動區塊：卡片並排（手機上下） */
.acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin: 0 0 14px; }
.act { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; column-gap: 12px; row-gap: 10px; padding: 14px; border-radius: 16px; border: 1px solid rgba(236,200,121,.45); background: linear-gradient(160deg, rgba(40,32,22,.88), rgba(12,16,26,.9)); box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,235,190,.12); min-width: 0; }
.act.ev { border-color: rgba(150,200,255,.55); background: linear-gradient(160deg, rgba(28,44,70,.9), rgba(12,16,30,.92)); }
.act-ic { grid-row: 1 / 3; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 24px; background: radial-gradient(circle at 50% 35%, rgba(255,226,160,.35), rgba(60,40,10,.4)); border: 1.5px solid var(--gold); }
.act.ev .act-ic { background: radial-gradient(circle at 50% 35%, rgba(200,230,255,.4), rgba(20,40,80,.5)); border-color: #a9d2ff; }
.act-t { min-width: 0; } .act small { display: block; color: var(--gold); font-size: 11px; letter-spacing: .12em; } .act.ev small { color: #a9d2ff; }
.act b { display: block; font: 700 16px var(--serif); margin: 2px 0; } .act span { display: block; color: var(--mist); font-size: 12px; }
.act .daily-act { grid-column: 2; justify-content: flex-end; }
.act.done { opacity: .82; }
.report { margin: 12px auto 0; max-width: 420px; text-align: left; display: grid; gap: 4px; } .rp-h { font-size: 12px; color: var(--gold); letter-spacing: .12em; text-align: center; margin-bottom: 2px; }
.rp-row { display: grid; grid-template-columns: 6.5em 1fr auto; gap: 8px; align-items: center; font-size: 12px; } .rp-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-row i { height: 8px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; } .rp-row i b { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.rp-row small { color: var(--mist); font-variant-numeric: tabular-nums; }
.titles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.ttl { padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(236,200,121,.16); background: rgba(8,12,22,.55); text-align: left; cursor: pointer; }
.ttl b { display: block; font-size: 13px; color: var(--gold); } .ttl small { display: block; font-size: 11px; color: var(--mist); }
.ttl[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 10px rgba(236,200,121,.3); } .ttl.locked { opacity: .45; } .ttl.locked b { color: var(--mist); }
.bd-filter { display: flex; gap: 6px; margin: 8px 0; } .bd-filter button { border: 1px solid var(--line); background: none; border-radius: 99px; padding: 3px 12px; font-size: 12px; color: var(--mist); cursor: pointer; } .bd-filter button[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }
.bd-ttl { font-style: normal; font-size: 11px; color: var(--gold); border: 1px solid var(--gold-3); border-radius: 99px; padding: 0 6px; margin-left: 6px; font-weight: 400; }

/* 12-02 升級選卡的鍵盤數字（有滑鼠的裝置才顯示） */
.card { position: relative; }
.card .kn { display: none; }
@media (hover: hover) and (pointer: fine) { #choices .card .kn { display: grid; place-items: center; flex: 0 0 26px; height: 26px; border-radius: 7px; border: 1px solid rgba(214,178,94,.55); background: rgba(0,0,0,.35); color: var(--gold, #e9c66f); font: 700 14px/1 var(--sans, sans-serif); } }
#chest-ok .kn2 { display: none; }
@media (hover: hover) and (pointer: fine) { #chest-ok .kn2 { display: inline-grid; place-items: center; margin-left: 8px; width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(0,0,0,.35); background: rgba(0,0,0,.14); font: 700 12px/1 var(--sans, sans-serif); vertical-align: 1px; } }
/* 12-02 天賦 2.0：三條路線（電腦三欄、手機一欄），每個節點：圖＋名稱＋種類＋每點效果＋點滿質變 */
.tal-routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .tal-routes { grid-template-columns: 1fr; } }
.tal-route { display: grid; gap: 6px; align-content: start; padding: 10px; border-radius: 14px; background: rgba(8,12,22,.45); border: 1px solid rgba(236,200,121,.12); }
.tal-route .tal-h b { font-size: 15px; color: var(--gold); } .tal-route .tal-h small { display: block; font-size: 11px; color: var(--mist); margin-top: 2px; }
.tal-route .tal-node { grid-template-columns: 44px minmax(0, 1fr); justify-items: start; align-items: start; text-align: left; padding: 8px 34px 8px 8px; gap: 9px; }
.tal-route .tal-node .pic { width: 44px; height: 44px; border-radius: 10px; }
.tal-node .tx { display: grid; gap: 2px; min-width: 0; } .tal-node .tx b { font-size: 13px; }
.tal-node em { font-style: normal; font-size: 10px; font-weight: 600; margin-left: 6px; padding: 0 6px; border-radius: 99px; border: 1px solid rgba(236,200,121,.3); color: var(--mist); vertical-align: 1px; }
.tal-node.k-skill em { color: #8fc8ff; border-color: rgba(143,200,255,.45); } .tal-node.k-big em { color: #ffb347; border-color: rgba(255,179,71,.55); }
.tal-node.k-big { background: linear-gradient(90deg, rgba(255,179,71,.12), rgba(8,12,22,.6)); border-color: rgba(255,179,71,.3); }
.tal-node .mx { color: #d9b96a; } .tal-node .mx.got { color: var(--ok); }
.tal-route .tal-node:disabled { opacity: .42; }
/* 12-02 質感第三包：介面不要扁平——面板、分頁、按鈕加細紋理（雜點）、內陰影、金屬邊角 */
:root { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .92 0 0 0 0 .8 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hub { background: var(--grain), radial-gradient(ellipse at 50% -10%, #1a2238 0%, var(--ink) 60%); }
.panel { position: relative; background: var(--grain), linear-gradient(180deg, rgba(27,36,56,.9), rgba(10,13,22,.94)); border-color: rgba(236,200,121,.22);
  box-shadow: inset 0 1px 0 rgba(255,235,190,.12), inset 0 0 0 1px rgba(0,0,0,.55), inset 0 -18px 30px rgba(0,0,0,.35), 0 10px 26px rgba(0,0,0,.35); }
.panel::before { content: ''; position: absolute; inset: 5px; border-radius: 14px; pointer-events: none;
  background: linear-gradient(var(--gold-2), var(--gold-2)) top left / 14px 1.5px no-repeat, linear-gradient(var(--gold-2), var(--gold-2)) top left / 1.5px 14px no-repeat,
    linear-gradient(var(--gold-2), var(--gold-2)) top right / 14px 1.5px no-repeat, linear-gradient(var(--gold-2), var(--gold-2)) top right / 1.5px 14px no-repeat,
    linear-gradient(var(--gold-2), var(--gold-2)) bottom left / 14px 1.5px no-repeat, linear-gradient(var(--gold-2), var(--gold-2)) bottom left / 1.5px 14px no-repeat,
    linear-gradient(var(--gold-2), var(--gold-2)) bottom right / 14px 1.5px no-repeat, linear-gradient(var(--gold-2), var(--gold-2)) bottom right / 1.5px 14px no-repeat; opacity: .55; }
.tabs { background: var(--grain), linear-gradient(180deg, rgba(0,0,0,.55), rgba(10,12,20,.6)); box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 1px 0 rgba(255,235,190,.06); }
.tabs button[aria-selected="true"] { box-shadow: inset 0 1px 0 rgba(255,235,190,.18), 0 0 14px rgba(236,200,121,.12); }
.btn { background: var(--grain), linear-gradient(180deg, #f8e2a6, #d6a64f 52%, #a9792a); box-shadow: inset 0 1px 0 rgba(255,250,225,.75), inset 0 -2px 0 rgba(90,55,10,.45), 0 4px 14px rgba(0,0,0,.4), 0 0 18px rgba(236,200,121,.15); text-shadow: 0 1px 0 rgba(255,240,200,.4); }
.btn.ghost { background: var(--grain), linear-gradient(180deg, rgba(20,26,40,.75), rgba(8,10,18,.75)); box-shadow: inset 0 1px 0 rgba(255,235,190,.1), inset 0 0 0 1px rgba(0,0,0,.4); text-shadow: none; }
.tal-route, .tal-node { background-image: var(--grain); }
/* 12-02 無盡模式是章節列的一張卡（不再是出征旁邊的鈕） */
.ch.ch-endless { border-color: rgba(190,150,255,.45); } .ch.ch-endless .tx b { color: #d9c2ff; } .ch.ch-endless[aria-pressed="true"] { border-color: #c9a6ff; box-shadow: 0 0 0 1px #c9a6ff, 0 0 18px rgba(190,150,255,.4); }
/* 12-02 設定：特效 自動／高／中／低 */
.seg { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid var(--line); }
.seg button { cursor: pointer; min-width: 40px; min-height: 30px; padding: 0 10px; border-radius: 999px; border: 0; background: none; color: var(--mist); font: 600 13px/1 var(--sans); }
.seg button[aria-pressed="true"] { background: linear-gradient(180deg, #f6dd9b, #c99a45); color: #2a1a06; }
.optrow small { margin-left: 6px; font-size: 11px; }
/* 12-02 老闆：「技能圓圈外面應該去背，不然很不一致」→ 技能圖是圓形圖騰放在白色（或黑色）方底上；這裡把圖裁成圓的，方底的四個角不再露出來 */
img[src*="/skills/"] { border-radius: 50%; clip-path: circle(47% at 50% 50%); }
.card .pic:has(> img[src*="/skills/"]) { background: none; }
/* 12-02 天賦 2.1：兩條經驗條、天賦／職業覺醒分頁、主修、7 階（左邊寫門檻點數）、節點（1／3／5 點三種） */
.tal-top .tbars { display: grid; gap: 6px; flex: 1; min-width: 0; }
.tb { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 8px; font-size: 12px; color: var(--mist); } .tb b { color: var(--gold); margin-right: 2px; }
.tb .bar { height: 6px; border-radius: 99px; background: rgba(0,0,0,.5); overflow: hidden; border: 1px solid rgba(236,200,121,.18); } .tb .bar i { display: block; height: 100%; background: linear-gradient(90deg, #b98f40, #f3d68e); }
.tal-tabs { display: flex; gap: 6px; margin: 4px 0 8px; } .tal-tabs button { cursor: pointer; flex: 1; min-height: 36px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--mist); font: 700 14px/1 var(--serif); letter-spacing: .08em; }
.tal-tabs button[aria-selected="true"] { color: #2a1a06; background: linear-gradient(180deg, #f6dd9b, #c99a45); }
.tal-route .tal-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.spec { cursor: pointer; flex: none; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--gold); font: 700 12px/1 var(--sans); }
.spec.on { background: linear-gradient(180deg, #f6dd9b, #c99a45); color: #2a1a06; border-color: #f6dd9b; } span.spec { cursor: default; } span.spec:not(.on) { color: var(--faint); }
.tal-route.main { border-color: rgba(236,200,121,.5); box-shadow: 0 0 0 1px rgba(236,200,121,.25), 0 0 22px rgba(236,200,121,.12); } .tal-route.side { opacity: .82; }
.tal-spent { font-size: 11px; color: var(--mist); margin: 2px 0 4px; } .tal-spent b { color: var(--gold); }
.tier { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 6px; align-items: start; padding-top: 6px; }
.tier + .tier::before { content: ''; position: absolute; left: 10px; top: -4px; height: 10px; width: 2px; background: rgba(236,200,121,.25); }
.tier .need { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font: 700 10px/1 var(--sans); color: var(--gold); border: 1px solid rgba(236,200,121,.35); background: rgba(0,0,0,.4); }
.tier.shut .need { color: var(--faint); border-color: rgba(255,255,255,.12); } .tier .row { display: grid; gap: 6px; }
.tn { cursor: pointer; position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; align-items: start; text-align: left; padding: 7px 34px 7px 7px; border-radius: 12px; border: 1px solid rgba(236,200,121,.16); background: var(--grain), rgba(8,12,22,.6); color: var(--parch); }
.tn .pic { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(236,200,121,.22); filter: grayscale(.85) brightness(.7); } .tn .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tn.on .pic { filter: none; border-color: var(--gold); box-shadow: 0 0 12px rgba(236,200,121,.35); }
.tn .tx { display: grid; gap: 2px; min-width: 0; } .tn .tx b { font-size: 13px; } .tn small { font-size: 11px; color: var(--mist); line-height: 1.35; } .tn small.why { color: #c9a26a; }
.tn em { font-style: normal; font-size: 10px; font-weight: 600; margin-left: 6px; padding: 0 6px; border-radius: 99px; border: 1px solid rgba(236,200,121,.3); color: var(--mist); }
.tn.k-skill em { color: #8fc8ff; border-color: rgba(143,200,255,.45); } .tn.k-effect em { color: #9dffb0; border-color: rgba(140,255,170,.45); } .tn.k-big em { color: #ffb347; border-color: rgba(255,179,71,.55); }
.tn.k-big { background: var(--grain), linear-gradient(90deg, rgba(255,179,71,.14), rgba(8,12,22,.6)); border-color: rgba(255,179,71,.35); }
.tn i { position: absolute; right: 8px; top: 7px; font-style: normal; font-size: 11px; color: var(--faint); } .tn.on i { color: var(--gold); } .tn.max i { color: var(--ok); }
.tn.locked:not(.on) { opacity: .5; } .tal-aw { display: grid; gap: 8px; }

/* 12-02 老闆：「整體遊戲有點暗，能否改成明亮的」→ 大廳背景圖透出來、面板與文字提亮、彈窗背後的灰不要那麼黑 */
.hub-bg { opacity: .62; filter: saturate(1.05); }
.hub-bg::after { background: radial-gradient(ellipse at 50% 30%, rgba(20,28,46,.05), rgba(20,28,46,.55) 80%), linear-gradient(180deg, rgba(20,28,46,.35), rgba(20,28,46,0) 30%, rgba(20,28,46,.6)); }
.hub { background: #1a2338; }
.panel { background: linear-gradient(180deg, rgba(44,58,88,.78), rgba(26,36,58,.82)); border-color: rgba(236,200,121,.38); }
:root { --mist: #c3cad8; --faint: #95a0b4; }
.dlg::backdrop { background: rgba(8,12,22,.5); }
.dlg-in { box-shadow: 0 18px 60px rgba(0,0,0,.45); }
.dlg-in { background: linear-gradient(180deg, #2a3754, #1a2438); }
/* 12-02 信箱：右上角信封＋紅點數字；清單一列一封，點開看內文、附件、領取 */
.mailbtn { position: relative; display: grid; place-items: center; }
.mailbtn .badge { position: absolute; right: -3px; top: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #e2453a; color: #fff; font: 700 11px/17px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px var(--bg, #0d1120); }
.mguest { margin: -4px 0 10px; padding: 8px 12px; border-radius: 10px; background: rgba(232,199,122,.1); border: 1px solid rgba(232,199,122,.3); color: #e8d6a8; font-size: 13px; }
.mlist { display: grid; gap: 8px; margin: 6px 0 12px; max-height: 58vh; overflow: auto; text-align: left; }
.mrow { border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.03); }
.mrow.open { border-color: rgba(232,199,122,.45); background: rgba(232,199,122,.06); }
.mrow.done { opacity: .55; }
.mhead { width: 100%; display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; padding: 11px 12px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mhead b { font-weight: 600; } .mhead small { color: var(--faint, #9a93a8); font-size: 12px; }
.mdot { width: 8px; height: 8px; border-radius: 50%; background: #e2453a; } .mrow.done .mdot { background: transparent; }
.mbody { padding: 0 12px 12px 32px; } .mbody p { margin: 0 0 8px; color: #cfc5b0; font-size: 13.5px; line-height: 1.6; }
.matt { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.matt span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.matt .coin-ic { margin: 0; } .ma-c { color: #9fd0ff; } .ma-t { color: #f3d68e; } .ma-g { font-size: 12px; }
/* 12-02 季節活動：出征頁活動卡、九宮格翻牌、限定卡框、頭框 */
.evcard { border-color: rgba(255,214,150,.45); background: linear-gradient(120deg, rgba(120,160,230,.16), rgba(255,200,120,.10)); }
.evtop { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; color: #cfc5b0; font-size: 13px; }
.evcan b { color: #ffd98a; font-size: 18px; }
.evgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 8px; }
.evc { aspect-ratio: 3 / 4; border-radius: 12px; border: 1px solid rgba(232,199,122,.4); background: linear-gradient(160deg, #22305a, #141a33); display: grid; place-items: center; align-content: center; gap: 4px; color: #f3d68e; font: inherit; cursor: pointer; padding: 6px; transition: transform .15s; }
.evc i { font-style: normal; font-size: 26px; } .evc small { font-size: 11px; line-height: 1.3; color: #e8dcc0; text-align: center; }
.evc[aria-disabled="true"] { opacity: .6; cursor: default; }
.evc:not(.open):hover { transform: translateY(-2px); }
.evc.flipping { animation: evflip .5s ease-in-out infinite; }
@keyframes evflip { 50% { transform: rotateY(90deg); } }
.evc.open { cursor: default; background: linear-gradient(160deg, #2a2a38, #1a1a26); border-color: rgba(255,255,255,.15); }
.evc.open.grand { border-color: #ffd98a; background: radial-gradient(circle at 50% 35%, rgba(255,215,130,.35), #2a2030 70%); box-shadow: 0 0 18px rgba(255,210,120,.45); }
.evc.open.mid { border-color: #ff8a4c; }
.evstat { text-align: center; margin: 0 0 10px; color: #cfc5b0; font-size: 13.5px; } .evstat b { color: #ffd98a; }
.evtab { text-align: left; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.25); font-size: 12.5px; color: #bfb6a4; }
.evtab ul { margin: 6px 0; padding-left: 18px; } .evtab li.g { color: #ffd98a; } .evtab li.m { color: #ffb07a; }
.evgot { margin-bottom: 6px; color: #ffd98a; font-weight: 600; }
.sock.ltd, .card.ltd { border-color: #bfe2ff !important; box-shadow: 0 0 12px rgba(170,215,255,.5); }
.stage.frame-ltd .ring { border-color: #bfe2ff; box-shadow: 0 0 22px rgba(170,215,255,.55), inset 0 0 14px rgba(255,220,150,.35); }
.evpv { margin-left: 8px; padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.12); font: 600 11px/1.6 system-ui, sans-serif; color: #cfe6ff; font-style: normal; vertical-align: middle; }
.clsrow.top { margin: 0 0 8px; }   /* 12-02 職業列移到人物上方：左欄再高也不會被下面的出征列蓋住 */
@media (min-width: 861px) and (max-height: 900px) { .heroshow .stage { height: 210px; } .heroshow .art { height: 200px; } }   /* 12-02 矮螢幕：人物台縮小，男／女切換不被出征列蓋住 */
/* 12-02 視覺方向草稿（?look=2）：我們自己的希臘風——青銅圓盾＋回紋邊（血量）、錢幣樣式的技能圖示 */
/* 12-02 老闆：「血條在那很沒質感，能否在中間，像暗黑破壞神」→ 正式版改用下方正中的血球（原本只在 look=2 草稿） */
.hud-l .bar.hp { display: none; }
.look2 .owned { position: fixed; left: calc(120px + var(--safe-l, 0px)); right: calc(100px + var(--safe-r, 0px)); bottom: calc(30px + var(--safe-b, 0px)); display: flex; flex-wrap: nowrap; justify-content: center; gap: 5px; z-index: 3; }
@media (max-width: 600px) { .look2 .owned span { width: 34px !important; height: 34px !important; flex: 0 0 34px; } }
.look2 .owned span { width: 44px; height: 44px; border-radius: 50%; border: 2.5px solid #d9ad5c; background: radial-gradient(circle at 50% 35%, #3a3046, #15111c); box-shadow: 0 0 0 2px rgba(60,40,10,.7), 0 3px 6px rgba(0,0,0,.5); overflow: visible; position: relative; }
.look2 .owned span img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.look2 .owned span b { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); min-width: 18px; padding: 0 4px; border-radius: 8px; background: #2a1a08; border: 1px solid #d9ad5c; color: #ffe7a8; font: 800 10px/14px var(--serif); text-align: center; }

/* 12-02 老闆：「HP 也是醜，你看他的中間技能還好一點」→ 下方一整座「青銅台座」：左＝生命球、右＝大招球（集氣）、中間拱形帶＝技能，帶子上方一排＝這場撿到的
   （自己的樣式：青銅＋大理石＋希臘回紋；只用 CSS，不加圖、不加每幀運算） */
.hudbot { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(8px + var(--safe-b, 0px)); width: min(640px, calc(100% - 24px)); display: grid; grid-template-columns: auto 1fr auto; align-items: end; z-index: 3; pointer-events: none; }
.hb-band { position: relative; margin: 0 -22px 6px; padding: 20px 30px 10px; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px;
  border-radius: 50% 50% 14px 14px / 34px 34px 14px 14px; background: linear-gradient(180deg, rgba(58,44,28,.94), rgba(22,18,14,.96) 60%); border: 2px solid #b8894a; border-bottom-width: 3px;
  box-shadow: 0 6px 18px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,226,170,.25), inset 0 -10px 18px rgba(0,0,0,.4); }
.hb-band::before { content: ''; position: absolute; left: 18%; right: 18%; top: 6px; height: 6px; border-radius: 3px; opacity: .55;
  background: repeating-linear-gradient(90deg, #d9b26a 0 6px, transparent 6px 8px, #d9b26a 8px 10px, transparent 10px 14px); }
.hudbot .owned { margin: 0; max-width: none; justify-content: center; flex-wrap: wrap; gap: 6px; }
.hudbot .owned span { width: 42px; height: 42px; border-radius: 50%; border: 2px solid #c9a35c; background: radial-gradient(circle at 50% 35%, #3b3326, #120f0b); box-shadow: 0 0 0 2px rgba(20,14,8,.8), 0 2px 5px rgba(0,0,0,.5); overflow: visible; }
.hudbot .owned span img { border-radius: 50%; }
.hudbot .owned span.p { border-color: #8fb4e8; }
.hudbot .owned b { right: -4px; bottom: -4px; min-width: 15px; padding: 0 3px; border-radius: 8px; background: #1c140a; border: 1px solid #c9a35c; color: #ffe2a6; font: 800 10px/13px var(--serif); text-align: center; text-shadow: none; }
.hb-loot { display: flex; gap: 4px; justify-content: center; min-height: 0; }
.hb-loot:empty { display: none; }
.hb-loot span { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: rgba(10,10,14,.85); border: 1.5px solid rgba(200,200,210,.5); overflow: hidden; }
.hb-loot span img { width: 86%; height: 86%; object-fit: contain; }
.hb-loot span.magic { border-color: #6aa8ff; } .hb-loot span.rare { border-color: #ffd34a; } .hb-loot span.unique { border-color: #ff8a3a; box-shadow: 0 0 8px rgba(255,140,60,.6); } .hb-loot span.legend { border-color: #ff4a5a; box-shadow: 0 0 10px rgba(255,70,90,.75); }
.hb-loot span.new { animation: lootin .5s ease-out; } @keyframes lootin { from { transform: translateY(8px) scale(1.4); filter: brightness(2); } }
/* 兩顆球：青銅外框＋內圈陰影＋玻璃反光；液面上緣一道亮邊 */
.hpshield, .hudbot .ultbtn { position: relative; z-index: 1; width: 104px; height: 104px; border-radius: 50%; right: auto; bottom: auto; flex: none;
  background: radial-gradient(circle at 50% 50%, #1a120c 58%, #6b4a22 62%, #e2bb72 66%, #8a6230 71%, #3a2610 76%, #c89a52 80%, #2a1c0c 84%);
  box-shadow: 0 8px 20px rgba(0,0,0,.6), 0 0 0 2px rgba(20,12,4,.9); }
.hpshield { display: grid; place-items: center; pointer-events: none; }
.hpshield svg { display: none; }
.hpshield .liq { position: absolute; inset: 16%; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 40%, #3a1414, #120606); box-shadow: inset 0 6px 14px rgba(0,0,0,.7); }
.hpshield .liq i { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, #ffb08a 0, #ff5a44 8%, transparent 22%), linear-gradient(180deg, #ff5a44 0%, #d01e2a 35%, #7a0a16 100%); transition: transform .2s; }
.hpshield .liq::after, .hudbot .ultbtn::after { content: ''; position: absolute; left: 22%; top: 14%; width: 42%; height: 26%; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,255,255,.45), rgba(255,255,255,0) 70%); pointer-events: none; }
.hpshield b { position: relative; font: 900 24px/1 var(--num, var(--serif)); color: #fff; text-shadow: 0 2px 0 #4a0a0a, 0 0 6px rgba(0,0,0,.8); }
.hpshield small { position: absolute; bottom: 22%; font: 800 9px/1 var(--serif); color: #ffd9b0; letter-spacing: .24em; opacity: .85; }
.hudbot .ultbtn { pointer-events: auto; overflow: hidden; }
.hudbot .ultbtn img { inset: 16%; width: 68%; height: 68%; }
.hudbot .ultbtn svg { inset: 13%; width: 74%; height: 74%; }
.hudbot .ultbtn b { bottom: 20%; font-size: 12px; }
@media (max-width: 600px) { .hudbot { width: calc(100% - 16px); } .hpshield, .hudbot .ultbtn { width: 80px; height: 80px; } .hpshield b { font-size: 19px; } .hb-band { margin: 0 -16px 4px; padding: 16px 20px 8px; min-height: 52px; } .hudbot .owned span { width: 32px; height: 32px; } .hudbot .owned { gap: 4px; } .hb-loot span { width: 24px; height: 24px; } .hudbot .ultbtn b { font-size: 11px; } }

/* 12-02 職業大卡：跟守護神卡一樣大（人物是主角） */
.clsbig { display: grid; grid-template-columns: repeat(5, minmax(0, 168px)); justify-content: center; gap: 12px; margin: 0 0 16px; }
.clsbig button { cursor: pointer; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 0 10px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(40,48,70,.75), rgba(8,10,18,.9)); color: var(--parch); min-width: 0; transition: transform .15s, border-color .15s; }
.clsbig button img { display: block; width: 100%; height: 200px; object-fit: cover; object-position: 50% 8%; }
.clsbig button b { font: 700 17px var(--serif); margin-top: 4px; }
.clsbig button small { color: var(--mist); font-size: 12px; }
.clsbig button em { position: absolute; top: 8px; left: 8px; font-style: normal; font: 800 12px/1 var(--serif); padding: 4px 8px; border-radius: 10px; background: rgba(0,0,0,.6); color: var(--gold); border: 1px solid rgba(236,200,121,.45); }
.clsbig button[aria-pressed="true"] { border: 2px solid var(--gold); box-shadow: 0 0 18px rgba(236,200,121,.4); background: linear-gradient(180deg, rgba(90,70,30,.7), rgba(16,12,6,.92)); }
.clsbig button[aria-pressed="true"] b { color: var(--gold); }
.clsbig button:hover { transform: translateY(-2px); }
@media (max-width: 600px) { .clsbig { gap: 6px; grid-template-columns: repeat(5, minmax(0, 1fr)); } .clsbig button img { height: 96px; } .clsbig button b { font-size: 13px; } .clsbig button small { display: none; } .clsbig button em { top: 4px; left: 4px; font-size: 10px; padding: 3px 5px; } }

/* ================= 12-02 老闆設計稿：戰鬥介面「草原奶油風」——奶油底、金邊、兩側小葉子、深咖啡字 ================= */
#hud { --cr1: #fffaf0; --cr2: #f4e4bd; --rim: #c9973e; --rim2: #8a6420; --ink: #4a3418;
  --leaf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M3 37C5 18 17 6 37 3C35 22 23 34 3 37Z' fill='%2389c04a' stroke='%234f7a22' stroke-width='2'/%3E%3Cpath d='M5 35L29 11' stroke='%234f7a22' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); }
.cream { background: linear-gradient(180deg, var(--cr1), var(--cr2)); border: 2.5px solid var(--rim); box-shadow: 0 0 0 1.5px rgba(255,248,225,.9) inset, 0 3px 0 var(--rim2), 0 6px 14px rgba(40,30,10,.35); color: var(--ink); }
/* 左上：等級圓章＋經驗條 */
#hud .hud-l { align-items: center; gap: 0; }
#hud .lvb { position: relative; z-index: 1; width: 62px; height: 62px; background: radial-gradient(circle at 50% 35%, var(--cr1), var(--cr2)); border: 3px solid var(--rim); box-shadow: 0 0 0 2px rgba(255,248,225,.9) inset, 0 3px 0 var(--rim2), 0 6px 14px rgba(40,30,10,.35); }
#hud .lvb small { color: var(--rim2); font-weight: 800; } #hud .lvb b { color: var(--ink); font-size: 26px; }
#hud .lvb::after { content: ''; position: absolute; left: -10px; bottom: -6px; width: 22px; height: 22px; background: var(--leaf) center / contain no-repeat; transform: scaleX(-1) rotate(10deg); }
#hud .hud-l .xpbar { position: relative; top: auto; left: auto; right: auto; margin-left: -10px; width: min(210px, 34vw); height: 18px; border-radius: 0 10px 10px 0; background: linear-gradient(180deg, var(--cr1), var(--cr2)); border: 2.5px solid var(--rim); border-left: 0; box-shadow: 0 3px 0 var(--rim2), 0 6px 14px rgba(40,30,10,.3); overflow: hidden; }
#hud .hud-l .xpbar > i { inset: 3px auto 3px 12px; max-width: calc(100% - 16px); border-radius: 6px; background: linear-gradient(180deg, #8fe08a, #3fae5a); box-shadow: none; }
#hud .hud-l .xpbar::after { content: ''; position: absolute; right: -2px; top: -12px; width: 22px; height: 22px; background: var(--leaf) center / contain no-repeat; transform: rotate(-20deg); }
#hud .hpbox { display: none; }
/* 上方中間：時間牌 */
#hud .plaque { padding: 6px 30px 7px; border-radius: 22px; background: linear-gradient(180deg, var(--cr1), var(--cr2)); border: 2.5px solid var(--rim); box-shadow: 0 0 0 1.5px rgba(255,248,225,.9) inset, 0 3px 0 var(--rim2), 0 6px 14px rgba(40,30,10,.35); }
#hud .plaque::before, #hud .plaque::after { content: ''; position: absolute; top: 50%; width: 26px; height: 26px; margin-top: -13px; background: var(--leaf) center / contain no-repeat; }
#hud .plaque::before { left: -14px; transform: scaleX(-1); } #hud .plaque::after { right: -14px; }
#hud .plaque span { color: var(--ink); font-size: 28px; border-bottom: 1px solid rgba(138,100,32,.35); padding-bottom: 2px; margin-bottom: 2px; }
#hud .plaque small { color: var(--ink); font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; } #hud .plaque small b { color: var(--ink); }
#hud .kill-ic { display: inline-block; width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 3l9 9M17 3l-9 9M6 14l-3 3M14 14l3 3' stroke='%234a3418' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
#hud .plaque .sep { display: inline-block; width: 1.5px; height: 12px; background: rgba(138,100,32,.45); margin: 0 6px; }
#hud .plaque .coin-ic { margin: 0; }
/* 右上：暫停 */
#hud .pausebtn { width: 46px; height: 46px; background: radial-gradient(circle at 50% 35%, var(--cr1), var(--cr2)); border: 2.5px solid var(--rim); color: var(--ink); box-shadow: 0 0 0 1.5px rgba(255,248,225,.9) inset, 0 3px 0 var(--rim2), 0 6px 14px rgba(40,30,10,.35); }
/* 下方：生命條、技能、大招 */
.hudbot { display: flex; align-items: center; justify-content: center; gap: 16px; width: auto; max-width: calc(100% - 24px); }
.hpill { position: relative; flex: none; display: flex; align-items: center; gap: 8px; height: 54px; padding: 0 18px 0 14px; border-radius: 28px; background: linear-gradient(180deg, var(--cr1), var(--cr2)); border: 2.5px solid var(--rim); box-shadow: 0 0 0 1.5px rgba(255,248,225,.9) inset, 0 3px 0 var(--rim2), 0 6px 14px rgba(40,30,10,.35); color: var(--ink); pointer-events: none; }
.hpill::before { content: ''; position: absolute; left: -14px; bottom: -4px; width: 24px; height: 24px; background: var(--leaf) center / contain no-repeat; transform: scaleX(-1); }
.hpill .heart { width: 26px; height: 24px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 21C5 15 1 11 1 6.5A5.5 5.5 0 0 1 12 4a5.5 5.5 0 0 1 11 2.5C23 11 19 15 12 21Z' fill='%23e84855' stroke='%23a3202c' stroke-width='1.5'/%3E%3Cellipse cx='7' cy='7' rx='2.5' ry='1.6' fill='%23fff' opacity='.6'/%3E%3C/svg%3E") center / contain no-repeat; }
.hpill .heart { font-style: normal; }
.hpill b { font: 900 26px/1 var(--num, var(--serif)); color: var(--ink); min-width: 2.2em; }
.hpill small { font: 800 11px/1 var(--serif); color: var(--rim2); margin: 6px 6px 0 -4px; }
.hpill .hbar { position: relative; width: 140px; height: 16px; border-radius: 8px; background: rgba(90,60,20,.18); border-left: 1.5px solid rgba(138,100,32,.35); overflow: hidden; box-shadow: inset 0 2px 3px rgba(0,0,0,.2); }
.hpill .hbar i { position: absolute; inset: 0; border-radius: 8px; transform-origin: 0 50%; background: linear-gradient(180deg, #ff8a8a, #e23b48 55%, #b81f2c); transition: transform .2s; }
.hpill.low .hbar i { animation: hplow .8s ease-in-out infinite; } @keyframes hplow { 50% { filter: brightness(1.5); } }
.hb-band { margin: 0; padding: 0; min-height: 0; border: 0; background: none; box-shadow: none; border-radius: 0; gap: 4px; }
.hb-band::before { display: none; }
.hudbot .owned span { width: 52px; height: 52px; border-radius: 14px; border: 2.5px solid #e0a63c; background: linear-gradient(160deg, #ffcf6e, #e0892c); box-shadow: 0 0 0 1.5px rgba(255,240,200,.8) inset, 0 3px 0 #9a5a14, 0 5px 12px rgba(40,30,10,.35); }
.hudbot .owned span img { border-radius: 10px; }
.hudbot .owned span.p { border-color: #6fa8e0; background: linear-gradient(160deg, #a8d4ff, #4a86c8); box-shadow: 0 0 0 1.5px rgba(230,245,255,.8) inset, 0 3px 0 #2a5a8a, 0 5px 12px rgba(40,30,10,.35); }
.hudbot .owned b { right: -6px; bottom: -6px; min-width: 20px; height: 20px; line-height: 17px; border-radius: 50%; background: #3a2a14; border: 1.5px solid #f4e4bd; color: #fff; font-size: 11px; }
.hudbot .ultbtn { width: 96px; height: 96px; background: radial-gradient(circle at 50% 50%, #7a8a70 60%, var(--cr2) 62%, var(--cr1) 70%, var(--rim) 74%, var(--rim2) 78%); box-shadow: 0 3px 0 var(--rim2), 0 6px 14px rgba(40,30,10,.35); overflow: visible; }
.hudbot .ultbtn img { inset: 14%; width: 72%; height: 72%; }
.hudbot .ultbtn b { bottom: 14%; left: 50%; right: auto; transform: translateX(-50%); padding: 2px 8px; border-radius: 10px; background: rgba(60,45,20,.75); color: #fff8e6; font-size: 13px; text-shadow: none; }
.hudbot .ultbtn::before { content: ''; position: absolute; right: -14px; bottom: 4px; width: 26px; height: 26px; background: var(--leaf) center / contain no-repeat; }
.hudbot .ultbtn::after { display: none; }
@media (max-width: 600px) {
  #hud .lvb { width: 50px; height: 50px; } #hud .lvb b { font-size: 21px; } #hud .hud-l .xpbar { width: 28vw; height: 15px; }
  #hud .plaque { padding: 4px 22px 5px; } #hud .plaque span { font-size: 22px; } #hud .pausebtn { width: 40px; height: 40px; }
  .hudbot { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "band band" "hp ult"; gap: 6px 10px; width: calc(100% - 20px); max-width: none; align-items: center; }
  .hb-band { grid-area: band; } .hpill { grid-area: hp; min-width: 0; } .hudbot .ultbtn { grid-area: ult; } .hpill .hbar { flex: 1; width: auto; min-width: 40px; }
  .hpill { height: 44px; padding: 0 12px 0 10px; gap: 5px; } .hpill b { font-size: 20px; } .hpill .heart { width: 20px; height: 18px; } .hpill .hbar { width: 70px; height: 12px; }
  .hudbot .owned span { width: 38px; height: 38px; border-radius: 10px; } .hudbot .ultbtn { width: 72px; height: 72px; } .hudbot .ultbtn b { font-size: 11px; }
}

.hudbot .ultbtn b { white-space: nowrap; }
.hb-loot span { background: linear-gradient(180deg, var(--cr1, #fffaf0), var(--cr2, #f4e4bd)); border-width: 2px; box-shadow: 0 2px 0 rgba(138,100,32,.6), 0 3px 8px rgba(40,30,10,.3); }
.hb-loot span.normal { border-color: #b9a27a; }

/* 被動技能：左上經驗條下面一排小圓章 */
.owned-p { position: absolute; left: calc(64px + var(--safe-l, 0px)); top: calc(56px + var(--safe-t, 0px)); display: flex; flex-wrap: wrap; gap: 4px; max-width: min(240px, 40vw); pointer-events: none; }
.owned-p:empty { display: none; }
.owned-p span { position: relative; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #fffaf0, #f4e4bd); border: 2px solid #c9973e; box-shadow: 0 2px 0 #8a6420, 0 3px 6px rgba(40,30,10,.3); }
.owned-p span img { width: 80%; height: 80%; object-fit: contain; border-radius: 50%; }
.owned-p b { position: absolute; right: -5px; bottom: -5px; min-width: 14px; height: 14px; border-radius: 7px; background: #3a2a14; color: #fff; font: 800 9px/14px var(--serif); text-align: center; }
@media (max-width: 600px) { .owned-p { left: calc(52px + var(--safe-l, 0px)); top: calc(46px + var(--safe-t, 0px)); } .owned-p span { width: 24px; height: 24px; } }
@media (min-width: 601px) { .hudbot .owned { flex-wrap: nowrap; } .hudbot .owned span { width: 48px; height: 48px; } }
/* 12-02 老闆出的介面圖（ui_*.webp，透明、中間空白；都縮到畫面 2 倍大小，加起來約 60KB）：蓋在原本 CSS 畫的奶油框上（圖沒載到就照舊） */
#hud .lvb { background: url(/assets/arcade/ui_lv_badge.webp) center / 100% 100% no-repeat; border: 0; box-shadow: 0 4px 10px rgba(40,30,10,.3); }
#hud .lvb::after { display: none; }
#hud .hud-l .xpbar { background: url(/assets/arcade/ui_xp_bar.webp) center / 100% 100% no-repeat; border: 0; border-radius: 0; box-shadow: none; height: 20px; overflow: visible; }
#hud .hud-l .xpbar::after { display: none; }
#hud .hud-l .xpbar > i { inset: 5px auto 5px 12px; max-width: calc(100% - 24px); border-radius: 5px; }
#hud .plaque { background: url(/assets/arcade/ui_timer.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none; padding: 12px 34px 10px; border-radius: 0; filter: drop-shadow(0 4px 6px rgba(40,30,10,.3)); }
#hud .plaque::before, #hud .plaque::after { display: none; }
#hud .plaque span { border-bottom: 0; padding-bottom: 4px; }
#hud .pausebtn { background: url(/assets/arcade/ui_pause.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none; filter: drop-shadow(0 3px 5px rgba(40,30,10,.3)); }
.hpill { background: url(/assets/arcade/ui_hp_bar.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none; border-radius: 0; filter: drop-shadow(0 4px 6px rgba(40,30,10,.3)); padding: 0 22px 0 20px; }
.hpill::before { display: none; }
.hudbot .owned span { background: url(/assets/arcade/ui_skill_slot.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none; filter: drop-shadow(0 3px 4px rgba(40,30,10,.3)); }
.hudbot .owned span img { width: 72%; height: 72%; }
.hudbot .owned span.p { background-image: url(/assets/arcade/ui_skill_slot.webp); }
.owned-p span { background: url(/assets/arcade/ui_passive_slot.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none; }
.owned-p span img { width: 66%; height: 66%; }
.hb-loot span { background: url(/assets/arcade/ui_loot_slot.webp) center / 100% 100% no-repeat; box-shadow: none; }
.hudbot .ultbtn { background: radial-gradient(circle, #6f7f66 0 60%, transparent 61%); box-shadow: none; filter: drop-shadow(0 4px 8px rgba(40,30,10,.35)); }
.hudbot .ultbtn::before { content: ''; position: absolute; inset: -4%; right: -4%; bottom: -4%; width: auto; height: auto; z-index: 2; background: url(/assets/arcade/ui_ult_ring.webp) center / 100% 100% no-repeat; pointer-events: none; }
.hudbot .ultbtn b { z-index: 3; }
.hudbot .ultbtn img { inset: 12%; width: 76%; height: 76%; }
.hudbot .ultbtn svg { z-index: 3; }

/* 12-02 出征頁：左邊大立繪拿掉，章節、守護神整排；性別切換在「英雄」標題旁 */
.go-grid.solo { grid-template-columns: minmax(0, 1fr); }
.h3.clsh { display: flex; align-items: center; gap: 12px; }
.h3.clsh .gtoggle { margin: 0; }
.clsbig button.frame-ltd { border-color: #bfe2ff; box-shadow: 0 0 22px rgba(170,215,255,.55); }
/* 12-02 老闆截圖：出征列半透明，下面章節卡的字透上來疊在一起 → 改不透明＋上緣漸層陰影（捲過去的內容在它後面淡出） */
.gobar { background: linear-gradient(180deg, #1c160d, #0c0905); z-index: 5; box-shadow: 0 -18px 24px 6px rgba(8,10,18,.75), 0 6px 18px rgba(0,0,0,.5); }
.hub-main { padding-bottom: 24px; }
.gobar::after { content: ''; position: absolute; left: -30px; right: -30px; top: calc(100% + 1px); height: 60px; background: linear-gradient(180deg, rgba(8,10,18,.96), rgba(8,10,18,.96)); pointer-events: none; }   /* 出征列下面那條縫也蓋住（捲過去的章節卡不會從下面露出來） */
/* 12-02 老闆手機截圖：時間牌的數字頂到上緣花飾 → 牌子照圖的比例（640×240＝8:3）固定大小，時間放上半、擊倒｜金幣放下半（圖中間那條線兩側） */
#hud .plaque { width: 200px; height: 75px; padding: 0; display: grid; grid-template-rows: 54% 46%; justify-items: center; align-items: center; }
#hud .plaque span { font-size: 26px; line-height: 1; padding: 6px 0 0; margin: 0; align-self: end; }
#hud .plaque small { align-self: start; padding-top: 5px; font-size: 13px; }
@media (max-width: 600px) { #hud .plaque { width: 160px; height: 60px; } #hud .plaque span { font-size: 21px; padding-top: 5px; } #hud .plaque small { font-size: 11px; padding-top: 3px; } }

:root.in-frame { --safe-t: 0px; --safe-b: 0px; }   /* 12-02 嵌在主遊戲裡：不留手機的安全距離 */

/* 12-02 翻牌卡片重做：背面金框＋月桂徽章；翻開是道具圖 */
.evgrid { gap: 10px; }
.evc { position: relative; border-radius: 14px; border: 0; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #2d4580, #172347 70%, #0f1730);
  box-shadow: 0 0 0 2px #c9973e, 0 0 0 4px #1a1408, 0 0 0 5px rgba(240,200,120,.55), 0 6px 14px rgba(0,0,0,.45), inset 0 0 18px rgba(0,0,0,.35); transition: transform .15s, box-shadow .15s; }
.evc::before { content: ''; position: absolute; inset: 7px; border-radius: 9px; border: 1px solid rgba(240,200,120,.45); pointer-events: none; }
.evc .evback { position: absolute; inset: 0; margin: auto; width: 56%; aspect-ratio: 1; font-size: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='44' fill='none' stroke='%23e8c477' stroke-width='3'/%3E%3Ccircle cx='50' cy='50' r='36' fill='%23e8c47722'/%3E%3Cg fill='%23e8c477'%3E%3Cpath d='M30 70c-8-10-9-24-2-36 2 10 6 19 12 26z'/%3E%3Cpath d='M70 70c8-10 9-24 2-36-2 10-6 19-12 26z'/%3E%3Cellipse cx='31' cy='44' rx='3' ry='6' transform='rotate(-30 31 44)'/%3E%3Cellipse cx='69' cy='44' rx='3' ry='6' transform='rotate(30 69 44)'/%3E%3Cellipse cx='30' cy='56' rx='3' ry='6' transform='rotate(-55 30 56)'/%3E%3Cellipse cx='70' cy='56' rx='3' ry='6' transform='rotate(55 70 56)'/%3E%3Cpath d='M50 28l5 12h13l-10 8 4 13-12-8-12 8 4-13-10-8h13z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(240,200,120,.45)); }
.evc:not(.open):not([aria-disabled="true"]):hover { transform: translateY(-3px); box-shadow: 0 0 0 2px #f0c870, 0 0 0 4px #1a1408, 0 0 0 5px rgba(255,220,150,.8), 0 0 18px rgba(255,210,120,.5), 0 8px 16px rgba(0,0,0,.45); }
.evc.open { background: radial-gradient(circle at 50% 38%, #fffaf0, #f1dfb6 75%); box-shadow: 0 0 0 2px #c9973e, 0 4px 10px rgba(0,0,0,.4); }
.evc.open::before { border-color: rgba(160,110,40,.35); }
.evc.open small { color: #4a3418; font-weight: 700; padding: 0 6px; }
.evc .evart { width: 56%; max-height: 52%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(60,40,10,.35)); }
.evc.open.mid { box-shadow: 0 0 0 2px #ff8a4c, 0 0 14px rgba(255,140,80,.45), 0 4px 10px rgba(0,0,0,.4); }
.evc.open.grand { background: radial-gradient(circle at 50% 38%, #fff6d6, #f5c96a 80%); box-shadow: 0 0 0 3px #ffd98a, 0 0 22px rgba(255,210,120,.75), 0 4px 10px rgba(0,0,0,.4); }
/* 12-02 老闆：「升級選技能不要整個暗下來，忽暗忽亮的，今天打一下就不舒服」→ 戰鬥中常跳的（升級三選一、寶箱）只蓋一層很淡的暗、不淡入；字加陰影保持看得清楚 */
#pick.ov, #chest.ov { background: rgba(8,10,18,.32); animation: none; }
#pick.ov h2, #chest.ov h2, #pick .kicker, #chest .kicker { text-shadow: 0 2px 6px rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.9); }

/* 12-02 老闆：「不知道下一個目標或關卡在哪」→ 時間牌下面一條目標（奶油底、細進度條；要打頭目時變紅） */
.goalbar { position: absolute; left: 50%; transform: translateX(-50%); top: calc(100% + 6px); z-index: 2; pointer-events: none; display: grid; gap: 3px; justify-items: center; padding: 4px 14px 5px; border-radius: 12px; background: rgba(255,250,236,.92); border: 1.5px solid #c9973e; box-shadow: 0 2px 0 #8a6420, 0 4px 10px rgba(40,30,10,.25); color: #4a3418; font: 800 12px/1.2 var(--serif); white-space: nowrap; }
.goalbar i { display: block; width: 150px; height: 4px; border-radius: 2px; background: rgba(90,60,20,.18); overflow: hidden; }
.goalbar b { display: block; height: 100%; background: linear-gradient(90deg, #8fd36a, #3fae5a); transform-origin: 0 50%; transform: scaleX(0); transition: transform .3s; }
.goalbar.boss { border-color: #c84a3a; } .goalbar.boss b { background: linear-gradient(90deg, #ff8a6a, #d83a3a); }
@media (max-width: 600px) { .goalbar { font-size: 11px; padding: 3px 10px 4px; } .goalbar i { width: 110px; } }

#hud .plaque .goalbar span { font-size: inherit; border: 0; padding: 0; align-self: auto; }   /* 目標條在時間牌裡面，不吃時間數字的樣式 */
/* 12-02 金幣去處：升星（背包、裝備上看得到星星）、神殿升階、寵物培養 */
.item .stars { position: absolute; left: 0; right: 0; top: 2px; text-align: center; font-size: 10px; line-height: 1; letter-spacing: -1px; color: #ffd25a; text-shadow: 0 0 3px #000, 0 0 2px #000; z-index: 1; }
.istar { color: #ffd25a; font-size: .8em; letter-spacing: -1px; }
.ftabs { display: inline-flex; margin: 0 0 10px; }
.stars-big { margin: 4px 0 6px; font-size: 22px; letter-spacing: 2px; } .stars-big i { font-style: normal; color: rgba(255,255,255,.18); } .stars-big i.on { color: #ffd25a; text-shadow: 0 0 8px rgba(255,200,80,.6); }
.tp .btn.t2, .tp.max .btn.t2 { visibility: visible; border-color: rgba(255,210,120,.6); }   /* 滿級的列原本會藏按鈕；升階鈕要看得到 */
.petup { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(0,0,0,.25); font-size: 13px; }
.pet .plv { color: #ffd25a; font-size: 11px; }

.lostbar { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 20; display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 16px; background: #fffaf0; border: 2px solid #c9973e; color: #4a3418; font: 700 15px/1.3 var(--serif); box-shadow: 0 8px 24px rgba(0,0,0,.35); }   /* 12-02 畫布被清掉的提示 */
/* 12-02 老闆截圖「跑版」：神殿升階按鈕字比較長，把名稱擠成直排 → 名稱至少留 120px，放不下時按鈕換到下一行靠右 */
.tp { flex-wrap: wrap; row-gap: 8px; }
.tp .tx { min-width: 120px; }
.tp .btn { margin-left: auto; }
/* 12-02 英雄頁看得懂：立繪＋分數合計、格位卡（插卡小圖）、詳細資訊、背包小卡、卡冊 */
.hero2 { grid-template-columns: minmax(0, 470px) minmax(0, 1fr); }
@media (max-width: 960px) { .hero2 { grid-template-columns: minmax(0, 1fr); } }
.hcard { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; margin-bottom: 8px; }
.hcard .por { width: 96px; height: 112px; border-radius: 14px; overflow: hidden; display: grid; place-items: end center; background: radial-gradient(circle at 50% 70%, rgba(236,200,121,.22), rgba(8,12,22,.6) 70%); border: 1px solid var(--line); }
.hcard .por img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.hcard .tx > b { font: 900 22px var(--serif); color: var(--gold); }
.hcard .gscore { border: 0; margin: 6px 0 0; padding: 6px 10px; border-radius: 10px; background: rgba(236,200,121,.08); }
.gslot { grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; min-height: 64px; transition: border-color .15s, background .15s; }
.gslot.sel { background: rgba(236,200,121,.1); outline: 1.5px solid var(--gold); outline-offset: -1px; }
.gslot small { display: flex; align-items: center; gap: 4px; }
.gstar { color: #ffd35a; font-size: 10px; letter-spacing: -1px; text-shadow: 0 0 4px rgba(255,190,60,.6); }
.sockp { display: flex; gap: 3px; margin-top: 3px; }
.sockp .sp { width: 15px; height: 19px; border-radius: 3px; border: 1px dashed rgba(236,200,121,.4); overflow: hidden; display: block; font-size: 0; background: rgba(0,0,0,.3); }
.sockp .sp.on { border: 1px solid #b48cff; background: #1a1230; } .sockp .sp.on.boss, .sockp .sp.on.ltd { border-color: var(--gold); }
.sockp .sp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gslot > i { font: 800 15px var(--serif); color: var(--parch); }
.gdet { margin-top: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(236,200,121,.07), rgba(8,12,22,.55)); }
.gdet.r-unique { border-color: rgba(255,138,76,.55); } .gdet.r-legend { border-color: rgba(255,60,50,.6); } .gdet.r-rare { border-color: rgba(255,211,90,.45); } .gdet.r-magic { border-color: rgba(111,180,255,.45); }
.gdh { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.gdet.empty .gdh { grid-template-columns: auto 1fr; }
.gdh .pic { width: 48px; height: 48px; border-radius: 10px; background: rgba(0,0,0,.35); display: grid; place-items: center; } .gdh .pic img { width: 44px; height: 44px; object-fit: contain; }
.gdh .tx b { font: 800 15px var(--serif); } .gdh .tx small { display: block; color: var(--faint); font-size: 11.5px; }
.gsc { text-align: right; } .gsc small { display: block; font-size: 10.5px; color: var(--faint); } .gsc b { font: 900 22px var(--serif); color: var(--gold); }
.gdet dl, .cdet dl { margin: 0; display: grid; gap: 4px; }
.gdet dl > div, .cdet dl > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; padding: 5px 8px; border-radius: 8px; background: rgba(0,0,0,.25); font-size: 13px; }
.gdet dt, .cdet dt { color: var(--faint); } .gdet dd, .cdet dd { margin: 0; color: var(--parch); }
.gdet .fx dd { color: #ffb27a; } .gdet .card dd { color: #cdb6ff; } .gdet .mute dd, .cdet .mute dd { color: var(--mist); }
.gact { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.hpane { margin-bottom: 10px; }
.ilist { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.icard { --rc: var(--r-normal); position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 10px 6px 6px; border-radius: 12px; text-align: left; cursor: pointer; border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 12%, rgba(8,12,22,.7)), rgba(8,12,22,.55) 60%); color: inherit; }
.icard.r-magic { --rc: var(--r-magic); } .icard.r-rare { --rc: var(--r-rare); } .icard.r-unique { --rc: var(--r-unique); } .icard.r-legend { --rc: var(--r-legend); box-shadow: 0 0 10px rgba(255,60,50,.25); }
.icard .pic { position: relative; width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc) 25%, #121826), #070a10 80%); }
.icard .pic img { width: 40px; height: 40px; object-fit: contain; } .icard .worn { position: absolute; right: -2px; top: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.icard .tx { min-width: 0; } .icard b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .icard small { display: flex; gap: 4px; align-items: center; font-size: 11px; color: var(--faint); white-space: nowrap; }
.icard > i { font: 800 14px var(--serif); font-style: normal; color: var(--mist); } .icard > i.up { color: var(--ok); }
@media (max-width: 480px) { .ilist { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; } .icard { grid-template-columns: 38px minmax(0, 1fr); padding: 6px; } .icard .pic { width: 38px; height: 38px; } .icard .pic img { width: 34px; height: 34px; } .icard > i { position: absolute; right: 6px; top: 5px; font-size: 11px; } .icard b { padding-right: 34px; font-size: 12px; } .hcard { grid-template-columns: 76px minmax(0, 1fr); } .hcard .por { width: 76px; height: 90px; } }
/* 卡冊：CSS 卡框（不另外出圖）；一般卡銀、首領卡金、限定卡紫金 */
.cbook { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 340px; overflow-y: auto; padding: 2px; }
.ccard { --fr: #c9ced8; position: relative; aspect-ratio: 3 / 4; padding: 4px; border-radius: 10px; cursor: pointer; border: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 3px; background: linear-gradient(160deg, color-mix(in srgb, var(--fr) 85%, #fff), color-mix(in srgb, var(--fr) 55%, #000)); box-shadow: 0 2px 6px rgba(0,0,0,.5); color: inherit; }
.ccard.boss { --fr: #e7bd62; } .ccard.ltd { --fr: #c08cff; }
.ccard .art { border-radius: 7px; overflow: hidden; background: radial-gradient(circle at 50% 45%, #2a3046, #0b0f18 75%); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.5); }
.ccard .art img { width: 92%; height: 92%; object-fit: contain; }
.ccard .nm { font: 700 10.5px/1.25 var(--sans); color: #1d1408; background: rgba(255,250,235,.75); border-radius: 4px; padding: 2px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.ccard .cnt { position: absolute; right: -3px; bottom: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; font: 800 11px/20px var(--sans); font-style: normal; color: #2a1a06; background: linear-gradient(180deg, #f6dd9b, #c99a45); box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.ccard.none { filter: grayscale(1) brightness(.5); } .ccard.none .art img { opacity: .45; }
.ccard.sel { outline: 2px solid var(--gold); outline-offset: 2px; }
.cdet { margin-top: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(8,12,22,.55); }
.cdh { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; } .cdh b { font: 800 15px var(--serif); color: var(--parch); display: block; } .cdh small { color: var(--faint); font-size: 11.5px; }
.ccard.mini { width: 46px; flex: 0 0 auto; cursor: default; box-shadow: none; grid-template-rows: 1fr; }
.cdet-hint { text-align: center; margin: 10px 0 0; }
@media (max-width: 480px) { .cbook { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-height: none; } .ccard .nm { font-size: 9.5px; } }
@media (max-width: 480px) { .gslot { position: relative; grid-template-columns: 38px minmax(0, 1fr); } .gslot > i { position: absolute; right: 8px; top: 6px; font-size: 12px; color: var(--mist); } .gslot small { padding-right: 30px; } .gslot b { font-size: 12.5px; } }
.cwrap { display: flex; flex-direction: column; }
@media (max-width: 480px) { .cwrap .cdet, .cwrap .cdet-hint { order: -1; margin: 0 0 10px; } }
/* 12-02 老闆補充：電腦版立繪置中、左右部位卡；下方 詳細｜比較｜可以換的；手機上下排 */
.hstage { margin-bottom: 16px; }
.eqstage { display: grid; grid-template-columns: minmax(0, 1fr) 250px minmax(0, 1fr); gap: 12px; align-items: stretch; }
.eqcol { display: grid; gap: 8px; align-content: start; }
.eqmid { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: 16px; background: radial-gradient(ellipse at 50% 62%, rgba(236,200,121,.2), rgba(8,12,22,0) 70%); }
.eqmid .gscore { width: 100%; border: 0; margin: 0; padding: 6px 12px; border-radius: 12px; background: rgba(236,200,121,.1); box-shadow: inset 0 0 0 1px var(--line); }
.eqmid .por { width: 190px; height: 210px; display: grid; place-items: end center; } .eqmid .por img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,.6)); }
.eqmid .cn { font: 900 19px var(--serif); color: var(--gold); }
.eqmid .lvbar { width: 100%; margin: 0; }
.eqbot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; margin-top: 14px; align-items: start; }
.eqb { min-width: 0; } .eqb .h3 { margin-top: 0; } .eqb .gdet { margin-top: 0; }
.eqb.cmp > div, .cands { padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(8,12,22,.55); }
.cmph b { display: block; font: 800 14px var(--serif); } .cmph small { color: var(--faint); font-size: 11.5px; }
.cmpl { margin: 8px 0 0; display: grid; gap: 3px; } .cmpl > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px; padding: 4px 8px; border-radius: 8px; background: rgba(0,0,0,.25); font-size: 13px; }
.cmpl dt { color: var(--faint); } .cmpl dd { margin: 0; color: var(--parch); } .cmpl .sc dd { font-weight: 700; }
em.up, em.dn { font-style: normal; font-weight: 800; } em.up { color: var(--ok); } em.dn { color: #ff6b5a; }
.cands { display: grid; gap: 6px; max-height: 420px; overflow-y: auto; }
.cand { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid transparent; cursor: pointer; }
.cand.sel { border-color: var(--gold); background: rgba(236,200,121,.08); }
.cand .pic { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; background: rgba(0,0,0,.35); } .cand .pic img { width: 36px; height: 36px; object-fit: contain; }
.cand .tx { min-width: 0; } .cand b { font-size: 13px; } .cand small { display: block; font-size: 11px; color: var(--mist); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csc { text-align: right; line-height: 1.15; } .csc b { display: block; font: 800 15px var(--serif); color: var(--parch); } .csc em { font-size: 12px; }
.icard > i { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; } .icard > i small { display: block; font: 800 11px var(--sans); } .icard > i small.wn { color: var(--ok); font-weight: 600; } .icard > i small.eq { color: var(--faint); font-weight: 600; }
@media (max-width: 1100px) { .eqstage { grid-template-columns: minmax(0, 1fr) 200px minmax(0, 1fr); } .eqmid .por { width: 160px; height: 180px; } .eqbot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .eqb.cnd { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .eqstage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; } .eqmid { grid-column: 1 / -1; order: -1; }
  .eqmid .por { width: 150px; height: 160px; }
  .eqbot { grid-template-columns: minmax(0, 1fr); } .eqb.cmp { display: none; } .eqb.cnd { grid-column: auto; }
  .cands { max-height: none; } .cand { grid-template-columns: 36px minmax(0, 1fr) auto; } .cand .btn { grid-column: 2 / -1; justify-self: end; min-height: 30px; } .cand small { white-space: normal; }
}
@media (max-width: 480px) { .icard > i { position: absolute; right: 6px; top: 5px; } }
.hstage .clsrow { max-width: 520px; margin: 0 auto 12px !important; }
.eqb.cmp > div:not(.h3) { padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(8,12,22,.55); }
.eqb.cmp > .h3 { padding: 0; border: 0; background: none; }
.eqmid .por { overflow: hidden; flex: 0 0 auto; } .eqmid .por img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.eqmid .por { height: auto; overflow: visible; display: block; } .eqmid .por img { display: block; width: auto; height: auto; max-width: 100%; max-height: 210px; margin: 0 auto; }
@media (max-width: 1100px) { .eqmid .por img { max-height: 180px; } } @media (max-width: 760px) { .eqmid .por img { max-height: 150px; } }
@media (max-width: 760px) { .eqmid { display: grid; grid-template-columns: 110px minmax(0, 1fr); grid-template-areas: "p s" "p n" "p l"; align-items: center; column-gap: 12px; row-gap: 4px; padding: 4px; }
  .eqmid .por { grid-area: p; } .eqmid .por img { max-height: 130px; } .eqmid .gscore { grid-area: s; } .eqmid .cn { grid-area: n; font-size: 17px; } .eqmid .lvbar { grid-area: l; } }
/* 12-02 連擊（右側中間；手機縮小、往上避開搖桿） */
.combo { position: absolute; right: 14px; top: 38%; display: grid; justify-items: end; pointer-events: none; text-shadow: 0 2px 6px rgba(0,0,0,.8); z-index: 3; }
.combo b { font: 900 34px/1 var(--serif); color: var(--parch); font-style: italic; } .combo small { font: 700 12px var(--sans); color: var(--mist); letter-spacing: 2px; }
.combo i { font: 700 12px var(--sans); font-style: normal; color: #ffd35a; }
.combo.hot b { color: #ffd35a; } .combo.pop b { animation: cpop .3s ease-out; } @keyframes cpop { 40% { transform: scale(1.35); } }
@media (max-width: 760px) { .combo { right: 8px; top: 26%; } .combo b { font-size: 24px; } .combo small, .combo i { font-size: 10.5px; } }

/* 12-03 一鍵裝備最強／拆下全身卡片：部位卡下面置中 */
.eqact { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; margin: 12px 0 4px; }
.eqact .muted { flex-basis: 100%; text-align: center; }
/* 12-03 卡片稀有度一眼看出來：一般銀、首領金、限定紫（選卡清單、插槽跟卡冊一致） */
.cp { --fr: #c9ced8; border: 1.5px solid color-mix(in srgb, var(--fr) 55%, transparent) !important; box-shadow: none; }
.cp.boss { --fr: #e7bd62; box-shadow: 0 0 10px rgba(231,189,98,.3) !important; background: linear-gradient(90deg, rgba(231,189,98,.14), rgba(8,12,22,.6) 60%); }
.cp.ltd { --fr: #c08cff; box-shadow: 0 0 10px rgba(192,140,255,.3) !important; background: linear-gradient(90deg, rgba(192,140,255,.14), rgba(8,12,22,.6) 60%); }
.cp img { border-radius: 6px; border: 2px solid var(--fr); background: #0b0f18; }
.ctier { display: inline-block; font-style: normal; font: 700 10.5px var(--sans); padding: 1px 7px; border-radius: 999px; margin-bottom: 2px; color: #2a1a06; background: var(--fr); }
.sock.on { border-color: rgba(201,206,216,.55); } .sock.on.boss { border-color: #e7bd62 !important; background: rgba(231,189,98,.08); } .sock.on.ltd, .sock.ltd { border-color: #c08cff !important; box-shadow: none; background: rgba(192,140,255,.08); }
.sockp .sp.on { border-color: #c9ced8; } .sockp .sp.on.boss { border-color: #e7bd62; } .sockp .sp.on.ltd { border-color: #c08cff; }
/* 12-03 升級三選一：類型標籤、Lv.2 → Lv.3、目前 → 升級後 */
.card .cb { flex: 1; min-width: 0; display: block; }
.ktag { display: inline-block; font: 700 11px var(--sans); padding: 1px 8px; border-radius: 999px; margin-bottom: 3px; border: 1px solid; }
.ktag.k-w { color: #ffc18a; border-color: rgba(255,160,100,.5); background: rgba(255,140,60,.1); } .ktag.k-p { color: #bcd4ff; border-color: rgba(150,190,255,.45); background: rgba(120,160,255,.1); }
.ktag.new { color: #2a1a06; background: linear-gradient(180deg, #f6dd9b, #c99a45); border-color: transparent; } .ktag.k-x { color: var(--mist); border-color: var(--line); }
.card.god .ktag { color: #2a1a06; background: linear-gradient(180deg, #d6ecff, #8fbcef); border-color: transparent; }
.lvto { display: block; font: 700 12.5px var(--sans); color: var(--mist); margin: 1px 0 4px; }
.lvd { list-style: none; margin: 4px 0 2px; padding: 0; display: grid; gap: 3px; }
.lvd li { display: grid; grid-template-columns: auto auto auto auto; justify-content: start; align-items: baseline; gap: 6px; font-size: 13.5px; padding: 3px 8px; border-radius: 7px; background: rgba(0,0,0,.28); }
.lvd li span { color: var(--mist); min-width: 3.5em; } .lvd li b { font: 600 13.5px var(--sans); color: #cfd5e2; } .lvd li i { font-style: normal; color: var(--faint); } .lvd li em { font: 800 14px var(--sans); color: var(--ok); }
.lvd li.t { display: block; color: #ffd38a; }
@media (min-width: 900px) {
  #pick .ov-panel { width: min(980px, 100%); }
  #choices { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
  #choices .card { flex-direction: column; align-items: center; text-align: center; padding: 18px 14px 14px; gap: 10px; }
  #choices .card .pic { flex: 0 0 auto; width: 96px; height: 96px; }
  #choices .card .cb { width: 100%; } #choices .card b { font-size: 19px; }
  #choices .card .lvd li { justify-content: center; } #choices .card .pips { justify-content: center; }
  #choices .card .kn { position: absolute; left: 10px; top: 10px; }
}
@media (max-width: 899px) { #choices .card { padding: 10px 12px; gap: 12px; } #choices .card .pic { flex-basis: 54px; height: 54px; }
  #choices .ktag { margin: 0 6px 0 0; vertical-align: 2px; } #choices .card .cb > b { display: inline; font-size: 16px; } #choices .lvto { display: inline; margin-left: 6px; font-size: 12px; }
  #choices .card small { font-size: 13px; margin-top: 4px; } #choices .lvd { margin-top: 5px; } #choices .card .pips { margin-top: 5px; } }
/* 12-03 圖鑑怪物小卡（會掉落） */
button.cx { cursor: pointer; color: inherit; font: inherit; width: 100%; } button.cx:hover { border-color: var(--line); background: rgba(236,200,121,.08); }
.mobtip { position: fixed; z-index: 60; padding: 12px; border-radius: 14px; background: linear-gradient(180deg, #1b2336, #0c111c); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.6); text-align: left; pointer-events: auto; }
.mobtip[hidden] { display: none; }
.mth { display: flex; gap: 10px; align-items: center; } .mth .pic { width: 56px; height: 56px; border-radius: 12px; background: rgba(0,0,0,.35); display: grid; place-items: center; flex: 0 0 auto; } .mth .pic img { width: 52px; height: 52px; object-fit: contain; }
.mth b { display: block; font: 800 16px var(--serif); color: var(--gold); } .mth small { color: var(--mist); font-size: 12px; }
.mts { display: flex; gap: 6px; margin: 10px 0 8px; flex-wrap: wrap; } .mts span { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.35); color: var(--parch); }
.mts i { width: 9px; height: 9px; border-radius: 50%; background: var(--ec); box-shadow: 0 0 6px var(--ec); }
.mtd { display: grid; gap: 3px; } .mtd .h { font: 700 12px var(--sans); color: var(--gold); letter-spacing: 2px; margin-bottom: 2px; }
.mtd > div:not(.h) { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; font-size: 13px; padding: 4px 8px; border-radius: 7px; background: rgba(0,0,0,.28); } .mtd span { color: var(--mist); } .mtd b { font-weight: 600; color: var(--parch); }
.mobtip p { margin: 8px 0 0; font-size: 11.5px; }
.owned span.slot0 { background: rgba(0,0,0,.22); border: 1.5px dashed rgba(236,200,121,.35); box-shadow: none; }
.look2 .owned span.slot0 { background: rgba(0,0,0,.25); border: 2px dashed rgba(217,173,92,.5); box-shadow: none; }
