.alm-container {
    padding-bottom: 2.5rem;
}

.alm-intro-card {
    margin-bottom: 1.5rem;
}

.alm-intro-copy {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.alm-nav-link-active {
    color: var(--timeframe-active-text);
    background: var(--timeframe-active-bg);
    border-color: var(--timeframe-active-text);
}

.alm-view-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 0 2rem;
}

.alm-tab {
    border: none;
    background: transparent;
    border-radius: 999px;
    padding: 0.55rem 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.alm-tab:hover {
    background: var(--timeframe-hover-bg);
    color: var(--timeframe-active-text);
    transform: translateY(-1px);
}

.alm-tab.active {
    background: var(--timeframe-active-bg);
    color: var(--timeframe-active-text);
}

.alm-view {
    animation: fadeIn 0.3s ease;
}

.alm-view.hidden {
    display: none !important;
}

.alm-date-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.alm-nav-btn {
    border: 1px solid var(--panel-border);
    background: transparent;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.alm-nav-btn:hover {
    background: var(--timeframe-hover-bg);
    border-color: var(--timeframe-active-text);
    transform: translateY(-1px);
}

.alm-date-label {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.alm-date-picker {
    background: var(--panel-bg);
    color: var(--text-main);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.92rem;
}

.alm-split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.alm-panel {
    background: var(--card-bg);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: var(--shadow-panel);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.alm-panel:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.alm-panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--panel-border);
}

.alm-panel-body {
    min-height: 220px;
}

.alm-panel-badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.alm-badge-iris {
    background: rgba(79, 111, 149, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(79, 111, 149, 0.3);
}

.alm-badge-almanac {
    background: rgba(180, 140, 58, 0.12);
    color: var(--status-yellow);
    border: 1px solid rgba(180, 140, 58, 0.25);
}

.alm-panel-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.alm-verdict-bar {
    margin-top: 1rem;
    padding: 1rem;
    text-align: center;
    background: var(--bg-subtle);
    border-radius: 12px;
    border: 1px solid var(--panel-border);
}

.alm-agree,
.alm-split,
.alm-neutral {
    font-weight: 700;
}

.alm-agree {
    color: var(--status-green);
}

.alm-split {
    color: var(--status-yellow);
}

.alm-neutral {
    color: var(--text-muted);
}

.alm-empty {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.6;
    padding: 1rem;
}

.alm-score-shell {
    text-align: center;
    margin-bottom: 1rem;
}

.alm-score-value {
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1;
}

.alm-score-bullish {
    color: var(--status-green);
}

.alm-score-bearish {
    color: var(--status-red);
}

.alm-score-sideways {
    color: var(--status-yellow);
}

.alm-score-caption,
.alm-note-caption,
.alm-stat-label,
.alm-mini-title,
.alm-calendar-score,
.alm-weekday {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.alm-pill-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.alm-direction-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.alm-dir-d {
    background: rgba(63, 127, 107, 0.15);
    color: var(--status-green);
}

.alm-dir-s {
    background: rgba(180, 140, 58, 0.12);
    color: var(--status-yellow);
}

.alm-dir-n {
    background: rgba(182, 78, 90, 0.15);
    color: var(--status-red);
}

.alm-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--panel-border);
}

.alm-signal-buy,
.alm-signal-sell,
.alm-signal-hold {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.alm-signal-buy {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.alm-signal-sell {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.alm-signal-hold {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.alm-verdict-agree {
    color: #28a745;
    font-weight: 600;
}

.alm-verdict-disagree {
    color: #dc3545;
    font-weight: 600;
}

.alm-verdict-neutral {
    color: #6c757d;
    font-weight: 600;
}

.alm-refresh-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
}

.alm-refresh-link:hover {
    text-decoration: underline;
}

.alm-stat-grid,
.alm-triple-grid,
.alm-month-metrics {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

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

.alm-triple-grid,
.alm-month-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.alm-stat-card,
.alm-mini-card,
.alm-metric-card {
    background: var(--bg-subtle);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 0.85rem;
    text-align: center;
}

.alm-stat-value,
.alm-mini-value,
.alm-metric-value {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.alm-metric-value.is-positive {
    color: var(--status-green);
}

.alm-metric-value.is-negative {
    color: var(--status-red);
}

.alm-note-box {
    background: var(--bg-subtle);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.alm-accuracy-panel {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border, var(--panel-border));
}

.alm-acc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin: 0.5rem 0;
}

.alm-acc-card {
    text-align: center;
    padding: 0.55rem 0.4rem;
    border-radius: 6px;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

.alm-acc-hit {
    background: rgba(40, 167, 69, 0.12);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.alm-acc-miss {
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.alm-acc-neutral {
    background: rgba(108, 117, 125, 0.1);
    border: 1px solid rgba(108, 117, 125, 0.2);
}

.alm-acc-badge,
.alm-acc-score {
    font-weight: 700;
}

.alm-acc-score {
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.alm-acc-positive {
    color: var(--status-green);
}

.alm-acc-negative {
    color: var(--status-red);
}

.alm-table-shell {
    overflow-x: auto;
}

.alm-week-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    overflow: hidden;
}

.alm-week-table th {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--panel-border);
}

.alm-week-table td {
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--panel-border);
}

.alm-week-table tr:last-child td {
    border-bottom: none;
}

.alm-week-index-cell {
    display: flex;
    min-width: 150px;
    flex-direction: column;
    gap: 0.38rem;
}

.alm-week-index-empty {
    justify-content: center;
    min-height: 78px;
}

.alm-week-index-head,
.alm-week-index-meta,
.alm-week-index-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.alm-week-index-score {
    font-size: 1rem;
    font-weight: 800;
}

.alm-week-index-trend {
    font-weight: 700;
    color: var(--text-main);
}

.alm-week-index-sep {
    color: var(--text-muted);
}

.alm-week-index-verdict {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.alm-week-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.24rem 0.55rem;
    border-radius: 999px;
    background: rgba(108, 117, 125, 0.12);
    border: 1px solid rgba(108, 117, 125, 0.22);
    color: var(--text-main);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.alm-week-status-chip.is-closed {
    background: rgba(182, 78, 90, 0.12);
    border-color: rgba(182, 78, 90, 0.22);
    color: var(--status-red);
}

.alm-week-accuracy-cell {
    text-align: center;
}

.alm-week-summary-card {
    min-width: 130px;
}

#weekly-agreement-strip {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.alm-agree-cell {
    flex: 1 1 120px;
    text-align: center;
    padding: 0.8rem;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--panel-border);
}

.alm-week-accuracy-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border, var(--panel-border));
    font-size: 0.9rem;
}

.acc-good {
    color: #28a745;
}

.acc-mixed {
    color: #856404;
}

.acc-poor {
    color: #dc3545;
}

#seasonal-heatmap-strip {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    flex-wrap: wrap;
}

.alm-month-cell {
    flex: 1 1 72px;
    min-height: 56px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: default;
    transition: transform 0.2s ease;
}

.alm-month-cell:hover {
    transform: scale(1.03);
}

.alm-month-cell.bullish {
    background: rgba(63, 127, 107, 0.72);
    color: #fff;
}

.alm-month-cell.bearish {
    background: rgba(182, 78, 90, 0.72);
    color: #fff;
}

.alm-month-cell.mixed {
    background: rgba(180, 140, 58, 0.7);
    color: #fff;
}

.alm-month-cell.current {
    outline: 2px solid var(--text-main);
    outline-offset: 2px;
}

#monthly-calendar-heatmap {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    margin-top: 1rem;
}

.alm-cal-day {
    min-height: 120px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.45rem;
    padding: 0.45rem;
    text-align: left;
    border: 1px solid var(--panel-border);
    position: relative;
    background: var(--card-bg);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.alm-cal-day.empty {
    background: transparent;
    border-color: transparent;
}

.alm-cal-day:not(.empty) {
    cursor: help;
}

.alm-cal-day:hover,
.alm-cal-day:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    outline: none;
}

.alm-cal-day.is-bullish {
    background: linear-gradient(180deg, rgba(63, 127, 107, 0.14), rgba(63, 127, 107, 0.04));
}

.alm-cal-day.is-bearish {
    background: linear-gradient(180deg, rgba(182, 78, 90, 0.14), rgba(182, 78, 90, 0.04));
}

.alm-cal-day.is-mixed {
    background: linear-gradient(180deg, rgba(180, 140, 58, 0.14), rgba(180, 140, 58, 0.04));
}

.alm-cal-day.is-closed {
    background: linear-gradient(180deg, rgba(127, 135, 148, 0.14), rgba(127, 135, 148, 0.04));
}

.alm-cal-day.is-no-data {
    background: linear-gradient(180deg, rgba(79, 111, 149, 0.12), rgba(79, 111, 149, 0.03));
}

.alm-cal-daytop {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
}

.alm-cal-daynum {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-main);
}

.alm-cal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.16rem 0.42rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-main);
    background: rgba(79, 111, 149, 0.12);
    border: 1px solid rgba(79, 111, 149, 0.2);
}

