/* 作战标图台 — design tokens (Impeccable direction a802e0ce)
 * 底图策略：无满屏方格；仅极淡暗角大气。抬升面不透明，靠色阶与细线分层。
 */
@import url("fonts-local.css?v=20261017-w400-600");

:root {
    /* World */
    --ops-ground: #0f1419;
    --ops-ground-elevated: #161c24;
    --ops-ink: #d9e2ec;
    --ops-ink-muted: #8b9aab;
    --ops-gold: #c9a227;
    --ops-route: #2f6fed;
    --ops-alert: #c23b3b;
    --ops-overlay-film: rgba(201, 162, 39, 0.12);
    --ops-territory-a: #121820;
    --ops-territory-hk: #14161f;

    /* Ground map — 几乎看不见网格，只留极淡暗角 */
    --ops-grid-line: transparent;
    --ops-grid-line-major: transparent;
    --ops-grid-size: 160px;
    --ops-grid-major: 640px;
    --ops-vignette:
        radial-gradient(ellipse 95% 75% at 50% 16%, rgba(22, 30, 40, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 100% 80% at 50% 100%, rgba(0, 0, 0, 0.22) 0%, transparent 48%);

    /* Market semantics (A-share convention) */
    --color-rise: #c23b3b;
    --color-fall: #2f9e6b;
    --color-primary: var(--ops-route);
    --color-bg-dark: var(--ops-ground);
    --color-bg-light: var(--ops-ground-elevated);
    --color-text-primary: var(--ops-ink);
    --color-text-secondary: var(--ops-ink-muted);
    --color-text-light: #6b7a8a;
    --color-border: rgba(217, 226, 236, 0.14);
    --color-warning: var(--ops-gold);

    /* Type */
    --font-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-mark: "Barlow Condensed", "Noto Sans SC", sans-serif;

    /* Chrome */
    --header-h: 64px;
    --overlay-bar-h: 40px;
    --bp-md: 768px;
    --bp-sm: 480px;

    /* Selection / focus */
    --ops-focus: 0 0 0 2px var(--ops-ground), 0 0 0 4px var(--ops-gold);

    /*
     * 控件指示器：不用 invert 滤镜（color-scheme:dark 下系统图标已偏浅，invert 会拧暗）。
     * 直接换成 --ops-ink / --ops-gold 的 SVG，尺寸固定，深底上必然可读。
     */
    --ops-date-picker-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Crect x='1.5' y='3' width='13' height='11.5' rx='1.5' stroke='%23d9e2ec' stroke-width='1.6'/%3E%3Cpath d='M1.5 6.5h13' stroke='%23d9e2ec' stroke-width='1.6'/%3E%3Cpath d='M5 1.5v3M11 1.5v3' stroke='%23d9e2ec' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    --ops-date-picker-icon-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Crect x='1.5' y='3' width='13' height='11.5' rx='1.5' stroke='%23c9a227' stroke-width='1.6'/%3E%3Cpath d='M1.5 6.5h13' stroke='%23c9a227' stroke-width='1.6'/%3E%3Cpath d='M5 1.5v3M11 1.5v3' stroke='%23c9a227' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    --ops-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23d9e2ec' d='M0 1h12L6 8z'/%3E%3C/svg%3E");
    --ops-select-chevron-focus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c9a227' d='M0 1h12L6 8z'/%3E%3C/svg%3E");
}

::selection {
    background: rgba(201, 162, 39, 0.35);
    color: var(--ops-ink);
}

/* —— 默认底：纯色作战板，无任何网格层 —— */
body.ops-map {
    font-family: var(--font-ui);
    background-color: var(--ops-ground) !important;
    background-image: var(--ops-vignette) !important;
    background-size: auto !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    color: var(--ops-ink);
    line-height: 1.5;
    font-size: 14px;
    color-scheme: dark;
}

/* 日期/时间控件：原生日历弹出按钮在深作战板上须可读 */
body.ops-map input[type="date"],
body.ops-map input[type="datetime-local"],
body.ops-map input[type="month"],
body.ops-map input[type="week"],
body.ops-map input[type="time"] {
    color-scheme: dark;
}

body.ops-map input[type="date"]::-webkit-calendar-picker-indicator,
body.ops-map input[type="datetime-local"]::-webkit-calendar-picker-indicator,
body.ops-map input[type="month"]::-webkit-calendar-picker-indicator,
body.ops-map input[type="week"]::-webkit-calendar-picker-indicator,
body.ops-map input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1 !important;
    width: 1.15rem !important;
    height: 1.15rem !important;
    margin-left: 0.2rem;
    padding: 0;
    filter: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    color: transparent;
    /* 简写 background 整块替换系统默认图标 */
    background: var(--ops-date-picker-icon) center / 1.1rem 1.1rem no-repeat !important;
}

body.ops-map input[type="date"]::-webkit-calendar-picker-indicator:hover,
body.ops-map input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
body.ops-map input[type="month"]::-webkit-calendar-picker-indicator:hover,
body.ops-map input[type="week"]::-webkit-calendar-picker-indicator:hover,
body.ops-map input[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1 !important;
    background: var(--ops-date-picker-icon-hover) center / 1.1rem 1.1rem no-repeat !important;
}

/* 原生 select 箭头：去掉系统三角，统一墨色 / 焦点金色 */
body.ops-map select:not(.ops-select-native) {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 1.85rem !important;
    background-image: var(--ops-select-chevron) !important;
    background-repeat: no-repeat !important;
    background-position: right 0.55rem center !important;
    background-size: 12px 8px !important;
}

body.ops-map select:not(.ops-select-native)::-ms-expand {
    display: none;
}

body.ops-map select:not(.ops-select-native):focus,
body.ops-map select:not(.ops-select-native):focus-visible {
    background-image: var(--ops-select-chevron-focus) !important;
}

/* 各频道统一：无方格，仅极淡暗角（领地色除外） */
body.ops-map[data-channel="home"],
body.ops-map[data-channel="quotes"],
body.ops-map[data-channel="watchlist"],
body.ops-map[data-channel="screening"],
body.ops-map[data-channel="analyze"],
body.ops-map[data-channel="news"],
body.ops-map[data-channel="profile"] {
    --ops-grid-line: transparent;
    --ops-grid-line-major: transparent;
    --ops-vignette:
        radial-gradient(ellipse 95% 75% at 50% 16%, rgba(22, 30, 40, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 100% 80% at 50% 100%, rgba(0, 0, 0, 0.22) 0%, transparent 48%);
}

body.ops-map[data-channel="home"] {
    background-color: var(--ops-territory-a);
}

/* 主内容区透出底图；抬升面由 ops-data / ops-surfaces 用不透明色盖住 */
body.ops-map .main-content,
body.ops-map .page-content,
body.ops-map .screening-container {
    background: transparent !important;
}

/* 顶区刻度也关掉，进一步素净 */
body.ops-map .main-content::before,
body.ops-map .screening-container::before {
    content: none;
    display: none;
}

body.ops-map .icp-footer {
    background: transparent !important;
    border-top: 1px solid var(--color-border) !important;
    color: var(--ops-ink-muted) !important;
}

body.ops-map .icp-footer a {
    color: var(--ops-ink-muted) !important;
}

body.ops-map .icp-footer a:hover {
    color: var(--ops-gold) !important;
}

body.ops-map a {
    color: var(--ops-route);
}

@media (max-width: 767px) {
    body.ops-map {
        --ops-grid-line: transparent;
        --ops-grid-line-major: transparent;
        background-attachment: scroll;
    }
}
