/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface2: #242836;
    --border: #2e3346;
    --text: #e4e6f0;
    --text-dim: #8b8fa8;
    --accent: #6c8cff;
    --accent-hover: #8aa4ff;
    --accent-cta: #ff7b54;
    --accent-cta-hover: #ff9472;
    --green: #4ade80;
    --yellow: #fbbf24;
    --orange: #fb923c;
    --red: #f87171;
    --radius: 8px;
}

[data-theme="light"] {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface2: #ebedf2;
    --border: #d1d5e0;
    --text: #1a1d27;
    --text-dim: #4a4f63;
    --accent: #4a6cf7;
    --accent-hover: #3a5ce5;
    --accent-cta: #e8553d;
    --accent-cta-hover: #d4442e;
    --green: #16a34a;
    --yellow: #d97706;
    --orange: #ea580c;
    --red: #dc2626;
}
[data-theme="light"] .answer-label { color: #fff; }
[data-theme="light"] .markdown-body strong { color: var(--accent); }
[data-theme="light"] .slide-overlay { background: rgba(0, 0, 0, 0.3); }
[data-theme="light"] .slide-nutshell { background: rgba(74, 108, 247, 0.06); border-color: rgba(74, 108, 247, 0.2); }
[data-theme="light"] .explain-heading { color: #92400e; background: rgba(217, 119, 6, 0.08); border-left-color: #d97706; }
[data-theme="light"] .cal-event.imp-高 { background: rgba(220, 38, 38, 0.08); }
[data-theme="light"] .concept-item.weak { background: rgba(220, 38, 38, 0.05); }
[data-theme="light"] .cal-cell.cal-today { background: rgba(74, 108, 247, 0.06); }
[data-theme="light"] .cal-cell.cal-weekend-cell { background: rgba(220, 38, 38, 0.03); }
[data-theme="light"] .cal-cell.cal-holiday { background: rgba(251, 191, 36, 0.10); }
[data-theme="light"] .imp-badge-高 { background: rgba(220, 38, 38, 0.12); }
[data-theme="light"] .imp-badge-中 { background: rgba(217, 119, 6, 0.12); }

/* ── Focus Ring (Accessibility) ── */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline-offset: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Navbar ── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.nav-brand::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 20px;
    background: linear-gradient(180deg, var(--accent), var(--green));
    border-radius: 3px;
}

.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-links > a, .nav-dropdown-btn {
    color: var(--text-dim);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius);
    transition: all 0.2s;
    white-space: nowrap;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}
.nav-links > a:hover, .nav-dropdown-btn:hover {
    color: var(--text);
    background: var(--surface2);
}
.nav-links > a.active, .nav-dropdown-btn.active {
    color: var(--accent);
    background: rgba(108, 140, 255, 0.1);
    font-weight: 600;
}
.nav-caret { font-size: 0.7em; margin-left: 0.15rem; }
/* ── PC ドロップダウンメニュー ── */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 0.35rem 0;
    z-index: 200;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block;
    padding: 0.55rem 1rem;
    color: var(--text-dim);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s;
}
.nav-dropdown-menu a:hover {
    color: var(--text);
    background: var(--surface2);
}
.nav-dropdown-menu a.active {
    color: var(--accent);
    font-weight: 600;
}

/* ── Container ── */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ── Page Header ── */
.page-header { margin-bottom: 2rem; }
.page-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.back-link {
    display: inline-block;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.back-link:hover { color: var(--accent); }

.stats-bar {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}
.stat {
    color: var(--text-dim);
    font-size: 0.9rem;
}
.stat strong { color: var(--accent); }

/* ── Category Filter ── */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.chip {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    background: var(--surface2);
    color: var(--text-dim);
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.chip:hover, .chip.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── Topic List ── */
.topic-list { display: flex; flex-direction: column; gap: 0.75rem; }

.topic-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    transition: all 0.2s;
}
.topic-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.topic-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category-badge {
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    background: var(--surface2);
    color: var(--accent);
    border: 1px solid var(--border);
    font-weight: 600;
}
.category-badge.small {
    font-size: 0.78rem;
    padding: 0.15rem 0.45rem;
}

.time { color: var(--text-dim); font-size: 0.78rem; }

.topic-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.topic-summary, .topic-summary-detail {
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.6;
}
.topic-summary-detail { margin-top: 0.5rem; }

.topic-meta {
    margin-top: 0.6rem;
    font-size: 0.78rem;
    color: var(--text-dim);
}

.topic-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}
.topic-header h1 { margin-bottom: 0; }

/* ── Q&A Thread ── */
.qa-thread { display: flex; flex-direction: column; gap: 1.5rem; }

.qa-item {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.qa-question, .qa-answer {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
}

.qa-question {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
}

.qa-answer {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}

.qa-label {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--accent);
    color: #fff;
}
.answer-label {
    background: var(--green);
    color: var(--bg);
}

.qa-content {
    flex: 1;
    font-size: 0.92rem;
    line-height: 1.8;
}

/* ── Chart ── */
.chart-container {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.chart-container canvas { max-height: 350px; }

/* ── Markdown Body ── */
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.markdown-body h1 { font-size: 1.2rem; }
.markdown-body h2 { font-size: 1.1rem; }
.markdown-body h3 { font-size: 1rem; }

.markdown-body p { margin-bottom: 0.6rem; }
.markdown-body ul, .markdown-body ol {
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
}
.markdown-body li { margin-bottom: 0.3rem; }
.markdown-body strong { color: var(--accent); }

.markdown-body code {
    background: var(--bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}
.markdown-body pre {
    background: var(--bg);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 0.6rem;
}
.markdown-body table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 0.6rem;
}
.markdown-body th, .markdown-body td {
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-size: 0.85rem;
}
.markdown-body th { background: var(--surface); font-weight: 600; }

/* ── Understanding / Progress ── */
.understanding-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.understanding-section h2, .weak-points-section h2, .category-progress h2, .all-concepts h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.concept-list { display: flex; flex-direction: column; gap: 0.5rem; }

.concept-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1.25rem;
    border-left: 4px solid var(--border);
}

.concept-item.level-1 { border-left-color: var(--red); }
.concept-item.level-2 { border-left-color: var(--orange); }
.concept-item.level-3 { border-left-color: var(--yellow); }
.concept-item.level-4 { border-left-color: var(--accent); }
.concept-item.level-5 { border-left-color: var(--green); }
.concept-item.weak { background: rgba(248, 113, 113, 0.08); }

.concept-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.concept-name { font-weight: 600; font-size: 0.92rem; }
.concept-level {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-left: auto;
}
.concept-notes {
    margin-top: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ── Category Progress ── */
.weak-points-section { margin-bottom: 2.5rem; }
.category-progress { margin-bottom: 2.5rem; }

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}
.cat-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.cat-avg { margin-bottom: 0.5rem; }
.avg-number { font-size: 2rem; font-weight: 700; color: var(--accent); }
.avg-label { font-size: 0.85rem; color: var(--text-dim); }

.progress-bar {
    height: 6px;
    background: var(--surface2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--green));
    border-radius: 3px;
    transition: width 0.5s;
}

.cat-count { font-size: 0.75rem; color: var(--text-dim); }

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
}
.empty-state h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* ── Calendar ── */
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.cal-nav-btn {
    color: var(--text-dim);
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s;
}
.cal-nav-btn:hover { background: var(--surface2); color: var(--accent); }
.cal-current { font-size: 1.15rem; font-weight: 700; }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.cal-header {
    background: var(--surface2);
    padding: 0.5rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dim);
}
.cal-header.cal-weekend { color: var(--red); opacity: 0.7; }

.cal-cell {
    background: var(--surface);
    min-height: 90px;
    padding: 0.4rem;
    position: relative;
    overflow: hidden;
}
.cal-cell.cal-empty { background: var(--bg); }
.cal-cell.cal-today { background: rgba(108, 140, 255, 0.08); }
.cal-cell.cal-weekend-cell { background: rgba(248, 113, 113, 0.04); }
.cal-cell.cal-holiday { background: rgba(251, 191, 36, 0.08); }
.cal-cell.cal-holiday .cal-day-num { color: var(--red); }
.cal-cell.cal-has-events { border-bottom: 2px solid var(--accent); }

.cal-day-num {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
}
.cal-wday-label { display: none; }
.today-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
}

.cal-events { display: flex; flex-direction: column; gap: 2px; }

.cal-event {
    font-size: 0.78rem;
    padding: 0.15rem 0.3rem;
    border-radius: 3px;
    background: var(--surface2);
    color: var(--text);
    line-height: 1.4;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: default;
    border-left: 2px solid var(--text-dim);
}
.cal-event.imp-高 { border-left-color: var(--red); background: rgba(248, 113, 113, 0.1); }
.cal-event.imp-中 { border-left-color: var(--yellow); }
.cal-event.imp-低 { border-left-color: var(--text-dim); }

.cal-event-flag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-right: 0.2rem;
    opacity: 0.7;
}
.cal-event-time {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    margin-right: 0.25rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.slide-time {
    display: inline-block;
    margin-left: 0.6rem;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.flag-日本 { color: var(--red); }
.flag-米国 { color: var(--accent); }
.flag-欧州 { color: var(--green); }
.flag-中国 { color: var(--yellow); }

/* Calendar List */
.cal-list { margin-top: 1rem; }
.cal-list h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 1rem; }
.cal-list-items { display: flex; flex-direction: column; gap: 0.5rem; }

.cal-list-item {
    display: flex;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1.25rem;
    border-left: 4px solid var(--text-dim);
}
.cal-list-item.imp-高 { border-left-color: var(--red); }
.cal-list-item.imp-中 { border-left-color: var(--yellow); }

.cal-list-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}
.cal-list-day { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.cal-list-weekday { font-size: 0.7rem; color: var(--text-dim); }

.cal-list-body { flex: 1; }
.cal-list-header { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.3rem; flex-wrap: wrap; }
.cal-list-title { font-weight: 600; font-size: 0.92rem; }
.cal-list-desc { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.25rem; }

.imp-badge {
    font-size: 0.78rem;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-weight: 600;
}
.imp-badge-高 { background: rgba(248, 113, 113, 0.2); color: var(--red); }
.imp-badge-中 { background: rgba(251, 191, 36, 0.2); color: var(--yellow); }
.imp-badge-低 { background: var(--surface2); color: var(--text-dim); }

/* ── Slide Panel ── */
.slide-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    transition: opacity 0.3s;
    opacity: 0;
}
.slide-overlay.open { display: block; opacity: 1; }

.slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 300;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    padding: 2rem 1.75rem;
}
.slide-panel.open { transform: translateX(0); }

.slide-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}
.slide-close:hover { background: var(--surface2); color: var(--text); }

.slide-date {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.slide-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.slide-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    line-height: 1.5;
}

.slide-section {
    margin-bottom: 1.25rem;
}
.slide-section h3 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}
.slide-section p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text);
}
.slide-section ul {
    list-style: none;
    padding: 0;
}
.slide-section ul li {
    font-size: 0.85rem;
    line-height: 1.6;
    padding: 0.4rem 0;
    padding-left: 1rem;
    position: relative;
    border-bottom: 1px solid rgba(46, 51, 70, 0.4);
}
.slide-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* ── Nutshell & Explain ── */
.slide-nutshell {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 8px;
    padding: 1rem 1.1rem;
}
.slide-nutshell h3 {
    border-bottom: none;
    padding-bottom: 0;
    font-size: 0.92rem;
}
.slide-nutshell p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text);
    margin: 0;
}
.explain-list li {
    line-height: 1.75 !important;
    font-size: 0.87rem !important;
}
.explain-list li::before {
    display: none !important;
}
.explain-heading {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fbbf24;
    margin: 1rem 0 0.4rem 0;
    padding: 0.4rem 0.6rem;
    background: rgba(251, 191, 36, 0.08);
    border-left: 3px solid #fbbf24;
    border-radius: 0 4px 4px 0;
}

/* ── Theme Toggle ── */
.theme-toggle {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 1.05rem;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.theme-toggle:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── Stage Summary Blocks ── */
.stage-summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.stage-block {
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--border);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.stage-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.stage-block.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), 0 4px 12px rgba(108,140,255,0.25);
    transform: translateY(-2px);
}
.stage1-block.active { border-color: var(--yellow); box-shadow: 0 0 0 2px var(--yellow), 0 4px 12px rgba(251,191,36,0.2); }
.breakout-block.active { border-color: var(--green); box-shadow: 0 0 0 2px var(--green), 0 4px 12px rgba(34,197,94,0.2); }
.stage2-block.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 4px 12px rgba(108,140,255,0.2); }
.stage3-block.active { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange), 0 4px 12px rgba(249,115,22,0.2); }
.stage4-block.active { border-color: var(--red); box-shadow: 0 0 0 2px var(--red), 0 4px 12px rgba(239,68,68,0.2); }
.stage-block-count {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.stage-block-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
    line-height: 1.3;
}
.stage-block-label small {
    font-size: 0.7rem;
}
.stage1-block { border-top-color: var(--yellow); }
.stage1-block .stage-block-count { color: var(--yellow); }
.breakout-block { border-top-color: var(--green); }
.breakout-block .stage-block-count { color: var(--green); }
.stage2-block { border-top-color: var(--accent); }
.stage2-block .stage-block-count { color: var(--accent); }
.stage3-block { border-top-color: var(--orange); }
.stage3-block .stage-block-count { color: var(--orange); }
.stage4-block { border-top-color: var(--red); }
.stage4-block .stage-block-count { color: var(--red); }

