@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    --bg-base: #080a10;
    --bg-elevated: #0e1320;
    --bg-surface: rgba(16, 22, 35, 0.88);
    --bg-card: rgba(18, 25, 42, 0.72);
    --bg-card-hover: rgba(24, 32, 52, 0.94);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.04);
    --accent-blue: #4f8cff;
    --accent-cyan: #22d3ee;
    --accent-violet: #7c6cff;
    --accent-gradient: linear-gradient(135deg, #4f8cff 0%, #7c6cff 100%);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-faint: #64748b;
    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.28);
    --shadow-glow: 0 0 40px rgba(79, 140, 255, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-primary);
    background:
        radial-gradient(circle at 0% 0%, rgba(79, 140, 255, 0.12), transparent 34%),
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.08), transparent 28%),
        radial-gradient(circle at 100% 100%, rgba(124, 108, 255, 0.1), transparent 34%),
        var(--bg-base);
}

h1, h2, h3, .logo-name {
    font-family: 'Outfit', 'Inter', sans-serif;
}

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

button,
input {
    font: inherit;
}

.hidden {
    display: none !important;
}

.spin {
    animation: rotate 1.6s linear infinite;
}

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

.good,
.up {
    color: var(--success) !important;
}

.warn {
    color: var(--warning) !important;
}

.bad,
.down {
    color: var(--danger) !important;
}

.hot {
    color: var(--danger) !important;
}

.cool {
    color: var(--accent-blue) !important;
}

header#header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 32px;
    background: rgba(7, 10, 16, 0.78);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(18px);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mobile-header-auth {
    min-width: 0;
}

.logo-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-gradient);
    box-shadow: 0 10px 30px rgba(79, 140, 255, 0.28);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 1.24rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-sub {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.kakao-auth-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-kakao {
    height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: #fee500;
    color: #191919;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(254, 229, 0, 0.18);
}

.btn-kakao svg {
    width: 18px;
    height: 18px;
}

.kakao-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
}

.kakao-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.14);
}

.kakao-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#kakao-nickname {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
}

#kakao-login-state {
    font-size: 0.72rem;
    color: var(--text-faint);
}

.market-bar {
    max-width: 1440px;
    margin: 0 auto;
    padding: 18px 24px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    align-items: stretch;
}

.market-bar > * {
    min-width: 0;
}

.market-groups {
    display: contents;
}

.market-card-group {
    display: contents;
}

