html {
    color-scheme: dark;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --bg: #07101f;
    --panel: rgba(10, 20, 38, 0.82);
    --panel-strong: rgba(14, 27, 49, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #eff6ff;
    --text-muted: #9fb0ca;
    --text-soft: #7d8dab;
    --positive: #e53935;
    --negative: #1f4ed8;
    --neutral: #94a3b8;
    --warning: #facc15;
    --accent: #5b7cff;
    --shadow: 0 24px 70px rgba(1, 6, 18, 0.42);
    --radius-xl: 28px;
    --ticker-speed: 20s;
}

html[data-theme="light"] {
    color-scheme: light;
    --panel: rgba(255, 255, 255, 0.86);
    --panel-strong: rgba(255, 255, 255, 0.96);
    --line: rgba(59, 82, 119, 0.12);
    --text: #0f172a;
    --text-muted: #51627f;
    --text-soft: #6b7a94;
    --positive: #e53935;
    --negative: #1f4ed8;
    --neutral: #64748b;
    --warning: #ca8a04;
    --accent: #3453ff;
    --shadow: 0 20px 50px rgba(28, 56, 104, 0.12);
}

* {
    box-sizing: border-box;
}

body.main-v2-page {
    margin: 0;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    color: var(--text);
    font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 34%),
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.16), transparent 28%),
        radial-gradient(circle at bottom center, rgba(16, 185, 129, 0.11), transparent 35%),
        linear-gradient(180deg, #04101f 0%, #07111f 26%, #091727 100%);
    position: relative;
    overflow-x: hidden;
}

html[data-theme="light"] body.main-v2-page {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 32%),
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent 26%),
        radial-gradient(circle at bottom center, rgba(14, 165, 233, 0.08), transparent 28%),
        linear-gradient(180deg, #eef4ff 0%, #f6f9ff 100%);
}

body.main-v2-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.58), transparent 92%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.v2-top-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(18px);
    background: rgba(6, 15, 29, 0.58);
    border-bottom: 1px solid var(--line);
}

html[data-theme="light"] .v2-top-nav {
    background: rgba(255, 255, 255, 0.78);
}

.v2-top-nav__shell {
    width: min(1560px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: grid;
    /* 로고 비표시: 메뉴 + 액션만 */
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 18px;
}

.v2-brand-link {
    display: inline-flex;
    align-items: center;
}

/* 로고 임시 비표시 (로고 없이 서비스) */
.v2-top-nav__brand {
    display: none !important;
}

.v2-brand-logo {
    width: 132px;
    max-width: 100%;
    display: block;
    filter: drop-shadow(0 12px 24px rgba(2, 8, 23, 0.28));
}

.v2-top-nav__menu-wrap {
    justify-self: center;
}

.v2-nav-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.v2-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.04);
    border: 1px solid transparent;
    transition: 0.2s ease;
    font-size: 0.92rem;
    font-weight: 600;
}

.v2-nav-item:hover {
    color: var(--text);
    border-color: rgba(91, 124, 255, 0.35);
    background: rgba(91, 124, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(91, 124, 255, 0.12);
}

.v2-nav-item.active {
    color: rgba(191, 219, 254, 0.96);
    border-color: rgba(96, 165, 250, 0.3);
    background: linear-gradient(
        145deg,
        rgba(59, 130, 246, 0.34) 0%,
        rgba(37, 99, 235, 0.44) 48%,
        rgba(15, 23, 42, 0.52) 100%
    );
    box-shadow:
        0 4px 14px rgba(30, 58, 138, 0.2),
        inset 0 1px 0 rgba(147, 197, 253, 0.14);
}

.v2-top-nav__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.v2-top-nav__clock {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.v2-theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, 0.08);
    color: var(--warning);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.v2-theme-toggle:hover {
    transform: translateY(-1px);
    background: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.38);
}

.v2-main-shell {
    width: min(1560px, calc(100% - 32px));
    margin: 18px auto 72px;
    display: grid;
    gap: 18px;
    min-width: 0;
}

.v2-ticker-band,
.v2-market-card,
.v2-command-strip,
.v2-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent), var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

html[data-theme="light"] .v2-ticker-band,
html[data-theme="light"] .v2-market-card,
html[data-theme="light"] .v2-command-strip,
html[data-theme="light"] .v2-panel {
    background: linear-gradient(180deg, rgba(52, 83, 255, 0.02), transparent), var(--panel);
}

.v2-ticker-band {
    position: relative;
    padding: 10px 0;
    overflow: hidden;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    background: rgba(8, 18, 34, 0.72);
    box-shadow: none;
}

html[data-theme="light"] .v2-ticker-band {
    background: rgba(255, 255, 255, 0.88);
}

.v2-ticker-marquee {
    display: flex;
    align-items: center;
    width: max-content;
    min-width: 100%;
    animation: v2-ticker-scroll var(--ticker-speed) linear infinite;
    will-change: transform;
}

.v2-ticker-band:hover .v2-ticker-marquee {
    animation-play-state: paused;
}

.v2-ticker-marquee__group {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex: 0 0 auto;
    width: max-content;
    min-width: 100%;
    padding-left: 24px;
    padding-right: 24px;
}

.v2-ticker-marquee--flow {
    min-width: 0;
}

.v2-ticker-marquee__group--flow {
    gap: 2.25rem;
    min-width: 0;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.v2-ticker-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.v2-ticker-item__theme {
    color: var(--text-soft);
    font-size: 0.82rem;
}

.v2-ticker-item__name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.v2-ticker-item__price {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.84rem;
}

.v2-ticker-item__rate {
    font-weight: 700;
    font-size: 0.84rem;
}

.v2-ticker-item__rate--positive {
    color: var(--positive);
}

.v2-ticker-item__rate--negative {
    color: var(--negative);
}

.v2-ticker-item__rate--neutral {
    color: var(--neutral);
}

.v2-ticker-item--market {
    gap: 0.45rem;
    flex: 0 0 auto;
}

.v2-ticker-item--empty .v2-ticker-item__theme {
    margin-left: 0.35rem;
}

.v2-ticker-band--mobile-only {
    display: none;
}

.v2-ticker-item--link {
    flex: 0 0 auto;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.v2-ticker-item--link:hover {
    color: var(--text);
}

.v2-ticker-item--link.is-active .v2-ticker-item__name,
.v2-ticker-item--link.is-active .v2-ticker-item__theme,
.v2-ticker-item--link.is-active .v2-ticker-item__icon {
    color: var(--text);
}

.v2-ticker-item__icon {
    color: var(--accent);
    font-size: 0.78rem;
}

.v2-market-grid {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.v2-market-grid__top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.v2-market-card {
    padding: 16px 18px 14px;
    display: grid;
    gap: 10px;
}

.v2-market-card--compact {
    border-radius: 18px;
    box-shadow: none;
}

.v2-market-card__head {
    display: grid;
    gap: 6px;
}

.v2-market-card__head--inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.v2-market-card__head--inline > *,
.v2-sentiment-block__head > *,
.v2-theme-card__headline > * {
    min-width: 0;
}

.v2-market-card__title {
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.35;
}

.v2-market-card__eyebrow,
.v2-section-head__eyebrow {
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
}

.v2-market-card h2,
.v2-section-head h2 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.25;
}

.v2-market-card__summary {
    color: var(--text-muted);
    font-size: 0.77rem;
    font-weight: 700;
    white-space: nowrap;
}

.v2-breath-bar,
.v2-sentiment-bar {
    display: flex;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.v2-breath-bar__rise {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.7), rgba(34, 197, 94, 0.95));
    transition: width 0.35s ease;
}

.v2-breath-bar__fall {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.95), rgba(248, 113, 113, 0.65));
    transition: width 0.35s ease;
}