/* ── Screening ── */
.screening-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-left: 4px solid var(--accent);
}
.screening-stats { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.stat-chip {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    background: var(--surface2);
    color: var(--text-dim);
}
.stat-chip strong { color: var(--text); margin-left: 0.25rem; }
.stat-chip.breakout-chip { background: rgba(74, 222, 128, 0.12); color: var(--green); }
.stat-chip.breakout-chip strong { color: var(--green); }
.stat-chip.stage1-chip { background: rgba(251, 191, 36, 0.12); color: var(--yellow); }
.stat-chip.stage1-chip strong { color: var(--yellow); }

.screening-actions { display: flex; align-items: center; gap: 0.75rem; }
.last-updated { font-size: 0.75rem; color: var(--text-dim); }

.screening-btn {
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s, transform 0.1s;
}
.screening-btn:hover { background: var(--accent-hover); }
.screening-btn:active { transform: scale(0.97); }
.screening-btn.cta {
    background: var(--accent-cta);
    font-size: 0.88rem;
    padding: 0.6rem 1.5rem;
    box-shadow: 0 2px 8px rgba(255, 123, 84, 0.3);
}
.screening-btn.cta:hover { background: var(--accent-cta-hover); }
.screening-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.screening-btn.small { padding: 0.35rem 0.75rem; font-size: 0.78rem; }
.screening-btn.large { padding: 0.75rem 2rem; font-size: 0.92rem; margin-top: 1rem; }

.screening-spinner {
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes highlightRow {
    0% { background: rgba(108, 140, 255, 0.3); }
    100% { background: transparent; }
}

/* Filter bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    white-space: nowrap;
}
.filter-input {
    padding: 0.35rem 0.5rem;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface2);
    color: var(--text);
}
.filter-input:focus {
    outline: none;
    border-color: var(--accent);
}
.price-input { width: 80px; }
.search-input { width: 150px; }
.filter-sep { color: var(--text-dim); font-size: 0.8rem; }
.filter-unit { color: var(--text-dim); font-size: 0.75rem; }
.filter-search-btn {
    padding: 0.35rem 0.6rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.82rem;
    transition: opacity 0.15s;
}
.filter-search-btn:hover { opacity: 0.85; }
.filter-reset-btn {
    padding: 0.35rem 0.75rem;
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.78rem;
}
.filter-reset-btn:hover { color: var(--text); border-color: var(--text-dim); }
.filter-result-count {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-left: auto;
}

/* Sector dropdown */
.sector-dropdown { position: relative; }
.sector-dropdown-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface2);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
}
.sector-dropdown-btn:hover { border-color: var(--accent); }
.sector-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    width: 260px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    padding: 0.5rem;
    margin-top: 4px;
}
.sector-dropdown-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.sector-dropdown-actions button {
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-dim);
    cursor: pointer;
}
.sector-dropdown-actions button:hover { color: var(--text); }
.sector-list { display: flex; flex-direction: column; gap: 0.15rem; }
.sector-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    padding: 0.2rem 0.25rem;
    border-radius: 3px;
    cursor: pointer;
    color: var(--text);
}
.sector-checkbox:hover { background: var(--surface2); }
.sector-checkbox input { margin: 0; accent-color: var(--accent); }

/* Breakout badge */
.breakout-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
    border-radius: 3px;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Panel stage guide */
/* チェックリスト */
.panel-checklist {
    margin-bottom: 1rem;
}
.checklist-toggle {
    font-size: 0.82rem;
    color: var(--text-dim);
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    transition: background 0.15s;
}
.checklist-toggle:hover { background: var(--surface2); }
.checklist-toggle .toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.2s;
}
.checklist-toggle.open .toggle-icon { transform: rotate(90deg); }
#checklist-items { display: none; margin-top: 0.5rem; }
#checklist-items.open { display: block; }
.checklist-group {
    margin-bottom: 0.5rem;
    background: var(--surface2);
    border-radius: 6px;
    padding: 0.5rem;
}
.checklist-group-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.3rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border);
}
.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0;
    font-size: 0.78rem;
}
.checklist-icon {
    flex-shrink: 0;
    width: 1.2em;
    text-align: center;
    font-weight: 700;
}
.checklist-item.met .checklist-icon {
    color: #22c55e;
}
.checklist-item.unmet .checklist-icon {
    color: #ef4444;
}
.checklist-item.met .checklist-label {
    color: var(--text);
}
.checklist-item.unmet .checklist-label {
    color: var(--text-dim);
}
.checklist-detail {
    margin-left: auto;
    font-size: 0.7rem;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    color: var(--text-dim);
    white-space: nowrap;
}
.checklist-item.na .checklist-icon {
    color: var(--text-dim);
}

/* 解説文 & スキャン日時 */
.panel-summary {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text);
    padding: 0.75rem 0.85rem;
    background: var(--surface2);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}
.panel-summary p {
    margin: 0 0 0.5rem 0;
}
.panel-summary p:last-child {
    margin-bottom: 0;
}
.summary-heading {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 0.3rem 0;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border);
}
.summary-heading:not(:first-child) {
    margin-top: 0.75rem;
}
.panel-scan-date {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-align: right;
    margin-bottom: 0.5rem;
}

/* ファンダメンタルズ */
.panel-fundamentals {
    margin-top: 1rem;
    margin-bottom: 1rem;
}
/* 損切りライン（S2/B2 パネル内） */
.panel-stoploss {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-left: 3px solid rgba(239, 68, 68, 0.6);
    border-radius: 6px;
}
.stoploss-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}
.stoploss-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #b91c1c;
}
.stoploss-info-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}
.stoploss-info-toggle:hover { background: rgba(239, 68, 68, 0.28); }
.stoploss-rows {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.stoploss-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem 0.5rem;
    background: var(--surface, rgba(255, 255, 255, 0.5));
    border-radius: 4px;
    font-size: 0.85rem;
}
.stoploss-row.tight { border-left: 2px solid #dc2626; }
.stoploss-row.loose { border-left: 2px solid #f59e0b; }
.sl-label {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 500;
}
.sl-value {
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.sl-drop {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 48px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.sl-drop.negative { color: #dc2626; }
.sl-drop.neutral { color: var(--text-dim); }
.stoploss-info {
    margin-top: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: var(--surface, rgba(255, 255, 255, 0.65));
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--text);
    line-height: 1.55;
    opacity: 0.85;
}
.stoploss-info p { margin: 0 0 0.4rem; }
.stoploss-info p:last-child { margin-bottom: 0; }
.stoploss-info strong { color: var(--text); }

/* 一覧テーブルの損切りライン列 */
.col-stoploss, .slp-td-stoploss { white-space: nowrap; text-align: right; }
.sl-compact-value {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
}
.sl-compact-drop {
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: 0.15rem;
}
.sl-compact-drop.negative { color: #dc2626; }
.sl-compact-drop.neutral { color: var(--text-dim); }
.funda-items { display: none; margin-top: 0.5rem; }
.funda-items.open { display: block; }
.funda-badge {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.funda-badge-ok {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}
.funda-badge-caution {
    background: rgba(251, 191, 36, 0.12);
    color: #eab308;
}
.funda-badge-warning {
    background: rgba(248, 113, 113, 0.12);
    color: #ef4444;
}
/* テーブル内インラインバッジ */
.funda-badge-inline {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    white-space: nowrap;
}
.funda-message {
    font-size: 0.78rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-top: 0.75rem;
}
.funda-message-caution {
    background: rgba(251, 191, 36, 0.08);
    border-left: 3px solid #eab308;
    color: var(--text-dim);
}
.funda-message-warning {
    background: rgba(248, 113, 113, 0.08);
    border-left: 3px solid #ef4444;
    color: var(--text-dim);
}
.funda-note {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
    text-align: right;
}

/* β版B2品質スコア バッジ */
.b2-score-badge {
    display: inline-block;
    min-width: 28px;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}
.b2-score-high {
    background: rgba(74, 222, 128, 0.18);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.4);
}
.b2-score-mid {
    background: rgba(251, 191, 36, 0.15);
    color: #eab308;
    border: 1px solid rgba(251, 191, 36, 0.35);
}
.b2-score-low {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* β版B2品質スコア 詳細パネル */
.panel-b2-score {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(108, 140, 255, 0.06);
    border: 1px solid rgba(108, 140, 255, 0.25);
    border-radius: var(--radius);
}
.b2-score-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}
.b2-score-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.b2-score-beta-tag {
    font-size: 0.68rem;
    padding: 0.1rem 0.35rem;
    background: rgba(168, 85, 247, 0.18);
    color: #7c3aed;
    border-radius: 3px;
    font-weight: 600;
    margin-left: 0.4rem;
}
[data-theme="dark"] .b2-score-beta-tag { color: #a855f7; }
.b2-score-big {
    font-size: 1.4rem;
    font-weight: 700;
    color: #6c8cff;
}
.b2-score-elements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.b2-score-element {
    font-size: 0.78rem;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text);
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    opacity: 0.8;
}
.b2-score-element.met {
    background: rgba(74, 222, 128, 0.14);
    color: #15803d;
    border: 1px solid rgba(74, 222, 128, 0.3);
    opacity: 1;
}
[data-theme="dark"] .b2-score-element.met { color: #4ade80; }
.b2-score-element.penalty {
    background: rgba(248, 113, 113, 0.14);
    color: #dc2626;
    border: 1px solid rgba(248, 113, 113, 0.3);
    opacity: 1;
}
[data-theme="dark"] .b2-score-element.penalty { color: #ef4444; }
.b2-score-note {
    font-size: 0.75rem;
    color: var(--text);
    margin-top: 0.5rem;
    line-height: 1.55;
    opacity: 0.75;
}

.screening-notice {
    padding: 1rem 1.25rem;
    background: rgba(108, 140, 255, 0.08);
    border: 1px solid rgba(108, 140, 255, 0.2);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.screening-notice p { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.75rem; }
.screening-progress .progress-fill.scanning {
    width: 100%;
    animation: scanning 2s ease-in-out infinite;
    background: linear-gradient(90deg, var(--accent), var(--green), var(--accent));
    background-size: 200% 100%;
}
@keyframes scanning { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.screening-section { margin-bottom: 2rem; scroll-margin-top: 70px; }
.section-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--border);
}
.section-title.breakout-title { border-left-color: var(--green); }
.section-title.stage1-title { border-left-color: var(--yellow); }
.section-desc { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 1rem; padding-left: 0.75rem; }

/* Stock table */
.stock-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 0.82rem;
}
.stock-table thead th {
    padding: 0.6rem 0.65rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    background: var(--surface2);
    white-space: nowrap;
    user-select: none;
}
.stock-table thead th.sortable {
    cursor: pointer;
    border-bottom: 2px dashed var(--border);
}
.stock-table thead th.sortable:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.sort-icon {
    font-size: 0.75rem;
    color: var(--text-dim);
    opacity: 0.5;
}
.sort-icon.sort-active {
    opacity: 1;
    color: var(--accent);
}

.stock-row {
    cursor: pointer;
    transition: background 0.15s;
    border-left: 3px solid transparent;
}
.stock-row:hover { background: var(--surface2); }
.stock-row.breakout { border-left-color: var(--green); }
.stock-row.stage1 { border-left-color: var(--yellow); }
.stock-row td {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td.stock-ticker {
    font-weight: 700;
    color: var(--accent);
    font-family: monospace;
    font-size: 0.78rem;
}
.stock-ticker.large { font-size: 1rem; padding: 0.25rem 0; font-weight: 700; }
td.stock-name-cell { font-weight: 500; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.stock-name-cell.large { font-size: 1.1rem; font-weight: 500; }

.col-num { text-align: right; font-variant-numeric: tabular-nums; }
.col-num.dim { color: var(--text-dim); }
.col-narrow { text-align: center; font-size: 0.78rem; }
.col-ticker { width: 65px; }
.col-name { min-width: 100px; }
.col-rs { width: 90px; }
.col-sector { font-size: 0.72rem; color: var(--text-dim); white-space: nowrap; max-width: 100px; overflow: hidden; text-overflow: ellipsis; }

.positive { color: var(--green); }
.negative { color: var(--red); }
.ma-slope-up { color: var(--green); }
.ma-slope-flat { color: var(--yellow); }
.ma-slope-down { color: var(--red); }
.vol-増加 { color: var(--green); }
.vol-減少 { color: var(--red); }
.vol-横ばい { color: var(--text-dim); }

/* RS mini bar in table */
.rs-bar-mini {
    display: inline-block;
    width: 40px;
    height: 6px;
    background: var(--surface2);
    border-radius: 3px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 0.3rem;
}
.rs-bar-mini .rs-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--green));
    border-radius: 3px;
}
.rs-num { font-size: 0.72rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* Shared metric styles (panel) */
.metric-label { font-size: 0.78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.metric-value { font-size: 0.92rem; font-weight: 600; }
.metric-value.large { font-size: 1.15rem; }
.metric-value.positive { color: var(--green); }
.metric-value.negative { color: var(--red); }

.screening-empty-section {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.page-description { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.25rem; }

/* Tooltip styling for th[title] */
.stock-table thead th[title] {
    cursor: help;
}
.stock-table thead th[title].sortable {
    cursor: pointer;
}

/* Watchlist */
.watchlist-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.watchlist-input {
    padding: 0.4rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.82rem;
    outline: none;
}
.watchlist-input:focus { border-color: var(--accent); }
.watchlist-items { display: flex; flex-direction: column; gap: 0.35rem; }
.watchlist-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.82rem;
    transition: border-color 0.15s, background 0.15s;
}
.watchlist-item:hover { border-color: var(--accent); background: var(--surface2); }
.watchlist-remove {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--red);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.5rem;
    border-radius: 4px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.watchlist-remove:hover { background: rgba(248, 113, 113, 0.1); }

/* Drag handle */
.col-drag { width: 32px; text-align: center; cursor: grab; color: var(--text-muted); font-size: 1.2rem; user-select: none; }
.col-drag:active { cursor: grabbing; }
.drag-ghost { opacity: 0.4; background: rgba(99, 102, 241, 0.08); }
.drag-ghost td { border-color: rgba(99, 102, 241, 0.3) !important; }

/* Reorder open button */
.reorder-open-btn { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 6px 14px; cursor: pointer; font-size: 0.85rem; color: var(--text-secondary); margin-top: 8px; }
.reorder-open-btn:hover { background: rgba(99, 102, 241, 0.08); border-color: rgba(99, 102, 241, 0.4); color: var(--accent-blue); }

/* Reorder modal */
.reorder-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 900; }
.reorder-overlay.open { display: block; }
.reorder-modal { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--surface); border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); z-index: 901; width: 90%; max-width: 420px; max-height: 80vh; overflow: hidden; }
.reorder-modal.open { display: flex; flex-direction: column; }
.reorder-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 8px; border-bottom: 1px solid var(--border); }
.reorder-modal-header h3 { margin: 0; font-size: 1.1rem; }
.reorder-modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); padding: 0 4px; }
.reorder-hint { margin: 0; padding: 8px 20px 4px; font-size: 0.78rem; color: var(--text-muted); }
.reorder-list { list-style: none; margin: 0; padding: 8px 12px 16px; overflow-y: auto; flex: 1; }
.reorder-item { display: flex; align-items: center; gap: 8px; padding: 10px 8px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; background: var(--surface); }
.reorder-grip { cursor: grab; color: var(--text-muted); font-size: 1.2rem; user-select: none; flex-shrink: 0; }
.reorder-grip:active { cursor: grabbing; }
.reorder-ticker { font-weight: 600; font-size: 0.85rem; color: var(--accent-blue); min-width: 40px; flex-shrink: 0; }
.reorder-name { flex: 1; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 640px) {
    .col-drag { display: none; }
    th.col-drag { display: none; }
}

/* Monitor star */
.col-star { width: 48px; text-align: center; padding: 0 !important; }
.monitor-star {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--border);
    padding: 0.5rem;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, transform 0.15s;
}
.monitor-star:hover { color: var(--yellow); transform: scale(1.2); }
.monitor-star.active { color: var(--yellow); }