.alm-cal-badge.is-muted {
    color: var(--text-muted);
    background: rgba(127, 135, 148, 0.12);
    border-color: rgba(127, 135, 148, 0.2);
}

.alm-cal-body {
    display: grid;
    gap: 0.26rem;
    margin-top: auto;
}

.alm-cal-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.22rem 0.38rem;
    border-radius: 8px;
    font-size: 0.68rem;
    line-height: 1.2;
    border: 1px solid transparent;
}

.alm-cal-line strong {
    font-size: 0.74rem;
    font-weight: 800;
    color: inherit;
}

.alm-cal-line.alm-score-bullish {
    background: rgba(63, 127, 107, 0.12);
    border-color: rgba(63, 127, 107, 0.18);
}

.alm-cal-line.alm-score-bearish {
    background: rgba(182, 78, 90, 0.1);
    border-color: rgba(182, 78, 90, 0.16);
}

.alm-cal-line.alm-score-sideways {
    background: rgba(180, 140, 58, 0.12);
    border-color: rgba(180, 140, 58, 0.18);
}

.alm-cal-line-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.alm-cal-status {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-main);
}

.alm-cal-status-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.alm-cal-acc-dot {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.alm-cal-acc-dot.alm-acc-hit {
    background: #28a745;
}

.alm-cal-acc-dot.alm-acc-miss {
    background: #dc3545;
}

.alm-cal-acc-dot.alm-acc-neutral {
    background: #ffc107;
}

.alm-month-acc-summary {
    text-align: center;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border, var(--panel-border));
}