.market-global-group {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.market-domestic-group {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    padding-left: 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.market-pill {
    min-width: 0;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(13, 18, 30, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.market-pill-domestic {
    border-color: rgba(79, 140, 255, 0.16);
    background: linear-gradient(180deg, rgba(79, 140, 255, 0.08), rgba(13, 18, 30, 0.78));
}

.market-pill-cost {
    border-color: rgba(255, 184, 77, 0.14);
    background: linear-gradient(180deg, rgba(255, 184, 77, 0.08), rgba(13, 18, 30, 0.78));
}

.market-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.market-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.market-label-row .market-label {
    margin-bottom: 0;
}

.help-icon {
    position: relative;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    cursor: help;
    outline: none;
}

.help-icon:focus-visible {
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.2);
}

.market-tooltip,
.vix-tooltip,
.anomaly-tooltip {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 1200;
    width: min(280px, calc(100vw - 32px));
    max-width: 280px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(6, 8, 14, 0.92);
    color: var(--text-primary);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    white-space: normal;
    text-transform: none;
    letter-spacing: normal;
}

.help-icon:hover .market-tooltip,
.help-icon:hover .vix-tooltip,
.help-icon:hover .anomaly-tooltip,
.help-icon:focus-within .market-tooltip,
.help-icon:focus-within .vix-tooltip,
.help-icon:focus-within .anomaly-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.vix-tooltip-title {
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.45;
    color: var(--text-primary);
}

.vix-tooltip-table {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.vix-tooltip-row {
    display: grid;
    grid-template-columns: 56px 1fr 1fr;
    gap: 8px;
    align-items: center;
    font-size: 0.73rem;
    color: var(--text-secondary);
}

.vix-tooltip-row span:last-child {
    text-align: right;
}

.vix-tooltip-insight {
    margin-top: 12px;
    padding: 10px 11px;
    border-radius: 12px;
    background: rgba(79, 140, 255, 0.12);
    color: #dbe8ff;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.5;
}

.market-tooltip-copy {
    margin-top: 10px;
    font-size: 0.74rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.anomaly-tooltip {
    width: min(320px, calc(100vw - 32px));
    max-width: 320px;
    left: 0;
    right: auto;
}

.anomaly-tooltip-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffd7d7;
}

.anomaly-tooltip-list {
    margin: 10px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.anomaly-tooltip-list li::marker {
    color: #ff8f8f;
}

.market-val-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.market-pill strong {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.market-chg {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.market-chg.up {
    color: #1cff8a;
}

.market-chg.down {
    color: #ff6464;
}

.market-chg.cost-up {
    color: #ff7a7a;
}

.market-chg.cost-down {
    color: #72d8ff;
}

.market-note {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.mobile-utility-strip {
    display: none;
}

.mobile-market-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-market-tabs::-webkit-scrollbar {
    display: none;
}

.mobile-market-tab {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 118px;
    padding: 10px 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 14, 24, 0.74);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    flex: 0 0 auto;
}

.mobile-market-label {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.mobile-market-tab strong {
    font-size: 0.98rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.mobile-market-tab .market-chg {
    font-size: 0.72rem;
}

.mobile-auth-strip {
    display: none;
}

.mobile-auth-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(14, 20, 32, 0.82);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
}

.mobile-auth-chip svg {
    width: 15px;
    height: 15px;
}

.mobile-auth-chip img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-auth-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#mobile-kakao-nickname {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.2;
}

#mobile-kakao-login-state {
    font-size: 0.66rem;
    color: var(--text-faint);
    line-height: 1.2;
}

.mobile-auth-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.mobile-content-tabbar {
    display: none;
}

.mobile-content-tab {
    appearance: none;
    border: 0;
    background: transparent;
}

.mobile-tabbar {
    display: none;
}

.mobile-tab-btn {
    appearance: none;
    border: 0;
    background: transparent;
}

#search-hero {
    max-width: 1440px;
    margin: 0 auto;
    padding: 72px 24px 64px;
    text-align: center;
}

#search-hero h1 {
    font-size: clamp(2.8rem, 8vw, 4.9rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-accent {
    background: linear-gradient(135deg, #8fd3ff 0%, #7c6cff 45%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#search-hero p {
    max-width: 760px;
    margin: 18px auto 34px;
    color: var(--text-secondary);
    font-size: 1.08rem;
}

.search-row {
    display: flex;
    gap: 14px;
    max-width: 860px;
    margin: 0 auto;
    padding: 10px;
    border-radius: 28px;
    border: 1px solid var(--glass-border);
    background: rgba(13, 18, 30, 0.82);
    box-shadow: var(--shadow-soft);
}

.search-input-wrap {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-faint);
}

.search-input-wrap input {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 18px;
    background: transparent;
    color: var(--text-primary);
    padding: 0 20px 0 56px;
    outline: none;
    font-size: 1.06rem;
}

.company-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 22px;
    border: 1px solid var(--glass-border);
    background: rgba(10, 15, 24, 0.96);
    box-shadow: var(--shadow-soft);
    z-index: 20;
}

.company-option {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    text-align: left;
}

.company-option:hover,
.company-option.active {
    border-color: rgba(143, 211, 255, 0.28);
    background: rgba(79, 140, 255, 0.14);
}

.company-option-name {
    min-width: 0;
    font-size: 0.96rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company-option-code {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--accent-cyan);
    letter-spacing: 0.08em;
}

.btn-search,
.btn-primary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-search {
    padding: 0 28px;
    border: none;
    border-radius: 18px;
    background: var(--accent-gradient);
    color: white;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(79, 140, 255, 0.25);
}

.btn-search:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}

.btn-primary {
    min-height: 48px;
    padding: 0 18px;
    border: none;
    border-radius: 14px;
    background: var(--accent-gradient);
    color: white;
    font-weight: 800;
}

.btn-outline {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 700;
}

.btn-outline:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.22);
    background: var(--glass-highlight);
}

.search-status {
    margin-top: 20px;
    min-height: 26px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.dashboard {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px 96px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 22px;
}

.card {
    grid-column: span 12;
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    animation: fadeIn 0.45s ease both;
}

.card:hover {
    transform: translateY(-2px);
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.14);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#card-overview,
#card-chart,
#card-technical,
#card-briefing {
    grid-column: span 12;
}

#card-reports {
    grid-column: span 4;
}

#card-financials {
    grid-column: span 8;
}