/* TradingView link */
td.stock-ticker a {
    color: var(--accent);
    text-decoration: none;
}
td.stock-ticker a:hover {
    text-decoration: underline;
}
.tv-link {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    transition: background 0.15s;
}
.tv-link:hover { background: rgba(108, 140, 255, 0.1); }
.panel-actions { margin: 0.5rem 0 1rem; }

/* Stage labels in watchlist */
.stage-label-1 { color: var(--yellow); font-weight: 600; }
.stage-label-2 { color: var(--accent); font-weight: 600; }
.stage-label-3 { color: var(--orange); font-weight: 600; }
.stage-label-4 { color: var(--red); font-weight: 600; }

/* Memo input */
.col-memo { min-width: 120px; }
.memo-input {
    width: 100%;
    padding: 0.25rem 0.5rem;
    background: var(--surface2);
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text);
    font-size: 0.78rem;
    outline: none;
}
.memo-input:focus { border-color: var(--accent); }
.memo-input::placeholder { color: var(--text-dim); }

/* Stock slide panel */
.panel-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}
.panel-overlay.open { display: block; }

.slide-panel {
    position: fixed;
    top: 0; right: -460px;
    width: 440px;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 1001;
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 1.25rem;
}
.slide-panel.open { right: 0; }
/* スワイプヒント（モバイルのみ表示） */
.swipe-hint {
    display: none;
    justify-content: center;
    padding: 0.5rem 0 0.25rem;
    cursor: pointer;
}
.swipe-pill {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--text-dim);
    opacity: 0.4;
}
@media (max-width: 640px) {
    .swipe-hint { display: flex; }
}
.panel-header { display: flex; justify-content: flex-end; margin-bottom: 0.5rem; }
.panel-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
}
.panel-close:hover { color: var(--text); }