.alm-month-acc-summary .alm-note-caption {
    display: block;
    margin-top: 0.2rem;
}

.alm-sig-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    background: var(--bg-subtle);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
}

.alm-sig-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    font-size: 0.86rem;
    line-height: 1.4;
}

.alm-sig-dot {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    flex: 0 0 auto;
}

.sg-g {
    background: rgba(63, 127, 107, 0.2);
    color: var(--status-green);
    border-color: rgba(63, 127, 107, 0.3);
}

.sg-r {
    background: rgba(182, 78, 90, 0.16);
    color: var(--status-red);
    border-color: rgba(182, 78, 90, 0.28);
}

.sg-a {
    background: rgba(180, 140, 58, 0.15);
    color: var(--status-yellow);
    border-color: rgba(180, 140, 58, 0.3);
}

.sg-b {
    background: rgba(79, 111, 149, 0.14);
    color: var(--accent-blue);
    border-color: rgba(79, 111, 149, 0.28);
}

.sg-n {
    background: rgba(127, 135, 148, 0.14);
    color: var(--text-muted);
    border-color: rgba(127, 135, 148, 0.26);
}

.alm-sig-dot.sg-g,
.alm-sig-dot.sg-r,
.alm-sig-dot.sg-a,
.alm-sig-dot.sg-b,
.alm-sig-dot.sg-n {
    border: 1px solid transparent;
}

#seasonal-signals-table {
    margin-bottom: 1.35rem;
}

.alm-sig-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    overflow: hidden;
}

.alm-sig-table th,
.alm-sig-table td {
    padding: 0.9rem 1rem;
    vertical-align: top;
    border-bottom: 1px solid var(--panel-border);
}

.alm-sig-table th {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-subtle);
}

.alm-sig-table tr:last-child td {
    border-bottom: none;
}

.alm-sig-table td {
    color: var(--text-main);
    font-size: 0.92rem;
}

.alm-sig-col-month {
    width: 18%;
}

.alm-sig-col-bias {
    width: 15%;
}

.alm-sig-col-rank,
.alm-sig-col-midterm {
    width: 13%;
}

.alm-sig-col-signals {
    width: 41%;
}

.alm-sig-month-name {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.alm-sig-month-meta {
    display: block;
    margin-top: 0.18rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.alm-sig-phase-row td {
    padding: 0.8rem 1rem;
    background: linear-gradient(90deg, rgba(79, 111, 149, 0.08), transparent);
}

.alm-sig-phase {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.34rem 0.78rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.alm-sig-phase.bull {
    background: rgba(63, 127, 107, 0.14);
    color: var(--status-green);
    border-color: rgba(63, 127, 107, 0.24);
}

.alm-sig-phase.bear {
    background: rgba(182, 78, 90, 0.14);
    color: var(--status-red);
    border-color: rgba(182, 78, 90, 0.24);
}

.alm-sig-phase-note {
    margin-left: 0.7rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.alm-sig-current td {
    background: rgba(79, 111, 149, 0.07);
}

.alm-sig-bias {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
}

.alm-sig-stat {
    font-weight: 700;
}

.alm-sig-stat.is-positive {
    color: var(--status-green);
}

.alm-sig-stat.is-negative {
    color: var(--status-red);
}

.alm-sig-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.alm-sig-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.42rem 0.78rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: help;
    background: transparent;
    box-shadow: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.alm-sig-badge:hover,
.alm-sig-badge:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    outline: none;
}

.alm-sig-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.alm-sig-tooltip {
    position: fixed;
    top: -9999px;
    left: -9999px;
    max-width: min(340px, calc(100vw - 24px));
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    background: var(--card-bg);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
    color: var(--text-main);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.14s ease, transform 0.14s ease;
    z-index: 9999;
}

.alm-sig-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.alm-sig-tooltip-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.alm-sig-tooltip-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.45rem 0 0.55rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.alm-sig-tooltip-body {
    color: var(--text-main);
    font-size: 0.88rem;
    line-height: 1.55;
}

.alm-sig-tooltip-meaning {
    margin-top: 0.65rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.alm-month-tooltip {
    position: fixed;
    top: -9999px;
    left: -9999px;
    max-width: min(380px, calc(100vw - 24px));
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--panel-border);
    background: var(--card-bg);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
    color: var(--text-main);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.14s ease, transform 0.14s ease;
    z-index: 9999;
}

.alm-month-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.alm-month-tooltip-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--text-main);
}

.alm-month-tooltip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.55rem 0 0.75rem;
}

