:root {
    --bg-app: #07131c;
    --bg-panel: rgba(11, 24, 36, 0.92);
    --bg-panel-strong: rgba(8, 18, 29, 0.96);
    --bg-soft: rgba(255, 255, 255, 0.05);
    --bg-softer: rgba(255, 255, 255, 0.03);
    --border-color: rgba(187, 210, 233, 0.14);
    --border-strong: rgba(116, 210, 255, 0.22);
    --text-primary: #eef5fb;
    --text-secondary: #98a8b8;
    --text-muted: #708194;
    --accent-blue: #3ba5ff;
    --accent-blue-strong: #1c84e6;
    --accent-cyan: #7fd8ff;
    --accent-gold: #ffd166;
    --up-color: #ff5e69;
    --down-color: #4d8fff;
    --success: #37c690;
    --danger: #ff7f7f;
    --shadow-panel: 0 24px 60px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.22);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --sidebar-width: clamp(356px, 32vw, 430px);
    --stock-sidebar-width: clamp(430px, 38vw, 520px);
}

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

html, body {
    min-height: 100%;
}

body {
    font-family: "Plus Jakarta Sans", "Noto Sans KR", sans-serif;
    color: var(--text-primary);
    background:
        radial-gradient(circle at top left, rgba(59, 165, 255, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(255, 209, 102, 0.12), transparent 24%),
        linear-gradient(180deg, #0a1620 0%, #07131c 52%, #061018 100%);
    overflow: hidden;
}

body.app-shell {
    overflow-y: auto;
    overflow-x: hidden;
}

body.mobile-mode {
    overflow-y: auto;
    overflow-x: hidden;
}

html.preload-sidebar-hidden .sidebar {
    width: 0;
    min-width: 0;
    opacity: 0;
    transform: translateX(-18px);
    border-color: transparent;
    pointer-events: none;
    transition: none;
}

html.preload-sidebar-hidden .sidebar-inner {
    opacity: 0;
    transition: none;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

#app {
    display: flex;
    gap: 18px;
    height: 100vh;
    padding: 18px;
}

body.app-shell #app {
    min-height: 100dvh;
    height: 100dvh;
    padding:
        max(10px, env(safe-area-inset-top))
        max(10px, env(safe-area-inset-right))
        max(10px, env(safe-area-inset-bottom))
        max(10px, env(safe-area-inset-left));
    gap: 10px;
}

body.mobile-mode #app {
    min-height: 100dvh;
    height: 100dvh;
    padding: 8px;
    gap: 8px;
}

.brand-launch-overlay {
    position: fixed;
    inset: 0;
    z-index: 3400;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(255, 176, 48, 0.18), transparent 24%),
        linear-gradient(180deg, #17181d 0%, #141519 100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.42s ease, visibility 0.42s ease;
}

.brand-launch-overlay[hidden] {
    display: none;
}

.brand-launch-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.brand-launch-overlay.is-exiting {
    opacity: 0;
    visibility: hidden;
}

.brand-launch-accent {
    position: absolute;
    top: max(48px, env(safe-area-inset-top) + 28px);
    left: 50%;
    width: clamp(48px, 10vw, 72px);
    height: 6px;
    border-radius: 999px;
    background: rgba(176, 180, 188, 0.68);
    transform: translateX(-50%);
}

.brand-launch-core {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transform: translateY(16px) scale(0.985);
    transition: transform 0.42s ease, opacity 0.42s ease;
}

.brand-launch-overlay.is-visible .brand-launch-core {
    transform: translateY(0) scale(1);
}

.brand-launch-mark-shell {
    position: relative;
    width: clamp(160px, 34vw, 220px);
    aspect-ratio: 1;
}

.brand-launch-mark-shell::before {
    content: '';
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    background: rgba(255, 171, 43, 0.34);
    filter: blur(28px);
    transform: scale(1.08);
}

.brand-launch-mark {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.42));
}

.brand-launch-wordmark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.brand-launch-wordmark strong {
    color: #f5f5f5;
    font-size: clamp(2.4rem, 9vw, 4rem);
    font-weight: 800;
    line-height: 0.96;
    letter-spacing: 0.06em;
}

.brand-launch-wordmark span {
    color: rgba(225, 227, 231, 0.88);
    font-size: clamp(0.82rem, 2.7vw, 1rem);
    font-weight: 500;
    letter-spacing: 0.04em;
}

.startup-overlay {
    position: fixed;
    inset: 0;
    z-index: 3600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 10, 14, 0.84);
    backdrop-filter: blur(18px);
}

.startup-overlay.hidden {
    display: none;
}

.access-overlay {
    position: fixed;
    inset: 0;
    z-index: 3700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(6, 13, 20, 0.9);
    backdrop-filter: blur(18px);
}

.access-overlay.hidden {
    display: none;
}

.access-card {
    width: min(100%, 500px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px 24px 24px;
    border: 1px solid rgba(127, 216, 255, 0.2);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(11, 24, 36, 0.98), rgba(7, 16, 24, 0.98));
    box-shadow: 0 26px 72px rgba(0, 0, 0, 0.5);
}

.startup-card {
    width: min(100%, 540px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px 24px 24px;
    border: 1px solid rgba(255, 179, 64, 0.18);
    border-radius: 28px;
    background:
        radial-gradient(circle at top, rgba(255, 170, 38, 0.08), transparent 36%),
        linear-gradient(180deg, rgba(23, 24, 30, 0.98), rgba(16, 17, 21, 0.98));
    box-shadow: 0 26px 72px rgba(0, 0, 0, 0.48);
}

.startup-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.startup-brand-mark {
    width: 92px;
    height: 92px;
    border-radius: 26px;
    object-fit: cover;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

.startup-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.startup-brand-name {
    color: #f6f6f7;
    font-size: 1.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
}

.startup-brand-sub {
    color: rgba(227, 229, 233, 0.76);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.startup-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.startup-kicker {
    color: #ffbd4c;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.startup-card h2 {
    font-size: 1.32rem;
    font-weight: 800;
    line-height: 1.2;
}

.startup-card p {
    color: rgba(218, 221, 226, 0.78);
    line-height: 1.6;
}

.startup-version-label,
.startup-runtime-info {
    color: rgba(183, 188, 197, 0.72);
    font-size: 0.82rem;
}

.startup-label {
    color: rgba(221, 224, 230, 0.78);
    font-size: 0.86rem;
    font-weight: 700;
}

.startup-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 180, 76, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    outline: none;
}

.startup-input:focus {
    border-color: rgba(255, 180, 76, 0.34);
    box-shadow: 0 0 0 4px rgba(255, 180, 76, 0.12);
}

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

.startup-status {
    min-height: 22px;
    color: rgba(214, 217, 223, 0.74);
    font-size: 0.88rem;
    line-height: 1.5;
}

.startup-status[data-tone="error"] {
    color: #ff9d9d;
}

.startup-status[data-tone="success"] {
    color: #7ce0b5;
}

@media (max-width: 520px) {
    .brand-launch-core {
        gap: 16px;
    }

    .startup-card {
        padding: 24px 18px 20px;
        border-radius: 24px;
    }

    .access-card {
        padding: 24px 18px 20px;
        border-radius: 22px;
    }

    .startup-brand {
        gap: 12px;
    }

    .startup-brand-mark {
        width: 74px;
        height: 74px;
        border-radius: 22px;
    }

    .startup-brand-name {
        font-size: 1.42rem;
    }

    .startup-brand-sub {
        font-size: 0.75rem;
    }

    .startup-actions {
        flex-direction: column;
    }

    .startup-actions > * {
        width: 100%;
    }
}

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(13, 29, 43, 0.96), rgba(8, 20, 31, 0.98));
    box-shadow: var(--shadow-panel);
    overflow: hidden;
    transition: width 0.28s ease, min-width 0.28s ease, opacity 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.sidebar.hidden {
    width: 0;
    min-width: 0;
    opacity: 0;
    transform: translateX(-16px);
    border-color: transparent;
}

.sidebar.hidden .sidebar-inner {
    opacity: 0;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: var(--sidebar-width);
    transition: opacity 0.18s ease;
}

.sidebar.stock-view-active {
    width: var(--stock-sidebar-width);
    min-width: var(--stock-sidebar-width);
}

.sidebar.stock-view-active .sidebar-inner {
    min-width: var(--stock-sidebar-width);
}

body.app-shell .sidebar {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 1200;
    width: min(430px, calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)));
    min-width: min(430px, calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)));
}

body.app-shell .sidebar-inner {
    min-width: min(430px, calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)));
}

body.app-shell .sidebar.stock-view-active {
    width: min(520px, calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)));
    min-width: min(520px, calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)));
}

body.app-shell .sidebar.stock-view-active .sidebar-inner {
    min-width: min(520px, calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)));
}

body.app-shell .sidebar.hidden {
    width: 0;
    min-width: 0;
    transform: translateX(-22px);
}

body.mobile-mode .sidebar {
    position: fixed;
    top: 10px;
    left: 10px;
    bottom: 10px;
    z-index: 1000;
    width: min(392px, calc(100vw - 20px));
    min-width: min(392px, calc(100vw - 20px));
}

body.mobile-mode .sidebar-inner {
    min-width: min(392px, calc(100vw - 20px));
}

body.mobile-mode .sidebar.stock-view-active {
    width: min(430px, calc(100vw - 20px));
    min-width: min(430px, calc(100vw - 20px));
}

body.mobile-mode .sidebar.stock-view-active .sidebar-inner {
    min-width: min(430px, calc(100vw - 20px));
}

body.mobile-mode .sidebar.hidden {
    width: 0;
    min-width: 0;
    transform: translateX(-18px);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.eyebrow {
    color: var(--accent-cyan);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.sidebar-header h2 {
    font-size: 1.45rem;
    line-height: 1.15;
    font-weight: 800;
}

.subtext {
    display: inline-block;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

.version-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 5px 10px;
    border: 1px solid rgba(127, 216, 255, 0.2);
    border-radius: 999px;
    background: rgba(127, 216, 255, 0.08);
    color: var(--accent-cyan);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.version-pill-label {
    white-space: nowrap;
}

.version-pill-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid rgba(127, 216, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.version-pill-download:hover {
    background: rgba(127, 216, 255, 0.14);
    border-color: rgba(127, 216, 255, 0.28);
    color: white;
}

.sidebar-apk-update-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(255, 193, 60, 0.1);
    border: 1px solid rgba(255, 193, 60, 0.25);
    font-size: 0.74rem;
}

.sidebar-apk-update-banner span {
    flex: 1;
    color: #ffc13c;
    font-weight: 600;
}

.sidebar-apk-update-btn {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 193, 60, 0.18);
    border: 1px solid rgba(255, 193, 60, 0.35);
    color: #ffc13c;
    font-size: 0.7rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.sidebar-apk-update-btn:hover {
    background: rgba(255, 193, 60, 0.28);
    border-color: rgba(255, 193, 60, 0.5);
}

.sidebar-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 16px 24px 0;
}

.tab-btn {
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    padding: 11px 14px;
    font-size: 0.92rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(59, 165, 255, 0.22), rgba(127, 216, 255, 0.1));
    border-color: var(--border-strong);
    color: white;
    box-shadow: inset 0 0 0 1px rgba(127, 216, 255, 0.08);
}

.view-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    padding: 16px 18px 18px;
}

.view-content.hidden {
    display: none;
}

.holdings-view-content {
    overflow-y: auto;
    padding-right: 8px;
}

.holdings-toolbar-card,
.holdings-metrics-card,
.holdings-return-card,
.holdings-calendar-card,
.holdings-list-card {
    padding: 16px;
}

.holdings-list-heading-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.holdings-snapshot-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(127, 216, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.holdings-snapshot-btn:hover,
.holdings-snapshot-btn:focus-visible {
    background: rgba(59, 165, 255, 0.12);
    border-color: rgba(127, 216, 255, 0.28);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.holdings-snapshot-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

/* ── 모의투자 잔고 패널 ── */
:root {
    --mock-up: #e05050;
    --mock-down: #4477dd;
}

.mock-summary-profit-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.mock-summary-profit-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mock-summary-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.mock-summary-profit-value {
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: var(--text-primary);
}

.mock-summary-profit-unit {
    font-size: 0.9rem;
    font-weight: 600;
}

.mock-summary-profit-rate {
    font-size: 0.88rem;
    font-weight: 700;
}

.mock-refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    margin-top: 4px;
}

.mock-refresh-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.08);
}

.holdings-refresh-btn {
    position: relative;
}

.holdings-refresh-btn.is-loading,
.holdings-refresh-btn:disabled {
    cursor: wait;
}

.holdings-refresh-btn--text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.holdings-refresh-btn--text.is-loading::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 2px solid rgba(127, 216, 255, 0.22);
    border-top-color: var(--accent-cyan);
    animation: holdings-refresh-spin 0.9s linear infinite;
}

.holdings-refresh-btn--icon.is-loading svg {
    animation: holdings-refresh-spin 0.9s linear infinite;
}

.holdings-refresh-btn.is-loading {
    opacity: 0.9;
}

@keyframes holdings-refresh-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.mock-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 4px;
}

.mock-summary-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.02);
}

.mock-summary-cell-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.mock-summary-cell-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* 종목 리스트 */
.mock-stock-list {
    display: flex;
    flex-direction: column;
    margin-top: 12px;
}

.mock-stock-table-wrap {
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

.mock-stock-table {
    min-width: 860px;
}

.mock-stock-table-head,
.mock-stock-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.7fr) minmax(190px, 1.75fr) minmax(180px, 1.55fr) minmax(120px, 1.1fr);
    align-items: center;
    gap: 10px;
}

.mock-stock-table-head {
    padding: 0 0 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.mock-stock-row {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mock-stock-row:last-child {
    border-bottom: none;
}

.mock-stock-name-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.mock-stock-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mock-stock-code {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.mock-stock-weight {
    font-size: 0.65rem;
    color: var(--accent-cyan);
    font-weight: 600;
    margin-top: 2px;
}

.mock-stock-day-chg {
    font-size: 0.68rem;
    font-weight: 600;
}

.mock-stock-fee {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.mock-stock-mid-col,
.mock-stock-qty-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mock-stock-price-row {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mock-stock-meta {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.mock-stock-val {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mock-stock-profit-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.mock-stock-profit-amt {
    font-size: 0.82rem;
    font-weight: 700;
}

.mock-stock-profit-rate {
    font-size: 0.78rem;
    font-weight: 700;
}

/* ── holdings toolbar ── */
.holdings-toolbar-head,
.holdings-toolbar-copy,
.holdings-calendar-wrap {
    display: flex;
    flex-direction: column;
}

.holdings-toolbar-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.holdings-toolbar-copy {
    gap: 6px;
}

.holdings-tab-group {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.app-report-toolbar-card {
    margin-bottom: 0;
    padding: 12px 14px;
}

.app-report-tab-group {
    flex-wrap: wrap;
    margin-top: 4px;
}

.app-report-tab-host {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
}

#app-reports-screen > .app-page-layer-host {
    flex: 1 1 auto;
    gap: 10px;
}

body.app-shell #app-reports-screen.app-report-flow-screen,
body.mobile-mode #app-reports-screen.app-report-flow-screen {
    padding-bottom: 12px;
}

body.app-shell #app-alerts-screen,
body.app-shell #app-expected-screen,
body.app-shell #app-settings-screen,
body.app-shell #app-sell-targets-screen,
body.mobile-mode #app-alerts-screen,
body.mobile-mode #app-expected-screen,
body.mobile-mode #app-settings-screen,
body.mobile-mode #app-sell-targets-screen {
    padding-bottom: 12px;
}

.app-report-toolbar-card .holdings-toolbar-head {
    align-items: flex-start;
}

.app-report-toolbar-card .holdings-toolbar-copy {
    gap: 4px;
}

.app-report-toolbar-card .holdings-toolbar-copy strong {
    font-size: 1rem;
    line-height: 1.32;
}

.app-report-toolbar-card .holdings-toolbar-copy span:last-child {
    font-size: 0.76rem;
    line-height: 1.35;
}

.holdings-tab-btn {
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.holdings-tab-btn--active {
    background: rgba(127,216,255,0.14);
    border-color: rgba(127,216,255,0.36);
    color: var(--accent-cyan);
}

.holdings-content-tabs {
    display: flex;
    gap: 6px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
}

.holdings-content-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.holdings-content-tab:hover,
.holdings-content-tab:focus-visible {
    color: var(--text-primary);
    border-color: rgba(127, 216, 255, 0.2);
    background: rgba(127, 216, 255, 0.08);
    outline: none;
}

.holdings-content-tab.is-active {
    color: var(--accent-cyan);
    border-color: rgba(127, 216, 255, 0.36);
    background: rgba(127, 216, 255, 0.14);
}

.holdings-settings-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: color 0.15s, background 0.15s;
}

.holdings-settings-btn:hover,
.holdings-settings-btn.active {
    color: var(--accent-cyan);
    background: rgba(127,216,255,0.1);
}

.holdings-toolbar-kicker {
    color: var(--accent-cyan);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.holdings-toolbar-copy strong {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--text-primary);
}

.holdings-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.holdings-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
}

.holdings-filter-chip.active {
    color: white;
    border-color: rgba(127, 216, 255, 0.28);
    background: linear-gradient(135deg, rgba(59, 165, 255, 0.22), rgba(127, 216, 255, 0.1));
    box-shadow: inset 0 0 0 1px rgba(127, 216, 255, 0.08);
}

.holdings-filter-help-btn {
    margin-left: auto;
    width: 34px;
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(127, 216, 255, 0.22);
    background: rgba(59, 165, 255, 0.1);
    color: var(--accent-cyan);
    font-size: 0.92rem;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(127, 216, 255, 0.06);
}

.holdings-filter-help-btn:hover,
.holdings-filter-help-btn:focus-visible {
    background: rgba(59, 165, 255, 0.16);
    border-color: rgba(127, 216, 255, 0.3);
    outline: none;
}

.holdings-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.holdings-metric-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 82px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.holdings-metric-card--wide {
    grid-column: span 2;
}

.holdings-metric-card span {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
}

.holdings-metric-card strong {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.holdings-metric-value-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 10px;
    flex-wrap: wrap;
}

.holdings-metric-inline-rate {
    font-style: normal;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.holdings-metric-card small {
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1.4;
}

.holdings-metric-card[data-tone="positive"] strong,
.holdings-calendar-day[data-tone="positive"] strong,
.holdings-history-item[data-tone="positive"] .holdings-history-item-value {
    color: var(--success);
}

.holdings-metric-card[data-tone="negative"] strong,
.holdings-calendar-day[data-tone="negative"] strong,
.holdings-history-item[data-tone="negative"] .holdings-history-item-value {
    color: var(--danger);
}

.holdings-history-item-value[data-tone="positive"] {
    color: var(--success);
}

.holdings-history-item-value[data-tone="negative"] {
    color: var(--danger);
}

.holdings-section-heading {
    padding: 0 0 14px;
    cursor: default;
}

.holdings-section-toggle {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 10px;
    background: rgba(59, 165, 255, 0.12);
    color: var(--accent-cyan);
    font-size: 0.76rem;
    font-weight: 800;
}

#holdings-metrics-wrap.hidden {
    display: none;
}

#holdings-return-wrap.hidden {
    display: none;
}

#holdings-calendar-wrap.hidden {
    display: none;
}

.holdings-return-heading {
    align-items: flex-start;
    gap: 10px;
}

.holdings-return-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.holdings-return-date-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.holdings-return-start-date {
    min-height: 36px;
    width: 154px;
    max-width: 42vw;
    padding: 0 10px;
    border: 1px solid rgba(127, 216, 255, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 800;
    color-scheme: dark;
}

.holdings-return-refresh-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    touch-action: manipulation;
}

.holdings-return-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.holdings-return-graph {
    min-height: 228px;
    border: 1px solid rgba(127, 216, 255, 0.1);
    border-radius: 18px;
    background:
        radial-gradient(circle at 15% 15%, rgba(127, 216, 255, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
    overflow: hidden;
}

.holdings-return-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.holdings-return-chart svg {
    width: 100%;
    height: 190px;
    overflow: visible;
}

.holdings-return-axis {
    color: rgba(148, 163, 184, 0.62);
}

.holdings-return-grid-line {
    stroke: rgba(148, 163, 184, 0.16);
    stroke-width: 1;
}

.holdings-return-zero-line {
    stroke: rgba(127, 216, 255, 0.24);
    stroke-width: 1.2;
    stroke-dasharray: 4 4;
}

.holdings-return-line {
    fill: none;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 5px rgba(127, 216, 255, 0.12));
}

.holdings-return-dot {
    stroke: rgba(4, 12, 20, 0.92);
    stroke-width: 1.6;
}

.holdings-return-label {
    fill: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
}

.holdings-return-legend {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.holdings-return-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
}

.holdings-return-legend-item span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.holdings-return-legend-item span::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 999px;
    background: var(--legend-color);
    box-shadow: 0 0 10px rgba(127, 216, 255, 0.16);
}

.holdings-return-legend-item strong {
    color: var(--text-primary);
    white-space: nowrap;
}

.holdings-return-meta {
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1.45;
}

.holdings-calendar-month {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
}

.holdings-calendar-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.holdings-calendar-arrow {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-secondary);
    touch-action: manipulation;
}

.holdings-calendar-month-btn {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    touch-action: manipulation;
}

.holdings-calendar-month-picker {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.holdings-calendar-sync-btn {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    touch-action: manipulation;
}

.holdings-calendar-refresh-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    touch-action: manipulation;
}

.holdings-calendar-help-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--accent-cyan);
    border: 1px solid rgba(59, 165, 255, 0.28);
    background: rgba(59, 165, 255, 0.1);
    touch-action: manipulation;
}

.holdings-calendar-help-btn:hover,
.holdings-calendar-help-btn:focus-visible {
    background: rgba(59, 165, 255, 0.18);
    border-color: rgba(59, 165, 255, 0.42);
}

.holdings-calendar-wrap {
    gap: 12px;
}

.holdings-calendar-weekdays,
.holdings-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.holdings-calendar-weekdays span {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
}

.holdings-calendar-day {
    min-height: 132px;
    padding: 10px 8px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
    text-align: left;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.holdings-calendar-day:hover {
    transform: translateY(-1px);
    border-color: rgba(127, 216, 255, 0.22);
}

.holdings-calendar-day.active {
    border-color: rgba(127, 216, 255, 0.28);
    background: linear-gradient(180deg, rgba(59, 165, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.holdings-calendar-day.empty {
    visibility: hidden;
    pointer-events: none;
}

.holdings-calendar-day:not(.has-data) {
    opacity: 0.55;
}

.holdings-calendar-day.non-trading {
    opacity: 0.34;
    cursor: default;
    background: rgba(255, 255, 255, 0.012);
    border-color: rgba(255, 255, 255, 0.035);
}

.holdings-calendar-day.non-trading:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.06);
}

.holdings-calendar-day.non-trading-blank {
    min-height: 132px;
    background: rgba(255, 255, 255, 0.01);
    border-color: rgba(255, 255, 255, 0.03);
}

.holdings-calendar-day.non-trading-blank small,
.holdings-calendar-day.non-trading-blank em {
    display: none;
}

.holdings-calendar-day strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 800;
}

.holdings-calendar-day span,
.holdings-calendar-day small,
.holdings-calendar-day em {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.35;
}

.holdings-calendar-day em {
    font-style: normal;
    color: var(--text-muted);
}

.holdings-calendar-detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.holdings-calendar-detail-hint {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.holdings-calendar-detail-hint strong {
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 800;
}

.holdings-calendar-detail-hint span {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.5;
}

.holdings-history-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.holdings-history-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.holdings-history-item-label {
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 700;
}

.holdings-history-item-value {
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 800;
}

.holdings-history-list,
.holdings-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.holdings-table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.025);
    -webkit-overflow-scrolling: touch;
}

.holdings-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.holdings-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 20, 33, 0.96);
    text-align: right;
    white-space: nowrap;
}

.holdings-static-th {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 10px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
}

.holdings-table thead th:first-child,
.holdings-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    background: rgba(10, 24, 37, 0.98);
    text-align: left;
    width: 164px;
    min-width: 164px;
    max-width: 164px;
    box-shadow: 1px 0 0 rgba(255, 255, 255, 0.06);
}

.holdings-table thead th:first-child {
    z-index: 4;
}

.holdings-table tbody td {
    padding: 13px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.83rem;
    font-weight: 700;
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}

.holdings-table th:nth-child(2),
.holdings-table td:nth-child(2),
.holdings-table th:nth-child(3),
.holdings-table td:nth-child(3) {
    width: 112px;
}

.holdings-table th:nth-child(4),
.holdings-table td:nth-child(4) {
    width: 76px;
}

.holdings-table th:nth-child(5),
.holdings-table td:nth-child(5),
.holdings-table th:nth-child(6),
.holdings-table td:nth-child(6),
.holdings-table th:nth-child(7),
.holdings-table td:nth-child(7),
.holdings-table th:nth-child(8),
.holdings-table td:nth-child(8) {
    width: 118px;
}

.holdings-table th:nth-child(9),
.holdings-table td:nth-child(9) {
    width: 92px;
}

.holdings-table th:nth-child(10),
.holdings-table td:nth-child(10) {
    width: 104px;
}

.holdings-table th:nth-child(11),
.holdings-table td:nth-child(11) {
    width: 82px;
}

.holdings-table th:nth-child(12),
.holdings-table td:nth-child(12) {
    width: 130px;
}

.holdings-table th:nth-child(13),
.holdings-table td:nth-child(13) {
    width: 96px;
}

.holdings-table th:nth-child(14),
.holdings-table td:nth-child(14) {
    width: 110px;
}

.holdings-table tbody tr:last-child td {
    border-bottom: none;
}

.holdings-table-muted {
    color: var(--text-tertiary);
    font-size: 0.74rem;
    font-weight: 700;
}