.panel-stock-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.stage-badge {
    font-size: 0.78rem;
    padding: 0.2rem 0.7rem;
    border-radius: 4px;
    font-weight: 700;
}
.stage-badge.sb-s1 { background: rgba(251, 191, 36, 0.15); color: var(--yellow); }
.stage-badge.sb-spring { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.stage-badge.sb-b2 { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.stage-badge.sb-s2 { background: rgba(108, 140, 255, 0.15); color: var(--accent); }
.stage-badge.sb-s2-early { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.stage-badge.sb-s2-mid { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.stage-badge.sb-s2-late { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.stage-badge.sb-s3 { background: rgba(251, 146, 60, 0.15); color: var(--orange); }
.stage-badge.sb-s4 { background: rgba(248, 113, 113, 0.15); color: var(--red); }

/* NEW バッジ — 直近5営業日以内に新規検出されたB2銘柄 */
.badge-new {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    background: linear-gradient(135deg, #f43f5e 0%, #ef4444 100%);
    color: #fff;
    letter-spacing: 0.05em;
    line-height: 1;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(244, 63, 94, 0.4);
    animation: badge-new-pulse 2.4s ease-in-out infinite;
}
.badge-new-mini {
    font-size: 0.62rem;
    padding: 0.13rem 0.38rem;
    margin-left: 0.3rem;
}
@keyframes badge-new-pulse {
    0%, 100% { box-shadow: 0 1px 3px rgba(244, 63, 94, 0.4); }
    50% { box-shadow: 0 1px 6px rgba(244, 63, 94, 0.8); }
}

.panel-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.panel-metric {
    display: flex;
    flex-direction: column;
    padding: 0.6rem 0.75rem;
    background: var(--surface2);
    border-radius: var(--radius);
    gap: 0.15rem;
}

.panel-chart-container {
    height: 300px;
    margin-top: 0.5rem;
}

/* Light mode overrides for screening */
[data-theme="light"] .stock-table { box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
[data-theme="light"] .stock-row:hover { background: #f0f2f8; }
[data-theme="light"] .panel-overlay { background: rgba(0,0,0,0.3); }
[data-theme="light"] .screening-notice { background: rgba(74, 108, 247, 0.05); }
[data-theme="light"] .nav-links a.active { background: rgba(74, 108, 247, 0.08); }
[data-theme="light"] .screening-btn.cta { box-shadow: 0 2px 8px rgba(232, 85, 61, 0.25); }

/* ── Guide page ── */
.guide-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--accent);
    font-size: 0.85rem;
    text-decoration: none;
}
.guide-link:hover { text-decoration: underline; }

/* Guide TOC */
.guide-toc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}
.guide-toc-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.guide-toc-list {
    padding-left: 1.5rem;
    margin: 0;
}
.guide-toc-list li {
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    line-height: 1.5;
}
.guide-toc-list a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
}
.guide-toc-list a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.guide-section {
    margin-bottom: 2.5rem;
}
.guide-section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

/* Stage cycle diagram */
.stage-cycle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}
.cycle-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--surface2);
    border-left: 4px solid var(--border);
    flex: 1;
    min-width: 160px;
}
.cycle-s1 { border-left-color: #f59e0b; }
.cycle-s2 { border-left-color: #22c55e; }
.cycle-s3 { border-left-color: #f97316; }
.cycle-s4 { border-left-color: #ef4444; }
.cycle-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    min-width: 1.5rem;
}
.cycle-text strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}
.cycle-text span {
    font-size: 0.78rem;
    color: var(--text-dim);
}
.cycle-arrow {
    color: var(--text-dim);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Criteria cards */
.criteria-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.criteria-card h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}
.stage1-border { border-left-color: #f59e0b; }
.breakout-border { border-left-color: #22c55e; }
.stage2-border { border-left-color: #6c8cff; }
.stage3-border { border-left-color: #f97316; }
.stage4-border { border-left-color: #ef4444; }

.criteria-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.criteria-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.4rem 0.75rem;
    background: var(--surface2);
    border-radius: 6px;
    font-size: 0.85rem;
}
.criteria-label {
    font-weight: 600;
    color: var(--text-dim);
    white-space: nowrap;
}
.criteria-value {
    color: var(--text);
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.82rem;
}
.criteria-desc {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}
.criteria-tip {
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem;
    background: rgba(108, 140, 255, 0.08);
    border-radius: 6px;
    color: var(--text-dim);
}
.criteria-tip.warning {
    background: rgba(245, 158, 11, 0.1);
}
.criteria-tip strong {
    color: var(--text);
}

/* Indicator list */
.indicator-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.indicator-item {
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.indicator-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.indicator-item p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 0.4rem;
}
.indicator-example {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--surface2);
    border-radius: 6px;
    font-size: 0.82rem;
}
.indicator-example code {
    font-family: 'Cascadia Code', 'Consolas', monospace;
    color: var(--accent);
}

/* Usage steps */
.usage-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.usage-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.step-num {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.step-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}
.step-content p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* Disclaimer */
.guide-disclaimer {
    padding: 1rem 1.25rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.guide-disclaimer h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
}
.guide-disclaimer p {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ── Feedback ── */
.panel-memo {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.memo-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.4rem;
}
.memo-status {
    font-size: 0.8rem;
    color: var(--accent);
}
.panel-feedback {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.feedback-section-title {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.feedback-direction {
    display: flex;
    gap: 0.35rem;
}
.direction-btn {
    flex: 1;
    text-align: center;
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface2);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
}
.direction-btn input { display: none; }
.direction-btn:hover { border-color: var(--accent); color: var(--text); }
.direction-btn.active[data-dir="bullish"] { background: rgba(74, 222, 128, 0.15); color: var(--green); border-color: var(--green); }
.direction-btn.active[data-dir="bearish"] { background: rgba(248, 113, 113, 0.15); color: var(--red); border-color: var(--red); }
.direction-btn.active[data-dir="neutral"] { background: rgba(108, 140, 255, 0.15); color: var(--accent); border-color: var(--accent); }

.feedback-textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface2);
    color: var(--text);
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}
.feedback-textarea:focus { outline: none; border-color: var(--accent); }
.feedback-textarea::placeholder { color: var(--text-dim); }

.feedback-result { margin-bottom: 0.75rem; }
.fb-result-card {
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.5;
    border-left: 3px solid var(--border);
}
.fb-result-card.adopted { background: rgba(74, 222, 128, 0.08); border-left-color: var(--green); }
.fb-result-card.rejected { background: rgba(248, 113, 113, 0.08); border-left-color: var(--red); }
.fb-result-card.pending { background: rgba(251, 191, 36, 0.08); border-left-color: var(--yellow); }
.fb-result-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-right: 0.3rem;
}
.fb-result-card.adopted .fb-result-badge { background: rgba(74, 222, 128, 0.2); color: var(--green); }
.fb-result-card.rejected .fb-result-badge { background: rgba(248, 113, 113, 0.2); color: var(--red); }
.fb-result-card.pending .fb-result-badge { background: rgba(251, 191, 36, 0.2); color: var(--yellow); }

/* Feedback history in panel */
.fb-history-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
.fb-history-item {
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.3rem;
    border-radius: 4px;
    border-left: 3px solid var(--border);
    background: var(--surface2);
}
.fb-history-item.adopted { border-left-color: var(--green); }
.fb-history-item.rejected { border-left-color: var(--red); }
.fb-history-item.pending { border-left-color: var(--yellow); }
.fb-history-header {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.2rem;
}
.fb-history-comment {
    font-size: 0.78rem;
    color: var(--text);
    line-height: 1.5;
}
.fb-dir-tag {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
}
.fb-dir-tag.bullish { background: rgba(74, 222, 128, 0.15); color: var(--green); }
.fb-dir-tag.bearish { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.fb-dir-tag.neutral { background: rgba(108, 140, 255, 0.15); color: var(--accent); }
.fb-diag-tag {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
}
.fb-diag-tag.adopted { background: rgba(74, 222, 128, 0.2); color: var(--green); }
.fb-diag-tag.rejected { background: rgba(248, 113, 113, 0.2); color: var(--red); }
.fb-diag-tag.pending { background: rgba(251, 191, 36, 0.2); color: var(--yellow); }
.fb-date { font-size: 0.78rem; color: var(--text-dim); margin-left: auto; }

/* Feedback list page */
.feedback-tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}
.fb-tab {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.fb-tab:hover { color: var(--text); }
.fb-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.fb-tab.active.adopted { border-bottom-color: var(--green); }
.fb-tab.active.rejected { border-bottom-color: var(--red); }
.fb-tab.active.pending { border-bottom-color: var(--yellow); }
.fb-tab-count {
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--surface2);
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    margin-left: 0.25rem;
}

.feedback-list { display: flex; flex-direction: column; gap: 0.75rem; }
.fb-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.fb-card.adopted { border-left-color: var(--green); }
.fb-card.rejected { border-left-color: var(--red); }
.fb-card.pending { border-left-color: var(--yellow); }

.fb-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.fb-card-stock { display: flex; align-items: center; gap: 0.5rem; }
.fb-ticker {
    font-weight: 700;
    font-family: monospace;
    color: var(--accent);
    font-size: 0.88rem;
}
.fb-company { font-size: 0.82rem; color: var(--text-dim); }
.fb-card-badges { display: flex; gap: 0.3rem; align-items: center; }
.fb-stage-tag {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background: var(--surface2);
    color: var(--text-dim);
}

.fb-card-comment {
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}
.fb-card-reason {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.5;
    padding: 0.4rem 0.6rem;
    background: var(--surface2);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.fb-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fb-card-footer .fb-date { font-size: 0.75rem; color: var(--text-dim); margin-left: 0; }
.fb-card-actions { display: flex; gap: 0.5rem; align-items: center; }
.fb-delete-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    line-height: 1;
}
.fb-delete-btn:hover { background: rgba(248, 113, 113, 0.1); color: var(--red); }

/* ── Sector Rotation ── */
.sr-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.sr-flow-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    border-top: 3px solid var(--border);
}
.sr-flow-card.inflow { border-top-color: var(--green); }
.sr-flow-card.outflow { border-top-color: var(--red); }
.sr-flow-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sr-flow-list { display: flex; flex-direction: column; gap: 0.3rem; }
.sr-flow-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    background: var(--surface2);
    cursor: pointer;
    transition: background 0.15s;
}
.sr-flow-item:hover { background: var(--border); }
.sr-flow-name { font-weight: 500; }
.sr-flow-vals { display: flex; gap: 0.6rem; align-items: baseline; font-variant-numeric: tabular-nums; }
.sr-flow-ret { font-weight: 700; }
.sr-flow-accel { font-size: 0.7rem; color: var(--text-dim); font-weight: 400; }
.sr-flow-item.positive .sr-flow-ret { color: var(--green); }
.sr-flow-item.negative .sr-flow-ret { color: var(--red); }
.sr-flow-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.sr-flow-item.positive .sr-flow-val { color: var(--green); }
.sr-flow-item.negative .sr-flow-val { color: var(--red); }
.sr-flow-item.dim { color: var(--text-dim); cursor: default; }

/* ヒートマップセル */
.sector-heatmap .sector-row { cursor: pointer; transition: background 0.15s; }
.sector-heatmap .sector-row:hover { background: var(--surface2); }
.sector-heatmap .sector-row.sr-hot { border-left: 3px solid var(--green); }
.sector-heatmap .sector-row.sr-highlight {
    animation: sr-flash 1.5s ease;
}
@keyframes sr-flash {
    0%, 100% { background: transparent; }
    30% { background: rgba(108, 140, 255, 0.15); }
}
.sector-name { font-weight: 600; font-size: 0.82rem; white-space: nowrap; }
.sr-hot-icon { font-size: 0.85rem; }
.sr-stage-count { text-align: center; font-variant-numeric: tabular-nums; }
.sr-stage-zero { color: var(--text-dim); opacity: 0.4; }

.sr-strong-pos { color: #16a34a; background: rgba(74, 222, 128, 0.12); font-weight: 600; }
.sr-pos { color: var(--green); background: rgba(74, 222, 128, 0.06); }
.sr-mild-pos { color: var(--green); }
.sr-mild-neg { color: var(--red); }
.sr-neg { color: var(--red); background: rgba(248, 113, 113, 0.06); }
.sr-strong-neg { color: #dc2626; background: rgba(248, 113, 113, 0.12); font-weight: 600; }

/* フローバッジ */
.sr-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    white-space: nowrap;
}
.sr-badge.inflow { background: rgba(74, 222, 128, 0.15); color: var(--green); }
.sr-badge.outflow { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.sr-badge.neutral { background: var(--surface2); color: var(--text-dim); }

/* セクタードリルダウン: テーブル内スタイル */
.sr-slide-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.stage-list-panel .stock-table {
    font-size: 0.82rem;
    min-width: 520px;
}
.stage-list-panel .stock-table th { padding: 0.4rem 0.5rem; font-size: 0.72rem; }
.stage-list-panel .stock-table td { padding: 0.35rem 0.5rem; }
.stage-list-panel td.stock-name-cell { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ステージバッジ（ドリルダウン内） */
.stage-badge-1 {
    display: inline-block; font-size: 0.72rem; font-weight: 700;
    padding: 0.1rem 0.4rem; border-radius: 3px;
    background: rgba(251, 191, 36, 0.15); color: var(--yellow);
}
.stage-badge-2 {
    display: inline-block; font-size: 0.72rem; font-weight: 700;
    padding: 0.1rem 0.4rem; border-radius: 3px;
    background: rgba(108, 140, 255, 0.15); color: var(--accent);
}
.stage-badge-3 {
    display: inline-block; font-size: 0.72rem; font-weight: 700;
    padding: 0.1rem 0.4rem; border-radius: 3px;
    background: rgba(251, 146, 60, 0.15); color: var(--orange);
}
.stage-badge-4 {
    display: inline-block; font-size: 0.72rem; font-weight: 700;
    padding: 0.1rem 0.4rem; border-radius: 3px;
    background: rgba(248, 113, 113, 0.15); color: var(--red);
}

/* 選択中の行 */
.sector-heatmap .sector-row.sr-selected {
    background: rgba(108, 140, 255, 0.12);
    border-left: 3px solid var(--accent);
}

/* 資金フロー解説 */
.sr-flow-commentary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent);
}
.sr-commentary-inner h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.sr-commentary-inner p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 0.4rem;
}
.sr-commentary-inner .positive { color: var(--green); }
.sr-commentary-inner .negative { color: var(--red); }

/* ドリルダウン件数サマリー */
.sr-drilldown-summary {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.sr-dd-count {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
}
.sr-dd-count.breakout { background: rgba(74, 222, 128, 0.15); color: var(--green); }
.sr-dd-count.s2 { background: rgba(108, 140, 255, 0.15); color: var(--accent); }
.sr-dd-count.s1 { background: rgba(251, 191, 36, 0.15); color: var(--yellow); }

/* Light mode */
[data-theme="light"] .sr-strong-pos { color: #15803d; background: rgba(22, 163, 74, 0.08); }
[data-theme="light"] .sr-strong-neg { color: #b91c1c; background: rgba(220, 38, 38, 0.08); }
[data-theme="light"] .sr-flow-commentary { border-left-color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .stage-summary {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }
    .stage-block {
        padding: 0.6rem 0.25rem;
    }
    .stage-block-count {
        font-size: 1.4rem;
    }
    .stage-block-label {
        font-size: 0.78rem;
    }
    .stage-block-label small {
        font-size: 0.78rem;
    }

    /* ガイドページのカード改善 */
    .criteria-item { font-size: 0.9rem; padding: 0.5rem 0.75rem; }
    .indicator-item p { font-size: 0.88rem; }
    .usage-step { padding: 0.85rem; }
}

@media (max-width: 640px) {
    .navbar { padding: 0.6rem 0.75rem; }
    .nav-brand { font-size: 1rem; }
    .container { padding: 1.25rem 0.85rem; }
    .qa-question, .qa-answer { padding: 1rem; }
    .cat-grid { grid-template-columns: 1fr 1fr; }

    /* ステージ集計ブロック: 2行に折り返し */
    .stage-summary {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }
    .stage-block {
        padding: 0.5rem 0.25rem;
    }
    .stage-block-count { font-size: 1.3rem; }
    .stage-block-label { font-size: 0.78rem; }

    /* テーブル横スクロール */
    .screening-section { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .stock-table { font-size: 0.88rem; min-width: 600px; }
    .stock-table thead th { padding: 0.4rem 0.5rem; font-size: 0.82rem; }
    .stock-row td { padding: 0.4rem 0.5rem; }
    td.stock-name-cell { max-width: 120px; }

    /* ウォッチリストテーブルも横スクロール */
    .watchlist-table { min-width: 700px; }

    .slide-panel { width: 100vw; max-width: 100vw; right: -100vw; padding: 1rem; font-size: 0.95rem; border-left: none; }
    .panel-chart-container { height: 240px; }
    .page-header h1 { font-size: 1.4rem; }
    .page-description { font-size: 0.92rem; }
    .screening-controls { flex-direction: column; align-items: stretch; }
    .screening-stats { justify-content: center; }
    .screening-actions { justify-content: center; }
    .panel-metrics-grid { grid-template-columns: 1fr 1fr; }

    /* ナビ: ハンバーガーメニューで対応（768px以下で適用済み） */

    /* フィルタバー */
    .filter-bar { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .filter-group { flex-wrap: wrap; }
    .filter-result-count { margin-left: 0; }
    .search-input { flex: 1; min-width: 0; }
    .filter-input { font-size: 0.92rem; padding: 0.5rem 0.65rem; }
    .filter-label { font-size: 0.85rem; }
    .price-input { width: 90px; }

    /* ガイドページ */
    .guide-toc { padding: 1rem; }
    .guide-toc-list li { font-size: 0.92rem; margin-bottom: 0.5rem; }
    .guide-section-title { font-size: 1.08rem; }
    .stage-cycle { flex-direction: column; }
    .cycle-arrow { display: none; }
    .cycle-item { min-width: unset; }
    .criteria-grid { flex-direction: column; }
    .criteria-card { padding: 1rem; }
    .criteria-card h3 { font-size: 0.95rem; }
    .criteria-desc { font-size: 0.9rem; line-height: 1.8; }
    .criteria-tip { font-size: 0.85rem; }
    .indicator-item { padding: 0.85rem 1rem; }
    .indicator-item h4 { font-size: 0.95rem; }
    .indicator-item p { font-size: 0.88rem; line-height: 1.7; }
    .indicator-example { font-size: 0.85rem; }
    .usage-step { flex-direction: column; gap: 0.5rem; }
    .step-content h4 { font-size: 0.95rem; }
    .step-content p { font-size: 0.88rem; }
    .guide-disclaimer p { font-size: 0.85rem; }

    /* フィードバック */
    .feedback-tabs { overflow-x: auto; gap: 0; }
    .fb-tab { font-size: 0.82rem; padding: 0.5rem 0.75rem; white-space: nowrap; }
    .fb-card { padding: 0.85rem 1rem; }
    .fb-card-header { flex-direction: column; align-items: flex-start; }

    /* 各種コントロール・ボタンのタップ対応 */
    .screening-btn { padding: 0.6rem 1.25rem; font-size: 0.88rem; }
    .screening-btn.small { padding: 0.45rem 0.85rem; font-size: 0.82rem; }
    .stat-chip { font-size: 0.82rem; padding: 0.35rem 0.8rem; }
    .watchlist-input { font-size: 0.88rem; padding: 0.5rem 0.75rem; }
    .watchlist-item { font-size: 0.88rem; }
    .empty-state { padding: 3rem 1.5rem; }
    .empty-state h2 { font-size: 1.1rem; }
    .empty-state p { font-size: 0.88rem; }

    /* セクターローテーション */
    .sr-summary { grid-template-columns: 1fr; }
    .sector-heatmap { min-width: 620px; }
    /* sr-slide-panel は stage-list-panel に統合済み */
    .sr-flow-commentary { padding: 0.85rem 1rem; }
    .sr-commentary-inner p { font-size: 0.88rem; }

    /* カレンダー: グリッド→リスト表示 */
    .cal-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
        background: none;
        border: none;
    }
    .cal-header { display: none; }
    .cal-cell.cal-empty { display: none; }
    .cal-cell {
        min-height: unset;
        padding: 0;
        background: none;
        border-bottom: none;
    }
    .cal-cell:not(.cal-has-events) { display: none; }
    .cal-cell.cal-has-events {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        padding: 0.6rem 0;
        border-bottom: 1px solid var(--border);
    }
    .cal-day-num {
        font-size: 0.88rem;
        font-weight: 700;
        margin-bottom: 0.2rem;
    }
    .cal-wday-label { display: inline; color: var(--text-dim); font-weight: 500; }
    .cal-day-num.today-badge {
        width: auto;
        height: auto;
        border-radius: 4px;
        padding: 0.1rem 0.5rem;
        display: inline-block;
    }
    .cal-event {
        font-size: 0.82rem;
        padding: 0.4rem 0.6rem;
        white-space: normal;
        border-radius: var(--radius);
    }

    /* トピック一覧 */
    .category-filter { gap: 0.35rem; }
    .chip { padding: 0.4rem 0.7rem; font-size: 0.82rem; }
    .topic-card { padding: 1rem; }
    .topic-title { font-size: 1rem; }
    .topic-summary { font-size: 0.85rem; }
    .stats-bar { flex-direction: column; gap: 0.5rem; }
}

/* ── バックテスト ── */
.bt-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.bt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    text-align: center;
}
.bt-card-primary {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(108, 140, 255, 0.08), rgba(108, 140, 255, 0.02));
}
.bt-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.bt-card-label {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 0.3rem;
}
.bt-card-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.3rem;
}
.bt-summary-section {
    margin-bottom: 2rem;
}
.bt-diag-details { margin-top: 1rem; }
.bt-diag-summary { cursor: pointer; font-size: 0.85rem; color: var(--text-dim); padding: 0.5rem 0; user-select: none; }
.bt-diag-summary:hover { color: var(--accent); }

/* 目次ナビゲーション */
.bt-toc {
    margin: 1.25rem 0 1.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(108, 140, 255, 0.06), rgba(99, 102, 241, 0.04));
    border: 1px solid rgba(108, 140, 255, 0.28);
    border-radius: var(--radius);
}
.bt-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}
.bt-toc-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}
.bt-toc-toggle {
    padding: 0.3rem 0.75rem;
    border: 1px solid rgba(108, 140, 255, 0.4);
    background: rgba(255, 255, 255, 0.65);
    color: var(--text-dim);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.78rem;
    transition: all 0.15s;
}
.bt-toc-toggle:hover {
    border-color: var(--accent);
    color: var(--text);
    background: #fff;
}
.bt-toc-list {
    margin: 0;
    padding-left: 1.4rem;
    font-size: 0.9rem;
    line-height: 1.85;
    color: var(--text);
    counter-reset: toc-counter;
    list-style: none;
}
.bt-toc-list > li {
    counter-increment: toc-counter;
    position: relative;
}
.bt-toc-list > li::before {
    content: counter(toc-counter) ".";
    position: absolute;
    left: -1.4rem;
    color: var(--text-dim);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.bt-toc-list.collapsed {
    display: none;
}
.bt-toc-list a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: all 0.15s;
}
.bt-toc-list a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.bt-toc-sublist {
    margin: 0.15rem 0 0.35rem;
    padding-left: 1.3rem;
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-dim);
    counter-reset: toc-sub;
}
.bt-toc-sublist > li {
    counter-increment: toc-sub;
    position: relative;
    line-height: 1.7;
}
.bt-toc-sublist > li::before {
    content: counter(toc-sub, lower-alpha) ".";
    position: absolute;
    left: -1.3rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.bt-toc-sublist a {
    color: var(--text-dim);
}
.bt-toc-sublist a:hover {
    color: var(--accent);
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}
@media (max-width: 640px) {
    .bt-toc {
        padding: 0.85rem 1rem;
    }
    .bt-toc-list {
        font-size: 0.85rem;
    }
    .bt-toc-sublist {
        font-size: 0.8rem;
    }
}

.bt-source-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.bt-source-btn { padding: 0.5rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text-dim); cursor: pointer; font-size: 0.85rem; transition: all 0.2s; }
.bt-source-btn:hover { border-color: var(--accent); color: var(--text); }
.bt-source-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.bt-section {
    margin-bottom: 2rem;
}
.bt-explanations {
    margin-top: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
}
.bt-explain-block {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.bt-explain-item {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-dim);
}
.bt-explain-term {
    font-weight: 600;
    color: var(--text);
    margin-right: 0.4rem;
}
.bt-explain-term::after {
    content: "：";
}
.bt-section-desc {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-dim);
    margin: 0.3rem 0 1rem;
}
.bt-commentary {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text);
    background: linear-gradient(135deg, rgba(108, 140, 255, 0.06), rgba(108, 140, 255, 0.02));
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0.8rem 1rem;
    margin-top: 0.8rem;
}
.bt-commentary:empty {
    display: none;
}
.bt-compare-block {
    margin-bottom: 1.5rem;
}
.bt-compare-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.bt-compare-table {
    width: 100%;
    margin-bottom: 0;
}
.bt-compare-table-wrap {
    overflow-x: auto;
}
.bt-return-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}
.bt-return-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}
.bt-return-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
}
.bt-return-value {
    font-size: 1.3rem;
    font-weight: 600;
}
.bt-return-n {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}
.bt-return-group-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.25rem 0 0.5rem 0;
    padding-left: 0.5rem;
    border-left: 3px solid var(--border);
}
.bt-return-group-success {
    border-left-color: #10b981;
}
.bt-return-group-failed {
    border-left-color: #ef4444;
}
.bt-return-group-avg {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-dim);
}
.bt-return-card-success {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
}
.bt-return-card-failed {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.3);
}
.bt-return-group-nikkei {
    border-left-color: #6366f1;
}
.bt-return-card-nikkei {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
}
.bt-stage-bench-section {
    margin-top: 2rem;
    padding: 1.25rem;
    background: rgba(99, 102, 241, 0.04);
    border: 1px dashed rgba(99, 102, 241, 0.35);
    border-radius: var(--radius);
}
.bt-stage-bench-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem;
}
.bt-stage-bench-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0 0 1rem;
}
.bt-stage-bench-table-wrap {
    overflow-x: auto;
}
.bt-stage-bench-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
}
.bt-stage-bench-table th,
.bt-stage-bench-table td {
    padding: 0.6rem 0.9rem;
    text-align: right;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.bt-stage-bench-table th {
    background: rgba(99, 102, 241, 0.08);
    font-weight: 600;
    color: var(--text);
}
.bt-stage-bench-table th:first-child,
.bt-stage-bench-table td:first-child {
    text-align: left;
}
.bt-stage-bench-table tbody tr:last-child td {
    border-bottom: none;
}
.bt-stage-bench-table tr.bt-row-success {
    background: rgba(16, 185, 129, 0.08);
    font-weight: 600;
}
.bt-stage-bench-table tr.bt-row-failed {
    background: rgba(239, 68, 68, 0.04);
}
.bt-stage-bench-table tr.bt-row-stage td {
    background: rgba(99, 102, 241, 0.03);
}
.bt-stage-bench-table tr.bt-row-nikkei td {
    background: rgba(99, 102, 241, 0.06);
    font-style: italic;
}
.bt-stage-bench-n {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 400;
}
.bt-cell-empty {
    color: var(--text-dim);
}
.bt-stage-bench-note {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin: 0.75rem 0 0;
    line-height: 1.6;
}
/* リターン分布セクション */
.bt-distribution-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.04);
    border: 2px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius);
}
.bt-dist-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}
.bt-dist-tab {
    padding: 0.5rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text);
    transition: all 0.15s;
}
.bt-dist-tab:hover {
    background: var(--surface-3);
}
.bt-dist-tab.active {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.6);
    color: rgba(59, 130, 246, 1);
    font-weight: 600;
}
.bt-dist-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.6rem;
    margin: 1rem 0;
}
.bt-dist-stat {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.6rem 0.7rem;
    text-align: center;
}
.bt-dist-stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}
.bt-dist-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.bt-dist-chart-wrap {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem 0.5rem;
    margin: 1rem 0;
    position: relative;
    height: 320px;
}
.bt-dist-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}
.bt-dist-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}
@media (max-width: 768px) {
    .bt-dist-tables { grid-template-columns: 1fr; }
}
.bt-dist-table-block {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.9rem;
}
.bt-dist-table-title {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    color: var(--text);
}
.bt-dist-table-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin: 0 0 0.7rem;
    line-height: 1.5;
}
.bt-dist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.bt-dist-table th,
.bt-dist-table td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.bt-dist-table th {
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.78rem;
    background: rgba(0,0,0,0.05);
}
.bt-dist-table .col-num {
    text-align: right;
}

