/* ==============================================================================
   stocks1 White Clean Dashboard Stylesheet
   - 바탕: 순백색(#ffffff) 및 밝고 정갈한 서브컬러(#f8fafc)
   - 쉽고 직관적인 카드형 UI / 모바일 완벽 대응 반응형
   ============================================================================== */

:root {
    --bg-main: #ffffff;
    --bg-sub: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* 주식 상승 / 하락 컬러 (한국: 빨강/파랑, 글로벌: 초록/빨강 범례 지원) */
    --color-up-kr: #dc2626;      /* 한국 상승: 레드 */
    --color-down-kr: #2563eb;    /* 한국 하락: 블루 */
    --color-up-us: #16a34a;      /* 미국 상승: 그린 */
    --color-down-us: #dc2626;    /* 미국 하락: 레드 */
    
    /* 브랜드 포인트 */
    --brand-primary: #0284c7;
    --brand-dark: #0369a1;
    --brand-light: #e0f2fe;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* 상단 탑바 / 헤더 */
.topbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3);
}

.logo-text h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo-text p {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-update {
    background-color: var(--brand-primary);
    color: #ffffff;
    border: none;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-update:hover {
    background-color: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-update:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* BGM 컨트롤러 버튼 & 이퀄라이저 */
.btn-bgm {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-bgm:hover {
    border-color: #0284c7;
    color: #0284c7;
    background-color: #f0f9ff;
}

.btn-bgm.playing {
    border-color: #38bdf8;
    background-color: #e0f2fe;
    color: #0369a1;
}

.bgm-eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    width: 14px;
}

.bgm-eq span {
    width: 2.5px;
    background-color: var(--text-muted);
    border-radius: 1px;
    height: 4px;
    transition: height 0.2s ease;
}

.btn-bgm.playing .bgm-eq span {
    background-color: #0284c7;
}

.bgm-eq.animated span:nth-child(1) { animation: eqBounce 0.8s ease-in-out infinite alternate; }
.bgm-eq.animated span:nth-child(2) { animation: eqBounce 1.1s ease-in-out infinite alternate 0.2s; }
.bgm-eq.animated span:nth-child(3) { animation: eqBounce 0.7s ease-in-out infinite alternate 0.4s; }
.bgm-eq.animated span:nth-child(4) { animation: eqBounce 1.0s ease-in-out infinite alternate 0.1s; }

@keyframes eqBounce {
    0% { height: 3px; }
    100% { height: 14px; }
}

.live-time-badge {
    background-color: var(--bg-sub);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 메인 대시보드 레이아웃 */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* 알림 / 데일리 브리핑 배너 */
.briefing-banner {
    background: linear-gradient(to right, #f8fafc, #f0f9ff);
    border: 1px solid #bae6fd;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.briefing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.briefing-badge {
    background-color: var(--brand-light);
    color: var(--brand-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.briefing-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.briefing-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 0.8rem;
}

.briefing-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.9rem;
}

.briefing-item h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.briefing-item p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 탭 네비게이션 */
.view-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--brand-primary);
    background-color: var(--bg-sub);
}

.tab-btn.active {
    color: #ffffff;
    background-color: var(--text-primary);
}

/* 미국 & 한국 2파트 시장 그리드 */
.market-split-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.part-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.part-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1rem;
}

.part-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.part-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.part-badge.us {
    background-color: #eff6ff;
    color: #1d4ed8;
}

.part-badge.kr {
    background-color: #fef2f2;
    color: #b91c1c;
}

/* 지수 리스트 */
.index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.index-box {
    background-color: var(--bg-sub);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.9rem;
    transition: transform 0.15s, box-shadow 0.15s;
}

.index-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: #cbd5e1;
}

.index-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.index-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.index-change {
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.index-change.up-kr { color: var(--color-up-kr); }
.index-change.down-kr { color: var(--color-down-kr); }
.index-change.up-us { color: var(--color-up-us); }
.index-change.down-us { color: var(--color-down-us); }

.index-technical {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* 미-한 증시 연계 분석 섹션 */
.section-header {
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-header h2 {
    font-size: 1.2rem;
    font-weight: 750;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.linkage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.linkage-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.linkage-card:hover {
    border-color: #38bdf8;
    box-shadow: var(--shadow-md);
}

.linkage-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.theme-tag {
    background-color: #f1f5f9;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
}

.impact-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.impact-badge.high {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.impact-badge.moderate {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.us-source-lead {
    background-color: #fafafa;
    border-left: 3px solid var(--brand-primary);
    padding: 0.6rem 0.8rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 0.8rem;
    font-size: 0.82rem;
}

.us-source-lead span.label {
    color: var(--text-muted);
    font-size: 0.72rem;
    display: block;
    margin-bottom: 0.15rem;
}

.us-source-lead strong {
    color: var(--text-primary);
}

.kr-stocks-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
}

.kr-stocks-table th {
    text-align: left;
    color: var(--text-secondary);
    padding: 0.4rem 0.2rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.72rem;
}

.kr-stocks-table td {
    padding: 0.5rem 0.2rem;
    border-bottom: 1px solid var(--border-light);
}

.stock-signal-tag {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background-color: #ecfdf5;
    color: #059669;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 3px;
}

.expert-comment-box {
    background-color: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.expert-comment-box strong {
    color: var(--text-primary);
    font-size: 0.75rem;
    display: block;
    margin-bottom: 0.2rem;
}

/* 차트 섹션 */
.chart-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.chart-legend-custom {
    display: flex;
    gap: 1rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.chart-wrapper {
    position: relative;
    height: 380px;
    width: 100%;
}

/* 푸터 */
.dashboard-footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-secondary);
    background-color: var(--bg-sub);
}

.dashboard-footer a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
}

/* 반응형 미디어 쿼리 */
@media (max-width: 640px) {
    .dashboard-container {
        padding: 1rem;
    }
    .chart-wrapper {
        height: 280px;
    }
}

/* ==============================================================================
 * 실시간 시세 연동 & 라이브 틱 점멸 애니메이션 (HTS / 트레이딩뷰 스타일)
 * ============================================================================== */

/* 실시간 스트리밍 인디케이터 배지 */
.live-stream-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
    border-radius: 9999px;
    letter-spacing: -0.01em;
}

.live-dot {
    width: 7px;
    height: 7px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* 틱 상승 점멸 (Tick Flash Up - 한국형 붉은색) */
.index-box.tick-up {
    animation: flashUp 0.8s ease-out;
}

@keyframes flashUp {
    0% {
        background-color: rgba(239, 68, 68, 0.25);
        border-color: #ef4444;
        transform: translateY(-2px);
    }
    50% {
        background-color: rgba(239, 68, 68, 0.12);
        border-color: #f87171;
    }
    100% {
        background-color: #ffffff;
        border-color: #e2e8f0;
        transform: translateY(0);
    }
}

/* 틱 하락 점멸 (Tick Flash Down - 한국형 푸른색) */
.index-box.tick-down {
    animation: flashDown 0.8s ease-out;
}

@keyframes flashDown {
    0% {
        background-color: rgba(37, 99, 235, 0.25);
        border-color: #2563eb;
        transform: translateY(-2px);
    }
    50% {
        background-color: rgba(37, 99, 235, 0.12);
        border-color: #60a5fa;
    }
    100% {
        background-color: #ffffff;
        border-color: #e2e8f0;
        transform: translateY(0);
    }
}

/* 숫자 자체 펄스 효과 */
.price-pulse-up {
    color: #dc2626 !important;
    animation: textPulse 0.4s ease-in-out;
}

.price-pulse-down {
    color: #2563eb !important;
    animation: textPulse 0.4s ease-in-out;
}

@keyframes textPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.06); }
    100% { transform: scale(1); }
}

/* 해외선물 전용 뱃지 및 디자인 */
.part-badge.futures {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.futures-tag {
    font-size: 0.68rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    margin-left: 0.3rem;
}

.futures-notice {
    font-size: 0.70rem;
    color: #94a3b8;
    margin-top: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==============================================================================
 * 카카오톡 & 모바일 전용 BGM 플로팅 안내 배너 (Kakao Audio Toast)
 * ============================================================================== */
.kakao-bgm-banner {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    padding: 0.55rem 1.15rem;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.12), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 92vw;
}

.kakao-bgm-banner:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.15);
    border-color: #94a3b8;
}

.kakao-bgm-banner.playing {
    background: rgba(240, 253, 250, 0.96);
    border-color: #2dd4bf;
    box-shadow: 0 8px 20px -3px rgba(13, 148, 136, 0.2);
}

.kakao-bgm-content {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.kakao-bgm-icon {
    font-size: 1.25rem;
    animation: bounceBgmIcon 2s infinite ease-in-out;
}

@keyframes bounceBgmIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px) scale(1.1); }
}