.v2-sentiment-bar__segment {
    transition: width 0.35s ease;
}

.v2-sentiment-bar__segment--ant {
    background: #fbbf24;
}

.v2-sentiment-bar__segment--foreign {
    background: #10b981;
}

.v2-sentiment-bar__segment--inst {
    background: #f43f5e;
}

.v2-sentiment-legend {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.v2-market-card--sentiment-row {
    padding-top: 14px;
    padding-bottom: 12px;
}

.v2-market-sentiment-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.v2-sentiment-block {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.v2-sentiment-block + .v2-sentiment-block {
    border-left: 1px solid rgba(148, 163, 184, 0.12);
    padding-left: 14px;
}

.v2-sentiment-block__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.v2-sentiment-block__summary {
    color: var(--text-soft);
    font-size: 0.75rem;
    white-space: nowrap;
}

.v2-sentiment-legend--compact {
    gap: 8px;
}

.v2-sentiment-legend span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}

.v2-sentiment-legend em {
    font-style: normal;
    font-size: 0.68rem;
    color: var(--text-soft);
    white-space: nowrap;
}

.v2-sentiment-legend strong {
    font-size: 0.8rem;
    text-align: right;
    white-space: nowrap;
}

.v2-command-strip {
    padding: 12px 18px;
    display: grid;
    gap: 8px;
    min-width: 0;
}

.v2-command-strip__top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-width: 0;
}

.v2-command-strip__bottom {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: end;
    min-width: 0;
}

.v2-market-phase-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    width: max-content;
    max-width: max-content;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, 0.08);
    font-weight: 700;
    min-width: 0;
    white-space: nowrap;
}

@keyframes v2-market-dot-blink {
    0%, 40% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 10px currentColor, 0 0 18px currentColor;
    }

    60%, 100% {
        opacity: 0.18;
        transform: scale(0.85);
        box-shadow: none;
    }
}

.v2-market-phase-badge__dot {
    flex: 0 0 auto;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 18px currentColor;
    will-change: opacity, transform;
}

.v2-market-phase-badge.market-krx .v2-market-phase-badge__dot,
.v2-market-phase-badge.market-nxt .v2-market-phase-badge__dot {
    -webkit-animation: v2-market-dot-blink 1.2s ease-in-out infinite;
    animation: v2-market-dot-blink 1.2s ease-in-out infinite;
}

.v2-market-phase-badge.market-closed .v2-market-phase-badge__dot {
    -webkit-animation: none;
    animation: none;
    opacity: 0.55;
    box-shadow: none;
}

.v2-market-phase-badge__title {
    flex: 1 1 auto;
    font-size: 0.9rem;
    min-width: 0;
    white-space: nowrap;
}

.v2-market-phase-badge small {
    flex: 0 1 auto;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    min-width: 0;
    white-space: nowrap;
}

.v2-market-phase-badge.market-krx {
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.32);
    background: rgba(34, 197, 94, 0.14);
}

.v2-market-phase-badge.market-nxt {
    color: #fde047;
    border-color: rgba(250, 204, 21, 0.32);
    background: rgba(250, 204, 21, 0.14);
}

.v2-market-phase-badge.market-closed {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(148, 163, 184, 0.08);
}

html[data-theme="light"] .v2-market-phase-badge.market-krx {
    color: #15803d;
    background: rgba(34, 197, 94, 0.1);
}

html[data-theme="light"] .v2-market-phase-badge.market-nxt {
    color: #a16207;
    background: rgba(250, 204, 21, 0.12);
}

html[data-theme="light"] .v2-market-phase-badge.market-closed {
    color: #475569;
    background: rgba(100, 116, 139, 0.08);
}

.v2-search-box {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    justify-self: stretch;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px;
}

.v2-search-box__input {
    width: 100%;
    min-width: 0;
    background: transparent;
    border: 0;
    color: var(--text);
    padding: 9px 14px;
    outline: none;
    font-size: 0.9rem;
}

.v2-search-box__input::placeholder {
    color: var(--text-soft);
}

.v2-search-box__button {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
}

.v2-search-autocomplete {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    padding: 0;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    z-index: 10;
    max-height: 300px;
    overflow-y: auto;
}

.v2-search-autocomplete.is-open {
    display: block;
}

.v2-search-autocomplete__header {
    padding: 0.35rem 1rem;
    color: var(--text-soft);
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.12);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    cursor: default;
    user-select: none;
}

.v2-search-autocomplete__item {
    width: 100%;
    display: grid;
    gap: 2px;
    padding: 0.75rem 1rem;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.v2-search-autocomplete__item:hover,
.v2-search-autocomplete__item.is-selected {
    background: rgba(148, 163, 184, 0.08);
}

.v2-search-autocomplete__name,
.v2-search-autocomplete__theme {
    font-weight: 500;
    color: var(--text);
}

.v2-search-autocomplete__code {
    font-size: 0.85rem;
    color: var(--text-soft);
}

.v2-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.v2-summary-pill {
    min-width: 110px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.12);
    display: grid;
    gap: 6px;
}

.v2-summary-pill span {
    color: var(--text-soft);
    font-size: 0.76rem;
}

.v2-summary-pill strong {
    font-size: 1.08rem;
}

.v2-live-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
}

.v2-live-strip__text {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.v2-status-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.v2-status-chip--ws {
    color: #86efac;
    background: rgba(34, 197, 94, 0.14);
}

.v2-status-chip--ajax {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.14);
}

.v2-refresh-button {
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, 0.08);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}