/* B2シグナルの価値 — 正直な評価ボックス */
.bt-b2-value-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(249, 168, 37, 0.05);
    border: 2px solid rgba(249, 168, 37, 0.4);
    border-radius: var(--radius);
}
.bt-b2-value-title {
    margin: 0 0 0.9rem;
    color: var(--text);
    font-size: 1.08rem;
    font-weight: 700;
}
.bt-b2-value-summary {
    padding: 0.85rem 1rem;
    background: rgba(239, 68, 68, 0.06);
    border-left: 3px solid rgba(239, 68, 68, 0.6);
    border-radius: 4px;
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text);
}
.bt-b2-highlight {
    display: inline-block;
    padding: 0.18rem 0.45rem;
    background: rgba(34, 197, 94, 0.14);
    border-bottom: 2px solid rgba(34, 197, 94, 0.6);
    border-radius: 3px;
    font-weight: 700;
}
.bt-b2-value-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 768px) {
    .bt-b2-value-grid {
        grid-template-columns: 1fr;
    }
}
.bt-b2-value-pro,
.bt-b2-value-con {
    padding: 1rem 1.1rem;
    border-radius: 6px;
}
.bt-b2-value-pro {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.28);
}
.bt-b2-value-con {
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.22);
}
.bt-b2-value-pro h4,
.bt-b2-value-con h4 {
    margin: 0 0 0.65rem;
    font-size: 0.96rem;
    font-weight: 700;
}
.bt-b2-value-pro h4 {
    color: #059669;
}
.bt-b2-value-con h4 {
    color: #dc2626;
}
.bt-b2-value-pro ul,
.bt-b2-value-con ul {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 0.87rem;
    line-height: 1.65;
    color: var(--text);
}
.bt-b2-value-pro li,
.bt-b2-value-con li {
    margin-bottom: 0.6rem;
}
.bt-b2-value-pro li:last-child,
.bt-b2-value-con li:last-child {
    margin-bottom: 0;
}
.bt-b2-value-conclusion {
    padding: 1rem 1.25rem;
    background: rgba(99, 102, 241, 0.05);
    border-left: 3px solid rgba(99, 102, 241, 0.45);
    border-radius: 4px;
}
.bt-b2-value-conclusion h4 {
    margin: 0 0 0.65rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
}
.bt-b2-value-conclusion p {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text);
}
.bt-b2-value-conclusion p:last-child {
    margin-bottom: 0;
}
.bt-b2-value-suitability {
    padding: 0.75rem 0.9rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    font-size: 0.87rem !important;
}
.bt-b2-value-ok strong {
    color: #059669;
}
.bt-b2-value-ng strong {
    color: #dc2626;
}

/* β版B2品質スコアの期待効果セクション */
.bt-b2-score-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(108, 140, 255, 0.04);
    border: 2px solid rgba(108, 140, 255, 0.35);
    border-radius: var(--radius);
}
.bt-b2-score-title {
    margin: 0 0 0.6rem;
    color: var(--text);
    font-size: 1.08rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.bt-b2-score-beta {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 3px;
    letter-spacing: 0.02em;
}
.bt-b2-score-desc {
    margin: 0 0 1.25rem;
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text-dim);
}
.bt-b2-score-block {
    margin-bottom: 1.5rem;
    padding: 1rem 1.15rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(108, 140, 255, 0.22);
    border-radius: 6px;
}
.bt-b2-score-block-title {
    margin: 0 0 0.5rem;
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text);
}
.bt-b2-score-block-desc {
    margin: 0 0 0.75rem;
    font-size: 0.87rem;
    line-height: 1.65;
    color: var(--text-dim);
}
.bt-b2-score-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.4rem 0;
    font-size: 0.87rem;
}
.bt-b2-score-table th,
.bt-b2-score-table td {
    padding: 0.55rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid rgba(108, 140, 255, 0.18);
}
.bt-b2-score-table th {
    background: rgba(108, 140, 255, 0.08);
    font-weight: 700;
    color: var(--text);
    font-size: 0.83rem;
}
.bt-b2-score-table td.num,
.bt-b2-score-table th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.bt-b2-score-table tr.bt-b2-score-best {
    background: rgba(34, 197, 94, 0.08);
}
.bt-b2-score-table tr.bt-b2-score-best td {
    border-bottom-color: rgba(34, 197, 94, 0.3);
}
.bt-b2-score-pos {
    color: #059669;
    font-weight: 700;
}
.bt-b2-score-neg {
    color: #dc2626;
    font-weight: 700;
}
.bt-b2-score-ok {
    color: #059669;
    font-weight: 600;
    font-size: 0.85rem;
}
.bt-b2-score-note {
    margin: 0.7rem 0 0;
    padding: 0.6rem 0.8rem;
    background: rgba(250, 204, 21, 0.08);
    border-left: 3px solid rgba(250, 204, 21, 0.5);
    border-radius: 3px;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-dim);
}
.bt-b2-score-summary {
    padding: 1rem 1.25rem;
    background: rgba(16, 185, 129, 0.06);
    border-left: 3px solid rgba(16, 185, 129, 0.55);
    border-radius: 4px;
}
.bt-b2-score-summary h4 {
    margin: 0 0 0.7rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
}
.bt-b2-score-summary ul {
    margin: 0 0 0.9rem;
    padding-left: 1.2rem;
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text);
}
.bt-b2-score-summary li {
    margin-bottom: 0.5rem;
}
.bt-b2-score-caveat {
    margin: 0.8rem 0 0;
    padding: 0.75rem 0.9rem;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 4px;
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--text);
}

