/* ============================================================================
 * 三國天命 v4.0 — 暗黑風格介面佈局 (v4.css)
 * 佈局：左上角色資訊＋Buff 列｜右上雷達｜左側功能列｜右下攻擊技能盤｜下方快捷欄＋經驗條＋主選單
 * 全設備自適應：桌機橫向 / 手機直向 / 手機橫向
 * ========================================================================== */
:root {
  --g1: #e9cf8c; --g2: #c9a45c; --g3: #8a6a32; --g4: #4a3818;
  --ink: #0b0908; --panel: rgba(14, 11, 9, 0.86); --panel2: rgba(24, 19, 15, 0.92);
  --line: rgba(176, 140, 76, 0.55); --line2: rgba(176, 140, 76, 0.25);
  --txt: #eadfc6; --dim: #a89676; --hp: #b3201c; --hp2: #e8443a; --mp: #1d4fb8; --mp2: #4c8cff;
  --nav-h: 58px; --qb-s: 46px; --exp-h: 6px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
  --font: "Noto Serif TC", "PMingLiU", "Songti TC", "Microsoft JhengHei", serif;
}
html, body { background: #050403 !important; font-family: var(--font); }
img { -webkit-user-drag: none; }

/* ---------- 通用面板 / 按鈕 ---------- */
.v4-panel, #radar-panel #minimap-box, #quick-bar, #bottom-nav, #left-dock, .pl-plate, #live-ticker-box {
  background: linear-gradient(180deg, rgba(26, 21, 17, 0.9), rgba(9, 7, 6, 0.94));
  border: 1px solid var(--line);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 220, 150, 0.08);
}
.v4-btn {
  font-family: var(--font); font-size: 12.5px; font-weight: 700; color: var(--txt); cursor: pointer;
  padding: 6px 12px; border-radius: 3px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #3a2f24 0%, #1d1712 55%, #120e0b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.15), 0 2px 4px rgba(0, 0, 0, 0.6);
  text-shadow: 0 1px 2px #000; transition: filter .12s, transform .08s; white-space: nowrap;
}
.v4-btn:hover { filter: brightness(1.2); }
.v4-btn:active { transform: translateY(1px); }
.v4-btn:disabled { opacity: .45; cursor: default; filter: none; }
.v4-btn small { display: block; font-size: 10px; color: var(--dim); font-weight: 400; }
.v4-btn.gold { background: linear-gradient(180deg, #8a6a2a 0%, #5a4318 50%, #34260c 100%); border-color: #d7b46a; color: #fff3d0; }
.v4-btn.red { background: linear-gradient(180deg, #8a2a22 0%, #561812 55%, #2e0b08 100%); border-color: #d06a5a; }
.v4-btn.big { font-size: 16px; padding: 12px 26px; letter-spacing: 2px; }
.v4-btn.ghost { background: transparent; border-color: transparent; color: var(--dim); box-shadow: none; }
.v4-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.v4-tab { font-family: var(--font); font-size: 12px; color: var(--dim); padding: 5px 12px; cursor: pointer; border: 1px solid var(--line2); background: rgba(0, 0, 0, 0.35); border-radius: 2px; }
.v4-tab.active { color: #fff0c8; border-color: var(--g2); background: linear-gradient(180deg, #4a3a1c, #241a0c); }
.v4-note { margin-top: 8px; font-size: 11px; color: var(--dim); padding: 8px 10px; border-left: 2px solid var(--g3); background: rgba(0, 0, 0, 0.3); }

/* ---------- 頂部：角色資訊 ---------- */
body #top-bar {
  position: fixed; top: 6px; left: 6px; right: auto; height: auto; width: auto;
  background: none !important; border: none !important; box-shadow: none !important;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0; z-index: 30; pointer-events: none;
}
#top-bar > * { pointer-events: auto; }
.pl-plate { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 40px 6px 6px 40px; min-width: 250px; }
.pl-face-wrap { position: relative; width: 58px; height: 58px; flex-shrink: 0; cursor: pointer; }
.pl-face { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 2px solid var(--g2);
  box-shadow: 0 0 0 2px #000, 0 0 10px rgba(201, 164, 92, 0.35); background: #1a1410; }
.pl-level { position: absolute; left: -2px; bottom: -2px; min-width: 24px; height: 20px; padding: 0 4px; border-radius: 10px;
  background: linear-gradient(180deg, #6a4c18, #2a1c06); border: 1px solid var(--g1); color: #fff3cf; font-size: 12px; font-weight: 900; text-align: center; line-height: 18px; text-shadow: 0 1px 2px #000; }
body .class-crest { position: absolute; right: -4px; bottom: -2px; width: 20px !important; height: 20px !important; font-size: 11px !important; border-radius: 50% !important; border-width: 1px !important; }
.pl-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.pl-row1 { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
body .nation-crest-btn { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px 1px 2px; border-radius: 10px; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line2); cursor: pointer; height: auto; }
body .nation-crest-btn .n-txt { font-size: 11px; font-weight: 900; }
body .player-name { font-size: 14px; font-weight: 900; color: #f6e7c1; text-shadow: 0 1px 3px #000; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.pl-bar { position: relative; height: 13px; border-radius: 2px; background: #120c0a; border: 1px solid rgba(0, 0, 0, 0.9); box-shadow: inset 0 1px 3px #000, 0 0 0 1px rgba(160, 128, 70, 0.3); overflow: hidden; }
.pl-bar.mp { height: 9px; }
body .pl-bar .bar-fill-hp, body .pl-bar .bar-fill-mp { position: absolute; left: 0; top: 0; bottom: 0; transition: width .25s; }
body .pl-bar .bar-fill-hp { background: linear-gradient(180deg, #f0645a 0%, #b8231c 45%, #6e0e0b 100%); }
body .pl-bar .bar-fill-mp { background: linear-gradient(180deg, #6aa6ff 0%, #2357c8 45%, #0f2a6e 100%); }
body .pl-bar .bar-text { position: absolute; inset: 0; font-size: 10px; line-height: 13px; text-align: center; color: #fff; text-shadow: 0 0 2px #000, 0 1px 2px #000; font-family: Arial, sans-serif; font-weight: 700; }
.pl-bar.mp .bar-text { line-height: 9px; font-size: 8.5px; }
.pl-row3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; white-space: nowrap; }
body .combat-power { color: #f3c969; font-weight: 900; font-size: 11px; }
body .adena-inline { display: inline-flex; align-items: center; gap: 3px; color: #f7e3a0; font-size: 11px; font-weight: 700; }
.adena-inline .merit { color: #93c5fd; margin-left: 4px; }

/* ---------- Buff 列 (玩家資訊下方一排) ---------- */
#buff-bar { display: flex; flex-wrap: wrap; gap: 3px; max-width: 300px; padding-left: 4px; min-height: 24px; }
#buff-bar .buff { position: relative; width: 26px; height: 26px; border-radius: 3px; border: 1px solid var(--line); background: #0d0a08; box-shadow: 0 1px 3px #000; }
#buff-bar .buff img { width: 100%; height: 100%; border-radius: 2px; }
#buff-bar .buff span { position: absolute; left: -2px; right: -2px; bottom: -3px; font-size: 8.5px; line-height: 10px; text-align: center; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; font-family: Arial, sans-serif; font-weight: 700; white-space: nowrap; overflow: hidden; }
#buff-bar .buff.safe { border-color: #86efac; }
#buff-bar .buff.morph { border-color: #c084fc; box-shadow: 0 0 6px rgba(192, 132, 252, 0.6); }

/* ---------- 右上：雷達 ---------- */
#radar-panel { position: fixed; top: 6px; right: 6px; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; width: 170px; }
#radar-panel #minimap-box { position: relative; width: 170px; height: 170px; border-radius: 50%; padding: 0; overflow: hidden; cursor: pointer; border: 2px solid var(--g3); }
#radar-panel #minimap-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border-radius: 50%; display: block; }
#radar-panel .radar-ring { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.9), inset 0 0 0 5px rgba(201, 164, 92, 0.55), inset 0 0 18px rgba(0, 0, 0, 0.9); }
#radar-panel .minimap-hdr { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; pointer-events: none;
  font-size: 10.5px; color: #f6e2a8; text-shadow: 0 0 3px #000, 0 1px 2px #000; white-space: nowrap; background: none !important; border: none !important; padding: 0 !important; }
#radar-panel .minimap-hdr #ui-coords-text { font-size: 9.5px; color: #cbbd9a; font-family: Arial, sans-serif; }
.radar-map-btn { position: absolute; top: 10px; right: 14px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--g2); background: rgba(0, 0, 0, 0.6); padding: 2px; cursor: pointer; }
.radar-map-btn img { width: 100%; height: 100%; }
body #world-boss-pill { position: static; display: flex; align-items: center; gap: 5px; padding: 4px 10px; font-size: 11px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, rgba(80, 16, 12, 0.85), rgba(30, 6, 4, 0.9)); border: 1px solid rgba(220, 90, 70, 0.6); color: #fecaca; white-space: nowrap; }
body #zoom-control-pill { position: static; display: flex; align-items: center; gap: 2px; padding: 2px; border-radius: 12px; background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line2); flex-direction: row; width: auto; }
#zoom-control-pill .zoom-step-btn { width: 24px; height: 22px; border-radius: 11px; border: 1px solid var(--line2); background: #1a1410; color: var(--g1); cursor: pointer; font-weight: 900; }
#zoom-control-pill #ui-zoom-val { font-size: 10.5px; color: var(--txt); min-width: 40px; text-align: center; cursor: pointer; font-family: Arial, sans-serif; }

/* ---------- 左側功能列 (由右側移至左側) ---------- */
#left-dock { position: fixed; left: 6px; top: 128px; z-index: 25; display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 4px; border-radius: 6px; }
#left-dock .dock-collapse-btn { font-family: var(--font); font-size: 10px; color: var(--g1); background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line2); border-radius: 3px; cursor: pointer; padding: 2px 0; }
#left-dock #right-dock-items { display: flex; flex-direction: column; gap: 3px; }
#left-dock #right-dock-items.collapsed { display: none; }
#left-dock .dock-sq-item { position: relative; width: 46px; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer;
  border-radius: 4px; border: 1px solid var(--line2); background: radial-gradient(circle at 50% 35%, #2e241a, #0d0a08 80%); transition: filter .12s; }
#left-dock .dock-sq-item:hover { filter: brightness(1.3); border-color: var(--g2); }
#left-dock .dock-sq-item .dark-ico { width: 28px; height: 28px; }
#left-dock .dock-sq-item .txt { font-size: 9.5px; color: var(--txt); line-height: 1; text-shadow: 0 1px 2px #000; }
#left-dock .dock-badge { position: absolute; top: -4px; right: -6px; font-size: 8px; padding: 0 3px; border-radius: 6px; background: #8a1c14; color: #fff; border: 1px solid #e0786a; }

/* ---------- 戰場情報 ---------- */
body #bottom-strip-container { position: fixed; left: 150px; bottom: calc(var(--nav-h) + var(--exp-h) + var(--safe-b) + 8px); width: min(380px, 34vw); z-index: 22; display: block; background: none; border: none; padding: 0; }
body #live-ticker-box { border-radius: 4px; padding: 0; width: 100%; }
body #live-ticker-box .ticker-header { display: flex; align-items: center; gap: 6px; padding: 4px 8px; font-size: 11px; cursor: pointer; }
body #live-ticker-box .ticker-tag { font-size: 10px; padding: 1px 5px; border-radius: 2px; background: #4a1a12; color: #fcd34d; border: 1px solid #8a3a2a; flex-shrink: 0; }
body #live-ticker-box #ticker-latest { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e5d8bc; }
body #ticker-history { max-height: 0; overflow: hidden; transition: max-height .2s; font-size: 10.5px; color: #c9bb9c; }
body #ticker-history.expanded { max-height: 160px; overflow-y: auto; padding: 4px 8px; border-top: 1px solid var(--line2); }
body #ticker-history div { padding: 1px 0; border-bottom: 1px dashed rgba(160, 128, 70, 0.12); }

/* ---------- 快捷欄 + 經驗條 ---------- */
#quick-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--exp-h) + var(--safe-b) + 6px); z-index: 24;
  display: flex; gap: 4px; padding: 4px; border-radius: 6px; }
.qb-slot { position: relative; width: var(--qb-s); height: var(--qb-s); border-radius: 4px; cursor: pointer; border: 1px solid var(--line2); background: #0c0907; }
.qb-slot img { width: 100%; height: 100%; border-radius: 3px; }
.qb-slot:hover { border-color: var(--g2); }
.qb-slot.active { box-shadow: 0 0 8px rgba(74, 222, 128, 0.7); border-color: #86efac; }
.qb-n { position: absolute; right: 2px; bottom: 0; font-size: 10.5px; font-weight: 900; color: #fff; text-shadow: 0 0 2px #000, 0 0 3px #000; font-family: Arial, sans-serif; }
.qb-k { position: absolute; left: 2px; top: 0; font-size: 8.5px; color: #f7d98a; text-shadow: 0 0 2px #000; font-family: Arial, sans-serif; }
#exp-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); height: var(--exp-h); z-index: 26; background: #0a0806; border-top: 1px solid rgba(160, 128, 70, 0.45); }
#ui-exp-fill { height: 100%; width: 0; background: linear-gradient(180deg, #ffe9a0, #d4a640 50%, #8a6416); box-shadow: 0 0 6px rgba(240, 200, 100, 0.6); transition: width .4s; }
#ui-exp-text { position: absolute; right: 8px; top: -14px; font-size: 9.5px; color: #f7e3a0; text-shadow: 0 0 3px #000; font-family: Arial, sans-serif; }

/* ---------- 右下：攻擊與技能盤 ---------- */
#action-cluster { position: fixed; right: 10px; bottom: calc(var(--nav-h) + var(--exp-h) + var(--safe-b) + 10px); width: 232px; height: 200px; z-index: 24; pointer-events: none; }
#action-cluster > * { pointer-events: auto; }
#btn-attack { position: absolute; right: 4px; bottom: 4px; width: 92px; height: 92px; border-radius: 50%; padding: 0; cursor: pointer; border: 2px solid #b8893e;
  background: radial-gradient(circle at 45% 35%, #4a1410, #12060a 70%); box-shadow: 0 0 0 3px #000, 0 0 16px rgba(220, 60, 40, 0.45), inset 0 0 14px #000; }
#btn-attack img { width: 100%; height: 100%; border-radius: 50%; }
#btn-attack:active { transform: scale(0.95); }
body #skill-hotkey-drawer { position: absolute !important; inset: 0 !important; display: block !important; background: none !important; border: none !important; box-shadow: none !important; padding: 0 !important; width: auto !important; height: auto !important; max-width: none !important; pointer-events: none; }
body #skill-hotkey-drawer .hk-slot { position: absolute; width: 52px; height: 52px; min-width: 0; border-radius: 50%; padding: 0; pointer-events: auto; cursor: pointer;
  border: 2px solid #7a6030; background: #0c0907; box-shadow: 0 0 0 2px #000, 0 2px 8px rgba(0, 0, 0, 0.8); overflow: visible; display: block; }
body #skill-hotkey-drawer .hk-slot img.dark-ico { width: 100%; height: 100%; border-radius: 50%; display: block; }
body #skill-hotkey-drawer .hk-slot .key { position: absolute; left: 50%; transform: translateX(-50%); bottom: -9px; font-size: 8.5px; background: rgba(0, 0, 0, 0.8); color: #f7d98a; padding: 0 3px; border-radius: 3px; border: 1px solid var(--line2); top: auto; right: auto; font-family: Arial, sans-serif; }
body #skill-hotkey-drawer .hk-slot .s-name { display: none; }
body #skill-hotkey-drawer .hk-slot .hk-auto-tag { position: absolute; top: -4px; right: -6px; left: auto; font-size: 7.5px; padding: 0 2px; border-radius: 3px; background: #14532d; color: #bbf7d0; border: 1px solid #22c55e; }
body #skill-hotkey-drawer .hk-slot .hk-cd-mask { position: absolute; inset: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 12px; font-weight: 900; display: none; align-items: center; justify-content: center; font-family: Arial, sans-serif; }
body #skill-hotkey-drawer .hk-slot.auto-on { border-color: #4ade80; }
#hk-slot-SKILL_SONIC_BLADE { right: 104px; bottom: 6px; }
#hk-slot-SKILL_SHOCK_STUN { right: 98px; bottom: 66px; }
#hk-slot-SKILL_TRIPLE_ARROW { right: 58px; bottom: 112px; }
#hk-slot-SKILL_THUNDER_BOLT { right: 2px; bottom: 128px; }
#hk-slot-SKILL_HEAL_SELF { right: 158px; bottom: 34px; width: 44px !important; height: 44px !important; }
#hk-slot-SKILL_SOVEREIGN_DECREE { right: 150px; bottom: 94px; width: 44px !important; height: 44px !important; }
body #action-cluster #nav-hunt { position: absolute; right: 168px; bottom: 150px; width: 50px; height: 50px; margin: 0; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid #4a5a3a; background: #0c0907; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #000; }
body #action-cluster #nav-hunt img { width: 100%; height: 100%; border-radius: 50%; position: absolute; inset: 0; opacity: .85; }
body #action-cluster #nav-hunt #nav-hunt-label { position: absolute; bottom: -12px; font-size: 9px; color: #bbf7d0; text-shadow: 0 0 3px #000; white-space: nowrap; }
body #action-cluster #nav-hunt.active { border-color: #4ade80; box-shadow: 0 0 0 2px #000, 0 0 12px rgba(74, 222, 128, 0.7); animation: v4pulse 1.6s infinite; }
@keyframes v4pulse { 50% { box-shadow: 0 0 0 2px #000, 0 0 20px rgba(74, 222, 128, 0.95); } }

/* ---------- 搖桿 ---------- */
body #joystick-zone { left: 18px; bottom: calc(var(--nav-h) + var(--exp-h) + var(--safe-b) + 18px); width: 118px; height: 118px; z-index: 23;
  background: radial-gradient(circle, rgba(30, 24, 18, 0.55), rgba(8, 6, 5, 0.75)); border: 2px solid rgba(160, 128, 70, 0.45); }

/* ---------- 下方主選單 ---------- */
body #bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); z-index: 27;
  display: flex; justify-content: center; align-items: stretch; gap: 0; border-radius: 0; border-left: none; border-right: none; border-bottom: none;
  background: linear-gradient(180deg, rgba(30, 24, 18, 0.97), rgba(8, 6, 5, 0.99)); }
body #bottom-nav .nav-medallion { flex: 1; max-width: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; padding: 3px 0; position: relative; }
body #bottom-nav .nav-medallion + .nav-medallion::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(180deg, transparent, var(--line2), transparent); }
body #bottom-nav .nav-circle { width: 36px; height: 36px; border-radius: 6px; border: none; background: none; box-shadow: none; display: flex; align-items: center; justify-content: center; }
body #bottom-nav .nav-circle img { width: 34px; height: 34px; }
body #bottom-nav .nav-label { font-size: 11px; color: var(--txt); text-shadow: 0 1px 2px #000; letter-spacing: 1px; }
body #bottom-nav .nav-medallion:hover .nav-label { color: #fff0c8; }
body #bottom-nav .nav-medallion:hover .nav-circle img { filter: brightness(1.25) drop-shadow(0 0 4px rgba(233, 207, 140, 0.6)); }

/* ---------- 目標框 / 廣播 / 橫幅 ---------- */
body #target-lock-hud { top: 8px; left: 50%; transform: translateX(-50%); width: min(340px, 42vw); z-index: 29; }
body #world-boss-broadcast { top: 74px; z-index: 31; }
body #epic-banner { z-index: 40; top: 22% !important; }

/* ---------- 死亡畫面 ---------- */
#death-overlay { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(60, 0, 0, 0.55), rgba(0, 0, 0, 0.88)); }
#death-overlay.open { display: flex; }
.death-box { text-align: center; padding: 26px 36px; border: 1px solid #7a2a20; background: rgba(10, 4, 3, 0.85); box-shadow: 0 0 40px rgba(160, 20, 10, 0.4); }
.death-title { font-size: 42px; letter-spacing: 18px; color: #e74c3c; text-shadow: 0 0 20px rgba(200, 30, 20, 0.8), 0 2px 4px #000; margin-bottom: 8px; padding-left: 18px; }
#death-text { color: #e9cfc8; font-size: 13px; margin-bottom: 18px; }

/* ---------- 提示 ---------- */
#v4-toast-box { position: fixed; left: 50%; top: 32%; transform: translateX(-50%); z-index: 95; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.v4-toast { padding: 7px 16px; font-size: 13px; color: #f6e7c1; background: rgba(10, 8, 6, 0.9); border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 4px 14px #000; transition: opacity .4s, transform .4s; text-shadow: 0 1px 2px #000; max-width: 86vw; text-align: center; }
.v4-toast.warn { border-color: #c2410c; color: #fed7aa; }
.v4-toast.ok { border-color: #65a30d; color: #d9f99d; }
.v4-toast.out { opacity: 0; transform: translateY(-10px); }

/* ---------- 視窗 (Modal) 美化 ---------- */
body #modal-backdrop { background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(2px); z-index: 60; }
body .modal-card { border: 1px solid #7a5f2e !important; border-radius: 4px !important;
  background: linear-gradient(180deg, rgba(28, 22, 17, 0.98), rgba(11, 9, 7, 0.99)) !important;
  box-shadow: 0 0 0 1px #000, 0 0 0 3px rgba(122, 95, 46, 0.35), 0 18px 60px rgba(0, 0, 0, 0.9) !important; }
body .modal-header { background: linear-gradient(180deg, #2c2218, #140f0b) !important; border-bottom: 1px solid #6a5226 !important; }
body .modal-title { color: #f3dca0 !important; letter-spacing: 1px; }
body .modal-close { border-radius: 50% !important; width: 30px; height: 30px; }
body .modal-quick-nav { background: rgba(0, 0, 0, 0.35) !important; border-bottom: 1px solid var(--line2) !important; }
body .mqn-btn.active { background: linear-gradient(180deg, #5a4318, #2a1e0a) !important; border-color: var(--g2) !important; color: #fff0c8 !important; }

/* ---------- 背包 / 商店 ---------- */
.bag-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.bag-money { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #f7e3a0; }
.bag-money img { width: 18px; height: 18px; }
.bag-money span { color: var(--dim); font-size: 11px; margin-left: 8px; }
.bag-wrap { display: flex; gap: 10px; align-items: flex-start; }
.bag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; flex: 1; min-width: 0; max-height: 52vh; overflow-y: auto; padding: 6px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line2); }
.bag-cell { position: relative; aspect-ratio: 1; border: 1px solid #2c241a; background: radial-gradient(circle at 50% 40%, #1c1712, #0a0807); border-radius: 3px; cursor: pointer; }
.bag-cell img { width: 100%; height: 100%; }
.bag-cell.empty { cursor: default; opacity: .5; }
.bag-cell.sel { outline: 2px solid var(--g1); box-shadow: 0 0 10px rgba(233, 207, 140, 0.6); }
.bag-cell.r-blue { border-color: #2c4c8a; } .bag-cell.r-red { border-color: #8a2c22; } .bag-cell.r-purple { border-color: #6a2c9a; } .bag-cell.r-gold { border-color: #a8812c; }
.bag-cell.big { width: 64px; height: 64px; flex-shrink: 0; }
.bag-n { position: absolute; right: 2px; bottom: 0; font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 0 2px #000, 0 0 3px #000; font-family: Arial, sans-serif; }
.bag-enc { position: absolute; left: 2px; top: 0; font-size: 10px; font-weight: 900; color: #fde047; text-shadow: 0 0 2px #000; }
.bag-detail { width: 250px; flex-shrink: 0; padding: 10px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line2); }
.bag-detail.empty { color: var(--dim); font-size: 12px; text-align: center; padding: 30px 10px; }
.bd-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.bd-name { font-size: 15px; font-weight: 900; color: #f6e7c1; }
.bd-sub { font-size: 11px; color: var(--dim); }
.bd-desc { font-size: 12px; color: #d8cbb0; line-height: 1.6; min-height: 40px; }
.bd-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.bd-hint { margin-top: 8px; font-size: 10.5px; color: #c2a070; }
.shop-npc { font-size: 12px; color: #d8cbb0; font-style: italic; }
.shop-list { display: flex; flex-direction: column; gap: 5px; max-height: 56vh; overflow-y: auto; }
.shop-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: rgba(0, 0, 0, 0.32); border: 1px solid var(--line2); }
.shop-row .bag-cell { width: 46px; height: 46px; flex-shrink: 0; }
.shop-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shop-info b { font-size: 13px; color: #f6e7c1; } .shop-info span { font-size: 11px; color: var(--dim); } .shop-info em { font-size: 10.5px; color: #93c5fd; font-style: normal; }
.shop-buy { display: flex; align-items: center; gap: 5px; }
.shop-price { display: inline-flex; align-items: center; gap: 3px; color: #f7e3a0; font-size: 12px; font-weight: 700; margin-right: 4px; }
.shop-price img { width: 16px; height: 16px; }
.shop-foot { margin-top: 8px; text-align: right; }

/* ---------- 國家 ---------- */
.nat-hero { display: flex; gap: 14px; align-items: center; padding: 12px; margin-bottom: 10px; border: 1px solid var(--oc); background: linear-gradient(90deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.2)), radial-gradient(circle at 10% 50%, color-mix(in srgb, var(--oc) 25%, transparent), transparent 60%); }
.nat-medal { width: 76px; height: 76px; filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.9)); }
.nat-name { font-size: 20px; font-weight: 900; color: #f6e7c1; letter-spacing: 2px; }
.nat-line { font-size: 12px; color: #d8cbb0; margin-top: 3px; }
.nat-line.buff { color: #fde68a; }
.nat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nat-card { padding: 10px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line2); display: flex; flex-direction: column; gap: 4px; }
.nc-t { font-size: 11px; color: var(--dim); } .nc-v { font-size: 17px; font-weight: 900; color: #f6e7c1; } .nc-s { font-size: 10.5px; color: #b8a888; flex: 1; }
.nat-sec-t { margin: 12px 0 6px; font-size: 13px; color: var(--g1); border-bottom: 1px solid var(--line2); padding-bottom: 3px; }
.rank-list { display: flex; flex-direction: column; gap: 4px; }
.rank-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line2); font-size: 12.5px; }
.rank-row.me { border-color: var(--g2); background: rgba(80, 60, 20, 0.25); }
.rank-row em { font-style: normal; width: 18px; color: var(--g1); font-weight: 900; } .rank-row img { width: 26px; height: 26px; } .rank-row b { flex: 1; color: #f6e7c1; } .rank-row span { color: #b8a888; font-size: 11.5px; }
.terr-sums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.terr-sum { text-align: center; padding: 8px 4px; border: 1px solid var(--oc); background: rgba(0, 0, 0, 0.4); }
.terr-sum b { display: block; font-size: 22px; color: var(--oc); } .terr-sum span { font-size: 11px; color: #d8cbb0; }
.terr-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; max-height: 46vh; overflow-y: auto; }
.terr-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: rgba(0, 0, 0, 0.35); border-left: 3px solid var(--oc); border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); border-right: 1px solid var(--line2); }
.terr-name { flex: 1; font-size: 13px; font-weight: 900; color: #f6e7c1; } .terr-name small { display: block; font-size: 10px; color: var(--dim); font-weight: 400; }
.terr-owner { font-size: 12px; font-weight: 900; color: var(--oc); min-width: 32px; }
.terr-act { display: flex; gap: 4px; } .terr-act .v4-btn { padding: 4px 8px; font-size: 11px; } .terr-ok { font-size: 11px; color: #86efac; padding: 4px 6px; }

/* ---------- 系統設定 ---------- */
.sys-sec { margin-bottom: 12px; padding: 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line2); }
.sys-t { font-size: 13px; color: var(--g1); margin-bottom: 8px; letter-spacing: 1px; }
.sys-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 12.5px; color: #e5d8bc; flex-wrap: wrap; }
.sys-row > span:first-child { min-width: 110px; }
.sys-row input[type=range] { flex: 1; min-width: 120px; accent-color: #c9a45c; }
.sys-row input[type=checkbox] { width: 18px; height: 18px; accent-color: #c9a45c; }
.sys-btns { display: flex; gap: 5px; flex-wrap: wrap; } .sys-btns .v4-btn { padding: 4px 10px; font-size: 11.5px; }
.sys-help { font-size: 11.5px; color: var(--dim); line-height: 1.7; flex: 1; }

/* ---------- 東漢大地圖 ---------- */
#worldmap-overlay { position: fixed; inset: 0; z-index: 70; display: none; flex-direction: column; background: #060504; }
#worldmap-overlay.open { display: flex; }
.wm-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: linear-gradient(180deg, #2a2018, #110d0a); border-bottom: 1px solid #6a5226; flex-wrap: wrap; }
.wm-head > img { width: 28px; height: 28px; }
.wm-head > b { font-size: 17px; color: #f3dca0; letter-spacing: 2px; margin-right: auto; }
.wm-filters { display: flex; gap: 3px; flex-wrap: wrap; }
.wm-filters button { font-family: var(--font); font-size: 11px; padding: 3px 9px; color: var(--dim); background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line2); cursor: pointer; border-radius: 2px; }
.wm-filters button.active { color: #fff0c8; border-color: var(--g2); background: #3a2c12; }
.wm-zoom { display: flex; align-items: center; gap: 3px; }
.wm-zoom button { width: 26px; height: 24px; color: var(--g1); background: #1a1410; border: 1px solid var(--line2); cursor: pointer; font-weight: 900; }
.wm-zoom span { font-size: 11px; color: var(--txt); min-width: 40px; text-align: center; font-family: Arial, sans-serif; }
.wm-close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--g2); background: #2a1a10; color: #f3dca0; font-size: 16px; cursor: pointer; }
.wm-body { flex: 1; display: flex; min-height: 0; }
#wm-view { position: relative; flex: 1; overflow: hidden; cursor: grab; touch-action: none; background: #0a0d10; }
#wm-view:active { cursor: grabbing; }
#wm-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
#wm-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; user-select: none; pointer-events: none; }
#wm-markers { position: absolute; inset: 0; }
.wm-prov-label { position: absolute; cursor: pointer; text-align: center; white-space: nowrap; pointer-events: auto; transform-origin: center; }
.wm-prov-name { display: block; font-size: 30px; font-weight: 900; color: rgba(255, 236, 190, 0.85); letter-spacing: 6px; text-shadow: 0 0 6px #000, 0 2px 4px #000, 0 0 18px rgba(0, 0, 0, 0.9); }
.wm-prov-owner { display: block; font-size: 15px; font-weight: 900; text-shadow: 0 0 4px #000, 0 0 8px #000; }
.wm-prov-label.sel .wm-prov-name { color: #ffe08a; }
.wm-marker { position: absolute; display: flex; align-items: center; gap: 3px; cursor: pointer; white-space: nowrap; transform-origin: center; }
.wm-marker img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--mc); box-shadow: 0 0 0 2px #000, 0 0 10px rgba(0, 0, 0, 0.8); background: #000; }
.wm-marker.k-CASTLE img { width: 40px; height: 40px; border-radius: 6px; }
.wm-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--mc); border: 2px solid #000; box-shadow: 0 0 0 1px var(--mc), 0 0 8px var(--mc); }
.wm-mk-name { font-size: 13px; font-weight: 700; color: #fff3d6; text-shadow: 0 0 3px #000, 0 1px 2px #000, 0 0 6px #000; padding: 1px 4px; background: rgba(0, 0, 0, 0.45); border-radius: 2px; }
.wm-mk-name em { font-style: normal; font-size: 10.5px; color: var(--mc); }
.wm-marker.sel .wm-mk-name { background: rgba(120, 90, 30, 0.75); }
.wm-marker.sel img, .wm-marker.sel .wm-dot { box-shadow: 0 0 0 2px #fff, 0 0 14px #fff; }
.wm-you { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); font-size: 11px; font-weight: 900; color: #052e16; background: #4ade80; border-radius: 8px; padding: 0 6px; box-shadow: 0 0 10px #4ade80; animation: v4pulse 1.4s infinite; }
.wm-legend { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 8px; flex-wrap: wrap; padding: 5px 8px; background: rgba(0, 0, 0, 0.65); border: 1px solid var(--line2); font-size: 11px; color: #d8cbb0; pointer-events: none; }
.wm-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 3px; vertical-align: -1px; }
#wm-side { width: 330px; flex-shrink: 0; overflow-y: auto; padding: 8px; background: linear-gradient(180deg, #17120e, #0b0907); border-left: 1px solid #4a3818; display: flex; flex-direction: column; gap: 8px; }
.wm-ptabs { display: flex; flex-wrap: wrap; gap: 3px; }
.wm-ptab { font-family: var(--font); font-size: 12px; padding: 3px 8px; color: #e5d8bc; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line2); border-bottom: 2px solid var(--oc); cursor: pointer; }
.wm-ptab.sel { background: #3a2c12; color: #fff0c8; border-color: var(--g2); border-bottom-color: var(--oc); }
.wm-prov-card, .wm-zone-card { padding: 9px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line2); }
.wm-prov-title { display: flex; align-items: baseline; gap: 8px; } .wm-prov-title b { font-size: 18px; color: #f6e7c1; letter-spacing: 2px; } .wm-prov-title span { font-size: 11px; color: var(--dim); }
.wm-owner { margin-left: auto; font-size: 12px !important; font-weight: 900; color: var(--oc) !important; border: 1px solid var(--oc); padding: 0 6px; }
.wm-desc { font-size: 11.5px; color: #c9bb9c; line-height: 1.6; margin: 5px 0 7px; }
.wm-zone-list { display: flex; flex-direction: column; gap: 3px; }
.wm-zone-row { display: flex; align-items: center; gap: 6px; padding: 5px 6px; font-size: 12.5px; cursor: pointer; border: 1px solid transparent; background: rgba(255, 255, 255, 0.02); }
.wm-zone-row:hover { border-color: var(--line2); }
.wm-zone-row.sel { border-color: var(--g2); background: rgba(90, 66, 24, 0.35); }
.wm-zone-row .nm { flex: 1; color: #f0e2c0; } .wm-zone-row em { font-style: normal; font-size: 11px; color: var(--dim); }
.wm-kind { font-size: 10px; padding: 1px 5px; border-radius: 2px; color: #000; font-weight: 900; flex-shrink: 0; }
.wm-kind.k-VILLAGE { background: #e7d3a1; } .wm-kind.k-LOW { background: #86efac; } .wm-kind.k-MID { background: #fde047; } .wm-kind.k-HIGH { background: #fb923c; } .wm-kind.k-BOSS { background: #ef4444; color: #fff; } .wm-kind.k-CASTLE { background: #e6c670; }
.wm-zone-head { display: flex; align-items: center; gap: 6px; font-size: 15px; color: #fff0c8; margin-bottom: 5px; }
.wm-row { font-size: 12px; color: #d8cbb0; margin: 3px 0; } .wm-here { color: #4ade80; }
.wm-boss { display: flex; align-items: center; gap: 6px; margin: 6px 0; padding: 5px; background: rgba(90, 10, 6, 0.35); border: 1px solid rgba(220, 80, 60, 0.4); font-size: 12px; color: #fecaca; }
.wm-boss img { width: 24px; height: 24px; } .wm-boss em { margin-left: auto; font-style: normal; color: #fca5a5; font-size: 11px; }
.wm-mobs { display: flex; flex-wrap: wrap; gap: 3px; margin: 4px 0; }
.wm-chip { font-size: 10.5px; color: #e5d8bc; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line2); padding: 1px 5px; } .wm-chip em { font-style: normal; color: var(--dim); }
.wm-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; } .wm-actions .v4-btn { flex: 1; }

/* ---------- 標題 / 角色建立 ---------- */
#title-screen { position: fixed; inset: 0; z-index: 100; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; overflow-y: auto; padding: 20px 12px; }
#title-screen.open { display: flex; }
.ts-bg { position: fixed; inset: 0; background: url('../assets/img/world_han_map.jpg') center / cover no-repeat; filter: brightness(0.32) saturate(0.7) blur(1px); transform: scale(1.06); z-index: -1; }
.ts-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.85)); }
.ts-logo { text-align: center; }
.ts-name { font-size: clamp(44px, 10vw, 84px); font-weight: 900; letter-spacing: 0.25em; padding-left: 0.25em; color: #f3dca0;
  background: linear-gradient(180deg, #fff6d6 0%, #e9c878 45%, #8a6424 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 6px #000) drop-shadow(0 0 22px rgba(200, 150, 60, 0.35)); }
.ts-sub { font-size: clamp(13px, 2.6vw, 18px); color: #cbb68a; letter-spacing: 0.6em; padding-left: 0.6em; margin-top: 4px; text-shadow: 0 2px 4px #000; }
#ts-loading { width: min(420px, 86vw); text-align: center; }
.ts-bar { height: 6px; background: rgba(0, 0, 0, 0.6); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
#ts-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #8a6416, #f0d080); transition: width .2s; }
#ts-load-text { display: block; margin-top: 6px; font-size: 12px; color: #cbb68a; }
#ts-panel { width: min(900px, 96vw); display: flex; justify-content: center; }
.ts-menu { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.ts-menu .v4-btn.big { min-width: 260px; }
.ts-foot { position: fixed; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 11px; color: rgba(203, 182, 138, 0.6); pointer-events: none; }
.cc-wrap { width: 100%; display: flex; flex-direction: column; gap: 10px; align-items: stretch; padding: 14px; background: rgba(8, 6, 5, 0.78); border: 1px solid var(--line); box-shadow: 0 0 40px rgba(0, 0, 0, 0.8); }
.cc-title { font-size: 14px; color: var(--g1); letter-spacing: 3px; border-bottom: 1px solid var(--line2); padding-bottom: 4px; }
.cc-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cc-card { position: relative; cursor: pointer; border: 1px solid #3a2c18; transition: transform .15s, border-color .15s, box-shadow .15s; background: #000; }
.cc-card img { width: 100%; display: block; aspect-ratio: 3 / 4; object-fit: cover; }
.cc-card .cc-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; background: linear-gradient(0deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0)); display: none; }
.cc-card:hover { transform: translateY(-3px); border-color: var(--g3); }
.cc-card.sel { border-color: var(--g1); box-shadow: 0 0 0 1px var(--g1), 0 0 22px rgba(233, 207, 140, 0.45); }
.cc-desc { font-size: 12.5px; color: #d8cbb0; line-height: 1.7; padding: 8px 10px; background: rgba(0, 0, 0, 0.4); border-left: 2px solid var(--g2); }
.cc-desc b { color: #f6e7c1; }
.cc-nats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cc-nat { display: flex; align-items: center; gap: 8px; padding: 6px 8px; cursor: pointer; border: 1px solid var(--line2); background: rgba(0, 0, 0, 0.45); }
.cc-nat img { width: 44px; height: 44px; }
.cc-nat b { display: block; font-size: 16px; color: var(--oc); } .cc-nat span { font-size: 11px; color: var(--dim); }
.cc-nat.sel { border-color: var(--oc); box-shadow: inset 0 0 18px color-mix(in srgb, var(--oc) 30%, transparent); }
.cc-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#cc-name { flex: 1; min-width: 180px; font-family: var(--font); font-size: 15px; padding: 10px 12px; color: #f6e7c1; background: rgba(0, 0, 0, 0.6); border: 1px solid var(--line); outline: none; user-select: text; -webkit-user-select: text; }
#cc-name:focus { border-color: var(--g1); }

/* ============================================================ 響應式 ============================================================ */
/* 手機直向 (直版) */
@media (max-aspect-ratio: 1/1) {
  :root { --nav-h: 54px; --qb-s: 42px; }
  .pl-plate { min-width: 0; width: min(260px, 64vw); padding: 5px 8px 5px 5px; }
  .pl-face-wrap, .pl-face { width: 48px; height: 48px; }
  body .player-name { max-width: 110px; font-size: 13px; }
  #buff-bar { max-width: 64vw; }
  #radar-panel { width: 120px; }
  #radar-panel #minimap-box { width: 120px; height: 120px; }
  .radar-map-btn { top: 6px; right: 8px; width: 24px; height: 24px; }
  #left-dock { top: 118px; }
  #left-dock .dock-sq-item { width: 42px; height: 42px; }
  #left-dock .dock-sq-item .dark-ico { width: 24px; height: 24px; }
  body #target-lock-hud { top: auto; bottom: calc(var(--nav-h) + var(--exp-h) + var(--qb-s) + 250px); width: 62vw; }
  body #world-boss-broadcast { top: 132px; left: 8px !important; right: 8px !important; width: auto !important; transform: none !important; }
  #quick-bar { left: 0; right: 0; transform: none; justify-content: center; border-radius: 0; border-left: none; border-right: none; padding: 3px; }
  #action-cluster { right: 4px; bottom: calc(var(--nav-h) + var(--exp-h) + var(--qb-s) + 16px + var(--safe-b)); transform: scale(0.86); transform-origin: right bottom; }
  body #joystick-zone { left: 12px; bottom: calc(var(--nav-h) + var(--exp-h) + var(--qb-s) + 26px + var(--safe-b)); width: 108px; height: 108px; }
  body #bottom-strip-container { left: 8px; width: calc(100vw - 16px); bottom: calc(var(--nav-h) + var(--exp-h) + var(--qb-s) + 218px + var(--safe-b)); max-width: none; }
  body #live-ticker-box .ticker-header { padding: 3px 6px; font-size: 10.5px; }
  body #bottom-nav .nav-circle, body #bottom-nav .nav-circle img { width: 30px; height: 30px; }
  body #bottom-nav .nav-label { font-size: 10px; letter-spacing: 0; }
  .wm-body { flex-direction: column; }
  #wm-side { width: auto; height: 42%; border-left: none; border-top: 1px solid #4a3818; }
  .wm-head > b { font-size: 14px; }
  .bag-wrap { flex-direction: column; }
  .bag-detail { width: auto; align-self: stretch; }
  .bag-grid { max-height: 38vh; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
  .nat-grid { grid-template-columns: 1fr; }
  .terr-list { grid-template-columns: 1fr; }
  .cc-cards { grid-template-columns: repeat(2, 1fr); }
  .cc-cards .cc-card img { aspect-ratio: 4 / 5; }
  .cc-nats { grid-template-columns: 1fr; }
  .shop-row { flex-wrap: wrap; } .shop-buy { width: 100%; justify-content: flex-end; }
}
/* 手機橫向 (高度不足) */
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  :root { --nav-h: 44px; --qb-s: 38px; --exp-h: 4px; }
  .pl-plate { min-width: 210px; padding: 3px 8px 3px 3px; }
  .pl-face-wrap, .pl-face { width: 42px; height: 42px; }
  #radar-panel { width: 110px; } #radar-panel #minimap-box { width: 110px; height: 110px; }
  #left-dock { top: 96px; padding: 2px; } #left-dock .dock-sq-item { width: 36px; height: 36px; } #left-dock .dock-sq-item .txt { display: none; }
  #action-cluster { transform: scale(0.74); transform-origin: right bottom; }
  body #joystick-zone { width: 92px; height: 92px; left: 56px; }
  body #bottom-strip-container { left: 160px; width: 30vw; }
  body #bottom-nav .nav-circle, body #bottom-nav .nav-circle img { width: 26px; height: 26px; }
  body #bottom-nav .nav-label { font-size: 9.5px; }
  #zoom-control-pill { display: none !important; }
}
/* 寬螢幕 */
@media (min-width: 1400px) and (min-aspect-ratio: 1/1) {
  #radar-panel { width: 200px; } #radar-panel #minimap-box { width: 200px; height: 200px; }
  #left-dock { top: 140px; }
}