.holdings-sort-btn {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 12px 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 800;
    text-align: right;
}

.holdings-sort-btn span,
.holdings-sort-btn strong {
    pointer-events: none;
}

.holdings-sort-btn.active {
    color: var(--text-primary);
}

.holdings-table thead th:first-child .holdings-sort-btn {
    justify-content: flex-start;
    text-align: left;
}

.holdings-table-row {
    cursor: pointer;
    transition: background 0.18s ease;
}

.holdings-table-row:hover td,
.holdings-table-row:focus-visible td {
    background: rgba(127, 216, 255, 0.08);
    outline: none;
}

.holdings-table-row td[data-tone="positive"] {
    color: #38d39f;
}

.holdings-table-row td[data-tone="negative"] {
    color: #ff7c93;
}

.holdings-table-name {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    overflow: hidden;
}

.holdings-table-name strong {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.2;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.holdings-table-name span {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.holdings-table-hint {
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.5;
    padding: 2px 4px 0;
}

.holdings-review-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.holdings-review-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.holdings-review-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px;
}

.holdings-review-heading strong {
    color: var(--text-primary);
    font-size: 0.98rem;
    font-weight: 850;
}

.holdings-review-heading span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 750;
    white-space: nowrap;
}

.holdings-review-table {
    min-width: 1420px;
}

.holdings-review-table-scroll {
    border-radius: 14px;
}

.holdings-review-reason {
    width: 170px;
    max-width: 170px;
    color: var(--text-secondary);
    font-size: 0.77rem;
    line-height: 1.35;
    white-space: normal;
    text-align: left;
}

.holdings-position-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
}

.holdings-position-item-clickable {
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.holdings-position-item-clickable:hover,
.holdings-position-item-clickable:focus-visible {
    border-color: rgba(127, 216, 255, 0.22);
    background: rgba(255, 255, 255, 0.045);
    transform: translateY(-1px);
    outline: none;
}

.holdings-position-head,
.holdings-position-meta,
.holdings-position-stats,
.holdings-position-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.holdings-position-head {
    justify-content: space-between;
}

.holdings-position-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.holdings-position-name strong {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
}

.holdings-strategy-badge,
.holdings-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.holdings-strategy-badge {
    background: rgba(127, 216, 255, 0.12);
    color: var(--accent-cyan);
}

.holdings-type-badge {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.holdings-position-meta {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}

.holdings-position-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 2px;
}

.holdings-detail-row {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.holdings-detail-row-full {
    grid-column: 1 / -1;
}

.holdings-detail-label {
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    opacity: 0.7;
}

.holdings-detail-value {
    color: var(--text-primary);
    font-size: 0.80rem;
    font-weight: 500;
    line-height: 1.3;
}

.holdings-detail-value[data-tone="positive"] { color: var(--color-up); }
.holdings-detail-value[data-tone="negative"] { color: var(--color-down); }

/* 포지션 전략 바 (매도 감시) */
.holdings-sell-monitor-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255,255,255,0.07);
    font-size: 0.72rem;
    cursor: pointer;
    transition: background 0.15s;
}

.holdings-sell-monitor-bar:hover {
    background: rgba(255, 255, 255, 0.06);
}

.holdings-sell-monitor-bar[data-tone="critical"],
.holdings-sell-monitor-bar[data-tone="triggered"] {
    background: rgba(244, 67, 54, 0.08);
    border-top-color: rgba(244, 67, 54, 0.2);
}
.holdings-sell-monitor-bar[data-tone="critical"]:hover,
.holdings-sell-monitor-bar[data-tone="triggered"]:hover {
    background: rgba(244, 67, 54, 0.13);
}

.holdings-sell-monitor-bar[data-tone="warning"] {
    background: rgba(255, 202, 40, 0.07);
    border-top-color: rgba(255, 202, 40, 0.18);
}
.holdings-sell-monitor-bar[data-tone="warning"]:hover {
    background: rgba(255, 202, 40, 0.12);
}

.holdings-sell-monitor-bar[data-tone="safe"] {
    background: rgba(67, 160, 71, 0.07);
    border-top-color: rgba(67, 160, 71, 0.18);
}
.holdings-sell-monitor-bar[data-tone="safe"]:hover {
    background: rgba(67, 160, 71, 0.12);
}

/* HSM 헤더 */
.hsm-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.hsm-header-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
    margin-right: 2px;
}

.hsm-summary-text {
    flex: 1;
    font-size: 0.7rem;
    color: var(--text-primary);
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.hsm-qty-chip {
    font-size: 0.66rem;
    color: var(--text-secondary);
    white-space: nowrap;
    margin-left: auto;
}

.hsm-badge {
    font-size: 0.63rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.hsm-badge.hsm-active {
    background: rgba(244, 67, 54, 0.18);
    color: #ef9a9a;
}

.hsm-badge.hsm-partial {
    background: rgba(33, 150, 243, 0.18);
    color: #64b5f6;
}

/* 시나리오 칩 그리드 */
.hsm-scenarios {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.hsm-scenario-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    cursor: pointer;
    transition: background 0.12s;
    min-width: 0;
}

.hsm-scenario-chip.hsm-triggered {
    background: rgba(244, 67, 54, 0.15);
    border-color: rgba(244, 67, 54, 0.3);
}

.hsm-chip-icon {
    font-size: 0.78rem;
    line-height: 1;
    flex-shrink: 0;
}

.hsm-chip-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.hsm-chip-label {
    font-size: 0.62rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.hsm-chip-val {
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.hsm-chip-dist {
    font-size: 0.6rem;
    color: var(--text-secondary);
    opacity: 0.75;
    white-space: nowrap;
}

.hsm-dist-triggered {
    color: #ef9a9a;
    opacity: 1;
    font-weight: 700;
}

/* 칩 accent 색상 */
.hsm-stop   { color: #ef9a9a; }
.hsm-trail  { color: #ffca28; }
.hsm-profit { color: #81c784; }
.hsm-protect { color: #4dd0e1; }
.hsm-time   { color: #bdbdbd; }
.hsm-climax { color: #ce93d8; }

/* 레거시 호환 */
.hsm-item { display: flex; align-items: center; gap: 3px; }
.hsm-label { color: var(--text-secondary); opacity: 0.7; font-size: 0.65rem; }
.hsm-val { font-weight: 600; }
.hsm-val.hsm-stop  { color: #ef9a9a; }
.hsm-val.hsm-trail { color: #ffca28; }
.hsm-val.hsm-profit { color: #81c784; }
.hsm-summary { color: var(--text-primary); font-weight: 600; }

.holdings-position-head-side {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.sell-scenario-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 96px;
    border-radius: 12px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
    text-align: left;
}

.sell-scenario-badge--compact {
    min-width: 0;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
}

.sell-scenario-badge small {
    font-size: 0.66rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.sell-scenario-badge-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.73rem;
    font-weight: 800;
}

.sell-scenario-badge-icon,
.sell-scenario-inline-pill-icon {
    font-size: 0.72rem;
    opacity: 0.92;
}

.sell-scenario-badge[data-tone="safe"] {
    border-color: rgba(76, 175, 80, 0.18);
    background: rgba(67, 160, 71, 0.12);
}

.sell-scenario-badge[data-tone="warning"] {
    border-color: rgba(255, 202, 40, 0.2);
    background: rgba(255, 202, 40, 0.13);
}

.sell-scenario-badge[data-tone="critical"] {
    border-color: rgba(244, 67, 54, 0.2);
    background: rgba(244, 67, 54, 0.13);
}

.sell-scenario-badge[data-tone="triggered"] {
    border-color: rgba(244, 67, 54, 0.26);
    background: rgba(244, 67, 54, 0.18);
}

.sell-scenario-badge[data-tone="idle"] {
    opacity: 0.78;
}

.sell-scenario-badge[data-accent="profit"],
.sell-scenario-inline-pill[data-accent="profit"] {
    border-color: rgba(76, 175, 80, 0.18);
    background: rgba(67, 160, 71, 0.12);
}

.sell-scenario-badge[data-accent="warn"],
.sell-scenario-inline-pill[data-accent="warn"] {
    border-color: rgba(255, 167, 38, 0.24);
    background: rgba(255, 167, 38, 0.14);
}

.sell-scenario-badge[data-accent="risk"],
.sell-scenario-inline-pill[data-accent="risk"] {
    border-color: rgba(244, 67, 54, 0.24);
    background: rgba(244, 67, 54, 0.14);
}

.sell-scenario-badge[data-accent="trail"],
.sell-scenario-inline-pill[data-accent="trail"] {
    border-color: rgba(100, 181, 246, 0.2);
    background: rgba(33, 150, 243, 0.14);
}

.sell-scenario-badge[data-accent="time"],
.sell-scenario-inline-pill[data-accent="time"] {
    border-color: rgba(158, 158, 158, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.sell-scenario-badge[data-accent="protect"],
.sell-scenario-inline-pill[data-accent="protect"] {
    border-color: rgba(38, 198, 218, 0.2);
    background: rgba(38, 198, 218, 0.14);
}

.sell-scenario-badge[data-accent="climax"],
.sell-scenario-inline-pill[data-accent="climax"] {
    border-color: rgba(186, 104, 200, 0.24);
    background: rgba(156, 39, 176, 0.16);
}

.sell-scenario-inline-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
}

.sell-scenario-inline-pill--idle {
    opacity: 0.72;
}

.sell-scenario-inline-pill-state {
    color: var(--text-primary);
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
}

.holdings-table-sell-status {
    text-align: center !important;
    vertical-align: middle;
}

.holdings-table-sell-status .sell-scenario-inline-pill {
    min-width: 52px;
}

.mock-stock-name-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

/* 보유종목 카드 롱프레스 메뉴 */
.hcm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.45);
}

.hcm-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--sidebar-bg, #1a1a2e);
    border-radius: 20px 20px 0 0;
    padding: 20px 16px 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: hcm-slide-up 0.22s ease;
}

@keyframes hcm-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.hcm-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 0 4px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 4px;
}

.hcm-symbol {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 6px;
}

.hcm-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.hcm-btn:hover, .hcm-btn:active {
    background: rgba(255,255,255,0.09);
}

.hcm-btn-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}

.hcm-btn-text {
    font-size: 0.88rem;
    font-weight: 700;
    display: block;
}

.hcm-btn-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

.hcm-btn-chart { border-color: rgba(33,150,243,0.2); }
.hcm-btn-chart:hover { background: rgba(33,150,243,0.1); }
.hcm-btn-info  { border-color: rgba(76,175,80,0.2); }
.hcm-btn-info:hover  { background: rgba(76,175,80,0.08); }

.hcm-btn-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sell-scenario-modal-content {
    width: min(720px, calc(100vw - 24px));
    max-height: min(80vh, 860px);
}

.sell-scenario-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 매수이력 모달 — 스크롤 없이 바로 보이도록 */
#buy-history-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.buy-history-modal-content {
    width: min(680px, calc(100vw - 24px));
    max-height: min(88vh, 680px);
    display: flex;
    flex-direction: column;
}

.order-event-modal-content.oe-broker-mock {
    border-color: rgba(255, 171, 64, 0.28);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 171, 64, 0.08);
}

.order-event-modal-content.oe-broker-real {
    border-color: rgba(78, 156, 255, 0.26);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(78, 156, 255, 0.08);
}

.order-event-modal-content.oe-broker-mock .modal-header {
    background: linear-gradient(180deg, rgba(255, 166, 0, 0.07) 0%, rgba(255, 166, 0, 0.02) 100%);
}

.order-event-modal-content.oe-broker-real .modal-header {
    background: linear-gradient(180deg, rgba(78, 156, 255, 0.07) 0%, rgba(78, 156, 255, 0.02) 100%);
}

/* 컴팩트 헤더 — 종목명+현재가+닫기 한 줄 */
.bh-compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}

.bh-compact-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.bh-compact-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.bh-compact-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.bh-compact-price {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.bh-compact-price small {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.9;
}

.bh-qty-badge {
    font-size: 0.68rem;
    color: var(--text-secondary);
    white-space: nowrap;
    margin-left: auto;
}

.bh-qty-badge strong {
    color: var(--text-primary);
}

.bh-modal-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.bh-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.bh-price-summary {
    padding: 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

.bh-price-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.bh-price-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.bh-price-val {
    font-size: 1.2rem;
    font-weight: 800;
}

.bh-price-val[data-tone="positive"] { color: var(--color-up); }
.bh-price-val[data-tone="negative"] { color: var(--color-down); }

.bh-price-pct {
    font-size: 0.9rem;
    font-weight: 700;
}

.bh-price-pct[data-tone="positive"] { color: var(--color-up); }
.bh-price-pct[data-tone="negative"] { color: var(--color-down); }

.bh-price-meta {
    display: flex;
    gap: 12px;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.bh-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bh-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bh-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
}

.bh-info-row {
    display: flex;
    gap: 6px;
    align-items: baseline;
    font-size: 0.76rem;
    padding: 3px 0;
}

.bh-info-label {
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 58px;
    font-size: 0.7rem;
}

.bh-info-val {
    font-weight: 600;
    color: var(--text-primary);
}

.bh-info-val[data-tone="positive"] { color: var(--color-up); }
.bh-info-val[data-tone="negative"] { color: var(--color-down); }

.bh-trigger-reason {
    font-size: 0.74rem;
    color: var(--text-secondary);
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-top: 2px;
    line-height: 1.5;
}

.bh-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bh-target-chip {
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(226,185,59,0.12);
    border: 1px solid rgba(226,185,59,0.2);
    color: #E2B93B;
}

.bh-target-chip small {
    font-weight: 400;
    opacity: 0.8;
}

.bh-sell-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
}

.bh-sell-summary[data-tone="safe"] { background: rgba(67,160,71,0.1); border-color: rgba(67,160,71,0.2); }
.bh-sell-summary[data-tone="warning"] { background: rgba(255,202,40,0.1); border-color: rgba(255,202,40,0.2); }
.bh-sell-summary[data-tone="critical"],
.bh-sell-summary[data-tone="triggered"] { background: rgba(244,67,54,0.1); border-color: rgba(244,67,54,0.2); }

.bh-sell-badge {
    font-size: 0.63rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.bh-sell-badge.hsm-active { background: rgba(244,67,54,0.18); color: #ef9a9a; }
.bh-sell-badge.hsm-partial { background: rgba(33,150,243,0.18); color: #64b5f6; }

.bh-sell-summary-text {
    font-size: 0.76rem;
    color: var(--text-primary);
}

.bh-sell-action {
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 6px 2px;
    line-height: 1.5;
}

.bh-detail-btn {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--color-primary, #2196F3);
    background: rgba(33,150,243,0.08);
    border: 1px solid rgba(33,150,243,0.2);
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.bh-detail-btn:hover { background: rgba(33,150,243,0.14); }

.btn-primary {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--color-primary, #2196F3);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: background 0.15s;
}

.btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* 매수이력 모달 — 새 구조 */
.bh-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.bh-label-sm {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* 전략 감시 섹션 */
.bh-strategy-section {
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    overflow: hidden;
    margin-top: 4px;
}
.bh-strategy-section[data-tone="safe"]    { border-color: rgba(67,160,71,0.25);  background: rgba(67,160,71,0.06); }
.bh-strategy-section[data-tone="warning"] { border-color: rgba(255,202,40,0.25); background: rgba(255,202,40,0.06); }
.bh-strategy-section[data-tone="critical"],
.bh-strategy-section[data-tone="triggered"] { border-color: rgba(244,67,54,0.25); background: rgba(244,67,54,0.06); }

.bh-strategy-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-wrap: wrap;
}
.bh-strategy-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-right: 2px;
}
.bh-strategy-summary {
    flex: 1;
    font-size: 0.74rem;
    color: var(--text-primary);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bh-detail-btn {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64b5f6;
    background: rgba(33,150,243,0.1);
    border: 1px solid rgba(33,150,243,0.2);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.bh-detail-btn:hover { background: rgba(33,150,243,0.18); }

.bh-scenario-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.bh-scenario-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.76rem;
}
.bh-scenario-row:last-child { border-bottom: none; }
.bh-scenario-row.bh-scenario-triggered {
    background: rgba(244,67,54,0.1);
}
.bh-scenario-icon { font-size: 1rem; flex-shrink: 0; width: 22px; text-align: center; }
.bh-scenario-body { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bh-scenario-name { font-size: 0.73rem; color: var(--text-primary); font-weight: 600; }
.bh-scenario-val  { font-size: 0.68rem; color: var(--text-secondary); }
.bh-scenario-dist { font-size: 0.7rem; color: var(--text-secondary); white-space: nowrap; flex-shrink: 0; }
.bh-dist-on       { color: #ef9a9a; font-weight: 700; }

/* HSM ? 버튼 */
.hsm-help-btn {
    font-size: 0.62rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hsm-help-btn:hover { background: rgba(255,255,255,0.16); }

/* 전략 가이드 모달 */
#sell-strategy-guide-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ssg-modal-content {
    width: min(680px, calc(100vw - 24px));
    max-height: min(88vh, 860px);
}

.ssg-modal-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    padding: 10px 14px 14px;
}

/* 섹션 라벨 */
.ssg-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 8px 0 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 6px;
}

/* ── 단계별 요약 표 ── */
.ssg-summary-section {
    margin-bottom: 8px;
}

.ssg-summary-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ssg-summary-row {
    display: grid;
    grid-template-columns: 20px 42px 52px 32px 1fr;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}

.ssg-s-icon { font-size: 0.9rem; text-align: center; }
.ssg-s-step { font-size: 0.62rem; font-weight: 700; white-space: nowrap; }
.ssg-s-name { font-size: 0.72rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.ssg-s-type { font-size: 0.60rem; color: var(--text-secondary); white-space: nowrap; }
.ssg-s-action { display: none; } /* 모바일에서 숨김 */
.ssg-s-desc { font-size: 0.65rem; color: var(--text-secondary); line-height: 1.35; }

/* ── 배지 상태 설명 ── */
.ssg-state-section {
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.02);
    padding: 8px 10px;
    margin-bottom: 4px;
}

.ssg-state-title {
    font-size: 0.70rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.ssg-state-grid {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ssg-state-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.68rem;
    color: var(--text-secondary);
    padding: 3px 4px;
    border-radius: 5px;
}

.ssg-state-triggered { background: rgba(244,67,54,0.07); }
.ssg-state-critical  { background: rgba(255,152,0,0.07); }
.ssg-state-warning   { background: rgba(255,202,40,0.07); }
.ssg-state-safe      { background: rgba(67,160,71,0.07); }

.ssg-state-badge {
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    min-width: 80px;
    color: var(--text-primary);
}

.ssg-state-note {
    font-size: 0.60rem;
    color: var(--text-secondary);
    margin-top: 6px;
    opacity: 0.8;
    line-height: 1.4;
}
.ssg-row {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ssg-row:last-child { border-bottom: none; }
.ssg-row-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.ssg-icon { font-size: 1.2rem; flex-shrink: 0; width: 28px; text-align: center; margin-top: 2px; }
.ssg-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.ssg-title  { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
.ssg-priority { font-size: 0.7rem; font-weight: 600; }
.ssg-desc {
    font-size: 0.74rem;
    color: var(--text-secondary);
    line-height: 1.55;
    white-space: pre-line;
    margin: 0;
}
.ssg-formula {
    display: block;
    font-size: 0.7rem;
    color: #81c784;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    padding: 6px 10px;
    white-space: pre-wrap;
    font-family: monospace;
}
.ssg-params { display: flex; flex-direction: column; gap: 4px; }
.ssg-param  { display: flex; gap: 8px; font-size: 0.71rem; }
.ssg-param-name { font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.ssg-param-tip  { color: var(--text-secondary); }

.sell-scenario-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.sell-scenario-summary[data-tone="safe"] {
    background: rgba(67, 160, 71, 0.12);
}

.sell-scenario-summary[data-tone="warning"] {
    background: rgba(255, 202, 40, 0.12);
}

.sell-scenario-summary[data-tone="critical"],
.sell-scenario-summary[data-tone="triggered"] {
    background: rgba(244, 67, 54, 0.12);
}

.order-event-modal-content.oe-broker-mock .sell-scenario-summary {
    border-color: rgba(255, 171, 64, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 171, 64, 0.04);
}

.order-event-modal-content.oe-broker-real .sell-scenario-summary {
    border-color: rgba(78, 156, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(78, 156, 255, 0.04);
}

.sell-scenario-summary strong {
    font-size: 0.92rem;
}

.sell-scenario-summary span {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}

.sell-scenario-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sell-scenario-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.sell-scenario-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sell-scenario-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.sell-scenario-row[data-tone="triggered"] {
    border-color: rgba(244, 67, 54, 0.24);
    background: rgba(244, 67, 54, 0.10);
}

.sell-scenario-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sell-scenario-row-head strong {
    display: block;
    margin-top: 3px;
}

.sell-scenario-priority {
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
}

.sell-scenario-progress {
    color: var(--accent-blue);
    font-size: 0.75rem;
    font-weight: 700;
}

.sell-scenario-row-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}

.holdings-position-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.holdings-stat-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 74px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(2, 11, 18, 0.4);
}

.holdings-stat-box span {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
}

.holdings-stat-box strong {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.35;
}

.holdings-position-actions {
    justify-content: space-between;
}

.holdings-position-actions small {
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.45;
}

.holdings-open-btn {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    background: rgba(59, 165, 255, 0.16);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 800;
}

#holdings-calendar-modal {
    position: fixed;
    inset: 0;
    z-index: 1260;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.holdings-calendar-modal-content {
    width: min(980px, 100%);
    max-height: min(88vh, 1080px);
}

.holdings-calendar-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#holdings-strategy-guide-modal {
    position: fixed;
    inset: 0;
    z-index: 1261;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.holdings-strategy-guide-modal-content {
    width: min(760px, 100%);
    max-height: min(88vh, 960px);
}

.holdings-strategy-guide-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.holdings-guide-section,
.holdings-guide-card {
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.holdings-guide-section strong,
.holdings-guide-card strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.45;
}

.holdings-guide-section p {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.6;
}

.holdings-guide-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.holdings-guide-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(127, 216, 255, 0.12);
    color: var(--accent-cyan);
    font-size: 0.72rem;
    font-weight: 800;
}

.holdings-guide-list {
    margin: 10px 0 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.6;
}

.holdings-guide-list li + li {
    margin-top: 6px;
}

.holdings-modal-title {
    min-width: 0;
}

.holdings-modal-title p {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.45;
}

.panel-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
}

.collapsible-content {
    display: none;
    padding: 0 18px 18px;
}

.parse-section textarea,
.search-input,
.date-input,
.threshold-box input,
.width-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(2, 11, 18, 0.65);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.parse-section textarea:focus,
.search-input:focus,
.date-input:focus,
.threshold-box input:focus,
.width-input:focus {
    border-color: rgba(127, 216, 255, 0.32);
    box-shadow: 0 0 0 3px rgba(59, 165, 255, 0.12);
    background: rgba(4, 14, 23, 0.88);
}

#parse-input {
    min-height: 120px;
    padding: 14px 15px;
    resize: vertical;
    line-height: 1.55;
}

.btn,
.text-btn,
.icon-btn,
.close-btn,
.mobile-toggle-btn,
.tf-btn,
.noti-btn {
    border: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-blue), #5ac6ff);
    color: #03131d;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(28, 132, 230, 0.22);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    box-shadow: none;
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.date-selector-section,
.search-section,
.parse-section,
.indicator-section {
    overflow: hidden;
}

.app-home-parse-card .section-heading {
    padding: 0;
}

.app-home-parse-content {
    padding: 0;
}

.app-home-parse-copy {
    margin: 0 0 12px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
}

.app-home-parse-card #parse-btn {
    margin-top: 12px;
}

#parse-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1180;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 12px 12px calc(96px + env(safe-area-inset-bottom, 0));
}

.parse-preview-modal-content {
    width: min(780px, 100%);
    max-height: min(78vh, 760px);
    display: flex;
    flex-direction: column;
    border-radius: 24px 24px 0 0;
}

.parse-preview-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 14px;
}

.parse-preview-subtitle {
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.5;
}

.parse-preview-summary-row,
.parse-preview-actions,
.parse-preview-section-head,
.parse-preview-group-head,
.parse-preview-stock-item,
.parse-preview-failed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.parse-preview-summary-row {
    flex-wrap: wrap;
}

.parse-preview-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.parse-preview-chip.positive {
    color: var(--positive);
    border-color: rgba(81, 205, 160, 0.18);
    background: rgba(81, 205, 160, 0.10);
}

.parse-preview-chip.caution {
    color: var(--accent-gold);
    border-color: rgba(255, 209, 102, 0.18);
    background: rgba(255, 209, 102, 0.10);
}

.parse-preview-chip.neutral {
    color: var(--text-secondary);
}

.parse-preview-selection {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
}

.parse-preview-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.parse-preview-section {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.parse-preview-section + .parse-preview-section {
    margin-top: 2px;
}

.parse-preview-section-head {
    align-items: flex-start;
    margin-bottom: 12px;
}

.parse-preview-section-head strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.parse-preview-section-head span,
.parse-preview-group-head span,
.parse-preview-stock-copy small,
.parse-preview-failed-item span,
.parse-preview-failed-empty {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
}

.parse-preview-group + .parse-preview-group {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.parse-preview-stock-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.parse-preview-stock-item {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(4, 14, 23, 0.42);
}

.parse-preview-checkbox {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
    flex: 0 0 auto;
}

.parse-preview-stock-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.parse-preview-stock-copy strong {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 800;
}

.parse-preview-stock-copy strong span {
    margin-left: 6px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
}

.parse-preview-failed-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.parse-preview-failed-item {
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 122, 122, 0.12);
    background: rgba(255, 122, 122, 0.06);
}

.parse-preview-failed-item strong {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.parse-preview-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0));
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(8, 18, 29, 0.98);
    flex-shrink: 0;
}

.picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-input {
    padding: 11px 14px;
}

.text-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-cyan);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 10px 12px;
}

.text-btn:hover {
    background: rgba(255, 255, 255, 0.09);
}

.danger-text {
    color: var(--danger);
}

.search-section {
    padding: 14px;
}

.search-input {
    padding: 13px 14px;
}

.search-helper {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
}

.indicator-content {
    display: block;
    padding: 0 18px 18px;
}

.indicator-group + .indicator-group {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.indicator-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.group-header {
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.settings-card .indicator-item + .indicator-item,
.setting-row + .setting-row {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
}

.setting-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.setting-copy strong {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
}

.setting-copy span {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
}

.theme-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(3, 12, 19, 0.7);
    border: 1px solid rgba(127, 216, 255, 0.14);
}

.theme-option {
    min-width: 74px;
    height: 34px;
    padding: 0 14px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.theme-option:hover {
    color: var(--text-primary);
}

.theme-option.active {
    background: linear-gradient(135deg, rgba(59, 165, 255, 0.24), rgba(127, 216, 255, 0.12));
    color: white;
    box-shadow: inset 0 0 0 1px rgba(127, 216, 255, 0.12);
}

.indicator-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.9rem;
}

.nested-item {
    padding-left: 10px;
}

.indicator-item label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ind-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 54px;
    height: 32px;
    flex-shrink: 0;
}

.switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.switch-slider::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease;
}

.switch input:checked + .switch-slider {
    background: linear-gradient(135deg, rgba(59, 165, 255, 0.84), rgba(127, 216, 255, 0.68));
    border-color: rgba(127, 216, 255, 0.32);
}

.switch input:checked + .switch-slider::after {
    transform: translateX(22px);
}

.indicator-item input[type="checkbox"] {
    accent-color: var(--accent-blue);
}

.indicator-item input[type="color"] {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.width-input {
    width: 52px;
    padding: 7px 6px;
    text-align: center;
}

.indicator-utility {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.utility-copy {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.utility-status {
    margin-top: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.utility-status[data-tone="success"] {
    color: var(--accent-cyan);
}

.utility-status[data-tone="warning"] {
    color: var(--accent-gold);
}

.utility-status[data-tone="error"] {
    color: #ff7f7f;
}

.utility-status[data-tone="muted"] {
    color: var(--text-secondary);
}

.target-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.target-list > * {
    flex: 0 0 auto;
    width: 100%;
}

.date-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.date-header:hover {
    transform: translateY(-1px);
    border-color: rgba(127, 216, 255, 0.22);
}

.date-header.open {
    background: linear-gradient(135deg, rgba(59, 165, 255, 0.12), rgba(255, 255, 255, 0.04));
    border-color: rgba(127, 216, 255, 0.24);
}

.date-header h3 {
    font-size: 1.03rem;
    font-weight: 800;
}

.date-header-main,
.target-name-block,
.target-price-meta,
.expected-copy,
.flyout-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stock-name-block {
    min-width: 0;
}

.date-title-row,
.target-header-row,
.expected-top,
.symbol-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.date-caption,
.target-meta,
.target-price-sub,
.expected-sub,
.flyout-heading p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
}

.group-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stock-count,
.symbol-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
}

.stocks-container {
    display: grid;
    gap: 10px;
}

.stock-group {
    gap: 12px;
}

.stock-group-header {
    align-items: flex-start;
    padding: 16px 18px;
}

.stock-group.active .stock-group-header {
    border-color: rgba(127, 216, 255, 0.24);
    background: linear-gradient(135deg, rgba(59, 165, 255, 0.14), rgba(255, 255, 255, 0.05));
}

.stock-group-caption {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.stock-group-caption span {
    display: inline-flex;
    align-items: center;
}

.stock-group-actions {
    flex: 0 0 auto;
    gap: 8px;
}

.stock-group-targets {
    grid-template-columns: 1fr;
}

.stock-target-card {
    min-height: 0;
}

.stock-target-card-main {
    padding-bottom: 18px;
}

.stock-group-target-meta {
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
}

.stock-group-date-label {
    flex: 0 0 auto;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.5;
}

.stock-group-date-list {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stock-group-date-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.target-item {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(9, 20, 31, 0.9), rgba(7, 17, 26, 0.96));
    box-shadow: var(--shadow-soft);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    overflow: hidden;
}

.target-item:hover,
.target-item.active {
    transform: translateY(-2px);
    border-color: rgba(127, 216, 255, 0.28);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.target-main {
    cursor: pointer;
    padding: 16px 18px;
    padding-right: 56px;
}

.target-main .name {
    display: block;
    min-width: 0;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.target-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 8px;
}

.target-price-list {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 0 18px 16px;
}

/* Stock view collapsible target list */
.stock-target-list {
    padding: 0 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 0;
}

/* Arrow indicator on date-view stock items */
.target-toggle-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-left: auto;
    transition: transform 0.18s ease;
    flex-shrink: 0;
}

.target-item.tp-open .target-toggle-arrow {
    transform: rotate(90deg);
    color: var(--accent-cyan);
}

.target-item.tp-open {
    border-color: rgba(127, 216, 255, 0.28);
    background: linear-gradient(180deg, rgba(12, 26, 40, 0.96), rgba(8, 19, 30, 0.98));
}

/* Stock-view open state */
.stock-group.tp-open .stock-group-header {
    border-color: rgba(127, 216, 255, 0.28);
    background: linear-gradient(135deg, rgba(59, 165, 255, 0.14), rgba(255, 255, 255, 0.05));
}

.stock-group.tp-open .stock-group-arrow {
    transform: rotate(90deg);
    color: var(--accent-cyan);
}

.stock-group-arrow {
    transition: transform 0.18s ease;
    color: var(--text-muted);
}

.stock-target-item {
    border-color: rgba(127, 216, 255, 0.12);
}

.stock-target-main {
    padding-bottom: 14px;
}

.stock-view-active .stock-target-item {
    min-height: 232px;
}

.stock-view-active .stock-target-main {
    padding-top: 18px;
    padding-bottom: 18px;
}

.stock-target-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 12px;
}

.stock-view-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 10px;
}

.stock-summary-pill {
    min-width: 78px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(127, 216, 255, 0.14);
    background: rgba(127, 216, 255, 0.08);
    text-align: right;
}

.stock-summary-pill strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
}

.stock-summary-label,
.stock-stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.35;
}

.stock-summary-label {
    white-space: nowrap;
}

.stock-target-preview {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.035);
}

.stock-preview-label {
    flex: 0 0 auto;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.6;
}

.stock-preview-chip-list {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stock-preview-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 209, 102, 0.1);
    border: 1px solid rgba(255, 209, 102, 0.16);
    color: var(--accent-gold);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.stock-preview-chip.muted {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.stock-target-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.stock-view-active .stock-target-top {
    grid-template-columns: 1fr;
    gap: 14px;
}

.stock-view-active .stock-summary-pill {
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
}

.stock-view-active .stock-summary-pill strong {
    font-size: 1.05rem;
    flex: 0 0 auto;
}

.stock-view-active .stock-target-preview {
    margin-top: 16px;
}

.stock-view-active .stock-target-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
}

.stock-view-active .stock-stat,
.stock-view-active .stock-stat.wide {
    grid-column: auto;
    min-height: 72px;
    padding: 13px 14px;
}

.stock-stat {
    min-width: 0;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.stock-stat.wide {
    grid-column: 1 / -1;
}

.stock-stat strong {
    display: block;
    margin-top: 5px;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.4;
    word-break: break-word;
}

.stock-price-list {
    gap: 10px;
    padding-top: 2px;
}

.stock-view-active .stock-simple-item,
.stock-simple-item {
    min-height: 0;
    overflow: hidden;
}

.stock-simple-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 86px;
    padding: 14px 14px 14px 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.022));
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 3px 0 0 rgba(127, 216, 255, 0.6);
}