.kakao-bgm-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.kakao-bgm-text strong {
    font-size: 0.82rem;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.2;
}

.kakao-bgm-text small {
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.2;
}

.kakao-bgm-banner.playing .kakao-bgm-text strong {
    color: #0f766e;
}

.kakao-bgm-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    padding: 0 0.2rem;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.kakao-bgm-close:hover {
    color: #0f172a;
}

/* ==============================================================================
   글로벌 상단 메인 내비게이션 탭 (대시보드 ↔ 주간 트렌드 15선 스위처)
   ============================================================================== */
.main-nav-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: center;
}

.main-nav-container {
    max-width: 1400px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 2px;
}

.nav-link-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-secondary);
    background-color: var(--bg-sub);
    border: 1px solid var(--border-color);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.nav-link-pill:hover {
    color: var(--brand-primary);
    border-color: #bae6fd;
    background-color: #f0f9ff;
    transform: translateY(-1px);
}

.nav-link-pill.active {
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    border-color: transparent;
    box-shadow: 0 4px 8px -2px rgba(2, 132, 199, 0.35);
}

.nav-link-pill .nav-badge-new {
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
    text-transform: uppercase;
    animation: pulseBadge 1.8s infinite;
}

@keyframes pulseBadge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.08); }
}

/* ==============================================================================
   프로모션 배너 (index.php 상단)
   ============================================================================== */