.v2-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
    min-width: 0;
}

.v2-panel {
    padding: 20px;
    min-width: 0;
}

.v2-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.v2-section-head__title-row {
    display: grid;
    gap: 4px;
}

.v2-section-head--theme {
    margin-bottom: 12px;
}

.v2-section-head--theme .v2-section-head__title-row {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.v2-section-head--theme .v2-section-head__eyebrow {
    letter-spacing: 0.1em;
    font-size: 0.68rem;
    line-height: 1;
}

.v2-section-head--theme h2 {
    line-height: 1.05;
}

.v2-section-head p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.v2-theme-grid {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.v2-theme-card {
    --theme-accent: #5b7cff;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 34%),
        linear-gradient(90deg, color-mix(in srgb, var(--theme-accent) 18%, transparent), transparent 60%),
        rgba(7, 16, 32, 0.52);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    padding: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    min-width: 0;
}

html[data-theme="light"] .v2-theme-card {
    background:
        linear-gradient(180deg, rgba(52, 83, 255, 0.03), transparent 34%),
        linear-gradient(90deg, color-mix(in srgb, var(--theme-accent) 10%, transparent), transparent 60%),
        rgba(255, 255, 255, 0.86);
}

.v2-theme-grid > .v2-theme-card:first-child {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 34%),
        rgba(7, 16, 32, 0.52);
}

html[data-theme="light"] .v2-theme-grid > .v2-theme-card:first-child {
    background:
        linear-gradient(180deg, rgba(52, 83, 255, 0.03), transparent 34%),
        rgba(255, 255, 255, 0.86);
}

.v2-theme-card__header {
    margin-bottom: 8px;
}

.v2-theme-card__heading {
    display: grid;
    gap: 0;
}

.v2-theme-card__eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow: visible;
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 700;
}

.v2-theme-card__rank {
    flex: 0 0 auto;
}

.v2-theme-card__leader {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fef08a;
    background: rgba(250, 204, 21, 0.14);
}

.v2-theme-card__headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    overflow: visible;
}

.v2-theme-card__title {
    flex: 0 1 auto;
    max-width: 100%;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 12px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 24%, var(--line));
    background: color-mix(in srgb, var(--theme-accent, var(--accent)) 7%, transparent);
    text-decoration: none;
    color: var(--text);
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.2;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.v2-theme-card__title-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.v2-theme-card__title-icon {
    flex-shrink: 0;
    font-size: 0.72rem;
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.v2-theme-card__title:hover {
    border-color: color-mix(in srgb, var(--theme-accent, var(--accent)) 42%, var(--line));
    background-color: color-mix(in srgb, var(--theme-accent, var(--accent)) 13%, transparent);
}

.v2-theme-card__title:hover .v2-theme-card__title-icon {
    opacity: 0.8;
}

.v2-card-metric {
    flex: 0 0 auto;
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 38px;
    padding: 4px 4px 4px 8px;
    border-radius: 18px;
    background: rgba(148, 163, 184, 0.08);
    white-space: nowrap;
}

.v2-card-metric__toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 4px 8px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, color 0.15s ease;
}

.v2-card-metric__toggle i {
    font-size: 0.72rem;
    opacity: 0.78;
}

.v2-card-metric__toggle:hover {
    background: rgba(148, 163, 184, 0.16);
    color: var(--text);
}

.v2-card-metric__toggle:active {
    transform: scale(0.98);
}

.v2-card-metric__label-text {
    line-height: 1;
}

.v2-card-metric__value {
    flex: 0 0 auto;
    min-width: 52px;
    padding: 0 6px 0 2px;
    font-size: 0.98rem;
    line-height: 1;
    font-weight: 800;
    text-align: right;
    pointer-events: none;
}

.v2-card-metric__hint {
    display: none;
}

.v2-card-metric__value--positive {
    color: var(--positive);
}

.v2-card-metric__value--negative {
    color: var(--negative);
}

.v2-card-metric__value--neutral {
    color: var(--text-muted);
}

.v2-theme-issue {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.06);
    color: var(--text-muted);
    margin-bottom: 12px;
    min-width: 0;
}

.v2-theme-issue__label {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(91, 124, 255, 0.14);
    color: #c7d2fe;
    font-size: 0.72rem;
    font-weight: 700;
}

html[data-theme="light"] .v2-theme-issue__label {
    background: rgba(91, 124, 255, 0.16);
    color: #1e3a8a;
}

.v2-theme-issue__text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-theme-issue--empty {
    justify-content: center;
    color: var(--text-soft);
}

.v2-theme-card__legend,
.v2-stock-row {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(72px, 0.75fr) 28px repeat(3, minmax(72px, 0.75fr)) 148px;
    gap: 10px;
    align-items: center;
}

.v2-theme-card__legend {
    padding: 0 12px 8px;
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.v2-theme-card__legend > span {
    text-align: right;
}

.v2-theme-card__legend > span:first-child {
    text-align: left;
}

.v2-theme-card__legend > span:last-child {
    text-align: center;
}

.v2-theme-card__stocks {
    display: grid;
    gap: 8px;
}

.v2-theme-card:not([data-stocks-expanded="1"]) .v2-theme-card__stocks > .v2-stock-row:nth-child(n+6) {
    display: none;
}

.v2-theme-card__stocks-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
    padding: 8px 12px;
    border: 1px solid rgba(191, 219, 254, 0.32);
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.16);
    color: #dbeafe;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.v2-theme-card__stocks-toggle:hover {
    background: rgba(148, 163, 184, 0.24);
    border-color: rgba(191, 219, 254, 0.45);
    color: #f8fafc;
}

.v2-theme-card__stocks-toggle:active {
    transform: scale(0.99);
}

html[data-theme="light"] .v2-theme-card__stocks-toggle {
    background: rgba(51, 65, 85, 0.07);
    border-color: rgba(51, 65, 85, 0.18);
    color: #334155;
}

html[data-theme="light"] .v2-theme-card__stocks-toggle:hover {
    background: rgba(51, 65, 85, 0.1);
    border-color: rgba(51, 65, 85, 0.28);
    color: #0f172a;
}

.v2-theme-card__stocks-toggle-icon {
    font-size: 0.72rem;
    line-height: 1;
}

.v2-stock-row {
    padding: 9px 12px;
    border-radius: 16px;
    background: rgba(148, 163, 184, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.08);
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
    cursor: pointer;
}

.v2-stock-row[data-quote-sign="1"] {
    background: rgba(229, 57, 53, 0.16);
    border-color: rgba(239, 83, 80, 0.28);
    box-shadow: inset 0 0 0 1px rgba(239, 83, 80, 0.06);
}