/* ④ スコア帯別 実測成績ブロック */
.bt-b2-score-actual {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: rgba(99, 102, 241, 0.05);
    border-left: 3px solid rgba(99, 102, 241, 0.5);
    border-radius: 4px;
}
.bt-b2-score-actual h4 {
    margin: 0 0 0.6rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
}
.bt-b2-score-actual .bt-b2-score-desc {
    margin: 0 0 0.9rem;
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text);
}
.bt-b2-actual-subtitle {
    margin: 0.8rem 0 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}
.bt-b2-actual-table-wrap {
    overflow-x: auto;
    margin-bottom: 0.6rem;
}
.bt-b2-actual-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    background: rgba(255, 255, 255, 0.85);
}
.bt-b2-actual-table th,
.bt-b2-actual-table td {
    padding: 0.5rem 0.7rem;
    border: 1px solid rgba(203, 213, 225, 0.6);
    text-align: right;
    white-space: nowrap;
}
.bt-b2-actual-table th {
    background: rgba(99, 102, 241, 0.08);
    font-weight: 600;
    color: var(--text);
}
.bt-b2-actual-table th:first-child,
.bt-b2-actual-table td:first-child {
    text-align: left;
}
.bt-b2-score-actual .bt-commentary {
    margin: 0.7rem 0 0;
    padding: 0.55rem 0.8rem;
    background: rgba(255, 255, 255, 0.75);
    border-left: 2px solid rgba(99, 102, 241, 0.4);
    font-size: 0.86rem;
    line-height: 1.7;
    color: var(--text);
}

/* 5要素カードグリッド */
.bt-b2-elements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.8rem;
    margin: 0.75rem 0 0.5rem;
}
.bt-b2-element {
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(108, 140, 255, 0.2);
    border-left-width: 4px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.bt-b2-element-pos {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}
.bt-b2-element-neg {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}
.bt-b2-element-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}
.bt-b2-element-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}
.bt-b2-element-weight {
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #fff;
    letter-spacing: 0.02em;
}
.bt-b2-element-pos .bt-b2-element-weight {
    background: #10b981;
}
.bt-b2-element-neg .bt-b2-element-weight {
    background: #ef4444;
}
.bt-b2-element-rule {
    padding: 0.45rem 0.6rem;
    background: rgba(108, 140, 255, 0.09);
    border-radius: 3px;
    font-size: 0.83rem;
    line-height: 1.55;
    color: var(--text);
}
.bt-b2-element-desc {
    font-size: 0.84rem;
    line-height: 1.7;
    color: var(--text-dim);
}
@media (max-width: 600px) {
    .bt-b2-elements-grid {
        grid-template-columns: 1fr;
    }
}

.bt-rs-chart {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.bt-rs-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.bt-rs-label {
    width: 70px;
    font-size: 0.82rem;
    color: var(--text-dim);
    flex-shrink: 0;
}
.bt-rs-bar-bg {
    flex: 1;
    height: 22px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.bt-rs-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.5s ease;
}
.bt-rs-rate {
    width: 120px;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
}
.bt-filter-bar {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.bt-filter-btn {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.15s;
}
.bt-filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.fb-diag-tag.success { background: rgba(74, 222, 128, 0.15); color: var(--green); }
.fb-diag-tag.failed { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.fb-diag-tag.pending { background: rgba(250, 204, 21, 0.15); color: var(--yellow); }
.bt-card-highlight { border-color: var(--green); background: linear-gradient(135deg, rgba(74,222,128,0.08), rgba(74,222,128,0.02)); }
.bt-card-lowlight { border-color: var(--red); background: linear-gradient(135deg, rgba(248,113,113,0.06), rgba(248,113,113,0.02)); }
.bt-bm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.bt-bm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-align: center; }
.bt-bm-card-value { font-size: 1.4rem; font-weight: 700; }
.bt-bm-card-label { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.25rem; }
.bt-bm-card-sub { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.15rem; }

/* ── マーケットブレッドス ── */
.breadth-current {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.breadth-phase-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 1rem;
    border-right: 1px solid var(--border);
}
.phase-label { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 0.5rem; }
.phase-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}
.phase-value.phase-bull { color: var(--green); }
.phase-value.phase-bear { color: var(--red); }
.phase-value.phase-neutral { color: var(--yellow); }
.phase-date { font-size: 0.72rem; color: var(--text-dim); }

.breadth-bars { display: flex; flex-direction: column; gap: 0.6rem; justify-content: center; }
.breadth-bar-row { display: flex; align-items: center; gap: 0.75rem; }
.bar-label { font-size: 0.78rem; font-weight: 600; min-width: 80px; color: var(--text-dim); }
.bar-track { flex: 1; height: 22px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; min-width: 2px; }
.bar-s1 { background: var(--yellow); }
.bar-s2 { background: var(--accent); }
.bar-s3 { background: var(--orange); }
.bar-s4 { background: var(--red); }
.bar-pct { font-size: 0.75rem; color: var(--text-dim); min-width: 110px; }

.breadth-chart-section { margin-bottom: 2rem; }
.breadth-chart-wrap { height: 350px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }

.breadth-changes-section { margin-bottom: 2rem; }
.changes-subtitle { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--text); }
.changes-table-wrap { overflow-x: auto; margin-bottom: 1rem; }
.changes-table { font-size: 0.82rem; }
.changes-other-toggle {
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-dim);
    padding: 0.5rem 0;
}
.stage-badge-mini {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}
.stage-badge-mini.stage1 { background: rgba(251, 191, 36, 0.15); color: var(--yellow); }
.stage-badge-mini.stage2 { background: rgba(108, 140, 255, 0.15); color: var(--accent); }
.stage-badge-mini.stage3 { background: rgba(251, 146, 60, 0.15); color: var(--orange); }
.stage-badge-mini.stage4 { background: rgba(248, 113, 113, 0.15); color: var(--red); }

/* ── TradingView Lightweight Charts container ── */
.lw-chart-container {
    height: 300px;
    border-radius: var(--radius);
    overflow: hidden;
}

/* ── 52w metrics ── */
.panel-metrics-grid { grid-template-columns: repeat(3, 1fr); }

/* ── Nav responsive (769px-900px: tighter spacing) ── */
@media (max-width: 900px) and (min-width: 769px) {
    .nav-links { gap: 0.1rem; }
    .nav-links > a, .nav-dropdown-btn { font-size: 0.82rem; padding: 0.35rem 0.5rem; }
    .nav-dropdown-menu a { font-size: 0.82rem; }
}
@media (max-width: 640px) {
    .breadth-current { grid-template-columns: 1fr; gap: 1rem; }
    .breadth-phase-card { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
    .breadth-chart-wrap { height: 250px; padding: 0.5rem; }
}

/* ── Nav Right (theme toggle + hamburger) ── */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* ── LINE Login ── */
.line-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    background: #06c755;
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}
.line-login-btn:hover { background: #05a847; color: #fff; }

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text);
}
.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}
.user-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}
.user-logout-btn {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-decoration: none;
    padding: 0.15rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s;
}
.user-logout-btn:hover { color: var(--red, #ef4444); border-color: var(--red, #ef4444); }

@media (max-width: 640px) {
    .user-name { display: none; }
    .user-logout-btn { display: none; }
}

/* ── Monitor Add Button in Panel ── */
.monitor-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.monitor-add-btn:hover {
    background: rgba(108, 140, 255, 0.1);
}
.monitor-add-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.monitor-add-btn.active:hover {
    background: var(--red);
    border-color: var(--red);
}

/* ── Hamburger Menu ── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    z-index: 110;
}
.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        flex-direction: column;
        padding: 0.75rem 1rem;
        z-index: 105;
    }
    .nav-links.open { display: flex; }
    /* ドロップダウンをモバイルではインライン展開 */
    .nav-dropdown { width: 100%; }
    .nav-dropdown-btn { display: none; }
    .nav-dropdown-menu {
        display: block;
        position: static;
        background: none;
        border: none;
        box-shadow: none;
        padding: 0;
        padding-left: 1rem;
        border-left: 2px solid var(--accent);
        margin: 0.25rem 0 0.25rem 0.5rem;
    }
    .nav-dropdown-menu a {
        display: block;
        padding: 0.5rem 0.75rem;
        font-size: 0.92rem;
        border-radius: var(--radius);
        text-align: left;
    }
    .nav-links > a {
        display: block;
        padding: 0.6rem 0.75rem;
        font-size: 0.92rem;
        border-radius: var(--radius);
        text-align: left;
    }
    .nav-links > a:hover, .nav-dropdown-menu a:hover { background: var(--surface2); }
    .nav-links > a.active, .nav-dropdown-menu a.active {
        color: var(--accent);
        background: rgba(108, 140, 255, 0.08);
        font-weight: 600;
    }
}

/* ── Skeleton Loading ── */
.skeleton {
    background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: var(--radius);
}
.skeleton-card {
    height: 80px;
    margin-bottom: 0.75rem;
}
.skeleton-table-row {
    height: 38px;
    margin-bottom: 2px;
}
.skeleton-chart {
    height: 300px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Table Scroll Hint ── */
.table-scroll-wrap {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-scroll-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--bg));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s;
}
.table-scroll-wrap.scrolled-end::after { opacity: 0; }

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
}
.pagination-btn {
    padding: 0.4rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s;
}
.pagination-btn:hover { border-color: var(--accent); color: var(--accent); }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-info {
    font-size: 0.78rem;
    color: var(--text-dim);
    min-width: 120px;
    text-align: center;
}

/* ── Touch Target & Calendar font-size ── */
@media (pointer: coarse) {
    .monitor-star { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
    .watchlist-remove { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
    .fb-delete-btn { min-width: 44px; min-height: 44px; }
    .cal-event { min-height: 32px; font-size: 0.75rem; display: flex; align-items: center; }
}
.cal-event { font-size: 0.75rem; }

/* ── Site Footer (Disclaimer) ── */
.site-footer {
    margin-top: 3rem;
    padding: 1.5rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.footer-disclaimer {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}
.footer-disclaimer p {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}
.footer-disclaimer p:last-child { margin-bottom: 0; }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
}
.footer-links a {
    color: var(--text-dim);
    text-decoration: underline;
    text-decoration-color: var(--border);
    text-underline-offset: 2px;
}
.footer-links a:hover { color: var(--accent); }
.footer-sep { color: var(--border); margin: 0 0.3rem; }
.footer-meta { margin-top: 0.25rem; }
.footer-meta a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }
.footer-meta a:hover { color: var(--accent); }

/* ── Hero Section ── */
.hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
    margin: -1rem -1rem 2rem;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}
.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--text);
}
.hero-sub {
    font-size: 1rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 1.5rem;
    line-height: 1.7;
}
.hero-sub strong {
    color: var(--accent);
}
.hero-stage-cards {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    min-width: 120px;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}
.hero-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}
.hero-card-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
}
.hero-card-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}
.hero-card-s1 .hero-card-num { color: var(--yellow); }
.hero-card-s2 .hero-card-num { color: var(--green); }
.hero-card-s3 .hero-card-num { color: var(--orange); }
.hero-card-s4 .hero-card-num { color: var(--red); }
.hero-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-dim);
    flex-wrap: wrap;
}
.stale-warning-banner {
    max-width: 720px;
    margin: 1.25rem auto 0;
    padding: 0.85rem 1rem;
    background: rgba(251, 146, 60, 0.08);
    border: 1px solid rgba(251, 146, 60, 0.45);
    border-left: 4px solid #f97316;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
}
.stale-warning-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    line-height: 1.2;
}
.stale-warning-body {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.6;
}
.stale-warning-body strong { color: #c2410c; }
.stale-warning-detail {
    margin-top: 0.25rem;
    color: var(--text-dim);
    font-size: 0.8rem;
}
.stale-warning-detail strong { color: var(--text); }
.hero-guide-link {
    color: var(--accent);
    font-weight: 600;
}

/* ── Hero Actions ── */
.hero-actions {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}
.hero-featured-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    white-space: nowrap;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.12) 0%, rgba(74, 222, 128, 0.04) 100%);
    border: 2px solid var(--green);
    border-radius: calc(var(--radius) + 4px);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.hero-featured-btn strong {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--green);
}
.hero-featured-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.2);
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.18) 0%, rgba(74, 222, 128, 0.08) 100%);
}
.hero-featured-btn:active {
    transform: translateY(0);
}
.hero-leaders-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    white-space: nowrap;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0.04) 100%);
    border: 2px solid #6366f1;
    border-radius: calc(var(--radius) + 4px);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.hero-leaders-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0.08) 100%);
}
.hero-leaders-btn:active {
    transform: translateY(0);
}
.hero-featured-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: var(--green);
    color: #fff;
    border-radius: 4px;
}
.hero-leaders-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: #6366f1;
    color: #fff;
    border-radius: 4px;
}
.hero-leaders-btn strong {
    font-size: 1.4rem;
    font-weight: 800;
    color: #6366f1;
}