.stock-simple-trigger {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    border: none;
    background: transparent;
    color: inherit;
    padding: 4px 0;
    text-align: left;
    cursor: pointer;
}

.stock-simple-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    width: 100%;
}

.stock-simple-name {
    min-width: 0;
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.22;
    letter-spacing: -0.018em;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.32), 0 0 16px rgba(127, 216, 255, 0.14);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-simple-head-meta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
}

.stock-simple-toggle {
    flex: 0 0 auto;
    color: var(--text-secondary);
    font-size: 1.08rem;
    line-height: 1;
}

.stock-simple-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(127, 216, 255, 0.14);
    border: 1px solid rgba(127, 216, 255, 0.2);
    color: var(--accent-cyan);
    font-size: 0.78rem;
    font-weight: 800;
}

.stock-group-delete {
    flex: 0 0 34px;
    align-self: center;
}

.stock-simple-target-list {
    gap: 10px;
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.stock-simple-detail-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 2px 2px;
}

.stock-simple-target-row {
    min-height: 72px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.stock-simple-target-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stock-simple-target-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    width: fit-content;
    padding: 0 8px;
    margin-bottom: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
}

.stock-simple-item.active {
    border-color: rgba(127, 216, 255, 0.2);
}

.stock-simple-item.active .stock-simple-head {
    background: linear-gradient(180deg, rgba(127, 216, 255, 0.18), rgba(255, 255, 255, 0.03));
}

.stock-simple-trigger[aria-expanded="true"] .stock-simple-toggle {
    color: var(--accent-cyan);
}

.stock-plain-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(9, 20, 31, 0.94), rgba(7, 17, 26, 0.98));
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.stock-plain-item.active {
    border-color: rgba(127, 216, 255, 0.26);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.stock-plain-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 78px;
    padding: 12px 12px 12px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.stock-plain-item.active .stock-plain-head {
    background: linear-gradient(180deg, rgba(127, 216, 255, 0.16), rgba(255, 255, 255, 0.03));
}

.stock-plain-trigger {
    flex: 1;
    min-width: 0;
    display: block;
    border: none;
    background: transparent;
    color: inherit;
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.stock-plain-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.stock-plain-name {
    min-width: 0;
    color: var(--text-primary);
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-plain-head-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stock-plain-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(127, 216, 255, 0.12);
    border: 1px solid rgba(127, 216, 255, 0.16);
    color: var(--accent-cyan);
    font-size: 0.76rem;
    font-weight: 800;
}

.stock-plain-toggle {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1;
}

.stock-plain-trigger[aria-expanded="true"] .stock-plain-toggle {
    color: var(--accent-cyan);
}

.stock-plain-delete {
    flex: 0 0 34px;
    align-self: center;
}

.stock-plain-target-list {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.stock-plain-detail-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.stock-plain-target-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 68px;
    padding: 14px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.stock-plain-target-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stock-plain-target-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
}

.stock-plain-target-price {
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 800;
}

.stock-plain-target-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
}

.stock-plain-target-delete {
    align-self: center;
}

.target-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 209, 102, 0.16);
    border-radius: 14px;
    background: rgba(255, 209, 102, 0.08);
}

.stock-view-active .target-price-row {
    min-height: 60px;
    padding: 13px 14px;
}

.target-price-row.clickable {
    cursor: pointer;
}

.target-price-row.clickable:hover {
    background: rgba(255, 209, 102, 0.11);
}

.target-price-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.raw-message-btn {
    margin-bottom: 0;
}

.target-price-label,
.expected-target {
    color: var(--accent-gold);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.35;
}

.floating-delete,
.inline-delete {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.18s ease;
}

.floating-delete {
    position: absolute;
    top: 12px;
    right: 12px;
}

.floating-delete:hover,
.inline-delete:hover,
.close-btn:hover {
    color: white;
    background: rgba(255, 94, 105, 0.18);
}

.main-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.app-home-screen[hidden],
.app-page-screen[hidden],
.app-chart-shell[hidden],
.app-bottom-nav[hidden] {
    display: none !important;
}

.app-home-screen {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
}

.app-page-screen {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
}

.app-chart-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1 1 0%;
    min-height: 0;
    overflow: hidden;
}

.app-home-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 22px;
    border: 1px solid rgba(127, 216, 255, 0.18);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(127, 216, 255, 0.14), transparent 42%),
        linear-gradient(180deg, rgba(14, 31, 45, 0.96), rgba(8, 20, 31, 0.98));
    box-shadow: var(--shadow-panel);
}

.app-home-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.app-home-kicker,
.app-home-card-kicker {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.app-home-hero h2,
.app-home-card h3 {
    margin: 0;
}

.app-home-headline {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.app-home-market-status {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
    align-self: flex-start;
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.app-home-market-status strong {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-primary);
}

.app-home-market-status span {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.app-home-market-status.tone-open {
    background: linear-gradient(180deg, rgba(39, 174, 96, 0.18), rgba(39, 174, 96, 0.08));
    border-color: rgba(78, 214, 130, 0.32);
}

.app-home-market-status.tone-open strong {
    color: #88f0a8;
}

.app-home-market-status.tone-holiday {
    background: linear-gradient(180deg, rgba(214, 66, 66, 0.18), rgba(214, 66, 66, 0.08));
    border-color: rgba(255, 106, 106, 0.3);
}

.app-home-market-status.tone-holiday strong {
    color: #ff8f8f;
}

.app-home-market-status.tone-closed {
    background: linear-gradient(180deg, rgba(130, 145, 165, 0.14), rgba(130, 145, 165, 0.06));
    border-color: rgba(170, 184, 204, 0.16);
}

.app-home-market-status.tone-closed strong {
    color: #d1dae8;
}

.app-home-sync-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--accent-cyan);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

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

.app-home-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(11, 24, 36, 0.92), rgba(8, 18, 29, 0.96));
    box-shadow: var(--shadow-panel);
}

.app-home-card-wide {
    grid-column: 1 / -1;
}

.app-page-layer-host {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1 1 0%;
    min-height: 0;
}

.app-page-layer-host:empty {
    display: none;
}

.app-page-layer-host .noti-layer {
    position: static;
    inset: auto;
    width: 100%;
    max-width: none;
    max-height: none;
    z-index: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    flex: 1 1 0%;
    min-height: 0;
}

body.native-app-runtime .app-page-layer-host .noti-layer {
    min-height: 100%;
}

body.native-app-runtime #app-report-intraday-host .noti-layer,
body.native-app-runtime #app-report-final-host .noti-layer,
body.app-shell #app-report-intraday-host .noti-layer,
body.app-shell #app-report-final-host .noti-layer,
body.mobile-mode #app-report-intraday-host .noti-layer,
body.mobile-mode #app-report-final-host .noti-layer {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
}

#app-report-intraday-host .noti-list,
#app-report-final-host .noti-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
}

#app-report-intraday-host,
#app-report-final-host {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

#app-report-intraday-host .noti-body,
#app-report-final-host .noti-body,
#app-report-intraday-host .report-surface-card,
#app-report-final-host .report-surface-card {
    flex: 0 0 auto;
    min-height: auto;
}

body.app-shell #app-report-intraday-host .report-surface-card,
body.app-shell #app-report-final-host .report-surface-card,
body.mobile-mode #app-report-intraday-host .report-surface-card,
body.mobile-mode #app-report-final-host .report-surface-card {
    min-height: auto;
}

#app-report-intraday-host .expected-section-block:last-child,
#app-report-final-host .expected-section-block:last-child,
#daily-report-section-body,
#final-report-history-section-body,
#breakout-flow-section-body {
    flex: 0 0 auto;
    min-height: auto;
}

.app-page-layer-host .noti-layer.hidden {
    display: none !important;
}

.app-page-layer-host .noti-header {
    flex-shrink: 0;
}

.app-page-layer-host .noti-list {
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 0%;
    min-height: 0;
}

.app-page-layer-host .close-btn {
    display: none;
}

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

.app-home-mini-btn,
.app-home-action-btn,
.app-home-alert-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-radius: 14px;
}

.app-home-mini-btn {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.app-home-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.app-home-metric-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 104px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-home-metric-card[data-tone="positive"] {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.2);
}

.app-home-metric-card[data-tone="warning"] {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.2);
}

.app-home-metric-card[data-tone="accent"] {
    background: rgba(127, 216, 255, 0.12);
    border-color: rgba(127, 216, 255, 0.2);
}

.app-home-metric-label,
.app-home-metric-meta,
.app-home-status-meta,
.app-home-report-footnote,
.app-home-alert-copy {
    color: var(--text-secondary);
}

.app-home-update-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 200, 60, 0.35);
    background: rgba(255, 200, 60, 0.08);
    color: #ffd84d;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.app-home-update-banner:active {
    background: rgba(255, 200, 60, 0.16);
}
.app-home-update-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}
.app-home-update-text strong {
    color: #fff;
}

.app-home-metric-value {
    font-size: 1.32rem;
    line-height: 1.1;
}

.app-home-status-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-home-status-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.app-home-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.app-home-status-dot.ok {
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.14);
}

.app-home-status-dot.warn {
    background: #f59e0b;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.14);
}

.app-home-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.app-home-action-btn {
    min-height: 48px;
    padding: 0 12px;
    font-weight: 700;
}

.app-settings-download-btn {
    width: 100%;
    margin-top: 12px;
}

.app-home-watchlist-grid,
.app-home-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.app-home-server-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.app-home-server-card-shell .app-home-server-group,
.app-home-server-card-shell .app-home-server-metric-grid,
.app-home-server-card-shell .app-home-server-trend-grid,
.app-home-server-card-shell .app-home-server-trend-grid-wide,
.app-home-server-card-shell .app-home-runtime-grid,
.app-home-server-card-shell .app-home-hardware-grid {
    width: 100%;
}

.app-home-server-card-shell .app-home-server-metric-grid,
.app-home-server-card-shell .app-home-server-trend-grid,
.app-home-server-card-shell .app-home-server-trend-grid-wide,
.app-home-server-card-shell .app-home-runtime-grid,
.app-home-server-card-shell .app-home-hardware-grid {
    grid-template-columns: 1fr;
}

.app-home-watch-item,
.app-home-report-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-home-server-card-shell .app-home-watch-item,
.app-home-server-card-shell .app-home-server-card,
.app-home-server-card-shell .app-home-metric-card {
    min-height: 0;
}

.app-home-watch-item[data-tone="positive"] {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.2);
}

.app-home-watch-item[data-tone="warning"] {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.2);
}

.app-home-watch-item strong,
.app-home-report-card strong {
    font-size: 1.02rem;
}

.app-home-watch-footnote {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.5;
}

.app-home-hardware-grid {
    margin-top: 10px;
}

.app-home-server-trend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.app-home-server-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-home-server-group + .app-home-server-group {
    margin-top: 12px;
}

.app-home-server-group-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.app-home-server-card-shell .app-home-server-group-head,
.app-home-server-card-shell .app-home-server-card-top,
.app-home-server-card-shell .app-home-card-head {
    flex-direction: column;
    align-items: flex-start;
}

.app-home-server-group-title-row,
.app-home-metric-label-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap;
}

.app-home-server-group-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.app-home-server-group-copy strong {
    font-size: 1rem;
}

.app-home-server-group-copy span,
.app-home-server-group-toggle {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.app-home-server-group-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.app-home-server-card-shell .app-home-server-group-toggle {
    width: 100%;
}

.app-home-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(127, 216, 255, 0.28);
    border-radius: 999px;
    background: rgba(127, 216, 255, 0.14);
    color: #dff6ff;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.app-home-help-btn:hover,
.app-home-help-btn:focus-visible {
    background: rgba(127, 216, 255, 0.22);
    border-color: rgba(127, 216, 255, 0.4);
    color: #ffffff;
}

.app-home-server-group-body.hidden {
    display: none;
}

.app-home-server-trend-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.app-home-server-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-home-server-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.app-home-server-card-top strong {
    color: var(--text-primary);
    font-size: 0.96rem;
}

.app-home-server-card-chart {
    min-height: 56px;
}

.app-home-server-sparkline {
    display: block;
    width: 100%;
    height: 56px;
}

.app-home-server-sparkline-grid {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.app-home-server-sparkline-fill {
    fill: color-mix(in srgb, var(--sparkline-fill, #7fd8ff) 18%, transparent);
}

.app-home-server-sparkline-line {
    fill: none;
    stroke: var(--sparkline-color, #7fd8ff);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-home-server-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.app-home-server-api-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.app-home-server-api-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-home-server-card-shell .app-home-server-api-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
}

.app-home-server-api-row strong {
    min-width: 0;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-home-server-card-shell .app-home-watch-item strong,
.app-home-server-card-shell .app-home-watch-item small,
.app-home-server-card-shell .app-home-server-api-row strong,
.app-home-server-card-shell .app-home-server-api-row span,
.app-home-server-card-shell .app-home-server-card-top strong,
.app-home-server-card-shell .app-home-server-card small,
.app-home-server-card-shell .app-home-metric-value,
.app-home-server-card-shell .app-home-metric-meta,
.app-home-server-card-shell .app-home-watch-footnote {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.app-home-server-card-shell .app-home-server-group-copy span,
.app-home-server-card-shell .app-home-server-group-copy strong {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.app-home-server-card-shell .app-home-help-btn {
    width: 26px;
    height: 26px;
}

.app-home-server-api-row span,
.app-home-runtime-meta span {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.app-home-runtime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.app-home-runtime-card {
    min-height: 96px;
}

.app-home-runtime-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.server-status-help-modal {
    position: fixed;
    inset: 0;
    z-index: 240;
}

.server-status-help-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 18, 0.72);
    backdrop-filter: blur(8px);
}

.server-status-help-sheet {
    position: absolute;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    max-height: min(78vh, 720px);
    overflow: auto;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(8, 20, 32, 0.98), rgba(10, 26, 40, 0.98));
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.44);
}

.server-status-help-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.server-status-help-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.server-status-help-kicker {
    color: var(--accent-cyan);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.server-status-help-head h3 {
    margin: 0;
    font-size: 1.2rem;
}

.server-status-help-summary {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.65;
}

.chart-trade-marker-sheet {
    max-height: min(72vh, 620px);
}

.chart-trade-marker-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.chart-trade-marker-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-trade-marker-row[data-tone="buy"] {
    border-color: rgba(77, 187, 134, 0.22);
}

.chart-trade-marker-row[data-tone="sell"] {
    border-color: rgba(255, 107, 122, 0.22);
}

.chart-trade-marker-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.chart-trade-marker-row-head strong {
    font-size: 0.96rem;
}

.chart-trade-marker-row-head span {
    color: var(--text-secondary);
    font-size: 0.8rem;
    white-space: nowrap;
}

.chart-trade-marker-row-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
}

.server-status-help-levels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 16px;
}

.server-status-help-level {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.server-status-help-level strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.server-status-help-level p,
.server-status-help-example p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.server-status-help-example {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(127, 216, 255, 0.06);
    border: 1px solid rgba(127, 216, 255, 0.12);
}

.server-status-help-example strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.92rem;
}

.app-home-report-inline {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.45;
}

.app-home-recent-alerts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.app-home-alert-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    text-align: left;
}

.app-home-alert-item.unread {
    border-color: rgba(127, 216, 255, 0.26);
    background: rgba(127, 216, 255, 0.08);
}

.app-home-alert-top {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.app-home-alert-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-cyan);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.app-home-empty {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    line-height: 1.6;
}

.app-bottom-nav {
    position: fixed;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 22px;
    background: rgba(7, 18, 28, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.app-bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 58px;
    padding: 6px 4px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
}

.app-bottom-nav-btn span {
    line-height: 1.05;
}

.app-bottom-nav-btn svg {
    width: 18px;
    height: 18px;
}

.app-bottom-nav-btn.active {
    background: linear-gradient(135deg, rgba(59, 165, 255, 0.22), rgba(127, 216, 255, 0.12));
    color: var(--accent-cyan);
}

body.native-app-runtime #app {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

body.native-app-runtime.app-shell .sidebar,
body.native-app-runtime.mobile-mode .sidebar {
    bottom: calc(84px + env(safe-area-inset-bottom));
}

body.native-app-runtime.app-shell .noti-layer,
body.native-app-runtime.mobile-mode .noti-layer {
    bottom: calc(84px + env(safe-area-inset-bottom));
}

.chart-header {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 14px 16px 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(11, 24, 36, 0.9), rgba(8, 18, 29, 0.94));
    box-shadow: var(--shadow-panel);
}

.chart-header-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    width: 100%;
    padding-bottom: 10px;
}

/* 자물쇠 버튼을 header-main 우측에 배치 */
#chart-lock-status-btn {
    flex: 0 0 auto;
    align-self: flex-start;
    margin-top: 2px;
}

/* 기존 chart-top-actions 더 이상 flex column 불필요 */
.chart-top-actions {
    display: none;
}

.chart-header-utils {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    align-self: flex-start;
    margin-top: 4px;
}

/* timeframe-selector에 화살표 그룹 우측 정렬 */
.timeframe-selector {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
}

.tf-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.tf-nav-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border: 1px solid rgba(127, 216, 255, 0.2);
    background: rgba(9, 18, 31, 0.6);
    color: rgba(227, 239, 251, 0.9);
    border-radius: 10px;
}

.chart-nav-group {
    display: none;
}

.chart-actions-row {
    display: none;
}

.chart-top-actions .noti-btn,
.chart-top-actions .header-utility-btn,
.chart-top-actions .chart-target-summary-btn,
.chart-top-actions .chart-lock-status-btn,
.chart-top-actions .chart-nav-btn {
    flex: 0 0 auto;
}

.chart-top-actions .noti-count {
    top: -5px;
    right: -3px;
}

.sidebar-trigger,
.mobile-toggle-btn,
.icon-btn,
.noti-btn,
.close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-trigger,
.icon-btn,
.close-btn {
    width: 42px;
    height: 42px;
}

.header-utility-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.header-utility-icon {
    width: 19px;
    height: 19px;
}

.header-utility-btn.active,
.header-utility-btn[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(59, 165, 255, 0.22), rgba(127, 216, 255, 0.12));
    color: var(--accent-cyan);
}