html[data-theme="light"] .v2-stock-row[data-quote-sign="1"] {
    background: rgba(254, 202, 202, 0.72);
    border-color: rgba(211, 47, 47, 0.24);
    box-shadow: inset 0 0 0 1px rgba(211, 47, 47, 0.05);
}

.v2-stock-row--positive .v2-stock-row__rate,
.v2-stock-row--positive .v2-stock-row__price,
.v2-stock-row--positive .v2-stock-row__sign {
    color: #e53935;
}

.v2-stock-row--negative .v2-stock-row__rate,
.v2-stock-row--negative .v2-stock-row__price,
.v2-stock-row--negative .v2-stock-row__sign {
    color: #1f4ed8;
}

.v2-stock-row__sign {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.v2-stock-row__sign--positive {
    color: #e53935;
}

.v2-stock-row__sign--negative {
    color: #1f4ed8;
}

.v2-stock-row__sign--neutral {
    color: var(--text-muted);
}

.v2-stock-row__sign--limit-up,
.v2-stock-row__sign--limit-down {
    font-family: "Segoe UI", "Arial Black", "Helvetica Neue", Arial, sans-serif;
    font-weight: 900;
    font-size: 1.05em;
    letter-spacing: -0.02em;
    -webkit-text-stroke: 0.7px currentColor;
    paint-order: stroke fill;
}

.v2-theme-card__legend-sign {
    min-width: 0;
}

.v2-stock-row__name {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.v2-stock-row__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    max-width: 100%;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.06;
}

.v2-stock-row__name-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.v2-stock-row__link--has-nxt .v2-stock-row__name-text {
    padding-left: 0;
}

.v2-stock-row__meta {
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    flex-wrap: wrap;
    line-height: 1;
}

.v2-stock-row__meta--has-nxt {
    padding-left: 0;
}

.v2-stock-row__nxt {
    position: static;
    left: auto;
    top: auto;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 6px 0 0;
    border-color: #e74c3c transparent transparent transparent;
    pointer-events: none;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0.08em;
}

.v2-stock-row__code {
    color: var(--text-soft);
    font-size: 0.64rem;
    font-weight: 600;
    line-height: 1;
}

.v2-stock-row__price,
.v2-stock-row__rate,
.v2-stock-row__trading,
.v2-stock-row__mcap {
    font-size: 0.84rem;
    font-weight: 700;
    text-align: right;
}

.v2-stock-row__trading,
.v2-stock-row__mcap {
    color: var(--text-muted);
}

.v2-stock-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.v2-stock-badge--leader {
    background: rgba(250, 204, 21, 0.14);
    color: #fde68a;
}

.v2-stock-badge--pin {
    background: rgba(56, 189, 248, 0.14);
    color: #bae6fd;
}

.v2-stock-badge--nxt {
    width: 0;
    height: 0;
    padding: 0;
    min-width: 0;
    border-radius: 0;
    background: transparent;
    border-style: solid;
    border-width: 6px 6px 0 0;
    border-color: #e74c3c transparent transparent transparent;
    display: inline-block;
    align-self: center;
}

.v2-stock-badge--vi {
    background: rgba(244, 63, 94, 0.14);
    color: #fecdd3;
}

.v2-stock-row__bar {
    display: flex;
    justify-content: flex-end;
    margin-top: -1px;
}

.v2-stock-bar {
    position: relative;
    width: 100%;
    max-width: 148px;
    height: 20px;
}

.v2-stock-bar__track,
.v2-stock-bar__range,
.v2-stock-bar__wick,
.v2-stock-bar__fill,
.v2-stock-bar__center,
.v2-stock-bar__marker {
    position: absolute;
}

.v2-stock-bar__track {
    top: 9px;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
}

.v2-stock-bar__wick {
    top: 8px;
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.34);
}

.v2-stock-bar__range {
    top: 50%;
    transform: translateY(-50%);
    height: 2px;
    border-radius: 2px;
    opacity: 0.95;
    z-index: 1;
}

.v2-stock-bar__range--left {
    background: #193bff;
}

.v2-stock-bar__range--right {
    background: #f3080c;
}

.v2-stock-bar__fill {
    top: 5px;
    height: 10px;
    border-radius: 0;
    z-index: 2;
}

.v2-stock-bar__fill--positive,
.v2-stock-bar__marker--positive {
    background: var(--positive);
}

.v2-stock-bar__fill--negative,
.v2-stock-bar__marker--negative {
    background: var(--negative);
}

.v2-stock-bar__fill--neutral,
.v2-stock-bar__marker--neutral {
    background: var(--neutral);
}

.v2-stock-bar__fill--limit-up {
    border-radius: 0 999px 999px 0;
    background: var(--positive);
}

.v2-stock-bar__fill--limit-down {
    border-radius: 999px 0 0 999px;
    background: var(--negative);
}

.v2-stock-bar__center {
    left: calc(50% - 1px);
    top: 4px;
    width: 2px;
    height: 12px;
    background: rgba(148, 163, 184, 0.6);
    z-index: 3;
}

.v2-stock-bar__marker {
    display: none;
}

.v2-stock-bar__marker--open {
    background: #e2e8f0;
}

.v2-side-rail {
    display: grid;
    gap: 18px;
}

.v2-panel--news-tabs {
    display: grid;
    gap: 14px;
}

.v2-news-tablist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.v2-news-tab {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.06);
    color: var(--text-muted);
    min-height: 48px;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 800;
    font-size: 0.96rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.v2-news-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(91, 124, 255, 0.24);
}

.v2-news-tab.is-active {
    color: #eff6ff;
    border-color: rgba(56, 189, 248, 0.34);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.9), rgba(37, 99, 235, 0.82));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.v2-news-tab i {
    font-size: 0.84rem;
    flex: 0 0 auto;
}

.v2-news-tab span {
    min-width: 0;
    white-space: nowrap;
}

.v2-news-pane[hidden] {
    display: none !important;
}

.v2-news-pane {
    min-height: 0;
}

.v2-news-pane.is-active {
    display: grid;
    gap: 0;
}

.v2-news-pane--feature,
.v2-news-pane--economy {
    height: 940px;
}

.v2-news-pane--feature {
    grid-template-rows: auto auto minmax(0, 1fr);
}

.v2-news-pane--economy {
    grid-template-rows: auto minmax(0, 1fr);
}

.v2-feature-spotlight {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(52, 83, 255, 0.22), rgba(59, 130, 246, 0.08));
    border: 1px solid rgba(91, 124, 255, 0.24);
    margin-bottom: 14px;
}

