        /* ── 테마 토큰 (2026-10) — 다크가 기본. data-theme=light 또는 auto+OS 라이트면 아래 라이트 값으로.
           템플릿·CSS 의 색은 전부 이 토큰을 쓴다(토큰화 2026-10-10). 상승/하락은 --up/--down(언어별). ── */
        :root {
            --primary-color: #2563eb;
            --secondary-color: #0ea5e9;
            --accent-color: #f97316;
            --success-color: #10b981;
            --danger-color: #ef4444;
            --warning-color: #f59e0b;
            --bg: #0b1220; --bg-2: #0a0f1d;
            --dark-bg: #0b1220;
            --card-bg: #111a2e;
            --card-bg-2: #16213e;
            --text-primary: #f8fafc; --text-2: #cbd5e1;
            --text-secondary: #94a3b8;
            --text-muted: #8491a8;      /* 카드(#111a2e) 위 4.6:1 — 작은 설명 글자도 읽히게 (2026-10 가독성) */
            --border-color: #1f2a44;
            --surface-1: rgba(255,255,255,0.03); --surface-2: rgba(255,255,255,0.06); --surface-3: rgba(255,255,255,0.1); --line-strong: rgba(255,255,255,0.18);
            --shadow: rgba(0,0,0,0.45); --nav-bg: rgba(17,26,46,0.94);
            --red: #ef4444; --blue: #3b82f6; --red-text: #f87171; --blue-text: #60a5fa;
            --green: #10b981; --green-text: #34d399; --amber: #f59e0b; --amber-text: #fbbf24;
            --accent-text: #fb923c; --primary-strong: #1d4ed8; --indigo-text: #a5b4fc;
            /* 상승/하락 의미 토큰 — 영어 화면 기본(초록/빨강). html[lang=ko] 에서 빨강/파랑으로 바뀐다. */
            --up: #10b981;
            --down: #ef4444;
            color-scheme: dark;
        }
        html[lang="ko"] { --up: #f87171; --down: #60a5fa; }
        :root[data-theme="light"] {
            --bg: #f6f7fb; --bg-2: #eef1f7;
            --card-bg: #ffffff; --card-bg-2: #f1f4f9; --border-color: #e5e8f0;
            --dark-bg: #f6f7fb;
            --text-primary: #0f172a; --text-2: #334155; --text-secondary: #475569; --text-muted: #5b6678;
            --surface-1: rgba(15,23,42,0.03); --surface-2: rgba(15,23,42,0.05); --surface-3: rgba(15,23,42,0.08); --line-strong: rgba(15,23,42,0.14);
            --shadow: rgba(15,23,42,0.12); --nav-bg: rgba(255,255,255,0.92);
            --red: #dc2626; --blue: #2563eb; --red-text: #b91c1c; --blue-text: #1d4ed8;
            --green: #059669; --green-text: #047857; --amber: #d97706; --amber-text: #92400e;
            --accent-text: #c2410c; --primary-strong: #1e40af; --indigo-text: #3730a3;
            --success-color: #059669; --danger-color: #dc2626; --warning-color: #d97706;
            --up: #059669; --down: #dc2626;
            color-scheme: light;
        }
        :root[data-theme="light"][lang="ko"] { --up: #dc2626; --down: #2563eb; }
        @media (prefers-color-scheme: light) {
            :root[data-theme="auto"] {
            --bg: #f6f7fb; --bg-2: #eef1f7;
            --card-bg: #ffffff; --card-bg-2: #f1f4f9; --border-color: #e5e8f0;
            --dark-bg: #f6f7fb;
            --text-primary: #0f172a; --text-2: #334155; --text-secondary: #475569; --text-muted: #5b6678;
            --surface-1: rgba(15,23,42,0.03); --surface-2: rgba(15,23,42,0.05); --surface-3: rgba(15,23,42,0.08); --line-strong: rgba(15,23,42,0.14);
            --shadow: rgba(15,23,42,0.12); --nav-bg: rgba(255,255,255,0.92);
            --red: #dc2626; --blue: #2563eb; --red-text: #b91c1c; --blue-text: #1d4ed8;
            --green: #059669; --green-text: #047857; --amber: #d97706; --amber-text: #92400e;
            --accent-text: #c2410c; --primary-strong: #1e40af; --indigo-text: #3730a3;
            --success-color: #059669; --danger-color: #dc2626; --warning-color: #d97706;
            --up: #059669; --down: #dc2626;
            color-scheme: light;
            }
            :root[data-theme="auto"][lang="ko"] { --up: #dc2626; --down: #2563eb; }
        }

* { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
            background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
            color: var(--text-primary);
            min-height: 100vh;
            font-size: 15px;
            line-height: 1.55;
        }

        a { color: inherit; text-decoration: none; }

        /* Top ticker strip */
        .ticker {
            background: var(--card-bg);
            border-bottom: 1px solid var(--border-color);
            overflow: hidden;
            white-space: nowrap;
            padding: 0.5rem 0;
            font-size: 0.85rem;
        }
        .ticker-track {
            display: inline-flex;
            gap: 2.5rem;
            padding-left: 2rem;
            animation: ticker-scroll 40s linear infinite;
        }
        .ticker-item { color: var(--text-secondary); display: inline-flex; gap: 0.4rem; align-items: center; }
        .ticker-item strong { color: var(--text-primary); }
        @keyframes ticker-scroll {
            from { transform: translateX(0); }
            to   { transform: translateX(-50%); }
        }

        /* ── 헤더 (2026-10 두 줄) — 마크업은 templates/finji/_header.html, 메뉴 정의는 pages/finji/finji_nav.py ── */
        .navbar {
            background: var(--nav-bg);
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            z-index: 1000;
            backdrop-filter: blur(10px);
        }
        .container { max-width: 1320px; margin: 0 auto; padding: 0 1rem; }
        .nav-row1 { display: flex; align-items: center; gap: 0.9rem; min-height: 56px; }
        .nav-row2 { border-top: 1px solid var(--surface-2); }
        .logo { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); display: inline-flex; align-items: center; gap: 0.45rem; letter-spacing: -0.02em; white-space: nowrap; }
        .logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); color: #fff; font-weight: 800; }
        .logo-accent { color: var(--accent-color); }
        .mkt-seg { display: inline-flex; background: var(--card-bg-2); border: 1px solid var(--border-color); border-radius: 999px; padding: 2px; flex: 0 0 auto; }
        .mkt-seg a { padding: 0.3rem 0.85rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); line-height: 1.3; }
        .mkt-seg a.on { background: var(--primary-color); color: #fff; }
        .mkt-badge { font-size: 0.74rem; font-weight: 700; color: var(--text-secondary); border: 1px solid var(--border-color); border-radius: 999px; padding: 0.25rem 0.6rem; white-space: nowrap; }
        .nav-util { margin-left: auto; display: flex; align-items: center; gap: 0.4rem; flex: 0 0 auto; }
        .nav-ibtn { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.4rem 0.55rem; border-radius: 8px; color: var(--text-secondary); font-size: 0.85rem; font-weight: 600; min-height: 36px; white-space: nowrap; }
        .nav-ibtn:hover, .nav-ibtn.active { color: var(--text-primary); background: var(--surface-2); }
        .nav-ibtn .ico, .nav-group-toggle .ico { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
        .nav-upgrade a { display: inline-block; padding: 0.38rem 0.85rem; border-radius: 999px; background: linear-gradient(135deg, var(--amber), var(--accent-color)); color: #111; font-weight: 800; font-size: 0.8rem; white-space: nowrap; }
        .nav-login { padding: 0.45rem 0.95rem; border-radius: 8px; background: var(--primary-color); color: #fff; font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
        .nav-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; }
        .nav-pro { background: linear-gradient(135deg, var(--amber), var(--accent-color)); color: #111; font-size: 0.62rem; font-weight: 800; padding: 0.1rem 0.4rem; border-radius: 999px; }

        .nav-menu { display: flex; list-style: none; gap: 0.15rem; align-items: center; margin: 0; padding: 0; }
        .nav-group-toggle { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.6rem 0.7rem; color: var(--text-secondary); font-weight: 700; font-size: 0.92rem; border-bottom: 2px solid transparent; white-space: nowrap; }
        .nav-group:hover > .nav-group-toggle, .nav-group.open > .nav-group-toggle { color: var(--text-primary); }
        .nav-group.active > .nav-group-toggle { color: var(--text-primary); border-bottom-color: var(--accent-color); }
        .nav-group-toggle .caret { font-size: 0.68rem; opacity: 0.65; }
        .nav-all { margin-left: auto; }
        .nav-all a { display: inline-block; font-size: 0.85rem; font-weight: 700; color: var(--accent-color); padding: 0.6rem 0.4rem; white-space: nowrap; }
        .nav-mobile-foot { display: none; }

        /* 드롭다운 공통 (hover 또는 .open) */
        .nav-dropdown { position: relative; }
        .nav-dropdown-toggle { cursor: pointer; }
        .nav-dropdown-menu {
            display: none; position: absolute; top: 100%; left: 0;
            background: var(--card-bg-2); border: 1px solid var(--border-color); border-radius: 12px;
            padding: 0.5rem 0; min-width: 200px; z-index: 1001; list-style: none; margin: 0;
            box-shadow: 0 18px 40px var(--shadow);
        }
        .nav-dropdown::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 12px; display: none; }
        .nav-dropdown:hover::after, .nav-dropdown.open::after { display: block; }
        .nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown.open .nav-dropdown-menu { display: block; }
        .nav-dropdown-menu a { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.5rem 1rem; color: var(--text-secondary); font-weight: 500; }
        .nav-dropdown-menu a:hover, .nav-dropdown-menu a.active { background: var(--surface-1); color: var(--text-primary); }
        .nav-dropdown-menu .symcode { color: var(--text-muted); font-size: 0.78rem; }
        .nav-menu-right { left: auto; right: 0; }

        /* 2행 그룹 패널 — 여러 열. 화면보다 넓으면 열이 다음 줄로 넘어가고, 넘치는 만큼은 _header.html 스크립트가 왼쪽으로 당긴다 */
        .nav-panel { padding: 0.75rem; flex-wrap: wrap; align-items: flex-start; gap: 0.35rem 1.1rem; width: max-content; max-width: calc(100vw - 2rem); max-height: calc(100dvh - 7.5rem); overflow-y: auto; overscroll-behavior: contain; }
        .nav-dropdown:hover .nav-panel, .nav-dropdown.open .nav-panel { display: flex; }
        .nav-group:nth-last-child(-n+3) .nav-panel { left: auto; right: 0; }
        .nav-col { min-width: 170px; }
        .nav-col ul { list-style: none; margin: 0; padding: 0; }
        .nav-col-title { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 0.2rem 0.6rem 0.35rem; }
        .nav-col a { padding: 0.42rem 0.6rem; border-radius: 6px; font-size: 0.88rem; white-space: nowrap; }
        .nav-col a:hover, .nav-col a.active { background: var(--surface-2); color: var(--text-primary); }
        .nav-tag { font-size: 0.66rem; font-weight: 700; color: var(--accent-text); background: rgba(249,115,22,0.14); border-radius: 999px; padding: 0.05rem 0.45rem; align-self: center; }

        .mobile-menu-toggle { display: none; background: var(--card-bg-2); border: 1px solid var(--border-color); color: var(--text-primary); border-radius: 8px; padding: 0.4rem 0.7rem; cursor: pointer; min-height: 36px; }

        /* 검색 (⌘K) */
        .nav-search { position: relative; flex: 1 1 auto; max-width: 420px; min-width: 150px; }
        .nav-search-input { width: 100%; background: var(--card-bg-2); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 8px; padding: 0.5rem 2.8rem 0.5rem 0.85rem; font-size: 0.9rem; min-height: 38px; }
        .nav-search-input::placeholder { color: var(--text-muted); }
        .nav-search-input:focus { outline: none; border-color: var(--accent-color); }
        .nav-search .kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 0.66rem; color: var(--text-muted); border: 1px solid var(--border-color); border-radius: 5px; padding: 1px 5px; pointer-events: none; font-family: ui-monospace, monospace; }
        .nav-search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--card-bg-2); border: 1px solid var(--border-color); border-radius: 10px; padding: 0.35rem 0; list-style: none; max-height: 380px; overflow-y: auto; z-index: 1002; box-shadow: 0 18px 40px var(--shadow); }
        .nav-search-results.hidden { display: none; }
        .nav-search-results li { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.5rem 0.85rem; cursor: pointer; }
        .nav-search-results li:hover, .nav-search-results li.active { background: var(--surface-2); }
        .nav-search-results .r-name { color: var(--text-primary); font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .nav-search-results .r-meta { color: var(--text-muted); font-size: 0.78rem; flex-shrink: 0; }
        .nav-search-results .r-empty { color: var(--text-muted); font-size: 0.85rem; justify-content: center; cursor: default; }
        .nav-search-results .r-empty:hover { background: none; }

        @media (max-width: 880px) {
            .nav-row1 { flex-wrap: wrap; gap: 0.5rem; padding: 0.4rem 0; }
            .nav-search { order: 5; flex-basis: 100%; max-width: none; }
            .nav-search .kbd { display: none; }
            .mkt-seg { order: 6; }
            .mkt-badge { order: 6; }
            .nav-util { margin-left: auto; gap: 0.25rem; }
            .nav-lang-label, .nav-login-text { display: none; }
            /* 모바일 1행: 로고 · 알림 · 로그인/계정 · ☰ 만. 언어·테마·프리미엄은 메뉴 맨 아래로(아코디언 foot). */
            .nav-lang, .nav-theme, .nav-upgrade { display: none; }
            .nav-login { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
            .nav-row2 { border-top: 0; }
            .nav-menu { display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 0.25rem 0 0.75rem; max-height: calc(100dvh - 150px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
            .nav-menu.active { display: flex; }
            .nav-menu > li { width: 100%; }
            .nav-group-toggle { width: 100%; justify-content: flex-start; padding: 0.85rem 0.25rem; border-bottom: 1px solid var(--border-color); min-height: 44px; }
            .nav-group-toggle .caret { margin-left: auto; }
            .nav-dropdown-menu { position: static; box-shadow: none; min-width: 0; width: 100%; border: 0; border-radius: 0; background: transparent; }
            .nav-panel { padding: 0.25rem 0 0.5rem 0.75rem; grid-template-columns: 1fr; width: auto; max-width: none; max-height: none; overflow: visible; }
            .nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:hover .nav-panel { display: none; }
            .nav-dropdown.open .nav-dropdown-menu { display: block; }
            .nav-dropdown.open .nav-panel { display: grid; }
            .nav-col a { white-space: normal; min-height: 40px; align-items: center; }
            .nav-all { margin-left: 0; }
            .nav-all a { display: block; padding: 0.85rem 0.25rem; border-bottom: 1px solid var(--border-color); }
            .nav-mobile-foot { display: flex; gap: 0.9rem; flex-wrap: wrap; padding: 0.9rem 0.25rem 0; font-size: 0.85rem; }
            .nav-mobile-foot a { color: var(--text-secondary); }
            .mobile-menu-toggle { display: inline-flex; align-items: center; }
            /* 1행 유틸 드롭다운(언어·계정)은 모바일에서도 떠 있는 메뉴로 */
            .nav-util .nav-dropdown-menu { position: absolute; background: var(--card-bg-2); border: 1px solid var(--border-color); border-radius: 12px; width: auto; min-width: 160px; }
            .nav-util .nav-dropdown.open .nav-dropdown-menu { display: block; }
        }

        /* Layout */
        .main-content { min-height: calc(100vh - 120px); padding: 1.5rem 0 3rem; }

        .card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 14px;
            padding: 1.25rem;
        }

        .section-title {
            font-size: 1.1rem;
            font-weight: 700;
            margin-bottom: 0.9rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .section-title .more {
            margin-left: auto;
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-secondary);
        }

        .grid { display: grid; gap: 1rem; }
        .grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
        .grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
        .grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

        /* 가격 등락 색은 의미 토큰을 따른다(한국어 빨강/파랑, 영어 초록/빨강). 상태 배지(badge-*)는 그대로. */
        .text-success { color: var(--up); }
        .text-danger  { color: var(--down); }
        .text-muted   { color: var(--text-muted); }

        .btn {
            display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
            padding: 0.55rem 1rem;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.9rem;
            border: none;
            cursor: pointer;
        }
        .btn-ghost {
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
        }

        .badge {
            display: inline-block;
            padding: 0.2rem 0.55rem;
            border-radius: 999px;
            font-size: 0.75rem;
            font-weight: 600;
        }
        .badge-success { background: rgba(16,185,129,0.15); color: var(--success-color); }
        .badge-danger  { background: rgba(239,68,68,0.15); color: var(--danger-color); }
        .badge-warning { background: rgba(245,158,11,0.15); color: var(--warning-color); }
        .badge-muted   { background: rgba(148,163,184,0.12); color: var(--text-secondary); }

        .mock-note {
            margin-top: 0.5rem;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        .data-source {
            font-family: ui-monospace, monospace;
            opacity: 0.75;
        }

        footer.finji-foot { border-top: 1px solid var(--border-color); padding: 1.25rem 0 1.5rem; color: var(--text-muted); font-size: 0.8rem; }
        footer.finji-foot .container { display: flex; flex-direction: column; gap: 0.6rem; }
        footer.finji-foot .foot-links { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
        footer.finji-foot .foot-links a { color: var(--text-secondary); font-weight: 600; }
        footer.finji-foot .foot-legal { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
        footer.finji-foot .foot-legal a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }

        /* ⭐ 관심종목 추가 버튼 (여러 페이지 공용 — data-watch-* 로 자동 연결) */
        .finji-watch-btn {
            appearance: none; -webkit-appearance: none; background: transparent;
            border: none; cursor: pointer; padding: 0.15rem 0.3rem; line-height: 1;
            color: var(--text-muted); font-size: 1.15rem; border-radius: 8px;
            display: inline-flex; align-items: center; gap: 0.35rem;
            transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease;
        }
        .finji-watch-btn:hover { color: #f5b301; background: rgba(245,179,1,0.12); }
        .finji-watch-btn:active { transform: scale(0.9); }
        .finji-watch-btn .fw-ico { font-size: 1.15rem; }
        .finji-watch-btn.is-watched { color: #f5b301; }
        .finji-watch-btn.is-busy { opacity: 0.5; pointer-events: none; }
        .finji-watch-btn .fw-txt { font-size: 0.82rem; font-weight: 700; }
        /* 라벨 없는(아이콘 전용) 변형에서는 텍스트 숨김 */
        .finji-watch-btn:not(.finji-watch-btn--label) .fw-txt { display: none; }

        /* 공용 토스트 */
        #finji-global-toast {
            position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%) translateY(1rem);
            background: rgba(20,20,24,0.95); color: #fff; padding: 0.7rem 1.1rem;
            border-radius: 10px; font-size: 0.9rem; font-weight: 600; z-index: 9999;
            opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
            box-shadow: 0 8px 24px var(--shadow); max-width: 90vw; text-align: center;
        }
        #finji-global-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

        /* 테마 토글 아이콘 — 현재 테마의 반대가 아니라 현재 상태를 보여 준다 */
        .nav-theme .ico-sun { display: none; }
        :root[data-theme="light"] .nav-theme .ico-sun { display: inline; }
        :root[data-theme="light"] .nav-theme .ico-moon { display: none; }
        @media (prefers-color-scheme: light) {
            :root[data-theme="auto"] .nav-theme .ico-sun { display: inline; }
            :root[data-theme="auto"] .nav-theme .ico-moon { display: none; }
        }
        .nav-dropdown-menu a.active::after { content: '✓'; color: var(--accent-color); }

        /* ── 종목 미리보기 패널 (preview.js) — 데스크톱 오른쪽 패널 · 모바일 하단 시트 ── */
        .fpv { position: fixed; z-index: 1200; background: var(--card-bg); border-left: 1px solid var(--border-color); box-shadow: -12px 0 40px var(--shadow); display: flex; flex-direction: column; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); transform: translateX(105%); transition: transform 0.22s ease; }
        .fpv.open { transform: translateX(0); }
        .fpv-head { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border-color); }
        .fpv-title { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); }
        .fpv-close { background: var(--card-bg-2); border: 1px solid var(--border-color); color: var(--text-primary); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; font-size: 0.95rem; }
        .fpv-body { padding: 1rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 0.9rem; }
        .fpv-sym { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
        .fpv-name { font-size: 1.15rem; font-weight: 800; } .fpv-code { font-size: 0.78rem; color: var(--text-secondary); font-family: ui-monospace, monospace; margin-top: 0.1rem; }
        .fpv-price { text-align: right; font-variant-numeric: tabular-nums; } .fpv-price > div:first-child { font-size: 1.1rem; font-weight: 800; } .fpv-price > div:last-child { font-size: 0.85rem; font-weight: 700; }
        .fpv-k { display: block; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.3rem; }
        .fpv-why { background: var(--surface-1); border: 1px solid var(--border-color); border-radius: 10px; padding: 0.6rem 0.75rem; font-size: 0.9rem; line-height: 1.5; }
        .fpv-spark { width: 100%; height: 90px; display: block; }
        .fpv-spark-cap { display: flex; justify-content: space-between; font-size: 0.76rem; color: var(--text-secondary); margin-top: 0.25rem; }
        .fpv-news ul { list-style: none; margin: 0; padding: 0; } .fpv-news li { padding: 0.4rem 0; border-bottom: 1px dashed var(--border-color); font-size: 0.86rem; line-height: 1.45; } .fpv-news li:last-child { border-bottom: 0; }
        .fpv-news li a { color: var(--text-primary); } .fpv-news li a:hover { text-decoration: underline; } .fpv-news li small { display: block; color: var(--text-muted); font-size: 0.72rem; }
        .fpv-muted { color: var(--text-muted); font-size: 0.85rem; } .fpv-loading { color: var(--text-muted); font-size: 0.9rem; padding: 2rem 0; text-align: center; }
        .fpv-actions { display: flex; gap: 0.6rem; align-items: center; margin-top: auto; padding-top: 0.5rem; border-top: 1px solid var(--border-color); }
        .fpv-watch { border: 1px solid var(--border-color); border-radius: 8px; padding: 0.45rem 0.75rem; min-height: 40px; }
        .fpv-detail { margin-left: auto; }
        @media (max-width: 1023px) {
            .fpv { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 72vh; border-left: 0; border-top: 1px solid var(--border-color); border-radius: 16px 16px 0 0; transform: translateY(105%); box-shadow: 0 -12px 40px var(--shadow); }
            .fpv.open { transform: translateY(0); }
        }


        /* ══════════════════════════════════════════════════════════════════════
           모바일 레이아웃 키트 (≤767px) — 2026-10-11
           카드 격자가 모바일에서 전부 1열로 쌓이면 홈이 20화면 길이가 된다. 정보 가치에 따라
           가로로 넘기거나(레일), 2열 타일로 접거나(타일), 줄 수를 자르거나(클립), 접어 둔다(폴드).
           데스크톱에는 아무 영향이 없다(미디어 쿼리 안에만 있다). 사용법은 mobile.js 머리 주석.
           ══════════════════════════════════════════════════════════════════════ */
        @media (max-width: 767px) {
            /* 레일: 가로 스와이프. 한 장이 82% 폭이라 다음 장이 살짝 보인다(넘길 수 있다는 신호). */
            .m-rail { display: flex !important; grid-template-columns: none !important; flex-wrap: nowrap !important;
                      overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
                      gap: 0.6rem !important; margin-left: -1rem; margin-right: -1rem; padding: 0 1rem 0.35rem;
                      scrollbar-width: none; -webkit-overflow-scrolling: touch;
                      /* 레일의 내용 폭이 부모(grid/flex 항목)의 min-content 로 번져 문서가 옆으로 늘어나지 않게 */
                      contain: inline-size; min-width: 0; }
            .m-rail::-webkit-scrollbar { display: none; }
            .m-rail > * { flex: 0 0 82%; max-width: 82%; min-width: 0; scroll-snap-align: start; margin: 0 !important; }
            .m-rail--2 > * { flex-basis: 46%; max-width: 46%; }     /* 작은 카드는 두 장씩 */
            .m-rail--wide > * { flex-basis: 90%; max-width: 90%; }  /* 차트는 거의 한 장 */
            /* 타일: 2열 격자. 숫자 카드(지수·선물)처럼 한 줄이면 아까운 것. */
            .m-tiles { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 0.5rem !important; }
            .m-tiles > * { min-width: 0; }
            .m-tiles-3 { display: grid !important; grid-template-columns: 1fr 1fr 1fr !important; gap: 0.4rem !important; }
            .m-tiles-3 > * { min-width: 0; }
            /* 클립·폴드 (mobile.js 가 붙인다) */
            .m-hide { display: none !important; }
            .m-clip-btn { display: block; width: 100%; margin-top: 0.5rem; min-height: 40px; padding: 0.45rem 0.8rem;
                          border: 1px dashed var(--border-color); border-radius: 10px; background: transparent;
                          color: var(--text-secondary); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
            .m-clip-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }
            .m-fold-head { cursor: pointer; display: flex !important; align-items: center; gap: 0.4rem; margin-bottom: 0 !important; }
            .m-fold-head::after { content: '▾'; margin-left: auto; color: var(--text-muted); font-size: 0.9rem; transition: transform .15s; }
            .m-fold-head[aria-expanded="false"]::after { transform: rotate(-90deg); }
            .m-fold-head .m-fold-sub { font-size: 0.76rem; font-weight: 500; color: var(--text-muted); margin-left: 0.45rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
            .m-fold-head[aria-expanded="true"] { margin-bottom: 0.6rem !important; }
        }