/* ── Search Bar (ファーストビュー銘柄検索) ── */
.search-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    padding: 1rem 1.25rem;
}
.search-bar-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}
.search-bar-input {
    flex: 1;
    padding: 0.6rem 0.85rem;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.search-bar-input:focus {
    border-color: var(--accent);
    outline: none;
}
.search-bar-btn {
    padding: 0.6rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: background 0.2s;
}
.search-bar-btn:hover { background: var(--accent-hover); }
.search-bar-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.search-bar-select {
    padding: 0.45rem 0.65rem;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
}
.search-bar-price {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.search-bar-num {
    width: 90px;
    padding: 0.45rem 0.6rem;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-family: inherit;
}
.search-bar-num:focus { border-color: var(--accent); outline: none; }
.search-bar-sep { color: var(--text-dim); font-size: 0.82rem; }
.search-bar-unit { color: var(--text-dim); font-size: 0.78rem; }

/* ── Enhanced Page Titles ── */
.page-title-strong {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

/* ── SP改行制御 ── */
.sp-br { display: none; }

/* ── Responsive: Hero ── */
@media (max-width: 640px) {
    .sp-br { display: inline; }
    .hero { padding: 1.75rem 1rem 1.25rem; }
    .hero-title { font-size: 1.55rem; line-height: 1.45; }
    .hero-sub { font-size: 0.92rem; line-height: 1.65; margin-bottom: 1rem; }
    .hero-actions { margin-bottom: 0.85rem; gap: 0.5rem; }
    .hero-featured-btn { font-size: 0.9rem; padding: 0.65rem 1rem; gap: 0.35rem; }
    .hero-featured-btn strong { font-size: 1.15rem; }
    .hero-leaders-btn { font-size: 0.9rem; padding: 0.65rem 1rem; gap: 0.35rem; }
    .hero-leaders-btn strong { font-size: 1.15rem; }
    .hero-featured-badge, .hero-leaders-badge { font-size: 0.7rem; padding: 0.15rem 0.45rem; }
    .hero-meta { gap: 0.75rem; font-size: 0.82rem; }
    .hero-card { min-width: 70px; padding: 0.75rem 1rem; }
    .hero-card-num { font-size: 1.4rem; }
    .page-title-strong { font-size: 1.5rem; }
    .search-bar { padding: 0.75rem; }
    .search-bar-row { flex-direction: column; }
    .search-bar-input { font-size: 1.05rem; padding: 0.7rem 0.85rem; }
    .search-bar-btn { padding: 0.7rem; font-size: 0.95rem; }
    .search-bar-filters { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .search-bar-select { padding: 0.6rem 0.7rem; font-size: 0.9rem; }
    .search-bar-price { justify-content: flex-start; }
    .search-bar-num { flex: 1; font-size: 0.9rem; padding: 0.6rem 0.65rem; }
}

/* ── LP Section (セクション見出し + 補足) ── */
.lp-section {
    margin-bottom: 2rem;
}
.lp-section-header {
    margin-bottom: 1rem;
}
.lp-section-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.4;
}
.lp-section-sub {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
    line-height: 1.6;
}

/* ── Home Sector Summary (トップ: セクター動向) ── */
.home-sector-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.home-sector-col {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.home-sector-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 0.6rem;
}
.home-sector-label-in { color: var(--green); }
.home-sector-label-out { color: var(--red); }
.home-sector-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.home-sector-chip {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 4px;
}
.home-sector-chip.chip-in {
    background: rgba(74, 222, 128, 0.1);
    color: var(--green);
    border: 1px solid rgba(74, 222, 128, 0.25);
}
.home-sector-chip.chip-out {
    background: rgba(248, 113, 113, 0.1);
    color: var(--red);
    border: 1px solid rgba(248, 113, 113, 0.25);
}
.home-sector-none {
    font-size: 0.8rem;
    color: var(--text-dim);
}
.home-sector-loading {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ── Home Breadth Summary (トップ: 相場環境) ── */
.home-breadth {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.home-breadth-phase {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}
.home-breadth-phase-label {
    font-size: 0.82rem;
    color: var(--text-dim);
}
.home-breadth-phase-value {
    font-size: 1.1rem;
    font-weight: 800;
}
.phase-強気 { color: var(--green); }
.phase-やや強気 { color: var(--green); }
.phase-中立 { color: var(--yellow); }
.phase-やや弱気 { color: var(--orange); }
.phase-弱気 { color: var(--red); }
.home-breadth-bars {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.home-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.home-bar-label {
    width: 65px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    flex-shrink: 0;
}
.home-bar-track {
    flex: 1;
    height: 8px;
    background: var(--surface2);
    border-radius: 4px;
    overflow: hidden;
}
.home-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.home-bar-fill.bar-s1 { background: var(--yellow); }
.home-bar-fill.bar-s2 { background: var(--green); }
.home-bar-fill.bar-s3 { background: var(--orange); }
.home-bar-fill.bar-s4 { background: var(--red); }
.home-bar-pct {
    width: 42px;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* ── Section Go Button (セクション末尾の遷移ボタン) ── */
.lp-go-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.85rem;
    padding: 0.6rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
}
.lp-go-btn:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 140, 255, 0.25);
}
.lp-go-btn:active { transform: translateY(0); }

@media (max-width: 640px) {
    .home-sector-summary { grid-template-columns: 1fr; }
}

/* ── Stage Cards (4ステージ分布) ── */
.stage-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}
.stage-card {
    text-align: center;
    padding: 1.1rem 0.75rem 0.85rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--border);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
}
.stage-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
.stage-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.stage-card-cta {
    margin-top: 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    transition: color 0.2s;
}
.stage-card:hover .stage-card-cta { color: var(--accent); }
.stage-card-spring {
    margin-top: 0.35rem;
    font-size: 0.68rem;
    color: #a855f7;
    cursor: pointer;
}
.stage-card-spring strong { font-weight: 800; }
.stage-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), 0 4px 12px rgba(108,140,255,0.2);
    transform: translateY(-2px);
}
.stage-card-s1 { border-top-color: var(--yellow); }
.stage-card-s1.active { border-color: var(--yellow); box-shadow: 0 0 0 2px var(--yellow), 0 4px 12px rgba(251,191,36,0.2); }
.stage-card-s2 { border-top-color: var(--green); }
.stage-card-s2.active { border-color: var(--green); box-shadow: 0 0 0 2px var(--green), 0 4px 12px rgba(74,222,128,0.2); }
.stage-card-s3 { border-top-color: var(--orange); }
.stage-card-s3.active { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange), 0 4px 12px rgba(249,115,22,0.2); }
.stage-card-s4 { border-top-color: var(--red); }
.stage-card-s4.active { border-color: var(--red); box-shadow: 0 0 0 2px var(--red), 0 4px 12px rgba(239,68,68,0.2); }
.stage-card-heading {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}
.stage-card-s1 .stage-card-heading { color: var(--yellow); }
.stage-card-s2 .stage-card-heading { color: var(--green); }
.stage-card-s3 .stage-card-heading { color: var(--orange); }
.stage-card-s4 .stage-card-heading { color: var(--red); }
.stage-card-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.4rem;
    line-height: 1.2;
}
.stage-card-count {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem;
}
.stage-card-unit {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dim);
}
.stage-card-s1 .stage-card-count { color: var(--yellow); }
.stage-card-s2 .stage-card-count { color: var(--green); }
.stage-card-s3 .stage-card-count { color: var(--orange); }
.stage-card-s4 .stage-card-count { color: var(--red); }
.stage-card-desc {
    font-size: 0.72rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* ── Featured Card (S1→S2 主役カード) ── */
.featured-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.08) 0%, rgba(108, 140, 255, 0.06) 100%);
    border: 2px solid rgba(74, 222, 128, 0.3);
    border-radius: calc(var(--radius) + 4px);
    cursor: pointer;
    transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s, background 0.15s;
}
.featured-card:hover {
    transform: translateY(-3px);
    border-color: var(--green);
    box-shadow: 0 8px 24px rgba(74, 222, 128, 0.15);
}
.featured-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(74, 222, 128, 0.1);
}
.featured-card.active {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green), 0 8px 24px rgba(74, 222, 128, 0.2);
}
.featured-card-heading {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--green);
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}
.featured-card-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.featured-card-body {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.featured-card-count {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--green);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
}
.featured-card-desc {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}
.featured-card-cta {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.featured-card:hover .featured-card-cta { opacity: 1; }

/* ── Quick Check (保有銘柄チェック) ── */
.quick-check {
    max-width: 480px;
}
.quick-check-form {
    display: flex;
    gap: 0.5rem;
}
.quick-check-input {
    flex: 1;
    padding: 0.6rem 0.85rem;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.quick-check-input:focus {
    border-color: var(--accent);
    outline: none;
}
.quick-check-btn {
    padding: 0.6rem 1.25rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.quick-check-btn:hover {
    background: var(--accent-hover);
}
.quick-check-result {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.88rem;
    display: none;
}
.quick-check-result.visible { display: block; }
.quick-check-result.found { border-color: var(--green); }
.quick-check-result.not-found { border-color: var(--red); }

/* ── Section Actions (全銘柄ボタン + 更新ボタン) ── */
.lp-section-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.all-stocks-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.7rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
.all-stocks-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 140, 255, 0.25);
}
.all-stocks-btn:active {
    transform: translateY(0);
}

/* ── Slide Panel Filters ── */
.slp-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}
.slp-price-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.slp-filter-input {
    padding: 0.4rem 0.6rem;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.slp-filter-input:focus {
    border-color: var(--accent);
    outline: none;
}
.slp-search { width: 140px; }
.slp-price { width: 80px; }
.slp-filter-select {
    padding: 0.4rem 0.6rem;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
}
.slp-filter-sep {
    color: var(--text-dim);
    font-size: 0.8rem;
}
.slp-filter-unit {
    color: var(--text-dim);
    font-size: 0.75rem;
}

/* ── Slide Panel Result Info ── */
.slp-result-info {
    font-size: 0.78rem;
    color: var(--text-dim);
    padding: 0.4rem 0;
}

/* ── Slide Panel Pagination ── */
.slp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
}
.slp-page-btn {
    padding: 0.35rem 0.85rem;
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}
.slp-page-btn:hover:not(:disabled) { background: var(--accent); color: #fff; border-color: var(--accent); }
.slp-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.slp-page-info {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

/* ── Stage List Panel (右スライドパネル) ── */
.stage-list-panel {
    width: 780px;
    right: -800px;
    z-index: 999;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.stage-list-panel.open { right: 0; }
/* GTM式: stock-panelが開いたら左に押し出す */
.stage-list-panel.pushed { right: 440px; }

.slp-header {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--surface2);
    border-radius: var(--radius);
}
.slp-stage-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}
.slp-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.2rem;
}
.slp-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}
/* ステージ詳細説明（details/summary） */
.slp-details {
    margin-top: 0.35rem;
}
.slp-details-toggle {
    font-size: 0.78rem;
    color: var(--accent);
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.slp-details-toggle::before {
    content: '▶';
    font-size: 0.6rem;
    transition: transform 0.2s;
}
.slp-details[open] .slp-details-toggle::before {
    transform: rotate(90deg);
}
.slp-details-toggle::-webkit-details-marker { display: none; }
.slp-definition {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0.5rem 0 0.6rem;
}
.slp-criteria-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}
.slp-criteria {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem;
}
.slp-criteria li {
    font-size: 0.78rem;
    color: var(--text);
    padding: 0.2rem 0 0.2rem 1.1rem;
    position: relative;
    line-height: 1.5;
}
.slp-criteria li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.72rem;
}
.slp-action {
    font-size: 0.78rem;
    color: var(--text);
    background: var(--surface);
    border-radius: var(--radius);
    padding: 0.4rem 0.6rem;
    line-height: 1.5;
}
.slp-action-label {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(108, 140, 255, 0.12);
    border-radius: 3px;
    padding: 0.1rem 0.35rem;
    margin-right: 0.4rem;
    vertical-align: middle;
}
.slp-count {
    font-size: 0.85rem;
    color: var(--text-dim);
}
.slp-count strong {
    font-size: 1.1rem;
    color: var(--text);
}