.v2-feature-spotlight__badge {
    display: inline-flex;
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.v2-feature-spotlight__title {
    line-height: 1.45;
    font-size: 0.98rem;
}

.v2-feature-spotlight__meta {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.82rem;
}

.v2-news-stack {
    display: grid;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    align-content: start;
}

.v2-news-stack::-webkit-scrollbar {
    width: 8px;
}

.v2-news-stack::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 999px;
}

.v2-news-stack::-webkit-scrollbar-track {
    background: transparent;
}

.v2-news-item {
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.08);
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.v2-news-item:hover {
    transform: translateY(-1px);
    border-color: rgba(91, 124, 255, 0.22);
}

.v2-news-item strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
    line-height: 1.28;
}

.v2-news-item span {
    color: var(--text-soft);
    font-size: 0.76rem;
    line-height: 1.05;
}

.v2-news-empty,
.v2-empty-state {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-soft);
}

.v2-wheel-dock {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 64px;
    height: 64px;
    z-index: 40;
    touch-action: none;
    display: none;
}

.v2-wheel-items {
    position: absolute;
    inset: 0;
    touch-action: none;
    user-select: none;
}

.v2-wheel-item {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    margin-left: -28px;
    margin-top: -28px;
    border-radius: 50%;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #e8f0ff;
    background: linear-gradient(
        145deg,
        rgba(37, 72, 132, 0.94) 0%,
        rgba(24, 48, 92, 0.9) 100%
    );
    border: 1px solid rgba(147, 197, 253, 0.42);
    box-shadow:
        0 10px 22px rgba(2, 8, 23, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transform: translate(0, 0) scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.v2-wheel-item--main {
    appearance: none;
    -webkit-appearance: none;
    color: #dbeafe;
    background: linear-gradient(
        145deg,
        rgba(45, 88, 156, 0.96) 0%,
        rgba(30, 64, 128, 0.92) 100%
    );
    border-color: rgba(147, 197, 253, 0.48);
    box-shadow:
        0 10px 22px rgba(2, 8, 23, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.v2-wheel-item.is-active {
    color: #fff;
    border-color: rgba(252, 165, 165, 0.72);
    background: linear-gradient(
        135deg,
        rgba(248, 113, 113, 0.92),
        rgba(220, 38, 38, 0.84)
    );
    box-shadow:
        0 16px 30px rgba(185, 28, 28, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.v2-wheel-item--main.is-active {
    background: linear-gradient(
        135deg,
        rgba(252, 129, 129, 0.96),
        rgba(239, 68, 68, 0.88)
    );
    border-color: rgba(254, 202, 202, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 18px 32px rgba(185, 28, 28, 0.42);
}

.v2-wheel-item--theme {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    padding: 0;
    cursor: pointer;
    color: #e9d5ff;
    background: linear-gradient(
        135deg,
        rgba(109, 76, 190, 0.94),
        rgba(67, 56, 150, 0.9)
    );
    border-color: rgba(196, 181, 253, 0.48);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 12px 24px rgba(67, 56, 150, 0.36);
}

html[data-theme="dark"] .v2-wheel-item--theme {
    color: #f3e8ff;
}

html[data-theme="light"] .v2-nav-item.active {
    color: rgba(30, 64, 175, 0.9);
    border-color: rgba(59, 130, 246, 0.24);
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(219, 234, 254, 0.82) 52%,
        rgba(147, 197, 253, 0.58) 100%
    );
    box-shadow:
        0 4px 14px rgba(59, 130, 246, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] .v2-wheel-item {
    color: rgba(81, 98, 127, 0.84);
    background: rgba(255, 255, 255, 0.62);
    border-color: rgba(71, 85, 105, 0.3);
    box-shadow: 0 10px 20px rgba(28, 56, 104, 0.1);
}

html[data-theme="light"] .v2-wheel-item--main {
    color: #1d4ed8;
    background: rgba(255, 255, 255, 0.62);
    border-color: rgba(71, 85, 105, 0.3);
    box-shadow: 0 10px 20px rgba(28, 56, 104, 0.1);
}

html[data-theme="light"] .v2-wheel-item.is-active {
    color: #7f1d1d;
    border-color: rgba(239, 68, 68, 0.34);
    background: linear-gradient(
        135deg,
        rgba(254, 202, 202, 0.78),
        rgba(252, 165, 165, 0.56)
    );
    box-shadow: 0 14px 26px rgba(239, 68, 68, 0.18);
}

html[data-theme="light"] .v2-wheel-item--main.is-active {
    background: linear-gradient(
        135deg,
        rgba(252, 165, 165, 0.78),
        rgba(248, 113, 113, 0.56)
    );
    border-color: rgba(239, 68, 68, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 16px 28px rgba(239, 68, 68, 0.2);
}

html[data-theme="light"] .v2-wheel-item--theme {
    color: var(--text);
    background: linear-gradient(
        135deg,
        rgba(235, 229, 255, 0.96),
        rgba(214, 202, 255, 0.9)
    );
    border-color: rgba(139, 92, 246, 0.24);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.14);
}

.v2-wheel-item i {
    font-size: 1.1rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
}

.v2-wheel-item span {
    font-size: 0.6rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.v2-wheel-item--main span {
    color: #fde68a;
}

html[data-theme="light"] .v2-wheel-item--main span {
    color: inherit;
}


.v2-wheel-dock.is-open .v2-wheel-item {
    opacity: 1;
    pointer-events: auto;
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(1);
}

.v2-wheel-dock.is-open .v2-wheel-item:hover {
    box-shadow:
        0 18px 28px rgba(15, 23, 42, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    border-color: rgba(191, 219, 254, 0.62);
}

/* ===== V2 시장 대시보드 (공통) ===== */
.v2-page-top-band {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.v2-page-top-band .v2-ticker-band {
    border-bottom: 0;
}

.v2-page-top-band .v2-market-dashboard {
    padding-top: 0;
    border-top: 0;
}

.v2-market-dashboard {
    background: rgba(8, 18, 34, 0.72);
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--line);
}

html[data-theme="light"] .v2-market-dashboard {
    background: rgba(255, 255, 255, 0.88);
}

.v2-market-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    max-width: none;
    margin: 0;
}

.v2-md-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px 10px;
    min-width: 0;
}

.v2-md-card-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
}

.v2-md-card-head--temp {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 4px;
}

.v2-md-card-title {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.3;
    font-weight: 500;
    min-width: 0;
}

.v2-md-temp-counts {
    font-size: 0.62rem;
    color: var(--text-soft);
    white-space: nowrap;
    flex-shrink: 0;
    text-align: right;
}

.v2-md-temp-bar {
    display: flex;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.12);
}

.v2-md-temp-bar-up {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    flex-shrink: 0;
}

.v2-md-temp-bar-down {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    flex-shrink: 0;
}

.v2-md-flow-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
    background: rgba(148, 163, 184, 0.1);
}

.v2-md-flow-seg--ind {
    background: #f1c40f;
}

.v2-md-flow-seg--frgn {
    background: #2ecc71;
}

.v2-md-flow-seg--orgn {
    background: #3498db;
}

.v2-md-flow-labels {
    display: flex;
    justify-content: space-between;
    gap: 3px;
    font-size: calc(0.58rem + 1pt);
    color: var(--text-muted);
    margin-top: -1px;
}

.v2-md-flow-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    flex: 1;
    white-space: nowrap;
}

.v2-md-flow-item em {
    font-style: normal;
    opacity: 0.85;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.92em;
}

.v2-md-flow-item strong {
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    font-size: 0.95em;
}

.v2-md-flow-item--ind strong { color: #f1c40f; }
.v2-md-flow-item--frgn strong { color: #2ecc71; }
.v2-md-flow-item--orgn strong { color: #5dade2; }

html[data-theme="light"] .v2-md-flow-item--ind strong { color: #ca8a04; }
html[data-theme="light"] .v2-md-flow-item--frgn strong { color: #15803d; }
html[data-theme="light"] .v2-md-flow-item--orgn strong { color: #1d4ed8; }

@media (max-width: 380px) {
    .v2-md-card-title {
        font-size: 0.56rem;
    }

    .v2-md-temp-counts {
        font-size: 0.52rem;
    }

    .v2-md-flow-labels {
        font-size: calc(0.48rem + 1pt);
        gap: 1px;
    }

    .v2-md-flow-item {
        gap: 1px;
    }
}

/* ===== V2 하단 고정 네비 (모바일 전용) ===== */
.v2-bottom-nav {
    display: none;
}

@media (max-width: 720px) {
    .v2-bottom-nav {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1001;
        background: linear-gradient(180deg, rgba(13, 50, 104, 0.96) 0%, rgba(9, 42, 89, 0.98) 100%);
        border-top: 1px solid var(--line);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
        padding: 0 8px env(safe-area-inset-bottom, 0);
        height: 64px;
        box-sizing: content-box;
    }

    body.main-v2-page.v2-has-bottom-nav {
        padding-bottom: 72px;
    }

    body.main-v2-page.v2-has-bottom-nav .v2-main-shell {
        margin-bottom: 18px;
    }

    body.v2-has-bottom-nav .themedetail-v2-page .v2-main-shell,
    body.v2-has-bottom-nav .navernews-v2-page .v2-main-shell,
    body.v2-has-bottom-nav .realtime2-v2-page .v2-main-shell,
    body.v2-has-bottom-nav .market-calendar-detail-v2-page .v2-main-shell,
    body.v2-has-bottom-nav .market-calendar-v2-page .v2-main-shell,
    body.v2-has-bottom-nav .stock-calendar-v2-page .v2-main-shell,
    body.v2-has-bottom-nav .price-upper-v2-page .v2-main-shell {
        margin-bottom: 88px;
    }
}

@media (min-width: 721px) {
    .themedetail-v2-page .v2-main-shell,
    .navernews-v2-page .v2-main-shell,
    .realtime2-v2-page .v2-main-shell,
    .market-calendar-detail-v2-page .v2-main-shell,
    .market-calendar-v2-page .v2-main-shell,
    .stock-calendar-v2-page .v2-main-shell,
    .price-upper-v2-page .v2-main-shell {
        margin-bottom: 72px;
    }
}

html[data-theme="light"] .v2-bottom-nav {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 249, 0.98) 100%);
    box-shadow: 0 -4px 20px rgba(28, 56, 104, 0.1);
}

.v2-bottom-nav-inner {
    max-width: 520px;
    margin: 0 auto;
    height: 64px;
    display: grid;
    grid-template-columns: 1fr 1fr auto 1fr 1fr;
    align-items: flex-end;
    padding-bottom: 6px;
    position: relative;
}

.v2-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.68rem;
    font-weight: 500;
    padding: 4px 2px;
    border: none;
    background: none;
    cursor: pointer;
    min-width: 0;
}

html[data-theme="light"] .v2-bottom-nav-item {
    color: var(--text-muted);
}

.v2-bottom-nav-item i {
    font-size: 1.05rem;
}

.v2-bottom-nav-item.is-active {
    color: #fff;
    font-weight: 700;
}

html[data-theme="light"] .v2-bottom-nav-item.is-active {
    color: var(--accent);
}

.v2-bottom-nav-item.is-disabled {
    cursor: default;
    opacity: 0.65;
}

.v2-bottom-nav-fab-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: -18px;
    z-index: 2;
}

.v2-bottom-nav-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.55);
    padding: 0;
    position: relative;
    z-index: 3;
}

html[data-theme="light"] .v2-bottom-nav-fab {
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.28);
}

.v2-bottom-nav-fab:active {
    transform: scale(0.96);
}

.v2-bottom-nav-fab.is-open {
    background: linear-gradient(145deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 18px rgba(29, 78, 216, 0.6);
}

.v2-bottom-nav-item.is-disabled i {
    opacity: 0.85;
}

/* 하단 네비 + 휠 도크/FAB 연동 */
body.v2-has-bottom-nav .v2-wheel-dock,
body.v2-has-bottom-nav .v2-wheel-dock.v2-wheel-dock--bottom-nav {
    display: block;
    width: 52px;
    height: 52px;
    z-index: 1002;
    transform: none;
    pointer-events: none;
}

body.v2-has-bottom-nav .v2-wheel-dock.is-open .v2-wheel-item {
    pointer-events: auto;
}

@keyframes v2-ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 1380px) {
    .v2-content-grid {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

@media (max-width: 1180px) {
    .v2-content-grid {
        grid-template-columns: 1fr;
    }

    .v2-side-rail {
        grid-template-columns: minmax(0, 1fr);
    }

    .v2-command-strip__bottom {
        grid-template-columns: 1fr;
    }

    .v2-live-strip {
        justify-content: flex-start;
    }
}

@media (max-width: 920px) {
    .v2-top-nav__shell {
        grid-template-columns: 1fr auto;
    }

    .v2-top-nav__menu-wrap,
    .v2-top-nav__clock {
        display: none;
    }

    .v2-brand-logo {
        width: 108px;
    }

    .v2-market-grid__top,
    .v2-market-sentiment-pair,
    .v2-side-rail {
        grid-template-columns: 1fr;
    }

    .v2-news-pane--feature,
    .v2-news-pane--economy {
        height: 700px;
    }

    .v2-news-tablist {
        gap: 8px;
    }

    .v2-news-tab {
        min-height: 44px;
        padding: 9px 10px;
        gap: 6px;
        font-size: 0.84rem;
    }

    .v2-news-tab i {
        font-size: 0.82rem;
    }

    .v2-sentiment-block + .v2-sentiment-block {
        border-left: 0;
        border-top: 1px solid rgba(148, 163, 184, 0.12);
        padding-left: 0;
        padding-top: 10px;
    }

    .v2-theme-card__legend {
        display: none;
    }

    .v2-stock-row {
        position: relative;
        grid-template-columns:
            minmax(0, 1fr)
            9.5ch
            1.25em
            7.5ch
            7.5ch
            minmax(72px, 156px);
        grid-template-areas:
            "name name name name name bar"
            ". price sign rate trading mcap";
        align-items: center;
        column-gap: 6px;
        row-gap: 6px;
        justify-items: stretch;
        overflow: visible;
    }

    .v2-stock-row__name { grid-area: name; }
    .v2-stock-row__price { grid-area: price; }
    .v2-stock-row__sign { grid-area: sign; }
    .v2-stock-row__rate { grid-area: rate; }
    .v2-stock-row__trading { grid-area: trading; }
    .v2-stock-row__mcap { grid-area: mcap; }
    .v2-stock-row__bar {
        grid-area: bar;
        justify-content: stretch;
        padding-top: 0;
        position: relative;
        z-index: 0;
    }

    .v2-stock-bar {
        max-width: none;
    }

    .v2-stock-row__name {
        align-self: center;
        z-index: 1;
        overflow: visible;
        padding-right: 8px;
        min-width: 0;
        max-width: none;
    }

    .v2-stock-row__link {
        font-size: 0.9rem;
        line-height: 1.03;
        max-width: none;
        width: max-content;
    }

    .v2-stock-row__name-text {
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
    }

    .v2-stock-row__meta {
        margin-top: 1px;
        gap: 3px;
    }

    .v2-stock-row__code {
        display: none;
    }

    .v2-stock-row__price,
    .v2-stock-row__sign,
    .v2-stock-row__rate,
    .v2-stock-row__trading,
    .v2-stock-row__mcap {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        overflow: hidden;
        text-overflow: clip;
        font-size: 0.78rem;
        line-height: 1;
        white-space: nowrap;
        text-align: right;
        font-variant-numeric: tabular-nums;
        font-feature-settings: "tnum" 1;
        position: relative;
        padding-left: 0;
    }

    .v2-stock-row__sign {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 0.82rem;
        padding-left: 0;
    }

    .v2-stock-row__rate,
    .v2-stock-row__trading,
    .v2-stock-row__mcap {
        padding-left: 6px;
    }

    .v2-stock-row__rate::before,
    .v2-stock-row__trading::before,
    .v2-stock-row__mcap::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        width: 1px;
        height: 0.95em;
        background: rgba(148, 163, 184, 0.22);
        transform: translateY(-50%);
    }
}

@media (max-width: 720px) {
    .v2-top-nav {
        display: none;
    }

    .v2-top-nav__brand {
        display: none;
    }

    .v2-top-nav__shell {
        width: calc(100% - 20px);
        min-height: 60px;
        justify-content: flex-end;
    }

    .v2-main-shell {
        width: calc(100% - 12px);
        margin-top: 0;
        gap: 10px;
    }

    .v2-command-strip,
    .v2-panel,
    .v2-market-card {
        padding: 12px;
        border-radius: 22px;
    }

    .v2-panel--themes {
        padding: 8px 6px;
        border-radius: 16px;
    }

    .v2-command-strip {
        padding: 10px 12px;
    }

    .v2-ticker-band {
        padding: 7px 0 2px;
    }

    .v2-page-top-band .v2-ticker-band {
        padding-bottom: 0;
    }

    .v2-page-top-band .v2-market-dashboard {
        padding-top: 0;
    }

    .v2-main-shell > .v2-page-top-band {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }

    .v2-main-shell > .v2-ticker-band {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .v2-page-top-band .v2-ticker-band,
    .v2-page-top-band .v2-market-dashboard {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .v2-main-shell > .v2-market-dashboard {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        border-radius: 0;
        padding: 5px 3px 6px;
    }

    .v2-market-dashboard-grid {
        gap: 4px;
        max-width: none;
    }

    .v2-md-card {
        padding: 5px 4px 6px;
        border-radius: 6px;
    }

    .v2-md-card-title {
        font-size: 0.56rem;
        line-height: 1.2;
    }

    .v2-md-temp-counts {
        font-size: 0.52rem;
    }

    .v2-md-flow-labels {
        font-size: calc(0.5rem + 1pt);
        gap: 1px;
    }

    .v2-md-flow-item {
        gap: 1px;
    }

    .v2-md-flow-item em {
        font-size: 0.88em;
    }

    .v2-md-flow-item strong {
        font-size: 0.9em;
    }

    .v2-md-flow-bar {
        height: 6px;
        margin-bottom: 3px;
    }

    .v2-ticker-band--mobile-only {
        display: block;
    }

    .v2-ticker-marquee {
        min-width: 100%;
    }

    .v2-ticker-marquee__group {
        gap: 1.5rem;
        padding-left: 14px;
        padding-right: 14px;
    }

    .v2-ticker-item {
        gap: 0.45rem;
        font-size: 0.72rem;
    }

    .v2-ticker-item__name,
    .v2-ticker-item__price,
    .v2-ticker-item__rate,
    .v2-ticker-item__theme {
        font-size: 0.72rem;
    }

    .v2-market-card {
        padding: 10px 12px;
        border-radius: 16px;
        gap: 6px;
    }

    .v2-stock-row {
        position: relative;
        grid-template-columns:
            minmax(0, 1fr)
            9.5ch
            1.2em
            7.2ch
            7.2ch
            minmax(64px, 140px);
        grid-template-areas:
            "name name name name name bar"
            ". price sign rate trading mcap";
        padding: 2px 6px 3px;
        column-gap: 4px;
        row-gap: 0;
        align-items: center;
        overflow: visible;
    }

    .v2-stock-row__link {
        font-size: 0.84rem;
        line-height: 1.02;
        max-width: none;
        width: max-content;
    }

    .v2-stock-row__name {
        align-self: center;
        transform: none;
        z-index: 1;
        overflow: visible;
        padding-right: 6px;
    }

    .v2-stock-row__name-text {
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
    }

    .v2-stock-row__code {
        display: none;
    }

    .v2-stock-row__meta--has-nxt {
        padding-left: 0;
    }

    .v2-stock-row__price,
    .v2-stock-row__sign,
    .v2-stock-row__rate,
    .v2-stock-row__trading,
    .v2-stock-row__mcap {
        font-size: 0.72rem;
        line-height: 1;
        padding-left: 0;
        align-self: start;
    }

    .v2-stock-row__sign {
        font-size: 0.78rem;
    }

    .v2-stock-row__rate,
    .v2-stock-row__trading,
    .v2-stock-row__mcap {
        padding-left: 5px;
    }

    .v2-stock-row__rate::before,
    .v2-stock-row__trading::before,
    .v2-stock-row__mcap::before {
        height: 0.9em;
    }

    .v2-stock-row__bar {
        justify-content: flex-end;
        align-self: center;
        padding-top: 0;
        margin-top: 0;
        position: absolute;
        top: 0;
        right: 6px;
        width: 140px;
        max-width: calc(40% - 8px);
        z-index: 0;
    }

    .v2-stock-bar {
        width: 100%;
        max-width: none;
        height: 16px;
    }

    .v2-stock-bar__track {
        top: 7px;
    }

    .v2-stock-bar__fill {
        top: 4px;
        height: 8px;
    }

    .v2-stock-bar__center {
        top: 3px;
        height: 10px;
    }

    .v2-wheel-item {
        width: 54px;
        height: 54px;
        margin-left: -27px;
        margin-top: -27px;
    }

    body.v2-has-bottom-nav .v2-wheel-dock,
    body.v2-has-bottom-nav .v2-wheel-dock.v2-wheel-dock--bottom-nav {
        width: 52px;
        height: 52px;
        transform: none;
    }

    .v2-wheel-item span {
        font-size: 0.58rem;
    }

    .v2-market-card__head--inline,
    .v2-sentiment-block__head {
        gap: 6px;
    }

    .v2-market-card__title {
        font-size: 0.72rem;
    }

    .v2-market-card__summary,
    .v2-sentiment-block__summary {
        font-size: 0.67rem;
    }

    .v2-breath-bar,
    .v2-sentiment-bar {
        height: 6px;
    }

    .v2-sentiment-legend--compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .v2-sentiment-legend span {
        gap: 4px;
    }

    .v2-sentiment-legend em {
        font-size: 0.58rem;
    }

    .v2-sentiment-legend strong {
        font-size: 0.68rem;
    }

    .v2-command-strip__top {
        gap: 8px;
    }

    .v2-market-phase-badge {
        width: max-content;
        max-width: 46%;
        justify-content: flex-start;
        text-align: left;
        padding: 8px 10px;
        overflow: visible;
    }

    .v2-market-phase-badge__dot {
        flex: 0 0 8px;
        width: 8px;
        height: 8px;
        min-width: 8px;
        min-height: 8px;
    }

    .v2-market-phase-badge.market-krx .v2-market-phase-badge__dot,
    .v2-market-phase-badge.market-nxt .v2-market-phase-badge__dot {
        -webkit-animation: v2-market-dot-blink 1.2s ease-in-out infinite;
        animation: v2-market-dot-blink 1.2s ease-in-out infinite;
    }

    .v2-market-phase-badge__title {
        flex: 1 1 auto;
        font-size: 0.76rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .v2-market-phase-badge small {
        flex: 0 1 auto;
        font-size: 0.64rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .v2-search-box {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: none;
    }

    .v2-search-box__input {
        padding: 8px 12px;
        font-size: 0.84rem;
    }

    .v2-search-box__button {
        width: 34px;
        height: 34px;
    }

    .v2-summary-pill {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
    }

    .v2-theme-card {
        padding: 8px 6px;
        border-radius: 12px;
    }

    .v2-theme-grid {
        gap: 8px;
    }

    .v2-section-head--theme {
        margin-bottom: 6px;
    }

    .v2-theme-card__header {
        margin-bottom: 4px;
    }

    .v2-theme-issue {
        gap: 6px;
        padding: 5px 6px;
        border-radius: 8px;
        margin-bottom: 6px;
    }

    .v2-theme-issue__label {
        padding: 3px 6px;
        font-size: 0.62rem;
    }

    .v2-theme-issue__text {
        font-size: 0.84rem;
        line-height: 1.02;
    }

    .v2-theme-card__stocks {
        gap: 4px;
    }

    .v2-stock-row {
        padding: 2px 6px 3px;
        border-radius: 10px;
    }

    .v2-section-head--theme .v2-section-head__title-row {
        gap: 4px;
        flex-wrap: wrap;
    }

    .v2-section-head--theme .v2-section-head__eyebrow {
        font-size: 0.62rem;
    }

    .v2-theme-card__eyebrow {
        gap: 6px;
    }

    .v2-theme-card__headline {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .v2-theme-card__title {
        font-size: 0.98rem;
        padding: 4px 8px 4px 10px;
        gap: 5px;
    }

    .v2-theme-card__title-icon {
        font-size: 0.66rem;
    }

    .v2-card-metric {
        min-height: 34px;
        padding: 3px 3px 3px 6px;
        gap: 4px;
        border-radius: 12px;
    }

    .v2-card-metric__toggle {
        min-height: 28px;
        padding: 3px 6px;
        gap: 4px;
        border-radius: 10px;
        font-size: 0.64rem;
    }

    .v2-card-metric__toggle i {
        font-size: 0.64rem;
    }

    .v2-card-metric__value {
        min-width: 46px;
        font-size: 0.86rem;
        padding-right: 4px;
    }

    .v2-theme-card__leader {
        padding: 4px 7px;
        font-size: 0.64rem;
    }

    .v2-sentiment-legend:not(.v2-sentiment-legend--compact) {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .v2-stock-row {
        grid-template-columns:
            minmax(0, 0.1fr)
            minmax(0, 1.6fr)
            minmax(0, 0.35fr)
            minmax(0, 1.15fr)
            minmax(0, 1.15fr)
            minmax(0, 1.45fr);
        grid-template-areas:
            "name name name name name name"
            ". price sign rate trading mcap";
    }

    .v2-stock-row__name {
        width: 60%;
        max-width: 60%;
        padding-right: 6px;
        overflow: hidden;
    }

    .v2-stock-row__link {
        display: flex;
        width: 100%;
        max-width: 100%;
    }

    .v2-stock-row__name-text {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .v2-stock-row__bar {
        position: absolute;
        top: 0;
        right: 6px;
        width: calc(40% - 8px);
        max-width: calc(40% - 8px);
    }

    .v2-stock-bar {
        width: 100%;
        max-width: none;
    }
}