.mobile-toggle-btn:not(.header-utility-btn),
.noti-btn,
.tf-btn {
    height: 40px;
    padding: 0 13px;
}

.symbol-info {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.chart-target-summary-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    flex: 0 0 auto;
}

.chart-nav-btn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(127, 216, 255, 0.18);
    background: rgba(9, 18, 31, 0.72);
    color: rgba(227, 239, 251, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chart-nav-btn:hover,
.chart-nav-btn:focus-visible {
    border-color: rgba(127, 216, 255, 0.34);
    background: rgba(14, 29, 48, 0.9);
    color: #9ddcff;
}

.chart-nav-btn:disabled {
    opacity: 0.34;
    cursor: default;
    pointer-events: none;
}

.chart-nav-btn-icon {
    width: 1.15rem;
    height: 1.15rem;
}

.chart-lock-status-btn {
    width: 58px;
    min-width: 58px;
    height: 58px;
    padding: 0;
    border: 2px solid rgba(255, 215, 96, 0.6);
    background: linear-gradient(180deg, rgba(65, 52, 8, 0.98), rgba(38, 28, 6, 0.96));
    color: #ffe566;
    gap: 0;
    flex: 0 0 auto;
    border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(255, 215, 96, 0.2), 0 10px 22px rgba(0, 0, 0, 0.28), 0 0 20px rgba(255, 200, 40, 0.12);
}

.chart-lock-status-btn.chart-lock-status-unlocked {
    border-color: rgba(111, 221, 157, 0.6);
    background: linear-gradient(180deg, rgba(11, 55, 34, 0.98), rgba(7, 32, 22, 0.96));
    color: #7eedb0;
    box-shadow: 0 0 0 1px rgba(111, 221, 157, 0.2), 0 10px 22px rgba(0, 0, 0, 0.28), 0 0 20px rgba(80, 220, 130, 0.12);
}

.chart-lock-status-btn.chart-lock-status-mixed {
    border-color: rgba(96, 189, 255, 0.38);
    background: linear-gradient(180deg, rgba(10, 37, 60, 0.96), rgba(8, 25, 43, 0.92));
    color: #8dd7ff;
}

.chart-lock-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    line-height: 1;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.18),
        0 10px 20px rgba(0, 0, 0, 0.28);
    flex: 0 0 auto;
}

.chart-lock-status-icon svg {
    width: 1.9rem;
    height: 1.9rem;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-lock-status-btn.chart-lock-status-locked .chart-lock-status-icon {
    background: radial-gradient(circle at 32% 26%, rgba(255, 247, 160, 0.56), rgba(255, 208, 72, 0.28));
    box-shadow:
        inset 0 0 0 1.5px rgba(255, 240, 178, 0.48),
        0 0 0 2px rgba(255, 215, 96, 0.24),
        0 0 26px rgba(255, 196, 61, 0.36);
}

.chart-lock-status-btn.chart-lock-status-unlocked .chart-lock-status-icon {
    background: radial-gradient(circle at 32% 26%, rgba(200, 255, 218, 0.46), rgba(80, 220, 140, 0.22));
    box-shadow:
        inset 0 0 0 1.5px rgba(160, 255, 200, 0.38),
        0 0 0 2px rgba(111, 221, 157, 0.24),
        0 0 26px rgba(88, 226, 140, 0.32);
}

.chart-lock-status-btn.chart-lock-status-mixed .chart-lock-status-icon {
    background: linear-gradient(135deg, rgba(255, 215, 96, 0.26), rgba(96, 189, 255, 0.2));
    box-shadow:
        inset 0 0 0 1px rgba(215, 236, 255, 0.16),
        0 0 0 1px rgba(96, 189, 255, 0.16),
        0 0 18px rgba(96, 189, 255, 0.14);
}

/* 새 심플 자물쇠 SVG 스타일 */
.lock-svg-icon {
    overflow: visible;
}

.lock-body {
    fill: currentColor;
    opacity: 0.92;
    stroke: none;
}

.lock-shackle {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 열린 걸쇠: 오른쪽으로 열림 */
.lock-shackle-open {
    stroke-width: 2.4;
    transform-origin: 16px 7.5px;
    transform: rotate(45deg) translateX(3px);
}

.lock-keyhole {
    fill: none;
    stroke: rgba(0,0,0,0.55);
    stroke-width: 1.8;
    stroke-linecap: round;
}

/* 잠김 상태: body를 황금색으로 */
.chart-lock-status-btn.chart-lock-status-locked .lock-body {
    fill: #ffd84a;
}
.chart-lock-status-btn.chart-lock-status-locked .lock-shackle {
    stroke: #ffd84a;
}
.chart-lock-status-btn.chart-lock-status-locked .lock-keyhole {
    stroke: rgba(100, 60, 0, 0.7);
}

/* 해제 상태: body를 초록색으로 */
.chart-lock-status-btn.chart-lock-status-unlocked .lock-body {
    fill: #5de89a;
}
.chart-lock-status-btn.chart-lock-status-unlocked .lock-shackle {
    stroke: #5de89a;
}
.chart-lock-status-btn.chart-lock-status-unlocked .lock-keyhole {
    stroke: rgba(0, 60, 30, 0.6);
}

/* 이전 스타일 호환 */
.chart-lock-icon-body { fill: #f3c84b; stroke: none; }
.chart-lock-icon-shackle { stroke: #ffdf72; }
.chart-lock-icon-detail { stroke: rgba(127,74,0,0.72); stroke-width: 0.96; }
.chart-lock-icon-keyhole { stroke: #724600; stroke-width: 1.18; }
.chart-lock-icon-accent { stroke: #f4fff9; stroke-width: 1.36; }
.chart-lock-icon-core { fill: currentColor; stroke: none; }

.chart-lock-status-label {
    display: none;
}

.chart-lock-status-count {
    display: none;
}

.chart-target-summary-panel.hidden {
    display: none;
}

body.native-app-runtime .chart-top-actions .expect-toggle-btn,
body.native-app-runtime .chart-top-actions .report-toggle,
body.native-app-runtime .chart-top-actions .final-report-toggle {
    display: none;
}

.chart-target-summary-panel {
    margin: 12px 0 2px;
    padding: 16px 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(11, 20, 34, 0.94), rgba(9, 17, 29, 0.9));
    border: 1px solid rgba(123, 171, 220, 0.14);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
}

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

.chart-target-summary-copy {
    min-width: 0;
}

.chart-target-summary-copy strong {
    display: block;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-primary);
}

.chart-target-summary-copy p {
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.45;
}

.chart-target-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(89, 176, 255, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(89, 176, 255, 0.18);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.chart-target-summary-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.chart-target-summary-metric {
    min-width: 0;
    padding: 12px 13px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-target-summary-metric span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.74rem;
}

.chart-target-summary-metric strong {
    display: block;
    margin-top: 6px;
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 800;
}

.chart-target-summary-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.chart-target-summary-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
}

.chart-target-summary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.chart-target-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 13px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-target-summary-item-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chart-target-summary-item-main strong {
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 800;
}

.chart-target-summary-item-main span,
.chart-target-summary-item-main small {
    color: var(--text-secondary);
    line-height: 1.35;
}

.chart-target-summary-item-main span {
    font-size: 0.78rem;
    font-weight: 700;
}

.chart-target-summary-item-main small {
    font-size: 0.73rem;
}

.chart-target-summary-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.chart-target-summary-mini,
.chart-target-summary-action {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.chart-target-summary-mini:hover,
.chart-target-summary-action:hover {
    transform: translateY(-1px);
    border-color: rgba(89, 176, 255, 0.28);
    background: rgba(89, 176, 255, 0.1);
}

.chart-target-summary-mini {
    min-width: 54px;
    height: 32px;
    padding: 0 11px;
    border-radius: 10px;
    font-size: 0.76rem;
    font-weight: 700;
}

.chart-target-summary-mini.danger {
    border-color: rgba(255, 107, 136, 0.2);
    color: #ff8aa2;
}

.chart-target-summary-mini.danger:hover {
    border-color: rgba(255, 107, 136, 0.32);
    background: rgba(255, 107, 136, 0.12);
}

.chart-target-summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.chart-target-summary-action {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 800;
}

.chart-target-summary-action.primary {
    background: linear-gradient(135deg, rgba(62, 151, 255, 0.18), rgba(71, 196, 255, 0.14));
    border-color: rgba(87, 187, 255, 0.28);
    color: var(--accent-cyan);
}

.chart-target-summary-note,
.chart-target-summary-empty {
    margin-top: 14px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.55;
}

.current-price-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 8px;
    font-size: 1.32rem;
    font-weight: 800;
    line-height: 1.15;
    flex-wrap: wrap;
}

.current-price-main {
    color: var(--text-primary);
    white-space: nowrap;
}

.current-price-change-group {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.current-price-value {
    color: var(--text-primary);
}

.current-price-delta {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
}

.current-price-delta.up {
    color: var(--up-color);
}

.current-price-delta.down {
    color: var(--down-color);
}

.current-price-delta.flat {
    color: var(--text-secondary);
}

.symbol-kicker {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 7px;
}

#current-symbol-name {
    font-size: clamp(1.5rem, 2vw, 2rem);
    line-height: 1.15;
    font-weight: 800;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1rem;
    font-weight: 800;
    white-space: nowrap;
}

.fundamental-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.fundamental-sep {
    color: var(--text-muted);
}

.fundamental-market {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.market-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.market-badge.kospi {
    background: rgba(255, 94, 105, 0.12);
    color: #ff8f97;
}

.market-badge.kosdaq {
    background: rgba(77, 143, 255, 0.14);
    color: #88b6ff;
}

.timeframe-selector {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(4, 12, 20, 0.7);
    overflow: visible;
}

.indicator-trigger {
    gap: 8px;
}

#indicator-toggle-header {
    display: none;
}

.indicator-icon {
    color: var(--accent-cyan);
    font-size: 0.76rem;
    font-weight: 800;
}

.tf-btn {
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 700;
    transition: all 0.18s ease;
}

.tf-settings-btn {
    width: 40px;
    min-width: 40px;
    padding: 0;
}

.tf-settings-btn .header-utility-icon {
    width: 18px;
    height: 18px;
}

.tf-dropdown {
    position: relative;
}

.tf-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tf-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 124px;
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(127, 216, 255, 0.18);
    background: rgba(8, 18, 29, 0.96);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    z-index: 960;
}

.tf-dropdown-menu.open {
    display: flex;
}

.tf-option {
    height: 38px;
    padding: 0 12px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: left;
}

.tf-option:hover {
    background: rgba(255, 255, 255, 0.10);
}

.tf-btn:hover,
.noti-btn:hover,
.mobile-toggle-btn:hover,
.sidebar-trigger:hover,
.icon-btn:hover {
    background: rgba(255, 255, 255, 0.09);
}

.tf-btn.active {
    background: linear-gradient(135deg, rgba(59, 165, 255, 0.26), rgba(127, 216, 255, 0.14));
    color: white;
}

.tf-dropdown-toggle.active {
    background: linear-gradient(135deg, rgba(59, 165, 255, 0.26), rgba(127, 216, 255, 0.14));
    color: white;
}

.mobile-toggle-btn.active,
.expected-toggle {
    color: var(--accent-gold);
}

.report-toggle {
    color: var(--accent-cyan);
}

.final-report-toggle {
    color: #9bd0ff;
    border: 1px solid rgba(155, 208, 255, 0.18);
    background: rgba(155, 208, 255, 0.08);
}

.layer-toggle-btn {
    width: 42px;
    min-width: 42px;
    padding: 0;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.expect-toggle-btn {
    border: 1px solid rgba(255, 209, 102, 0.16);
    background: rgba(255, 209, 102, 0.08);
}

.report-toggle-btn,
.report-toggle {
    border: 1px solid rgba(127, 216, 255, 0.18);
    background: rgba(127, 216, 255, 0.08);
}

.layer-toggle-btn:hover {
    background: rgba(255, 209, 102, 0.14);
}

.expect-toggle-btn:hover {
    border-color: rgba(255, 209, 102, 0.24);
}

.report-toggle:hover {
    background: rgba(127, 216, 255, 0.14);
    border-color: rgba(127, 216, 255, 0.26);
}

.final-report-toggle:hover {
    background: rgba(155, 208, 255, 0.14);
    border-color: rgba(155, 208, 255, 0.26);
}

.layer-toggle-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.08);
}

.noti-btn {
    position: relative;
    font-size: 0.88rem;
    font-weight: 700;
}

.apk-download-btn {
    color: var(--accent-cyan);
    border: 1px solid rgba(127, 216, 255, 0.26);
    background: rgba(127, 216, 255, 0.12);
    text-decoration: none;
}

.apk-download-btn:hover {
    background: rgba(127, 216, 255, 0.18);
    border-color: rgba(127, 216, 255, 0.34);
}

.noti-icon-btn {
    width: 42px;
    min-width: 42px;
    padding: 0;
}

.noti-toggle-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.noti-count {
    position: absolute;
    top: -6px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    background: var(--up-color);
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    border: 2px solid var(--bg-app);
}

.expected-toggle .noti-count {
    background: var(--accent-gold);
    color: #352100;
}

.report-toggle .noti-count {
    background: var(--accent-cyan);
    color: #062633;
}

.chart-stage {
    position: relative;
    flex: 1;
    min-height: 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, #ffffff, #f7f9fc);
    box-shadow: var(--shadow-panel);
    overflow: hidden;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.chart-stage.theme-light {
    border-color: rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, #ffffff, #f7f9fc);
}

.chart-stage.theme-dark {
    border-color: rgba(127, 216, 255, 0.12);
    background:
        radial-gradient(circle at top left, rgba(59, 165, 255, 0.12), transparent 34%),
        linear-gradient(180deg, #08131f, #0b1724 72%, #0d1a28);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

#chart-area {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

#chart {
    flex: 1;
    min-height: 0;
    touch-action: manipulation;
    position: relative;
}

#chart-rs {
    width: 100%;
    height: 100%;
    touch-action: manipulation;
}

.chart-stage.chart-stage-blocked::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 18;
    background: rgba(8, 18, 29, 0.18);
    backdrop-filter: blur(2px);
    pointer-events: none;
}

.chart-stage.chart-stage-blocked #chart,
.chart-stage.chart-stage-blocked .chart-zoom-controls,
.chart-stage.chart-stage-blocked .chart-target-delete-btn {
    pointer-events: none;
}

.chart-zoom-controls {
    position: absolute;
    right: 16px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 14;
    transition: bottom 0.2s ease;
}

.chart-stage.rs-pane-visible .chart-zoom-controls {
    bottom: calc(var(--rs-pane-height, 160px) + 18px);
}

.chart-target-delete-btn {
    position: absolute;
    right: 68px;
    min-width: 56px;
    height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(185, 28, 28, 0.24);
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.94);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 18px 32px rgba(127, 29, 29, 0.28);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    z-index: 15;
}

.chart-target-delete-btn.hidden {
    display: none;
}

.chart-target-delete-btn:hover {
    background: #dc2626;
}

.chart-stage.theme-dark .chart-target-delete-btn {
    border-color: rgba(248, 113, 113, 0.3);
    background: rgba(185, 28, 28, 0.92);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.36);
}

.chart-zoom-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(10px);
}

.chart-zoom-btn:hover {
    background: #ffffff;
}

.chart-stage.theme-dark .chart-zoom-btn {
    background: rgba(8, 19, 31, 0.88);
    border-color: rgba(148, 163, 184, 0.18);
    color: #e5eef8;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.32);
}

.chart-legend {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: min(86%, 960px);
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    font-size: 0.8rem;
    color: #1f2937;
    pointer-events: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chart-stage.volume-profile-on .chart-legend {
    left: 188px;
    max-width: calc(100% - 204px);
}

.chart-stage.theme-dark .chart-legend {
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(8, 19, 31, 0.86);
    color: #e5eef8;
}

.volume-profile {
    position: absolute;
    top: 16px;
    left: 16px;
    bottom: 16px;
    width: 168px;
    min-width: 168px;
    z-index: 4;
    pointer-events: none;
    opacity: 0.96;
    transition: opacity 0.18s ease;
}

.volume-profile.hidden {
    width: 168px;
    min-width: 168px;
    opacity: 0;
    transform: none;
    pointer-events: none;
}

.volume-profile-label {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin-bottom: 8px;
    color: rgba(17, 24, 39, 0.72);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.volume-profile-bars {
    position: relative;
    height: calc(100% - 24px);
    width: 100%;
}

.volume-profile-bar {
    position: absolute;
    left: 0;
    right: auto;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(90deg, rgba(59, 165, 255, 0.62), rgba(59, 165, 255, 0.16));
    box-shadow: 0 0 0 1px rgba(59, 165, 255, 0.08);
}

/* RS Sub-pane overlay */
.rs-sub-pane {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 160px;
    border-top: 2px solid rgba(100, 160, 220, 0.35);
}

.rs-sub-pane.hidden {
    display: none;
}

.rs-pane-handle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    height: 24px;
    padding: 0 10px;
    cursor: ns-resize;
    touch-action: none;
    user-select: none;
    background: rgba(20, 30, 48, 0.08);
    border-bottom: 1px solid rgba(100, 160, 220, 0.1);
}

.rs-pane-handle.resizing {
    background: rgba(59, 165, 255, 0.14);
}

.rs-pane-grip {
    width: 28px;
    height: 3px;
    border-radius: 99px;
    background: rgba(100, 160, 220, 0.35);
    flex-shrink: 0;
}

.rs-pane-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(17, 24, 39, 0.55);
}

.rs-pane-rating {
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: auto;
}

.chart-stage.theme-dark .rs-sub-pane {
    border-top-color: rgba(127, 216, 255, 0.30);
}

.chart-stage.theme-dark .rs-pane-handle {
    background: rgba(8, 19, 31, 0.3);
    border-bottom-color: rgba(127, 216, 255, 0.08);
}

.chart-stage.theme-dark .rs-pane-handle.resizing {
    background: rgba(59, 165, 255, 0.2);
}

.chart-stage.theme-dark .rs-pane-grip {
    background: rgba(127, 216, 255, 0.3);
}

.chart-stage.theme-dark .rs-pane-title {
    color: rgba(220, 231, 243, 0.5);
}

.chart-stage.theme-dark .volume-profile-label {
    color: rgba(220, 231, 243, 0.72);
}

.chart-stage.theme-dark .volume-profile-bar {
    background: linear-gradient(90deg, rgba(127, 216, 255, 0.7), rgba(127, 216, 255, 0.18));
    box-shadow: 0 0 0 1px rgba(127, 216, 255, 0.1);
}

.chart-settings-panel {
    display: none;
    position: absolute;
    top: 98px;
    right: 0;
    width: min(420px, calc(100vw - 44px));
    max-height: calc(100vh - 170px);
    padding: 20px 22px 22px;
    border-radius: 24px;
    border: 1px solid rgba(127, 216, 255, 0.18);
    background:
        radial-gradient(circle at top left, rgba(59, 165, 255, 0.12), transparent 42%),
        rgba(8, 18, 29, 0.96);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px);
    overflow-y: auto;
    z-index: 950;
}

.chart-settings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.chart-settings-copy h3 {
    font-size: 1.05rem;
    font-weight: 800;
}

.chart-settings-copy p {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.chart-settings-panel .indicator-content,
.chart-settings-panel.indicator-content {
    padding: 0;
}

.chart-settings-panel .indicator-group + .indicator-group {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.chart-settings-panel .indicator-utility {
    margin-top: 18px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025));
}

.noti-layer {
    position: fixed;
    top: 28px;
    right: 28px;
    width: min(420px, calc(100vw - 24px));
    max-height: min(760px, calc(100vh - 56px));
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    border: 1px solid rgba(127, 216, 255, 0.18);
    background: rgba(8, 18, 29, 0.95);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px);
    overflow: hidden;
    z-index: 1100;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-settings-layer {
    width: min(460px, calc(100vw - 24px));
}

.app-settings-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.app-settings-card {
    gap: 14px;
}

.app-settings-card-order-common {
    order: 1;
}

.app-settings-card-order-alert {
    order: 2;
}

.app-settings-card-order-mock {
    order: 3;
}

.app-settings-card-order-real {
    order: 4;
}

.app-settings-card-head {
    margin-bottom: 10px;
}

.app-settings-accordion-toggle {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.app-settings-accordion-toggle:hover .expected-heading-label {
    color: #9be7ff;
}

.app-settings-accordion-icon {
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 4px;
    border-radius: 999px;
    border: 1px solid rgba(127, 216, 255, 0.2);
    background: rgba(127, 216, 255, 0.08);
}

.app-settings-accordion-icon::before,
.app-settings-accordion-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 1.5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-settings-accordion-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.app-settings-accordion.is-collapsed .app-settings-accordion-icon::after {
    opacity: 1;
}

.app-settings-accordion:not(.is-collapsed) .app-settings-accordion-icon::after {
    opacity: 0;
}

.app-settings-accordion-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-settings-accordion-body[hidden] {
    display: none;
}

.app-settings-section-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-settings-section-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-cyan);
}

.app-settings-inline-copy {
    margin: -2px 0 0;
}

.app-settings-meta-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.app-settings-row span {
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 600;
}

.app-settings-row strong {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 800;
    text-align: right;
    word-break: break-all;
}

.app-settings-row strong[data-tone="success"] {
    color: #84e0b4;
}

.app-settings-row strong[data-tone="warning"] {
    color: #ffd37f;
}

.app-settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.app-settings-toggle-row .setting-copy {
    min-width: 0;
}

.app-settings-toggle-row .switch {
    flex: 0 0 auto;
}

.app-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.app-settings-actions .btn,
.app-settings-actions .ghost-btn {
    flex: 1 1 0;
}

.app-settings-sub-label {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin: 14px 0 8px;
}

.app-settings-parse-copy {
    margin: 0 0 10px;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.55;
}

.app-settings-parse-input {
    width: 100%;
    min-height: 90px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.88rem;
    padding: 10px 12px;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
}

.app-settings-parse-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.28);
}

.app-settings-parse-btn {
    margin-top: 10px;
    width: 100%;
}

/* 자동 등록 히스토리 */
.auto-register-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auto-register-history-empty {
    font-size: 0.84rem;
    color: var(--text-secondary);
    padding: 10px 0 2px;
}

.arh-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.arh-item:active {
    background: rgba(255, 255, 255, 0.08);
}

.arh-item.arh-unread {
    border-color: rgba(94, 207, 161, 0.3);
}

.arh-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.arh-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.arh-chips {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.arh-chip {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

.arh-chip-ok {
    background: rgba(94, 207, 161, 0.18);
    color: #5de89a;
}

.arh-chip-fail {
    background: rgba(255, 100, 100, 0.18);
    color: #ff8a8a;
}

.arh-chip-nolist {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-secondary);
}

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

.arh-body {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 등록 결과 모달 */
.rrm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.rrm-modal {
    width: 100%;
    max-width: 640px;
    height: min(78vh, 760px);
    max-height: calc(100vh - 36px);
    background: var(--surface-card, #1e2230);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.rrm-header {
    padding: 18px 18px 10px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.rrm-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    padding-right: 32px;
}

.rrm-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.rrm-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}

.rrm-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 18px 18px;
}

.rrm-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.rrm-section-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.rrm-count-badge {
    font-size: 0.74rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
}

.rrm-badge-success {
    background: rgba(94, 207, 161, 0.2);
    color: #5de89a;
}

.rrm-badge-fail {
    background: rgba(255, 100, 100, 0.2);
    color: #ff8a8a;
}

.rrm-badge-neutral {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.rrm-stock-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rrm-stock-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.rrm-stock-chip strong,
.rrm-stock-chip span,
.rrm-stock-chip small {
    line-height: 1.2;
}

.rrm-stock-chip small {
    color: inherit;
    opacity: 0.78;
}

.rrm-chip-success {
    background: rgba(94, 207, 161, 0.18);
    color: #5de89a;
}

.rrm-chip-success:active {
    opacity: 0.7;
}

.rrm-empty-msg {
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.rrm-fail-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rrm-fail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 7px 12px;
    border-radius: 10px;
    border: 0;
    background: rgba(255, 100, 100, 0.07);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    gap: 8px;
}

.rrm-fail-item:active,
.rrm-fail-item:focus-visible {
    background: rgba(255, 100, 100, 0.12);
    outline: 1px solid rgba(255, 138, 138, 0.35);
}

.rrm-fail-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rrm-fail-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
}

.rrm-fail-symbol {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.rrm-fail-reason {
    font-size: 0.78rem;
    color: #ff8a8a;
    font-weight: 600;
    flex-shrink: 0;
    text-align: right;
}

.rrm-original {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.rrm-original-focus {
    border-color: rgba(127, 216, 255, 0.58);
    box-shadow: 0 0 0 3px rgba(127, 216, 255, 0.12);
}

.rrm-original summary {
    padding: 10px 12px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 800;
}

.rrm-original pre {
    margin: 0;
    padding: 0 12px 12px;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}

.rrm-original-empty {
    color: var(--text-secondary);
    font-size: 0.82rem;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.rrm-footer {
    display: flex;
    gap: 10px;
    padding: 12px 18px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.rrm-footer .btn,
.rrm-footer .ghost-btn {
    flex: 1 1 0;
}

.app-settings-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.app-settings-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.app-settings-field span {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
}

.app-settings-field input {
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 13, 23, 0.82);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
}

.app-settings-field select {
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 13, 23, 0.82);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
}

.app-settings-field input:focus {
    outline: none;
    border-color: rgba(127, 216, 255, 0.28);
    box-shadow: 0 0 0 2px rgba(127, 216, 255, 0.12);
}

.app-settings-field select:focus {
    outline: none;
    border-color: rgba(127, 216, 255, 0.28);
    box-shadow: 0 0 0 2px rgba(127, 216, 255, 0.12);
}

.app-settings-field-disabled {
    opacity: 0.55;
}

.app-settings-trading-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.app-settings-trading-grid {
    margin-top: 0;
}

.app-settings-trading-mode-note {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.app-settings-trading-sell-master {
    margin-top: 4px;
    border: 1px solid rgba(244, 67, 54, 0.18);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(244, 67, 54, 0.05);
}

.app-settings-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-settings-summary {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(127, 216, 255, 0.08);
    border: 1px solid rgba(127, 216, 255, 0.12);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.5;
}

.noti-layer.hidden {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
    pointer-events: none;
}

/* 웹 전용 알림 팝업 패널 */
.web-noti-panel {
    position: fixed;
    top: 56px;
    right: 12px;
    width: min(420px, calc(100vw - 24px));
    max-height: min(680px, calc(100vh - 80px));
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    border: 1px solid rgba(127, 216, 255, 0.18);
    background: rgba(8, 18, 29, 0.97);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    overflow: hidden;
    z-index: 1200;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.web-noti-panel .noti-list {
    overflow-y: auto;
    flex: 1 1 0;
}
.web-noti-panel.hidden {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    pointer-events: none;
}

/* 네이티브 앱 런타임에서는 웹 알림 버튼 숨기기 */
body.native-app-runtime #web-noti-btn {
    display: none;
}

.expected-layer {
    border-color: rgba(255, 209, 102, 0.2);
}

.report-layer {
    border-color: rgba(127, 216, 255, 0.2);
}

.noti-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.flyout-heading h3 {
    font-size: 1.08rem;
    font-weight: 800;
}

.flyout-heading p,
.expected-info {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.threshold-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 209, 102, 0.08);
    border: 1px solid rgba(255, 209, 102, 0.14);
    color: var(--accent-gold);
    font-size: 0.78rem;
    font-weight: 700;
}

.expected-option-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(127, 216, 255, 0.08);
    border: 1px solid rgba(127, 216, 255, 0.14);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
}

.threshold-box input {
    width: 52px;
    min-width: 52px;
    padding: 7px 8px;
    border-radius: 10px;
    text-align: center;
}

.compact-switch {
    width: 46px;
    height: 28px;
}

.compact-switch .switch-slider::after {
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
}

.compact-switch input:checked + .switch-slider::after {
    transform: translateX(18px);
}

.mini-btn {
    width: 30px;
    height: 30px;
    border-radius: 999px;
}

.noti-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 14px;
}

.app-alert-center-shell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 0%;
    min-height: 0;
}

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

