/* ============================================================
 CastelMapScanner v2.5.0 — dark tactical emerald theme
 bg #0d120f • cards #161d18 • border #26332c
 primary #34d399 • amber #fbbf24 • rose #f87171
 ============================================================ */

/* ═══ v3.6.0 \xABرادار کامل\xBB (The Complete Radar) — NO new classes: the
 NEW \xAB🔋 شارژها (سپر)\xBB dashboard section (/api/charges — the LAST
 uncaptured GET endpoint from the user's real traffic) renders
 through the EXISTING generic dashboard renderer (one collapsible
 section per captured endpoint + \xABکپی JSON\xBB), so every style it
 needs is already here. The war card, the simulator, the shields
 clock and the dossier are byte-stable. RTL-safe as always. ═══ */

/* ═══ v3.6.3 — LOCAL Vazirmatn (fonts/ next to the app): no Google Fonts
 dependency — the program renders identically offline / behind the
 Iranian filter. Weights map 400/600/700 to Regular/Medium/Bold. ═══ */
@font-face {
font-family: "Vazirmatn";
src: url("fonts/Vazirmatn-Regular.woff2") format("woff2");
font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
font-family: "Vazirmatn";
src: url("fonts/Vazirmatn-Medium.woff2") format("woff2");
font-weight: 500 600; font-style: normal; font-display: swap;
}
@font-face {
font-family: "Vazirmatn";
src: url("fonts/Vazirmatn-Bold.woff2") format("woff2");
font-weight: 700 900; font-style: normal; font-display: swap;
}

:root {
--bg: #0d120f;
--bg-deep: #090d0b;
--card: #161d18;
--card-2: #1b241e;
--border: #26332c;
--border-soft: #1e2822;
--primary: #34d399;
--primary-strong: #10b981;
--primary-10: rgba(52, 211, 153, 0.1);
--primary-15: rgba(52, 211, 153, 0.15);
--primary-25: rgba(52, 211, 153, 0.25);
--primary-40: rgba(52, 211, 153, 0.4);
--amber: #fbbf24;
--amber-15: rgba(251, 191, 36, 0.15);
--amber-40: rgba(251, 191, 36, 0.4);
--rose: #f87171;
--rose-10: rgba(248, 113, 113, 0.1);
--rose-15: rgba(248, 113, 113, 0.15);
--rose-40: rgba(248, 113, 113, 0.4);
--text: #e7efe9;
--muted: #93a89a;
--muted-2: #6d8175;
--shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
margin: 0;
font-family: "Vazirmatn", "Tahoma", "Segoe UI", sans-serif;
background: var(--bg);
color: var(--text);
font-size: 14px;
line-height: 1.7;
}

.app {
min-height: 100vh;
display: flex;
flex-direction: column;
}

.hidden { display: none !important; }

/* ---------------- header ---------------- */

.header {
position: sticky;
top: 0;
z-index: 40;
border-bottom: 1px solid var(--border);
background: rgba(13, 18, 15, 0.85);
backdrop-filter: blur(10px);
}