#card-metrics,
#card-rating {
    grid-column: span 6;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.card-copy {
    flex: 1;
    min-width: 0;
}

.card-header h2 {
    font-size: 1.48rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.anomaly-warning-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid rgba(255, 98, 98, 0.34);
    background: rgba(255, 82, 82, 0.14);
    box-shadow: 0 8px 20px rgba(255, 82, 82, 0.18);
    cursor: help;
    outline: none;
}

.anomaly-warning-icon:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 98, 98, 0.18), 0 10px 28px rgba(255, 82, 82, 0.2);
}

.anomaly-warning-symbol {
    font-size: 0.95rem;
    line-height: 1;
}

.anomaly-warning-icon:hover .anomaly-tooltip,
.anomaly-warning-icon:focus-within .anomaly-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.card-sub {
    margin-top: 4px;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.card-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 16px;
}

.card-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.brand-gradient { background: linear-gradient(135deg, #3b82f6, #7c3aed); }
.chart-gradient { background: linear-gradient(135deg, #0ea5e9, #22c55e); }
.report-gradient { background: linear-gradient(135deg, #f97316, #ef4444); }
.financial-gradient { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.metric-gradient { background: linear-gradient(135deg, #a855f7, #3b82f6); }
.rating-gradient { background: linear-gradient(135deg, #f59e0b, #b45309); }
.tech-gradient { background: linear-gradient(135deg, #2563eb, #06b6d4); }

.source-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.source-badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
}

.stock-strip {
    margin-top: 24px;
    padding-top: 24px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    border-top: 1px solid var(--glass-border);
}

.ss-item {
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.ss-label {
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.ss-val {
    margin-top: 10px;
    font-size: 1.3rem;
    font-weight: 800;
}

.ss-sub {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.segmented-control,
.indicator-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* (chip-wrap 제거됨 — ? 버튼이 indicator-chip 내부로 이동) */

/* signal-card 내부 ? 툴팁 */
.signal-card {
    position: relative;
}

.signal-card-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.signal-card-hint {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-muted);
    font-size: 0.64rem;
    font-weight: 800;
    cursor: default;
    flex-shrink: 0;
}

.signal-card-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    width: 220px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(18, 22, 36, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    font-size: 0.74rem;
    line-height: 1.55;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.signal-card-hint:hover .signal-card-tooltip {
    display: block;
}

/* 오실레이터 차트 상단 여백 */
.tech-osc-shell {
    margin-top: 10px;
}

.chart-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.mobile-chart-zoom {
    display: none;
    align-items: center;
    gap: 8px;
}

.btn-chart-zoom {
    min-height: 36px;
    min-width: 36px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
}

.btn-chart-reset-mobile {
    min-width: auto;
    font-size: 0.78rem;
}

.seg-btn,
.indicator-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
}

.seg-btn.active,
.indicator-chip.active {
    background: rgba(79, 140, 255, 0.16);
    border-color: rgba(79, 140, 255, 0.5);
    color: white;
}

/* ? 힌트 — 이제 칩 버튼 내부에 위치 */
.chip-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.65rem;
    font-weight: 800;
    cursor: default;
    flex-shrink: 0;
    position: relative;
}

.chip-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(12, 16, 28, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.13);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.65;
    text-align: left;
    white-space: normal;
    z-index: 200;
    pointer-events: none;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.6);
}

.chip-hint:hover .chip-tooltip {
    display: block;
}

/* 호버 툴팁 (차트 위에 표시) */
.tech-tooltip {
    display: none;
    position: absolute;
    top: 12px;
    min-width: 210px;
    max-width: 260px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(8, 12, 22, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.75;
    z-index: 50;
    pointer-events: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: left 0.08s, right 0.08s;
}

/* 시그널 뱃지 */
.sig-buy, .sig-sell {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    vertical-align: middle;
    letter-spacing: 0.01em;
    margin-left: 4px;
}
.sig-buy {
    background: rgba(74, 222, 128, 0.18);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.4);
}
.sig-sell {
    background: rgba(248, 113, 113, 0.18);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.4);
}

.btn-chart-reset[disabled] {
    opacity: 0.48;
    cursor: not-allowed;
}

.status-inline {
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
}

.chart-shell,
.indicator-shell {
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--glass-border);
    padding: 18px;
}

.chart-shell canvas,
.indicator-shell canvas {
    display: block;
    width: 100%;
    height: auto;
}

.chart-shell canvas {
    touch-action: none;
    user-select: none;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot,
.legend-line {
    display: inline-block;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-line {
    width: 18px;
    height: 3px;
    border-radius: 999px;
}

.report-list {
    display: grid;
    gap: 18px;
}

.report-section {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 26px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.025);
}

.report-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.report-section-toggle {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.report-section-title {
    font-size: 1rem;
    font-weight: 800;
}

.report-section-copy {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.report-section-body {
    display: grid;
    gap: 12px;
}

.report-year-group {
    display: grid;
    gap: 12px;
}

.report-year-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.report-year-toggle:hover {
    border-color: rgba(143, 211, 255, 0.28);
    background: rgba(79, 140, 255, 0.08);
}

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

.report-year-title {
    font-size: 0.94rem;
    font-weight: 800;
}

.report-year-count {
    font-size: 0.76rem;
    color: var(--accent-cyan);
    font-weight: 800;
}

.report-year-chevron {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.report-year-toggle[aria-expanded="true"] .report-year-chevron {
    transform: rotate(180deg);
}

.report-section-toggle[aria-expanded="true"] .report-year-chevron {
    transform: rotate(180deg);
}

.report-year-panel {
    display: grid;
    gap: 12px;
}

.report-item {
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
}

.report-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.report-title {
    font-size: 0.96rem;
    font-weight: 800;
}

.report-date {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.report-type {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(79, 140, 255, 0.14);
    color: #bfd7ff;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.table-wrap {
    overflow-x: auto;
}

.fin-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.fin-period-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
}

.fin-period-control span {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.fin-period-select {
    max-width: 220px;
}

.fin-period-loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(79, 140, 255, 0.14);
    background: rgba(79, 140, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
}

.fin-spinner {
    width: 14px;
    height: 14px;
    display: inline-block;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top-color: #7dd3fc;
    animation: spin 0.85s linear infinite;
}

.fin-history-section {
    position: relative;
}

.fin-history-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    backdrop-filter: blur(6px);
    background: rgba(2, 6, 23, 0.24);
    border-radius: 18px;
}

.fin-history-overlay-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(79, 140, 255, 0.18);
    background: rgba(10, 16, 28, 0.88);
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.32);
}

.section-title {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--accent-cyan);
    font-weight: 800;
}

.section-title + .table-wrap {
    margin-bottom: 22px;
}

.fin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.fin-table th {
    padding: 0 16px 10px;
    font-size: 0.76rem;
    color: var(--text-faint);
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.fin-table th:first-child {
    text-align: left;
}

.fin-table td {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    text-align: right;
    font-size: 0.84rem;
}

.fin-table td:first-child {
    text-align: left;
    border-radius: 14px 0 0 14px;
    font-weight: 700;
}

.fin-table td:last-child {
    border-radius: 0 14px 14px 0;
}

.fin-val {
    display: block;
}

.fin-chg {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 3px;
    opacity: 0.9;
}

.fin-chg.good {
    color: #4ade80;
}

.fin-chg.bad {
    color: #f87171;
}

.fin-meta {
    display: block;
    margin-top: 3px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.input-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-block-wide {
    grid-column: 1 / -1;
}

.field-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 20px;
}

.input-block span {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.field-warning-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: #ffd978 !important;
    font-size: 0.7rem !important;
    font-weight: 900;
    letter-spacing: 0 !important;
    text-transform: none !important;
    cursor: help;
}

.tech-in {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: rgba(5, 9, 16, 0.5);
    color: var(--text-primary);
    outline: none;
}

.tech-select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.72) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.72) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

.tech-in-readonly {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.22);
    color: #dbe7f5;
    cursor: not-allowed;
}

.valuation-tracks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.valuation-track {
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
}

.valuation-track-readonly {
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.12), rgba(15, 23, 42, 0.38));
}

.valuation-track-head h3 {
    margin: 0;
    font-size: 1rem;
}

.valuation-track-head p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.valuation-grid {
    margin-top: 16px;
}

.valuation-preset-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.metrics-guide {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(79, 140, 255, 0.12);
    background: linear-gradient(180deg, rgba(79, 140, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.sector-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.sector-badge-accent {
    background: rgba(34, 211, 238, 0.12);
    color: #d8fbff;
    border-color: rgba(34, 211, 238, 0.18);
}

.sector-badge-ai {
    color: #dcebff;
    background: linear-gradient(180deg, rgba(79, 140, 255, 0.22), rgba(38, 72, 150, 0.14));
    border-color: rgba(116, 173, 255, 0.42);
    box-shadow: 0 0 0 1px rgba(116, 173, 255, 0.08), 0 10px 24px rgba(59, 130, 246, 0.16);
}

.sector-badge-bio {
    color: #dcfff1;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.2), rgba(5, 97, 72, 0.14));
    border-color: rgba(52, 211, 153, 0.36);
    box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.08), 0 10px 24px rgba(16, 185, 129, 0.14);
}

.sector-badge-growth {
    color: #ffeac7;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.22), rgba(120, 66, 18, 0.14));
    border-color: rgba(251, 191, 36, 0.38);
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.08), 0 10px 24px rgba(245, 158, 11, 0.16);
}

.sector-badge-value {
    color: #f1f6ff;
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.2), rgba(71, 85, 105, 0.16));
    border-color: rgba(148, 163, 184, 0.34);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.07), 0 10px 24px rgba(71, 85, 105, 0.14);
}

.sector-badge-industrial {
    color: #fff0dc;
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.2), rgba(124, 45, 18, 0.14));
    border-color: rgba(251, 146, 60, 0.36);
    box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.08), 0 10px 24px rgba(249, 115, 22, 0.14);
}

.metrics-guide-copy {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.65;
}

.metrics-grid,
.technical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.metric-tile,
.signal-card {
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
}

.metric-result-tile {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.metric-result-primary {
    grid-column: span 2;
    padding: 22px;
    background: linear-gradient(180deg, rgba(79, 140, 255, 0.16), rgba(255, 255, 255, 0.04));
    border-color: rgba(79, 140, 255, 0.18);
    box-shadow: 0 18px 36px rgba(79, 140, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.metric-result-primary .mt-value {
    font-size: 1.72rem;
    line-height: 1.25;
}

.mt-label,
.signal-label {
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.mt-value,
.signal-value {
    margin-top: 10px;
    font-size: 1.28rem;
    font-weight: 800;
}

.mt-hint,
.signal-note {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.rating-overview {
    display: grid;
    gap: 12px;
}

.rating-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
}

.rc-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 1.35rem;
}

.rc-title {
    font-size: 0.9rem;
    font-weight: 800;
}

.rc-sub {
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.rc-stars {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.08);
    letter-spacing: 2px;
}

.rc-stars .on {
    color: var(--warning);
}

.rc-score {
    font-size: 1.2rem;
    font-weight: 900;
}

.rating-details {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.rating-detail {
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.rating-detail summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 800;
}

.rating-detail summary::-webkit-details-marker {
    display: none;
}

.detail-body {
    padding: 0 18px 16px;
    color: var(--text-secondary);
}

.detail-list {
    display: grid;
    gap: 8px;
}

.detail-list li {
    margin-left: 18px;
    color: var(--text-secondary);
}

.verdict-box {
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    color: white;
    font-size: 1rem;
    font-weight: 800;
}

.tech-summary {
    margin-top: 18px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.summary-tile {
    padding: 14px;
    border-radius: 14px;
    background: rgba(5, 9, 16, 0.44);
    text-align: center;
}

.summary-tile strong {
    display: block;
    font-size: 1.08rem;
    font-weight: 800;
}

.summary-tile span {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

#briefing-content {
    position: relative;
    overflow: hidden;
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}

#briefing-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.loading-area {
    padding: 40px 0;
    display: grid;
    place-items: center;
    gap: 14px;
    color: var(--text-muted);
    text-align: center;
}

.loading-area svg {
    width: 32px;
    height: 32px;
}

.briefing-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(79, 140, 255, 0.14);
    color: #cfe2ff;
    font-size: 0.82rem;
    font-weight: 800;
}

.briefing-section {
    margin-top: 20px;
}

.briefing-section h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
    color: var(--accent-cyan);
}

.briefing-body {
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap;
}

.briefing-list {
    display: grid;
    gap: 8px;
    margin-left: 18px;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 1180px) {
    #card-reports,
    #card-financials,
    #card-metrics,
    #card-rating {
        grid-column: span 12;
    }

    .market-bar {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

@media (max-width: 860px) {
    header#header {
        padding: 16px 18px;
        align-items: flex-start;
        flex-direction: column;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .market-bar {
        padding: 14px 18px 0;
        gap: 14px;
    }

    #search-hero {
        padding: 54px 18px 48px;
    }

    .search-row {
        flex-direction: column;
        border-radius: 22px;
    }

    .btn-search {
        height: 52px;
    }

    .company-option {
        grid-template-columns: 1fr;
    }

    .company-option-code {
        letter-spacing: 0.04em;
    }

    .dashboard {
        padding: 0 18px 82px;
    }

    .card {
        padding: 22px;
    }

    .card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .stock-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .input-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .valuation-tracks {
        grid-template-columns: 1fr;
    }

    .fin-toolbar {
        align-items: stretch;
    }

    .fin-period-control,
    .fin-period-select {
        width: 100%;
        max-width: none;
    }

    .fin-period-loading {
        width: 100%;
        justify-content: center;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .btn-outline,
    .header-actions .btn-primary {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .market-bar {
        display: none;
    }

    #header {
        padding: 10px 14px 6px;
        align-items: center;
        flex-direction: row;
    }

    .header-left {
        gap: 10px;
    }

    .logo-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .logo-icon svg {
        width: 20px;
        height: 20px;
    }

    .logo-name {
        font-size: 0.98rem;
    }

    .header-right {
        display: flex;
        width: auto;
        margin-left: auto;
        justify-content: flex-end;
        gap: 6px;
    }

    .mobile-header-auth {
        align-items: center;
        gap: 6px;
    }

    body.mobile-dashboard-active .logo-text {
        display: none;
    }

    body.mobile-dashboard-active #header {
        padding-top: 8px;
        padding-bottom: 4px;
    }

    body.mobile-dashboard-active .header-left {
        gap: 0;
    }

    body.mobile-dashboard-active .logo-icon {
        width: 34px;
        height: 34px;
    }

    .kakao-auth-area {
        display: none;
    }

    .mobile-header-auth .mobile-auth-chip,
    .mobile-header-auth .mobile-auth-logout {
        display: inline-flex;
    }

    .mobile-utility-strip {
        display: grid;
        gap: 6px;
        max-width: 1440px;
        margin: 0 auto;
        padding: 0 14px 2px;
    }

    .mobile-market-tabs {
        gap: 8px;
    }

    .mobile-market-tab {
        min-width: 108px;
        padding: 8px 10px;
        gap: 3px;
        border-radius: 16px;
    }

    .mobile-market-tab strong {
        font-size: 0.9rem;
    }

    .dashboard {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 18px calc(110px + env(safe-area-inset-bottom));
    }

    .dashboard.mobile-home-hidden {
        display: none;
    }

    .dashboard > [data-mobile-panel] {
        grid-column: span 1;
    }

    .dashboard[data-mobile-tab="chart-finance"] [data-mobile-panel]:not([data-mobile-panel="chart-finance"]),
    .dashboard[data-mobile-tab="valuation"] [data-mobile-panel]:not([data-mobile-panel="valuation"]),
    .dashboard[data-mobile-tab="briefing"] [data-mobile-panel]:not([data-mobile-panel="briefing"]) {
        display: none;
    }

    .mobile-content-tabbar {
        position: sticky;
        top: 8px;
        z-index: 8;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 4px 0 2px;
        scrollbar-width: none;
    }

    .mobile-content-tabbar::-webkit-scrollbar {
        display: none;
    }

    .mobile-content-tab {
        flex: 0 0 auto;
        min-height: 36px;
        padding: 0 14px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(14, 20, 32, 0.78);
        color: var(--text-muted);
        font-size: 0.78rem;
        font-weight: 700;
    }

    .mobile-content-tab.active {
        background: linear-gradient(180deg, rgba(79, 140, 255, 0.22), rgba(79, 140, 255, 0.08));
        color: #f7faff;
        border-color: rgba(79, 140, 255, 0.26);
        box-shadow: 0 10px 24px rgba(79, 140, 255, 0.14);
    }

    .dashboard[data-mobile-tab="chart-finance"][data-mobile-content-tab="chart"] [data-mobile-content-panel]:not([data-mobile-content-panel="chart"]),
    .dashboard[data-mobile-tab="chart-finance"][data-mobile-content-tab="finance"] [data-mobile-content-panel]:not([data-mobile-content-panel="finance"]),
    .dashboard[data-mobile-tab="chart-finance"][data-mobile-content-tab="technical"] [data-mobile-content-panel]:not([data-mobile-content-panel="technical"]) {
        display: none;
    }

    .dashboard[data-mobile-tab="valuation"] #card-metrics,
    .dashboard[data-mobile-tab="briefing"] #card-briefing {
        min-height: calc(100vh - 250px);
    }

    .mobile-chart-zoom {
        display: inline-flex;
    }

    .btn-chart-reset {
        display: none;
    }

    .chart-toolbar-actions {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }

    .status-inline {
        width: 100%;
        padding: 8px 12px;
        font-size: 0.72rem;
    }

    .mobile-tabbar {
        position: fixed;
        left: 14px;
        right: 14px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        z-index: 1300;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        padding: 8px;
        border-radius: 24px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(11, 16, 28, 0.82);
        box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(18px);
    }

    .mobile-tab-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 44px;
        padding: 0 8px;
        border-radius: 16px;
        color: var(--text-muted);
        font-size: 0.69rem;
        font-weight: 700;
        transition: background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
    }

    .mobile-tab-btn svg {
        width: 15px;
        height: 15px;
    }

    .mobile-tab-btn.active {
        color: #f7faff;
        background: linear-gradient(180deg, rgba(79, 140, 255, 0.22), rgba(79, 140, 255, 0.1));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(79, 140, 255, 0.16);
    }

    .mobile-auth-chip {
        min-height: 32px;
        padding: 0 9px;
        font-size: 0.72rem;
    }

    .mobile-header-auth .mobile-auth-meta span:last-child {
        display: none;
    }

    .mobile-auth-chip svg {
        width: 13px;
        height: 13px;
    }

    .mobile-auth-chip img {
        width: 20px;
        height: 20px;
    }

    .mobile-auth-logout {
        min-height: 34px;
        padding: 0 10px;
        font-size: 0.72rem;
    }
}

@media (max-width: 560px) {
    .logo-name {
        font-size: 1.05rem;
    }

    .btn-kakao {
        height: 38px;
        gap: 8px;
        padding: 0 14px;
        font-size: 0.82rem;
    }

    .btn-kakao svg {
        width: 16px;
        height: 16px;
    }

    .mobile-market-tab {
        min-width: 104px;
        padding: 8px 10px;
    }

    .kakao-profile {
        width: 100%;
        border-radius: 18px;
    }

    .stock-strip,
    .technical-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .metric-result-primary {
        grid-column: span 1;
    }

    .card {
        padding: 20px 18px;
    }
}