.app-alert-summary-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.app-alert-summary-card span,
.app-alert-card-meta,
.app-alert-card-footer {
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.app-alert-summary-card strong {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.app-alert-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 0;
    margin-bottom: -2px;
}

.app-alert-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.70rem;
    font-weight: 700;
    white-space: nowrap;
}

.app-alert-filter-chip strong {
    color: var(--text-primary);
}

.app-alert-filter-chip.active {
    border-color: rgba(127, 216, 255, 0.24);
    background: rgba(127, 216, 255, 0.1);
    color: var(--accent-cyan);
}

/* 매수/매도 알림 카드 (개편) */
.oe-card {
    cursor: pointer;
    display: flex !important;
    flex-direction: row !important;
    padding: 0 !important;
    overflow: hidden;
    gap: 0 !important;
}
.oe-card.oe-broker-mock {
    border-color: rgba(255, 171, 64, 0.26);
    box-shadow: inset 0 0 0 1px rgba(255, 171, 64, 0.08);
}
.oe-card.oe-broker-real {
    border-color: rgba(78, 156, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(78, 156, 255, 0.07);
}
.oe-card.oe-broker-mock .oe-body {
    background: linear-gradient(180deg, rgba(255, 166, 0, 0.06) 0%, rgba(255, 166, 0, 0.03) 100%);
}
.oe-card.oe-broker-real .oe-body {
    background: linear-gradient(180deg, rgba(78, 156, 255, 0.06) 0%, rgba(78, 156, 255, 0.03) 100%);
}
.oe-side-bar {
    width: 4px;
    flex-shrink: 0;
    border-radius: 8px 0 0 8px;
}
.oe-body {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.oe-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.oe-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.oe-side-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid;
    white-space: nowrap;
}
.oe-status-badge {
    font-size: 0.72rem;
    font-weight: 600;
}
.oe-name-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.oe-name {
    font-size: 0.92rem;
    color: var(--text-primary);
}
.oe-code {
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.oe-return {
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: auto;
}
.oe-up { color: var(--mock-up, #37c690); }
.oe-down { color: var(--mock-down, #ff7f7f); }

.oe-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.oe-price {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}
.oe-qty, .oe-amount {
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.oe-reason {
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.oe-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}
.oe-time {
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.7;
}
.oe-orderno {
    font-size: 0.68rem;
    color: var(--text-secondary);
    opacity: 0.5;
}
/* 매수는 파란 사이드바, 매도는 오렌지 사이드바 — oe-side-bar 인라인 스타일로 처리 */
.oe-card.order-fail .oe-body { opacity: 0.8; }
.aac-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-alert-stream {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
}

.app-alert-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-alert-section-title {
    padding: 0 2px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-alert-card-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-alert-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    text-align: left;
}

.aac-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.aac-name-stack {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    flex: 1 1 auto;
}

.aac-name-wrap {
    gap: 7px;
}

.aac-summary {
    line-height: 1.45;
}

.aac-meta-summary {
    color: #95f0c3;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.45;
}

.aac-footnote {
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.4;
}

/* 컴팩트 카드 레이아웃 */
.aac-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.aac-top {
    justify-content: space-between;
}
.aac-name-group {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}
.aac-name {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 168px;
}
.aac-symbol {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.aac-price-row {
    gap: 8px;
    justify-content: space-between;
}
.aac-price-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.aac-cp {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}
.aac-cr {
    font-size: 0.80rem;
    font-weight: 700;
}
.aac-score-rs {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    white-space: normal;
}
.aac-score {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.aac-rs {
    font-size: 0.72rem;
    font-weight: 700;
}
.aac-strength,
.aac-meta-sep {
    font-size: 0.72rem;
    color: var(--text-secondary);
}
.aac-detail-row {
    gap: 6px;
}
.aac-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-shrink: 0;
}
.aac-target {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--accent-cyan, #7fd8ff);
}
.aac-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.app-alert-card.unread {
    border-color: rgba(127, 216, 255, 0.24);
    background: rgba(127, 216, 255, 0.08);
}

.app-alert-card.read {
    opacity: 0.84;
}

.app-alert-card-top,
.app-alert-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.app-alert-card-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.app-alert-card-copy strong,
.app-alert-card-headline {
    color: var(--text-primary);
}

.app-alert-card-copy span {
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.app-alert-card-headline {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.45;
}

.noti-date-divider {
    padding: 6px 4px 2px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.noti-item {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    padding: 14px 15px;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.noti-item.unread {
    border-color: rgba(59, 165, 255, 0.18);
    background: rgba(59, 165, 255, 0.08);
}

.noti-item.read {
    opacity: 0.72;
}

.noti-item.clickable:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.06);
}

.item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.item-header-copy {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.item-time {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.item-content {
    color: var(--text-primary);
    font-size: 0.93rem;
    line-height: 1.5;
}

.item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.item-meta-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    align-items: center;
}

.item-meta-grid span {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.item-meta-grid strong {
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 800;
}

.item-action {
    margin-top: 10px;
    color: var(--accent-cyan);
    font-size: 0.8rem;
    font-weight: 700;
}

.noti-stage-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.noti-stage-badge.positive {
    border-color: rgba(78, 202, 124, 0.18);
    background: rgba(78, 202, 124, 0.14);
    color: #76f3a7;
}

.noti-stage-badge.warning {
    border-color: rgba(255, 209, 102, 0.2);
    background: rgba(255, 209, 102, 0.14);
    color: #ffe29a;
}

.noti-stage-badge.accent {
    border-color: rgba(127, 216, 255, 0.18);
    background: rgba(127, 216, 255, 0.12);
    color: var(--accent-cyan);
}

.alert-rs-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    vertical-align: middle;
}

.expected-card {
    border-color: rgba(255, 209, 102, 0.12);
}

.expected-card-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.expected-name {
    font-size: 1rem;
    font-weight: 800;
}

.expected-copy {
    flex: 1;
    min-width: 0;
    gap: 3px;
}

.expected-style-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin-top: 0;
}

.expected-style-summary {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.3;
}

.expected-style-leader-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255, 209, 102, 0.12);
    border: 1px solid rgba(255, 209, 102, 0.2);
    color: #ffe29a;
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.expected-rank-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(127, 216, 255, 0.12);
    color: var(--accent-cyan);
    font-size: 0.72rem;
    font-weight: 800;
}

.expected-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 86px;
    text-align: right;
}

.expected-raw-btn {
    width: 34px;
    height: 34px;
    margin-bottom: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 209, 102, 0.16);
    border-radius: 12px;
    background: rgba(255, 209, 102, 0.08);
    color: var(--accent-gold);
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.expected-raw-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: rgba(255, 209, 102, 0.14);
    border-color: rgba(255, 209, 102, 0.24);
    color: #ffe29a;
}

.expected-raw-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.expected-raw-btn svg {
    width: 17px;
    height: 17px;
}

.expected-gap {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 800;
}

#expected-list > .empty-noti {
    display: none;
}

.expected-section-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.expected-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 2px 0;
}

.expected-sort-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.expected-sort-chip {
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.expected-sort-chip.active {
    background: var(--accent-cyan, #3ba5ff);
    border-color: var(--accent-cyan, #3ba5ff);
    color: #fff;
}

#expected-refresh-btn.is-loading {
    opacity: 0.72;
    cursor: progress;
}

.collapsible-section-head {
    width: 100%;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.expected-section-head h4 {
    display: none;
}

.expected-heading-label {
    font-size: 0.95rem;
    font-weight: 800;
}

.expected-section-copy {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}

.compact-empty {
    padding: 18px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.report-date-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-date-chip {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.report-date-chip:hover {
    transform: translateY(-1px);
    color: var(--text-primary);
    border-color: rgba(127, 216, 255, 0.18);
    background: rgba(127, 216, 255, 0.08);
}

.report-date-chip.active {
    color: #281800;
    border-color: rgba(255, 209, 102, 0.28);
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.95), rgba(255, 230, 160, 0.88));
    box-shadow: 0 10px 24px rgba(255, 209, 102, 0.16);
}

.final-report-history-view {
    margin-top: 12px;
}

.final-report-history-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.final-report-history-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.final-report-history-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.final-report-history-title-row strong {
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--text-primary);
}

.final-report-history-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(127, 216, 255, 0.16);
    background: rgba(127, 216, 255, 0.08);
    color: var(--accent-cyan);
    font-size: 0.72rem;
    font-weight: 800;
}

.final-report-history-copy {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}

.final-report-history-subtitle {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.5;
}

.final-report-history-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.final-report-history-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(127, 216, 255, 0.16);
    background: rgba(127, 216, 255, 0.08);
    color: var(--accent-cyan);
    font-size: 0.76rem;
    font-weight: 800;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

.final-report-history-link:hover {
    border-color: rgba(127, 216, 255, 0.24);
    background: rgba(127, 216, 255, 0.14);
}

.final-report-history-link.danger,
.app-report-hero-btn.danger {
    border-color: rgba(255, 107, 136, 0.2);
    background: rgba(255, 107, 136, 0.08);
    color: #ff9bb1;
}

.final-report-history-link.danger:hover,
.app-report-hero-btn.danger:hover {
    border-color: rgba(255, 107, 136, 0.34);
    background: rgba(255, 107, 136, 0.14);
}

.final-report-history-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.final-report-history-metric {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.final-report-history-metric span {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.final-report-history-metric strong {
    display: block;
    margin-top: 5px;
    color: var(--text-primary);
    font-size: 0.94rem;
    font-weight: 800;
}

.final-report-history-metric small {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    line-height: 1.35;
}

.final-report-history-preview {
    border-radius: 18px;
    overflow: hidden;
    background: rgba(5, 12, 19, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.final-report-history-sheet {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    align-items: start;
}

.final-report-history-section {
    padding: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.final-report-history-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    margin: 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

.final-report-history-section-head:hover {
    background: rgba(255, 255, 255, 0.04);
}

.final-report-history-section-head h5 {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 800;
}

.final-report-section-head-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.final-report-history-section-head .section-count {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
}

.final-report-history-section-head .section-arrow {
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: transform 0.18s ease;
}

.final-report-history-section.open .section-arrow {
    transform: rotate(90deg);
}

.final-report-history-section-body {
    padding: 0 12px 12px;
}

.final-report-history-section.collapsed .final-report-history-section-body {
    display: none;
}

.final-report-history-table-wrap {
    overflow-x: auto;
}

.final-report-history-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.final-report-history-table th,
.final-report-history-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
}

.final-report-history-table th {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
}

.final-report-history-table td {
    color: var(--text-primary);
    font-size: 0.8rem;
}

.final-report-history-table tbody tr:last-child td {
    border-bottom: none;
}

.final-report-history-empty {
    padding: 12px;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-align: center;
}

.report-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.final-report-layer .expected-section-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.final-report-layer.final-report-flow-mode #app-final-report-hero,
.final-report-layer.final-report-flow-mode #final-report-archive-section {
    display: none;
}

.final-report-layer.final-report-flow-mode {
    flex: 1 1 0%;
    min-height: 0;
}

.final-report-layer.final-report-flow-mode #final-report-list,
.final-report-layer.final-report-flow-mode #breakout-flow-section,
.final-report-layer.final-report-flow-mode #breakout-flow-section-body {
    flex: 1 1 0%;
    min-height: 0;
}

.final-report-layer.final-report-flow-mode #breakout-flow-section-body {
    display: flex;
    flex-direction: column;
}

.final-report-layer.final-report-archive-mode #breakout-flow-section {
    display: none;
}

.final-report-archive-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.final-report-archive-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.final-report-archive-section-head strong {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 800;
}

.final-report-archive-section-head span {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
}

.final-report-archive-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(4, 10, 18, 0.82);
}

.final-report-archive-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.final-report-archive-table th,
.final-report-archive-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.final-report-archive-table th {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.04);
}

.final-report-archive-table td {
    color: var(--text-primary);
    font-size: 0.76rem;
    line-height: 1.45;
}

.final-report-archive-table tbody tr:last-child td {
    border-bottom: none;
}

.locked-target-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
}

.locked-target-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(9, 20, 36, 0.82);
    scroll-margin-top: 18px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.locked-target-card--position-only {
    border-style: dashed;
    border-color: rgba(111, 221, 157, 0.28);
    background: rgba(111, 221, 157, 0.06);
}

.locked-target-card.is-revealed {
    border-color: rgba(255, 215, 96, 0.6);
    box-shadow: 0 0 0 1px rgba(255, 215, 96, 0.26), 0 0 0 6px rgba(255, 215, 96, 0.08), 0 18px 28px rgba(7, 16, 29, 0.36);
    transform: translateY(-2px);
}

.locked-target-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.locked-target-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.locked-target-copy strong {
    font-size: 0.98rem;
    color: var(--text-primary);
}

.locked-target-copy span {
    font-size: 0.76rem;
    color: var(--text-secondary);
}

.locked-target-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.locked-target-status.status-locked,
.locked-target-status.locked-target-status-locked {
    background: rgba(255, 193, 7, 0.16);
    color: #ffd54f;
}

.locked-target-status.status-rearmed,
.locked-target-status.status-manual_unlock,
.locked-target-status.locked-target-status-rearmed,
.locked-target-status.locked-target-status-manual {
    background: rgba(76, 175, 80, 0.16);
    color: #8de5a1;
}

.locked-target-meta {
    display: grid;
    grid-template-columns: minmax(82px, auto) 1fr;
    gap: 6px 10px;
    font-size: 0.78rem;
}

.locked-target-meta span {
    color: var(--text-muted);
}

.locked-target-meta span[data-tone="positive"] {
    color: var(--color-up, #ff5e69);
}

.locked-target-meta span[data-tone="negative"] {
    color: var(--color-down, #4d8fff);
}

.locked-target-meta strong {
    color: var(--text-primary);
}

.locked-target-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.locked-target-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.locked-target-toolbar-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
}

.locked-target-toolbar-copy strong {
    color: var(--text-primary);
    font-size: 0.84rem;
}

.locked-target-toolbar-copy span {
    color: var(--text-muted);
    font-weight: 600;
}

.locked-target-filterbar {
    display: flex;
    flex: 1 1 320px;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: min(100%, 280px);
}

.locked-target-search,
.locked-target-select {
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
}

.locked-target-search {
    flex: 1 1 150px;
    min-width: 140px;
    padding: 0 10px;
}

.locked-target-select {
    flex: 1 1 92px;
    min-width: 86px;
    max-width: 140px;
    padding: 0 8px;
}

.locked-target-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.locked-target-action-btn {
    min-height: 36px;
    border: 2px solid rgba(59, 165, 255, 0.35);
    background: rgba(59, 165, 255, 0.12);
    color: var(--accent-cyan);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.74rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    cursor: pointer;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
}

.locked-target-action-btn:disabled {
    opacity: 0.44;
    cursor: not-allowed;
    transform: none;
}

.locked-target-action-btn.icon-only {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.locked-target-action-btn.icon-only svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.locked-target-action-btn.secondary {
    border-color: rgba(255, 215, 96, 0.28);
    background: rgba(255, 215, 96, 0.12);
    color: #ffe08a;
}

.locked-target-action-btn.lock-state-lock {
    border: 2px solid rgba(255, 215, 96, 0.7);
    background: rgba(255, 215, 96, 0.14);
    color: #ffe566;
    box-shadow: 0 0 8px rgba(255, 200, 40, 0.15);
    min-width: 96px;
}

.locked-target-action-btn.lock-state-unlock {
    border: 2px solid rgba(111, 221, 157, 0.7);
    background: rgba(111, 221, 157, 0.12);
    color: #7eedb0;
    box-shadow: 0 0 8px rgba(80, 220, 130, 0.15);
    min-width: 96px;
}

.locked-target-action-btn.danger {
    border-color: rgba(255, 122, 122, 0.32);
    background: rgba(255, 122, 122, 0.12);
    color: #ffb3b3;
}

.locked-target-action-btn.cleanup {
    border-color: rgba(255, 215, 96, 0.36);
    background: rgba(255, 215, 96, 0.13);
    color: #ffe08a;
}

.breached-cleanup-sheet {
    width: min(720px, calc(100vw - 28px));
    max-height: min(760px, calc(100vh - 42px));
}

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

.breached-cleanup-summary div {
    min-width: 0;
    border: 1px solid rgba(80, 190, 255, 0.2);
    border-radius: 8px;
    background: rgba(80, 190, 255, 0.08);
    padding: 10px 12px;
}

.breached-cleanup-summary span,
.breached-cleanup-message,
.breached-cleanup-warning,
.breached-cleanup-more {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
}

.breached-cleanup-summary strong {
    display: block;
    margin-top: 2px;
    color: var(--text-primary);
    font-size: 1rem;
}

.breached-cleanup-message {
    color: #8ee3ff;
}

.breached-cleanup-warning {
    color: #ffd58a;
}

.breached-cleanup-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow: auto;
    padding-right: 2px;
}

.breached-cleanup-row {
    display: grid;
    grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.8fr);
    gap: 10px;
    align-items: start;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    padding: 10px 12px;
}

.breached-cleanup-name,
.breached-cleanup-meta {
    min-width: 0;
}

.breached-cleanup-name strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.breached-cleanup-name span,
.breached-cleanup-meta span {
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
}

.breached-cleanup-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 10px;
}

.breached-cleanup-meta strong {
    color: var(--text-muted);
}

.breached-cleanup-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 720px) {
    .breached-cleanup-row {
        grid-template-columns: 1fr;
    }

    .breached-cleanup-meta {
        grid-template-columns: 1fr;
    }
}

.locked-target-broker-summary {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.72rem;
    font-weight: 700;
}

.locked-targets-screen-section {
    margin-top: 16px;
    display: flex;
    flex: 1 1 0%;
    flex-direction: column;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.report-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-filter-chip {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 800;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.report-filter-chip:hover,
.report-filter-chip.active {
    transform: translateY(-1px);
    border-color: rgba(127, 216, 255, 0.22);
    background: rgba(127, 216, 255, 0.12);
    color: var(--text-primary);
}

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

.report-select-wrap,
.report-toggle-pill {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
}

.report-select-wrap {
    min-width: 0;
}

.report-sort-select {
    min-width: 154px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-weight: 800;
}

.report-sort-select option {
    background: #08131f;
    color: var(--text-primary);
}

.report-toggle-pill input {
    accent-color: var(--accent-blue);
}

.report-surface-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
}

.app-report-hero {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-report-hero:empty {
    display: none;
}

.app-report-hero-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(127, 216, 255, 0.18);
    background:
        radial-gradient(circle at top right, rgba(127, 216, 255, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(11, 24, 36, 0.94), rgba(8, 18, 29, 0.96));
}

body.native-app-runtime #app-report-hero,
body.native-app-runtime #app-final-report-hero {
    flex: 0 0 auto;
    min-height: 0;
}

body.native-app-runtime #app-report-hero .app-report-hero-card,
body.native-app-runtime #app-final-report-hero .app-report-hero-card {
    min-height: 0;
    justify-content: flex-start;
}

.final-report-hero-card {
    border-color: rgba(155, 208, 255, 0.2);
    background:
        radial-gradient(circle at top right, rgba(155, 208, 255, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(11, 24, 36, 0.94), rgba(8, 18, 29, 0.96));
}

.app-report-hero-card.empty {
    border-style: dashed;
}

.app-report-hero-top,
.app-report-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.app-report-hero-top {
    align-items: flex-start;
    justify-content: space-between;
}

.app-report-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.app-report-hero-kicker {
    color: var(--accent-cyan);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-report-hero-copy strong {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.45;
}

.app-report-hero-copy span {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}

.app-report-hero-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(127, 216, 255, 0.18);
    background: rgba(127, 216, 255, 0.1);
    color: var(--accent-cyan);
    font-size: 0.74rem;
    font-weight: 800;
}

.app-report-hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.app-report-hero-notes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.app-report-hero-metric,
.app-report-note {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 12px 13px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.04);
}

.app-report-hero-metric span,
.app-report-note span {
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 700;
}

.app-report-hero-metric strong,
.app-report-note strong {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
}

.app-report-hero-metric small {
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.4;
}

.app-report-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
}

.app-report-hero-btn:hover {
    border-color: rgba(127, 216, 255, 0.2);
    background: rgba(127, 216, 255, 0.08);
}

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

.report-surface-heading,
.report-surface-detail-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.report-surface-kicker {
    color: var(--accent-cyan);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.report-surface-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.42;
}

.report-surface-meta,
.report-surface-detail-copy {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.5;
}

.report-surface-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.report-surface-stat-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-surface-stat-card {
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.report-surface-stat-label,
.report-surface-detail-label {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
}

.report-surface-stat-value {
    display: block;
    margin-top: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.report-surface-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-surface-detail-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-surface-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.report-surface-detail-title {
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.5;
}

.breakout-flow-chart-host,
.breakout-flow-table-wrap,
.breakout-flow-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.breakout-flow-date-chips {
    margin-bottom: 4px;
}

.breakout-flow-table-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(8, 17, 28, 0.72);
}

.breakout-flow-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    color: var(--text-primary);
    font-size: 0.8rem;
}

.breakout-flow-table th,
.breakout-flow-table td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.breakout-flow-table th {
    color: var(--text-secondary);
    font-weight: 800;
    background: rgba(15, 23, 42, 0.78);
}

.breakout-flow-table td strong,
.breakout-flow-table td span {
    display: block;
}

.breakout-flow-table td span {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.breakout-flow-table td.positive,
.breakout-flow-table td.positive strong {
    color: #69e7b0;
}

.breakout-flow-table td.negative,
.breakout-flow-table td.negative strong {
    color: #ff9e9e;
}

.breakout-flow-table tbody tr {
    cursor: pointer;
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.breakout-flow-table tbody tr:hover,
.breakout-flow-table tbody tr.selected {
    background: rgba(91, 188, 255, 0.08);
}

.breakout-flow-table tbody tr.selected td:first-child {
    box-shadow: inset 3px 0 0 rgba(91, 188, 255, 0.9);
}

.breakout-flow-judge-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 260px;
}

.breakout-flow-judge-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 25px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 800;
}

.breakout-flow-judge-chip strong {
    color: inherit;
    font-size: 0.7rem;
}

.breakout-flow-judge-chip.pass {
    color: #69e7b0;
    border-color: rgba(105, 231, 176, 0.2);
    background: rgba(105, 231, 176, 0.08);
}

.breakout-flow-judge-chip.fail {
    color: #ff9e9e;
    border-color: rgba(255, 158, 158, 0.2);
    background: rgba(255, 158, 158, 0.08);
}

.breakout-flow-chart-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(8, 18, 30, 0.96), rgba(6, 14, 24, 0.92));
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.16);
}

.breakout-flow-chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

.breakout-flow-chart-series {
    cursor: pointer;
    transition: opacity 0.16s ease;
}

.breakout-flow-chart-series.dimmed {
    opacity: 0.65;
}

.breakout-flow-chart-caption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.45;
}

.breakout-flow-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
}

.breakout-flow-chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
}

button.breakout-flow-chart-legend-item {
    appearance: none;
    font-family: inherit;
}

.breakout-flow-chart-legend-item.active {
    color: #eaf7ff;
    border-color: rgba(91, 188, 255, 0.36);
    background: rgba(91, 188, 255, 0.12);
}

.breakout-flow-chart-legend-item.dimmed {
    opacity: 0.45;
}

.breakout-flow-chart-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

