/* ============================================================================
 * 三國天命 v6.0 — 暗黑 MMORPG 介面 (v6.css，覆寫 v4 / v5)
 * 直版優先（手機直向）＋ 橫向 / 桌機自適應
 * 頂部：斜切漸層血魔條｜右上：常用功能 + 雷達 + 縮放｜右下：攻擊集成盤｜左下：聊天 + 快捷欄
 * 面板：全螢幕 (#p6) / 側邊 (#p6side) / 通知 (#p6-notice)
 * ========================================================================== */
:root {
  --nav-h: 0px !important;
  --c-gold: #f5cc5c; --c-gold2: #e6dfcb; --c-gold3: #e9af0f; --c-ink: #18233b;
  --c-pan: #1d2a48; --c-pan2: #223053; --c-pan3: #273860; --c-line: #3a548f; --c-line2: #2a3d68;
  --c-txt: #f0ece0; --c-dim: #b5bed0; --c-ok: #86efac; --c-red: #e05a4a;
  --hp-a: #b0382f; --hp-b: #7a1a15; --hp-c: #3f0806; --mp-a: #3b98ad; --mp-b: #1d6377; --mp-c: #0a3240;
  --ac-s: 1;
}
body #bottom-nav { display: none !important; }

/* ===================================================================== 頂部：角色資訊 */
body #top-bar { top: max(6px, env(safe-area-inset-top, 0px)); left: max(6px, env(safe-area-inset-left, 0px)); gap: 3px; }
body .pl-plate {
  display: grid !important; grid-template-columns: auto auto auto; grid-template-areas: "face meta res"; align-items: center; column-gap: 8px; row-gap: 2px;
  min-width: 0 !important; width: auto !important; padding: 4px 18px 4px 4px !important; border-radius: 30px 0 0 30px !important;
  background: linear-gradient(90deg, rgba(18, 25, 43, 0.55), rgba(18, 25, 43, 0.32) 70%, rgba(18, 25, 43, 0)) !important; border: none !important; box-shadow: none !important;
}
body .pl-face-wrap { grid-area: face; width: 44px !important; height: 44px !important; }
body .pl-face { width: 44px !important; height: 44px !important; border-width: 1px !important; border-color: var(--c-gold3) !important; }
body .pl-level { min-width: 22px; height: 17px; line-height: 15px; font-size: 11px; left: -4px; bottom: -3px; }
body .class-crest { width: 17px !important; height: 17px !important; font-size: 9.5px !important; }
body .pl-meta { grid-area: meta; gap: 3px !important; width: clamp(150px, 24vw, 250px); }
body .pl-row1 { gap: 5px; }
body .player-name { font-size: 13px !important; max-width: 140px !important; letter-spacing: .5px; }
body .nation-crest-btn { padding: 0 5px 0 1px !important; }
body .nation-crest-btn .dark-ico { width: 16px !important; height: 16px !important; }
body .nation-crest-btn .n-txt { font-size: 10.5px !important; }
.pl-res { grid-area: res; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; white-space: nowrap; }
body .pl-res .adena-inline { font-family: var(--font); font-size: 13px; font-weight: 700; color: #f2eee3; text-shadow: 0 1px 2px #12192b; }
body .pl-res .adena-inline .dark-ico-sm { width: 18px !important; height: 18px !important; }
body .pl-res .combat-power { font-size: 11px; color: #f5cc5c; }
/* 斜切漸層血魔條 */
body .pl-bar { height: 18px !important; border: none !important; border-radius: 0 !important; cursor: pointer; overflow: hidden;
  background: linear-gradient(180deg, #120c0b, #1d1513) !important; box-shadow: none !important;
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
body .pl-bar::after { content: ''; position: absolute; inset: 0; pointer-events: none; clip-path: inherit;
  box-shadow: inset 0 0 0 1px rgba(18, 25, 43, 0.85), inset 0 1px 0 rgba(250, 249, 245, 0.07);
  background: repeating-linear-gradient(115deg, rgba(250, 249, 245, 0.035) 0 2px, rgba(18, 25, 43, 0) 2px 6px); }
body .pl-bar.mp { height: 15px !important; margin-left: 2px; }
body .pl-bar .bar-fill-hp { background: linear-gradient(180deg, #d9584c 0%, var(--hp-a) 22%, var(--hp-b) 62%, var(--hp-c) 100%) !important; box-shadow: inset -2px 0 4px rgba(255, 120, 100, 0.35); }
body .pl-bar .bar-fill-mp { background: linear-gradient(180deg, #6cc7d8 0%, var(--mp-a) 22%, var(--mp-b) 62%, var(--mp-c) 100%) !important; box-shadow: inset -2px 0 4px rgba(120, 220, 240, 0.3); }
body .pl-bar .bar-text { font-family: var(--font) !important; font-size: 12.5px !important; line-height: 18px !important; font-weight: 700 !important; letter-spacing: .5px; color: #faf9f5 !important;
  text-shadow: 0 0 2px #12192b, 0 1px 2px #12192b, 1px 0 1px #12192b !important; z-index: 1; }
body .pl-bar.mp .bar-text { font-size: 11px !important; line-height: 15px !important; }
body #buff-bar { padding-left: 50px; max-width: 70vw; gap: 3px; }
body #buff-bar .buff { width: 24px; height: 24px; border-color: rgba(128, 143, 174, 0.6); }

/* ===================================================================== 右上：功能列 + 雷達 + 縮放 */
body #radar-panel { top: max(6px, env(safe-area-inset-top, 0px)); right: max(6px, env(safe-area-inset-right, 0px)); width: auto !important; gap: 5px; align-items: flex-end; }
body #func-strip { display: flex !important; gap: 3px; width: auto !important; grid-template-columns: none !important; }
body .fs-item { width: 44px; height: 44px !important; border-radius: 4px; padding: 0; background: rgba(22, 32, 54, 0.55); border: 1px solid rgba(128, 143, 174, 0.35); }
body .fs-item:hover { border-color: var(--c-gold); background: rgba(32, 47, 79, 0.75); }
body .fs-item img { width: 26px !important; height: 26px !important; filter: sepia(.35) saturate(.8) brightness(1.05); }
body .fs-item span { font-size: 10px !important; color: #ede8da; }
.fs-menu .burger { display: flex; flex-direction: column; gap: 4px; width: 22px; padding: 3px 0 2px; }
.fs-menu .burger i { display: block; height: 2px; background: linear-gradient(90deg, #e9af0f, #e6dfcb, #e9af0f); border-radius: 1px; }
.radar-row { display: flex; align-items: flex-start; gap: 4px; }
body #radar-panel #minimap-box { position: relative; width: 150px; height: 150px; border-radius: 50%; padding: 0; overflow: hidden; cursor: pointer; border: 2px solid #e6ad0f !important;
  background: #141d32 !important; box-shadow: 0 0 0 2px #12192b, 0 4px 14px rgba(18, 25, 43, 0.8) !important; }
body #radar-panel #minimap-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border-radius: 50%; display: block; }
body #radar-panel .radar-ring { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; box-shadow: inset 0 0 0 3px rgba(18, 25, 43, 0.9), inset 0 0 0 5px rgba(245, 204, 92, 0.45), inset 0 0 18px rgba(18, 25, 43, 0.9); }
body #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: 10px; color: #eae4d3; text-shadow: 0 0 3px #12192b, 0 1px 2px #12192b; white-space: nowrap; max-width: 90%; overflow: hidden; }
body #radar-panel .minimap-hdr #ui-coords-text { font-size: 9px; color: #f5cc5c; font-family: Arial, sans-serif; }
body #zoom-control-pill { display: flex !important; flex-direction: column !important; align-items: center; gap: 3px; padding: 3px; border-radius: 16px; background: rgba(18, 25, 43, 0.55) !important; border: 1px solid rgba(128, 143, 174, 0.4) !important; width: auto; align-self: center; }
body #zoom-control-pill .zoom-step-btn { width: 28px; height: 28px; border-radius: 50%; font-size: 15px; line-height: 1; border: 1px solid #3d5896; background: radial-gradient(circle at 50% 35%, #293a64, #18233b); color: var(--c-gold2); cursor: pointer; padding: 0; }
body #zoom-control-pill .zoom-step-btn:active { transform: scale(.92); }
body #zoom-control-pill #ui-zoom-val { font-size: 10px; min-width: 32px; color: var(--c-txt); }
body #world-boss-pill { position: static; width: auto !important; height: auto !important; flex-direction: row !important; gap: 4px !important; padding: 3px 10px !important; border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(70, 14, 10, 0.8), rgba(25, 5, 4, 0.85)) !important; border: 1px solid rgba(200, 80, 60, 0.55) !important; cursor: pointer; }
body #world-boss-pill span { font-size: 11px !important; color: #fecaca; }

/* ===================================================================== 任務追蹤 / 目標框 */
body #quest-tracker { top: 112px; width: 228px; }
body #target-lock-hud { top: 8px !important; }

/* ===================================================================== 聊天 + 快捷欄 + 經驗條 */
body #exp-bar { bottom: var(--safe-b) !important; height: 4px !important; z-index: 26; }
body #ui-exp-text { top: -14px; right: 6px; }
body #chat-panel { left: max(6px, env(safe-area-inset-left, 0px)); bottom: calc(var(--safe-b) + 58px); width: min(380px, 32vw); z-index: 26; border-color: rgba(128, 143, 174, 0.3); }
body #chat-panel.open { z-index: 66; }
body #quick-bar { left: auto !important; right: calc(260px * var(--ac-s) + 10px) !important; transform: none !important; bottom: calc(var(--safe-b) + 10px) !important;
  padding: 3px !important; gap: 3px !important; border-radius: 4px !important; background: rgba(21, 30, 51, 0.55) !important; }
body .qb-slot { width: 42px; height: 42px; border-color: rgba(128, 143, 174, 0.35); background: rgba(18, 25, 43, 0.5); }
body #joystick-zone { left: max(18px, env(safe-area-inset-left, 0px)) !important; bottom: calc(var(--safe-b) + 150px) !important; }

/* ===================================================================== 右下：攻擊操作集成盤 */
body #action-cluster { position: fixed; right: max(6px, env(safe-area-inset-right, 0px)) !important; bottom: calc(var(--safe-b) + 10px) !important; width: 230px !important; height: 270px !important;
  transform: scale(var(--ac-s)) !important; transform-origin: right bottom !important; z-index: 24; pointer-events: none; }
body #action-cluster > *, body #action-cluster .ac-util > * { pointer-events: auto; }
body #btn-attack { position: absolute !important; left: 134px !important; top: 174px !important; right: auto !important; bottom: auto !important; width: 88px !important; height: 88px !important;
  border: 2px solid #f0b71a !important; background: radial-gradient(circle at 50% 38%, #2f4473, #19243d 72%) !important;
  box-shadow: 0 0 0 3px rgba(18, 25, 43, 0.85), 0 0 0 5px rgba(240, 183, 24, 0.35), 0 6px 16px rgba(18, 25, 43, 0.85) !important; }
body #btn-attack img { width: 74% !important; height: 74% !important; margin: 13%; border-radius: 0 !important; filter: sepia(.4) brightness(1.1); }
body #skill-hotkey-drawer .hk-slot { width: 48px !important; height: 48px !important; border: 2px solid #3f5a9a !important; background: radial-gradient(circle, #202e4e, #161f35) !important; }
body #skill-hotkey-drawer .hk-slot.auto-on { border-color: #6f9a52 !important; }
body #skill-hotkey-drawer .hk-slot .key { bottom: -7px !important; font-size: 8px !important; }
body #skill-hotkey-drawer .hk-slot .hk-auto-tag { top: -3px !important; right: -3px !important; width: 14px; height: 14px; padding: 0 !important; border-radius: 50% !important; font-size: 8px !important; line-height: 13px; text-align: center; font-family: Arial, sans-serif; }
body #hk-slot-SKILL_SONIC_BLADE { left: 68px !important; top: 194px !important; right: auto !important; bottom: auto !important; }
body #hk-slot-SKILL_SHOCK_STUN { left: 88px !important; top: 139px !important; right: auto !important; bottom: auto !important; }
body #hk-slot-SKILL_TRIPLE_ARROW { left: 139px !important; top: 109px !important; right: auto !important; bottom: auto !important; }
body #hk-slot-SKILL_THUNDER_BOLT { left: 98px !important; top: 52px !important; right: auto !important; bottom: auto !important; }
body #hk-slot-SKILL_HEAL_SELF { left: 15px !important; top: 138px !important; right: auto !important; bottom: auto !important; width: 48px !important; height: 48px !important; }
body #hk-slot-SKILL_SOVEREIGN_DECREE { left: 36px !important; top: 88px !important; right: auto !important; bottom: auto !important; width: 48px !important; height: 48px !important; }
.ac-util { position: absolute; left: 42px; top: 0; display: flex; gap: 8px; pointer-events: none; }
.ac-u, body #action-cluster #nav-hunt { position: relative !important; inset: auto !important; width: 40px !important; height: 40px !important; border-radius: 50% !important; padding: 0 !important; margin: 0 !important; cursor: pointer;
  border: 1px solid #e6ad0f !important; background: radial-gradient(circle at 50% 35%, #283961, #17223a 75%) !important; box-shadow: 0 0 0 2px rgba(18, 25, 43, 0.8), 0 3px 8px rgba(18, 25, 43, 0.7) !important;
  display: flex !important; align-items: center; justify-content: center; animation: none; }
.ac-u img { width: 24px; height: 24px; filter: sepia(.4) brightness(1.1); }
.ac-u b { position: absolute; top: -4px; right: -4px; min-width: 15px; height: 15px; border-radius: 8px; background: #8a1c14; color: #faf9f5; font-size: 9px; line-height: 15px; font-family: Arial, sans-serif; padding: 0 3px; }
.ac-u b:empty { display: none; }
#ac-pick.has { border-color: #f5cc5c !important; box-shadow: 0 0 0 2px #12192b, 0 0 10px rgba(245, 204, 92, 0.55) !important; }
.ac-target { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #f5cc5c; position: relative; }
.ac-target::before, .ac-target::after { content: ''; position: absolute; background: #f5cc5c; }
.ac-target::before { left: 50%; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; }
.ac-target::after { top: 50%; left: -6px; right: -6px; height: 2px; margin-top: -1px; }
body #action-cluster #nav-hunt img { position: absolute !important; inset: 6px !important; width: 28px !important; height: 28px !important; opacity: .5 !important; }
body #action-cluster #nav-hunt #nav-hunt-label { position: relative !important; bottom: auto !important; font-family: Georgia, var(--font); font-size: 10px !important; font-weight: 900; color: #f0ebdf !important; letter-spacing: .5px; z-index: 1; }
body #action-cluster #nav-hunt.active { border-color: #7fb26a !important; box-shadow: 0 0 0 2px #12192b, 0 0 12px rgba(127, 178, 106, 0.75) !important; }
body #action-cluster #nav-hunt.active #nav-hunt-label { color: #c9f7b5 !important; }

/* ===================================================================== 遊戲選單 (分類分欄) */
body #mega-menu { background: rgba(18, 25, 43, 0.45) !important; backdrop-filter: blur(2px); justify-content: flex-end !important; align-items: stretch !important; z-index: 68 !important; }
body #mega-menu .mm-box { width: min(560px, 100vw) !important; height: 100%; padding: 10px 14px calc(14px + var(--safe-b)) !important; overflow-y: auto; border: none !important; border-left: 1px solid var(--c-line) !important;
  background: linear-gradient(180deg, rgba(29, 41, 71, 0.97), rgba(23, 34, 58, 0.98)) !important; display: flex; flex-direction: column; }
body #mega-menu .mm-head { margin-bottom: 4px; padding-top: env(safe-area-inset-top, 0px); }
body #mega-menu .mm-head b { font-size: 15px; letter-spacing: 4px; color: var(--c-gold2); }
body #mega-menu .mm-grid { display: block !important; }
.mm-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 4px 2px; padding: 6px 0; }
.mm-row.top { border-bottom: 1px solid var(--c-line); padding-bottom: 10px; margin-bottom: 4px; }
.mm-sec { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--c-dim); letter-spacing: 2px; }
.mm-sec::before, .mm-sec::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--c-line), transparent); }
body .mm-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px !important; background: none !important; border: none !important; border-radius: 4px; cursor: pointer; color: var(--c-txt); font-family: var(--font); min-width: 0; }
body .mm-item:hover { background: rgba(245, 204, 92, 0.08) !important; }
.mm-ic { position: relative; width: 44px; height: 44px; }
.mm-ic img { width: 44px !important; height: 44px !important; filter: grayscale(.55) sepia(.35) brightness(1.15) contrast(1.05); }
.mm-item:hover .mm-ic img { filter: sepia(.25) brightness(1.3); }
.mm-l { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-shadow: 0 1px 2px #12192b; }
.mm-item.lock .mm-ic img { filter: grayscale(1) brightness(.6); }
.mm-item.lock .mm-l { color: var(--c-dim); }
i.lk { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; transform: rotate(45deg); background: #3a0e0b; border: 1px solid #c0503f; }
i.lk::after { content: ''; position: absolute; left: 4px; top: 4px; width: 6px; height: 6px; transform: rotate(-45deg); border-radius: 1px; background: #ede8da; }
i.dot, em.dot { position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: #e0412f; box-shadow: 0 0 6px #e0412f; font-style: normal; }

/* ===================================================================== 共用面板元件 */
.p6, .p6side { display: none; }
.p6.open { display: block; position: fixed; inset: 0; z-index: 70; background: radial-gradient(ellipse at 50% 30%, rgba(34, 49, 84, 0.94), rgba(21, 30, 51, 0.985) 75%); color: var(--c-txt); font-family: var(--font); }
.p6side.open { display: block; position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 70; color: var(--c-txt); font-family: var(--font);
  background: linear-gradient(180deg, rgba(31, 45, 76, 0.98), rgba(24, 35, 60, 0.985)); border-left: 1px solid var(--c-line); box-shadow: -10px 0 40px rgba(18, 25, 43, 0.7); }
.p6-frame { display: flex; flex-direction: column; height: 100%; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.p6-top { flex-shrink: 0; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; padding: 6px 12px; min-height: 52px;
  background: linear-gradient(180deg, rgba(18, 25, 43, 0.6), rgba(18, 25, 43, 0.2)); border-bottom: 1px solid var(--c-line2); }
.p6-vit { display: flex; flex-direction: column; gap: 3px; width: clamp(150px, 22vw, 260px); }
.p6-mbar { position: relative; height: 15px; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); background: #1c2844; }
.p6-mbar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #d9584c, var(--hp-a) 25%, var(--hp-b) 65%, var(--hp-c)); }
.p6-mbar.mp i { background: linear-gradient(180deg, #6cc7d8, var(--mp-a) 25%, var(--mp-b) 65%, var(--mp-c)); }
.p6-mbar span { position: relative; display: block; text-align: center; font-size: 11px; line-height: 15px; font-weight: 700; color: #faf9f5; text-shadow: 0 0 2px #12192b, 0 1px 2px #12192b; }
.p6-cur { display: flex; justify-content: center; gap: 10px; }
.p6-cur span { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 4px; border: 1px solid var(--c-line2); background: rgba(18, 25, 43, 0.5); font-size: 12.5px; font-family: Arial, var(--font); color: #f2eee3; border-radius: 2px; }
.p6-cur span.dim { color: #d9c8f7; }
.p6-cur img { width: 18px; height: 18px; }
.p6-title { display: flex; align-items: center; gap: 6px; }
.p6-title img { width: 26px; height: 26px; filter: sepia(.3); }
.p6-title b { font-size: 18px; letter-spacing: 3px; color: var(--c-gold2); text-shadow: 0 1px 3px #12192b; white-space: nowrap; }
.p6-x { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; border: 1px solid #e6ad0f; background: radial-gradient(circle at 50% 35%, #2a3c67, #17223a 75%); color: var(--c-gold2); font-size: 16px; cursor: pointer; box-shadow: 0 0 0 2px #12192b; }
.p6-x:hover { filter: brightness(1.3); }
.p6-x.sm { width: 26px; height: 26px; font-size: 12px; }
.p6-tabs { flex-shrink: 0; display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--c-line2); overflow-x: auto; scrollbar-width: none; }
.p6-tabs::-webkit-scrollbar { display: none; }
.p6-tab { position: relative; padding: 10px 18px 9px; font-family: var(--font); font-size: 14px; color: var(--c-dim); background: none; border: none; cursor: pointer; white-space: nowrap; }
.p6-tab.on { color: var(--c-gold2); }
.p6-tab.on::after { content: ''; position: absolute; left: 10%; right: 10%; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--c-gold), transparent); }
.p6-body { flex: 1; min-height: 0; display: flex; }
.p6-main { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; padding: 12px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.p6-main.full { display: flex; flex-direction: column; }
.p6-rail { flex-shrink: 0; width: 72px; display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-right: 1px solid var(--c-line2); background: rgba(18, 25, 43, 0.35); overflow-y: auto; }
.p6-rail button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; background: none; border: none; border-left: 2px solid transparent; color: var(--c-dim); font-family: var(--font); font-size: 11px; cursor: pointer; }
.p6-rail button img { width: 30px; height: 30px; filter: grayscale(.6) brightness(.85); }
.p6-rail button.on { color: var(--c-gold2); border-left-color: var(--c-gold); background: linear-gradient(90deg, rgba(245, 204, 92, 0.14), transparent); }
.p6-rail button.on img { filter: none; }
.p6-rail button .dot { top: 6px; right: 14px; }
.p6-card { position: relative; background: linear-gradient(180deg, rgba(36, 51, 87, 0.9), rgba(27, 38, 65, 0.92)); border: 1px solid var(--c-line2); box-shadow: inset 0 1px 0 rgba(241, 237, 225, 0.04); padding: 12px; min-width: 0; }
.p6-card h3 { margin: -12px -12px 10px; padding: 10px 14px; font-size: 15px; letter-spacing: 3px; text-align: center; color: var(--c-gold2); font-weight: 700;
  background: linear-gradient(180deg, #314677, #223154); border-bottom: 1px solid var(--c-line); }
.p6-h4 { margin: 12px 0 6px; font-size: 12.5px; color: var(--c-gold); font-weight: 700; display: flex; align-items: baseline; gap: 6px; }
.p6-h4 small { color: var(--c-dim); font-weight: 400; }
.p6-btn { font-family: var(--font); font-size: 13px; font-weight: 700; color: var(--c-txt); cursor: pointer; padding: 8px 16px; border: 1px solid #3a548f; border-radius: 2px;
  background: linear-gradient(180deg, #32487b, #26365c 55%, #1f2d4c); box-shadow: inset 0 1px 0 rgba(241, 237, 225, 0.12), 0 2px 4px rgba(18, 25, 43, 0.6); white-space: nowrap; text-shadow: 0 1px 2px #12192b; }
.p6-btn:hover { filter: brightness(1.18); }
.p6-btn:disabled { opacity: .45; cursor: default; filter: none; }
.p6-btn small { font-size: 10.5px; color: var(--c-dim); font-weight: 400; margin-left: 2px; }
.p6-btn.gold { color: #faf9f5; border-color: #f2be31; background: linear-gradient(180deg, #425ea1, #304576 55%, #233356); }
.p6-btn.gold small { color: #e1d8c0; }
.p6-btn.on { border-color: #6f9a52; color: #d9f7c8; }
.p6-btn.big { font-size: 15px; padding: 10px 26px; letter-spacing: 2px; }
.p6-btnrow { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.p6-btnrow.wrap { flex-wrap: wrap; }
.p6-btnrow > * { flex: 1 1 auto; min-width: 0; }
.p6-chip { display: inline-flex; align-items: center; justify-content: center; padding: 3px 10px; font-size: 11.5px; border: 1px solid var(--c-line); color: var(--c-dim); background: rgba(18, 25, 43, 0.4); white-space: nowrap; }
.p6-chip.on { color: #b9eaa2; border-color: #4f6e3c; }
.p6-chip.gold { color: #ebe6d6; border-color: #f2be31; }
.p6-round { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #e6ad0f; background: radial-gradient(circle at 50% 35%, #2a3c67, #17223a 75%); color: var(--c-gold2); font-size: 18px; cursor: pointer; padding: 0; box-shadow: 0 0 0 2px #12192b; flex-shrink: 0; }
.p6-round.glow { box-shadow: 0 0 0 2px #12192b, 0 0 12px rgba(245, 204, 92, 0.7); animation: p6pulse 1.6s infinite; }
@keyframes p6pulse { 50% { box-shadow: 0 0 0 2px #12192b, 0 0 20px rgba(245, 204, 92, 0.95); } }
.p6-ib { width: 34px; height: 34px; border: 1px solid var(--c-line2); background: rgba(18, 25, 43, 0.45); border-radius: 3px; cursor: pointer; padding: 3px; }
.p6-ib img { width: 100%; height: 100%; filter: sepia(.35); }
.p6-prog { position: relative; height: 4px; background: #18233b; border: 1px solid #273860; overflow: hidden; margin-top: 4px; }
.p6-prog i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #e9af0f, #e6dfcb); }
.p6-prog.warn i { background: linear-gradient(90deg, #8a2c22, #e05a4a); }
.p6-empty { padding: 30px 12px; text-align: center; color: var(--c-dim); font-size: 13px; line-height: 1.8; }
.p6-note { font-size: 12px; color: var(--c-dim); padding: 8px 10px; margin-bottom: 10px; border-left: 2px solid var(--c-gold3); background: rgba(18, 25, 43, 0.3); }
.p6-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; padding: 8px 12px; margin-bottom: 10px; font-size: 12.5px; background: rgba(18, 25, 43, 0.35); border: 1px solid var(--c-line2); }
.p6-banner b { color: var(--c-gold2); }
.p6-scroll { overflow-y: auto; min-height: 0; flex: 1; }
.p6-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 4px; background: rgba(18, 25, 43, 0.3); border: 1px solid var(--c-line2); }
.p6-row > img, .p6-row .r-ico { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.p6-row.cur { border-color: var(--c-gold3); background: rgba(245, 204, 92, 0.07); }
.p6-row.dim { opacity: .55; }
.r-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.r-main b { font-size: 14px; } .r-main span { font-size: 12px; color: #c7cedb; } .r-main small { font-size: 11px; color: var(--c-dim); }
.r-act { flex-shrink: 0; }
.p6-grid > .p6-empty, .mo-grid > .p6-empty, .kn-cards > .p6-empty { grid-column: 1 / -1; }
.p6-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 4px; }
/* 道具格 */
.p6-cell { position: relative; aspect-ratio: 1; min-width: 0; border: 1px solid #2b3d68; background: radial-gradient(circle at 50% 40%, #223053, #17223a); cursor: pointer; }
.p6-cell::before { content: ''; position: absolute; inset: 2px; border: 1px solid rgba(241, 237, 225, 0.04); pointer-events: none; }
.p6-cell img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
.p6-cell b { position: absolute; right: 3px; bottom: 1px; font-size: 11px; font-weight: 700; color: #faf9f5; text-shadow: 0 0 2px #12192b, 0 0 3px #12192b; font-family: Arial, sans-serif; }
.p6-cell em { position: absolute; left: 3px; top: 1px; font-style: normal; font-size: 10.5px; font-weight: 900; color: #e2dbc3; text-shadow: 0 0 2px #12192b; font-family: Arial, sans-serif; }
.p6-cell.empty { cursor: default; background: rgba(18, 25, 43, 0.35); }
.p6-cell.rc { border-color: color-mix(in srgb, var(--rc) 70%, #12192b); box-shadow: inset 0 0 10px color-mix(in srgb, var(--rc) 25%, transparent); }
.p6-cell.sel { outline: 2px solid var(--c-gold2); outline-offset: -1px; box-shadow: 0 0 10px rgba(230, 223, 203, 0.45); }
.p6-cell.big { width: 58px; height: 58px; flex-shrink: 0; cursor: default; }

/* ===================================================================== 角色資訊 */
.ch-grid { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(280px, 1fr); gap: 12px; max-width: 1100px; margin: 0 auto; }
.ch-ribbon { display: flex; justify-content: center; margin: -2px 0 6px; }
.ch-ribbon span { padding: 5px 34px; font-size: 14px; letter-spacing: 3px; font-weight: 700; background: linear-gradient(180deg, #3a538e, #293a64); border: 1px solid #7888a8;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%); }
.ch-stage { display: flex; align-items: flex-end; gap: 10px; padding: 0 4px; }
.ch-model { width: 132px; height: 176px; object-fit: contain; object-position: bottom; filter: drop-shadow(0 6px 10px #000); flex-shrink: 0; }
.ch-model.sm { width: 110px; height: 146px; }
.ch-id { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; min-width: 0; }
.ch-id b { font-size: 16px; color: #f7f5ee; }
.ch-id span { font-size: 12px; color: var(--c-dim); }
.ch-id .gold { color: #f5cc5c; font-size: 13px; }
.ch-pts { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px auto 2px; padding: 4px 6px 4px 16px; width: max-content; background: rgba(18, 25, 43, 0.5); border: 1px solid var(--c-line2); }
.ch-pts span { font-size: 12px; color: var(--c-dim); } .ch-pts b { font-size: 18px; color: #faf9f5; min-width: 26px; text-align: center; font-family: Arial, var(--font); }
.hx-wrap { position: relative; width: min(260px, 74vw); aspect-ratio: 1; margin: 6px auto 0; }
.hx-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hx-lines polygon { fill: rgba(217, 180, 106, 0.04); stroke: #5d4f38; stroke-width: 1.5; }
.hx-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34%; aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle, #223053, #17223a); border: 2px solid #7888a8; box-shadow: 0 0 0 3px #12192b, inset 0 0 14px #12192b; z-index: 1; }
.hx-core small { font-size: 11px; color: var(--c-gold); } .hx-core b { font-size: 22px; color: #f5cc5c; font-family: Georgia, var(--font); }
.hx-node { position: absolute; transform: translate(-50%, -50%); width: 25%; aspect-ratio: 1; border-radius: 50%; border: 2px solid #415ea0; background: radial-gradient(circle at 50% 35%, #283961, #17223a 75%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: var(--c-txt); font-family: var(--font); padding: 0; z-index: 1; box-shadow: 0 0 0 2px #12192b; }
.hx-node small { font-size: 10px; color: #e5dec9; letter-spacing: 1px; font-family: Georgia, serif; } .hx-node b { font-size: 16px; color: #f5cc5c; font-family: Georgia, var(--font); line-height: 1.1; }
.hx-node em { position: absolute; bottom: -8px; font-style: normal; font-size: 10px; color: var(--c-ok); background: #12192b; padding: 0 3px; }
.hx-node:hover, .hx-node.on { border-color: var(--c-gold2); box-shadow: 0 0 0 2px #12192b, 0 0 12px rgba(230, 223, 203, 0.45); }
.hx-0 { left: 50%; top: 9%; } .hx-1 { left: 85.5%; top: 29.5%; } .hx-2 { left: 85.5%; top: 70.5%; } .hx-3 { left: 50%; top: 91%; } .hx-4 { left: 14.5%; top: 70.5%; } .hx-5 { left: 14.5%; top: 29.5%; }
.dt-list { display: flex; flex-direction: column; gap: 10px; }
.dt-g h4 { margin: 0 0 4px; font-size: 13px; color: var(--c-gold2); text-align: center; letter-spacing: 3px; padding-bottom: 4px; border-bottom: 1px solid var(--c-line2); }
.dt-r { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 4px; border-bottom: 1px dashed rgba(128, 143, 174, 0.18); font-size: 13px; }
.dt-r span { color: #e3dcc5; } .dt-r b { color: #f5cc5c; font-family: Arial, var(--font); text-align: right; }
.al-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.al-tabs button { padding: 8px 0; font-family: Georgia, var(--font); font-size: 13px; color: var(--c-dim); border: 1px solid var(--c-line2); background: linear-gradient(180deg, #293b64, #1d2a48); cursor: pointer; }
.al-tabs button.on { color: #ebe6d6; border-color: #f2be31; background: linear-gradient(180deg, #354c81, #223154); }
.al-pts { text-align: center; margin: 12px 0 4px; font-size: 12px; color: var(--c-dim); } .al-pts b { font-size: 18px; color: #faf9f5; margin-left: 6px; }
.al-dial { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 8px 0; }
.al-num { width: 120px; height: 120px; border-radius: 50%; border: 2px solid #415ea0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle, #223053, #172138); box-shadow: 0 0 0 3px #12192b, inset 0 0 18px #12192b; }
.al-num small { font-size: 12px; color: var(--c-gold); } .al-num b { font-size: 34px; color: #faf9f5; font-family: Georgia, var(--font); } .al-num b em { font-size: 16px; color: var(--c-ok); font-style: normal; } .al-num span { font-size: 10.5px; color: var(--c-dim); }
.al-fx { text-align: center; font-size: 12.5px; color: #e3dcc5; line-height: 1.7; padding: 8px; border-top: 1px solid var(--c-line2); border-bottom: 1px solid var(--c-line2); }
/* 裝備 */
.eq-grid { display: grid; grid-template-columns: minmax(330px, 1fr) minmax(280px, 1fr); gap: 12px; max-width: 1100px; margin: 0 auto; }
.eq-doll { display: grid; grid-template-columns: 62px 1fr 62px; gap: 8px; align-items: center; }
.eq-col { display: flex; flex-direction: column; gap: 6px; }
.eq-slot { position: relative; width: 62px; height: 62px; padding: 0 0 12px; border: 1px solid color-mix(in srgb, var(--rc, #304576) 70%, #12192b); background: radial-gradient(circle at 50% 40%, #223053, #17223a); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-family: var(--font); }
.eq-slot img { width: 38px; height: 38px; object-fit: contain; }
.eq-slot.empty img { filter: grayscale(1) brightness(.4); }
.eq-slot span { position: absolute; left: 0; right: 0; bottom: 1px; font-size: 9.5px; color: var(--c-dim); text-align: center; white-space: nowrap; overflow: hidden; }
.eq-slot em { position: absolute; left: 3px; top: 1px; font-size: 10px; font-weight: 900; color: #e2dbc3; font-style: normal; font-family: Arial, sans-serif; }
.eq-slot.sel { outline: 2px solid var(--c-gold2); outline-offset: -1px; }
.eq-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.eq-sum { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; color: #e3dcc5; text-align: center; }
.eq-sum b { color: #f5cc5c; } .eq-sum .res { font-size: 11px; color: var(--c-ok); }
.eq-detail { padding: 8px; border: 1px solid color-mix(in srgb, var(--rc) 55%, #12192b); background: rgba(18, 25, 43, 0.35); }
.ed-h { display: flex; gap: 10px; align-items: center; }
.ed-h > div:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ed-h b { font-size: 14.5px; color: var(--rc); } .ed-h span { font-size: 12px; color: #c7cedb; }
.g-eq { max-height: 34vh; overflow-y: auto; }
.cls-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 1000px; margin: 0 auto; }
.cls-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 8px 12px; border: 1px solid var(--c-line2); background: rgba(18, 25, 43, 0.35); cursor: pointer; color: var(--c-txt); font-family: var(--font); }
.cls-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.cls-card b { font-size: 15px; color: var(--c-gold2); } .cls-card span { font-size: 11px; color: var(--c-dim); line-height: 1.5; text-align: left; }
.cls-card em { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: 11px; padding: 1px 6px; background: #2c3e1e; color: #c9f7b5; border: 1px solid #4f6e3c; }
.cls-card.on { border-color: var(--c-gold); box-shadow: 0 0 0 1px var(--c-gold), 0 0 18px rgba(245, 204, 92, 0.3); }

/* ===================================================================== 側邊面板：背包 / 技能書 */
.ps-frame { display: flex; flex-direction: column; height: 100%; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.ps-head { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: linear-gradient(180deg, #39518b, #293a64); border-bottom: 1px solid #7888a8; }
.ps-head img { width: 26px; height: 26px; }
.ps-head b { font-size: 16px; letter-spacing: 2px; color: var(--c-gold2); }
.ps-crumb { font-size: 15px; color: #f0ece0; flex: 1; }
.ps-head .p6-x { margin-left: auto; width: 34px; height: 34px; }
.ps-body { flex: 1; min-height: 0; display: flex; }
.ps-main { position: relative; flex: 1; min-width: 0; overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.ps-rail { flex-shrink: 0; width: 62px; display: flex; flex-direction: column; gap: 2px; padding: 6px 0; background: rgba(18, 25, 43, 0.45); border-left: 1px solid var(--c-line2); }
.ps-rail button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0; background: none; border: none; border-right: 2px solid transparent; cursor: pointer; color: var(--c-dim); font-family: var(--font); font-size: 10px; }
.ps-rail button b { font-family: Georgia, serif; font-size: 16px; font-weight: 900; color: #f5cc5c; }
.ps-rail button img { width: 26px; height: 26px; filter: grayscale(.7) brightness(.8); }
.ps-rail button.on { background: linear-gradient(270deg, rgba(245, 204, 92, 0.2), transparent); border-right-color: var(--c-gold); color: var(--c-gold2); }
.ps-rail button.on img { filter: none; } .ps-rail button.on b { color: #ebe6d6; }
.ps-foot { flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--c-line2); background: rgba(18, 25, 43, 0.45); }
.ps-skills .ps-foot { flex-direction: row; align-items: center; justify-content: space-between; }
.bf-w { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #e3dcc5; font-family: Arial, var(--font); }
.bf-w img { width: 18px; height: 18px; } .bf-w .p6-prog { flex: 1; margin: 0; height: 6px; } .bf-w em { font-style: normal; color: var(--c-dim); }
.bf-tools { display: flex; align-items: center; gap: 6px; }
.bf-cur { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 12.5px; color: #f2eee3; font-family: Arial, var(--font); }
.bf-cur img { width: 18px; height: 18px; }
.bf-cap { font-size: 12.5px; color: #f7f5ee; font-family: Arial, var(--font); padding-left: 8px; border-left: 1px solid var(--c-line2); }
.bag-grid6 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 4px; background: rgba(18, 25, 43, 0.4); border: 1px solid var(--c-line2); }
.bag-pop { position: sticky; bottom: 0; margin-top: 8px; padding: 10px; border: 1px solid color-mix(in srgb, var(--rc) 60%, #12192b); background: linear-gradient(180deg, rgba(37, 52, 90, 0.98), rgba(27, 38, 65, 0.98)); box-shadow: 0 -8px 20px rgba(18, 25, 43, 0.7); }
.bp-h { display: flex; gap: 10px; align-items: center; }
.bp-h > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bp-h b { font-size: 14.5px; color: var(--rc); } .bp-h span { font-size: 11.5px; color: var(--c-dim); }
.bag-pop p { font-size: 12.5px; line-height: 1.65; color: #e3dcc5; margin: 8px 0 0; }
.bp-hint { display: block; text-align: center; margin-top: 6px; color: #f5cc5c; font-size: 11px; }
.sk-mastery { padding: 8px 10px 10px; margin-bottom: 8px; border-bottom: 1px solid var(--c-line2); }
.sk-mastery small { font-size: 11px; color: var(--c-dim); }
.skm-h { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px; margin: 4px 0; background: linear-gradient(90deg, transparent, rgba(245, 204, 92, 0.12), transparent); border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.skm-h span { font-family: Georgia, serif; color: var(--c-gold2); font-size: 18px; } .skm-h b { font-size: 16px; color: #f7f5ee; letter-spacing: 2px; }
.skm-lv { display: flex; justify-content: space-between; font-size: 13px; color: #f0ebdf; }
.sk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sk-cell { position: relative; aspect-ratio: 1; border: 1px solid #304576; background: radial-gradient(circle at 50% 40%, #26365d, #17223a); cursor: pointer; padding: 0; }
.sk-cell img { width: 100%; height: 100%; filter: grayscale(.25) sepia(.3); }
.sk-cell b { position: absolute; right: 3px; bottom: 1px; font-size: 11px; color: #faf9f5; text-shadow: 0 0 3px #12192b; font-family: Arial, sans-serif; }
.sk-cell em { position: absolute; left: 2px; top: 2px; width: 15px; height: 15px; border-radius: 2px; font-style: normal; font-size: 10px; line-height: 15px; text-align: center; color: #1c2844; background: #f5cc5c; font-family: Arial, sans-serif; font-weight: 900; }
.sk-cell.sel { outline: 2px solid var(--c-gold2); outline-offset: -1px; } .sk-cell.sel img { filter: none; }
.sk-det { margin-top: 10px; padding: 10px; border: 1px solid var(--c-line2); background: rgba(18, 25, 43, 0.35); }
.sd-h { display: flex; gap: 10px; align-items: center; } .sd-h img { width: 48px; height: 48px; border: 1px solid #304576; }
.sd-h b { display: block; font-size: 15px; color: var(--c-gold2); } .sd-h span { font-size: 11.5px; color: var(--c-dim); }
.sk-det p { font-size: 12.5px; color: #e3dcc5; line-height: 1.65; margin: 8px 0; }
.sd-kv { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--c-dim); } .sd-kv b { color: #f5cc5c; }

/* ===================================================================== 展示台：變身 / 戰寵 */
.show-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 12px; }
.show-stage { position: relative; display: flex; flex-direction: column; min-height: 360px; overflow: hidden; border: 1px solid var(--c-line2);
  background: radial-gradient(ellipse at 50% 70%, color-mix(in srgb, var(--tc) 14%, transparent), transparent 60%), linear-gradient(180deg, rgba(20, 24, 26, 0.85), rgba(23, 33, 56, 0.9)); }
.ss-info { position: relative; z-index: 2; padding: 12px 14px 0; display: flex; flex-direction: column; gap: 4px; max-width: 70%; }
.ss-info b { font-size: 17px; color: var(--tc); text-shadow: 0 1px 3px #12192b; }
.ss-info .tier { font-size: 12px; color: var(--c-dim); }
.ss-info p { font-size: 12px; color: #f5cc5c; line-height: 1.6; margin: 2px 0 0; }
.ss-kv { display: grid; grid-template-columns: repeat(2, auto); gap: 2px 14px; font-size: 12px; color: #6fb3c9; } .ss-kv b { color: #e8f3f5; }
.ss-model { position: relative; flex: 1; min-height: 180px; display: flex; align-items: flex-end; justify-content: center; }
.ss-glow { position: absolute; left: 50%; bottom: 10px; width: 60%; height: 28px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, color-mix(in srgb, var(--tc) 40%, transparent), transparent 70%); }
.ss-model img { position: relative; height: min(46vh, 340px); max-width: 90%; object-fit: contain; filter: drop-shadow(0 10px 14px #000) drop-shadow(0 0 18px color-mix(in srgb, var(--tc) 35%, transparent)); }
.ss-act { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 10px; background: linear-gradient(0deg, rgba(18, 25, 43, 0.7), transparent); }
.ss-own { width: 100%; text-align: center; font-size: 12px; color: var(--c-dim); display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.ss-own img { width: 16px; height: 16px; }
.show-list { display: flex; gap: 8px; min-height: 0; }
.mo-grid { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; overflow-y: auto; padding: 2px; }
.mo-card { position: relative; flex: 0 0 auto; width: 104px; aspect-ratio: 3 / 4.2; padding: 0; border-radius: 48% 48% 10px 10px / 30% 30% 6px 6px; overflow: hidden; cursor: pointer; font-family: var(--font);
  border: 2px solid color-mix(in srgb, var(--tc) 55%, #283962); background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--tc) 18%, #202e4e), #161f35 80%); box-shadow: 0 0 0 2px #12192b; }
.mo-card, .kn-card { min-height: 0; }
.mo-card img { position: absolute; left: 0; right: 0; top: 6%; margin: auto; width: 86%; height: 74%; object-fit: contain; filter: drop-shadow(0 4px 6px #000); }
.mo-card span { position: absolute; left: 0; right: 0; bottom: 6px; font-size: 12px; color: #f2eee3; text-align: center; text-shadow: 0 1px 3px #12192b; }
.mo-card i { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10px; padding: 0 6px; color: #1c2844; background: var(--tc); border-radius: 6px; font-weight: 900; }
.mo-card em { position: absolute; top: 18%; left: 8px; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 10px; line-height: 16px; text-align: center; color: #e6dfcb; border: 1px solid #f2be31; background: #233255; font-family: Georgia, serif; }
.mo-card.lock img { filter: grayscale(1) brightness(.45); } .mo-card.lock span { color: var(--c-dim); }
.mo-card.sel { border-color: var(--tc); box-shadow: 0 0 0 2px #12192b, 0 0 16px color-mix(in srgb, var(--tc) 60%, transparent); }
.mo-card.mini { width: 96px; flex-shrink: 0; }
.tier-rail { flex-shrink: 0; width: 42px; display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 4px 0; border-left: 1px solid var(--c-line2); }
.tier-rail button { width: 32px; height: 32px; border-radius: 50%; font-family: var(--font); font-size: 13px; font-weight: 900; color: var(--tc); border: 1px solid color-mix(in srgb, var(--tc) 45%, #12192b); background: #18233b; cursor: pointer; padding: 0; }
.tier-rail button:first-child { font-family: Georgia, serif; font-size: 10px; color: #dcd3b7; }
.tier-rail button.on { box-shadow: 0 0 0 2px #12192b, 0 0 10px color-mix(in srgb, var(--tc) 70%, transparent); background: color-mix(in srgb, var(--tc) 20%, #18233b); }
.gacha6 { flex: 1; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.g6-stage { flex: 1; min-height: 240px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--c-line2); background: radial-gradient(ellipse at 50% 60%, rgba(120, 70, 160, 0.18), transparent 60%), rgba(18, 25, 43, 0.35); overflow: auto; }
.g6-pulls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 12px; }
.g6-act { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.g6-act .bf-cur { margin: 0 10px 0 0; }
.cdx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cdx-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--c-line2); background: linear-gradient(180deg, rgba(39, 56, 95, 0.6), rgba(23, 34, 58, 0.8)); }
.cdx-card b { font-size: 16px; color: var(--c-gold2); letter-spacing: 2px; } .cdx-card span { font-size: 12px; color: #c7cedb; } .cdx-card em { font-style: normal; font-size: 12px; color: var(--c-ok); }
.cdx-card.on { border-color: #4f6e3c; box-shadow: inset 0 0 20px rgba(79, 110, 60, 0.25); }
.syn-list { max-width: 900px; width: 100%; margin: 0 auto; }

/* ===================================================================== 收藏：怪物知識 */
.kn-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 190px minmax(0, 1fr) minmax(260px, 340px); gap: 12px; }
.kn-left { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
.kp-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 11px 12px; border: none; border-bottom: 1px solid var(--c-line2); background: rgba(18, 25, 43, 0.25); color: var(--c-txt); font-family: var(--font); cursor: pointer; text-align: left; }
.kp-row b { font-size: 14px; font-weight: 700; } .kp-row span { font-size: 12px; color: var(--c-dim); font-family: Arial, var(--font); }
.kp-row img { width: 26px; height: 26px; border-radius: 50%; }
.kp-row.on { background: linear-gradient(90deg, rgba(245, 204, 92, 0.22), rgba(245, 204, 92, 0.04)); border-left: 2px solid var(--c-gold); }
.kp-row.on b { color: var(--c-gold2); }
.kp-row .dot { top: 8px; right: 6px; }
.kn-mid { display: flex; flex-direction: column; min-height: 0; }
.kn-cards { flex: 1; min-height: 0; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; overflow-y: auto; padding: 2px; }
.kn-card { position: relative; flex: 0 0 auto; width: 108px; aspect-ratio: 3 / 4; padding: 0; border: 1px solid #304576; background: radial-gradient(ellipse at 50% 40%, #293b65, #17223a 80%); cursor: pointer; overflow: hidden; font-family: var(--font); }
.kn-card img { position: absolute; inset: 8% 8% 26%; width: 84%; height: 66%; object-fit: contain; filter: grayscale(.55) contrast(1.1) brightness(.95); }
.kn-card span { position: absolute; left: 2px; right: 2px; bottom: 18px; font-size: 11.5px; color: #ede8da; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kn-card i { position: absolute; left: 0; right: 0; bottom: 3px; font-style: normal; font-size: 10px; color: #f5cc5c; text-align: center; letter-spacing: 1px; }
.kn-card.lock img { filter: brightness(0) drop-shadow(0 0 1px rgba(160, 140, 100, 0.6)); opacity: .8; }
.kn-card.boss { border-color: #6a2a20; }
.kn-card.sel { outline: 2px solid var(--c-gold2); outline-offset: -2px; }
.kn-card .dot { top: 5px; right: 5px; }
.kn-foot { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; font-size: 12.5px; color: var(--c-dim); }
.kn-foot b { color: var(--c-gold2); }
.kn-right { min-height: 0; overflow-y: auto; }
.kn-det { display: flex; flex-direction: column; gap: 8px; }
.kd-h { display: flex; gap: 10px; align-items: center; } .kd-h > div:last-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kd-h b { font-size: 15px; color: var(--c-gold2); } .kd-h span { font-size: 12px; color: var(--c-dim); }
.kd-lv { width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; border: 2px solid #7888a8; background: radial-gradient(circle, #283a63, #17223a); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #12192b; }
.kd-lv b { font-size: 20px; color: #f5cc5c; line-height: 1; } .kd-lv small { font-size: 9px; color: var(--c-dim); }
.kd-model { height: 150px; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 70%, rgba(245, 204, 92, 0.1), transparent 65%); }
.kd-model img { max-height: 140px; max-width: 80%; object-fit: contain; filter: drop-shadow(0 6px 8px #000); } .kd-model img.sil { filter: brightness(0) drop-shadow(0 0 2px rgba(160, 140, 100, 0.6)); }
.kd-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; counter-reset: ks; }
.kd-steps li { counter-increment: ks; display: grid; grid-template-columns: 22px 1fr 36px; align-items: center; gap: 8px; padding: 3px 6px; font-size: 12px; color: var(--c-dim); background: rgba(18, 25, 43, 0.25); }
.kd-steps li::before { content: counter(ks); width: 20px; height: 20px; border-radius: 50%; border: 1px solid #3a548f; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-family: Arial, sans-serif; }
.kd-steps li.ready { color: #ebe6d6; } .kd-steps li.ready::before { border-color: #f5cc5c; color: #ebe6d6; box-shadow: 0 0 6px rgba(245, 204, 92, 0.6); }
.kd-steps li.got { color: #a3c896; } .kd-steps li.got::before { content: '✓'; border-color: #4f6e3c; color: #a3c896; }
.kd-steps .p6-cell { width: 36px; height: 36px; cursor: default; }

/* ===================================================================== 任務日誌 (書本) */
.bk-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; padding: 12px; }
.bk-left { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; min-height: 0; }
.bk-crumb { font-size: 15px; color: var(--c-gold2); padding: 4px 4px 8px; letter-spacing: 1px; }
.ql-row { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 6px; padding: 12px 12px 10px; text-align: left; cursor: pointer; font-family: var(--font); color: var(--c-txt);
  border: 1px solid var(--c-line2); background: linear-gradient(180deg, rgba(40, 57, 98, 0.75), rgba(27, 38, 65, 0.85)); }
.ql-row b { font-size: 13.5px; font-weight: 700; } .ql-row span { font-size: 12px; color: #9dd6a2; font-family: Arial, var(--font); }
.ql-row .p6-prog { grid-column: 1 / -1; }
.ql-row.on { border-color: #e6ad0f; background: linear-gradient(180deg, rgba(62, 90, 153, 0.8), rgba(36, 51, 87, 0.9)); }
.ql-row.sub { padding: 10px 12px; } .ql-row.sub span { color: var(--c-dim); }
.ql-row .dot { top: 6px; right: 6px; }
.bk-book { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-height: 0; padding: 14px; border: 1px solid #405b9c; border-radius: 6px;
  background: linear-gradient(90deg, #1b2224 0%, #222b2e 48%, #12181a 50%, #222b2e 52%, #1b2224 100%); box-shadow: 0 10px 30px rgba(18, 25, 43, 0.8), inset 0 0 0 3px #0d1112, inset 0 0 0 4px #374f88; }
.bk-page { position: relative; min-height: 0; overflow-y: auto; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px;
  background: radial-gradient(ellipse at 50% 0%, rgba(80, 110, 120, 0.25), transparent 60%); border: 1px solid rgba(171, 181, 201, 0.25); }
.bk-page::before, .bk-page::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid #e6ad0f; pointer-events: none; }
.bk-page::before { left: 4px; top: 4px; border-right: none; border-bottom: none; } .bk-page::after { right: 4px; bottom: 4px; border-left: none; border-top: none; }
.bk-t { margin: 0; text-align: center; font-size: 18px; letter-spacing: 2px; color: #efebde; text-shadow: 0 1px 3px #12192b; }
.bk-sub, .bk-prog { text-align: center; font-size: 12px; color: #9dd6a2; font-family: Arial, var(--font); }
.bk-desc { text-align: center; font-size: 13px; color: #b9c8c8; line-height: 1.7; padding: 4px 6px; }
.bk-rw { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 6px 0 8px; border-bottom: 1px solid rgba(171, 181, 201, 0.25); }
.bk-rw .p6-cell { width: 54px; height: 54px; cursor: default; }
.bk-list { display: flex; flex-direction: column; gap: 4px; }
.bk-ch { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 10px 10px; text-align: left; cursor: pointer; font-family: var(--font); color: #f5cc5c; border: 1px solid rgba(171, 181, 201, 0.18); background: rgba(10, 14, 15, 0.55); }
.bk-ch > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bk-ch b { font-size: 14px; font-weight: 700; } .bk-ch small { font-size: 11.5px; color: #a8b8b8; }
.bk-ico { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #e6ad0f; background: radial-gradient(circle, #27385f, #18223a); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 13px; color: #f5cc5c; font-family: Georgia, serif; }
.bk-ch.done { color: #f5cc5c; } .bk-ch.done .bk-ico { color: #9dd6a2; border-color: #4f6e3c; }
.bk-ch.lock { color: #acb6ca; } .bk-ch.lock .bk-ico { filter: grayscale(1); font-size: 11px; }
.bk-ch.ready { border-color: #f2be31; box-shadow: inset 0 0 14px rgba(245, 204, 92, 0.15); }
.bk-ch.sel { border-color: #f5cc5c; background: rgba(46, 67, 114, 0.45); }
.bk-obj { display: flex; justify-content: space-between; font-size: 13px; color: #e7e1cd; padding: 0 4px; } .bk-obj b { color: #ebe6d6; font-family: Arial, var(--font); }
.bk-page .p6-h4 { justify-content: center; }

/* ===================================================================== 排名 */
.rk6-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 12px; }
.rk6-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.rk6-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.rk6-note { flex: 1; font-size: 12px; color: var(--c-dim); }
.rk6-bar input { width: min(220px, 40vw); padding: 8px 10px; font-family: var(--font); font-size: 13px; color: var(--c-txt); background: rgba(18, 25, 43, 0.55); border: 1px solid var(--c-line); outline: none; user-select: text; -webkit-user-select: text; }
.rk6-bar input:focus { border-color: var(--c-gold); }
.rk6-head, .rk6-row { display: grid; grid-template-columns: 56px 34px minmax(0, 1fr) 64px 60px 96px; align-items: center; gap: 6px; padding: 0 10px; }
.rk6-head { font-size: 12px; color: var(--c-dim); padding-bottom: 6px; border-bottom: 1px solid var(--c-line2); }
.rk6-list { flex: 1; min-height: 0; overflow-y: auto; }
.rk6-row { min-height: 50px; margin-top: 4px; font-size: 13.5px; background: linear-gradient(180deg, rgba(35, 50, 85, 0.7), rgba(25, 36, 62, 0.8)); border: 1px solid var(--c-line2); }
.rk6-row img { width: 28px; height: 28px; }
.rk6-row b { font-weight: 700; color: #f2eee3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk6-row span { color: #c7cedb; font-size: 12.5px; white-space: nowrap; } .rk6-row em { font-style: normal; text-align: right; color: #f5cc5c; font-family: Arial, var(--font); }
.rk6-n { text-align: center; font-family: Georgia, var(--font); color: #e3dcc5; }
.laurel { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; font-style: normal; font-weight: 900; font-size: 14px; border: 2px dotted; }
.laurel.l1 { color: #fdd053; border-color: #f1ba23; background: radial-gradient(circle, #293a64, #19243d); }
.laurel.l2 { color: #7ee0d0; border-color: #2e8a7a; background: radial-gradient(circle, #0e3a32, #05120f); }
.laurel.l3 { color: #f5cc5c; border-color: #e8ae0f; background: radial-gradient(circle, #293a64, #19243d); }
.rk6-row.me { border-color: #f2be31; background: linear-gradient(180deg, rgba(54, 78, 132, 0.6), rgba(31, 45, 76, 0.8)); }
.rk6-mine { flex-shrink: 0; border-top: 1px solid var(--c-line); margin-top: 6px; }

/* ===================================================================== 獲得通知：任務完成 / 道具獲取 */
#p6-notice { position: fixed; left: 0; right: 0; top: 24%; z-index: 96; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.nt-band { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 16px 12px; text-align: center; animation: ntIn .32s ease-out;
  background: linear-gradient(90deg, rgba(18, 25, 43, 0), rgba(20, 28, 48, 0.86) 16%, rgba(20, 28, 48, 0.86) 84%, rgba(18, 25, 43, 0)); }
.nt-band.out { opacity: 0; transform: translateY(-8px); transition: opacity .26s, transform .26s; }
@keyframes ntIn { from { opacity: 0; transform: scaleY(.6); } to { opacity: 1; transform: none; } }
.nt-orn { width: min(720px, 92%); height: 9px; position: relative; background: linear-gradient(90deg, transparent, rgba(245, 204, 92, 0.85) 18%, rgba(245, 204, 92, 0.85) 82%, transparent) center / 100% 1px no-repeat,
  linear-gradient(90deg, transparent, rgba(245, 204, 92, 0.4) 22%, rgba(245, 204, 92, 0.4) 78%, transparent) center 7px / 100% 1px no-repeat; }
.nt-orn::after { content: ''; position: absolute; left: 50%; top: 0; width: 8px; height: 8px; transform: translateX(-50%) rotate(45deg); background: #17223a; border: 1px solid #f5cc5c; }
.nt-title { font-size: clamp(24px, 4.6vw, 34px); letter-spacing: 8px; padding-left: 8px; color: #f1ede1; text-shadow: 0 0 14px rgba(18, 25, 43, 0.9), 0 2px 4px #12192b; font-weight: 700; }
.nt-title.sm { font-size: 14px; letter-spacing: 4px; color: #dcd3b7; }
.nt-sub { font-size: 16px; color: #f5cc5c; letter-spacing: 2px; text-shadow: 0 1px 3px #12192b; }
.nt-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.nt-band.big .nt-items .p6-cell { width: 56px; height: 56px; cursor: default; }
.nt-hint { font-size: 12.5px; color: #ede8da; text-shadow: 0 1px 3px #12192b; } .nt-hint b { color: #ebe6d6; }
.nt-band.gain { width: min(560px, 96%); padding: 6px 14px 8px; background: linear-gradient(90deg, rgba(18, 25, 43, 0), rgba(20, 28, 48, 0.7) 14%, rgba(20, 28, 48, 0.7) 86%, rgba(18, 25, 43, 0)); }
.nt-it { display: inline-flex; align-items: center; gap: 6px; padding-right: 6px; font-size: 13px; color: #f1ede1; text-shadow: 0 1px 2px #12192b; }
.nt-it .p6-cell { width: 30px; height: 30px; cursor: default; } .nt-it b { color: #ebe6d6; font-family: Arial, var(--font); }

/* ===================================================================== 經典視窗 (工坊 / 國家 / 商店 / 設定) 統一外觀 */
body .modal-card { background: linear-gradient(180deg, rgba(31, 45, 76, 0.99), rgba(23, 34, 58, 0.99)) !important; border-color: var(--c-line) !important; }
body .modal-header { background: linear-gradient(180deg, #39518b, #293a64) !important; border-bottom-color: #7888a8 !important; }
body .modal-title span { font-size: 16px; letter-spacing: 2px; }

/* ===================================================================== 響應式：手機直向 (直版) */
@media (max-aspect-ratio: 1/1) {
  :root { --ac-s: .86; }
  body .pl-plate { grid-template-columns: auto auto; grid-template-areas: "face meta" "face res"; padding-right: 10px !important; }
  body .pl-meta { width: clamp(132px, calc(100vw - 226px), 190px); }
  .pl-res { flex-direction: row; gap: 10px; align-items: center; }
  body .pl-res .adena-inline { font-size: 12px; }
  body #buff-bar { padding-left: 4px; max-width: 54vw; }
  body .fs-item { width: 38px; height: 40px !important; } body .fs-item img { width: 22px !important; height: 22px !important; } body .fs-item span { font-size: 9px !important; }
  body .fs-item.fs-wide { display: none !important; }
  body #func-strip { order: 2; } body #radar-panel .radar-row { order: 1; } body #world-boss-pill { order: 3; }
  body #radar-panel #minimap-box { width: 104px; height: 104px; }
  body #zoom-control-pill .zoom-step-btn { width: 26px; height: 26px; font-size: 14px; }
  body #radar-panel .minimap-hdr { bottom: 5px; font-size: 9px; } body #radar-panel .minimap-hdr #ui-coords-text { display: none; }
  body #target-lock-hud { top: 124px !important; left: 6px !important; transform: none !important; width: calc(100vw - 194px) !important; }
  body #quest-tracker { top: 172px; width: min(calc(100vw - 196px), 210px); }
  body #chat-panel { left: 6px; right: auto; width: calc(100vw - 222px); min-width: 140px; bottom: calc(var(--safe-b) + 58px); }
  body #chat-panel.open { width: auto; right: 6px; height: 46vh; }
  body #quick-bar { left: 6px !important; right: auto !important; bottom: calc(var(--safe-b) + 8px) !important; }
  body .qb-slot { width: 36px; height: 36px; }
  body #joystick-zone { left: 14px !important; bottom: calc(var(--safe-b) + 142px) !important; width: 104px !important; height: 104px !important; }
  body #action-cluster { bottom: calc(var(--safe-b) + 8px) !important; }
  /* 面板 */
  .p6.open .p6-top { grid-template-columns: 1fr auto auto; gap: 8px; padding: 6px 8px; }
  .p6-vit { display: none; }
  .p6-cur { justify-content: flex-start; gap: 6px; } .p6-cur span { font-size: 11.5px; padding: 2px 7px 2px 3px; }
  .p6-title b { font-size: 16px; letter-spacing: 2px; }
  .p6-tab { padding: 9px 12px 8px; font-size: 13.5px; }
  .p6-body.lay-rail { flex-direction: column; }
  .p6-rail { width: auto; flex-direction: row; justify-content: space-around; padding: 0; border-right: none; border-bottom: 1px solid var(--c-line2); overflow-x: auto; overflow-y: hidden; }
  .p6-rail button { flex: 1; flex-direction: row; justify-content: center; gap: 4px; padding: 8px 4px; border-left: none; border-bottom: 2px solid transparent; font-size: 12.5px; }
  .p6-rail button img { width: 22px; height: 22px; }
  .p6-rail button.on { border-bottom-color: var(--c-gold); background: linear-gradient(0deg, rgba(245, 204, 92, 0.14), transparent); }
  .p6-main { padding: 8px; }
  .ch-grid, .eq-grid { grid-template-columns: 1fr; gap: 8px; }
  .ch-model { width: 110px; height: 146px; }
  .eq-doll { grid-template-columns: 54px 1fr 54px; gap: 6px; }
  .eq-slot { width: 54px; height: 54px; } .eq-slot img { width: 32px; height: 32px; }
  .ch-model.sm { width: 92px; height: 122px; }
  .cls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .show-grid { grid-template-columns: 1fr; grid-template-rows: auto minmax(220px, 1fr); }
  .show-stage { min-height: 0; }
  .ss-info { max-width: 100%; padding: 10px 12px 0; } .ss-info p { display: none; }
  .ss-model { min-height: 150px; } .ss-model img { height: 30vh; }
  .ss-act { padding: 6px 8px 8px; }
  .mo-grid { gap: 6px; } .mo-card { width: calc((100% - 12px) / 3); }
  .kn-grid { grid-template-columns: 1fr; grid-template-rows: auto auto auto; overflow-y: auto; }
  .kn-left { flex-direction: row; overflow-x: auto; overflow-y: hidden; gap: 4px; }
  .kn-left .kp-row { flex-shrink: 0; flex-direction: column; gap: 0; padding: 7px 12px; border: 1px solid var(--c-line2); }
  .kn-left .kp-row.on { border-left: 1px solid var(--c-gold); border-color: var(--c-gold); }
  .kn-cards { max-height: 36vh; gap: 6px; } .kn-card { width: calc((100% - 18px) / 4); }
  .bk-wrap { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); padding: 8px; gap: 8px; }
  .bk-left { flex-direction: row; overflow-x: auto; overflow-y: hidden; gap: 4px; }
  .bk-crumb { display: none; }
  .ql-row { flex-shrink: 0; min-width: 132px; padding: 8px 10px; } .ql-row b { font-size: 12.5px; }
  .bk-book { grid-template-columns: 1fr; overflow-y: auto; padding: 8px; background: linear-gradient(180deg, #1b2224, #222b2e 50%, #1b2224); }
  .bk-page { overflow: visible; padding: 12px 10px; }
  .rk6-wrap { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); padding: 8px; }
  .rk6-wrap .kn-left { flex-direction: row; overflow-x: auto; }
  .rk6-wrap .kn-left .kp-row { flex-direction: row; flex-shrink: 0; padding: 7px 12px; }
  .rk6-head, .rk6-row { grid-template-columns: 40px 26px minmax(0, 1fr) 40px 50px 74px; gap: 4px; padding: 0 6px; }
  .rk6-row { min-height: 44px; font-size: 12.5px; } .rk6-row img { width: 22px; height: 22px; } .rk6-row span { font-size: 11px; }
  .laurel { width: 28px; height: 28px; font-size: 12px; }
  .rk6-note { display: none; } .rk6-bar input { flex: 1; width: auto; }
  body #mega-menu .mm-box { width: 100vw !important; }
  .mm-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #p6-notice { top: 20%; }
}
/* 手機橫向 (高度不足) */
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  :root { --ac-s: .74; }
  body .pl-face-wrap, body .pl-face { width: 38px !important; height: 38px !important; }
  body .pl-meta { width: clamp(140px, 22vw, 200px); }
  body .pl-bar { height: 16px !important; } body .pl-bar .bar-text { line-height: 16px !important; font-size: 11.5px !important; }
  body .pl-bar.mp { height: 13px !important; } body .pl-bar.mp .bar-text { line-height: 13px !important; font-size: 10px !important; }
  body .fs-item { width: 36px; height: 36px !important; } body .fs-item span { display: none; }
  body #radar-panel #minimap-box { width: 92px; height: 92px; }
  body #radar-panel .minimap-hdr #ui-coords-text { display: none; }
  body #zoom-control-pill { display: flex !important; } body #zoom-control-pill .zoom-step-btn { width: 24px; height: 24px; font-size: 13px; }
  body #world-boss-pill { padding: 2px 8px !important; }
  body #quest-tracker { top: 96px; width: 190px; }
  body #chat-panel { left: 118px; width: 30vw; bottom: calc(var(--safe-b) + 8px); }
  body #chat-panel.open { height: 72vh; }
  body #quick-bar { bottom: calc(var(--safe-b) + 8px) !important; right: calc(230px * var(--ac-s) + 14px) !important; }
  body .qb-slot { width: 36px; height: 36px; }
  body #joystick-zone { left: 14px !important; bottom: calc(var(--safe-b) + 12px) !important; width: 92px !important; height: 92px !important; }
  body #target-lock-hud { width: 30vw !important; }
  .p6-top { min-height: 44px; padding: 4px 10px; } .p6-tab { padding: 7px 14px 6px; }
  .ch-model { width: 96px; height: 128px; } .hx-wrap { width: 210px; }
  .show-stage { min-height: 0; } .ss-model { min-height: 90px; } .ss-model img { height: 36vh; }
  .ss-info { padding: 8px 12px 0; } .ss-info b { font-size: 15px; } .ss-info p { display: none; } .ss-act { padding: 4px 8px 6px; } .ss-own { display: none; }
  .mo-card { width: 92px; }
  .kn-grid { grid-template-columns: 150px minmax(0, 1fr) 250px; }
  .kd-model { height: 90px; } .kd-model img { max-height: 84px; }
  .bk-wrap { grid-template-columns: 180px minmax(0, 1fr); padding: 8px; }
  #p6-notice { top: 8%; }
  .nt-title { font-size: 22px; }
}
/* 寬螢幕 */
@media (min-width: 1400px) and (min-aspect-ratio: 1/1) {
  body #radar-panel #minimap-box { width: 176px; height: 176px; }
  body #chat-panel { width: 420px; }
}
@media (prefers-reduced-motion: reduce) { .nt-band, .p6-round.glow { animation: none; } }
