/* 冒險者公會：羊皮紙面板、深色木框、金邊。整個遊戲是一個 1536×1024 的舞台，等比例縮放到視窗。 */
:root {
  --wood-0: #1c1108;
  --wood-1: #2b1a0e;
  --wood-2: #4a2e17;
  --wood-3: #6b4423;
  --gold: #d6a548;
  --gold-hi: #f4d687;
  --parch: #efe0bd;
  --parch-2: #e2cca0;
  --parch-3: #cfb27c;
  --ink: #3a2412;
  --ink-2: #6a4c30;
  --ink-3: #8f7353;
  --red: #a3301f;
  --green: #3d7a24;
  --blue: #2c5d9c;
  --purple: #7a45b8;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #120a05; overflow: hidden; }
body { font: 14px/1.4 var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; user-select: none; }
img { display: block; max-width: none; }
button { font-family: var(--sans); }
#wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#stage {
  position: relative; width: 1536px; height: 1024px; flex: none; transform-origin: center center; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(120, 70, 30, .35), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(0deg, rgba(255, 220, 160, .03) 0 1px, transparent 1px 13px),
    linear-gradient(#3b2412, #24150a);
}

/* ── 面板 ── */
.pn {
  position: absolute; display: flex; flex-direction: column; overflow: hidden; border-radius: 7px;
  background: radial-gradient(ellipse at 30% 20%, #f6ead0 0%, var(--parch) 45%, var(--parch-2) 100%);
  border: 3px solid var(--wood-2);
  box-shadow: inset 0 0 0 2px #c79d52, inset 0 0 28px rgba(122, 82, 34, .35), 0 3px 10px rgba(0, 0, 0, .55);
}
.pn > .hd {
  flex: none; height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: linear-gradient(#5d3b1d, #39220f); border-bottom: 2px solid #c79d52;
  color: var(--gold-hi); font: 900 19px/1 var(--serif); letter-spacing: .04em; text-shadow: 0 2px 2px #000a;
}
.pn > .hd .sub { font: 500 13px var(--sans); color: #e9cf96; letter-spacing: 0; text-shadow: none; }
.pn > .hd .sp { flex: 1; }
.pn > .bd { flex: 1; min-height: 0; overflow: auto; padding: 8px 10px; position: relative; }
.pn.dark { background: linear-gradient(#2c1c10, #1d120a); box-shadow: inset 0 0 0 2px #c79d52, 0 3px 10px rgba(0, 0, 0, .55); color: #f0dfbd; }
.bd::-webkit-scrollbar, .scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.bd::-webkit-scrollbar-thumb, .scroll::-webkit-scrollbar-thumb { background: #a07b4a; border-radius: 4px; }
.bd::-webkit-scrollbar-track, .scroll::-webkit-scrollbar-track { background: rgba(90, 60, 30, .15); }

/* ── 按鈕 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap;
  font: 700 14px/1 var(--sans); color: #fff6dc; padding: 7px 13px; border-radius: 5px; cursor: pointer;
  background: linear-gradient(#64a33a, #2f6618); border: 1px solid #1c3b0d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 0 0 1px #c79d52, 0 2px 3px rgba(0, 0, 0, .35);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .55);
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.btn.off { filter: grayscale(.9) brightness(.85); cursor: not-allowed; }
.btn.red { background: linear-gradient(#bf4a32, #7c2213); border-color: #4a120a; }
.btn.gold { background: linear-gradient(#f0c35a, #b07a1c); color: #3a2208; text-shadow: none; border-color: #6b4a10; }
.btn.dark { background: linear-gradient(#755032, #3e2815); border-color: #24160b; }
.btn.blue { background: linear-gradient(#4f86c8, #24508a); border-color: #142c4c; }
.btn.sm { font-size: 12px; padding: 5px 9px; }
.btn.lg { font-size: 20px; padding: 12px 22px; font-family: var(--serif); font-weight: 900; }
.btn .ic { width: 18px; height: 18px; border-radius: 3px; }
.x-btn { position: absolute; right: 8px; top: 5px; width: 28px; height: 28px; border-radius: 4px; border: 1px solid #c79d52; background: #2a180b; color: var(--gold-hi); font-size: 18px; cursor: pointer; line-height: 1; }
.tabs { display: flex; gap: 4px; }
.tab { font: 700 13px var(--sans); color: #e9cf96; background: linear-gradient(#4a2e17, #2e1c0c); border: 1px solid #8a6634; border-radius: 4px; padding: 5px 10px; cursor: pointer; }
.tab.on { background: linear-gradient(#f0c35a, #b07a1c); color: #3a2208; border-color: #f4d687; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 7px; border-radius: 10px; background: rgba(90, 60, 30, .14); border: 1px solid rgba(90, 60, 30, .3); color: var(--ink-2); white-space: nowrap; }
.chip.good { background: rgba(61, 122, 36, .14); border-color: rgba(61, 122, 36, .45); color: #2f6118; }
.chip.bad { background: rgba(163, 48, 31, .12); border-color: rgba(163, 48, 31, .4); color: #8e2a1a; }
.chip.el { color: #fff; border: none; text-shadow: 0 1px 1px #0007; }

/* ── 進度條 ── */
.bar { position: relative; height: 10px; border-radius: 5px; background: #3a2614; box-shadow: inset 0 1px 2px #000a; overflow: hidden; border: 1px solid #1d1209; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(#8fdc5a, #3f8d1f); border-radius: 5px; }
.bar.gold > i { background: linear-gradient(#ffe08a, #c8901e); }
.bar.red > i { background: linear-gradient(#f08068, #a8301c); }
.bar.blue > i { background: linear-gradient(#8cc2ff, #2d6fc0); }
.bar.purple > i { background: linear-gradient(#d4a8ff, #7a40c8); }
.bar.tall { height: 16px; border-radius: 8px; }
.bar > b { position: absolute; inset: 0; text-align: center; font: 700 11px/13px var(--sans); color: #fff; text-shadow: 0 1px 1px #000; }
.bar:has(> b) { height: 15px; border-radius: 7px; }
.bar.tall > b { line-height: 15px; }

/* ── 頂部列 ── */
#top {
  position: absolute; left: 0; top: 0; width: 1536px; height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: linear-gradient(#3e2612, #1f1208); border-bottom: 2px solid #c79d52; box-shadow: 0 3px 8px #000a; z-index: 5;
}
#top .title { display: flex; align-items: center; gap: 8px; padding-right: 10px; margin-right: 2px; border-right: 1px solid #6b4a24; height: 44px; cursor: pointer; }
#top .title img { width: 42px; height: 42px; border-radius: 6px; box-shadow: 0 0 0 1px #c79d52; }
#top .title b { font: 900 25px/1 var(--serif); color: var(--gold-hi); text-shadow: 0 2px 3px #000; letter-spacing: .06em; }
#top .title small { display: block; font-size: 11px; color: #c8a870; margin-top: 3px; }
.res { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 5px; border-radius: 6px; background: linear-gradient(#2a1a0c, #160d05); border: 1px solid #7a5626; color: #fbeccb; font: 700 16px/1 var(--sans); white-space: nowrap; }
.res img { width: 30px; height: 30px; border-radius: 5px; }
.res small { font-size: 11px; color: #a8d88a; font-weight: 500; }
.res .lbl { font-size: 12px; color: #d9bd88; font-weight: 500; }
.res.click { cursor: pointer; }
.res.click:hover { border-color: var(--gold-hi); }
.res .bar { width: 90px; height: 9px; }
.res.boss { border-color: #d8452e; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 12px #ff5a3a; } }
.speedtag { font: 700 12px var(--sans); color: #ffd36a; background: #5a1c10; border: 1px solid #d8452e; border-radius: 4px; padding: 3px 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 6px; border: 1px solid #7a5626; background: linear-gradient(#2a1a0c, #160d05); color: var(--gold-hi); font: 900 20px var(--serif); cursor: pointer; }
.icon-btn:hover { border-color: var(--gold-hi); }

/* ── 版面區塊 ── */
#roster { left: 6px; top: 62px; width: 388px; height: 520px; }
#lb { left: 6px; top: 588px; width: 388px; height: 340px; }
#main { position: absolute; left: 400px; top: 62px; width: 1130px; height: 866px; }
#nav { position: absolute; left: 0; top: 934px; width: 1536px; height: 90px; display: flex; align-items: center; justify-content: center; gap: 22px;
  background: linear-gradient(#2a1a0c, #140b04); border-top: 2px solid #c79d52; }
#nav::before, #nav::after { content: ""; width: 120px; height: 70px; opacity: .55; background: radial-gradient(circle at 50% 60%, rgba(255, 180, 80, .45), transparent 60%); }
.nb { position: relative; width: 236px; height: 66px; display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer;
  border-radius: 8px; border: 2px solid #8a6634; background: linear-gradient(#5d3b1d, #2e1c0c); color: #f6dc9a; font: 900 23px/1 var(--serif); letter-spacing: .1em;
  box-shadow: inset 0 0 0 1px #2a170a, 0 3px 6px #000a; text-shadow: 0 2px 2px #000; }
.nb img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 2px #c79d52; }
.nb:hover { border-color: var(--gold-hi); }
.nb.on { border-color: #ffe28f; background: linear-gradient(#7a5226, #3e2810); box-shadow: 0 0 16px rgba(255, 210, 110, .55), inset 0 0 0 1px #2a170a; }
.nb.lock { filter: grayscale(.85) brightness(.7); }
.badge { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(#ff5a3a, #a81e0c); color: #fff; font: 900 14px/22px var(--sans); text-align: center; box-shadow: 0 0 0 2px #fff3; letter-spacing: 0; }

/* ── 名冊 ── */
.hr { display: grid; grid-template-columns: 54px 1fr auto; gap: 8px; align-items: center; padding: 5px 6px; margin-bottom: 5px; border-radius: 6px; cursor: pointer;
  background: linear-gradient(90deg, rgba(255, 250, 235, .7), rgba(240, 222, 186, .5)); border: 1px solid rgba(120, 85, 40, .35); }
.hr:hover { border-color: #b8862e; background: rgba(255, 248, 225, .95); }
.hr.sel { border-color: #c8901e; box-shadow: 0 0 0 2px #e8b440; }
.pf { width: 54px; height: 54px; border-radius: 6px; border: 2px solid #8a6634; object-fit: cover; }
.hr .nm { font: 900 16px/1.1 var(--serif); color: var(--ink); display: flex; align-items: center; gap: 6px; }
.hr .ln { font-size: 12px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; margin: 3px 0 4px; }
.hr .bar { height: 13px; border-radius: 6px; }
.hr .bar > b { line-height: 12px; font-size: 10px; }
.hr .rt { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pw { font: 700 13px var(--sans); color: var(--ink); display: inline-flex; align-items: center; gap: 3px; }
.pw::before { content: "⚔"; color: #8a5a1c; }
.st { font: 700 12px var(--sans); padding: 3px 7px; border-radius: 4px; color: #fff; white-space: nowrap; }
.st.away { background: linear-gradient(#c74a32, #8a2414); }
.st.rest { background: linear-gradient(#6a8a52, #3f5c2c); }
.st.injured { background: linear-gradient(#b02c5a, #6e1434); }
.st.training { background: linear-gradient(#4f86c8, #24508a); }
.cm { display: inline-block; font: 700 11px/16px var(--sans); color: #fff; width: 18px; height: 18px; text-align: center; border-radius: 50%; }
.stars { color: #e8a92a; font-size: 12px; letter-spacing: -1px; text-shadow: 0 1px 0 #6a4a10; }

/* ── 任務板 ── */
.qc { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; margin-bottom: 6px; border-radius: 6px;
  background: linear-gradient(#fbf1d8, #ecd9ae); border: 1px solid #b89458; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); position: relative; }
.qc::before { content: ""; position: absolute; left: 50%; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(#e85a3a, #7a1a0a); }
.qc img { width: 40px; height: 40px; border-radius: 6px; }
.qc .t { font: 900 14px var(--serif); display: flex; gap: 6px; align-items: center; }
.qc .d { font-size: 12px; color: var(--ink-2); }
.qc .r { font-size: 11px; color: var(--ink-3); display: flex; gap: 8px; margin-top: 2px; }
.qc.done { background: linear-gradient(#e6f5d0, #cce6a8); border-color: #6aa03a; }

/* ── 地圖 ── */
.map { position: absolute; inset: 0; overflow: hidden; }
.map > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; cursor: pointer; z-index: 2; }
.node .ring { position: relative; width: 50px; height: 50px; border-radius: 50%; padding: 4px; background: conic-gradient(#7de84a var(--p), rgba(30, 20, 10, .75) 0); box-shadow: 0 2px 6px #000c; }
.node .ring img { width: 42px; height: 42px; border-radius: 50%; border: 2px solid #f4d687; object-fit: cover; }
.node .lbl { margin-top: 2px; padding: 2px 7px; border-radius: 4px; background: rgba(30, 18, 8, .82); color: #fbe9c0; font: 700 12px/1.25 var(--sans); white-space: nowrap; text-align: center; border: 1px solid rgba(244, 214, 135, .5); }
.node .lbl small { display: block; font-size: 10px; color: #d6bb85; font-weight: 500; }
.node.lock { filter: grayscale(1) brightness(.6); cursor: default; }
.node.new .ring { animation: glow 1.4s infinite; }
@keyframes glow { 50% { box-shadow: 0 0 18px 4px #ffd75a; } }
.node:hover .ring { transform: scale(1.08); }
.node.capital .ring { background: rgba(30, 20, 10, .7); }
.bossmark { position: absolute; transform: translate(-50%, -50%); z-index: 3; cursor: pointer; text-align: center; }
.bossmark img { width: 66px; height: 66px; border-radius: 50%; border: 3px solid #ff5a3a; box-shadow: 0 0 20px #ff3a1a; animation: pulse 1.6s infinite; }
.bossmark .bar { width: 120px; margin: 4px auto 0; }
.bossmark b { display: block; font: 900 13px var(--serif); color: #ffe0c0; text-shadow: 0 1px 3px #000, 0 0 6px #000; }
.tok { position: absolute; z-index: 4; transform: translate(-50%, -100%); pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.tok img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff3c4; box-shadow: 0 2px 4px #000; }
.tok span { font: 900 11px/1 var(--sans); color: #fff; background: #8a2414; border-radius: 3px; padding: 2px 4px; margin-top: -4px; box-shadow: 0 1px 2px #000; }
.maplegend { position: absolute; right: 8px; bottom: 8px; z-index: 5; background: rgba(28, 17, 8, .86); border: 1px solid #c79d52; border-radius: 6px; padding: 6px 9px; color: #f0dcae; font-size: 12px; min-width: 210px; }
.maplegend b { font: 900 13px var(--serif); color: var(--gold-hi); }
.maplegend div { display: flex; justify-content: space-between; gap: 10px; margin-top: 3px; }

/* ── 紀錄 ── */
.log { font-size: 13px; line-height: 1.45; }
.log div { padding: 3px 0; border-bottom: 1px dashed rgba(120, 85, 40, .25); }
.log .tm { color: var(--ink-3); font-size: 12px; margin-right: 4px; font-variant-numeric: tabular-nums; }
.log .tg { font-weight: 700; margin-right: 3px; }
.tg.battle, .tg.lose { color: #a3301f; }
.tg.win { color: #3d7a24; }
.tg.up { color: #2c5d9c; }
.tg.ev { color: #8a5a10; }
.tg.loot, .tg.craft { color: #7a45b8; }
.tg.hurt { color: #b0245a; }
.tg.boss { color: #c0300e; }
.tg.season { color: #b06a10; }

/* ── 倉庫、物品格 ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, 56px); gap: 6px; }
.cell { position: relative; width: 56px; height: 56px; border-radius: 6px; border: 2px solid #6b4a24; background: radial-gradient(#5a3d22, #2a1a0c); cursor: pointer; }
.cell img { width: 100%; height: 100%; border-radius: 4px; }
.cell .n { position: absolute; right: 2px; bottom: 0; font: 700 12px var(--sans); color: #fff; text-shadow: 0 0 2px #000, 0 1px 1px #000; }
.cell .e { position: absolute; left: 2px; top: 1px; font: 900 11px var(--sans); color: #ffe28a; text-shadow: 0 0 2px #000; }
.cell .el { position: absolute; right: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; font: 700 9px/14px var(--sans); color: #fff; text-align: center; }
.cell.sel { box-shadow: 0 0 0 3px #ffd75a; }
.cell:hover { filter: brightness(1.15); }
.cell.empty { cursor: default; background: rgba(60, 40, 20, .25); border-style: dashed; }
.ic { width: 22px; height: 22px; border-radius: 4px; display: inline-block; vertical-align: middle; }
.ic.sm { width: 18px; height: 18px; }
.ic.lg { width: 34px; height: 34px; }
.cost { display: inline-flex; align-items: center; gap: 3px; font: 700 13px var(--sans); white-space: nowrap; }
.cost.no { color: #b32a1a; }

/* ── 卡片與表格 ── */
.card { background: linear-gradient(#fbf2dc, #eedcb3); border: 1px solid #b89458; border-radius: 7px; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 6px; }
.sp { flex: 1; }
.muted { color: var(--ink-3); font-size: 12px; }
.big { font: 900 22px var(--serif); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 700; color: var(--ink-2); padding: 4px 6px; border-bottom: 2px solid rgba(120, 85, 40, .4); position: sticky; top: 0; background: var(--parch-2); }
.tbl td { padding: 4px 6px; border-bottom: 1px solid rgba(120, 85, 40, .2); font-variant-numeric: tabular-nums; }
.tbl tr.me td { background: rgba(232, 180, 64, .35); font-weight: 700; }
.num { text-align: right; }
.banner { position: absolute; overflow: hidden; border-radius: 7px; border: 3px solid var(--wood-2); box-shadow: inset 0 0 0 2px #c79d52, 0 3px 10px #0009; }
.banner > img { width: 100%; height: 100%; object-fit: cover; }
.banner .ttl { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 22px; border-radius: 6px;
  background: linear-gradient(#f3e3bd, #dcc290); border: 2px solid #8a6634; font: 900 30px var(--serif); color: var(--ink); box-shadow: 0 4px 10px #0008; }
.banner .ttl img { width: 40px; height: 40px; border-radius: 6px; }
.banner .npc { position: absolute; right: 16px; bottom: 0; top: 10px; display: flex; align-items: flex-end; gap: 10px; }
.banner .npc img { width: 120px; height: 120px; border-radius: 8px; border: 2px solid #c79d52; box-shadow: 0 4px 10px #000a; }

/* ── 招募卡 ── */
.rc { flex: none; width: 150px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; position: relative; }
.rc img.p { width: 128px; height: 128px; border-radius: 6px; border: 2px solid #8a6634; }
.rc.rare { box-shadow: 0 0 0 2px #b06ae8, 0 0 14px #b06ae8; background: linear-gradient(#f5ecff, #e2d0f5); }
.rc .ribbon { position: absolute; top: -2px; left: 50%; transform: translateX(-50%); background: linear-gradient(#9a5ad8, #5a2a98); color: #fff; font: 700 12px var(--sans); padding: 2px 10px; border-radius: 0 0 6px 6px; }
.rc .nm { font: 900 17px var(--serif); }

/* ── 雷達圖、研究樹、傳承樹 ── */
.radar text { font: 700 12px var(--sans); fill: var(--ink); }
.rn { position: absolute; transform: translate(-50%, -50%); width: 70px; display: flex; flex-direction: column; align-items: center; cursor: pointer; z-index: 2; }
.rn .o { width: 54px; height: 54px; border-radius: 50%; padding: 3px; background: #6b4a24; box-shadow: 0 2px 5px #0008; position: relative; }
.rn .o img { width: 48px; height: 48px; border-radius: 50%; }
.rn.got .o { background: linear-gradient(#ffe28a, #c8901e); }
.rn.lock .o img { filter: grayscale(1) brightness(.55); }
.rn.cur .o { animation: glow 1.4s infinite; background: linear-gradient(#9ae860, #3f8d1f); }
.rn.sel .o { box-shadow: 0 0 0 3px #fff, 0 0 12px #ffd75a; }
.rn .o .lv { position: absolute; right: -6px; bottom: -4px; background: #2a1a0c; color: #ffe28a; font: 700 10px var(--sans); border-radius: 8px; padding: 1px 5px; border: 1px solid #c79d52; }
.rn .t { margin-top: 3px; font: 700 12px/1.2 var(--sans); text-align: center; color: var(--ink); white-space: nowrap; }
.lines { position: absolute; inset: 0; pointer-events: none; }
.tree .rn .t { color: #fff3d0; text-shadow: 0 1px 3px #000, 0 0 4px #000; }

/* ── 彈窗 ── */
#modal { position: absolute; inset: 0; z-index: 20; background: rgba(10, 5, 2, .62); display: flex; align-items: center; justify-content: center; }
#modal .pn { position: relative; max-height: 900px; }
.modal-in { animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
#toasts { position: absolute; left: 50%; top: 66px; transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: rgba(28, 16, 6, .94); color: #ffe9b8; border: 1px solid #c79d52; border-radius: 6px; padding: 8px 16px; font: 700 15px var(--sans); box-shadow: 0 4px 12px #000a; animation: pop .15s ease-out; }
#tip { position: fixed; z-index: 50; max-width: 300px; pointer-events: none; display: none; background: rgba(24, 14, 6, .96); color: #f6e4bd; border: 1px solid #c79d52;
  border-radius: 6px; padding: 7px 10px; font: 13px/1.5 var(--sans); white-space: pre-line; box-shadow: 0 6px 16px #000b; }
.lockcover { position: absolute; inset: 38px 0 0 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(40, 25, 12, .78); color: #f6dc9a; font: 900 20px var(--serif); text-align: center; }
.lockcover img { width: 54px; height: 54px; border-radius: 8px; }

/* ── 進出場動畫 ── */
.fade-in { animation: fadein .2s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

#rotate { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 60; background: rgba(24, 14, 6, .95); color: #ffe9b8;
  border: 1px solid #c79d52; border-radius: 8px; padding: 10px 16px; font: 700 15px var(--sans); box-shadow: 0 6px 16px #000b; cursor: pointer; max-width: calc(100% - 32px); text-align: center; }
[hidden] { display: none !important; }
