/* ==========================================================================
   hud.css — تمِ جدید (میزِ فرماندهی) + چیدمانِ طرحِ دست‌کشیده
   بعد از همه‌ی css ها لود میشه. طرح: بالا = هویت/آیکون‌ها، چپ = چت+اعلانات، مرکز = کره،
   راست = ریلِ تب‌ها (کشو)، پایین = زرادخانه + اعزامِ نیرو + آمار.
   رنگ‌ها: گرافیتِ آبی‌خاکستری، کهربایی (اقدام)، سبزِ رادار (دوست)، قرمزِ هشدار (حمله).
   سبک: سطح‌های تخت و مات، بدونِ blur (برای گرافیکِ سبک).
   ========================================================================== */
:root {
  --h-bg: #0a121b; --h-bg2: #0f1a26; --h-panel: #121e2b; --h-panel2: #172737; --h-line: rgba(160, 190, 220, .13);
  --h-ink: #e8eef5; --h-dim: #8fa3b8; --h-amber: #f2a93b; --h-amber2: #ffd36b; --h-green: #5fd38d; --h-red: #ff6a4a; --h-blue: #5cc8ff;
  --h-top: 58px; --h-rail: 74px; --h-left: 296px; --h-bottom: 176px; --h-gap: 10px;
  --accent: #f2a93b; --accent-2: #f2c94c; --ink: #e8eef5; --ink-dim: #8fa3b8; --ok: #5fd38d; --err: #ff6a4a;
  --glass: #121e2b; --glass-border: rgba(160, 190, 220, .13); --panel-grad: #121e2b;
  --g-fill: #172737; --g-fill-2: #1d3144; --g-fill-3: #243a50; --g-blur: none;
}
body.hud-body {
  background: radial-gradient(1100px 700px at 50% 40%, #10202f 0%, var(--h-bg) 70%) fixed;
  color: var(--h-ink); overflow: hidden; height: 100vh; height: 100dvh; min-height: 0;
}
body.hud-body #bg-canvas, body.hud-body .vignette { display: none; }
body.hud-body *, body.hud-body *::before, body.hud-body *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* ---------- بالا ---------- */
.hud-top { position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: var(--h-top); display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: linear-gradient(180deg, rgba(8, 14, 22, .92), rgba(8, 14, 22, 0)); pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.hud-id { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.id-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; font-size: .8rem; font-weight: 700; color: var(--h-ink); background: var(--h-panel); border: 1.5px solid var(--h-line); border-radius: 999px; line-height: 1.5; }
.id-pill .ic { width: 14px; height: 14px; color: var(--h-amber); }
.id-pill.rank { font-weight: 500; color: var(--h-dim); padding: 1px 10px; font-size: .72rem; }
.id-pill .rank-badge { color: var(--h-amber2); font-weight: 700; }
.hud-brand { margin: 0 auto; display: flex; align-items: center; gap: 8px; font-family: "Lalezar", "Vazirmatn", sans-serif; font-size: 1.25rem; color: var(--h-ink); letter-spacing: .2px; }
.hud-brand .ic { width: 22px; height: 22px; color: var(--h-amber); }
.hud-icons { display: flex; flex-direction: row; flex-wrap: nowrap; flex: 0 0 auto; gap: 6px; }
.hud-icons .hamburger-btn { order: 99; }
.hud-ico, .hud-icons .chip-icon-btn { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--h-ink); background: var(--h-panel) !important; border: 1.5px solid var(--h-line) !important; border-radius: 10px; cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.hud-ico:hover, .hud-icons .chip-icon-btn:hover { border-color: var(--h-amber) !important; transform: translateY(-1px); }
.hud-ico .ic { width: 18px; height: 18px; }
.hud-ico.on { color: var(--h-green); border-color: var(--h-green) !important; }
.hud-icons .hamburger-btn { flex-direction: column; gap: 3px; }
.hud-icons .hamburger-btn span { display: block; width: 16px; height: 2px; background: var(--h-ink); border-radius: 2px; }
.hud-pop { position: fixed; top: calc(var(--h-top) + 2px); left: 12px; z-index: 40; width: min(320px, 92vw); padding: 12px; background: var(--h-panel2); border: 1.5px solid var(--h-line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.hud-pop[hidden] { display: none; }
.pop-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: .85rem; border-bottom: 1px dashed var(--h-line); }
.pop-row b { color: var(--h-amber2); }
.pop-note { margin-top: 8px; font-size: .78rem; color: var(--h-dim); }
.live-ticker { position: fixed; z-index: 29; top: var(--h-top); left: 50%; transform: translateX(-50%); max-width: min(560px, 60vw); }

/* ---------- چپ ---------- */
.hud-left { position: fixed; z-index: 20; top: calc(var(--h-top) + 4px); left: 12px; bottom: calc(var(--h-bottom) + 18px); width: var(--h-left); display: flex; flex-direction: column; gap: var(--h-gap); }
.hud-card { display: flex; flex-direction: column; min-height: 0; background: var(--h-panel); border: 1.5px solid var(--h-line); border-radius: 14px; overflow: hidden; }
.chat-card { flex: 3 1 0; }
.feed-card { flex: 2 1 0; }
.hc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: .85rem; border-bottom: 1px solid var(--h-line); }
.hc-head b { font-family: "Lalezar", "Vazirmatn", sans-serif; font-weight: 400; font-size: 1rem; color: var(--h-amber2); }
.hc-head select { max-width: 130px; font-size: .75rem; padding: 3px 6px; background: var(--h-panel2); color: var(--h-ink); border: 1px solid var(--h-line) !important; border-radius: 8px; }
.hc-link { background: none; border: 0; color: var(--h-blue); font: inherit; font-size: .75rem; cursor: pointer; padding: 2px 4px; }
.hud-chat-box, .hud-feed { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.hc-msg { font-size: .8rem; line-height: 1.6; background: var(--h-panel2); padding: 5px 9px; border-radius: 10px; align-self: flex-start; max-width: 92%; word-break: break-word; }
.hc-msg b { display: block; font-size: .7rem; color: var(--h-blue); }
.hc-msg.mine { align-self: flex-end; background: rgba(242, 169, 59, .16); }
.hc-msg.mine b { color: var(--h-amber2); }
.hud-chat-send { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--h-line); }
.hud-chat-send input { flex: 1; min-width: 0; padding: 7px 10px; font-size: .82rem; background: var(--h-bg2); color: var(--h-ink); border: 1px solid var(--h-line) !important; border-radius: 999px; }
.hud-chat-send button { padding: 6px 14px; font-size: .8rem; font-weight: 700; color: #1b1203; background: var(--h-amber); border: 0; border-radius: 999px; cursor: pointer; transition: transform .12s; }
.hud-chat-send button:active { transform: scale(.94); }
.hf-item { font-size: .76rem; line-height: 1.6; color: var(--h-ink); padding: 5px 9px; border-radius: 8px; background: var(--h-panel2); border-inline-start: 3px solid var(--h-dim); }
.hf-item.hit, .hf-item.ground { border-color: var(--h-red); }
.hf-item.blocked, .hf-item.ticket { border-color: var(--h-blue); }
.hf-item.win, .hf-item.bank { border-color: var(--h-green); }

/* ---------- مرکز: کره ---------- */
.hud-globe { position: fixed; z-index: 10; top: var(--h-top); left: calc(var(--h-left) + 24px); right: calc(var(--h-rail) + 20px); bottom: calc(var(--h-bottom) + 14px); overflow: hidden; border-radius: 20px; }
#globe-cv { display: block; touch-action: none; cursor: grab; }
#globe-cv:active { cursor: grabbing; }
.hud-globe.fx-shake { animation: g-shake .5s ease; }
@keyframes g-shake { 0%, 100% { transform: none; } 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-2px, -2px); } 80% { transform: translate(2px, 2px); } }
.globe-modes { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 3px; background: rgba(15, 26, 38, .85); border: 1.5px solid var(--h-line); border-radius: 999px; }
.gm { padding: 5px 14px; font: inherit; font-size: .78rem; font-weight: 700; color: var(--h-dim); background: transparent; border: 0; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.gm.active { background: var(--h-amber); color: #1b1203; }
.globe-info { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); width: min(520px, 90%); text-align: center; pointer-events: none; }
.gi-line { display: inline-block; margin: 2px; padding: 3px 12px; font-size: .74rem; color: var(--h-ink); background: rgba(10, 18, 27, .72); border-radius: 999px; }
.gi-line.warn { color: #ffb3a1; }
.globe-info .event-banner { display: inline-block; font-size: .74rem; padding: 3px 12px; border-radius: 999px; background: rgba(242, 169, 59, .2); color: var(--h-amber2); }
.globe-zoom { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.globe-zoom button { width: 34px; height: 34px; font-size: 1.1rem; color: var(--h-ink); background: rgba(15, 26, 38, .88); border: 1.5px solid var(--h-line) !important; border-radius: 10px; cursor: pointer; transition: border-color .15s, transform .12s; }
.globe-zoom button:hover { border-color: var(--h-amber) !important; }
.globe-zoom button:active { transform: scale(.92); }
.globe-legend { position: absolute; left: 10px; bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px 10px; max-width: 60%; font-size: .66rem; color: var(--h-dim); pointer-events: none; }
.globe-legend span { display: inline-flex; align-items: center; gap: 4px; }
.globe-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.map-tip { position: absolute; z-index: 5; padding: 6px 10px; font-size: .76rem; line-height: 1.5; background: rgba(10, 18, 27, .94); border: 1px solid var(--h-line); border-radius: 10px; pointer-events: none; opacity: 0; transition: opacity .12s; max-width: 220px; }
.map-tip.show { opacity: 1; }
.tp-nbr { color: #ff9f8a; }

/* کارتِ کشور (شناور روی کره) */
.globe-card { position: absolute; left: 10px; top: 96px; bottom: 34px; width: min(310px, 46%); overflow-y: auto; padding: 12px; background: rgba(15, 26, 38, .96) !important; border: 1.5px solid var(--h-line) !important; border-top: 3px solid var(--ctone, var(--h-amber)) !important; border-radius: 14px !important; box-shadow: 0 14px 34px rgba(0, 0, 0, .5) !important; transform-origin: left top; }
.globe-card[hidden] { display: none; }
.globe-card.show { animation: card-in .28s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes card-in { from { opacity: 0; transform: translateX(-14px) scale(.97); } to { opacity: 1; transform: none; } }
.mc-close { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; color: var(--h-dim); background: var(--h-panel2); border: 0; border-radius: 8px; cursor: pointer; }
.mc-head { display: flex; align-items: center; gap: 10px; padding-inline-end: 30px; }
.mc-swatch { width: 12px; align-self: stretch; border-radius: 4px; }
.mc-title { font-family: "Lalezar", "Vazirmatn", sans-serif; font-size: 1.2rem; color: var(--h-ink); }
.mc-sub { font-size: .76rem; color: var(--h-dim); }
.mc-body { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.mc-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.mc-chip { padding: 2px 9px; font-size: .7rem; color: var(--h-ink); background: var(--h-panel2); border-radius: 999px; }
.mc-chip.me { color: var(--h-amber2); } .mc-chip.nbr { color: #ff9f8a; } .mc-chip.occ { color: #c9a0ff; }
.mc-note { font-size: .74rem; line-height: 1.7; color: var(--h-dim); }
.mc-sec { font-size: .78rem; font-weight: 700; color: var(--h-amber2); }
.mc-missiles { display: flex; flex-wrap: wrap; gap: 6px; }
.mcm { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 5px; font: inherit; font-size: .7rem; color: var(--h-ink); background: var(--h-panel2); border: 1.5px solid transparent !important; border-radius: 10px; cursor: pointer; transition: border-color .15s, transform .12s; }
.mcm:hover { transform: translateY(-1px); }
.mcm.on { border-color: var(--h-red) !important; background: rgba(255, 106, 74, .14); }
.mcm .thumb { width: 26px; height: 26px; }
.atk-go.fire, .atk-go { width: 100%; padding: 9px; font: inherit; font-weight: 800; font-size: .88rem; color: #fff; background: var(--h-red); border: 0; border-radius: 10px; cursor: pointer; transition: transform .12s, filter .15s; }
.atk-go:hover:not(:disabled) { filter: brightness(1.1); } .atk-go:active:not(:disabled) { transform: scale(.97); }
.atk-go:disabled { background: var(--h-panel2); color: var(--h-dim); cursor: not-allowed; }
.pw-cmp { display: flex; flex-direction: column; gap: 4px; }
.pw-row { display: flex; align-items: center; gap: 6px; font-size: .7rem; color: var(--h-dim); }
.pw-row span { width: 34px; } .pw-row b { width: 60px; text-align: left; color: var(--h-ink); font-weight: 500; }
.pw-track { flex: 1; height: 6px; background: var(--h-bg2); border-radius: 6px; overflow: hidden; }
.pw-fill { height: 100%; width: 0; background: var(--h-green); border-radius: 6px; transition: width .6s cubic-bezier(.2, .9, .3, 1); }
.pw-fill.foe { background: var(--h-red); }

/* ---------- ریلِ راست ---------- */
.hud-rail { position: fixed !important; z-index: 31; top: calc(var(--h-top) + 4px); right: 8px; bottom: calc(var(--h-bottom) + 18px); width: var(--h-rail); display: flex !important; flex-direction: column !important; gap: 6px; padding: 6px; margin: 0 !important; overflow-y: auto; background: var(--h-panel) !important; border: 1.5px solid var(--h-line) !important; border-radius: 16px !important; box-shadow: none !important; scrollbar-width: none; }
.hud-rail::-webkit-scrollbar { display: none; }
.hud-rail .tabbtn { position: relative; flex: 0 0 auto; width: 100%; min-height: 54px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: inherit; font-size: .62rem; font-weight: 600; color: var(--h-dim); background: var(--h-panel2) !important; border: 1.5px solid transparent !important; border-radius: 12px !important; cursor: pointer; transition: color .15s, border-color .15s, transform .15s, background .15s; }
.hud-rail .tabbtn .ic { width: 22px; height: 22px; }
.hud-rail .tabbtn:hover { color: var(--h-ink); transform: translateX(-2px); border-color: color-mix(in srgb, var(--tone) 55%, transparent) !important; }
.hud-rail .tabbtn.active { color: var(--tone); background: color-mix(in srgb, var(--tone) 16%, var(--h-panel2)) !important; border-color: var(--tone) !important; transform: translateX(-4px); }
.hud-rail .tabbtn::after { display: none !important; }
.tab-badge { position: absolute; top: 3px; right: 6px; min-width: 15px; height: 15px; padding: 0 3px; font-style: normal; font-size: .6rem; line-height: 15px; text-align: center; color: #fff; background: var(--h-red); border-radius: 8px; }
.tab-badge[hidden] { display: none; }

/* ---------- کشوی راست ---------- */
.drawer-scrim { position: fixed; inset: 0; z-index: 32; background: rgba(2, 6, 10, .5); opacity: 0; pointer-events: none; transition: opacity .25s; display: none; }
.hud-drawer { position: fixed; z-index: 33; top: calc(var(--h-top) + 4px); right: calc(var(--h-rail) + 16px); bottom: calc(var(--h-bottom) + 18px); width: min(470px, calc(100vw - var(--h-rail) - 40px)); display: flex; flex-direction: column; background: var(--h-bg2); border: 1.5px solid var(--h-line); border-radius: 18px; box-shadow: -18px 0 40px rgba(0, 0, 0, .45); transform: translateX(calc(100% + var(--h-rail) + 40px)); visibility: hidden; transition: transform .38s cubic-bezier(.22, .9, .3, 1), visibility 0s .38s; }
.hud-drawer.open { transform: none; visibility: visible; transition: transform .38s cubic-bezier(.22, .9, .3, 1), visibility 0s; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--h-line); }
.drawer-head h2 { margin: 0; font-family: "Lalezar", "Vazirmatn", sans-serif; font-weight: 400; font-size: 1.35rem; color: var(--h-amber2); }
.drawer-close { width: 32px; height: 32px; color: var(--h-ink); background: var(--h-panel2); border: 0; border-radius: 10px; cursor: pointer; transition: background .15s, transform .15s; }
.drawer-close:hover { background: var(--h-red); transform: rotate(90deg); }
.hud-drawer .game-stage { flex: 1; min-height: 0; margin: 0 !important; max-width: none; padding: 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.hud-drawer .page.active { animation: none !important; }
.hud-drawer.open .page.active { animation: drawer-page .35s .08s both !important; }
@keyframes drawer-page { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.hud-drawer .grid-2, .hud-drawer .grid-3 { grid-template-columns: 1fr; gap: 12px; }
.hud-drawer .item-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

/* ---------- پایین ---------- */
.hud-bottom { position: fixed; z-index: 25; left: 12px; right: 12px; bottom: 10px; height: calc(var(--h-bottom) - 6px); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr) minmax(200px, .8fr); gap: var(--h-gap); padding: 10px; background: var(--h-panel); border: 1.5px solid var(--h-line); border-radius: 16px; }
.hb-arsenal { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; min-height: 0; }
.ars-box { min-height: 0; display: flex; flex-direction: column; background: var(--h-bg2); border: 1.5px solid var(--h-line); border-radius: 12px; padding: 5px 8px; overflow: hidden; }
#ars-missiles { grid-row: 1 / 3; }
.ars-box h4 { margin: 0 0 4px; font-size: .74rem; font-weight: 700; color: var(--h-dim); }
.ars-list { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 5px; overflow-y: auto; scrollbar-width: thin; }
.ars-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 4px; font: inherit; font-size: .66rem; color: var(--h-ink); background: var(--h-panel2); border: 1.5px solid transparent !important; border-radius: 9px; cursor: default; }
.ars-chip[data-mk] { cursor: pointer; transition: border-color .15s, transform .12s; }
.ars-chip[data-mk]:hover { transform: translateY(-1px); }
.ars-chip.on { border-color: var(--h-red) !important; background: rgba(255, 106, 74, .14); box-shadow: 0 0 0 2px rgba(255, 106, 74, .18); }
.ars-chip .thumb { width: 24px; height: 24px; }
.ars-chip b { color: var(--h-amber2); font-weight: 700; }
.ars-empty { font-size: .7rem; color: var(--h-dim); }
.hb-dispatch { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 6px 4px; }
.dsp-top { display: flex; justify-content: space-between; gap: 8px; font-size: .72rem; color: var(--h-dim); }
.dsp-top b { color: var(--h-dim); font-weight: 600; max-width: 55%; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsp-top b.ok { color: var(--h-green); }
.dsp-slider { position: relative; padding: 4px 2px 14px; }
.dsp-slider input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; margin: 0; background: linear-gradient(to right, var(--h-amber) var(--p, 0%), var(--h-bg2) var(--p, 0%)); border-radius: 12px; outline: none; direction: ltr; }
.dsp-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #e9eef4; border: 3px solid var(--h-amber); cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.dsp-slider input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #e9eef4; border: 3px solid var(--h-amber); cursor: pointer; }
.dsp-ticks { position: absolute; left: 12px; right: 12px; bottom: 2px; display: flex; justify-content: space-between; direction: ltr; pointer-events: none; }
.dsp-ticks i { width: 5px; height: 5px; border-radius: 50%; background: var(--h-dim); opacity: .5; transition: background .2s, opacity .2s; }
.dsp-ticks i.on { background: var(--h-amber); opacity: 1; }
.dsp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dsp-count { font-size: .8rem; color: var(--h-dim); } .dsp-count b { color: var(--h-ink); font-size: 1rem; }
.dsp-go { flex: 0 0 auto; padding: 9px 20px; font: inherit; font-weight: 800; font-size: .88rem; color: #fff; background: var(--h-red); border: 0; border-radius: 12px; cursor: pointer; transition: transform .12s, filter .15s; }
.dsp-go:hover:not(:disabled) { filter: brightness(1.12); } .dsp-go:active:not(:disabled) { transform: scale(.95); }
.dsp-go:disabled { background: var(--h-panel2); color: var(--h-dim); cursor: not-allowed; }
.dsp-cool { min-height: 14px; font-size: .68rem; color: #ffb3a1; }
.hb-stats { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font-size: .74rem; color: var(--h-dim); background: var(--h-bg2); border: 1.5px solid var(--h-line); border-radius: 999px; white-space: nowrap; }
.st b { color: var(--h-ink); font-weight: 700; }
.st .ic { width: 15px; height: 15px; color: var(--h-amber); }
.st-coin { justify-content: center; padding: 6px 12px; font-size: 1rem; border-color: rgba(242, 169, 59, .4); } .st-coin b { color: var(--h-amber2); font-size: 1.05rem; letter-spacing: .3px; }
.st-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; align-content: start; }

/* ---------- کامپوننت‌های قدیمی داخلِ کشو: تمِ جدید ---------- */
body.hud-body .glass-panel, body.hud-body .card, body.hud-body .acct-card, body.hud-body .news-panel, body.hud-body .tg-card, body.hud-body .exchange-card, body.hud-body .atk-box, body.hud-body .ground-hud, body.hud-body .event-banner { background: var(--h-panel) !important; border: 1.5px solid var(--h-line) !important; border-radius: 14px !important; box-shadow: none !important; }
body.hud-body .glass-panel::before, body.hud-body .glass-panel::after { display: none !important; }
body.hud-body .glass-panel.wide { margin-bottom: 12px; }
body.hud-body .glass-panel h2 { font-family: "Lalezar", "Vazirmatn", sans-serif; font-size: 1.15rem; font-weight: 400; color: var(--h-ink); }
body.hud-body .glass-panel h2 .ic { color: var(--h-amber); filter: none; }
body.hud-body .item-card, body.hud-body .gun-card, body.hud-body .target-card, body.hud-body .rank-list li, body.hud-body .mission, body.hud-body .res-item, body.hud-body .eco-card, body.hud-body .missile-pick-item, body.hud-body .group-row, body.hud-body .chat-msg, body.hud-body .log-entry, body.hud-body .report-kv, body.hud-body .hub-tile, body.hud-body .gh-stat, body.hud-body .am-inv-chip, body.hud-body .live-war-item, body.hud-body .ml-row, body.hud-body .kv-row { background: var(--h-panel2) !important; border: 1.5px solid transparent !important; border-radius: 12px !important; box-shadow: none !important; }
body.hud-body .item-card:hover, body.hud-body .gun-card:hover, body.hud-body .hub-tile:hover, body.hud-body .group-row:hover { background: var(--h-g-fill-2, #1d3144) !important; border-color: var(--h-line) !important; transform: translateY(-1px); }
body.hud-body .chip-btn { color: #1b1203 !important; background: var(--h-amber) !important; border: 0 !important; border-radius: 10px !important; font-weight: 700; box-shadow: none !important; transition: transform .12s, filter .15s; }
body.hud-body .chip-btn:hover { filter: brightness(1.08); } body.hud-body .chip-btn:active { transform: scale(.96); }
body.hud-body .chip-btn.ghost { color: var(--h-ink) !important; background: var(--h-panel2) !important; border: 1.5px solid var(--h-line) !important; }
body.hud-body .chip-btn:disabled { opacity: .45; }
body.hud-body .btn-launch { background: var(--h-red) !important; border: 0 !important; border-radius: 12px !important; box-shadow: none !important; }
body.hud-body input:not([type=range]), body.hud-body select, body.hud-body textarea { color: var(--h-ink); background: var(--h-bg2) !important; border: 1.5px solid var(--h-line) !important; border-radius: 10px !important; font-family: inherit; }
body.hud-body textarea { width: 100%; padding: 8px 10px; }
body.hud-body input:focus-visible, body.hud-body select:focus-visible, body.hud-body textarea:focus-visible, body.hud-body button:focus-visible { outline: 2px solid var(--h-blue) !important; outline-offset: 1px; }
body.hud-body .subtabbar, body.hud-body .tabbar:not(.mainnav) { background: transparent !important; box-shadow: none !important; }
body.hud-body .subtab, body.hud-body .tabbtn.gv-tab { color: var(--h-dim); background: var(--h-panel2) !important; border: 0 !important; border-radius: 999px !important; box-shadow: none !important; }
body.hud-body .subtab.active, body.hud-body .tabbtn.gv-tab.active { color: #1b1203; background: var(--h-amber) !important; }
body.hud-body .bar { background: var(--h-bg2) !important; border-radius: 8px !important; } body.hud-body .bar-fill { background: var(--h-amber) !important; }
body.hud-body .modal-card, body.hud-body .fx-modal, body.hud-body .sidebar-panel, body.hud-body .group-view-backdrop { background: var(--h-bg2) !important; box-shadow: 0 20px 50px rgba(0, 0, 0, .6) !important; }
body.hud-body .modal-card, body.hud-body .fx-modal { border: 1.5px solid var(--h-line) !important; border-radius: 18px !important; }
body.hud-body .modal-backdrop, body.hud-body .fx-backdrop, body.hud-body .sidebar-backdrop { background: rgba(2, 6, 10, .66) !important; }
body.hud-body .group-view-backdrop { z-index: 60; }
body.hud-body .sidebar-backdrop { z-index: 70; } body.hud-body .modal-backdrop { z-index: 80; } body.hud-body .fx-backdrop { z-index: 90; }
body.hud-body .toast-stack { top: calc(var(--h-top) + 6px); z-index: 95; }
body.hud-body .toast { background: var(--h-panel2) !important; border: 1.5px solid var(--h-line) !important; border-radius: 12px !important; }
body.hud-body .rank-badge.owner, body.hud-body .rank-badge.admin { color: var(--h-amber2); }
body.hud-body .logout-btn { color: #ffb3a1 !important; background: var(--h-panel2) !important; border: 1.5px solid var(--h-line) !important; border-radius: 10px !important; width: 100%; padding: 8px; cursor: pointer; font: inherit; }

/* تیکت */
.tk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; } .tk-top h2 { margin: 0 !important; }
.tk-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.tk-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; font: inherit; text-align: start; color: var(--h-ink); background: var(--h-panel2); border: 1.5px solid transparent; border-radius: 12px; cursor: pointer; transition: border-color .15s, transform .12s; }
.tk-row:hover { border-color: var(--h-line); transform: translateY(-1px); } .tk-row.closed { opacity: .6; }
.tk-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--h-line); flex: 0 0 auto; } .tk-dot.on { background: var(--h-red); box-shadow: 0 0 0 3px rgba(255, 106, 74, .2); }
.tk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .tk-main b { font-size: .88rem; } .tk-main small { color: var(--h-dim); font-size: .7rem; }
.tk-st { font-size: .7rem; padding: 2px 9px; color: var(--h-green); background: rgba(95, 211, 141, .12); border-radius: 999px; } .tk-row.closed .tk-st { color: var(--h-dim); background: var(--h-bg2); }
.tk-form { display: flex; flex-direction: column; gap: 10px; max-width: none !important; } .tk-lbl { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--h-dim); } .tk-lbl input, .tk-lbl select { padding: 8px 10px; }
.tk-meta { font-size: .74rem; color: var(--h-dim); margin-bottom: 8px; }
.tk-thread { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow-y: auto; padding: 4px; }
.tk-msg { max-width: 90%; padding: 8px 12px; font-size: .84rem; line-height: 1.7; background: var(--h-panel2); border-radius: 12px; align-self: flex-end; white-space: pre-wrap; word-break: break-word; } .tk-msg small { display: block; font-size: .66rem; color: var(--h-dim); }
.tk-msg.staff { align-self: flex-start; background: rgba(92, 200, 255, .12); border-inline-start: 3px solid var(--h-blue); }
.tk-reply { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }

/* حالتِ صرفه‌جویی */
body.low-gfx .hud-drawer, body.low-gfx .hud-rail .tabbtn, body.low-gfx .globe-card { transition-duration: .01s !important; animation: none !important; }

/* ---------- موبایل ---------- */
@media (max-width: 1100px) { :root { --h-left: 250px; } .hud-drawer { width: min(430px, calc(100vw - var(--h-rail) - 30px)); } }
@media (max-width: 900px) {
  :root { --h-rail: 58px; --h-bottom: 150px; --h-top: 54px; }
  .hud-left { display: none; width: auto; right: calc(var(--h-rail) + 20px); z-index: 28; } body.show-left .hud-left { display: flex; }
  .hud-globe { left: 6px; right: calc(var(--h-rail) + 14px); border-radius: 16px; }
  .hud-brand { display: none; } .hud-id { margin-inline-end: auto; }
  .hud-rail { right: 4px; padding: 4px; } .hud-rail .tabbtn { min-height: 48px; font-size: .56rem; } .hud-rail .tabbtn .ic { width: 20px; height: 20px; }
  .hud-drawer { right: 8px; left: 8px; width: auto; top: calc(var(--h-top) + 2px); transform: translateX(110%); border-radius: 16px; }
  .drawer-scrim { display: block; } .drawer-scrim.show { opacity: 1; pointer-events: auto; }
  .hud-bottom { left: 6px; right: 6px; grid-template-columns: 1fr 1fr; grid-template-rows: auto; padding: 6px; gap: 6px; }
  .hb-arsenal { display: none; } .hb-dispatch { grid-column: 1; padding: 2px; } .hb-stats { grid-column: 2; } .st-grid { grid-template-columns: 1fr 1fr; gap: 3px; } .st { padding: 2px 6px; font-size: .66rem; } .st-coin { padding: 3px 8px; }
  .dsp-top { flex-direction: column; gap: 0; } .dsp-top b { max-width: 100%; } .dsp-go { padding: 7px 12px; font-size: .8rem; }
  .globe-card { top: auto; bottom: 8px; left: 8px; right: 8px; width: auto; max-height: 52%; } .globe-zoom { top: 8px; transform: none; right: 8px; flex-direction: row; } .globe-legend { display: none; }
  .globe-modes { left: 8px; transform: none; top: 8px; } .globe-info { top: 46px; left: 8px; transform: none; width: calc(100% - 16px); }
}
@media (max-width: 900px) { .hud-bottom { --ars: 0; } }
.hud-left-toggle { display: none; position: fixed; z-index: 29; left: 10px; bottom: calc(var(--h-bottom) + 20px); width: 40px; height: 40px; font-size: 1.1rem; color: var(--h-ink); background: var(--h-panel2); border: 1.5px solid var(--h-line); border-radius: 12px; cursor: pointer; }
@media (max-width: 900px) { .hud-left-toggle { display: block; } }
@media (prefers-reduced-motion: reduce) { .hud-drawer, .hud-rail .tabbtn, .globe-card.show, .hud-drawer.open .page.active { transition: none !important; animation: none !important; } }

/* ---------- اصلاح‌های نهایی ---------- */
.globe-card[hidden], .hud-pop[hidden], .tab-badge[hidden] { display: none !important; }
.hud-top { direction: ltr; }
.hud-top > * { direction: rtl; }
body.hud-body .hud-rail { top: calc(var(--h-top) + 4px) !important; bottom: calc(var(--h-bottom) + 18px) !important; height: auto !important; right: 8px !important; left: auto !important; }
body.hud-body .hud-icons .hamburger-btn { position: static !important; inset: auto !important; }
.tab-badge { position: absolute; top: 3px; left: 6px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--h-red); color: #fff; font: 700 .6rem/15px Vazirmatn, sans-serif; text-align: center; font-style: normal; }
body.hud-body .hud-rail { padding: 6px !important; }
body.hud-body .globe-card { height: auto !important; min-height: 0 !important; bottom: auto !important; left: auto !important; right: 10px !important; top: 52px; width: min(300px, calc(100% - 20px)) !important; max-height: calc(100% - 120px); background: var(--h-panel) !important; padding: 10px 12px 12px !important; overflow-y: auto; }
body.hud-body .globe-card .mc-head, body.hud-body .globe-card .mc-body { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 0 6px !important; min-height: 0 !important; border-radius: 0 !important; }
body.hud-body .globe-card .mc-head::before, body.hud-body .globe-card .mc-head::after { display: none !important; }
@media (max-width: 980px) { body.hud-body .globe-card { top: auto !important; bottom: 8px !important; right: 8px !important; left: 8px !important; width: auto !important; max-height: 55%; } }

.hud-left-toggle { display: none; }
@media (max-width: 980px) {
  .hud-left-toggle { display: flex !important; position: fixed; z-index: 29; left: 12px; bottom: calc(var(--h-bottom) + 24px); width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; background: var(--h-panel); border: 1.5px solid var(--h-line); font-size: 1.1rem; cursor: pointer; }
  body.hud-body .globe-info, body.hud-body .globe-legend { display: none !important; }
  body.hud-body .globe-zoom { flex-direction: column !important; top: auto !important; bottom: 8px !important; right: 8px !important; left: auto !important; }
  body.hud-body .globe-modes { top: 6px; right: 6px; }
  body.show-left .hud-left { left: 6px; top: calc(var(--h-top) + 4px); bottom: calc(var(--h-bottom) + 76px); width: min(300px, calc(100vw - 100px)); right: auto; }
}
@media (max-width: 560px) {
  .hud-top { padding: 6px 8px; gap: 5px; }
  .hud-icons { gap: 4px; }
  body.hud-body .hud-icons .hud-ico, body.hud-body .hud-icons .chip-icon-btn, body.hud-body .hud-icons .hamburger-btn { width: 32px; height: 32px; min-width: 32px; }
  #hud-clock, #pwa-notify, #pwa-ios, #sound-toggle { display: none !important; }
}