.header-inner {
max-width: 1280px;
margin: 0 auto;
height: 56px;
padding: 0 16px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-icon {
width: 36px; height: 36px;
flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
border-radius: 10px;
border: 1px solid var(--primary-25);
background: var(--primary-15);
font-size: 18px;
}

.brand-title {
margin: 0;
font-size: 16px;
font-weight: 800;
letter-spacing: -0.2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.version-badge { font-size: 10px; }

@media (max-width: 480px) { .version-badge { display: none; } }

/* v3.10.0 — instance badge (\xABنمونهٔ پورت\xBB): with the portable
 multi-instance exe several panels run side by side (8787, 8788 …);
 the green badge next to the version + the tab title always show
 WHICH instance this panel drives (own port = own data folder =
 own account). */
.inst-badge {
font-size: 10px;
direction: ltr;
border-color: rgba(52, 211, 153, 0.45);
color: #6ee7b7;
background: rgba(52, 211, 153, 0.08);
}
.inst-badge[hidden] { display: none !important; }
@media (max-width: 480px) {
.inst-badge { font-size: 9px; padding: 2px 7px; }
}

.status-chip {
display: flex;
align-items: center;
gap: 8px;
height: 36px;
padding: 0 12px;
border-radius: 999px;
border: 1px solid var(--border);
background: rgba(27, 36, 30, 0.6);
font-size: 12px;
font-weight: 500;
min-width: 0;
max-width: 46vw;
transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.status-msg {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: var(--muted);
}

.dot, .hud-dot, .pulse-dot {
width: 8px; height: 8px;
border-radius: 50%;
background: var(--muted);
flex-shrink: 0;
display: inline-block;
}

.status-chip.tone-active { border-color: var(--primary-40); background: var(--primary-10); color: #6ee7b7; }
.status-chip.tone-active .status-msg { color: #6ee7b7; }
.status-chip.tone-active .dot { background: var(--primary); animation: pulse 1.2s ease-in-out infinite; }
.status-chip.tone-done { border-color: var(--primary-strong); background: #059669; color: #ecfdf5; }
.status-chip.tone-done .status-msg { color: #ecfdf5; }
.status-chip.tone-done .dot { background: #d1fae5; }
.status-chip.tone-bad { border-color: var(--rose-40); background: var(--rose-10); color: #fca5a5; }
.status-chip.tone-bad .status-msg { color: #fca5a5; }
.status-chip.tone-bad .dot { background: var(--rose); }

@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.35; }
}

/* ---------------- layout ---------------- */

.main { flex: 1 1 auto; }

.container {
max-width: 1280px;
margin: 0 auto;
padding: 16px 16px 24px;
width: 100%;
}

.footer {
margin-top: auto;
border-top: 1px solid var(--border);
padding: 12px 16px;
text-align: center;
color: var(--muted);
font-size: 12px;
background: var(--bg-deep);
}

/* ---------------- tabs — v3.7.7: VERTICAL STICKY RAIL ----------------
 User request: the old horizontal tabs box overflowed the page width and
 scrolled out of reach. The section nav is now a vertical rail BESIDE the
 content, sticky on screen at any scroll depth (desktop ≥900px) — and on
 phones the SAME nav becomes a fixed bottom bar (app-style), so every
 section is always one tap away and nothing ever overflows horizontally. */

.tabs {
display: flex;
flex-direction: column;
gap: 4px;
margin-bottom: 12px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 12px;
padding: 5px;
}

.tab {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 8px;
min-height: 44px;
padding: 8px 10px;
border: none;
background: transparent;
color: var(--muted);
border-radius: 9px;
font-family: inherit;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: background 0.15s, color 0.15s;
white-space: nowrap;
text-align: start;
}

.tab-ico { font-size: 16px; line-height: 1; flex-shrink: 0; }
.tab-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.tab:hover { color: var(--text); background: rgba(52, 211, 153, 0.06); }

.tab.active {
background: var(--primary-15);
color: var(--primary);
font-weight: 700;
}

/* desktop/tablet-landscape ≥900px: two-column layout — sticky rail + panels */
@media (min-width: 900px) {
.container {
display: grid;
grid-template-columns: 218px minmax(0, 1fr);
gap: 16px;
align-items: start;
}
.tabs {
position: sticky;
/* v3.9.16 — while the spy-alarm banner is up under the header, the
   rail sticks BELOW it (the banner sets --spy-banner-h from its
   live height; 0px = no banner, the classic threshold) */
top: calc(72px + var(--spy-banner-h, 0px));
max-height: calc(100vh - 88px - var(--spy-banner-h, 0px));
overflow-y: auto;
margin-bottom: 0;
}
.tab { min-height: 42px; font-size: 13.5px; }
.panels { grid-column: 2; min-width: 0; }
}

/* phones + narrow tablets <900px: the rail becomes a FIXED bottom bar */
@media (max-width: 899px) {
.tabs {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 45;                      /* under the modals (60) */
flex-direction: row;
gap: 2px;
margin-bottom: 0;
border-width: 1px 0 0 0;
border-radius: 14px 14px 0 0;
padding: 5px 4px calc(5px + env(safe-area-inset-bottom, 0px));
background: rgba(13, 18, 15, 0.94);
backdrop-filter: blur(10px);
box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
}
.tab {
flex: 1 1 0;
min-width: 0;
flex-direction: column;
justify-content: center;
gap: 3px;
min-height: 54px;
padding: 4px 2px;
font-size: 10px;
line-height: 1.3;
white-space: normal;              /* two-line labels allowed */
text-align: center;
}
.tab-ico { font-size: 17px; }
.tab-txt {
max-width: 100%;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* clearance so the fixed bar never covers the footer/content */
.app { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
.container { padding-bottom: 16px; }
}

/* ---------------- cards ---------------- */

.card {
background: var(--card);
border: 1px solid var(--border);
border-radius: 14px;
padding: 16px;
}

.card-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 12px;
}

.card-head h2 { margin: 0; font-size: 14px; font-weight: 700; }

/* ---------------- badges & buttons ---------------- */

.badge {
display: inline-flex;
align-items: center;
gap: 4px;
border-radius: 8px;
padding: 2px 8px;
font-size: 11px;
font-weight: 500;
border: 1px solid transparent;
white-space: nowrap;
}

.badge-outline { border-color: var(--border); color: var(--muted); background: transparent; }
.badge-secondary { background: rgba(27, 36, 30, 0.85); color: var(--text); border-color: var(--border-soft); }
.badge-success { border-color: var(--primary-40); background: var(--primary-15); color: #6ee7b7; }
.badge-amber { border-color: var(--amber-40); background: var(--amber-15); color: var(--amber); }
.badge-rose { border-color: var(--rose-40); background: var(--rose-15); color: #fca5a5; }
.badge-dark { background: rgba(0, 0, 0, 0.6); color: #fff; border-color: transparent; backdrop-filter: blur(4px); }
.badge-done-solid { background: var(--primary-strong); border-color: var(--primary-strong); color: #ecfdf5; }

.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
border-radius: 10px;
border: 1px solid transparent;
font-family: inherit;
font-size: 13px;
font-weight: 600;
padding: 0 16px;
cursor: pointer;
transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
min-height: 44px;
}

.btn.h-44 { min-height: 44px; }
.btn.h-36 { min-height: 36px; }
.w-full { width: 100%; }

.btn-primary { background: var(--primary-strong); color: #052e1f; }
.btn-primary:hover:not(:disabled) { background: #34d399; }

.btn-secondary { background: rgba(27, 36, 30, 0.9); color: var(--text); border-color: var(--border-soft); }
.btn-secondary:hover:not(:disabled) { background: #232f27; }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover:not(:disabled) { background: rgba(52, 211, 153, 0.06); border-color: var(--primary-40); }

.btn-outline-success { background: transparent; color: #6ee7b7; border-color: var(--primary-40); }
.btn-outline-success:hover:not(:disabled) { background: var(--primary-10); }

.btn-destructive { background: #be123c; color: #fff1f2; }
.btn-destructive:hover:not(:disabled) { background: #e11d48; }

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-round {
width: 44px; height: 44px;
min-height: 44px;
border-radius: 50%;
border: 1px solid var(--border);
background: rgba(27, 36, 30, 0.7);
color: var(--text);
font-size: 17px;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background 0.15s, border-color 0.15s;
}

.btn-round:hover:not(:disabled) { background: #232f27; border-color: var(--primary-40); }
.btn-round:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }

/* v3.9.17 — the anti-attack card's \xABواکنش به جاسوسی\xBB row label */
.xa-spy-label { align-self: center; font-weight: 700; font-size: 13px; padding-inline-start: 2px; }
.xa-cap-input { max-width: 150px; min-width: 110px; text-align: center; }

/* ---------------- inputs ---------------- */

.input, .url-input, #ask-input {
width: 100%;
background: var(--bg-deep);
border: 1px solid var(--border);
border-radius: 10px;
color: var(--text);
font-family: inherit;
font-size: 14px;
padding: 10px 12px;
outline: none;
transition: border-color 0.15s;
}

.input:focus, .url-input:focus, #ask-input:focus { border-color: var(--primary-40); }

.url-input { font-family: ui-monospace, Consolas, monospace; text-align: left; min-width: 160px; flex: 1 1 200px; }

select.input { cursor: pointer; }

input[type="range"] {
width: 100%;
accent-color: var(--primary-strong);
height: 24px;
cursor: pointer;
}

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.field-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }

.mono { font-family: ui-monospace, Consolas, monospace; }

/* switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
position: absolute; inset: 0;
background: var(--bg-deep);
border: 1px solid var(--border);
border-radius: 999px;
cursor: pointer;
transition: background 0.2s, border-color 0.2s;
}
.switch .slider::before {
content: "";
position: absolute;
width: 18px; height: 18px;
right: 3px; top: 3px;
background: var(--muted);
border-radius: 50%;
transition: transform 0.2s, background 0.2s;
}
.switch input:checked + .slider { background: var(--primary-15); border-color: var(--primary-40); }
.switch input:checked + .slider::before { transform: translateX(-20px); background: var(--primary); }

/* ---------------- scan grid ---------------- */
/* v3.9.6 — the manual scanner's config panel is GONE (user request);
 the game browser now owns the whole tab — one full-width column and
 a much taller viewport (a real game window, not a scan preview). */
.scan-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }

.browser-card { padding: 0; overflow: hidden; }

.url-bar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
padding: 12px;
border-bottom: 1px solid var(--border);
}

/* ═══════════ v3.9.11: the in-app TAB STRIP — a Chrome-like browser ⬐
 inside the game section (user report: \xABقسمت بازی اگه بروزر کامل باشه
 مثل کروم با قابلیت تب و برگشت مثلا همه چی تو همون قسمت بازی انجام
 میشه … در واقع تب جدید داخل همون قسمت بازی هست با قابلیت جابجایی
 بین تب های مختلف\xBB). One tab per page: switch/close at will, ＋ for a
 new one. RTL: the first tab sits rightmost, the ＋ button at the far
 left — exactly like Chrome in Persian. Every tab is a same-origin
 frame behind the scanner's proxy and stays alive while hidden. ═══ */
.gtabs {
display: flex;
align-items: stretch;
gap: 4px;
padding: 10px 12px 0;
border-bottom: 1px solid var(--border);
overflow-x: auto;
scrollbar-width: thin;
}
.gtabs::-webkit-scrollbar { height: 4px; }
.gtabs::-webkit-scrollbar-thumb { background: var(--primary-25); border-radius: 4px; }

.gtab {
display: inline-flex;
align-items: center;
gap: 6px;
flex: 0 1 auto;
max-width: 190px;
min-width: 56px;
padding: 7px 10px;
border: 1px solid var(--border);
border-bottom: 0;
border-radius: 10px 10px 0 0;
background: rgba(27, 36, 30, 0.55);
color: var(--muted);
font-size: 12px;
font-weight: 600;
cursor: pointer;
white-space: nowrap;
}
.gtab:hover { background: rgba(52, 211, 153, 0.08); color: var(--text); }
.gtab.active {
background: rgba(52, 211, 153, 0.12);
color: var(--text);
border-color: var(--primary-25);
box-shadow: inset 0 2px 0 var(--primary);
}
.gtab .gtab-ico { flex: none; }
.gtab .gtab-title {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.gtab .gtab-close {
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
border-radius: 6px;
font-size: 13px;
line-height: 1;
color: var(--muted);
}
.gtab .gtab-close:hover { background: rgba(248, 113, 113, 0.15); color: #f87171; }

.gtab-new {
flex: none;
align-self: center;
width: 30px;
height: 30px;
margin-inline-start: 2px;
border: 1px dashed var(--primary-25);
border-radius: 8px;
background: transparent;
color: var(--muted);
font-size: 15px;
line-height: 1;
cursor: pointer;
}
.gtab-new:hover {
border-color: var(--primary);
color: var(--primary);
background: rgba(52, 211, 153, 0.08);
}

/* the per-tab toolbar: → (back) ← (forward) ⟳ (reload) — per ACTIVE tab */
.nav-btns { display: flex; gap: 4px; flex: none; }
.nav-btn {
width: 36px;
height: 36px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid var(--border);
border-radius: 10px;
background: rgba(27, 36, 30, 0.55);
color: var(--text);
font-size: 16px;
cursor: pointer;
}
.nav-btn:hover:not(:disabled) {
border-color: var(--primary);
color: var(--primary);
}
.nav-btn:disabled { opacity: 0.35; cursor: default; }

/* v3.9.12 — \xAB🎮 بازی دوباره\xBB: wider text button (not a 36px square) */
.nav-btn-game {
width: auto;
padding: 0 10px;
font-size: 12.5px;
font-weight: 600;
gap: 4px;
white-space: nowrap;
}
.nav-btn-game:hover:not(:disabled) {
background: rgba(52, 211, 153, 0.1);
}

/* v3.9.12 — TOKEN-DEAD BANNER: the always-visible one-click
 \xABبازی را داخل اسکنر دوباره باز کنید\xBB fix while the token is dead */
.token-dead-banner {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 10px;
margin: 0;
padding: 10px 12px;
border: 1px solid rgba(248, 113, 113, 0.45);
background: rgba(248, 113, 113, 0.08);
border-radius: 12px;
font-size: 13px;
line-height: 1.9;
}
.token-dead-banner .tdb-icon { font-size: 18px; flex: none; }
.token-dead-banner .tdb-text { flex: 1 1 240px; color: #fca5a5; }
.token-dead-banner .btn { flex: none; }
.token-dead-banner.hidden { display: none; }

/* v3.11.8 — LINK-DEAD BANNER (auto-reconnect in progress): amber, not
 red — the program is HANDLING it, this is a progress banner, not a
 dead end. The status line under the title carries the live progress
 (reloading / retry 2 of 5 / waiting for the internet). */
.link-dead-banner {
border-color: rgba(245, 158, 11, 0.5);
background: rgba(245, 158, 11, 0.1);
}
.link-dead-banner .tdb-text { color: #fcd34d; }
.link-dead-banner #link-dead-status {
display: block;
color: #93a89a;
font-size: 12.5px;
margin-top: 4px;
}
.link-dead-banner #link-dead-status.err { color: #f87171; }
/* the 🔗 خودکار toggle's OFF state (aria-pressed="false") */
.nav-btn.nav-btn-off {
opacity: 0.45;
border-color: rgba(148, 163, 184, 0.4);
}

@media (max-width: 640px) {
.gtabs { padding: 8px 8px 0; }
.gtab { max-width: 140px; padding: 6px 8px; }
.nav-btn { width: 34px; height: 34px; }
.nav-btn-game { padding: 0 8px; font-size: 11.5px; }
.token-dead-banner .tdb-text { flex-basis: 100%; }
}

.viewport {
position: relative;
height: 540px;
background: var(--bg-deep);
overflow: hidden;
border-radius: 0 0 14px 14px;
background-image:
linear-gradient(rgba(52, 211, 153, 0.04) 1px, transparent 1px),
linear-gradient(90deg, rgba(52, 211, 153, 0.04) 1px, transparent 1px);
background-size: 36px 36px;
}

@media (min-width: 640px) { .viewport { height: 640px; } }
@media (min-width: 1024px) { .viewport { height: calc(100vh - 200px); min-height: 640px; } }

#game-frame { width: 100%; height: 100%; border: 0; display: block; background: #0b0f0d; }

.empty-state {
position: absolute; inset: 0;
display: flex; flex-direction: column;
align-items: center; justify-content: center;
gap: 12px; padding: 24px; text-align: center;
}

.empty-icon {
width: 56px; height: 56px;
display: flex; align-items: center; justify-content: center;
border-radius: 16px;
border: 1px solid var(--border);
background: rgba(27, 36, 30, 0.6);
font-size: 26px;
}

.empty-title { margin: 0; font-size: 14px; font-weight: 700; }
.empty-sub { margin: 0; max-width: 340px; font-size: 12px; color: var(--muted); line-height: 1.8; }

.loading-overlay {
position: absolute; inset: 0; z-index: 10;
display: flex; flex-direction: column;
align-items: center; justify-content: center; gap: 8px;
background: rgba(9, 13, 11, 0.72);
backdrop-filter: blur(4px);
font-size: 12px; color: var(--muted);
}

.spinner {
width: 24px; height: 24px;
border: 3px solid var(--primary-25);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 0.8s linear infinite;
display: inline-block;
}

.spinner-sm { width: 14px; height: 14px; border-width: 2px; vertical-align: -2px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- HUD ---------------- */

.hud {
position: absolute;
top: 12px; inset-inline-start: 12px;
z-index: 20;
min-width: 170px; max-width: 230px;
display: flex; flex-direction: column; gap: 6px;
border: 1px solid var(--border);
background: rgba(22, 29, 24, 0.88);
backdrop-filter: blur(6px);
border-radius: 10px;
padding: 8px;
font-size: 12px;
}

.hud-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hud-dot { width: 6px; height: 6px; background: var(--muted); }
.hud-dot.active { background: var(--primary); animation: pulse 1.2s ease-in-out infinite; }
.hud-dot.done { background: var(--primary-strong); }
.hud-dot.bad { background: var(--rose); }
.hud-msg { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hud-progress-wrap { display: flex; flex-direction: column; gap: 4px; }
.hud-progress-labels {
display: flex; justify-content: space-between;
font-size: 10px; color: var(--muted);
}

.progress {
height: 6px;
background: var(--bg-deep);
border-radius: 999px;
overflow: hidden;
border: 1px solid var(--border-soft);
}

.progress-fill {
height: 100%;
width: 0%;
background: linear-gradient(90deg, #10b981, #34d399);
border-radius: 999px;
transition: width 0.4s ease;
}

.hud-quadrants { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 2px; }

.q-chip {
border-radius: 6px;
border: 1px solid var(--border);
background: rgba(27, 36, 30, 0.5);
color: var(--muted);
padding: 1px 6px;
font-size: 10px;
line-height: 16px;
transition: all 0.15s;
}

.q-chip.current { border-color: var(--primary-40); background: var(--primary-15); color: #6ee7b7; animation: pulse 1.2s infinite; }
.q-chip.done { border-color: rgba(52, 211, 153, 0.25); background: var(--primary-10); color: rgba(110, 231, 183, 0.8); }

.hud-thumb { height: 56px; display: flex; align-items: center; }
.hud-thumb img { height: 100%; width: auto; border-radius: 6px; border: 1px solid var(--border-soft); }
.hud-thumb-empty {
height: 56px; width: 100%;
display: flex; align-items: center; justify-content: center;
border: 1px dashed var(--border);
border-radius: 6px;
color: var(--muted);
font-size: 10px;
}

/* ---------------- zoom toolbar ---------------- */

.zoom-toolbar {
position: absolute;
bottom: 12px;
inset-inline-end: 12px; /* bottom-end corner — away from centered page CTAs */
z-index: 20;
display: flex; align-items: center; gap: 6px;
border: 1px solid var(--border);
background: rgba(22, 29, 24, 0.92);
backdrop-filter: blur(6px);
border-radius: 999px;
padding: 6px;
box-shadow: var(--shadow);
pointer-events: none; /* clicks pass through the pill itself */
}
.zoom-toolbar .btn-round,
.zoom-toolbar .zoom-pitch { pointer-events: auto; }

.zoom-toolbar .btn-round { width: 40px; height: 40px; font-size: 20px; }
.zoom-pitch { font-size: 11px; height: 30px; }

/* ---------------- config panel ---------------- */

.panel-title { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.panel-title h2 { margin: 0; font-size: 14px; font-weight: 700; }
.t-icon { font-size: 15px; }

.auto-analyze-box {
display: flex; align-items: center; justify-content: space-between; gap: 12px;
border: 1px solid var(--border);
background: rgba(27, 36, 30, 0.35);
border-radius: 10px;
padding: 12px;
margin-bottom: 14px;
}

.aa-title { font-size: 13px; font-weight: 600; }
.aa-sub { margin: 2px 0 0; font-size: 11px; color: var(--muted); }

.hint { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 10px 0 0; }

.error-box {
margin-top: 10px;
border: 1px solid var(--rose-40);
background: var(--rose-10);
color: #fca5a5;
border-radius: 10px;
padding: 10px;
font-size: 12px;
line-height: 1.8;
}

.success-box {
margin-top: 10px;
display: flex; flex-direction: column; gap: 10px;
border: 1px solid var(--primary-40);
background: var(--primary-10);
border-radius: 10px;
padding: 12px;
}

.success-title { margin: 0; font-size: 14px; font-weight: 700; color: #6ee7b7; }

/* ---------------- AI tab ---------------- */

.ai-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px; text-align: center; }

#ai-content { display: flex; flex-direction: column; gap: 16px; }

.stat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

@media (min-width: 640px) { .stat-tiles { grid-template-columns: repeat(4, 1fr); } }

.stat-tile { border-radius: 10px; background: rgba(27, 36, 30, 0.55); padding: 12px; }
.st-label { margin: 0; font-size: 11px; color: var(--muted); }
.st-value { margin: 2px 0 0; font-size: 20px; font-weight: 800; }
.st-value.emerald { color: var(--primary); }

.ai-progress-block { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }

.ai-progress-line {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
font-size: 12px; color: var(--muted); flex-wrap: wrap;
}

.ai-running { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; }
.pulse-dot { width: 6px; height: 6px; background: var(--primary); animation: pulse 1.2s infinite; }

.error-text { color: var(--rose); font-size: 12px; margin: 4px 0 0; }

.muted-center { color: var(--muted); font-size: 12px; text-align: center; padding: 22px 0; margin: 0; line-height: 1.9; }

/* frames grid */
.frames-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
max-height: 384px;
overflow-y: auto;
padding: 4px;
}

@media (min-width: 640px) { .frames-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .frames-grid { grid-template-columns: repeat(4, 1fr); } }

.frame-card {
position: relative;
aspect-ratio: 16 / 9;
border-radius: 10px;
border: 1px solid var(--border);
background: rgba(27, 36, 30, 0.4);
overflow: hidden;
cursor: pointer;
padding: 0;
transition: border-color 0.15s;
font-family: inherit;
display: block;
width: 100%;
}

.frame-card:hover { border-color: var(--primary-40); }
.frame-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

.fc-q {
position: absolute; top: 4px; inset-inline-start: 4px;
font-size: 10px;
}

.fc-status {
position: absolute; top: 4px; inset-inline-end: 4px;
font-size: 10px;
}

.fc-pos {
position: absolute; inset-inline: 0; bottom: 0;
background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
color: rgba(255, 255, 255, 0.9);
font-family: ui-monospace, Consolas, monospace;
font-size: 10px;
padding: 14px 6px 4px;
text-align: center;
}

/* report */
.report-view { font-size: 13px; line-height: 2; }
.report-view h1, .report-view h2, .report-view h3 { color: var(--primary); margin: 14px 0 6px; }
.report-view h1 { font-size: 17px; }
.report-view h2 { font-size: 15px; }
.report-view h3 { font-size: 14px; color: #a7f3d0; }
.report-view p { margin: 6px 0; }
.report-view ul, .report-view ol { margin: 6px 0; padding-inline-start: 22px; }
.report-view li { margin: 3px 0; }
.report-view strong { color: #d1fae5; }

/* chat */
.chat-box {
max-height: 288px;
overflow-y: auto;
padding: 4px;
display: flex;
flex-direction: column;
gap: 8px;
}

.chat-user {
align-self: flex-end;
max-width: 85%;
background: var(--primary-15);
border: 1px solid rgba(52, 211, 153, 0.3);
border-radius: 14px;
padding: 10px 12px;
font-size: 13px;
line-height: 1.8;
white-space: pre-wrap;
word-break: break-word;
}

.chat-assistant {
align-self: flex-start;
max-width: 85%;
background: rgba(27, 36, 30, 0.9);
border-radius: 14px;
padding: 10px 12px;
font-size: 13px;
line-height: 1.8;
word-break: break-word;
}

.chat-pending {
align-self: flex-start;
display: flex; align-items: center; gap: 8px;
background: rgba(27, 36, 30, 0.9);
border-radius: 14px;
padding: 10px 12px;
color: var(--muted);
font-size: 13px;
}

.ask-row { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
#ask-input { resize: none; min-height: 44px; max-height: 120px; flex: 1; }
.btn-send { width: 44px; height: 44px; min-width: 44px; padding: 0; font-size: 17px; }

/* ---------------- history ---------------- */

.history-list { max-height: 384px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px; }

.history-row {
display: flex; align-items: center; justify-content: space-between; gap: 12px;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--card);
padding: 12px;
cursor: pointer;
transition: border-color 0.15s;
text-align: start;
width: 100%;
font-family: inherit;
color: inherit;
}

.history-row:hover { border-color: var(--primary-40); }

.history-main { min-width: 0; }
.history-title { margin: 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-date { margin: 2px 0 4px; font-size: 12px; color: var(--muted); }
.history-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.history-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-direction: column; }
@media (min-width: 480px) { .history-side { flex-direction: row; } }

.history-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 0; }

/* ---------------- guide ---------------- */

.guide-card { display: flex; flex-direction: column; gap: 18px; padding: 24px; font-size: 13px; line-height: 2; }

.guide-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 700; color: var(--primary); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; align-items: flex-start; gap: 10px; }
.step-num {
flex-shrink: 0;
width: 24px; height: 24px;
display: flex; align-items: center; justify-content: center;
border-radius: 50%;
border: 1px solid var(--primary-40);
background: var(--primary-10);
color: var(--primary);
font-size: 12px;
font-weight: 700;
margin-top: 4px;
}

.bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bullets li { display: flex; gap: 10px; }
.bullet-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(52, 211, 153, 0.7); flex-shrink: 0; margin-top: 11px; }

.sep { border: none; border-top: 1px solid var(--border); margin: 0; }

.about-line { margin: 0; color: var(--muted); }

/* ---------------- frame modal ---------------- */

.modal-backdrop {
position: fixed; inset: 0; z-index: 60;
background: rgba(5, 8, 6, 0.75);
backdrop-filter: blur(3px);
display: flex; align-items: center; justify-content: center;
padding: 16px;
}

.modal {
background: var(--card);
border: 1px solid var(--border);
border-radius: 14px;
width: 100%;
max-width: 680px;
max-height: 92vh;
overflow-y: auto;
box-shadow: var(--shadow);
}

.modal-head {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
padding: 14px 16px;
border-bottom: 1px solid var(--border);
position: sticky; top: 0;
background: var(--card);
z-index: 2;
}

.modal-head h3 { margin: 0; font-size: 15px; font-weight: 700; }

.modal-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.frame-image-wrap {
display: flex; flex-direction: column; align-items: center; gap: 8px;
border: 1px solid var(--border);
background: var(--bg-deep);
border-radius: 10px;
padding: 8px;
color: var(--muted);
font-size: 12px;
}

.frame-image-wrap img { max-width: 100%; max-height: 56vh; border-radius: 6px; }

.frame-meta { display: flex; flex-wrap: wrap; gap: 8px; }

.frame-summary {
margin: 0;
background: rgba(27, 36, 30, 0.45);
border-radius: 10px;
padding: 12px;
font-size: 13px;
line-height: 1.9;
}

.detections { display: flex; flex-direction: column; gap: 8px; max-height: 256px; overflow-y: auto; padding: 4px; }

.det-row {
display: flex; align-items: flex-start; gap: 10px;
background: rgba(27, 36, 30, 0.45);
border-radius: 10px;
padding: 10px;
}

.det-icon {
width: 32px; height: 32px;
flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
border-radius: 8px;
border: 1px solid var(--border);
background: rgba(27, 36, 30, 0.9);
font-size: 16px;
}

.det-main { flex: 1 1 auto; min-width: 0; }
.det-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.det-name { font-size: 13px; font-weight: 700; }
.det-sub { font-size: 11px; color: var(--muted); }
.det-notes { margin: 4px 0 0; font-size: 11px; color: var(--muted); line-height: 1.8; }

/* ---------------- scrollbars ---------------- */

::-webkit-scrollbar, .frames-grid::-webkit-scrollbar, .chat-box::-webkit-scrollbar,
.history-list::-webkit-scrollbar, .detections::-webkit-scrollbar { width: 6px; height: 6px; }

::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2b3a31; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #3a4f43; }

/* ---------------- misc ---------------- */

@media (max-width: 640px) {
.header-inner { height: 50px; }
.container { padding: 12px 10px 16px; }
.card { padding: 12px; }
.url-bar { padding: 10px; }
}

@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* panels hidden unless active — DOM stays alive so the scan iframe never reloads */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadein 0.18s ease; }

.blink { animation: pulse 1.2s ease-in-out infinite; }

/* ---------------- v2.5.2: loading hint + diagnostics ---------------- */

.load-hint {
margin-top: 10px;
display: flex; flex-direction: column; align-items: center; gap: 8px;
background: rgba(22, 29, 24, 0.92);
border: 1px solid var(--border);
border-radius: 12px;
padding: 14px 18px;
max-width: 420px;
text-align: center;
}
.load-hint-title { margin: 0; font-size: 13px; font-weight: 800; color: #fbbf24; }
.load-hint-sub { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.9; }

/* ═══════════ v3.9.16 — the \xAB🚨 هشدارها\xBB tab (health report + spy
 alarm). The old .frame-diag strip (absolute-positioned INSIDE the
 game viewport — it overlaid the game, per the user's report) is
 GONE; its data renders in the alerts tab now. ═══════════ */

/* the tab's unread count bubble (spy alarms + unseen page errors) */
.tab {
/* position:relative so the bubble can pin to the corner */
position: relative;
}
.tab-badge {
position: absolute;
top: 2px;
inset-inline-end: 4px;
min-width: 18px;
height: 18px;
padding: 0 5px;
border-radius: 999px;
background: #dc2626;
border: 2px solid rgba(13, 18, 15, 0.95);
color: #fff;
font-size: 10px;
font-weight: 800;
line-height: 14px;
text-align: center;
pointer-events: none;
animation: fd-pulse 1.6s ease-in-out infinite;
z-index: 2;
}
@keyframes fd-pulse {
0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55); }
55% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

/* the spy alarm banner — sticky under the header as the FIRST strip of
 the page (never inside the game viewport, so it can never cover the
 game; while it is up, ALL content — rail, panels, game included —
 shifts down naturally, then it stays pinned under the header) */
.spy-banner {
position: sticky;
top: 56px;
z-index: 38;                      /* under the modals, above the content */
display: flex;
align-items: center;
gap: 10px;
width: 100%;
padding: 8px 14px;
background: linear-gradient(90deg, #7f1d1d 0%, #b91c1c 60%, #7f1d1d 100%);
border: 1px solid #ef4444aa;
border-top: none;
border-radius: 0 0 12px 12px;
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
color: #fff;
}
@media (max-width: 640px) {
.spy-banner { top: 50px; border-radius: 0 0 10px 10px; padding: 6px 10px; gap: 8px; }
}
.sb-icon { font-size: 20px; flex-shrink: 0; }
.sb-text {
flex: 1 1 auto;
min-width: 0;
font-size: 12.5px;
font-weight: 700;
line-height: 1.8;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.sb-see { flex-shrink: 0; }
.sb-close {
flex-shrink: 0;
width: 30px; height: 30px;
border: 1px solid #ffffff44;
border-radius: 8px;
background: transparent;
color: #fff;
font-size: 14px;
cursor: pointer;
transition: background 0.15s;
}
.sb-close:hover { background: rgba(255, 255, 255, 0.14); }
.sb-pulse { animation: sb-banner-pulse 1.1s ease-in-out 4; }
@keyframes sb-banner-pulse {
0%, 100% { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); }
50% { box-shadow: 0 8px 34px rgba(239, 68, 68, 0.75); }
}

/* the spy alarm feed rows */
.sp-alarm {
display: flex;
align-items: flex-start;
gap: 10px;
padding: 8px 10px;
border-radius: 10px;
border: 1px solid #3d4a2f;
background: #121813;
margin-bottom: 6px;
}
.sp-alarm.sp-top { border-color: #7f1d1d88; background: #1c1412; }
.sp-alarm.sp-march .sp-alarm-ico { background: rgba(251, 191, 36, 0.16); }
.sp-alarm.sp-mail .sp-alarm-ico { background: rgba(252, 165, 165, 0.14); }
.sp-alarm-ico {
flex-shrink: 0;
width: 34px; height: 34px;
display: flex; align-items: center; justify-content: center;
font-size: 17px;
border-radius: 9px;
}
.sp-alarm-main { flex: 1 1 auto; min-width: 0; }
.sp-alarm-title { font-weight: 800; font-size: 12.5px; color: #f3ede4; }
.sp-alarm.sp-top .sp-alarm-title { color: #fca5a5; }
.sp-alarm-sub { font-size: 11.5px; color: var(--muted); line-height: 1.9; }
.sp-alarm-at { font-size: 10.5px; color: #7c8f82; margin-top: 2px; }
.sp-cd { color: #fbbf24; font-weight: 700; white-space: nowrap; }
.sp-phase-alert { color: #fca5a5 !important; font-weight: 800; }
.sp-unread { color: #fca5a5; }

/* the health report card (same live data the old in-viewport strip had) */
.fd-stats {
display: flex;
flex-wrap: wrap;
gap: 10px 14px;
padding: 10px 12px;
margin-top: 4px;
border: 1px solid var(--border);
border-radius: 10px;
background: #121813;
color: #9fb3a6;
font-size: 11.5px;
}
.fd-warn { color: #fbbf24; font-weight: 700; }
.fd-list {
max-height: 260px;
overflow-y: auto;
padding: 2px;
margin-top: 8px;
}
.fd-item {
font-family: Consolas, Menlo, monospace;
font-size: 10.5px;
direction: ltr;
text-align: left;
color: #fca5a5;
padding: 3px 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.fd-item .fd-kind { color: #fbbf24; }
.fd-item .fd-src { color: #7c8f82; }
.fd-empty { color: var(--muted); font-size: 12px; line-height: 2; margin: 6px 2px; text-align: center; }

.diag-body { display: flex; flex-direction: column; gap: 10px; }
.diag-row {
display: flex; align-items: flex-start; gap: 10px;
background: var(--bg-card, #161d18);
border: 1px solid var(--border);
border-radius: 10px;
padding: 10px 12px;
font-size: 12.5px; line-height: 1.9;
}
.diag-row .d-icon { font-size: 16px; line-height: 1.4; }
.diag-row .d-main { flex: 1; }
.diag-row .d-title { font-weight: 700; }
.diag-row .d-sub { color: var(--muted); font-size: 11px; direction: ltr; text-align: left; word-break: break-all; }
.diag-row.ok { border-color: #2450743a; }
.diag-row.ok .d-title { color: #34d399; }
.diag-row.bad { border-color: #7f1d1d66; }
.diag-row.bad .d-title { color: #f87171; }
.diag-advice {
background: #1c2117; border: 1px solid #3a3320; border-radius: 10px;
padding: 10px 12px; font-size: 12px; line-height: 2.1; color: #e7d9a8;
}
.diag-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.diag-actions .btn { flex: 1; min-width: 140px; }

/* ═══════════ v2.5.3: AI settings modal ═══════════ */
.card-head-row{display:flex;align-items:center;gap:8px}
.card-head-row .btn-round{font-size:15px}
.field-row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:560px){.field-row2{grid-template-columns:1fr}}
.field-hint{margin:6px 0 0;font-size:12px;color:#8aa294;line-height:1.9}
.ai-cfg-status{margin:0 0 14px;padding:10px 12px;border-radius:10px;font-size:13px;line-height:1.9;border:1px solid transparent}
.ai-cfg-status.info{background:#12211a;color:#a7c4b5;border-color:#234634}
.ai-cfg-status.ok{background:#0f2318;color:#8ee7b4;border-color:#1f5e3c}
.ai-cfg-status.bad{background:#241214;color:#fda4af;border-color:#5e1f2a}
.ai-cfg-status.hidden{display:none}
#ai-config-modal .field{margin-bottom:12px}
#ai-config-modal .field label{display:block;font-size:12.5px;color:#9db8aa;margin-bottom:6px;font-weight:500}

/* ═══════════ v2.5.8: full-map scan + players list ═══════════ */
.estimate-box{
margin-top:10px;padding:10px 12px;border-radius:10px;
background:#12211a;border:1px solid #234634;
font-size:12.5px;line-height:2;color:#a7c4b5;
}
.estimate-box b{color:#34d399}
.players-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:10px 0 12px}
.players-toolbar .input{flex:1;min-width:180px}
/* v3.11.24: \xABجستجوی هوشمند\xBB — level range + power range row */
.players-smart{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:2px 0 0}
.ps-field{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:#dfe9e2;white-space:nowrap}
.ps-field .input{width:74px;min-width:0;flex:none;padding:2px 8px}
.players-smart .btn{white-space:nowrap}
.pl-power-cell{font-variant-numeric:tabular-nums;white-space:nowrap}
.pl-power-chip{display:inline-block;padding:1px 7px;border-radius:999px;background:#13251b;border:1px solid #2f5a41;color:#6ee7a8;font-size:11.5px}
/* v2.9.2: \xABانتخاب ستون‌های کپی\xBB — compact picker row under the toolbar */
.players-cols{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:2px 0 12px}
.players-cols-label{font-size:12px;font-weight:600;color:#9db8aa;white-space:nowrap}
.pc-col{
display:inline-flex;align-items:center;gap:5px;cursor:pointer;
font-size:12px;color:#dfe9e2;white-space:nowrap;user-select:none;
padding:3px 8px;border-radius:8px;border:1px solid #23342a;background:#131c16;
transition:border-color .15s,background .15s;
}
.pc-col:hover{border-color:#2f5a41;background:#152019}
.pc-col input{accent-color:#34d399;cursor:pointer;margin:0}
.pc-col small{color:#8aa294;font-size:10.5px}
.players-cols-note{font-size:11px;color:#8aa294;white-space:nowrap}
.players-sub{margin:0 0 4px;font-size:12px}
.players-table-wrap{max-height:420px;overflow-y:auto;border:1px solid #23342a;border-radius:10px}
.players-table{width:100%;border-collapse:collapse;font-size:12.5px}
.players-table thead{position:sticky;top:0;z-index:1}
.players-table thead th{
background:#152019;color:#9db8aa;font-weight:600;text-align:right;
padding:8px 10px;border-bottom:1px solid #23342a;white-space:nowrap;
}
.players-table tbody td{
padding:7px 10px;border-bottom:1px solid #1b2a21;color:#dfe9e2;
white-space:nowrap;
}
.players-table tbody tr:nth-child(odd){background:#131c16}
.players-table tbody tr:hover{background:#182a1f}
.players-table .pl-name{font-weight:600;color:#f5f0e6}
/* v3.9.0 — attack-history chip (\xAB⚔️ \xD7N \xB7 آخرین حمله\xBB) in the players
 list: warm accent on the dark row, never steals the name's weight */
.pl-atk-chip{
display:inline-block;margin-inline-start:6px;padding:1px 7px;border-radius:999px;
font-size:10.5px;font-weight:700;white-space:nowrap;direction:rtl;
background:#3a2418;border:1px solid #7a4a24;color:#f0b27a;
}
.pl-atk-chip:hover{background:#4a2e1c}
/* v3.9.0 — the camp multi-troop rows (one row per troop type) */
.ac-troops{display:flex;flex-direction:column;gap:0;margin:2px 0}
.ac-troop-row{margin-bottom:6px;align-items:center}
.ac-troop-row .ac-t-del{flex:0 0 auto;padding:4px 10px;font-size:12px}
.ac-troops-empty{margin:4px 0 8px;font-size:11.5px;line-height:1.9;color:#8aa294}
.players-note{margin:10px 0 0;font-size:11.5px;color:#8aa294;line-height:1.9}
@media (max-width:560px){
.players-table thead th,.players-table tbody td{padding:6px 6px;font-size:11.5px}
}

/* ═══════════ v2.6.0: offline engine + engine selector + mosaic ═══════════ */
.engine-card{padding:16px 18px}
.engine-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.engine-head h2{margin:0;font-size:15px}
.engine-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:720px){.engine-choices{grid-template-columns:1fr}}
.engine-choice{
display:flex;flex-direction:column;gap:6px;text-align:right;cursor:pointer;
padding:14px;border-radius:12px;border:1.5px solid #23342a;background:#131c16;
color:#dfe9e2;font-family:inherit;transition:border-color .15s,background .15s;
}
.engine-choice:hover{border-color:#2f5a41}
.engine-choice.selected{border-color:#34d399;background:#15291e;box-shadow:0 0 0 1px #34d39955}
.engine-choice .ec-icon{font-size:22px;line-height:1}
.engine-choice .ec-title{font-size:14px;font-weight:700}
.engine-choice .ec-title .badge{margin-inline-start:6px;font-size:10px}
.engine-choice .ec-sub{font-size:12px;color:#9db8aa;line-height:1.8}
.engine-choice .ec-req{font-size:11px;color:#7fae93}
#offline-card .btn-row{flex-wrap:wrap}
.offline-status{margin:0 0 10px;font-size:12.5px;line-height:1.9;color:#a7c4b5}
.offline-status.ok{color:#8ee7b4}
.offline-status.warn{color:#fbbf24}
.offline-progress{margin:10px 0 0;font-size:12px;color:#6ee7b7;line-height:1.9}
.offline-progress.hidden{display:none}
.offline-hint{margin:10px 0 0;font-size:11.5px;color:#8aa294;line-height:1.9}
/* calibration modal */
.modal-wide{max-width:min(980px,94vw);width:100%}
.calib-steps{margin:0 0 12px;font-size:12.5px;color:#a7c4b5;line-height:2}
.calib-steps b{color:#34d399}
.calib-canvas-wrap{
position:relative;border:1px solid #23342a;border-radius:10px;overflow:hidden;
background:#0e1512;margin-bottom:8px;min-height:180px;
display:flex;align-items:center;justify-content:center;
}
.calib-canvas-wrap canvas{display:block;max-width:100%;cursor:crosshair;touch-action:none}
.calib-canvas-wrap .spinner{margin-inline-end:8px}
.calib-tip{margin:0 0 10px;font-size:12px;color:#8aa294}
.calib-tip b{color:#6ee7b7}
.calib-result{
margin:0 0 12px;padding:10px 12px;border-radius:10px;font-size:12.5px;line-height:1.9;
background:#12211a;border:1px solid #234634;color:#a7c4b5;
}
.calib-result b{color:#34d399}
.calib-result .cr-names{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.calib-result .cr-names span{
font:600 11px/1 Vazirmatn,Tahoma,sans-serif;direction:ltr;
background:#15291e;border:1px solid #2f5a41;color:#d1fae5;border-radius:999px;padding:5px 9px;
}
.calib-result .cr-names span.noname{color:#fbbf24;border-color:#66521a;background:#2a2313}
/* mosaic card */
.map-controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:10px 0}
.map-mark-toggle{
display:flex;align-items:center;gap:8px;font-size:12.5px;color:#a7c4b5;cursor:pointer;
padding:8px 12px;border:1px solid #23342a;border-radius:10px;background:#131c16;
}
.map-mark-toggle input{accent-color:#34d399;width:16px;height:16px;cursor:pointer}
.map-progress{margin:8px 0 0;font-size:12px;color:#6ee7b7}
.map-progress.hidden{display:none}
.map-preview{margin-top:12px;border:1px solid #23342a;border-radius:10px;overflow:hidden;max-height:380px}
.map-preview img{display:block;width:100%;height:auto;cursor:zoom-in}
.map-preview.hidden{display:none}
/* map viewer modal */
.map-viewer{border:1px solid #23342a;border-radius:10px;overflow:auto;max-height:70vh;background:#0e1512}
.map-viewer img{display:block;max-width:100%}

/* ---- v2.7.0: direct game data card ---- */
.gd-card{border:1px solid #2b6b4f}
.gd-status{margin:0 0 10px;font-size:12.5px;line-height:1.9;color:#a7c4b5}
.gd-status.ok{color:#8ee7b4}
.gd-status.warn{color:#fbbf24}
.gd-status.err{color:#f87171}
.gd-progress{margin:10px 0 0;font-size:12px;color:#6ee7b7;line-height:1.9}
.gd-progress.hidden{display:none}
.gd-hint{margin:10px 0 0;font-size:11.5px;color:#8aa294;line-height:1.9}
.gd-source-badge{display:inline-block;margin-inline-start:6px;font-size:10.5px;color:#34d399;border:1px solid #2b6b4f;border-radius:999px;padding:1px 8px;vertical-align:middle}

/* ---- v2.7.1: fetch receipt (شناسنامهٔ دریافت) + API discovery log ---- */
.gd-receipt{margin:8px 0 0;font-size:12px;line-height:2;color:#8ee7b4;background:rgba(52,211,153,.07);border:1px dashed #2b6b4f;border-radius:10px;padding:6px 12px}
.gd-receipt.hidden{display:none}
.gd-discovery{margin:12px 0 0;border:1px solid #243d31;border-radius:10px;padding:6px 12px}
.gd-discovery.hidden{display:none}
.gd-discovery summary{cursor:pointer;font-size:12px;color:#a7c4b5;user-select:none}
.gd-discovery-hint{margin:6px 0 4px;font-size:11px;color:#8aa294;line-height:1.8}
#gd-discovery-list{direction:ltr;text-align:left}
.gd-disc-row{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;color:#9fb8aa;line-height:1.9;white-space:nowrap;overflow-x:auto}
.gd-disc-row .m{color:#7dd3fc}
.gd-disc-row .s{color:#fbbf24}
.gd-disc-row .c{color:#8aa294}
/* v2.9.1 — muted \xABآخرین: <concrete path>\xBB next to the count (numeric-id
 endpoints are grouped under a :id key; this shows the latest real path) */
.gd-disc-row .lp{color:#6d8175}

/* ---- v2.8.0: ACCOUNT DASHBOARD (\xABداشبورد حساب من\xBB) ---- */
.acc-card{padding:16px 18px}
/* v2.9.1 — status line + \xABدانلود کل داشبورد (JSON)\xBB button row */
.acc-toprow{display:flex;flex-wrap:wrap;align-items:center;gap:8px;justify-content:space-between}
.acc-toprow .acc-status{flex:1 1 auto;min-width:200px}
.acc-export-btn{
display:inline-flex;align-items:center;justify-content:center;gap:6px;
border-radius:10px;border:1px solid var(--primary-40);background:transparent;
color:#6ee7b7;font-family:inherit;font-size:12px;font-weight:600;
padding:0 14px;min-height:34px;cursor:pointer;white-space:nowrap;
transition:background .15s,border-color .15s,color .15s;
}
.acc-export-btn:hover{background:var(--primary-10)}
.acc-export-btn:disabled{opacity:.45;cursor:not-allowed}
/* v2.9.1 — small \xABکپی JSON\xBB button on every dashboard section summary */
.acc-copy-btn{
display:inline-flex;align-items:center;justify-content:center;
border-radius:8px;border:1px solid var(--border);background:#1b241e;
color:var(--muted);font-family:inherit;font-size:11px;font-weight:600;
padding:2px 10px;min-height:26px;cursor:pointer;white-space:nowrap;
transition:background .15s,border-color .15s,color .15s;
}
.acc-copy-btn:hover{background:#232f27;border-color:var(--primary-40);color:var(--text)}
.acc-section summary{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.acc-section .acc-sum-title{flex:1 1 auto;min-width:120px}
.acc-status{margin:0;font-size:12.5px;line-height:1.9;color:#a7c4b5}
.acc-status.ok{color:#8ee7b4}
.acc-hint{margin:12px 0 0;font-size:11.5px;color:#8aa294;line-height:1.9}
.acc-section{margin:10px 0 0;border:1px solid #243d31;border-radius:10px;padding:6px 12px;background:#12211a}
.acc-section summary{cursor:pointer;font-size:13px;color:#dfe9e2;font-weight:600;user-select:none;line-height:2.1}
.acc-section .acc-sub{font-size:11px;color:#8aa294;font-weight:400}
/* tables mirror .players-table styling but LTR (numbers/latin content) */
.acc-table-wrap{max-height:320px;overflow-y:auto;border:1px solid #23342a;border-radius:10px;margin:8px 0 4px}
.acc-table{width:100%;border-collapse:collapse;font-size:12px}
.acc-table thead{position:sticky;top:0;z-index:1}
.acc-table thead th{
background:#152019;color:#9db8aa;font-weight:600;text-align:left;
padding:7px 10px;border-bottom:1px solid #23342a;white-space:nowrap;
}
.acc-table tbody td{
padding:6px 10px;border-bottom:1px solid #1b2a21;color:#dfe9e2;
white-space:nowrap;
}
.acc-table tbody tr:nth-child(odd){background:#131c16}
.acc-table tbody tr:hover{background:#182a1f}
/* pretty-JSON fallback (objects / arrays of primitives) */
.acc-pre{
direction:ltr;text-align:left;max-height:320px;overflow:auto;
margin:8px 0 4px;padding:10px 12px;border:1px solid #23342a;border-radius:10px;
background:#0f1813;color:#9fb8aa;white-space:pre;
font:11.5px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
.acc-more{margin:4px 0 2px;font-size:11px;color:#8aa294}
.acc-truncated{margin:8px 0 4px;font-size:11.5px;color:#fbbf24;line-height:1.8}
@media (max-width:560px){
.acc-table thead th,.acc-table tbody td{padding:6px 6px;font-size:11.5px}
.acc-toprow{flex-direction:column;align-items:stretch}
.acc-export-btn{width:100%}
}

/* ---- v2.9.0: COMMANDER'S ASSISTANT (\xABدستیار فرماندهی\xBB) ---- */
.cmd-card{padding:16px 18px}
.cmd-lock{
margin:8px 0 0;padding:7px 12px;border:1px solid #4b3f1e;border-radius:10px;
background:#1d1a0e;color:#fbbf24;font-size:11.5px;line-height:1.9;
}
.cmd-section{margin:14px 0 0;border:1px solid #243d31;border-radius:10px;padding:10px 14px;background:#12211a}
.cmd-sec-title{margin:0 0 8px;font-size:13.5px;font-weight:800;color:#dfe9e2}
.cmd-form{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;margin:0 0 10px}
.cmd-field{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#a7c4b5;white-space:nowrap}
.cmd-field.cmd-check{cursor:pointer;user-select:none}
.cmd-note{font-size:10.5px;color:#8aa294}
.cmd-input{
width:86px;background:var(--bg-deep);border:1px solid var(--border);border-radius:8px;
color:var(--text);font-family:inherit;font-size:12.5px;padding:5px 8px;
}
.cmd-input:focus{border-color:var(--primary-40);outline:none}
select.cmd-input{width:auto;cursor:pointer}
.cmd-status{margin:8px 0 0;font-size:12.5px;line-height:1.9;color:#a7c4b5}
.cmd-status.ok{color:#8ee7b4}
.cmd-status.err{color:#fca5a5}
.cmd-hint{margin:8px 0 0;font-size:11.5px;color:#8aa294;line-height:1.9}
.cmd-muted{margin:4px 0;font-size:12px;color:#8aa294;line-height:1.9}
.cmd-summary{margin:2px 0 8px;font-size:12.5px;font-weight:700;color:#8ee7b4}
.cmd-targets-wrap{max-height:360px}
/* alerts list — newest first, severity colors (shield drop = amber/red,
 new player = green), scrollable like the other bounded lists */
.cmd-alerts{max-height:300px;overflow-y:auto;border:1px solid #23342a;border-radius:10px;background:#0f1813;padding:6px 10px}
.cmd-alert{
display:flex;align-items:baseline;gap:8px;padding:7px 4px;
border-bottom:1px solid #1b2a21;font-size:12.5px;line-height:1.8;
}
.cmd-alert:last-child{border-bottom:none}
.cmd-alert-emoji{flex:none}
.cmd-alert-text{flex:1;color:#dfe9e2}
.cmd-alert-time{flex:none;font-size:10.5px;color:#8aa294}
.cmd-alert.danger .cmd-alert-text{color:#fbbf24}
.cmd-alert.danger .cmd-alert-emoji{filter:saturate(1.6)}
.cmd-alert.good .cmd-alert-text{color:#8ee7b4}
/* events log — scope badge + type + text + absolute time */
.cmd-events{margin:14px 0 0;border:1px solid #243d31;border-radius:10px;padding:6px 14px;background:#12211a}
.cmd-events summary{cursor:pointer;font-size:13px;color:#dfe9e2;font-weight:600;user-select:none;line-height:2.1}
.cmd-event{
display:flex;align-items:baseline;gap:8px;padding:6px 4px;
border-bottom:1px solid #1b2a21;font-size:12px;line-height:1.8;
}
.cmd-event:last-child{border-bottom:none}
.cmd-scope{
flex:none;font-size:10px;font-weight:700;border-radius:999px;padding:2px 8px;
border:1px solid #23342a;background:#0f1813;color:#9db8aa;
}
.cmd-scope.watch{border-color:#4b3f1e;color:#fbbf24}
.cmd-scope.sweep{border-color:#1f4636;color:#6ee7b7}
#cmd-events-list{max-height:320px;overflow-y:auto}
@media (max-width:560px){
.cmd-form{gap:8px 10px}
.cmd-input{width:72px}
.cmd-alert{flex-wrap:wrap}
}

/* ═══════════ v2.9.3: SHIELD CLOCK (\xABساعت سپر\xBB) — .sh-* ═══════════
 Mirrors the cmd/players table conventions; the exact-end (game's own
 data) row/cell carries a subtle green tint. */
.sh-hint{margin:0 0 8px;font-size:11.5px;color:#8aa294;line-height:1.9}
.sh-status{margin:8px 0 6px;font-size:12.5px;font-weight:700;color:#8ee7b4}
.sh-list{margin:0}
.sh-list .cmd-muted{margin:6px 2px}
.sh-table-wrap{max-height:340px}
.sh-end-cell{white-space:nowrap}
.sh-exact-text{color:#8ee7b4;font-weight:700}
.sh-est{color:#8aa294;font-size:11.5px}
.sh-unknown{color:#8aa294}
.sh-date{color:#8aa294;font-size:10.5px}
.players-table tbody tr.sh-exact{background:rgba(52,211,153,.07)}
.players-table tbody tr.sh-exact:hover{background:rgba(52,211,153,.13)}
/* v2.9.4 — PROFILE BRIDGE: the narrow 6th \xAB🔄\xBB column + inline feedback */
.sh-refresh-cell{white-space:nowrap;text-align:center}
.sh-refresh{
background:#12241c;color:#6ee7b7;border:1px solid #1f4636;border-radius:999px;
padding:2px 9px;font:600 10.5px Vazirmatn,Tahoma,sans-serif;cursor:pointer;
transition:opacity .15s ease
}
.sh-refresh:hover{background:#163024}
.sh-refresh:disabled{opacity:.55;cursor:wait}
.sh-none{color:#5b6f64;cursor:help}
.sh-feedback{margin:0 0 6px;font-size:11.5px;min-height:0;line-height:1.8}
.sh-feedback.ok{color:#8ee7b4;font-weight:600}
.sh-feedback.err{color:#f59e0b;font-weight:600}
@media (max-width:560px){
.sh-table-wrap{max-height:280px}
.sh-est{font-size:10.5px}
.sh-refresh{padding:2px 7px;font-size:10px}
}

/* ═══════════ v3.6.3: \xABساعت سپر حرفه‌ای\xBB — search/sort/pager/pill ═══════════
 The user's three requests: (1) search in the shield section, (2) sortable
 columns + a list that NEVER jumps to the top (in-place row sync, live
 countdowns), (3) the floating \xABبازگشت به اسکنر\xBB pill over the game. */
.sh-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:2px 0 8px}
.sh-search-input{flex:1;min-width:220px}
.sh-chips{display:flex;gap:6px;flex-wrap:wrap}
.sh-chip{
font-family:inherit;font-size:11px;font-weight:700;color:#9fb8aa;cursor:pointer;
border:1px solid #26332c;border-radius:999px;padding:4px 12px;background:#131a15;
transition:border-color .15s,color .15s,background .15s
}
.sh-chip:hover{border-color:var(--primary-40);color:#cfe5d8}
.sh-chip.active{color:#0b1510;background:var(--primary);border-color:var(--primary)}
.sh-count{margin:0 0 6px;font-size:11.5px;color:#8aa294;font-weight:600}
/* sortable headers — shared by the shield clock + players tables */
th.sh-sortable{cursor:pointer;user-select:none;white-space:nowrap;transition:color .15s}
th.sh-sortable:hover{color:var(--primary)}
th.sh-sortable .sh-sort-ind{font-size:9px;opacity:.55;margin-inline-start:2px}
th.sh-sortable.sorted{color:var(--primary)}
th.sh-sortable.sorted .sh-sort-ind{opacity:1}
th.sh-sortable:focus-visible{outline:2px solid var(--primary-40);outline-offset:-2px;border-radius:6px}
.sh-empty-row td{text-align:center;color:#8aa294;padding:18px 8px !important}
/* live countdown (exact ends) — ticks inside its own span, no reflow */
.sh-countdown{color:#6ee7b7;font-weight:700;font-size:11px;white-space:nowrap}
/* pager — same conventions as the players list */
.sh-pager{display:flex;align-items:center;justify-content:center;gap:12px;margin:10px 0 2px}
.sh-page-label{font-size:12px;font-weight:700;color:#9fb8aa}
.sh-table-wrap{max-height:420px;overflow:auto}
.sh-table-wrap thead th{position:sticky;top:0;z-index:2;background:#182019}
/* floating \xABبازگشت به اسکنر\xBB pill — always above the game iframe */
.back-pill{
position:absolute;inset-inline-start:12px;bottom:12px;z-index:60;
display:inline-flex;align-items:center;gap:7px;
font-family:inherit;font-size:12.5px;font-weight:800;color:#0b1510;
background:var(--primary);border:1px solid #6ee7b7;border-radius:999px;
padding:9px 16px;cursor:pointer;box-shadow:0 6px 20px rgba(16,185,129,.35);
transition:transform .15s,box-shadow .15s,background .15s;touch-action:none
}
.back-pill:hover{background:#4be0ab;transform:translateY(-1px);box-shadow:0 8px 26px rgba(16,185,129,.45)}
.back-pill:active{transform:translateY(0)}
.back-pill.dragging{cursor:grabbing;opacity:.9;transform:none;box-shadow:0 12px 30px rgba(16,185,129,.55)}
/* v3.8.2 — the v3.7.7 in-game \xABبک\xBB pill (`.game-back`) is REMOVED: it
 did not work inside the real game (user report) and only added
 another overlay on the game. The game now opens in its own
 full-screen tab (the \xAB🖥️ تب جدید\xBB button) where the game's own back
 and the browser back both work. */
@media (max-width:560px){
.back-pill{font-size:11.5px;padding:8px 13px;bottom:10px;inset-inline-start:10px}
.sh-toolbar{flex-direction:column;align-items:stretch}
/* v3.7.4 — in the column-stack the .tr-input flex-basis (200px) would
 apply to the HEIGHT (200px-tall select/input!): normalize to natural
 height, full width */
.sh-toolbar .tr-input{flex:0 0 auto;min-width:0;width:100%}
.sh-chips{justify-content:center}
}

/* ═══════════ v2.9.5: PLAYER DOSSIER (\xABپروندهٔ بازیکن\xBB) — .dossier-* ═══════════
 Rendered inside the dashboard's <details class="acc-section"> for captured
 /api/users/<id> profiles matching the KNOWN real shape. Consistent with
 the acc-/sh- card conventions (dark green surfaces, muted labels). */
.dossier{margin:8px 0 4px;border:1px solid #243d31;border-radius:10px;background:#0f1813;padding:10px 12px}
.dossier-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 8px}
.dossier-name{font-size:14px;font-weight:800;color:#dfe9e2}
.dossier-level{font-size:12px;font-weight:700;color:#6ee7b7;border:1px solid #1f4636;border-radius:999px;padding:1px 10px;background:#12241c}
.dossier-veteran{
font-size:11px;font-weight:700;color:#fbbf24;border:1px solid #4b3f1e;border-radius:999px;
padding:1px 10px;background:#1d1a0e;cursor:help
}
.dossier-bio{
margin:0 0 10px;padding:8px 12px;border-inline-start:3px solid #2b6b4f;
border-radius:0 8px 8px 0;background:#12211a;color:#a7c4b5;
font-size:12px;line-height:2;white-space:pre-wrap
}
.dossier-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 16px;margin:0 0 8px}
.dossier-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:4px 2px;border-bottom:1px solid #1b2a21;font-size:12.5px;line-height:1.9}
.dossier-k{color:#8aa294;white-space:nowrap}
.dossier-v{color:#dfe9e2;font-weight:600;text-align:left}
.dossier-peak{color:#fbbf24;font-weight:800}
.dossier-vip-on{color:#6ee7b7;font-size:11px}
.dossier-foot{margin:6px 0 0;font-size:11px;color:#8aa294;line-height:1.9}
/* v2.9.5 — targets-table veteran tint (the \xABاوج\xBB cell + its ⚔️ badge) */
.cmd-veteran-peak{color:#fbbf24;font-weight:800}
.cmd-veteran-badge{cursor:help}
@media (max-width:560px){
.dossier-grid{grid-template-columns:1fr}
.dossier-head{gap:6px}
.dossier-name{font-size:13px}
}

/* ═══════════ v2.9.6: CONFIG DIGEST (\xABدریل تنظیمات\xBB) — .cfg-digest-* ═══════════
 Rendered inside a TRUNCATED \xAB⚙️ تنظیمات بازی\xBB dashboard section: the
 shield-relevant slice the server drilled out of the big configurations
 body at capture time (dotted key paths + humanized values). Consistent
 with the acc-table / dossier conventions (dark green surfaces). */
.cfg-digest{margin:8px 0 4px;border:1px solid #243d31;border-radius:10px;background:#0f1813;padding:10px 12px}
.cfg-digest-title{margin:0 0 6px;font-size:12.5px;font-weight:800;color:#dfe9e2}
.cfg-digest-wrap{max-height:300px;overflow-y:auto;border:1px solid #23342a;border-radius:10px;margin:0 0 4px}
.cfg-digest-table{width:100%;border-collapse:collapse;font-size:12px}
.cfg-digest-table thead th{
position:sticky;top:0;z-index:1;background:#16281f;color:#9fc3af;font-weight:700;
text-align:right;padding:7px 10px;border-bottom:1px solid #234234
}
.cfg-digest-table tbody td{padding:6px 10px;border-bottom:1px solid #1b2a21;color:#dfe9e2;line-height:1.8}
.cfg-digest-table tbody tr:nth-child(odd){background:#131c16}
.cfg-digest-table tbody tr:hover{background:#182a1f}
.cfg-digest-key{color:#8aa294;font-family:Consolas,Menlo,monospace;font-size:11.5px;direction:ltr;text-align:left;white-space:nowrap}
.cfg-digest-note{margin:6px 0 0;font-size:11px;color:#8aa294;line-height:1.9}
@media (max-width:560px){
.cfg-digest-table thead th,.cfg-digest-table tbody td{padding:5px 7px;font-size:11.5px}
.cfg-digest-key{font-size:10.5px;white-space:normal;word-break:break-all}
}


/* ═══════════ v3.0.0/v3.1.0: BATTLE SIMULATOR (\xABشبیه‌ساز نبرد\xBB + \xABدرخت
 واقعی\xBB) — .sim-* ═══════════
 The ⚔️ simulator card (after the commander's assistant): two side-by-side
 panels (enemy manual entry / my auto-filled army from the captured
 /api/soldiers), dynamic rows (category-grouped type select + count + ✖),
 per-side collapsible \xABمرکز تحقیقات\xBB panels (v3.1.0: one line per fielded
 category, inline selects with the TRUE percentage labels), the dispatch
 capacity row, a verdict banner + two Persian-digit loss tables, and 3
 best-composition candidate cards with \xABکپی ترکیب\xBB/\xABاستفاده\xBB. Consistent
 with the cmd-/sh-/dossier conventions (dark green surfaces, muted
 labels). Two-column panels collapse to one column ≤760px; a tighter
 mobile pass ≤560px. */
.sim-card{padding:16px 18px}
.sim-disclaimer{
margin:2px 0 10px;padding:8px 12px;border:1px solid #4b3f1e;border-radius:10px;
background:#1d1a0e;color:#fbbf24;font-size:12px;font-weight:700;line-height:2
}
.sim-panels{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 12px}
.sim-panel{
border:1px solid #243d31;border-radius:12px;background:#0f1813;padding:10px 12px
}
.sim-panel-title{margin:0 0 8px;font-size:13px;font-weight:800;color:#dfe9e2}
.sim-panel-sub{color:#8aa294;font-weight:500;font-size:11px}
.sim-me-note{margin:0 0 8px;font-size:11.5px;color:#8aa294;line-height:2}
.sim-me-note a{color:#6ee7b7;text-decoration:none;border-bottom:1px dotted #6ee7b7}
.sim-row{
display:grid;grid-template-columns:1fr 86px 30px;gap:6px;align-items:center;
padding:5px 0;border-bottom:1px dashed #1b2a21
}
.sim-row:last-child{border-bottom:none}
.sim-type-wrap{display:flex;align-items:center;gap:6px;min-width:0}
.sim-type,.sim-research-select{
background:#16281f;color:#dfe9e2;border:1px solid #26332c;border-radius:8px;
padding:5px 7px;font-size:12px;font-family:inherit;max-width:100%
}
.sim-type:focus,.sim-research-select:focus{outline:1px solid #34d399}
.sim-type optgroup{background:#0d1512;color:#9fc3af;font-style:normal}
.sim-type option{background:#16281f;color:#dfe9e2}
.sim-lvl{
flex:0 0 auto;font-size:10px;color:#8aa294;border:1px solid #1b2a21;border-radius:999px;
padding:1px 7px;background:#131c16;white-space:nowrap;cursor:help
}
.sim-count{
width:100%;background:#16281f;color:#dfe9e2;border:1px solid #26332c;border-radius:8px;
padding:5px 7px;font-size:12px;font-family:inherit;text-align:center
}
.sim-count:focus{outline:1px solid #34d399}
.sim-del{
background:transparent;border:1px solid #3a2a2a;border-radius:8px;color:#f87171;
font-size:12px;line-height:1;padding:6px 0;cursor:pointer
}
.sim-del:hover{background:#2a1515}
/* v3.1.0 — the per-side \xABمرکز تحقیقات\xBB collapsible panels: one line per
 fielded category (category label + inline selects with TRUE % labels) */
.sim-research{
margin:8px 0 0;border:1px solid #243d31;border-radius:10px;background:#0d1712;
padding:6px 10px;font-size:12px
}
.sim-research summary{cursor:pointer;font-weight:800;color:#dfe9e2}
.sim-research-sub{color:#8aa294;font-weight:500;font-size:10.5px}
.sim-research-grid{margin:6px 0 2px;display:flex;flex-direction:column;gap:5px}
.sim-research-line{
display:flex;align-items:center;gap:8px;flex-wrap:wrap;
padding:4px 0;border-bottom:1px dashed #1b2a21
}
.sim-research-line:last-child{border-bottom:none}
.sim-research-cat{flex:0 0 auto;min-width:64px;font-weight:800;color:#9fc3af}
.sim-research-field{
display:inline-flex;align-items:center;gap:4px;color:#8aa294;
font-size:11.5px;white-space:nowrap
}
.sim-research-empty{margin:2px 0;color:#8aa294;font-size:11px;line-height:1.9}
/* v3.1.0 — the dispatch capacity row (number + toggle checkbox) */
.sim-capacity{
display:flex;align-items:center;gap:10px;flex-wrap:wrap;
margin:0 0 10px;padding:8px 12px;border:1px solid #243d31;border-radius:10px;
background:#0f1813;font-size:12px;color:#9fc3af
}
.sim-capacity label{line-height:1.9}
.sim-capacity input[type="number"]{
background:#16281f;color:#dfe9e2;border:1px solid #26332c;border-radius:8px;
padding:5px 7px;font-size:12px;font-family:inherit;width:110px;text-align:center
}
.sim-capacity input[type="number"]:focus{outline:1px solid #34d399}
.sim-capacity-check{display:inline-flex;align-items:center;gap:5px;cursor:pointer}
.sim-capacity-check input{accent-color:#34d399}
/* v3.1.0 — the locked-units hint under MY panel */
.sim-locked-hint{margin:6px 0 0}
.sim-locked-line{margin:0;font-size:11px;color:#8aa294;line-height:1.9}
.sim-locked-details summary{cursor:pointer;font-size:11px;color:#6ee7b7}
.sim-locked-list{display:block;margin:4px 0 0;font-size:10.5px;color:#8aa294;line-height:2;word-break:break-word}
.sim-status{margin:2px 0 0;font-size:12px;color:#8aa294;line-height:2}
.sim-status.ok{color:#6ee7b7}
.sim-feedback{margin:4px 0 0;font-size:12px;font-weight:700;line-height:1.9;min-height:0}
.sim-feedback.ok{color:#6ee7b7}
.sim-feedback.err{color:#f87171}
.sim-verdict{
margin:6px 0 10px;padding:10px 14px;border-radius:12px;font-size:15px;font-weight:800;
border:1px solid #234234;background:#16281f;color:#dfe9e2
}
.sim-verdict.win{border-color:#1f4636;background:#12241c;color:#6ee7b7}
.sim-verdict.lose{border-color:#4b2626;background:#241212;color:#f87171}
.sim-verdict.draw{border-color:#4b3f1e;background:#1d1a0e;color:#fbbf24}
.sim-rounds{font-size:12px;font-weight:600;color:#8aa294;margin-inline-start:8px}
.sim-tables{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 6px}
.sim-table-wrap{border:1px solid #243d31;border-radius:10px;background:#0f1813;padding:8px 10px;overflow-x:auto}
.sim-table-title{margin:0 0 6px;font-size:12.5px;font-weight:800;color:#dfe9e2}
.sim-table{width:100%;border-collapse:collapse;font-size:12px}
.sim-table thead th{
text-align:right;padding:5px 8px;border-bottom:1px solid #234234;color:#9fc3af;font-weight:700
}
.sim-table tbody td{padding:5px 8px;border-bottom:1px solid #1b2a21;color:#dfe9e2;line-height:1.8}
.sim-table tbody tr:last-child td{border-bottom:none}
.sim-muted-cell{color:#8aa294;text-align:center}
.sim-best-note{margin:6px 0 8px;font-size:12.5px;font-weight:700;color:#dfe9e2}
.sim-cands{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin:0 0 6px}
.sim-cand{border:1px solid #243d31;border-radius:12px;background:#0f1813;padding:10px 12px}
.sim-cand-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 6px;color:#dfe9e2;font-size:12.5px}
.sim-cand-head b{font-size:13px}
.sim-cand-verdict{font-size:11.5px;font-weight:800}
.sim-cand-verdict.win{color:#6ee7b7}
.sim-cand-verdict.lose{color:#f87171}
.sim-cand-verdict.draw{color:#fbbf24}
.sim-cand-troops{margin:0 0 4px;font-size:12px;color:#dfe9e2;line-height:2}
.sim-cand-stats{margin:0 0 4px;font-size:11.5px;color:#9fc3af}
.sim-cand-note{margin:0 0 8px;font-size:11px;color:#8aa294;line-height:1.9}
.sim-assumptions{
margin:8px 0 0;border:1px solid #4b3f1e;border-radius:10px;background:#1d1a0e;
padding:8px 12px;font-size:11.5px;color:#fbbf24
}
.sim-assumptions summary{cursor:pointer;font-weight:700}
.sim-assumptions ul{margin:6px 0 0;padding-inline-start:18px;line-height:2;color:#d9c58a}
/* v3.2.0 — the loss-table totals footer (جمع تلفات + the 3-way split) */
.sim-table-total{margin:6px 0 0;font-size:11.5px;color:#9fc3af;line-height:1.9}

/* ═══════════ v3.3.0: REAL BARRACKS (\xABسربازخانهٔ واقعی\xBB) ═══════════
 The four OFFICIAL effectiveness colors (the wiki's own classes):
 مهلک lethal = green-400, مناسب effective = emerald-300 (the app's
 existing accent), نامناسب weak = orange-300, آسیب‌پذیر vulnerable
 = red-400 (the app's existing error tone). Used by the per-unit
 \xABقوی/ضعیف در برابر\xBB chips AND the 7\xD77 matrix cells. */
.sim-fx-chip{
display:inline-block;margin:0 0 0 4px;padding:0 8px;border-radius:999px;
font-size:10.5px;font-weight:700;line-height:1.9;border:1px solid;white-space:nowrap
}
.fx-lethal{color:#4ade80;border-color:#2c6e4b;background:rgba(74,222,128,0.10)}
.fx-effective{color:#6ee7b7;border-color:#2b6b4f;background:rgba(110,231,183,0.10)}
.fx-weak{color:#fdba74;border-color:#8a5a2b;background:rgba(253,186,116,0.10)}
.fx-vulnerable{color:#f87171;border-color:#8a3a3a;background:rgba(248,113,113,0.10)}
/* the per-unit REAL-stats info strip under each row's select */
.sim-unit-info{margin:4px 0 0;display:flex;flex-direction:column;gap:2px}
.sim-unit-stats{margin:0;font-size:10.5px;color:#9fc3af;line-height:1.9;word-break:break-word}
.sim-unit-src{color:#6ee7b7;font-weight:700}
.sim-unit-fx{margin:0;font-size:10.5px;line-height:2.1}
.sim-unit-fx b{font-size:10.5px;margin-inline-end:2px}
.sim-fx-strong{color:#6ee7b7}
.sim-fx-weak{color:#fdba74}
.sim-unit-fx-note{margin:0;font-size:10.5px;color:#8aa294;line-height:1.9}
/* the collapsible 7\xD77 official counter matrix */
.sim-counters{margin:8px 0 0;border:1px solid #243d31;border-radius:10px;background:#0f1813;padding:8px 12px}
.sim-counters summary{cursor:pointer;font-size:12.5px;font-weight:800;color:#dfe9e2}
.sim-counters-sub{font-size:10.5px;font-weight:400;color:#8aa294}
.sim-cnt-legend{margin:8px 0 0;font-size:10.5px;color:#8aa294;line-height:2.2}
.sim-cnt-scroll{overflow-x:auto;margin:6px 0 0}
.sim-cnt-table{border-collapse:collapse;font-size:11px;min-width:100%}
.sim-cnt-table th{padding:4px 8px;border:1px solid #1b2a21;color:#9fc3af;font-weight:700;white-space:nowrap;text-align:center}
.sim-cnt-table thead th{background:#12241c}
.sim-cnt-table tbody th{background:#0d1712;text-align:right}
.sim-cnt-cell{padding:4px 8px;border:1px solid #1b2a21;text-align:center;font-weight:700;white-space:nowrap}
.fx-cell-lethal{color:#4ade80;background:rgba(74,222,128,0.12)}
.fx-cell-effective{color:#6ee7b7;background:rgba(110,231,183,0.10)}
.fx-cell-weak{color:#fdba74;background:rgba(253,186,116,0.10)}
.fx-cell-vulnerable{color:#f87171;background:rgba(248,113,113,0.12)}
.fx-cell-neutral{color:#8aa294;background:transparent;font-weight:400}
.sim-cnt-note{margin:6px 0 0;font-size:10.5px;color:#8aa294;line-height:1.9}
@media (max-width:760px){
.sim-panels{grid-template-columns:1fr}
.sim-tables{grid-template-columns:1fr}
.sim-cands{grid-template-columns:1fr}
}
@media (max-width:560px){
.sim-card{padding:12px}
.sim-row{grid-template-columns:1fr 70px 28px;gap:4px}
.sim-type,.sim-research-select,.sim-count{font-size:11px;padding:4px 6px}
.sim-verdict{font-size:13.5px}
.sim-lvl{font-size:9px}
.sim-research-line{gap:6px}
.sim-capacity{gap:6px;padding:6px 8px}
.sim-capacity input[type="number"]{width:86px}
}

/* ═══════════ v3.2.0: WAR REPORTS (\xABگزارش نبرد\xBB) — .wr-* ═══════════
 The ⚔️ war-reports card (right after the simulator): per report —
 date + حمله badge, the winner banner (subtle green/gold), two
 side-by-side side blocks with the 3-way casualty summary table
 (کل/کشته/مجروح/جراحت سبک/بازمانده/قدرت از دست‌رفته), an
 expandable per-soldier table (compact, horizontally scrollable,
 max-height with overflow per the project's long-list convention),
 the resources row, the measured-ratios stats strip and the muted
 honesty notes. Consistent with the sim-/cmd-/sh- conventions (dark
 green surfaces, muted labels, RTL-safe). Side blocks collapse to
 one column ≤760px; a tighter mobile pass ≤560px.
 v3.4.0 SPY REPORTS: the \xABجاسوسی\xBB badge rides the amber family
 (.wr-spy-badge — deeper amber surface + orange-300 text, the same
 family as the نامناسب chips; NO indigo/blue), and an ANONYMOUS
 side (the game hides the spy) renders .wr-side-anon + the muted
 .wr-anon-note instead of numbers. */
.wr-card{padding:16px 18px}
.wr-desc{margin:2px 0 10px;font-size:12px;color:#8aa294;line-height:2}
.wr-status{margin:2px 0 0;font-size:12px;color:#8aa294;line-height:2}
.wr-status.ok{color:#6ee7b7}
.wr-list{margin:8px 0 0;display:flex;flex-direction:column;gap:12px}
.wr-empty{margin:6px 0 0;color:#8aa294;font-size:12px;line-height:2.1}
.wr-stats-strip{
margin:0;padding:7px 12px;border:1px solid #1f4636;border-radius:10px;
background:#12241c;color:#6ee7b7;font-size:12px;font-weight:700;line-height:2
}
.wr-item{border:1px solid #243d31;border-radius:12px;background:#0f1813;padding:10px 12px}
.wr-item-head{
display:flex;align-items:center;gap:8px;flex-wrap:wrap;
margin:0 0 6px;font-size:11.5px;color:#8aa294
}
.wr-type-badge{
border:1px solid #4b3f1e;border-radius:999px;padding:1px 10px;background:#1d1a0e;
color:#fbbf24;font-size:11px;font-weight:700
}
/* v3.4.0 — the spy badge: same amber family, deeper surface +
 orange-300 text so it reads distinctly from حمله (NO indigo/blue) */
.wr-spy-badge{
border-color:#6b4d1e;background:#241a0b;color:#fdba74
}
/* v3.4.0 — an ANONYMOUS side (spy reports): the honest muted
 explanation instead of numbers (the game hides the spy) */
.wr-side-anon{border-style:dashed}
.wr-anon-note{
margin:0;font-size:10.5px;color:#8aa294;line-height:2.1
}
/* ═══ v3.5.0 \xABچشم جاسوس\xBB — the spy's OWN mission intel (rendered ONLY
 on reports that carry spy_* arrays — the victim's copy has none).
 .wr-spy-intel: the amber family of .wr-spy-badge (deeper amber
 surface — consistent with the \xABجاسوسی\xBB badge; NO indigo/blue);
 .wr-spy-table: compact like .wr-soldier-table (same border colors,
 no scroll needed — 2 columns); .wr-mission-badge: the app's
 success-green family (.wr-winner/.badge-success — #6ee7b7 on
 #12241c); .wr-spy-note: muted like .wr-anon-note. RTL-safe. ═══ */
.wr-spy-intel{
margin:0 0 6px;padding:8px 10px;border:1px solid #6b4d1e;border-radius:10px;
background:#241a0b
}
.wr-spy-title{margin:0 0 4px;font-size:12.5px;font-weight:800;color:#fdba74;line-height:2}
.wr-spy-target{margin:0 0 4px;font-size:12px;color:#fde68a;font-weight:700;line-height:2}
.wr-spy-sub{margin:4px 0 4px;font-size:11.5px;font-weight:700;color:#9fc3af;line-height:2}
.wr-spy-table{width:100%;border-collapse:collapse;font-size:11.5px}
.wr-spy-table thead th{
text-align:right;padding:4px 8px;border-bottom:1px solid #6b4d1e;color:#fdba74;
font-weight:700;white-space:nowrap
}
.wr-spy-table tbody td{padding:4px 8px;border-bottom:1px solid #4a3419;color:#fde68a;line-height:1.8;white-space:nowrap}
.wr-spy-table tbody th{padding:4px 8px;border-bottom:none;color:#9fc3af;font-weight:600;text-align:right}
.wr-spy-table tbody tr:last-child td,.wr-spy-table tbody tr:last-child th{border-bottom:none}
.wr-spy-res{margin:6px 0 0;font-size:12px;color:#fde68a;line-height:2}
.wr-spy-note{
margin:6px 0 0;font-size:10.5px;color:#c4a56e;line-height:2.1
}
/* v3.5.0 — the \xABماموریت شما\xBB badge: the app's success-green palette
 (same family as .wr-winner / .badge-success — NO indigo/blue) */
.wr-mission-badge{
border-color:#1f4636;background:#12241c;color:#6ee7b7
}
.wr-winner{
margin:0 0 8px;padding:7px 12px;border-radius:10px;font-size:13px;font-weight:800;
border:1px solid #1f4636;background:#12241c;color:#6ee7b7
}
.wr-winner.draw{border-color:#4b3f1e;background:#1d1a0e;color:#fbbf24}
.wr-loser{font-size:11px;font-weight:500;color:#8aa294}
.wr-sides{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 6px}
.wr-side{border:1px solid #1b2a21;border-radius:10px;background:#0d1712;padding:8px 10px}
.wr-side-head{margin:0 0 6px;font-size:12.5px;font-weight:700;color:#dfe9e2;line-height:2}
.wr-alliance{color:#9fc3af;font-size:11.5px;font-weight:600}
.wr-coords{color:#8aa294;font-size:11.5px;font-weight:500}
.wr-sum-table{width:100%;border-collapse:collapse;font-size:12px}
.wr-sum-table th{
text-align:right;padding:4px 8px;border-bottom:1px solid #1b2a21;color:#9fc3af;font-weight:600
}
.wr-sum-table td{padding:4px 8px;border-bottom:1px solid #1b2a21;color:#dfe9e2;text-align:left}
.wr-sum-table tr:last-child th,.wr-sum-table tr:last-child td{border-bottom:none}
.wr-soldiers{margin:6px 0 0;border:1px solid #243d31;border-radius:10px;background:#0d1712;padding:6px 10px;font-size:12px}
.wr-soldiers summary{cursor:pointer;font-weight:800;color:#dfe9e2}
.wr-soldiers-sub{color:#8aa294;font-weight:500;font-size:10.5px}
.wr-soldier-block{margin:8px 0 4px}
.wr-soldier-title{margin:0 0 4px;font-size:11.5px;font-weight:700;color:#9fc3af}
/* horizontally scrollable when wide + bounded height (the long-list
 convention — 7 columns never break the RTL layout) */
.wr-soldier-scroll{overflow-x:auto;max-height:280px;overflow-y:auto;border:1px solid #1b2a21;border-radius:8px}
.wr-soldier-table{width:100%;border-collapse:collapse;font-size:11.5px;min-width:460px}
.wr-soldier-table thead th{
text-align:right;padding:4px 8px;border-bottom:1px solid #234234;color:#9fc3af;
font-weight:700;position:sticky;top:0;background:#0d1712;white-space:nowrap
}
.wr-soldier-table tbody td{padding:4px 8px;border-bottom:1px solid #1b2a21;color:#dfe9e2;line-height:1.8;white-space:nowrap}
.wr-soldier-table tbody tr:last-child td{border-bottom:none}
.wr-resources{margin:8px 0 0;font-size:12px;color:#dfe9e2;line-height:2}
.wr-more{margin:0;font-size:11.5px;color:#8aa294;line-height:2}
.wr-notes{margin:4px 0 0;border-top:1px dashed #1b2a21;padding-top:6px}
.wr-notes p{margin:0;font-size:10.5px;color:#8aa294;line-height:2}
@media (max-width:760px){
.wr-sides{grid-template-columns:1fr}
}
@media (max-width:560px){
.wr-card{padding:12px}
.wr-item{padding:8px 10px}
.wr-winner{font-size:12.5px}
.wr-soldier-table{font-size:10.5px}
.wr-spy-intel{padding:6px 8px}
.wr-spy-title{font-size:12px}
.wr-spy-table{font-size:10.5px}
}

/* ═══════════ v3.6.4: DATA MINE (\xABمعدن داده\xBB) — .mine-* ═══════════
 The new tab: group fetch buttons, strategic map canvas + tooltip,
 alliances browser and the small tools grid. Reuses .sh-* chips,
 .players-table conventions and .card spacing. */
.mine-auth-chip{
font-size:10.5px;font-weight:700;color:#8aa294;border:1px solid #26332c;
border-radius:999px;padding:3px 10px;background:#131a15;white-space:nowrap
}
.mine-auth-chip.ok{color:#8ee7b4;border-color:#1f4636;background:#12241c}
.mine-auth-chip.err{color:#f59e0b;border-color:#4a3617;background:#241a10}
.mine-btns{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 2px}
.mine-btns .btn{flex:0 0 auto}
.mine-map-wrap{position:relative;border:1px solid #26332c;border-radius:12px;overflow:hidden;background:#0d1410}
.mine-map-wrap canvas{display:block;width:100%;height:auto;cursor:crosshair;image-rendering:auto}
.mine-tooltip{
position:absolute;pointer-events:none;z-index:5;max-width:240px;
background:rgba(10,18,13,.96);border:1px solid #2b4636;border-radius:10px;
padding:8px 11px;font-size:11px;line-height:1.9;color:#d7e7dd;
box-shadow:0 8px 22px rgba(0,0,0,.5);white-space:nowrap
}
.mine-tooltip b{color:#8ee7b4}
.mine-tooltip .tt-sub{color:#8aa294;font-size:10.5px}
.mine-legend{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0 4px}
.mine-legend .lg{
display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:600;color:#9fb8aa;
border:1px solid #22302a;border-radius:999px;padding:2px 9px;background:#121a15
}
.mine-legend .lg i{width:10px;height:10px;border-radius:3px;display:inline-block;border:1px solid rgba(255,255,255,.18)}
.mine-tools-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:10px;margin:4px 0 10px}
.mine-tool{
border:1px solid #22302a;border-radius:12px;padding:10px 12px;background:#121a15;
display:flex;flex-direction:column;gap:7px
}
.mine-tool>b{font-size:12px;color:#cfe5d8}
.mine-tool-row{display:flex;gap:6px;align-items:center}
.mine-tool-row .form-input{min-width:0;flex:1;font-size:12px;padding:6px 9px}
.mine-tool .sh-est{margin:0}
.mine-kv{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px;margin:4px 0 8px}
.mine-kv .kv{
border:1px solid #22302a;border-radius:10px;padding:8px 10px;background:#121a15
}
.mine-kv .kv b{display:block;font-size:10.5px;color:#8aa294;margin-bottom:3px}
.mine-kv .kv span{font-size:12.5px;color:#d7e7dd;font-weight:700}
.mine-json{
max-height:260px;overflow:auto;direction:ltr;text-align:left;
background:#0d1410;border:1px solid #22302a;border-radius:10px;padding:10px 12px;
font:11px/1.7 ui-monospace,Consolas,monospace;color:#a9c4b2;white-space:pre-wrap;word-break:break-all
}
.mine-link-btn{
background:none;border:none;color:#6ee7b7;cursor:pointer;font:700 11.5px Vazirmatn,Tahoma,sans-serif;
padding:0;text-decoration:underline;text-underline-offset:3px
}
.mine-link-btn:hover{color:#8ee7b4}
@media (max-width:560px){
.mine-btns{flex-direction:column;align-items:stretch}
.mine-tooltip{max-width:190px;font-size:10px}
}

/* ═══════════ v3.7.0 — \xABسرورهای من\xBB + \xABپایش اردوها\xBB + \xABمقایسهٔ اسکن\xBB ═══════════ */
.vault-status{color:#93a89a;font-size:12.5px;margin:0 0 10px}
.vault-hint{color:#7e937f;font-size:11.5px;line-height:1.9;margin:0 0 10px}
.vault-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 10px;border:1px solid #26332c;border-radius:10px;background:#131a15;margin-bottom:8px}
.vault-row.active{border-color:#34d399;background:#16221b;box-shadow:0 0 0 1px rgba(52,211,153,.25) inset}
.vault-pick{flex:1 1 auto;min-width:200px;text-align:right;background:none;border:0;color:#e7efe9;font:inherit;padding:4px 2px;cursor:pointer;border-radius:8px}
.vault-pick:hover{background:rgba(52,211,153,.08)}
.vault-pick .m{color:#93a89a;font-size:11.5px}
.vault-pick .me{color:#fbbf24;font-size:11.5px}
.vault-meta{flex:0 0 auto;color:#93a89a;font-size:11.5px;white-space:nowrap}
.vault-del{flex:0 0 auto;width:34px;height:34px;border-radius:50%;border:1px solid #4b3535;background:#221515;color:#f87171;font-size:14px;cursor:pointer}
.vault-del:hover{background:#2f1b1b}
.cmd-marches{margin:8px 0 0;padding:8px 10px;border:1px dashed #35503a;border-radius:10px;background:#101a13}
.cmd-march-head{color:#fbbf24;font-weight:700;font-size:12px;margin-bottom:4px}
.cmd-march{color:#c9d8cd;font-size:12px;padding:4px 0;border-bottom:1px dashed #1d2a21}
.cmd-march:last-child{border-bottom:0}
.cmd-march .t{display:inline-block;min-width:44px;color:#34d399;font-weight:700}
.cmd-march .sub{display:block;color:#8ea596;font-size:11px;margin:2px 18px 0 0;line-height:1.7}
.cmd-march .sub b{color:#b9c9be;font-weight:600}
.cmd-march .crit{color:#f87171;font-weight:700}
.mine-evo{margin-top:10px;padding-top:10px;border-top:1px dashed #26332c}
.mine-evo-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;justify-content:flex-start}
.mine-evo-row b{color:#e7efe9;font-size:12.5px}
.mine-evo-row select{max-width:260px}
#mine-evo-summary{margin:8px 0 0;color:#fbbf24;font-size:12.5px}
.hd-card .mine-evo-row{margin-bottom:6px}
.sh-est{color:#7e937f;font-size:11.5px;margin:4px 0}
@media (max-width:640px){
.vault-row{gap:6px}
.vault-meta{flex-basis:100%}
.mine-evo-row select{max-width:100%;flex:1 1 160px}
}

/* ═══════════ v3.7.1 — \xABچشم نیروها\xBB (troop intel without spying) ═══════════ */
.tr-input{flex:1 1 200px;min-width:160px;padding:8px 12px;border-radius:9px;border:1px solid #26332c;background:#131a15;color:#e7efe9;font:13px Vazirmatn,Tahoma,sans-serif;outline:none}
.tr-input:focus{border-color:#34d399}
.tr-status{color:#93a89a;font-size:12.5px;margin:8px 0}
.tr-lookup-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-top:6px}
.tr-tile{display:flex;flex-direction:column;gap:3px;padding:8px 10px;border:1px solid #26332c;border-radius:10px;background:#131a15}
.tr-tile span{color:#7e937f;font-size:11px}
.tr-tile b{color:#e7efe9;font-size:13px;word-break:break-word}
.tr-tile.tr-power b{color:#fbbf24;font-size:14.5px}
.tr-estimate{margin-top:10px;padding:10px 12px;border:1px solid #3d4a2f;border-radius:10px;background:#171e12;color:#d7e3c9;font-size:13px;line-height:1.9}
.tr-estimate b{color:#a3e635}
.tr-note{color:#7e937f;font-size:11px}
.tr-trend{margin-top:8px;color:#c9d8cd;font-size:12px;line-height:2}
.tr-sample{display:inline-block;padding:2px 8px;border:1px solid #26332c;border-radius:8px;background:#131a15;margin:2px 2px}
.tr-sightings{margin-top:10px;padding:10px 12px;border:1px solid #3d4a2f;border-radius:10px;background:#171e12}
.tr-sightings>b{color:#a3e635;font-size:12.5px}
.tr-sighting{padding:8px 0;border-bottom:1px dashed #26332c}
.tr-sighting:last-child{border-bottom:none}
.tr-where{color:#fbbf24;font-weight:700;font-size:12.5px;margin-inline-end:10px}
.tr-total{color:#c9d8cd;font-size:12px}
.tr-soldiers{margin-top:5px;display:flex;flex-wrap:wrap;gap:5px}
.tr-soldier{display:inline-block;padding:2px 8px;border:1px solid #35503a;border-radius:8px;background:#101a13;color:#d7e3c9;font-size:11.5px}
.tr-up{color:#34d399;font-weight:700;white-space:nowrap}
.tr-down{color:#f87171;font-weight:700;white-space:nowrap}
.tr-tower{margin-top:12px;padding:10px 12px;border:1px solid #26332c;border-radius:12px;background:#121813}
.tr-tower-head{color:#e7efe9;font-weight:700;font-size:13px;margin-bottom:8px;line-height:1.9}
.tr-tower-head .tr-total{color:#a3e635}
.tr-camp{margin-top:8px;padding:8px 10px;border:1px dashed #26332c;border-radius:10px}
.tr-camp-head{color:#c9d8cd;font-size:12.5px;margin-bottom:6px;line-height:1.9}
@media (max-width:560px){
.tr-lookup-grid{grid-template-columns:repeat(2,1fr)}
.tr-soldier{font-size:10.5px}
}

/* ═══════════ v3.7.8 — \xABدفتر نیروها\xBB (troop ledger) + spy-data view ═══════════ */
.tr-ledger-list{max-height:520px;overflow-y:auto}
.tr-ledger-row .badge{display:inline-block;padding:1px 8px;border-radius:8px;border:1px solid #3d4a2f;background:#171e12;color:#a3e635;font-size:10.5px;margin-inline-end:6px;vertical-align:middle}
.tr-ledger-row .tr-camp-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.tr-ledger-row .tr-camp-head b{color:#e7efe9}
.tr-spydata{margin-top:10px;padding:10px 12px;border:1px solid #3d4a2f;border-radius:10px;background:#171e12}
.tr-spydata .tr-status{margin:8px 0 0}
.spydata-hit{margin-top:8px;padding:8px 10px;border:1px dashed #35503a;border-radius:10px;background:#101a13}
.tr-rallies-body+.tr-camps-body{margin-top:4px}

/* ═══════════ v3.7.9 — \xABکمپ خودکار\xBB (auto-camp) card ═══════════ */
.ac-warn{margin:10px 0 0;padding:9px 12px;border:1px solid #6b5321;border-radius:10px;background:#1c170e;color:#fcd34d;font-size:12.5px;line-height:2}

/* v3.9.12 — auto-heal configurable timing (\xABزمان‌بندی درمان خودکار\xBB) */
.ah-config{margin:12px 0 0;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:rgba(27,36,30,.45)}
.ah-config-title{font-size:13px;font-weight:700;margin-bottom:10px;color:var(--text)}
.ah-config-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:8px}
.ah-config-label{font-size:12.5px;color:var(--text-dim);flex:none}
.ah-config-select{flex:0 1 220px;min-width:160px;padding:8px 10px;border:1px solid var(--border);border-radius:10px;background:var(--bg-deep);color:var(--text);font-size:12.5px;font-family:inherit;cursor:pointer}
.ah-config-select:focus{outline:none;border-color:var(--primary)}
.ah-config-hint{margin:8px 0 0;font-size:11.5px;line-height:2;color:var(--text-dim)}
.ac-field{display:flex;align-items:center;gap:6px;color:#c9d8cd;font-size:12.5px;white-space:nowrap}
.ac-field .tr-input{width:110px;direction:ltr;text-align:center}
.ac-live{margin-top:12px;padding:12px 14px;border:1px solid #3d4a2f;border-radius:12px;background:#121813}
.ac-phase-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
#ac-phase{font-weight:700;font-size:14.5px;color:#34d399}
#ac-phase.tone-warn{color:#fbbf24}
#ac-phase.tone-err{color:#f87171}
#ac-phase.tone-dim{color:#c9d8cd}
.ac-countdown{font-weight:700;font-size:14.5px;color:#fbbf24;direction:ltr;white-space:nowrap}
.ac-meta{margin-top:8px;color:#9fb3a4;font-size:12px;line-height:2}
.ac-meta b{color:#e7efe9}
.ac-events-wrap{margin-top:12px}
.ac-events-title{color:#c9d8cd;font-size:12.5px;font-weight:700;margin-bottom:6px}
.ac-events{max-height:280px;overflow-y:auto;padding:2px}
.ac-event{display:flex;gap:8px;align-items:baseline;padding:6px 8px;border-bottom:1px dashed #26332c;font-size:12px;color:#c9d8cd;line-height:1.9}
.ac-event:last-child{border-bottom:none}
.ac-event .ac-ev-time{color:#7d9184;font-size:11px;direction:ltr;white-space:nowrap;flex-shrink:0}
.ac-event.ac-ev-error .ac-ev-text{color:#f8a5a5}
@media (max-width:560px){
.ac-field .tr-input{width:84px}
#ac-phase{font-size:13px}
.ac-countdown{font-size:13px}
}

/* ═══════════ v3.7.10 — \xABلینک دانلود نیست\xBB Windows-zip links ═══════════
 User report: the release zip existed at /download/… but the UI offered
 no clickable link. Three gated spots: header pill, footer line and the
 guide-tab button — app.js reveals them ONLY after a HEAD probe confirms
 the zip is actually served (web preview). The standalone desktop app
 has no /download/ route, so nothing dead is ever shown. */

/* header pill */
.header .dl-win{
display:flex;align-items:center;gap:6px;
height:36px;padding:0 14px;flex-shrink:0;
border-radius:999px;
border:1px solid var(--primary-40);
background:var(--primary-10);
color:#6ee7b7;font-size:12px;font-weight:700;
white-space:nowrap;text-decoration:none;
transition:background .2s,border-color .2s;
}
.header .dl-win:hover{background:rgba(52,211,153,.18);border-color:var(--primary)}
.dl-win .dl-win-short{display:none}

/* footer line */
.footer .dl-win{margin:6px 0 0}
.footer .dl-win a{color:#6ee7b7;font-weight:600;text-decoration:underline;text-underline-offset:3px}

/* guide-tab big button */
.dl-win-btn{
display:inline-flex;align-items:center;gap:8px;
min-height:44px;padding:0 20px;margin:4px 0 12px;
border-radius:12px;
border:1px solid var(--primary-40);
background:var(--primary-10);
color:#6ee7b7;font-size:13px;font-weight:800;
text-decoration:none;white-space:nowrap;
max-width:100%; /* v3.11.1 (re-applied): never overflow its card */
transition:background .2s,border-color .2s;
}
.dl-win-btn:hover{background:rgba(52,211,153,.18);border-color:var(--primary)}
/* v3.11.1 (re-applied): on phones the button label wraps instead of
 stretching the guide card past the 390px viewport */
@media (max-width:640px){
.dl-win-btn{white-space:normal;text-align:center;padding:10px 14px}
}

/* tight header rows: swap the pill label for its short form and give the
 status chip room so the 390px phone header never overflows */
@media (max-width:640px){
.header .dl-win{padding:0 11px}
.dl-win .dl-win-full{display:none}
.dl-win .dl-win-short{display:inline}
.status-chip{max-width:34vw}
}

/* ═══════════ v3.7.11 — \xABحملهٔ خودکار\xBB card (reuses the v3.7.9 ac-* styles;
 the selects just need the same dark select styling as .tr-input) ═══════════ */
.atk-select{
appearance:none;
background-color:#101a13;
background-image:linear-gradient(45deg,transparent 50%,#9fb3a4 50%),linear-gradient(135deg,#9fb3a4 50%,transparent 50%);
background-position:calc(0% + 12px) calc(50% - 2px),calc(0% + 17px) calc(50% - 2px);
background-size:5px 5px,5px 5px;
background-repeat:no-repeat;
padding-left:30px;
cursor:pointer;
}
.atk-select option{background:#0d120f;color:#e7efe9}

/* ═══════════ v3.7.12 — \xABحملهٔ خودکار — تا ۵ لشکر\xBB multi-legion blocks ═══════════
 Five per-legion config blocks inside #atk-slots. Each has its own
 numbered chip (colored by --atk-hue, set inline by app.js), badge,
 compact live phase line and meta row. */
#atk-slots{display:flex;flex-direction:column;gap:12px;margin-top:12px}
.atk-slot{
border:1px solid #2b3a2f;
border-radius:14px;
background:#0f1512;
padding:12px 14px 14px;
}
.atk-slot-head{
display:flex;flex-wrap:wrap;align-items:center;gap:8px;
margin-bottom:8px;
}
.atk-slot-num{
display:inline-flex;align-items:center;
height:26px;padding:0 12px;
border-radius:999px;
border:1px solid var(--atk-hue,#4f9f69);
background:color-mix(in srgb,var(--atk-hue,#4f9f69) 14%,transparent);
color:var(--atk-hue,#4f9f69);
font-size:12.5px;font-weight:800;white-space:nowrap;
}
.atk-slot-phase{
font-size:12px;color:#c9d8cd;min-height:18px;
}
.atk-slot-phase.atk-tone-live{color:#8ee6a8;font-weight:700}
.atk-slot-meta{
margin-top:8px;color:#9fb3a4;font-size:12px;line-height:2;
}
.atk-slot-meta b{color:#e7efe9}
/* legion chip in the merged event log */
.atk-ev-chip{
display:inline-flex;align-items:center;flex-shrink:0;
height:20px;padding:0 9px;
border-radius:999px;
border:1px solid var(--atk-hue,#4f9f69);
background:color-mix(in srgb,var(--atk-hue,#4f9f69) 12%,transparent);
color:var(--atk-hue,#4f9f69);
font-size:10.5px;font-weight:800;white-space:nowrap;
}
.atk-ev-chip.atk-ev-card{
border-color:#5a6b5e;color:#a8bcae;background:rgba(120,140,126,.12);
}
.atk-shared-meta{margin-top:8px}
@media (max-width:560px){
.atk-slot{padding:10px 10px 12px}
.atk-slot-head{gap:6px}
.atk-slot-num{height:24px;padding:0 10px;font-size:11.5px}
.atk-slot-phase{font-size:11px}
}

/* ═══════════ v3.7.13 — MOBILE ACCESS (\xABدسترسی از موبایل\xBB) ═══════════ */
/* The guide section that answers \xABنسخه موبایل رو چجوری استفاده کنم\xBB:
 live LAN URL rows (URL + copy button + QR code) rendered from
 GET /api/gamedata/netinfo. URL text is LTR inside the RTL page. */
.mobile-urls{
display:flex;flex-direction:column;gap:10px;
margin:14px 0 6px;
}
.mobile-url-loading{
color:#9fb3a4;font-size:13px;padding:6px 2px;
}
.mobile-url-row{
display:flex;align-items:center;gap:12px;
padding:12px 14px;
border:1px solid #2c4234;border-radius:12px;
background:rgba(52,211,153,.06);
flex-wrap:wrap;
}
.mobile-url-main{
display:flex;align-items:center;gap:10px;flex:1;min-width:0;
}
.mobile-url-link{
direction:ltr;unicode-bidi:isolate;
font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
font-size:14px;font-weight:700;color:#8ee6a8;
text-decoration:none;word-break:break-all;
}
.mobile-url-link:hover,.mobile-url-link:focus-visible{text-decoration:underline}
.mobile-url-copy{
flex-shrink:0;height:34px;padding:0 14px;
border-radius:9px;border:1px solid #3b5a47;
background:rgba(52,211,153,.12);color:#cfe9d8;
font-family:inherit;font-size:12.5px;font-weight:800;cursor:pointer;
transition:background .15s,border-color .15s;
}
.mobile-url-copy:hover{background:rgba(52,211,153,.22);border-color:#4f9f69}
.mobile-url-copy:focus-visible{outline:2px solid #34d399;outline-offset:2px}
.mobile-url-qr{
flex-shrink:0;width:96px;height:96px;
border-radius:10px;background:#fff;padding:6px;
display:block;
}
.mobile-url-qr canvas{width:100%;height:100%;display:block;image-rendering:pixelated}
.mobile-url-hint{
flex-basis:100%;color:#9fb3a4;font-size:11.5px;line-height:1.9;
}
.mobile-url-error{
color:#f0b9b9;font-size:12.5px;line-height:2;
border:1px solid #5a3232;border-radius:10px;padding:10px 12px;
background:rgba(240,185,185,.06);
}
@media (max-width:560px){
.mobile-url-row{padding:10px;gap:10px}
.mobile-url-qr{width:76px;height:76px;padding:5px}
.mobile-url-link{font-size:12.5px}
}

/* ---------------- v3.9.6 — economy engine cards ---------------- */
/* training-chain per-barracks rows (same visual family as auto-camp
 slots: bordered rows, compact controls, mobile-friendly) */
.tc-slot {
display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
padding: 10px 12px; margin-top: 10px;
border: 1px solid var(--border); border-radius: 12px;
background: var(--bg-deep);
}
.tc-slot-name { font-weight: 700; font-size: 13px; min-width: 130px; }
.tc-slot select { flex: 1 1 140px; min-width: 120px; }
.tc-slot input[type="number"] { width: 92px; }
.tc-slot-hint { width: 100%; font-size: 12px; opacity: 0.85; margin: 2px 0 0; }
.tc-empty {
margin-top: 10px; padding: 14px; text-align: center;
border: 1px dashed var(--border); border-radius: 12px; font-size: 13px;
}

/* v3.9.7 — unsaved-changes hint on the training-chain form (amber so
 it reads as \xABpending\xBB, not an error); the browser card status line
 reuses the tr-status family with its own err tone */
.tr-status.tc-dirty { color: #e5c07b; }
.tr-status.err { color: #f87171; }

/* auto-missions list rows (bounded, scrollable) */
.am-mission {
display: flex; flex-direction: column; gap: 4px;
padding: 9px 12px; margin-top: 8px;
border: 1px solid var(--border); border-radius: 12px;
background: var(--bg-deep);
}
.am-mission.current { border-color: var(--primary-40); }
.am-mission-top { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.am-mission-desc { font-weight: 700; flex: 1; }
.am-mission-prog { font-size: 12px; opacity: 0.9; white-space: nowrap; }
.am-mission .progress { height: 6px; }
.am-mission-done { font-size: 12px; color: #34d399; }

/* v3.9.8 — the grouped mission list (the game's own two-part model:
 اصلی + روزانه with the game's own category sections). The list
 caps at 21rem with a slim custom scrollbar (long lists scroll, the
 page never grows unbounded); each group gets a game-tab-like head
 (name + count), and the daily head carries the UTC-reset countdown */
.am-list {
max-height: 21rem;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: #3a4a3f transparent;
padding-left: 2px;
}
.am-list::-webkit-scrollbar { width: 6px; }
.am-list::-webkit-scrollbar-thumb { background: #3a4a3f; border-radius: 3px; }
.am-list::-webkit-scrollbar-track { background: transparent; }
.am-group { margin-bottom: 10px; }
.am-group:last-child { margin-bottom: 2px; }
.am-group-head {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
padding: 5px 10px 3px;
font-size: 12.5px;
border-bottom: 1px dashed var(--border);
margin-bottom: 2px;
}
.am-group-name { font-weight: 800; letter-spacing: 0.2px; }
.am-group-count { font-size: 11.5px; opacity: 0.85; white-space: nowrap; }
.am-reset { color: #e5c07b; font-weight: 700; }

/* ── v3.9.15 — GAME SIDE FEEDS (\xABداده‌های جانبی بازی\xBB) rows ── */
.sf-row {
border: 1px solid var(--border);
border-radius: 10px;
padding: 10px 12px;
margin-bottom: 8px;
background: var(--card-2, rgba(255, 255, 255, 0.02));
}
.sf-row:last-child { margin-bottom: 2px; }
.sf-row-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 10px;
flex-wrap: wrap;
}
.sf-row-title {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
flex: 1 1 240px;
font-size: 13px;
}
.sf-row-path {
direction: ltr;
text-align: left;
font-size: 11px;
color: #7d9184;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.sf-row-desc { font-size: 11.5px; opacity: 0.8; }
.sf-row-state { margin-top: 6px; font-size: 12px; line-height: 1.9; }
.sf-row-state .sf-ok { color: #86c59a; font-weight: 700; }
.sf-row-state .sf-err { color: #f87171; }
.sf-row-state .sf-dim { color: #9fb3a5; }
.sf-details { margin-top: 6px; }
.sf-details summary {
cursor: pointer;
font-size: 12px;
font-weight: 700;
color: #e5c07b;
user-select: none;
padding: 3px 0;
}
.sf-details pre {
direction: ltr;
text-align: left;
max-height: 16rem;
overflow: auto;
scrollbar-width: thin;
scrollbar-color: #3a4a3f transparent;
background: rgba(0, 0, 0, 0.25);
border: 1px solid var(--border);
border-radius: 8px;
padding: 8px 10px;
font-size: 11px;
line-height: 1.7;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
white-space: pre-wrap;
word-break: break-all;
margin: 6px 0 2px;
}
.sf-details::-webkit-scrollbar { width: 6px; }
.sf-details pre::-webkit-scrollbar { width: 6px; }
.sf-details pre::-webkit-scrollbar-thumb { background: #3a4a3f; border-radius: 3px; }

/* ── v3.9.18 — ITEM AUTO-FILL (\xABبرداشت خودکار منابع از آیتم‌ها\xBB) ── */
.if-inventory {
display: flex;
flex-direction: column;
gap: 6px;
margin: 8px 0 2px;
}
.if-inv-row {
display: flex;
align-items: baseline;
gap: 10px;
flex-wrap: wrap;
border: 1px solid var(--border);
border-radius: 10px;
padding: 8px 12px;
background: var(--card-2, rgba(255, 255, 255, 0.02));
font-size: 12.5px;
}
.if-inv-name { font-weight: 800; min-width: 3.2rem; }
.if-inv-val { color: #86c59a; font-weight: 700; }
.if-inv-packs { color: #9fb3a5; font-size: 11.5px; flex: 1 1 100%; }
.if-inv-wh {
font-size: 11.5px;
color: #9fb3a5;
border-top: 1px dashed var(--border);
padding-top: 6px;
margin-top: 2px;
}

/* ── v3.9.19 — the SEPARATE gold section (\xABاستفاده از طلا\xBB) inside the
 item-fill card: its own bordered box + badge + toggle buttons + meta
 line (the gold-only counters) — visually distinct from the main
 switch, exactly the "separate section" the user asked for ── */
.if-gold {
border: 1px solid #6b5a1e;
border-radius: 12px;
padding: 12px 14px;
margin: 12px 0 4px;
background: rgba(212, 175, 55, 0.07);
}
.if-gold-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
flex-wrap: wrap;
margin-bottom: 6px;
}
.if-gold-title {
font-weight: 800;
font-size: 14px;
color: #e6c96a;
}
.if-gold-desc {
font-size: 12px;
color: #b8c4bb;
line-height: 1.9;
margin: 4px 0 10px;
}
.if-gold-meta {
font-size: 11.5px;
color: #9fb3a5;
margin-top: 8px;
line-height: 1.9;
}
.if-gold-meta b { color: #e6c96a; font-weight: 700; }

/* ── v3.9.20 — the OFFLINE-INCOME section (\xABدرآمد آفلاین\xBB) inside the
 auto-collect card: its own bordered box + badge + toggle buttons +
 meta line (the claim-only counters) — the same "separate section"
 pattern as the gold box, green-tinted to tell them apart ── */
.ac-off {
border: 1px solid #2e5a37;
border-radius: 12px;
padding: 12px 14px;
margin: 12px 0 4px;
background: rgba(74, 190, 106, 0.06);
}
.ac-off-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
flex-wrap: wrap;
margin-bottom: 6px;
}
.ac-off-title {
font-weight: 800;
font-size: 14px;
color: #8fce8f;
}
.ac-off-desc {
font-size: 12px;
color: #b8c4bb;
line-height: 1.9;
margin: 4px 0 10px;
}
.ac-off-meta {
font-size: 11.5px;
color: #9fb3a5;
margin-top: 8px;
line-height: 1.9;
}
.ac-off-meta b { color: #8fce8f; font-weight: 700; }

/* ── v3.9.10 — the connect-account helper row (browser card) ── */
.connect-helper {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
margin: 0 0 10px;
padding: 10px 12px;
border: 1px solid #3f6212;
border-radius: 10px;
background: rgba(63, 98, 18, 0.16);
}
.connect-helper .connect-note {
flex: 1 1 220px;
font-size: 12px;
line-height: 1.9;
color: #d7e4c8;
}

/* ═════════════════════════════════════════════════════════════════
 v3.11.0 — LICENSE UI (\xABفعال‌سازی\xBB) + THREE EDITIONS + THE SPY TAB
 1) the activation overlay (full-screen lock: system code + paste)
 2) the edition badge + 🔒 tab locks + card tier covers
 3) the spy tab's five cards (HQ/queue, range, alliance, list, report)
 ═════════════════════════════════════════════════════════════════ */

/* ---- 1) activation overlay ---- */
.act-overlay {
position: fixed;
inset: 0;
z-index: 3000;
background:
radial-gradient(1100px 500px at 50% -10%, rgba(52, 211, 153, 0.09), transparent 60%),
rgba(9, 13, 11, 0.97);
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
overflow-y: auto;
}
.act-overlay.hidden { display: none; }
.act-card {
width: 100%;
max-width: 560px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 16px;
box-shadow: var(--shadow);
padding: 28px 26px;
text-align: center;
}
.act-logo { font-size: 44px; line-height: 1; }
.act-title { margin: 10px 0 2px; font-size: 22px; font-weight: 800; color: var(--text); }
.act-sub { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.act-syscode {
background: var(--card-2);
border: 1px dashed var(--primary-40);
border-radius: 12px;
padding: 14px 14px 12px;
margin-bottom: 18px;
}
.act-syscode-label { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.act-syscode-row { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.act-syscode-value {
font-family: inherit;
direction: ltr;
font-size: 16.5px;
font-weight: 800;
letter-spacing: 1px;
color: var(--primary);
background: rgba(52, 211, 153, 0.08);
border: 1px solid var(--primary-25);
border-radius: 8px;
padding: 8px 14px;
user-select: all;
}
.act-form { text-align: right; }
.act-label { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.act-textarea {
width: 100%;
min-height: 96px;
font-size: 12px;
line-height: 1.7;
resize: vertical;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.act-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.act-file { color: var(--muted); font-size: 12.5px; max-width: 240px; }
.act-error { color: var(--rose); font-size: 13px; min-height: 20px; margin: 10px 0 0; font-weight: 600; }
.act-note { color: var(--muted-2); font-size: 11.5px; line-height: 2; margin: 12px 0 0; }

/* ---- 2) edition badge + tab locks + card covers ---- */
.edition-badge {
background: var(--primary-15);
border-color: var(--primary-40);
color: var(--primary);
font-weight: 700;
}
.edition-badge.ed-pro { background: var(--amber-15); border-color: var(--amber-40); color: var(--amber); }
.edition-badge.ed-professional { background: rgba(167, 139, 250, 0.14); border-color: rgba(167, 139, 250, 0.45); color: #c4b5fd; }
.tab-locked { opacity: 0.55; }
.tab-lock { margin-inline-start: 4px; font-size: 11px; }
.card.tier-locked { position: relative; overflow: hidden; }
.card.tier-locked > *:not(.tier-cover) { visibility: hidden; }
.tier-cover {
position: absolute;
inset: 0;
z-index: 5;
display: flex;
align-items: center;
justify-content: center;
padding: 18px;
background: repeating-linear-gradient(
-45deg,
var(--card) 0px, var(--card) 14px,
var(--card-2) 14px, var(--card-2) 28px
);
border-radius: inherit;
}
.tier-cover-inner {
background: var(--card);
border: 1px dashed var(--amber-40);
border-radius: 12px;
padding: 16px 22px;
color: var(--text);
font-size: 13.5px;
text-align: center;
display: flex;
flex-direction: column;
gap: 10px;
align-items: center;
max-width: 420px;
}
.tier-cover-inner b { color: var(--amber); }
.tier-cover-btn { min-width: 130px; }

/* ---- 3) the spy tab ---- */
.sy-grid {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin: 12px 0;
}
.sy-cell {
display: flex;
flex-direction: column;
gap: 6px;
font-size: 12px;
color: var(--muted);
flex: 1 1 130px;
min-width: 120px;
}
.sy-cell-wide { flex: 1 1 100%; }
.sy-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.sy-chip {
background: var(--card-2);
border: 1px solid var(--border);
border-radius: 999px;
padding: 5px 12px;
font-size: 12px;
color: var(--muted);
}
.sy-chip b { color: var(--text); font-weight: 700; }
.sy-chip-bad { border-color: var(--rose-40); background: var(--rose-10); }
.sy-queue {
max-height: 320px;
overflow-y: auto;
border: 1px solid var(--border-soft);
border-radius: 10px;
background: var(--bg-deep);
padding: 6px;
margin: 8px 0 4px;
}
.sy-qrow {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px 10px;
padding: 7px 10px;
border-bottom: 1px solid var(--border-soft);
font-size: 12.5px;
}
.sy-qrow:last-child { border-bottom: 0; }
.sy-qname { font-weight: 700; color: var(--text); }
.sy-qally { color: var(--muted-2); font-weight: 400; font-size: 11px; }
.sy-qmeta { color: var(--muted); font-size: 11.5px; direction: ltr; }
.sy-qphase { margin-inline-start: auto; font-size: 12px; color: var(--muted); }
.sy-ph-ok .sy-qphase { color: var(--primary); font-weight: 700; }
.sy-ph-bad .sy-qphase { color: var(--rose); }
.sy-ph-go .sy-qphase { color: var(--amber); }
.sy-preview { margin-top: 12px; }
/* v3.11.18 — spy shape selector (شعاعی/مستطیلی) */
.sy-cell-btn { justify-content: flex-end; }
.sy-cell-btn .btn { width: 100%; }
.sy-shape-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--muted);
  background: var(--card-2, rgba(13, 18, 15, 0.35));
  border: 1px dashed var(--border, rgba(52, 211, 153, 0.25));
  border-radius: 10px;
  padding: 8px 12px;
}
.sy-preview-ok { color: var(--primary); font-size: 13px; font-weight: 700; margin: 0 0 8px; }
.sy-preview-err { color: var(--rose); font-size: 13px; font-weight: 600; margin: 0; }
.sy-preview-warn { color: var(--amber); font-size: 12.5px; margin: 0 0 8px; }
.sy-ptags { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow-y: auto; }
.sy-ptag {
background: var(--card-2);
border: 1px solid var(--border);
border-radius: 8px;
padding: 4px 10px;
font-size: 11.5px;
color: var(--muted);
}
.sy-names { min-height: 120px; font-size: 13px; line-height: 2; }
.sy-report-text {
background: var(--bg-deep);
border: 1px solid var(--border-soft);
border-radius: 10px;
padding: 16px;
font-family: inherit;
font-size: 12.5px;
line-height: 2.1;
white-space: pre-wrap;
word-break: break-word;
color: var(--text);
max-height: 460px;
overflow-y: auto;
margin: 12px 0 0;
text-align: right;
}
.tr-status.err { color: var(--rose); }

/* custom scrollbars for the spy lists (matches the house look) */
.sy-queue::-webkit-scrollbar,
.sy-ptags::-webkit-scrollbar,
.sy-report-text::-webkit-scrollbar { width: 8px; height: 8px; }
.sy-queue::-webkit-scrollbar-thumb,
.sy-ptags::-webkit-scrollbar-thumb,
.sy-report-text::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 4px;
}
@media (max-width: 640px) {
.act-card { padding: 20px 14px; }
.act-syscode-value { font-size: 13px; padding: 7px 10px; }
.sy-qphase { margin-inline-start: 0; width: 100%; }
.sy-cell { flex: 1 1 calc(50% - 5px); }
}

/* ═══ v3.11.2 — \xABریتم انسانی\xBB (HUMAN RHYTHM) card ═══ */
.rh-bands {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
margin: 10px 0 4px;
}
.rh-band {
border: 1px solid var(--border);
border-radius: 10px;
padding: 10px 12px;
display: flex;
flex-direction: column;
gap: 4px;
text-align: center;
background: var(--card-2);
}
.rh-band .rh-band-ic { font-size: 20px; line-height: 1.2; }
.rh-band b { font-size: 13px; }
.rh-band span:last-child { color: var(--muted); font-size: 12px; line-height: 1.8; }
.rh-plan {
margin-top: 10px;
border: 1px dashed var(--border);
border-radius: 10px;
padding: 10px 12px;
max-height: 220px;
overflow-y: auto;
}
.rh-plan::-webkit-scrollbar { width: 6px; }
.rh-plan::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.rh-plan-title { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.rh-plan-row {
display: flex;
align-items: center;
gap: 8px;
font-size: 12.5px;
padding: 3px 0;
color: var(--text);
}
.rh-plan-now { font-weight: 700; }
.rh-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.rh-dot-online { background: var(--primary-strong); }
.rh-dot-afk { background: var(--amber); }
.rh-dot-sleep { background: #8b93a8; }
.badge-slate {
border-color: rgba(139, 147, 168, 0.4);
background: rgba(139, 147, 168, 0.15);
color: #a8b3bd;
}
@media (max-width: 720px) {
.rh-bands { grid-template-columns: 1fr; }
.rh-band { text-align: right; }
}

/* ── v3.11.3 — REST HOURS card (\xABاستراحت شبانه\xBB, from the user's
 v3.11.2 build) ─────────────────────────────────────────────── */
#rest-card .rest-status{color:#a9c3ab;font-size:13px;margin:6px 0 12px;line-height:1.9}
#rest-card .rest-controls{display:flex;flex-wrap:wrap;align-items:center;gap:14px 18px;margin:0 0 12px}
#rest-card .rest-toggle{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:13.5px;font-weight:700;color:#d7ecd9;cursor:pointer}
#rest-card .rest-toggle input{width:20px;height:20px;accent-color:var(--primary);cursor:pointer}
#rest-card .rest-hours{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-size:13px;color:#b9cfbb;font-weight:600}
#rest-card .rest-hours select{min-height:38px;padding:4px 10px;border-radius:10px;border:1px solid var(--primary-40);
background:var(--bg-2,#16261c);color:#e6f4e8;font-family:inherit;font-size:13.5px;cursor:pointer}
#rest-card .rest-hours select:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
#rest-card .rest-hint{color:#7e937f;font-size:11.5px;line-height:1.95;margin:0}
#rest-card .badge{background:rgba(148,163,148,.15);color:#9fb3a1}
#rest-card .badge.on{background:rgba(52,211,153,.16);color:#6ee7b7}
@media (max-width:640px){
#rest-card .rest-controls{gap:10px 14px}
#rest-card .rest-hours select{font-size:13px;padding:4px 8px}
}

/* ─── v3.11.15 — COLLAPSIBLE SECTIONS IN THE FORCES TAB (\xABنیروها\xBB) ───
 \xABسرفصل‌هاش زیاد شده؛ وقتی روش میزنی لیست زیرش بیاد که راحت باشی\xBB —
 every card in the forces tab is an accordion: the head (title + on/off
 badge) stays visible as a compact dashboard; the body opens beneath it.
 Per-card state persists; expand-all / collapse-all toolbar on top. */
.tc-bar{
display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
gap:8px; margin:0 0 12px 0; padding:10px 12px;
background:var(--card); border:1px solid var(--border); border-radius:14px;
}
.tc-hint{font-size:12px; line-height:1.9; opacity:.85; flex:1 1 260px; min-width:220px; margin:0;}
.tc-btns{display:flex; gap:8px; flex-wrap:wrap;}
#tab-troops .card-head{cursor:pointer; -webkit-user-select:none; user-select:none; margin-bottom:10px;}
#tab-troops .card-head:hover h2{text-decoration:underline; text-decoration-style:dotted; text-underline-offset:4px;}
#tab-troops .card-head:focus-visible{outline:2px solid rgba(110,231,183,.8); outline-offset:3px; border-radius:8px;}
.card-body{display:block;}
#tab-troops .card.is-collapsed{padding-bottom:12px;}
#tab-troops .card.is-collapsed .card-body{display:none;}
#tab-troops .card.is-collapsed .card-head{margin-bottom:0;}
.card-chev{
display:inline-flex; align-items:center; justify-content:center;
width:20px; height:20px; flex:0 0 auto; margin-inline-start:2px;
font-size:11px; line-height:1; opacity:.7;
transform:rotate(0deg); transition:transform .18s ease;
}
#tab-troops .card.is-collapsed .card-chev{transform:rotate(90deg);}

/* ═══ v3.11.16 — دو یگان جاسوس (formation panels) ═══ */
.sy-fm{
border:1px solid var(--border); border-radius:12px;
padding:12px 14px; margin:10px 0; background:var(--card-2, rgba(127,127,127,.05));
}
.sy-fm-head{
display:flex; align-items:center; justify-content:space-between; gap:8px;
margin-bottom:8px; flex-wrap:wrap;
}
.sy-fm-title{font-weight:800; font-size:13.5px; display:flex; align-items:center; gap:6px;}
.sy-fm .sy-grid{margin:2px 0 8px;}
.sy-fm-stats{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; min-height:4px;}
.sy-fm-stats:empty{display:none;}
.sy-chip-go{border-color:var(--green-40, rgba(63,185,80,.4)); background:var(--green-10, rgba(63,185,80,.12));}
.sy-qf{font-size:12px; margin-inline-end:2px;}
.sy-qf1{filter:saturate(1.2);}
.sy-qf2{filter:saturate(1.2); opacity:.95;}

/* ═══ v3.11.17 — per-kind speedup scopes + war-rewards card bits ═══ */
.wr-scopes{
display:flex; align-items:center; justify-content:flex-start;
gap:10px 14px; flex-wrap:wrap; margin:8px 0 2px;
font-size:12.5px;
}
.wr-scopes-title{font-weight:800; font-size:12.5px;}
.wr-scope{
display:inline-flex; align-items:center; gap:5px; cursor:pointer;
line-height:1.9; user-select:none;
}
.wr-scope input{accent-color:#34d399; width:15px; height:15px; cursor:pointer;}
.wr-scope:has(input:disabled){opacity:.55;}

/* ═══ v3.11.26 — \xABپیش‌نمایش افراد جستجوی هوشمند\xBB (حملهٔ خودکار) ═══
 user order: \xABیه پیشنمایش افراد بده که قابلیت حذف کردن از لیست رو
 داشته باشه\xBB — the per-legion smart-target preview: a capped scroll
 list (nearest-first) with a ✖ remove button per row + the removed
 players row with ↩ restore. */
.atk-prev { margin: 10px 0 2px; }
.atk-prev-ok { color: var(--primary); font-size: 13px; font-weight: 700; margin: 0 0 6px; }
.atk-prev-err { color: var(--rose); font-size: 13px; font-weight: 600; margin: 0; }
.atk-prev-warn { color: var(--amber); font-size: 12.5px; margin: 0 0 8px; line-height: 1.9; }
.atk-prev-note { color: var(--muted); font-size: 12.5px; margin: 0; }
.atk-prev-list {
max-height: 300px;
overflow-y: auto;
border: 1px solid var(--border-soft);
border-radius: 10px;
background: var(--bg-deep);
scrollbar-width: thin;
scrollbar-color: #3a4a3f transparent;
}
.atk-prev-list::-webkit-scrollbar { width: 8px; }
.atk-prev-list::-webkit-scrollbar-thumb { background: #3a4a3f; border-radius: 4px; }
.atk-prev-list::-webkit-scrollbar-track { background: transparent; }
.atk-prev-row {
display: flex;
align-items: center;
gap: 8px;
padding: 7px 10px;
border-bottom: 1px solid var(--border-soft);
font-size: 12.5px;
flex-wrap: wrap;
}
.atk-prev-row:last-child { border-bottom: none; }
.atk-prev-rank {
flex: 0 0 auto;
min-width: 22px;
text-align: center;
color: var(--muted-2);
font-size: 11px;
font-weight: 700;
}
.atk-prev-name { font-weight: 700; color: var(--text); }
.atk-prev-ally { color: var(--amber); font-size: 11px; }
.atk-prev-meta { color: var(--muted); font-size: 11.5px; }
.atk-prev-x {
margin-inline-start: auto;
flex: 0 0 auto;
border: 1px solid var(--rose-40);
background: var(--rose-10);
color: var(--rose);
border-radius: 8px;
padding: 4px 10px;
font-size: 11.5px;
font-weight: 700;
cursor: pointer;
font-family: inherit;
min-height: 30px;
}
.atk-prev-x:hover { background: var(--rose-15); }
.atk-prev-exhead {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
color: var(--muted);
font-size: 12px;
margin: 10px 0 6px;
}
.atk-prev-undoall {
border: 1px solid var(--primary-40);
background: var(--primary-10);
color: var(--primary);
border-radius: 8px;
padding: 3px 10px;
font-size: 11.5px;
font-weight: 700;
cursor: pointer;
font-family: inherit;
min-height: 28px;
}
.atk-prev-undoall:hover { background: var(--primary-15); }
/* v3.11.27 — \xABچرخش طبق لیست\xBB: round header chip + new-round button +
   done-this-round chip + dimmed done rows */
.atk-prev-round { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.atk-prev-newround {
border: 1px solid var(--amber-40);
background: var(--amber-15);
color: var(--amber);
border-radius: 8px;
padding: 2px 10px;
font-size: 11.5px;
font-weight: 700;
cursor: pointer;
font-family: inherit;
min-height: 26px;
}
.atk-prev-newround:hover { filter: brightness(1.12); }
.atk-prev-donechip {
display: inline-block;
background: var(--primary-10);
border: 1px solid var(--primary-40);
color: var(--primary);
border-radius: 999px;
padding: 1px 9px;
font-size: 10.5px;
font-weight: 700;
white-space: nowrap;
}
/* v3.11.29 — the in-progress per-target hit chip (⚔ n از N) — amber
tone while the player's attacks are still accumulating */
.atk-prev-partchip {
display: inline-block;
background: rgba(217, 119, 6, 0.12);
border: 1px solid rgba(217, 119, 6, 0.45);
color: #b45309;
border-radius: 999px;
padding: 1px 9px;
font-size: 10.5px;
font-weight: 700;
white-space: nowrap;
}
.atk-prev-row-done .atk-prev-name { color: var(--muted); }
.atk-prev-row-done .atk-prev-rank { opacity: 0.55; }
.atk-prev-exlist { display: flex; flex-wrap: wrap; gap: 6px; }
.atk-prev-ex {
display: inline-flex;
align-items: center;
gap: 6px;
background: var(--card-2);
border: 1px dashed var(--border);
border-radius: 8px;
padding: 3px 8px;
font-size: 11.5px;
color: var(--muted);
}
.atk-prev-undo {
border: 1px solid var(--primary-40);
background: transparent;
color: var(--primary);
border-radius: 6px;
padding: 1px 7px;
font-size: 12px;
font-weight: 700;
cursor: pointer;
font-family: inherit;
min-height: 24px;
min-width: 28px;
}
.atk-prev-undo:hover { background: var(--primary-10); }
.atk-prev-foot { color: var(--muted-2); font-size: 11px; margin: 8px 0 0; line-height: 1.9; }

/* ═══ v3.11.26 — \xABکیبورد عددی\xBB (NUMERIC KEYPAD) ═══
 user order: \xABوقتی داخل کادر مربوطه کلیک میکنم یه کیبورد عددی ظاهر
 بشه\xBB — a floating pad (bottom-left, above everything) that pops up
 on every numeric value box; ✕/Esc/other-field closes it. */
.npad {
position: fixed;
bottom: 14px;
left: 14px;
z-index: 9600;
width: 236px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 14px;
box-shadow: var(--shadow);
padding: 10px;
display: none;
}
.npad.open { display: block; }
.npad-head {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
padding-bottom: 8px;
border-bottom: 1px solid var(--border-soft);
}
.npad-title { font-size: 12px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.npad-field {
flex: 1 1 auto;
font-size: 11px;
color: var(--muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
direction: rtl;
}
.npad-close {
flex: 0 0 auto;
border: 1px solid var(--border);
background: var(--card-2);
color: var(--muted);
border-radius: 8px;
width: 28px;
height: 28px;
font-size: 13px;
cursor: pointer;
font-family: inherit;
}
.npad-close:hover { color: var(--rose); border-color: var(--rose-40); }
.npad-keys {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 6px;
direction: ltr;
}
.npad-key {
min-height: 44px;
border: 1px solid var(--border);
background: var(--card-2);
color: var(--text);
border-radius: 10px;
font-size: 17px;
font-weight: 700;
cursor: pointer;
font-family: inherit;
user-select: none;
}
.npad-key:hover { background: var(--primary-10); border-color: var(--primary-40); }
.npad-key:active { transform: translateY(1px); }
.npad-keyfn { color: var(--amber); font-size: 15px; }
.npad-suffix {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 6px;
margin-top: 6px;
direction: ltr;
}
.npad-suffix.hidden { display: none; }
.npad-keysfx { min-height: 38px; font-size: 14px; color: var(--primary); }
@media (max-width: 520px) {
.npad {
left: 8px;
right: 8px;
bottom: 8px;
width: auto;
}
.npad-keys { grid-template-columns: repeat(6, 1fr); }
.npad-key { min-height: 42px; font-size: 16px; }
.npad-suffix { grid-template-columns: repeat(4, 1fr); }
}

/* v3.11.37 — 🛰 گشت روزانهٔ نقشه */
#patrol-card .rest-hint{color:#7e937f;font-size:11.5px;line-height:1.95;margin:0}
.patrol-log{margin-top:8px;display:flex;flex-direction:column;gap:3px;max-height:190px;overflow-y:auto;padding-left:2px}
.patrol-line{font-size:11px;line-height:1.8;color:#9fb4a1;border-right:2px solid #2e4a34;padding-right:7px;word-break:break-word}
.patrol-line:empty{display:none}
/* ── v3.11.39 — safety dashboard («داشبورد ایمنی») — green/amber/rose, NO indigo/blue ── */
.safety-scorebox{margin-top:10px}
.safety-scorerow{display:flex;align-items:center;gap:12px}
.safety-scorenum{font-size:30px;font-weight:800;line-height:1;color:var(--primary-strong);font-variant-numeric:tabular-nums;min-width:52px;text-align:center}
.safety-verdict{font-size:11.5px;line-height:1.9;color:var(--text);margin:0;flex:1}
.safety-scorebarwrap{height:8px;border-radius:6px;background:rgba(0,0,0,.35);overflow:hidden;margin-top:9px;border:1px solid var(--border-soft)}
.safety-scorebar{height:100%;width:0;border-radius:6px;background:var(--primary-strong);transition:width .6s ease,background .3s}
.safety-scorebar.lv-green{background:var(--primary-strong)}
.safety-scorebar.lv-amber{background:var(--amber)}
.safety-scorebar.lv-rose{background:var(--rose)}
.safety-signals{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.safety-sig{display:flex;align-items:flex-start;gap:9px;padding:8px 10px;border:1px solid var(--border-soft);border-radius:10px;background:var(--card-2)}
.safety-sig.sig-green{border-color:var(--primary-25)}
.safety-sig.sig-amber{border-color:var(--amber-40)}
.safety-sig.sig-rose{border-color:var(--rose-40)}
.safety-sig .sig-ico{font-size:14px;line-height:1.6}
.safety-sig .sig-main{flex:1;min-width:0}
.safety-sig .sig-title{font-size:11.5px;font-weight:700;color:var(--text)}
.safety-sig .sig-status{font-size:11px;color:var(--muted);line-height:1.85}
.safety-sig .sig-advice{font-size:11px;color:var(--amber);line-height:1.85;margin-top:2px}
.safety-sig .sig-pts{font-size:10.5px;color:var(--muted-2);white-space:nowrap;border:1px solid var(--border);border-radius:8px;padding:1px 7px;margin-top:2px;font-variant-numeric:tabular-nums}
.safety-shields{margin-top:10px}
.safety-shields summary{cursor:pointer;font-size:11.5px;color:var(--muted);user-select:none}
.safety-shield-line{font-size:11px;line-height:2.1;color:var(--muted);border-right:2px solid #2e4a34;padding-right:7px;word-break:break-word}
@media (max-width:560px){.safety-scorerow{flex-direction:column;align-items:flex-start;gap:6px}.safety-sig{flex-wrap:wrap}.safety-sig .sig-pts{margin-top:0}}
/* ═══ v3.11.40 — 📅 ریتم جلسه‌های روزانه ═══ */
.sessions-plan{display:flex;flex-direction:column;gap:6px;margin:10px 0 4px}
.sessions-row{display:flex;align-items:center;gap:8px;padding:7px 10px;border:1px solid var(--border-soft);border-radius:10px;font-size:12px;background:var(--card-2)}
.sessions-row.se-active{border-color:var(--primary-strong);background:var(--primary-25)}
.sessions-row.se-done{opacity:.55}
.sessions-row .se-ico{font-size:15px;line-height:1}
.sessions-row .se-band{min-width:32px;color:var(--text)}
.sessions-row .se-time{font-family:ui-monospace,monospace;letter-spacing:.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.sessions-row .se-state{margin-right:auto;font-size:11px;color:var(--muted);text-align:left}
.sessions-row.se-active .se-state{color:var(--primary-strong);font-weight:700}
@media (max-width:560px){.sessions-row{flex-wrap:wrap;gap:5px}.sessions-row .se-state{margin-right:0;width:100%}}