.breakout-flow-card {
    gap: 16px;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.breakout-flow-card.selected {
    border-color: rgba(91, 188, 255, 0.36);
    background: linear-gradient(180deg, rgba(91, 188, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow: 0 18px 42px rgba(91, 188, 255, 0.1);
}

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

.breakout-flow-card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.breakout-flow-card-title strong {
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 800;
}

.breakout-flow-card-close {
    flex-shrink: 0;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.86rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.breakout-flow-card-close.positive {
    color: #69e7b0;
    border-color: rgba(105, 231, 176, 0.18);
    background: rgba(105, 231, 176, 0.08);
}

.breakout-flow-card-close.negative {
    color: #ff9e9e;
    border-color: rgba(255, 158, 158, 0.18);
    background: rgba(255, 158, 158, 0.08);
}

.breakout-flow-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.breakout-flow-stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 13px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.035);
}

.breakout-flow-stat-card span {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
}

.breakout-flow-stat-card strong {
    color: var(--text-primary);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.3;
}

.breakout-flow-stat-card small {
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.35;
}

.breakout-flow-stat-card.positive strong {
    color: #69e7b0;
}

.breakout-flow-stat-card.negative strong {
    color: #ff9e9e;
}

.breakout-flow-indicator-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.breakout-flow-indicator-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.breakout-flow-indicator-head {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 800;
}

.breakout-flow-indicator-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.45;
}

.breakout-flow-indicator-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(127, 216, 255, 0.12);
    background: rgba(7, 17, 28, 0.45);
}

.breakout-flow-indicator-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.breakout-flow-indicator-toolbar > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.breakout-flow-indicator-toolbar span {
    color: var(--accent-info);
    font-size: 0.72rem;
    font-weight: 800;
}

.breakout-flow-indicator-toolbar strong {
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.35;
}

.breakout-flow-indicator-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.breakout-flow-indicator-chip {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 62px;
    padding: 10px 11px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.035);
}

.breakout-flow-indicator-chip span,
.breakout-flow-indicator-chip small {
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.3;
}

.breakout-flow-indicator-chip strong {
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.25;
}

.breakout-flow-indicator-chip.positive {
    border-color: rgba(105, 231, 176, 0.2);
    background: rgba(105, 231, 176, 0.075);
}

.breakout-flow-indicator-chip.positive strong {
    color: #69e7b0;
}

.breakout-flow-indicator-chip.warning {
    border-color: rgba(255, 207, 90, 0.22);
    background: rgba(255, 207, 90, 0.075);
}

.breakout-flow-indicator-chip.warning strong {
    color: #ffcf5a;
}

.breakout-flow-indicator-chip.negative {
    border-color: rgba(255, 158, 158, 0.22);
    background: rgba(255, 158, 158, 0.075);
}

.breakout-flow-indicator-chip.negative strong {
    color: #ff9e9e;
}

.breakout-flow-indicator-detail-toggle {
    min-height: 38px;
    border: 1px solid rgba(127, 216, 255, 0.18);
    border-radius: 14px;
    background: rgba(127, 216, 255, 0.08);
    color: #7fd8ff;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 900;
    cursor: pointer;
}

.breakout-flow-indicator-detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.breakout-flow-indicator-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.breakout-flow-indicator-detail-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 11px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.breakout-flow-indicator-detail-card strong {
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 900;
}

.breakout-flow-indicator-detail-card span {
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.35;
}

.breakout-flow-indicator-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.breakout-flow-indicator-chart-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.breakout-flow-indicator-chart-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.breakout-flow-indicator-chart-copy {
    color: var(--text-secondary);
    font-size: 0.74rem;
    line-height: 1.45;
}

.breakout-flow-indicator-chart-shell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(6, 13, 22, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.breakout-flow-indicator-chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

.breakout-flow-indicator-chart-legend {
    gap: 6px 10px;
}

.breakout-flow-lane-chart-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.breakout-flow-lane-chart-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.breakout-flow-lane-chart-head strong {
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 900;
}

.breakout-flow-lane-chart-head span {
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.35;
}

.breakout-flow-lane-chart-shell {
    overflow-x: auto;
    border-radius: 14px;
    background: rgba(6, 13, 22, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.breakout-flow-lane-chart-svg {
    width: 100%;
    min-width: 760px;
    height: auto;
    display: block;
}

.breakout-flow-lane-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: center;
    color: rgba(210, 224, 240, 0.74);
    font-size: 10px;
    font-weight: 800;
}

.breakout-flow-lane-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

@media (min-width: 960px) {
    .breakout-flow-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .breakout-flow-indicator-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .breakout-flow-indicator-chip-grid,
    .breakout-flow-indicator-detail-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .breakout-flow-indicator-chart-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .breakout-flow-chart-shell {
        padding: 12px;
        border-radius: 18px;
    }

    .breakout-flow-card-head {
        flex-direction: column;
    }

    .breakout-flow-card-close {
        align-self: flex-start;
    }
}

.intraday-summary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.intraday-summary-notice {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(127, 216, 255, 0.16);
    background: rgba(127, 216, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}

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

.intraday-summary-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.intraday-summary-card.live {
    border-color: rgba(127, 216, 255, 0.2);
    background: linear-gradient(180deg, rgba(127, 216, 255, 0.12), rgba(255, 255, 255, 0.04));
}

.intraday-summary-top,
.intraday-summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.intraday-summary-top {
    align-items: center;
    justify-content: space-between;
}

.intraday-summary-label {
    font-size: 0.92rem;
    font-weight: 800;
}

.intraday-summary-time {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
}

.intraday-summary-live,
.intraday-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.intraday-summary-live {
    border: 1px solid rgba(78, 202, 124, 0.18);
    background: rgba(78, 202, 124, 0.14);
    color: #76f3a7;
}

.intraday-tag {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.intraday-stat {
    min-width: 0;
    flex: 1 1 calc(50% - 8px);
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.intraday-stat span {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.intraday-stat strong {
    display: block;
    margin-top: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
}

.intraday-summary-copy {
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.45;
}

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

.daily-report-summary-card {
    padding: 12px 10px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 82px;
}

.summary-jump-card {
    width: 100%;
    text-align: left;
    appearance: none;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.summary-jump-card:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.06);
}

.summary-jump-card.active {
    border-color: rgba(127, 216, 255, 0.26);
    background: rgba(127, 216, 255, 0.12);
}

.daily-report-summary-card span {
    color: var(--text-secondary);
    font-size: 0.74rem;
    line-height: 1.35;
}

.daily-report-summary-card strong {
    font-size: 1.2rem;
    font-weight: 800;
}

.daily-report-summary-card.neutral {
    border-color: rgba(127, 216, 255, 0.16);
}

.daily-report-summary-card.neutral strong {
    color: var(--accent-cyan);
}

.daily-report-summary-card.positive {
    border-color: rgba(78, 202, 124, 0.16);
}

.daily-report-summary-card.positive strong {
    color: #6fe59f;
}

.daily-report-summary-card.warning {
    border-color: rgba(255, 209, 102, 0.16);
}

.daily-report-summary-card.warning strong {
    color: var(--accent-gold);
}

.daily-report-groups {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.daily-report-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.daily-report-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.daily-report-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.daily-report-group-head h5 {
    font-size: 0.86rem;
    font-weight: 800;
}

.daily-report-group-arrow {
    color: var(--text-secondary);
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 1.12rem;
    font-weight: 800;
}

.section-toggle-arrow {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 1.18rem;
    font-weight: 800;
}

.daily-report-group-count {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 800;
}

.daily-report-group-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.daily-report-item {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
}

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

.daily-report-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.daily-report-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.daily-report-title-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.daily-report-title-main strong {
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.35;
}

.daily-report-symbol {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
}

.daily-report-title-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.daily-report-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
    text-align: right;
}

.daily-report-target {
    color: var(--accent-gold);
    font-size: 0.82rem;
    font-weight: 800;
}

.daily-report-source {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.daily-report-event-time {
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.35;
}

.daily-report-event-time.buyable_breakout {
    color: #6fe59f;
}

.daily-report-event-time.gap_up {
    color: var(--accent-gold);
}

.daily-report-note {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.45;
}

.daily-report-note.not_reached {
    color: var(--accent-cyan);
}

.daily-report-note.buyable_breakout {
    color: #6fe59f;
}

.daily-report-note.gap_up {
    color: var(--accent-gold);
}

.daily-report-meta-line {
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.45;
}

.daily-report-meta-line.buyable_breakout {
    color: #9bf6c2;
}

.daily-report-meta-line.gap_up {
    color: #ffe29a;
}

.daily-report-meta-line.not_reached {
    color: var(--accent-cyan);
}

.daily-report-performance {
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text-primary);
}

.daily-report-performance.buyable_breakout {
    color: #9bf6c2;
}

.daily-report-performance.gap_up {
    color: #ffe29a;
}

.daily-report-performance-chip {
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1.35;
}

.daily-report-performance-chip.buyable_breakout {
    color: #9bf6c2;
}

.daily-report-performance-chip.gap_up {
    color: #ffe29a;
}

.quality-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.quality-score-badge.grade-a {
    background: rgba(78, 202, 124, 0.18);
    border: 1px solid rgba(78, 202, 124, 0.26);
    color: #76f3a7;
}

.quality-score-badge.grade-b {
    background: rgba(127, 216, 255, 0.16);
    border: 1px solid rgba(127, 216, 255, 0.24);
    color: var(--accent-cyan);
}

.quality-score-badge.grade-c {
    background: rgba(255, 209, 102, 0.16);
    border: 1px solid rgba(255, 209, 102, 0.24);
    color: #ffe29a;
}

.quality-score-badge.grade-d {
    background: rgba(255, 123, 114, 0.16);
    border: 1px solid rgba(255, 123, 114, 0.22);
    color: #ffb4ae;
}

.daily-report-quality-reason {
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.45;
}

.daily-report-quality-breakdown {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.4;
}

.daily-report-style-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.daily-report-style-strip.compact {
    gap: 4px;
    margin-top: 2px;
}

.daily-report-style-heading {
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
}

.daily-report-style-pills {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.daily-report-style-pills.compact {
    gap: 5px;
}

.daily-report-style-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.daily-report-style-strip.compact .daily-report-style-pill {
    min-height: 20px;
    padding: 0 7px;
    font-size: 0.64rem;
}

.daily-report-style-pill-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.daily-report-style-help-btn {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    margin-left: 5px;
    padding: 0;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    font-size: 0.62rem;
    box-shadow: none;
}

.daily-report-style-help-btn:hover,
.daily-report-style-help-btn:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.daily-report-style-strip.compact .daily-report-style-help-btn {
    width: 15px;
    height: 15px;
    min-width: 15px;
    min-height: 15px;
    margin-left: 4px;
    font-size: 0.58rem;
}

.daily-report-style-pill.minervini {
    color: #8df6b4;
}

.daily-report-style-pill.oneil {
    color: #8fdfff;
}

.daily-report-style-pill.williams {
    color: #ffe29a;
}

.daily-report-style-pill.leader {
    border-color: rgba(255, 209, 102, 0.28);
    background: rgba(255, 209, 102, 0.12);
    color: #fff2c2;
}

.daily-report-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.daily-report-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.daily-report-tag.positive {
    background: rgba(78, 202, 124, 0.12);
    border: 1px solid rgba(78, 202, 124, 0.2);
    color: #8df6b4;
}

.daily-report-tag.caution {
    background: rgba(255, 209, 102, 0.12);
    border: 1px solid rgba(255, 209, 102, 0.18);
    color: #ffe29a;
}

.daily-report-empty {
    padding: 10px 2px 2px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
}

.empty-noti {
    padding: 48px 18px;
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.5;
}

#raw-msg-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 7, 12, 0.72);
    backdrop-filter: blur(6px);
}

.modal-content {
    position: relative;
    width: min(860px, 100%);
    max-height: min(82vh, 960px);
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 18, 29, 0.97);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 800;
}

.modal-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    overflow-y: auto;
    padding: 20px;
}

.modal-body pre {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.72;
    color: var(--text-primary);
    font-family: "Noto Sans KR", sans-serif;
}

.modal-pre {
    margin: 0;
}

.style-score-help-modal {
    position: fixed;
    inset: 0;
    z-index: 1255;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.style-score-help-modal-content {
    width: min(720px, calc(100vw - 24px));
    max-height: min(86vh, 980px);
}

.style-score-help-modal-body {
    padding: 16px 18px;
}

.style-score-help-modal-pre {
    font-family: "Noto Sans KR", sans-serif;
    font-size: 0.84rem;
    line-height: 1.68;
}

.holdings-settings-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 env(safe-area-inset-bottom, 0);
}

.holdings-settings-modal-content {
    width: min(480px, 100%);
    max-height: 80vh;
    border-radius: 24px 24px 0 0;
}

.holdings-settings-modal-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hset-common-section,
.hset-broker-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 0 4px;
}

.hset-broker-head {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.hset-broker-head:hover {
    transform: translateY(-1px);
    border-color: rgba(127, 216, 255, 0.18);
    background: rgba(255, 255, 255, 0.055);
}

.hset-broker-head-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hset-broker-head .hset-section-label {
    margin-bottom: 0;
}

.hset-broker-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hset-broker-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
}

.hset-broker-arrow {
    flex: 0 0 auto;
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 800;
}

.hset-broker-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 6px 0;
}

.hset-broker-panel[hidden] {
    display: none !important;
}

.hset-section-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 8px;
}

.hset-section-copy {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.6;
}

.hset-broker-detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hset-broker-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hset-result-panel {
    margin-top: 2px;
    min-height: 22px;
    font-size: 12px;
    color: #ccc;
}

/* 매도 전략 카드 */
.hset-sell-strategy-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.hset-sell-strategy-card[data-priority="1"] {
    border-left: 3px solid rgba(244, 67, 54, 0.6);
}
.hset-sell-strategy-card[data-priority="2"] {
    border-left: 3px solid rgba(76, 175, 80, 0.6);
}
.hset-sell-strategy-card[data-priority="3"] {
    border-left: 3px solid rgba(33, 150, 243, 0.6);
}
.hset-sell-strategy-card[data-priority="4"] {
    border-left: 3px solid rgba(255, 193, 7, 0.6);
}
.hset-sell-strategy-card[data-priority="5"] {
    border-left: 3px solid rgba(156, 39, 176, 0.6);
}

.hset-sell-strategy-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.hset-sell-strategy-head > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.hset-sell-strategy-head strong {
    font-size: 0.82rem;
}

.hset-priority-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(244, 67, 54, 0.18);
    color: #ef9a9a;
    white-space: nowrap;
}

#report-image-modal {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.report-image-modal-content {
    width: min(1120px, 100%);
    max-height: min(88vh, 1080px);
}

/* ===== 달력 매수/매도 탭 ===== */
.cal-tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 2px;
}

.cal-tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.cal-tab-btn:hover {
    color: var(--text-primary);
}

.cal-tab-btn.cal-tab-active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.cal-tab-count {
    display: inline-block;
    font-size: 0.68rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 0 5px;
    margin-left: 3px;
    vertical-align: middle;
}

/* ===== 달력 매도 카드 ===== */
.cal-sell-card {
    border-left: 3px solid rgba(244,67,54,0.4) !important;
}
.cal-sell-card.cal-sell-card-profit {
    border-left-color: rgba(55,198,144,0.6) !important;
}
.cal-sell-card.cal-sell-card-loss {
    border-left-color: rgba(255,107,107,0.6) !important;
}