/* パネル内テーブル（メインテーブルと同じフォーマット） */
.slp-table-wrap {
    overflow-x: auto;
}
.slp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.slp-table thead th {
    position: sticky;
    top: 0;
    background: var(--surface);
    padding: 0.4rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    text-align: left;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.slp-table thead th.num { text-align: right; }
.slp-table tbody tr {
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid var(--border);
}
.slp-table tbody tr:hover { background: var(--surface2); }
.slp-table td {
    padding: 0.4rem 0.5rem;
    white-space: nowrap;
}
.slp-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.slp-table td.positive { color: var(--green); }
.slp-table td.negative { color: var(--red); }
.slp-td-ticker {
    font-weight: 700;
    color: var(--accent);
}
.slp-td-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.slp-td-sector {
    font-size: 0.72rem;
    color: var(--text-dim);
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 900px) {
    .stage-list-panel { width: calc(100vw - 2rem); right: calc(-100vw); }
    .stage-list-panel.pushed { right: 440px; }
    .slp-td-sector { display: none; }
}
@media (max-width: 640px) {
    .stage-list-panel { width: 100vw; right: -100vw; }
    .stage-list-panel.pushed { right: 0; }
}

/* ── Responsive: LP Sections ── */
@media (max-width: 640px) {
    .lp-section { margin-bottom: 1.5rem; }
    .lp-section-header { margin-bottom: 0.75rem; }
    .lp-section-title { font-size: 1.15rem; }
    .lp-section-sub { font-size: 0.88rem; }
    .stage-cards { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .stage-card { padding: 0.85rem 0.5rem 0.65rem; }
    .stage-card-heading { font-size: 0.78rem; }
    .stage-card-name { font-size: 1rem; }
    .stage-card-count { font-size: 1.6rem; }
    .stage-card-desc { font-size: 0.75rem; }
    .stage-card-cta { font-size: 0.75rem; margin-top: 0.35rem; }

    .home-sector-col { padding: 0.85rem 1rem; }
    .home-sector-label { font-size: 0.82rem; }
    .home-sector-chip { font-size: 0.85rem; }
    .home-breadth { padding: 0.85rem 1rem; }
    .home-bar-label { width: 60px; font-size: 0.78rem; }
    .home-bar-pct { width: 42px; font-size: 0.78rem; }
    .lp-go-btn { width: 100%; justify-content: center; padding: 0.75rem; font-size: 0.92rem; }

    .lp-section-actions { flex-direction: column; align-items: stretch; }
    .all-stocks-btn { justify-content: center; font-size: 0.92rem; }
    .slp-filters { flex-direction: column; align-items: stretch; }
    .slp-search { width: 100%; }
    .slp-filter-select { width: 100%; font-size: 0.88rem; padding: 0.55rem 0.65rem; }
    .slp-price-group { width: 100%; }
    .slp-price-group .slp-price { flex: 1; min-width: 0; }
    .slp-filter-input { font-size: 0.88rem; }
    .slp-result-info { font-size: 0.85rem; }
    .slp-table td { font-size: 0.82rem; }
    .slp-table thead th { font-size: 0.78rem; }
}

/* ── モバイル固定フッターナビ ── */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 640px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--surface);
        border-top: 1px solid var(--border);
        padding: 0.3rem 0 calc(0.3rem + env(safe-area-inset-bottom, 0px));
        justify-content: space-around;
        align-items: center;
    }
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.15rem;
        padding: 0.35rem 0.8rem;
        font-size: 0.65rem;
        color: var(--text-dim);
        text-decoration: none;
        background: none;
        border: none;
        cursor: pointer;
        font-family: inherit;
        transition: color 0.15s;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-nav-item.active,
    .mobile-nav-item:hover {
        color: var(--accent);
    }
    .mobile-nav-item span {
        font-weight: 600;
        letter-spacing: 0.02em;
    }
    /* モバイル検索モーダル */
    .mobile-search-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1100;
    }
    .mobile-search-overlay.open { display: block; }

    .mobile-search-modal {
        display: none;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1101;
        background: var(--surface);
        border-radius: 1rem 1rem 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
        transform: translateY(100%);
        transition: transform 0.25s ease-out;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .mobile-search-modal.open {
        display: block;
        transform: translateY(0);
    }
    .mobile-search-modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.2rem 0.5rem;
    }
    .mobile-search-modal-header h3 {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text);
    }
    .mobile-search-close {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--text-dim);
        cursor: pointer;
        padding: 0.2rem 0.5rem;
        line-height: 1;
    }
    .mobile-search-modal-body {
        padding: 0.5rem 1.2rem 1.5rem;
    }
    .mobile-search-modal-body .search-bar-input {
        width: 100%;
        font-size: 1rem;
        padding: 0.75rem 0.8rem;
    }
    .mobile-search-modal-body .search-bar-filters {
        flex-direction: column;
        gap: 0.5rem;
    }
    .mobile-search-modal-body .search-bar-select {
        width: 100%;
    }
    .mobile-search-modal-body .search-bar-price {
        width: 100%;
    }
    .mobile-search-spinner {
        display: inline-block;
        width: 14px;
        height: 14px;
        border: 2px solid rgba(255,255,255,0.3);
        border-top-color: #fff;
        border-radius: 50%;
        animation: mobile-spin 0.6s linear infinite;
        vertical-align: middle;
        margin-right: 0.4rem;
    }
    @keyframes mobile-spin { to { transform: rotate(360deg); } }

    /* フッターの余白確保 */
    .site-footer {
        padding-bottom: 4.5rem;
    }
}

/* ── Leaders Page ── */
.leaders-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.leaders-stat {
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.leaders-stat-num {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.leaders-stat-num small {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-dim);
}
.leaders-stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.15rem;
}
.leaders-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.leaders-stage-toggle {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.leaders-toggle-btn {
    padding: 0.45rem 1rem;
    background: var(--surface);
    color: var(--text-dim);
    border: none;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.leaders-toggle-btn + .leaders-toggle-btn {
    border-left: 1px solid var(--border);
}
.leaders-toggle-btn.active {
    background: var(--accent);
    color: #fff;
}
.leaders-toggle-btn:hover:not(.active) {
    background: var(--surface2);
    color: var(--text);
}
.leaders-table .col-rank {
    width: 32px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
}
@media (max-width: 640px) {
    .leaders-summary { grid-template-columns: repeat(2, 1fr); }
    .leaders-table { min-width: 650px; }
}

/* ── 銘柄詳細リンク（一覧テーブル内） ── */
.stock-detail-link {
    color: inherit;
    text-decoration: none;
}
.stock-detail-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ── 静的戻るリンク（ページ上部・常時表示） ── */
.stock-back-static {
    padding: 0.5rem 0;
}

/* ── スティッキー戻るバー ── */
.stock-back-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transform: translateY(-100%);
    transition: transform 0.25s ease;
}
.stock-back-bar.visible {
    transform: translateY(0);
}
.stock-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.stock-back-link:hover {
    text-decoration: underline;
}
.stock-back-title {
    font-size: 0.8rem;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: auto;
}

/* ── 個別銘柄ページ ── */

/* アクションリンク（チャート上） */
.stock-detail-actions-top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.stock-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}
.stock-action-btn:hover {
    background: var(--bg-hover, rgba(0,0,0,0.04));
    border-color: var(--accent);
}
.stock-action-watchlist {
    color: var(--accent);
    font-weight: 600;
}
.stock-action-watchlist.added {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    cursor: default;
}

.stock-detail-error {
    text-align: center;
    padding: 4rem 1rem;
}
.stock-detail-error h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.stock-detail-error a {
    color: var(--accent);
}
.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}
.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb-sep {
    margin: 0 0.4rem;
    color: var(--text-dim);
}
.stock-detail-header {
    margin-bottom: 1.5rem;
}
.stock-detail-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.stock-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.stock-detail-chart {
    height: 350px;
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.stock-detail-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.stock-detail-summary .summary-heading {
    margin-top: 0;
}
.stock-detail-summary .summary-heading:not(:first-child) {
    margin-top: 1rem;
}
.stock-detail-summary p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text);
}
.stock-detail-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.stock-detail-section h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.stock-detail-checklist {
    display: grid;
    gap: 0.25rem;
}
.stock-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.stock-detail-actions .tv-link {
    font-size: 0.85rem;
}
.related-stocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}
.related-stock-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, background 0.15s;
}
.related-stock-card:hover {
    border-color: var(--accent);
    background: var(--surface);
}
.related-stock-name {
    font-size: 0.82rem;
    font-weight: 600;
    flex: 1 1 60%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.related-stock-code {
    font-size: 0.72rem;
    color: var(--text-dim);
}
.related-stock-rs {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-left: auto;
}
@media (max-width: 640px) {
    .stock-detail-header h1 { font-size: 1.15rem; }
    .stock-detail-chart { height: 260px; }
    .related-stocks-grid { grid-template-columns: 1fr; }
}

/* ── ポジション分析ボックス（SEO強化） ── */
.position-analysis-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.pa-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.pa-label {
    font-size: 0.85rem;
    color: var(--text, #1a1d27);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.pa-value {
    font-size: 0.95rem;
    color: var(--text, #1a1d27);
}
.sector-rank-chip {
    display: inline-block;
    padding: 0.45rem 0.75rem;
    background: rgba(108, 140, 255, 0.12);
    color: #4a6ad6;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
}
[data-theme="dark"] .sector-rank-chip {
    background: rgba(108, 140, 255, 0.2);
    color: #9ab4ff;
}
.sector-rank-chip strong {
    font-weight: 700;
    font-size: 1rem;
}
.stage-duration-chip {
    display: inline-block;
    padding: 0.45rem 0.75rem;
    background: rgba(52, 211, 153, 0.12);
    color: #0f766e;
    border-radius: 8px;
    font-size: 0.88rem;
}
.stage-duration-chip.fresh {
    background: rgba(251, 146, 60, 0.15);
    color: #c2410c;
    font-weight: 600;
}
[data-theme="dark"] .stage-duration-chip {
    background: rgba(52, 211, 153, 0.18);
    color: #6ee7b7;
}
[data-theme="dark"] .stage-duration-chip.fresh {
    background: rgba(251, 146, 60, 0.22);
    color: #fdba74;
}
.stage-duration-chip strong { font-weight: 700; }

/* 52週レンジバー */
.range-bar {
    position: relative;
    height: 10px;
    background: linear-gradient(to right, #fee2e2, #fef3c7, #d1fae5);
    border-radius: 5px;
    overflow: visible;
    margin-bottom: 0.4rem;
}
[data-theme="dark"] .range-bar {
    background: linear-gradient(to right, rgba(252, 165, 165, 0.3), rgba(252, 211, 77, 0.3), rgba(134, 239, 172, 0.3));
}
.range-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(108, 140, 255, 0.35);
    border-radius: 5px 0 0 5px;
    transition: width 0.3s ease;
}
.range-bar-marker {
    position: absolute;
    top: -3px;
    width: 4px;
    height: 16px;
    background: #4a6ad6;
    border-radius: 2px;
    transform: translateX(-2px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.range-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text, #1a1d27);
    gap: 0.5rem;
    flex-wrap: wrap;
}
.range-bar-current {
    font-weight: 600;
    color: var(--text, #1a1d27);
}

/* ステージ遷移タイムライン */
.stage-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.stage-timeline-item {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.55rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
}
.st-date {
    font-weight: 600;
    color: var(--text, #1a1d27);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}
.st-transition {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.st-from, .st-to {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
}
.st-from.stage1, .st-to.stage1 { background: #6b7280; }
.st-from.stage2, .st-to.stage2 { background: #10b981; }
.st-from.stage3, .st-to.stage3 { background: #eab308; }
.st-from.stage4, .st-to.stage4 { background: #ef4444; }
.st-arrow {
    color: var(--text-dim, #6b7280);
    font-weight: 700;
}
.st-labels {
    color: var(--text, #1a1d27);
    font-size: 0.84rem;
}
.st-days-ago {
    color: var(--text-dim, #6b7280);
    font-size: 0.82rem;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .stage-timeline-item {
        grid-template-columns: auto auto 1fr;
        gap: 0.5rem;
    }
    .st-labels { grid-column: 1 / -1; font-size: 0.82rem; }
    .st-days-ago { grid-column: 3; text-align: right; }
}

/* セクションノート */
.section-note {
    font-size: 0.78rem;
    color: var(--text-dim, #6b7280);
    margin: -0.25rem 0 0.75rem;
}

/* 関連銘柄タグ */
.related-stock-tag {
    font-size: 0.68rem;
    padding: 0.12rem 0.4rem;
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
    border-radius: 4px;
    margin-left: 0.3rem;
}
.related-stock-tag.tag-other {
    background: rgba(107, 114, 128, 0.15);
    color: #4b5563;
}
[data-theme="dark"] .related-stock-tag {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
}
[data-theme="dark"] .related-stock-tag.tag-other {
    background: rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
}