.alm-month-tooltip-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.26rem 0.58rem;
    border-radius: 999px;
    background: rgba(79, 111, 149, 0.12);
    border: 1px solid rgba(79, 111, 149, 0.2);
    color: var(--text-main);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.alm-month-tooltip-chip.is-icon {
    background: rgba(180, 140, 58, 0.12);
    border-color: rgba(180, 140, 58, 0.2);
}

.alm-month-tip-grid {
    display: grid;
    gap: 0.55rem;
}

.alm-month-tip-row {
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: var(--bg-subtle);
    border: 1px solid var(--panel-border);
}

.alm-month-tip-row-head,
.alm-month-tip-row-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.alm-month-tip-row-meta {
    margin-top: 0.45rem;
    font-size: 0.78rem;
}

.alm-month-tip-note {
    margin-top: 0.8rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--panel-border);
    color: var(--text-main);
    font-size: 0.86rem;
    line-height: 1.55;
}

.alm-month-tip-accuracy {
    margin-top: 0.55rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.alm-rank-heading {
    margin: 1.5rem 0 0.75rem;
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.alm-rank-meta {
    font-size: 0.72rem;
    opacity: 0.82;
}

@media (max-width: 768px) {
    .alm-split-grid,
    .alm-triple-grid,
    .alm-month-metrics,
    .alm-acc-grid {
        grid-template-columns: 1fr;
    }

    .alm-stat-grid {
        grid-template-columns: 1fr;
    }

    .alm-date-nav {
        align-items: stretch;
    }

    .alm-date-label {
        width: 100%;
        text-align: center;
    }

    #monthly-calendar-heatmap {
        gap: 0.25rem;
        padding: 0.75rem;
    }

    .alm-cal-day {
        min-height: 104px;
        padding: 0.35rem;
        gap: 0.35rem;
    }

    .alm-cal-daynum {
        font-size: 0.8rem;
    }

    .alm-cal-line {
        padding: 0.2rem 0.3rem;
        font-size: 0.62rem;
    }

    .alm-cal-line strong {
        font-size: 0.68rem;
    }

    .alm-cal-badge {
        font-size: 0.56rem;
        padding: 0.14rem 0.35rem;
    }

    .alm-cal-status {
        font-size: 0.66rem;
    }

    .alm-cal-status-sub {
        font-size: 0.6rem;
    }

    .alm-week-table th,
    .alm-week-table td {
        padding: 0.65rem 0.55rem;
        font-size: 0.82rem;
    }

    .alm-week-table {
        min-width: 860px;
    }

    .alm-week-index-cell {
        min-width: 132px;
    }

    .alm-sig-legend {
        gap: 0.65rem;
        padding: 0.85rem 0.9rem;
    }

    .alm-sig-table th,
    .alm-sig-table td {
        padding: 0.7rem 0.65rem;
        font-size: 0.82rem;
    }

    .alm-sig-col-rank,
    .alm-sig-col-midterm,
    .alm-sig-hide-mobile {
        display: none;
    }

    .alm-sig-col-month {
        width: 28%;
    }

    .alm-sig-col-bias {
        width: 22%;
    }

    .alm-sig-col-signals {
        width: 50%;
    }

    .alm-sig-phase-row td {
        padding: 0.7rem 0.65rem;
    }

    .alm-sig-phase-note {
        display: block;
        margin: 0.4rem 0 0;
    }

    .alm-sig-badges {
        gap: 0.4rem;
    }

    .alm-sig-badge {
        padding: 0.4rem 0.68rem;
        font-size: 0.78rem;
    }

    .alm-month-tooltip {
        max-width: min(330px, calc(100vw - 20px));
        padding: 0.85rem 0.9rem;
    }
}