/* 익절/손절/부분 배지 */
.cal-sell-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    white-space: nowrap;
}
.cal-sell-profit  { background: rgba(55,198,144,0.15); color: #37c690; }
.cal-sell-loss    { background: rgba(255,107,107,0.15); color: #ff6b6b; }
.cal-sell-partial { background: rgba(59,165,255,0.15);  color: #3ba5ff; }
.cal-sell-neutral { background: rgba(180,180,180,0.12); color: #aaa; }

.cal-sell-card.cal-sell-card-partial {
    border-left-color: rgba(59,165,255,0.6) !important;
}

/* 매도 근거 섹션 (크게) */
.cal-sell-reason-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 12px 4px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.cal-sell-reason-big {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.cal-sell-reason-sub {
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* 수익률 표시 (헤더 오른쪽) */
.cal-sell-return {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.cal-sell-return[data-tone="positive"] { color: #37c690; }
.cal-sell-return[data-tone="negative"] { color: #ff6b6b; }

/* 손익금액 행 */
.cal-pnl-row .holdings-detail-value {
    display: flex;
    flex-direction: column;
    gap: 1px;
    align-items: flex-end;
}
.cal-pnl-gross {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.85;
}
.cal-pnl-net {
    font-size: 0.88rem;
    font-weight: 700;
}
.cal-pnl-net[data-tone="positive"] { color: #37c690; }
.cal-pnl-net[data-tone="negative"] { color: #ff6b6b; }

/* 수수료 행 */
.cal-fee-detail {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* 매도 필터 바 */
.cal-sell-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cal-buy-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cal-sell-filter-btn {
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cal-buy-filter-btn {
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cal-sell-filter-btn.active,
.cal-sell-filter-btn:hover {
    background: rgba(59,165,255,0.2);
    border-color: rgba(59,165,255,0.4);
    color: #3ba5ff;
}
.cal-buy-filter-btn.active,
.cal-buy-filter-btn:hover {
    background: rgba(59,165,255,0.2);
    border-color: rgba(59,165,255,0.4);
    color: #3ba5ff;
}
.cal-buy-filter-btn[data-filter="profit"].active { background: rgba(55,198,144,0.15); border-color: rgba(55,198,144,0.4); color: #37c690; }
.cal-buy-filter-btn[data-filter="hold"].active   { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.22); color: var(--text-primary); }
.cal-buy-filter-btn[data-filter="loss"].active   { background: rgba(255,107,107,0.15); border-color: rgba(255,107,107,0.4); color: #ff6b6b; }
.cal-sell-filter-btn[data-filter="profit"].active { background: rgba(55,198,144,0.15); border-color: rgba(55,198,144,0.4); color: #37c690; }
.cal-sell-filter-btn[data-filter="loss"].active   { background: rgba(255,107,107,0.15); border-color: rgba(255,107,107,0.4); color: #ff6b6b; }
.cal-sell-filter-btn[data-filter="partial"].active { background: rgba(59,165,255,0.15); border-color: rgba(59,165,255,0.4); color: #3ba5ff; }

.cal-buy-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
}
.cal-buy-status-chip[data-tone="positive"] {
    background: rgba(55,198,144,0.15);
    border-color: rgba(55,198,144,0.35);
    color: #37c690;
}
.cal-buy-status-chip[data-tone="negative"] {
    background: rgba(255,107,107,0.15);
    border-color: rgba(255,107,107,0.35);
    color: #ff6b6b;
}
.cal-buy-status-chip[data-tone="neutral"] {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
    color: var(--text-primary);
}

/* 매도 사유 배지 (구 스타일 — 삭제 후 reason-section으로 대체) */
.cal-sell-reason {
    font-size: 0.67rem;
    color: var(--text-secondary);
    opacity: 0.85;
    white-space: nowrap;
}

/* 달력 탭 익절/손절 카운트 */
.cal-tab-pnl {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.8;
    margin-left: 2px;
}

/* 알림 카드 매도 가격 레이블 */
.oe-price-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.7;
}
.oe-entry-price {
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.oe-sell-reason-badge {
    font-size: 0.68rem;
    color: var(--text-secondary);
    opacity: 0.85;
    white-space: nowrap;
}

/* ===== 매도 전략 ? 버튼 ===== */
.hset-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.07);
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.hset-help-btn:hover {
    background: rgba(59,165,255,0.2);
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* ===== 전략 도움말 모달 ===== */
.sch-modal-content {
    position: relative;
    z-index: 1;
    background: var(--bg-panel-strong, #0a161f);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    width: min(480px, 94vw);
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.sch-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sch-priority {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.sch-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.sch-body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sch-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.sch-formula {
    background: rgba(59,165,255,0.08);
    border: 1px solid rgba(59,165,255,0.2);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.78rem;
    color: var(--accent-cyan, #7fd8ff);
    white-space: pre-wrap;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    margin: 0;
}

.sch-example {
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.75rem;
    color: var(--text-primary);
    white-space: pre-wrap;
    margin: 0;
}

.sch-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.sch-params {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sch-param {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 7px 10px;
}

.sch-param-name {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sch-param-tip {
    font-size: 0.70rem;
    color: var(--text-secondary);
}

.report-image-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(4, 12, 20, 0.88);
}

.report-image-viewer {
    display: block;
    max-width: 100%;
    max-height: min(74vh, 900px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.36);
}

.highlight-registered {
    background: rgba(55, 198, 144, 0.2);
    color: #d9fff0;
    font-weight: 800;
    padding: 0 4px;
    border-radius: 4px;
}

.highlight-stock {
    background: rgba(255, 209, 102, 0.95);
    color: #171100;
    font-weight: 800;
    padding: 0 4px;
    border-radius: 4px;
}

#toast-container {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 1300;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.toast-msg {
    min-width: min(320px, calc(100vw - 44px));
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(127, 216, 255, 0.16);
    background: rgba(8, 18, 29, 0.96);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
    white-space: pre-wrap;
    animation: toast-in 0.24s ease forwards;
}

.toast-msg.toast-out {
    animation: toast-out 0.22s ease forwards;
}

.toast-title {
    color: var(--accent-cyan);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.toast-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.sidebar-close-mobile {
    display: none;
}

body.app-shell .sidebar-close-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1.5rem;
}

body.mobile-mode .sidebar-close-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1.5rem;
}

body.app-shell .main-content {
    width: 100%;
    gap: 10px;
    max-height: 100%;
}

body.app-shell .app-home-screen,
body.app-shell .app-page-screen {
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

body.app-shell .app-chart-shell {
    gap: 8px;
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

body.app-shell .app-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.app-shell .app-page-layer-host .noti-layer {
    border-radius: 20px;
}

body.app-shell .app-home-recent-alerts,
body.app-shell .app-home-report-grid,
body.app-shell .app-home-watchlist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.app-shell .app-home-server-metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

body.app-shell .chart-header,
body.app-shell .chart-stage {
    border-radius: 20px;
}

body.app-shell .chart-header {
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
}

body.app-shell .chart-header-main {
    width: 100%;
    align-items: flex-start;
    gap: 10px;
}

body.app-shell .chart-top-actions {
    gap: 8px;
}

body.app-shell .chart-top-actions .noti-btn,
body.app-shell .chart-top-actions .header-utility-btn,
body.app-shell .chart-top-actions .chart-target-summary-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
}

body.app-shell .chart-top-actions .chart-lock-status-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
}

body.app-shell .chart-top-actions .chart-nav-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
}

body.app-shell .chart-top-actions .chart-lock-status-label {
    display: none;
}

body.app-shell .chart-top-actions .chart-lock-status-count {
    display: none;
}

body.app-shell .sidebar-trigger {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
}

body.app-shell .symbol-info {
    width: 100%;
}

body.app-shell .header-utility-btn {
    width: 40px;
    height: 40px;
}

body.app-shell .symbol-kicker {
    display: none;
}

body.app-shell .symbol-title-row {
    align-items: center;
    gap: 8px 10px;
    flex-wrap: wrap;
}

body.app-shell .symbol-title-row .chart-target-summary-btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    color: rgba(226, 233, 242, 0.88);
}

body.app-shell .symbol-title-row .chart-target-summary-btn:hover,
body.app-shell .symbol-title-row .chart-target-summary-btn:focus-visible {
    color: var(--accent-cyan);
}

body.app-shell .chart-top-actions .noti-btn,
body.app-shell .chart-top-actions .header-utility-btn,
body.app-shell .chart-top-actions .chart-lock-status-btn {
    background: transparent;
    border: none;
    box-shadow: none;
    color: rgba(226, 233, 242, 0.88);
}

body.app-shell .chart-top-actions .chart-nav-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(127, 216, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.app-shell .chart-top-actions .chart-lock-status-btn {
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

body.app-shell .chart-top-actions .chart-lock-status-btn.chart-lock-status-locked {
    border-color: rgba(255, 215, 96, 0.38);
    background: linear-gradient(180deg, rgba(55, 44, 8, 0.96), rgba(30, 22, 6, 0.92));
}

body.app-shell .chart-top-actions .chart-lock-status-btn.chart-lock-status-unlocked {
    border-color: rgba(111, 221, 157, 0.38);
    background: linear-gradient(180deg, rgba(11, 49, 32, 0.96), rgba(7, 28, 20, 0.92));
}

body.app-shell .chart-top-actions .chart-lock-status-btn.chart-lock-status-mixed {
    border-color: rgba(96, 189, 255, 0.38);
    background: linear-gradient(180deg, rgba(10, 37, 60, 0.96), rgba(8, 25, 43, 0.92));
}

body.app-shell .chart-top-actions .noti-btn:hover,
body.app-shell .chart-top-actions .noti-btn:focus-visible,
body.app-shell .chart-top-actions .header-utility-btn:hover,
body.app-shell .chart-top-actions .header-utility-btn:focus-visible,
body.app-shell .chart-top-actions .chart-lock-status-btn:hover,
body.app-shell .chart-top-actions .chart-lock-status-btn:focus-visible {
    color: var(--accent-cyan);
}

body.app-shell .chart-top-actions .chart-lock-status-btn.chart-lock-status-locked {
    color: #ffe08a;
}

body.app-shell .chart-top-actions .chart-lock-status-btn.chart-lock-status-unlocked {
    color: #9df0c5;
}

body.app-shell .chart-top-actions .chart-lock-status-btn.chart-lock-status-mixed {
    color: #8dd7ff;
}

body.app-shell .chart-top-actions .chart-lock-status-icon {
    width: 2rem;
    height: 2rem;
}

/* 새 레이아웃: chart-header-main 직속 자물쇠 버튼 */
body.app-shell .chart-lock-status-btn {
    border-width: 2px;
    border-style: solid;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}
body.app-shell .chart-lock-status-btn.chart-lock-status-locked {
    border-color: rgba(255, 215, 96, 0.6);
    background: linear-gradient(180deg, rgba(65, 52, 8, 0.98), rgba(38, 28, 6, 0.96));
    color: #ffe566;
}
body.app-shell .chart-lock-status-btn.chart-lock-status-unlocked {
    border-color: rgba(111, 221, 157, 0.6);
    background: linear-gradient(180deg, rgba(11, 55, 34, 0.98), rgba(7, 32, 22, 0.96));
    color: #7eedb0;
}
body.app-shell .chart-lock-status-btn.chart-lock-status-mixed {
    border-color: rgba(96, 189, 255, 0.5);
    background: linear-gradient(180deg, rgba(10, 37, 60, 0.98), rgba(8, 25, 43, 0.96));
    color: #8dd7ff;
}

/* chart-header-utils 스타일 */
body.app-shell .chart-header-utils {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}
body.app-shell .chart-header-utils .noti-btn,
body.app-shell .chart-header-utils .header-utility-btn {
    background: transparent;
    border: none;
    box-shadow: none;
    color: rgba(226, 233, 242, 0.88);
    width: 38px;
    height: 38px;
    padding: 0;
}

body.app-shell #current-symbol-name {
    font-size: clamp(1.2rem, 3vw, 1.56rem);
    line-height: 1.12;
}

body.app-shell .current-price-line {
    gap: 6px 8px;
    margin-top: 6px;
    font-size: 1rem;
}

body.app-shell .badge {
    min-height: 34px;
    font-size: 0.84rem;
    padding: 0 12px;
    justify-content: flex-start;
    max-width: 100%;
}

body.app-shell .fundamental-row {
    gap: 4px 8px;
    margin-top: 3px;
    font-size: 0.76rem;
    line-height: 1.3;
}

body.app-shell .timeframe-selector {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: center;
    padding: 6px;
    margin: 0 0 -2px;
    scrollbar-width: none;
}

body.app-shell .timeframe-selector::-webkit-scrollbar {
    display: none;
}

body.app-shell .timeframe-selector > * {
    min-width: 0;
    flex: 0 0 auto;
}

body.app-shell .divider {
    display: none;
}

body.app-shell .mobile-toggle-btn:not(.header-utility-btn),
body.app-shell .noti-btn,
body.app-shell .tf-btn,
body.app-shell .tf-dropdown-toggle {
    width: auto;
    min-width: max-content;
    height: 38px;
    justify-content: center;
    padding: 0 12px;
    border-radius: 11px;
    white-space: nowrap;
}

body.app-shell .tf-settings-btn {
    width: 38px;
    min-width: 38px;
    padding: 0;
}

body.app-shell .layer-toggle-btn,
body.app-shell .noti-icon-btn {
    width: 38px;
    min-width: 38px;
    padding: 0;
}

body.app-shell .tf-dropdown,
body.app-shell .tf-dropdown-toggle {
    width: auto;
}

body.app-shell .tf-dropdown-menu {
    right: auto;
    left: 0;
    min-width: 150px;
}

body.app-shell .chart-stage {
    flex: none;
    min-height: 460px;
}

body.app-shell .chart-legend {
    left: 10px;
    top: 10px;
    right: 10px;
    max-width: none;
    padding: 8px 10px;
    border-radius: 14px;
    font-size: 0.72rem;
    gap: 6px;
}

body.app-shell .chart-stage.volume-profile-on .chart-legend {
    left: 126px;
    max-width: calc(100% - 140px);
}

body.app-shell .volume-profile,
body.app-shell .volume-profile.hidden {
    top: 10px;
    left: 10px;
    right: auto;
    bottom: 10px;
    width: 104px;
    min-width: 104px;
}

body.app-shell .chart-zoom-controls {
    right: 10px;
    bottom: 10px;
    gap: 8px;
}

body.app-shell .chart-zoom-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.34rem;
}

body.app-shell .chart-target-delete-btn {
    right: 62px;
    min-width: 56px;
    height: 36px;
    padding: 0 12px;
    font-size: 0.82rem;
}

body.app-shell .chart-settings-panel {
    top: 126px;
    right: max(10px, env(safe-area-inset-right));
    left: max(10px, env(safe-area-inset-left));
    width: auto;
    max-height: calc(100dvh - 148px);
    padding: 18px;
    border-radius: 22px;
}

body.app-shell .noti-layer {
    top: auto;
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    width: auto;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 28px;
}

body.app-shell .noti-header {
    flex-direction: column;
    padding: 14px 14px 10px;
}

body.app-shell .header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
}

body.app-shell .threshold-box,
body.app-shell .expected-option-chip {
    width: 100%;
    justify-content: space-between;
}

body.app-shell .expected-section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

body.app-shell .expected-sort-bar {
    margin-top: 0;
    gap: 5px;
}

body.app-shell .expected-sort-chip {
    padding: 4px 8px;
    font-size: 0.68rem;
}

body.app-shell .expected-card-main {
    gap: 10px;
}

body.app-shell .expected-sub {
    font-size: 0.74rem;
}

body.app-shell .expected-style-summary {
    font-size: 0.68rem;
}

body.app-shell .expected-metric {
    min-width: 82px;
}

body.app-shell .noti-list {
    gap: 8px;
    padding: 8px 8px 6px;
}

body.app-shell #app-report-intraday-host .noti-list,
body.app-shell #app-report-final-host .noti-list,
body.mobile-mode #app-report-intraday-host .noti-list,
body.mobile-mode #app-report-final-host .noti-list {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

body.app-shell .report-date-chips,
body.app-shell .report-filter-chips,
body.app-shell .report-control-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

body.app-shell .report-date-chips::-webkit-scrollbar,
body.app-shell .report-filter-chips::-webkit-scrollbar,
body.app-shell .report-control-row::-webkit-scrollbar {
    display: none;
}

body.app-shell .report-date-chip,
body.app-shell .report-select-wrap,
body.app-shell .report-toggle-pill,
body.app-shell .report-filter-chip {
    flex: 0 0 auto;
}

body.app-shell .report-surface-stat-grid,
body.app-shell .report-surface-stat-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.app-shell .app-alert-summary-grid,
body.app-shell .app-report-hero-metrics,
body.app-shell .app-report-hero-notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.app-shell .intraday-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.app-shell #report-layer .expected-section-block,
body.app-shell #final-report-layer .expected-section-block {
    gap: 8px;
}

body.app-shell #report-layer .expected-section-head,
body.app-shell #final-report-layer .expected-section-head {
    gap: 6px;
    padding: 0;
}

body.app-shell #report-layer .expected-section-copy,
body.app-shell #final-report-layer .expected-section-copy {
    margin-top: 2px;
    font-size: 0.72rem;
    line-height: 1.35;
}

body.app-shell #app-report-hero .app-report-hero-card,
body.app-shell #app-final-report-hero .app-report-hero-card {
    padding: 12px;
    gap: 8px;
}

body.app-shell .app-report-hero-metric {
    min-height: 72px;
    padding: 10px;
}

body.app-shell .app-report-hero-actions {
    gap: 6px;
}

body.app-shell .app-report-hero-btn {
    min-height: 34px;
    padding: 0 12px;
}

body.app-shell .final-report-history-card,
body.app-shell .report-surface-card {
    gap: 10px;
    padding: 12px;
}

body.app-shell .final-report-history-sheet {
    gap: 10px;
    padding: 10px;
}

body.app-shell .final-report-archive-table th,
body.app-shell .final-report-archive-table td {
    padding: 8px 10px;
}

body.app-shell .daily-report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.app-shell .daily-report-item-top {
    flex-direction: column;
    gap: 8px;
}

body.app-shell .daily-report-metric {
    align-items: flex-start;
    text-align: left;
}

body.app-shell .daily-report-title-row {
    flex-direction: column;
    gap: 6px;
}

body.app-shell .daily-report-title-badges {
    justify-content: flex-start;
}

body.app-shell .item-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px;
}

body.app-shell .final-report-history-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.app-shell .final-report-history-preview {
    overflow-x: auto;
}

body.app-shell .final-report-history-sheet {
    padding: 12px;
    grid-template-columns: minmax(0, 1fr);
}

body.app-shell .final-report-history-table {
    min-width: 480px;
}

body.app-shell .final-report-history-preview img,
body.app-shell .final-report-history-card img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

body.app-shell .app-alert-card-top,
body.app-shell .app-report-hero-top {
    align-items: flex-start;
}

body.app-shell .report-image-modal-content,
body.mobile-mode .report-image-modal-content,
body.app-shell .holdings-calendar-modal-content,
body.mobile-mode .holdings-calendar-modal-content,
body.app-shell .holdings-strategy-guide-modal-content,
body.mobile-mode .holdings-strategy-guide-modal-content {
    width: 100%;
}

body.app-shell .report-image-modal-body,
body.mobile-mode .report-image-modal-body,
body.app-shell .holdings-calendar-modal-body,
body.mobile-mode .holdings-calendar-modal-body,
body.app-shell .holdings-strategy-guide-modal-body,
body.mobile-mode .holdings-strategy-guide-modal-body {
    padding: 12px;
}

body.app-shell .holdings-guide-card-list,
body.mobile-mode .holdings-guide-card-list {
    grid-template-columns: minmax(0, 1fr);
}

body.app-shell .report-image-viewer,
body.mobile-mode .report-image-viewer {
    max-height: 70vh;
}

body.mobile-mode .main-content {
    width: 100%;
    gap: 8px;
    max-height: 100%;
}

body.mobile-mode .app-home-screen,
body.mobile-mode .app-page-screen {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

body.mobile-mode .app-home-screen {
    gap: 8px;
}

body.mobile-mode .app-chart-shell {
    gap: 6px;
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

body.mobile-mode .chart-header,
body.mobile-mode .chart-stage {
    border-radius: 18px;
}

body.mobile-mode .chart-header {
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
}

body.mobile-mode .chart-header-main {
    width: 100%;
    align-items: flex-start;
    gap: 10px;
}

body.mobile-mode .chart-top-actions {
    gap: 6px;
}

body.mobile-mode .chart-top-actions .noti-btn,
body.mobile-mode .chart-top-actions .header-utility-btn,
body.mobile-mode .chart-top-actions .chart-target-summary-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
}

body.mobile-mode .chart-top-actions .chart-lock-status-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
}

body.mobile-mode .chart-top-actions .chart-nav-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
}

body.mobile-mode .chart-top-actions .chart-lock-status-label {
    display: none;
}

body.mobile-mode .chart-top-actions .chart-lock-status-count {
    display: none;
}

body.mobile-mode .sidebar-trigger {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
}

body.mobile-mode .symbol-info {
    width: 100%;
}

body.mobile-mode .header-utility-btn {
    width: 38px;
    height: 38px;
}

body.mobile-mode .symbol-title-row .chart-target-summary-btn {
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    color: rgba(226, 233, 242, 0.88);
}

body.mobile-mode .chart-top-actions .noti-btn,
body.mobile-mode .chart-top-actions .header-utility-btn,
body.mobile-mode .chart-top-actions .chart-lock-status-btn {
    background: transparent;
    border: none;
    box-shadow: none;
    color: rgba(226, 233, 242, 0.88);
}

body.mobile-mode .chart-top-actions .chart-nav-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(127, 216, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.mobile-mode .chart-top-actions .chart-lock-status-btn {
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

body.mobile-mode .chart-top-actions .chart-lock-status-btn.chart-lock-status-locked {
    border-color: rgba(255, 215, 96, 0.38);
    background: linear-gradient(180deg, rgba(55, 44, 8, 0.96), rgba(30, 22, 6, 0.92));
}

body.mobile-mode .chart-top-actions .chart-lock-status-btn.chart-lock-status-unlocked {
    border-color: rgba(111, 221, 157, 0.38);
    background: linear-gradient(180deg, rgba(11, 49, 32, 0.96), rgba(7, 28, 20, 0.92));
}

body.mobile-mode .chart-top-actions .chart-lock-status-btn.chart-lock-status-mixed {
    border-color: rgba(96, 189, 255, 0.38);
    background: linear-gradient(180deg, rgba(10, 37, 60, 0.96), rgba(8, 25, 43, 0.92));
}

body.mobile-mode .chart-top-actions .noti-btn:hover,
body.mobile-mode .chart-top-actions .noti-btn:focus-visible,
body.mobile-mode .chart-top-actions .header-utility-btn:hover,
body.mobile-mode .chart-top-actions .header-utility-btn:focus-visible,
body.mobile-mode .chart-top-actions .chart-lock-status-btn:hover,
body.mobile-mode .chart-top-actions .chart-lock-status-btn:focus-visible,
body.mobile-mode .symbol-title-row .chart-target-summary-btn:hover,
body.mobile-mode .symbol-title-row .chart-target-summary-btn:focus-visible {
    color: var(--accent-cyan);
}

body.mobile-mode .chart-top-actions .chart-lock-status-btn.chart-lock-status-locked {
    color: #ffe08a;
}

body.mobile-mode .chart-top-actions .chart-lock-status-btn.chart-lock-status-unlocked {
    color: #9df0c5;
}

body.mobile-mode .chart-top-actions .chart-lock-status-btn.chart-lock-status-mixed {
    color: #8dd7ff;
}

body.mobile-mode .chart-top-actions .chart-lock-status-icon {
    width: 1.94rem;
    height: 1.94rem;
}

body.mobile-mode .app-home-hero,
body.mobile-mode .app-home-card-head,
body.mobile-mode .app-home-alert-top {
    flex-direction: column;
    align-items: flex-start;
}

body.mobile-mode .app-home-grid,
body.mobile-mode .app-home-metric-grid,
body.mobile-mode .app-home-watchlist-grid,
body.mobile-mode .app-home-server-metric-grid,
body.mobile-mode .app-home-report-grid,
body.mobile-mode .app-home-recent-alerts {
    grid-template-columns: 1fr;
}

body.mobile-mode .app-home-server-trend-grid,
body.mobile-mode .app-home-server-trend-grid-wide,
body.mobile-mode .app-home-runtime-grid {
    grid-template-columns: 1fr;
}

body.mobile-mode .app-home-grid {
    gap: 8px;
}

body.mobile-mode .app-home-card {
    gap: 10px;
    padding: 16px;
}

body.mobile-mode .app-home-server-group-head,
body.mobile-mode .app-home-server-card-top {
    flex-direction: column;
    align-items: flex-start;
}

body.mobile-mode .app-home-server-group-toggle {
    width: 100%;
}

body.mobile-mode .app-home-server-api-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
}

body.mobile-mode .app-home-server-api-row strong,
body.mobile-mode .app-home-server-api-row span,
body.mobile-mode .app-home-watch-item strong,
body.mobile-mode .app-home-server-card-top strong {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.native-app-runtime .app-home-server-metric-grid,
body.native-app-runtime .app-home-server-trend-grid,
body.native-app-runtime .app-home-server-trend-grid-wide,
body.native-app-runtime .app-home-runtime-grid {
    grid-template-columns: 1fr;
}

body.native-app-runtime .app-home-server-group-head,
body.native-app-runtime .app-home-server-card-top {
    flex-direction: column;
    align-items: flex-start;
}

body.native-app-runtime .app-home-server-group-toggle {
    width: 100%;
}

body.native-app-runtime .app-home-server-api-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
}

body.native-app-runtime .app-home-server-api-row strong,
body.native-app-runtime .app-home-server-api-row span,
body.native-app-runtime .app-home-watch-item strong,
body.native-app-runtime .app-home-server-card-top strong {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.mobile-mode .aac-topline {
    gap: 8px;
}

body.mobile-mode .aac-name {
    max-width: 132px;
}

body.mobile-mode .aac-meta-summary,
body.mobile-mode .aac-footnote {
    font-size: 0.8rem;
}

body.mobile-mode .app-home-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.mobile-mode .app-settings-row,
body.mobile-mode .app-settings-toggle-row {
    align-items: flex-start;
    flex-direction: column;
}

body.mobile-mode .app-settings-row strong {
    text-align: left;
}

body.mobile-mode .app-settings-form-grid {
    grid-template-columns: minmax(0, 1fr);
}

body.mobile-mode .app-settings-field {
    padding: 11px 12px;
}

body.mobile-mode .holdings-metrics-grid,
body.mobile-mode .holdings-history-summary,
body.mobile-mode .holdings-position-stats {
    grid-template-columns: 1fr;
}

body.app-shell .holdings-metrics-grid,
body.mobile-mode .holdings-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.app-shell .holdings-metric-card,
body.mobile-mode .holdings-metric-card {
    min-height: 82px;
    padding: 12px;
    gap: 5px;
}

body.app-shell .holdings-metric-card--wide,
body.mobile-mode .holdings-metric-card--wide {
    grid-column: span 2;
}

body.app-shell .holdings-metric-card small,
body.mobile-mode .holdings-metric-card small {
    font-size: 0.7rem;
}

body.mobile-mode .holdings-calendar-grid {
    gap: 6px;
}

body.mobile-mode .holdings-calendar-day {
    min-height: 110px;
    padding: 8px 6px;
}

body.mobile-mode .holdings-calendar-day span,
body.mobile-mode .holdings-calendar-day small {
    font-size: 0.66rem;
}

body.mobile-mode .holdings-position-actions {
    flex-direction: column;
    align-items: flex-start;
}

body.mobile-mode .app-settings-field span,
body.mobile-mode .app-settings-summary {
    font-size: 0.76rem;
}

body.mobile-mode .app-bottom-nav {
    gap: 4px;
    padding: 6px;
}

body.mobile-mode .app-bottom-nav-btn {
    min-height: 54px;
    font-size: 0.66rem;
}

body.mobile-mode .symbol-kicker {
    display: none;
}

body.mobile-mode .symbol-title-row {
    flex-direction: row;
    align-items: center;
    gap: 6px 8px;
    flex-wrap: wrap;
}

body.mobile-mode #current-symbol-name {
    font-size: clamp(1.14rem, 5vw, 1.48rem);
    line-height: 1.12;
}

body.mobile-mode .current-price-line {
    gap: 6px 8px;
    margin-top: 5px;
    font-size: 0.96rem;
}

body.mobile-mode .badge {
    min-height: 32px;
    font-size: 0.82rem;
    padding: 0 11px;
}

body.mobile-mode .chart-target-summary-btn {
    width: 34px;
    height: 34px;
}

body.mobile-mode .chart-target-summary-panel {
    margin-top: 10px;
    padding: 13px 14px;
    border-radius: 18px;
}

body.mobile-mode .chart-target-summary-head {
    gap: 10px;
}

body.mobile-mode .chart-target-summary-copy strong {
    font-size: 0.9rem;
}

body.mobile-mode .chart-target-summary-copy p,
body.mobile-mode .chart-target-summary-note,
body.mobile-mode .chart-target-summary-empty {
    font-size: 0.72rem;
}

body.mobile-mode .chart-target-summary-badge {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.72rem;
}

body.mobile-mode .chart-target-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

body.mobile-mode .chart-target-summary-metric {
    padding: 10px 11px;
    border-radius: 13px;
}

body.mobile-mode .chart-target-summary-metric span {
    font-size: 0.68rem;
}

body.mobile-mode .chart-target-summary-metric strong,
body.mobile-mode .chart-target-summary-item-main strong {
    font-size: 0.88rem;
}

body.mobile-mode .chart-target-summary-chip-list,
body.mobile-mode .chart-target-summary-list,
body.mobile-mode .chart-target-summary-actions {
    margin-top: 12px;
}

body.mobile-mode .chart-target-summary-item {
    align-items: flex-start;
    padding: 10px 11px;
    border-radius: 13px;
}

body.mobile-mode .chart-target-summary-item-actions {
    gap: 6px;
}

body.mobile-mode .chart-target-summary-mini {
    min-width: 48px;
    height: 30px;
    padding: 0 10px;
    font-size: 0.72rem;
}

body.mobile-mode .chart-target-summary-action {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.76rem;
}


body.mobile-mode .fundamental-row {
    gap: 4px 6px;
    margin-top: 3px;
    font-size: 0.74rem;
    line-height: 1.3;
}

body.mobile-mode .timeframe-selector {
    width: fit-content;
    max-width: 100%;
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: center;
    padding: 6px;
    margin: 0 0 -2px;
    scrollbar-width: none;
}

body.mobile-mode .timeframe-selector::-webkit-scrollbar {
    display: none;
}

body.mobile-mode .timeframe-selector > * {
    min-width: 0;
    flex: 0 0 auto;
}

body.mobile-mode .divider {
    display: none;
}

body.mobile-mode .mobile-toggle-btn:not(.header-utility-btn),
body.mobile-mode .noti-btn,
body.mobile-mode .tf-btn,
body.mobile-mode .tf-dropdown-toggle {
    width: auto;
    min-width: max-content;
    height: 36px;
    justify-content: center;
    padding: 0 11px;
    border-radius: 10px;
    white-space: nowrap;
}

body.mobile-mode .tf-settings-btn {
    width: 36px;
    min-width: 36px;
    padding: 0;
}

body.mobile-mode .layer-toggle-btn {
    width: 36px;
    min-width: 36px;
    padding: 0;
}

body.mobile-mode .noti-icon-btn {
    width: 36px;
    min-width: 36px;
    padding: 0;
}

body.mobile-mode .tf-dropdown {
    grid-column: auto;
    flex: 0 0 auto;
}

body.mobile-mode .tf-dropdown,
body.mobile-mode .tf-dropdown-toggle {
    width: auto;
}

body.mobile-mode .tf-dropdown-menu {
    right: auto;
    left: 0;
    min-width: 140px;
}

body.mobile-mode .chart-stage {
    flex: none;
    min-height: 400px;
    height: calc(100dvh - 148px);
}

body.mobile-mode .chart-legend {
    left: 10px;
    top: 10px;
    right: 10px;
    max-width: none;
    padding: 7px 8px;
    border-radius: 14px;
    font-size: 0.68rem;
    gap: 4px;
}

body.mobile-mode .chart-zoom-controls {
    right: 10px;
    bottom: 10px;
    gap: 8px;
}

body.mobile-mode .chart-target-delete-btn {
    right: 60px;
    min-width: 54px;
    height: 36px;
    padding: 0 12px;
    font-size: 0.8rem;
}

body.mobile-mode .chart-zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.3rem;
}

body.mobile-mode .chart-stage.volume-profile-on .chart-legend {
    left: 118px;
    max-width: calc(100% - 132px);
}

body.mobile-mode .volume-profile,
body.mobile-mode .volume-profile.hidden {
    top: 10px;
    left: 10px;
    right: auto;
    bottom: 10px;
    width: 96px;
    min-width: 96px;
}

body.mobile-mode .chart-settings-panel {
    top: 124px;
    right: 0;
    left: 0;
    width: auto;
    max-height: calc(100dvh - 146px);
    padding: 18px;
    border-radius: 20px;
}

body.mobile-mode .noti-layer {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100dvh - 20px);
}

body.mobile-mode .noti-header {
    flex-direction: column;
}

body.mobile-mode .header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
}

body.mobile-mode .threshold-box {
    width: 100%;
    justify-content: space-between;
}

body.mobile-mode .expected-option-chip {
    width: 100%;
    justify-content: space-between;
}

body.mobile-mode .expected-section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

body.mobile-mode .expected-sort-bar {
    margin-top: 0;
    gap: 5px;
}

body.mobile-mode .expected-sort-chip {
    padding: 4px 8px;
    font-size: 0.68rem;
}

body.mobile-mode .expected-card-main {
    gap: 10px;
}

body.mobile-mode .expected-sub {
    font-size: 0.74rem;
}

body.mobile-mode .expected-style-summary {
    font-size: 0.68rem;
}

body.mobile-mode .expected-metric {
    min-width: 82px;
}

body.mobile-mode .report-date-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

body.mobile-mode .report-date-chips::-webkit-scrollbar {
    display: none;
}

body.mobile-mode .report-date-chip {
    flex: 0 0 auto;
}

body.mobile-mode .report-filter-chips,
body.mobile-mode .report-control-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

body.mobile-mode .report-filter-chips::-webkit-scrollbar,
body.mobile-mode .report-control-row::-webkit-scrollbar {
    display: none;
}

body.mobile-mode .report-select-wrap,
body.mobile-mode .report-toggle-pill,
body.mobile-mode .report-filter-chip {
    flex: 0 0 auto;
}

body.mobile-mode .report-surface-head,
body.mobile-mode .report-surface-detail-row {
    flex-direction: column;
}

body.mobile-mode .app-alert-summary-grid,
body.mobile-mode .app-report-hero-metrics,
body.mobile-mode .app-report-hero-notes {
    grid-template-columns: 1fr;
}

body.mobile-mode .app-alert-center-shell {
    gap: 6px;
}

body.mobile-mode .report-surface-stat-grid,
body.mobile-mode .report-surface-stat-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.mobile-mode .intraday-summary-grid {
    grid-template-columns: 1fr;
}

body.mobile-mode .daily-report-summary {
    grid-template-columns: 1fr;
}

body.mobile-mode .final-report-history-metrics {
    grid-template-columns: minmax(0, 1fr);
}

body.mobile-mode .final-report-history-preview {
    overflow-x: auto;
}

body.mobile-mode .final-report-history-sheet {
    padding: 10px;
    grid-template-columns: minmax(0, 1fr);
}

body.mobile-mode .final-report-history-table {
    min-width: 480px;
}

body.mobile-mode .final-report-history-preview img,
body.mobile-mode .final-report-history-card img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

body.mobile-mode .app-alert-card-top,
body.mobile-mode .app-alert-card-footer,
body.mobile-mode .app-report-hero-top,
body.mobile-mode .app-report-hero-actions {
    flex-direction: column;
    align-items: flex-start;
}

body.mobile-mode .daily-report-item-top {
    flex-direction: column;
}

body.mobile-mode .daily-report-metric {
    align-items: flex-start;
    text-align: left;
}

body.mobile-mode .daily-report-title-row {
    flex-direction: column;
    gap: 6px;
}

body.mobile-mode .daily-report-title-badges {
    justify-content: flex-start;
}

body.mobile-mode .item-meta-grid {
    grid-template-columns: 1fr;
    gap: 2px;
}

body.mobile-mode .setting-row {
    align-items: flex-start;
    flex-direction: column;
}

body.mobile-mode .stock-target-top {
    grid-template-columns: 1fr;
}

body.mobile-mode .stock-summary-pill {
    width: 100%;
    text-align: left;
}

body.mobile-mode .stock-target-preview {
    flex-direction: column;
}

body.app-shell .stock-group-header,
body.mobile-mode .stock-group-header {
    padding: 14px 16px;
}

body.app-shell .stock-group-target-meta,
body.mobile-mode .stock-group-target-meta {
    flex-direction: column;
    gap: 8px;
}

body.app-shell .stock-group-date-list,
body.mobile-mode .stock-group-date-list {
    gap: 6px;
}

body.mobile-mode .stock-target-grid {
    grid-template-columns: 1fr;
}

body.mobile-mode .target-price-row {
    align-items: flex-start;
}

body.mobile-mode .inline-delete {
    align-self: flex-start;
}

body.mobile-mode .stock-simple-head {
    gap: 8px;
    min-height: 78px;
    padding: 12px 10px 12px 16px;
}

body.mobile-mode .stock-simple-target-list {
    padding: 0 14px 14px;
}

body.mobile-mode .stock-simple-head-meta {
    gap: 8px;
}

body.mobile-mode .stock-simple-count {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.74rem;
}

body.mobile-mode .stock-plain-head {
    min-height: 74px;
    padding: 11px 10px 11px 14px;
}

body.mobile-mode .stock-plain-title-row {
    gap: 10px;
}

body.mobile-mode .stock-plain-name {
    font-size: 1rem;
}

body.mobile-mode .stock-plain-head-meta {
    gap: 6px;
}

body.mobile-mode .stock-plain-count {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.74rem;
}

body.mobile-mode .stock-plain-target-list {
    padding: 10px 12px 12px;
}

body.mobile-mode .stock-plain-target-row {
    align-items: flex-start;
}

body.mobile-mode .stock-plain-target-delete {
    align-self: flex-start;
}

body.mobile-mode .theme-switcher {
    width: 100%;
}

body.mobile-mode .theme-option {
    flex: 1;
}

body.mobile-mode .switch {
    align-self: flex-end;
}

body.mobile-mode .indicator-utility {
    flex-direction: column;
    align-items: stretch;
}

@keyframes toast-in {
    from {
        transform: translateX(18px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(18px);
        opacity: 0;
    }
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

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

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

@media (max-width: 1180px) {
    #app {
        gap: 14px;
        padding: 14px;
    }

    .chart-header {
        flex-direction: column;
    }

    .timeframe-selector {
        width: 100%;
        overflow: visible;
        flex-wrap: wrap;
    }

    .chart-settings-panel {
        top: 144px;
        max-height: calc(100vh - 214px);
    }
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        top: 14px;
        left: 14px;
        bottom: 14px;
        z-index: 1000;
        width: min(392px, calc(100vw - 28px));
        min-width: min(392px, calc(100vw - 28px));
    }

    .sidebar-inner {
        min-width: min(392px, calc(100vw - 28px));
    }

    .sidebar.stock-view-active {
        width: min(430px, calc(100vw - 28px));
        min-width: min(430px, calc(100vw - 28px));
    }

    .sidebar.stock-view-active .sidebar-inner {
        min-width: min(430px, calc(100vw - 28px));
    }

    .sidebar.hidden {
        width: 0;
        min-width: 0;
        transform: translateX(-18px);
    }

    .sidebar-close-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        border: none;
        background: rgba(255, 255, 255, 0.05);
        color: var(--text-primary);
        font-size: 1.5rem;
    }

    .main-content {
        width: 100%;
    }

    .chart-settings-panel {
        right: 0;
        left: 0;
        width: auto;
    }

    .stock-target-top {
        grid-template-columns: 1fr;
    }

    .stock-summary-pill {
        width: 100%;
        text-align: left;
    }

    .stock-target-item {
        min-height: 220px;
    }
}

@media (max-width: 640px) {
    #app {
        padding: 10px;
    }

    .chart-header,
    .chart-stage {
        border-radius: 20px;
    }

    .chart-header {
        padding: 16px;
    }

    .chart-header-main {
        align-items: flex-start;
    }

    .symbol-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .badge {
        min-height: 38px;
        font-size: 0.92rem;
    }

    .noti-layer {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: calc(100vh - 20px);
    }

    .chart-settings-panel {
        top: 132px;
        max-height: calc(100vh - 154px);
        padding: 18px;
        border-radius: 20px;
    }

    .stock-target-preview {
        flex-direction: column;
    }

    .stock-target-grid {
        grid-template-columns: 1fr;
    }

    .target-price-row {
        align-items: flex-start;
    }

    .inline-delete {
        align-self: flex-start;
    }

    .stock-simple-head {
        gap: 8px;
        min-height: 78px;
        padding: 12px 10px 12px 16px;
    }

    .stock-simple-target-list {
        padding: 0 14px 14px;
    }

    .stock-simple-trigger {
        gap: 0;
    }

    .stock-simple-head-meta {
        gap: 8px;
    }

    .stock-simple-count {
        min-height: 28px;
        padding: 0 10px;
        font-size: 0.74rem;
    }

    .stock-plain-head {
        min-height: 74px;
        padding: 11px 10px 11px 14px;
    }

    .stock-plain-title-row {
        gap: 10px;
    }

    .stock-plain-name {
        font-size: 1rem;
    }

    .stock-plain-head-meta {
        gap: 6px;
    }

    .stock-plain-count {
        min-height: 28px;
        padding: 0 10px;
        font-size: 0.74rem;
    }

    .stock-plain-target-list {
        padding: 10px 12px 12px;
    }

    .stock-plain-target-row {
        align-items: flex-start;
    }

    .stock-plain-target-delete {
        align-self: flex-start;
    }

    .noti-header {
        flex-direction: column;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .final-report-history-metrics {
        grid-template-columns: minmax(0, 1fr);
    }

    .final-report-history-sheet {
        padding: 12px;
    }

    .final-report-history-table {
        min-width: 520px;
    }

    .threshold-box {
        width: 100%;
        justify-content: space-between;
    }

    .chart-legend {
        left: 10px;
        top: 10px;
        right: 10px;
        max-width: none;
        border-radius: 14px;
        font-size: 0.74rem;
    }

    .chart-zoom-controls {
        right: 10px;
        bottom: 10px;
    }

    .chart-zoom-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .chart-stage.volume-profile-on .chart-legend {
        left: 132px;
        max-width: calc(100% - 146px);
    }

    .volume-profile,
    .volume-profile.hidden {
        top: 10px;
        left: 10px;
        right: auto;
        bottom: 10px;
        width: 112px;
        min-width: 112px;
    }

    .setting-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .theme-switcher {
        width: 100%;
    }

    .theme-option {
        flex: 1;
    }

    .switch {
        align-self: flex-end;
    }

    .indicator-utility {
        flex-direction: column;
        align-items: stretch;
    }

    .tf-dropdown,
    .tf-dropdown-toggle {
        width: 100%;
    }

    .tf-dropdown-menu {
        right: 0;
        left: 0;
        min-width: 0;
    }
}

/* ===== 모의투자 서브탭 ===== */
.mock-subtab-bar {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-panel-strong, #0a161f);
    border: 1px solid var(--border-color);
    border-radius: 10px 10px 0 0;
    padding: 6px 8px 0;
    overflow-x: auto;
}

.mock-subtab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 7px 14px;
    cursor: pointer;
    border-radius: 7px 7px 0 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.mock-subtab-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.mock-subtab-btn.mock-subtab-active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
    background: rgba(59,165,255,0.07);
}

/* ===== 모의투자 달력 ===== */
.mock-overview-card,
.mock-accordion-card {
    margin-top: 12px;
}

.mock-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mock-overview-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mock-overview-kicker {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-blue);
    font-weight: 700;
}

.mock-overview-copy h3 {
    margin: 0;
    font-size: 1.05rem;
}

.mock-overview-copy p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
}

.mock-overview-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mock-overview-updated {
    color: var(--text-muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

.mock-overview-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mock-overview-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 13px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.07);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
}

.mock-overview-metric[data-tone="up"] {
    border-color: rgba(115, 255, 172, 0.2);
    background: linear-gradient(180deg, rgba(69, 186, 123, 0.12), rgba(255,255,255,0.03));
}

.mock-overview-metric[data-tone="down"] {
    border-color: rgba(255, 107, 107, 0.2);
    background: linear-gradient(180deg, rgba(210, 84, 84, 0.12), rgba(255,255,255,0.03));
}

.mock-overview-metric[data-tone="accent"] {
    border-color: rgba(59,165,255,0.22);
    background: linear-gradient(180deg, rgba(59,165,255,0.14), rgba(255,255,255,0.03));
}

.mock-overview-metric-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.mock-overview-metric-value {
    font-size: 1rem;
    color: var(--text-primary);
}

.mock-overview-metric-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.mock-page-tabbar {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.mock-page-tab-btn {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.mock-page-tab-btn--active {
    color: var(--text-primary);
    border-color: rgba(59,165,255,0.28);
    background: linear-gradient(180deg, rgba(59,165,255,0.22), rgba(59,165,255,0.12));
    box-shadow: 0 10px 20px rgba(4, 17, 29, 0.22);
}

.mock-page-card {
    overflow: hidden;
}

.mock-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mock-page-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
}

.mock-page-kicker {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
}

.mock-page-copy strong {
    font-size: 0.98rem;
}

.mock-page-copy small {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.mock-calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.mock-calendar-month-btn {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 8px 16px;
    min-width: 120px;
    font-size: 0.86rem;
    font-weight: 700;
}

.mock-calendar-month-picker {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 640px) {
    .mock-overview-head {
        flex-direction: column;
        align-items: stretch;
    }

    .mock-overview-actions {
        justify-content: space-between;
    }

    .mock-overview-metrics {
        grid-template-columns: 1fr;
    }

    .mock-page-tabbar {
        gap: 6px;
    }

    .mock-page-tab-btn {
        padding: 8px 12px;
        font-size: 0.74rem;
    }

    .mock-calendar-header {
        gap: 8px;
    }

    .mock-calendar-month-btn {
        min-width: 0;
        flex: 1;
    }

    .mock-calendar-day-head {
        flex-direction: column;
        align-items: stretch;
    }

    .mock-calendar-day-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

.mock-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.mock-cal-header-cell {
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    padding: 4px 0;
    font-weight: 600;
}

.mock-cal-cell {
    min-height: 58px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 4px 5px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.mock-cal-cell.mock-cal-empty {
    background: transparent;
    border-color: transparent;
    pointer-events: none;
}

.mock-cal-cell.mock-cal-weekend .mock-cal-day {
    color: rgba(255,120,120,0.6);
}

.mock-cal-cell.mock-cal-has-trade {
    background: rgba(59,165,255,0.06);
    border-color: rgba(59,165,255,0.2);
}

.mock-cal-cell.mock-cal-active {
    border-color: rgba(255, 214, 102, 0.45);
    background: linear-gradient(180deg, rgba(255, 214, 102, 0.16), rgba(59,165,255,0.04));
    box-shadow: 0 10px 18px rgba(4, 17, 29, 0.24);
}

.mock-cal-day {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.mock-cal-buy-dot {
    font-size: 0.60rem;
    color: var(--up-color, #ff5e69);
    background: rgba(255,94,105,0.12);
    border-radius: 3px;
    padding: 1px 4px;
    white-space: nowrap;
}

.mock-cal-sell-dot {
    font-size: 0.60rem;
    color: #64b5f6;
    background: rgba(33,150,243,0.12);
    border-radius: 3px;
    padding: 1px 4px;
    white-space: nowrap;
}

.mock-calendar-day-detail {
    margin-top: 14px;
}

.mock-calendar-day-card {
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.07);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
    padding: 14px;
}

.mock-calendar-day-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mock-calendar-day-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mock-calendar-day-copy strong {
    font-size: 1rem;
}

.mock-calendar-day-copy small {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.mock-calendar-day-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mock-calendar-day-column {
    min-width: 0;
}

.mock-calendar-day-column-head {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

/* ===== 모의투자 거래 요약 ===== */
.mock-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin: 14px 0 6px;
}

.mock-summary-cell--wide {
    grid-column: span 2;
}

.mock-date-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mock-date-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    font-size: 0.75rem;
}

.mock-date-label {
    color: var(--text-secondary);
    min-width: 80px;
}

.mock-date-buy {
    color: var(--up-color, #ff5e69);
    font-weight: 600;
}

.mock-date-sell {
    color: #64b5f6;
    font-weight: 600;
}

/* ===== 모의투자 거래내역 ===== */
.mock-trades-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.mock-trades-filter-bar select {
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 0.75rem;
}

.mock-trades-date-group {
    margin-bottom: 16px;
}

.mock-trades-date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    margin-bottom: 6px;
}

.mock-trades-date {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mock-trades-date-stat {
    font-size: 0.70rem;
    color: var(--text-secondary);
}

/* ===== 잔고 달력 매도 칩 ===== */
.hcal-sell-chip {
    display: block;
    font-size: 0.55rem;
    color: #64b5f6;
    background: rgba(33,150,243,0.15);
    border-radius: 3px;
    padding: 1px 3px;
    margin-top: 1px;
    text-align: center;
}

/* ===== 포지션 미등록 배너 & 버튼 ===== */
.pos-sync-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255,202,40,0.08);
    border: 1px solid rgba(255,202,40,0.25);
    border-radius: 8px;
    margin-bottom: 8px;
}

.pos-sync-msg {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.pos-sync-msg strong {
    color: #ffca28;
}

.pos-sync-btn {
    padding: 5px 14px;
    border-radius: 7px;
    border: 1px solid rgba(59,165,255,0.4);
    background: rgba(59,165,255,0.12);
    color: var(--accent-blue, #3ba5ff);
    font-size: 0.73rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.pos-sync-btn:active { opacity: 0.75; }

/* 유령 포지션 배너 */
.pos-ghost-banner {
    background: rgba(255,100,100,0.07);
    border-color: rgba(255,100,100,0.3);
}
.pos-ghost-banner .pos-sync-msg strong {
    color: #ff6b6b;
}
.pos-ghost-btn {
    border-color: rgba(255,100,100,0.4);
    background: rgba(255,100,100,0.12);
    color: #ff6b6b;
}

/* 미등록 행 강조 */
.pos-unregistered td:first-child strong {
    opacity: 0.75;
}

/* + 등록 버튼 */
.pos-register-btn {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px dashed rgba(255,202,40,0.5);
    background: rgba(255,202,40,0.07);
    color: #ffca28;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.pos-register-btn:active { opacity: 0.75; }

/* ===== 수동 포지션 등록 모달 (.mpm-*) ===== */
#manual-pos-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.mpm-content {
    width: min(520px, calc(100vw - 24px));
    max-height: min(88vh, 640px);
    display: flex;
    flex-direction: column;
}

.mpm-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
    overflow-y: auto;
    flex: 1;
}

.mpm-subtitle {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.mpm-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mpm-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mpm-hint {
    font-weight: 400;
    opacity: 0.7;
}

.mpm-static {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mpm-input {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 100%;
    box-sizing: border-box;
}

.mpm-input:focus {
    outline: none;
    border-color: rgba(59,165,255,0.5);
    background: rgba(59,165,255,0.05);
}

/* 전략 미리보기 */
.mpm-strategy-preview {
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.03);
    padding: 8px 10px;
}

.mpm-preview-title {
    font-size: 0.62rem;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.mpm-preview-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mpm-preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 2px 0;
}

.mpm-preview-row span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== 캘린더 보유종목 카드 (.hcb-*) ===== */
.hcb-card {
    background: var(--card-bg, rgba(30,33,48,0.95));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 12px 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 헤더 */
.hcb-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.hcb-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.hcb-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.hcb-head-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.hcb-return {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* 전략 바 */
.hcb-strategy-bar {
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.03);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hcb-strategy-bar[data-tone="safe"] {
    border-color: rgba(67,160,71,0.3);
    background: rgba(67,160,71,0.06);
}
.hcb-strategy-bar[data-tone="warning"] {
    border-color: rgba(255,202,40,0.3);
    background: rgba(255,202,40,0.06);
}
.hcb-strategy-bar[data-tone="critical"],
.hcb-strategy-bar[data-tone="triggered"] {
    border-color: rgba(244,67,54,0.3);
    background: rgba(244,67,54,0.06);
}

.hcb-bar-head {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.hcb-bar-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.hcb-bar-summary {
    font-size: 0.70rem;
    color: var(--text-secondary);
    flex: 1;
    text-align: right;
}

.hcb-qty {
    font-size: 0.68rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.hcb-qty strong {
    color: var(--text-primary);
}

/* 전략 칩 행 */
.hcb-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* 칩 기본: 아이콘 + 상태만 표시 */
.hcb-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    min-width: 44px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    gap: 0;
}

.hcb-chip:active { opacity: 0.75; }

/* 발동 상태 */
.hcb-chip.hcb-chip-on {
    border-color: rgba(244,67,54,0.5);
    background: rgba(244,67,54,0.12);
}

/* 색상 톤별 테두리 */
.hcb-chip-tone-risk    { border-color: rgba(239,154,154,0.35); }
.hcb-chip-tone-warn    { border-color: rgba(255,202,40,0.35); }
.hcb-chip-tone-profit  { border-color: rgba(129,199,132,0.35); }
.hcb-chip-tone-protect { border-color: rgba(128,203,196,0.35); }
.hcb-chip-tone-trail   { border-color: rgba(100,181,246,0.35); }
.hcb-chip-tone-time    { border-color: rgba(255,202,40,0.25); }
.hcb-chip-tone-climax  { border-color: rgba(206,147,216,0.35); }

/* 기본 표시: 아이콘 + 상태 */
.hcb-chip-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.hcb-chip-icon {
    font-size: 1rem;
    line-height: 1;
}

.hcb-chip-state {
    font-size: 0.60rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* 상세 정보 — 기본 숨김, 탭하면 펼침 */
.hcb-chip-detail {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.08);
    width: 100%;
}

.hcb-chip.hcb-chip-expanded .hcb-chip-detail {
    display: flex;
}

.hcb-chip-name {
    font-size: 0.60rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.hcb-chip-price {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.hcb-chip-price.hsm-profit  { color: #ff5e69; }
.hcb-chip-price.hsm-stop    { color: #ef9a9a; }
.hcb-chip-price.hsm-protect { color: #81c784; }
.hcb-chip-price.hsm-trail   { color: #ffb74d; }
.hcb-chip-price.hsm-time    { color: #b0bec5; }
.hcb-chip-price.hsm-climax  { color: #ce93d8; }

.hcb-chip-dist {
    font-size: 0.58rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.hcb-dist-on {
    color: #ef9a9a;
    font-weight: 700;
}

/* 하단 버튼 */
.hcb-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}

.hcb-chart-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(59,165,255,0.35);
    background: rgba(59,165,255,0.1);
    color: var(--accent-blue, #3ba5ff);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.hcb-chart-btn:active {
    background: rgba(59,165,255,0.22);
    border-color: rgba(59,165,255,0.6);
}

/* Chart header UX reset */
.chart-header {
    gap: 12px;
    padding: 14px 16px 14px;
}

.chart-header-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding-bottom: 0;
}

.chart-header-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.chart-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.chart-navigation-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: max-content;
    margin-left: auto;
    padding: 3px;
    border: 1px solid rgba(122, 156, 192, 0.14);
    border-radius: 16px;
    background: rgba(7, 17, 28, 0.46);
}

.chart-header-hidden-actions[hidden] {
    display: none !important;
}

.chart-header-controls {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.chart-header .timeframe-selector {
    width: auto;
    max-width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
}

.chart-header .timeframe-selector::-webkit-scrollbar {
    display: none;
}

.chart-header .timeframe-selector > * {
    flex: 0 0 auto;
}

.chart-header-action-btn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(122, 156, 192, 0.2);
    background: rgba(13, 23, 35, 0.7);
    color: rgba(232, 239, 246, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.chart-header-action-btn:hover,
.chart-header-action-btn:focus-visible,
.chart-header-action-btn[aria-expanded="true"] {
    border-color: rgba(127, 216, 255, 0.34);
    background: rgba(16, 32, 48, 0.92);
    color: #a6ddff;
}

.chart-header .chart-nav-btn {
    width: 42px;
    min-width: 42px;
    height: 42px;
}

.chart-header .chart-settings-btn .header-utility-icon {
    width: 18px;
    height: 18px;
}

.chart-header .chart-lock-status-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-width: 1px;
    gap: 0;
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 18px rgba(0, 0, 0, 0.16);
}

.chart-header .chart-lock-status-btn.chart-lock-status-locked {
    border-color: rgba(246, 196, 69, 0.34);
    background: linear-gradient(180deg, rgba(63, 46, 10, 0.86), rgba(31, 24, 8, 0.88));
    color: #ffd66e;
}

.chart-header .chart-lock-status-btn.chart-lock-status-unlocked {
    border-color: rgba(97, 214, 154, 0.34);
    background: linear-gradient(180deg, rgba(13, 49, 33, 0.86), rgba(8, 28, 21, 0.88));
    color: #8ef0bc;
}

.chart-header .chart-lock-status-icon {
    width: 1.94rem;
    height: 1.94rem;
    background: none;
    box-shadow: none;
}

.chart-header .chart-lock-status-icon svg {
    width: 1.52rem;
    height: 1.52rem;
    stroke-width: 2;
}

.chart-header .lock-body {
    fill: currentColor;
    opacity: 0.96;
}

.chart-header .lock-shackle {
    stroke: currentColor;
    stroke-width: 2.1;
}

.chart-header .lock-shackle-open {
    transform-origin: 16px 7.5px;
    transform: rotate(34deg) translateX(2px);
}

.chart-header .lock-keyhole {
    stroke-width: 1.65;
}

.chart-header .chart-lock-status-btn.chart-lock-status-locked .lock-keyhole {
    stroke: rgba(98, 63, 0, 0.82);
}

.chart-header .chart-lock-status-btn.chart-lock-status-unlocked .lock-keyhole {
    stroke: rgba(0, 72, 42, 0.82);
}

.chart-header .chart-lock-status-label,
.chart-header .chart-lock-status-count {
    display: none;
}

body.app-shell .chart-header,
body.mobile-mode .chart-header {
    gap: 10px;
    padding: 14px 14px 12px;
}

body.app-shell .chart-header-main,
body.mobile-mode .chart-header-main {
    align-items: flex-start;
    gap: 10px;
}

body.app-shell .chart-header-actions,
body.mobile-mode .chart-header-actions {
    gap: 6px;
}

body.app-shell .chart-navigation-actions,
body.mobile-mode .chart-navigation-actions {
    gap: 6px;
    padding: 2px;
}

body.app-shell .chart-header-action-btn,
body.mobile-mode .chart-header-action-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border-radius: 12px;
}

body.app-shell .chart-header .chart-lock-status-btn,
body.mobile-mode .chart-header .chart-lock-status-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
}

body.app-shell .chart-header .chart-lock-status-icon,
body.mobile-mode .chart-header .chart-lock-status-icon {
    width: 1.72rem;
    height: 1.72rem;
}

body.app-shell .chart-header .chart-lock-status-icon svg,
body.mobile-mode .chart-header .chart-lock-status-icon svg {
    width: 1.36rem;
    height: 1.36rem;
}

body.app-shell .chart-header .timeframe-selector,
body.mobile-mode .chart-header .timeframe-selector {
    min-width: 0;
    gap: 6px;
    overflow-x: auto;
}

@media (max-width: 640px) {
    .chart-header {
        gap: 10px;
        padding: 14px 14px 12px;
    }

    .chart-header-main {
        gap: 10px;
    }

    .chart-header-info-row {
        gap: 10px;
    }

    .chart-header-actions {
        gap: 6px;
    }

    .chart-navigation-actions {
        gap: 6px;
        padding: 2px;
    }

    .chart-header-action-btn {
        width: 38px;
        min-width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .chart-header .chart-lock-status-btn {
        width: 40px;
        min-width: 40px;
        height: 40px;
    }

    .chart-header .symbol-title-row {
        flex-direction: row;
        align-items: center;
    }
}

/* ── 차트 돌파가 정리 패널 ─────────────────────────────── */
.chart-cleanup-panel {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    width: min(320px, calc(100vw - 24px));
    background: rgba(18, 22, 32, 0.96);
    border: 1px solid rgba(255, 215, 96, 0.3);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.chart-cleanup-panel.hidden {
    display: none;
}
.chart-cleanup-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.chart-cleanup-panel-title {
    font-size: 13px;
    font-weight: 600;
    color: #ffe08a;
    flex: none;
}
.chart-cleanup-panel-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chart-cleanup-price-list {
    display: flex;
    flex-direction: column;
    max-height: 160px;
    overflow-y: auto;
    padding: 4px 0;
}
.chart-cleanup-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.1s;
}
.chart-cleanup-price-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.chart-cleanup-price-row.selected {
    background: rgba(239, 68, 68, 0.08);
}
.chart-cleanup-checkbox {
    flex: none;
    width: 18px;
    height: 18px;
    accent-color: #f87171;
    cursor: pointer;
}
.chart-cleanup-price-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    flex: 1;
}
.chart-cleanup-panel-footer {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.chart-cleanup-cancel-btn {
    flex: 1;
    padding: 8px 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}
.chart-cleanup-apply-btn {
    flex: 2;
    padding: 8px 0;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.chart-cleanup-apply-btn:disabled {
    opacity: 0.4;
    cursor: default;
}