.trend-promo-banner {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: var(--radius-md);
    padding: 1rem 1.35rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    transition: transform 0.2s, box-shadow 0.2s;
}

.trend-promo-banner:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.trend-promo-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.trend-promo-icon {
    font-size: 1.8rem;
    background: #ffffff;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.15);
}

.trend-promo-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0369a1;
}

.trend-promo-desc {
    font-size: 0.8rem;
    color: #0284c7;
    margin-top: 0.15rem;
}

.trend-promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #0284c7;
    color: #ffffff;
    padding: 0.6rem 1.15rem;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.trend-promo-btn:hover {
    background: #0369a1;
    transform: translateX(3px);
}

/* ==============================================================================
   주말 이슈 카드 그리드 (Weekly Issues Grid)
   ============================================================================== */
.issues-section {
    margin-bottom: 2.2rem;
}

.section-headline {
    margin-bottom: 1.2rem;
}

.section-headline h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-headline p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.issues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 1.2rem;
}

.issue-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.issue-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.issue-card.danger::before { background: #ef4444; }
.issue-card.success::before { background: #10b981; }
.issue-card.warning::before { background: #f59e0b; }
.issue-card.info::before { background: #0284c7; }

.issue-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.issue-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.issue-card.danger .issue-badge { background: #fee2e2; color: #b91c1c; }
.issue-card.success .issue-badge { background: #dcfce7; color: #15803d; }
.issue-card.warning .issue-badge { background: #fef3c7; color: #b45309; }
.issue-card.info .issue-badge { background: #e0f2fe; color: #0369a1; }

.issue-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 0.6rem;
}

.issue-summary {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 0.9rem;
    flex-grow: 1;
}

.issue-meta-box {
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.76rem;
}

.issue-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.issue-meta-label {
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
}

.issue-meta-val {
    color: #1e293b;
}

/* ==============================================================================
   필터 툴바 & 검색 (Filter Toolbar)
   ============================================================================== */
.trend-filter-toolbar {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-pill-btn {
    background: var(--bg-sub);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-pill-btn:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.filter-pill-btn.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.search-input-box {
    position: relative;
    min-width: 240px;
}

.search-input-box input {
    width: 100%;
    padding: 0.5rem 0.85rem 0.5rem 2.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-box input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==============================================================================
   주간 트렌드 15선 카드 그리드 (Trending Picks Grid)
   ============================================================================== */
.picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.4rem;
    margin-bottom: 2.5rem;
}

.pick-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s, border-color 0.2s;
    position: relative;
}

.pick-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: #94a3b8;
}

/* 카드 상단 헤더 */
.pick-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.9rem;
    gap: 0.75rem;
}

.pick-title-group {
    display: flex;
    flex-direction: column;
}

.pick-market-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.3rem;
    width: fit-content;
}

.pick-market-tag.NASDAQ { background: #dbeafe; color: #1e40af; }
.pick-market-tag.KOSPI { background: #fee2e2; color: #991b1b; }
.pick-market-tag.KOSDAQ { background: #ffedd5; color: #9a3412; }

.pick-stock-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
}

.pick-ticker-sub {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pick-action-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 가격 및 등락률 */
.pick-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0.85rem;
}

.pick-current-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.pick-change-rate {
    font-size: 0.9rem;
    font-weight: 700;
}

/* 선정 이유 / 모멘텀 */
.pick-catalyst {
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border-light);
    margin-bottom: 0.9rem;
}

.pick-catalyst-header {
    font-size: 0.76rem;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.pick-catalyst-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 기술적 차트 시그널 그리드 */
.pick-chart-signals {
    margin-bottom: 1rem;
}

.pick-chart-signals h5 {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.chart-signals-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    font-size: 0.74rem;
}

.signal-pill {
    background: #f1f5f9;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    color: #334155;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signal-pill strong {
    color: #0f172a;
}

/* ==============================================================================
   물타기(추가매수) 전략 맵 & 게이지 (Water-down Strategy Map)
   ============================================================================== */
.water-strategy-container {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 0.95rem;
    margin-bottom: 1rem;
}

.water-strategy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.water-strategy-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.water-weight-tag {
    font-size: 0.68rem;
    font-weight: 700;
    background: #dcfce7;
    color: #15803d;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    border: 1px solid #86efac;
}

/* 가격 레벨 스텝 */
.water-levels-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

.water-level-card {
    background: #ffffff;
    border-radius: 6px;
    padding: 0.45rem 0.2rem;
    border: 1px solid #e2e8f0;
}

.water-level-name {
    font-size: 0.66rem;
    color: var(--text-muted);
    font-weight: 600;
}

.water-level-price {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 0.15rem;
}

.water-level-card.stoploss .water-level-price {
    color: #dc2626;
}

.water-level-card.water1 .water-level-price {
    color: #0284c7;
}

.water-level-card.water2 .water-level-price {
    color: #16a34a;
}

/* 전문가 팁 */
.water-tip-box {
    font-size: 0.73rem;
    color: #1e3a8a;
    line-height: 1.45;
    background: #eff6ff;
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    border-left: 3px solid #3b82f6;
}

/* ==============================================================================
   전문가 컨센서스 & 목표주가 (Consensus Box)
   ============================================================================== */
.consensus-summary-box {
    background: #fdfefe;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.75rem;
}

.consensus-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.consensus-row strong {
    color: var(--text-primary);
}

.upside-badge {
    background: #fef2f2;
    color: #dc2626;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    border: 1px solid #fecaca;
}

.analyst-comment {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-style: italic;
    border-top: 1px dashed var(--border-light);
    padding-top: 0.35rem;
    margin-top: 0.1rem;
}

/* ==============================================================================
   멘토링 가이드: 물타기 5대 원칙 (Mentoring Guide)
   ============================================================================== */
.mentoring-section {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    margin-bottom: 2.5rem;
}

.mentoring-header {
    margin-bottom: 1.25rem;
}

.mentoring-header h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mentoring-header p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.mentoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.mentoring-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.mentoring-num {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #0284c7;
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-bottom: 0.6rem;
}

.mentoring-item h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

.mentoring-item p {
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.5;
}

/* ==============================================================================
   토스트 알림 (Toast Notification)
   ============================================================================== */
.toast-notice {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #0f172a;
    color: #ffffff;
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.toast-notice.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .picks-grid {
        grid-template-columns: 1fr;
    }
    .issues-grid {
        grid-template-columns: 1fr;
    }
    .water-levels-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .trend-filter-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-input-box {
        width: 100%;
    }
    .main-nav-container {
        justify-content: flex-start;
    }
}



