:root {
    --bg-0: #05070d;
    --bg-1: #0b1018;
    --bg-2: #111827;
    --surface: rgba(11, 16, 24, 0.7);
    --surface-strong: rgba(14, 20, 31, 0.86);
    --surface-soft: rgba(255, 255, 255, 0.04);
    --border-soft: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --ink-soft: rgba(226, 232, 240, 0.72);
    --ink-muted: rgba(148, 163, 184, 0.72);
    --ember: #f59e0b;
    --ember-soft: rgba(245, 158, 11, 0.18);
    --aqua: #67e8f9;
    --aqua-soft: rgba(103, 232, 249, 0.16);
    --success: #34d399;
}

/* === Background: WoW Midnight art, darkened + blurred === */
body {
    min-height: 100vh;
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    color: #fff;
    background:
        radial-gradient(circle at top, rgba(245, 158, 11, 0.08), transparent 28%),
        radial-gradient(circle at 85% 12%, rgba(103, 232, 249, 0.08), transparent 24%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 45%, #05070b 100%);
}
body::before {
    content: '';
    position: fixed;
    inset: -20px;
    background: url('../img/midnight-bg.png') center/cover no-repeat;
    filter: blur(10px) brightness(0.28) saturate(0.95);
    z-index: -2;
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(3, 6, 11, 0.4), rgba(3, 6, 11, 0.82)),
        radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.18) 100%);
    z-index: -1;
}

/* Tabular numbers for metrics alignment */
.font-tnum { font-feature-settings: 'tnum'; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* === Landing mode: center search vertically === */
#appContainer.landing-mode {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}
#appContainer.landing-mode #searchSection {
    width: 100%;
    max-width: 920px;
}
#appContainer.landing-mode .search-bar {
    background:
        radial-gradient(circle at 14% 18%, rgba(245, 158, 11, 0.14), transparent 28%),
        radial-gradient(circle at 84% 82%, rgba(245, 158, 11, 0.1), transparent 20%),
        radial-gradient(circle at 76% 24%, rgba(103, 232, 249, 0.08), transparent 22%),
        linear-gradient(180deg, rgba(10, 14, 24, 0.9), rgba(6, 10, 18, 0.96));
    border: 1px solid rgba(245, 158, 11, 0.14);
    padding: 1.5rem 2rem;
    border-radius: 30px;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}
#appContainer.landing-mode .search-bar::after {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(255, 255, 255, 0.06), rgba(103, 232, 249, 0.1));
}
#appContainer.landing-mode .search-bar::before {
    inset: auto 20px 0 20px;
    height: 44px;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.16), transparent 70%);
    filter: blur(24px);
}
#appContainer.landing-mode #mainTitle {
    font-size: 2rem;
    letter-spacing: -0.04em;
    font-family: 'Sora', 'Manrope', sans-serif;
}
/* Hide everything except search in landing mode */
#appContainer.landing-mode #mainGrid,
#appContainer.landing-mode #radarControls,
#appContainer.landing-mode #raidComparisonView,
#appContainer.landing-mode #loadingDashboard {
    display: none !important;
}

/* Transition for layout shift + modal blur */
#appContainer {
    transition: padding 0.4s ease, min-height 0.4s ease, filter 0.4s ease;
}
#appContainer.modal-blurred {
    filter: blur(12px) brightness(0.7);
    pointer-events: none;
}

/* Search bar */
#searchSection {
    position: relative;
    z-index: 20;
}

#searchSection.dropdown-open {
    z-index: 10020;
}

#realmWrapper.dropdown-open {
    z-index: 10030;
}

#realmDropdown {
    z-index: 10040;
}

.search-bar {
    background: linear-gradient(180deg, rgba(13, 18, 28, 0.72), rgba(9, 13, 21, 0.82));
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(18px);
    overflow: visible;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}
.search-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(103, 232, 249, 0.08), rgba(255,255,255,0.06));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.search-bar::before {
    content: '';
    position: absolute;
    inset: auto 22px 0 22px;
    height: 56px;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 68%);
    pointer-events: none;
    filter: blur(28px);
}

/* === Executive Briefing Loading Dashboard === */
.executive-briefing-shell {
    position: relative;
    padding: 0.9rem 0 0.35rem;
}

.briefing-frame {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(245, 158, 11, 0.14);
    background:
        radial-gradient(circle at 14% 18%, rgba(245, 158, 11, 0.16), transparent 28%),
        radial-gradient(circle at 84% 82%, rgba(245, 158, 11, 0.12), transparent 20%),
        radial-gradient(circle at 76% 24%, rgba(103, 232, 249, 0.08), transparent 22%),
        linear-gradient(180deg, rgba(10, 14, 24, 0.9), rgba(6, 10, 18, 0.96));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
    padding: 24px;
}

.briefing-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(255, 255, 255, 0.06), rgba(103, 232, 249, 0.1));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.briefing-topline,
.briefing-section-head,
.phase-heading,
.briefing-log-head,
.comeback-row,
.briefing-inline-kicker,
.briefing-status-pill {
    display: flex;
    align-items: center;
}

.briefing-topline,
.briefing-section-head,
.briefing-hero-panel,
.briefing-hero-grid,
.briefing-feed-grid,
.briefing-stage-grid,
.briefing-metric-grid {
    gap: 14px;
}

.briefing-topline,
.briefing-section-head,
.briefing-log-head,
.comeback-row {
    justify-content: space-between;
}

.briefing-section-head,
.briefing-log-head,
.comeback-row {
    flex-wrap: wrap;
}

.briefing-topline {
    justify-content: flex-end;
    margin-bottom: 14px;
}

.briefing-kicker,
.briefing-eyebrow,
.briefing-section-kicker,
.briefing-inline-kicker,
.briefing-value-label,
.briefing-metric-label,
.phase-index,
.phase-title,
.briefing-log-label {
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.briefing-kicker,
.briefing-eyebrow,
.briefing-section-kicker,
.briefing-inline-kicker,
.briefing-value-label {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    color: rgba(252, 211, 77, 0.92);
}

.briefing-status-pill {
    gap: 10px;
    border-radius: 999px;
    padding: 8px 14px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    background: rgba(245, 158, 11, 0.08);
    color: rgba(226, 232, 240, 0.82);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

.briefing-inline-kicker {
    gap: 8px;
}

.briefing-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: linear-gradient(180deg, #fde68a, #f59e0b);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
    animation: phase-pulse 1.8s ease-in-out infinite;
}

.briefing-hero-grid,
.briefing-feed-grid,
.briefing-stage-grid,
.briefing-metric-grid {
    display: grid;
}

.briefing-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.84fr);
    align-items: stretch;
    margin-bottom: 14px;
}

.briefing-hero-panel,
.briefing-stages-panel,
.briefing-feed-panel,
.briefing-side-panel,
.briefing-log-card,
.comeback-card,
.queue-card,
.phase-card,
.live-stats-bar {
    position: relative;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(15, 20, 31, 0.78), rgba(8, 12, 20, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 46px rgba(0, 0, 0, 0.22);
}

.briefing-hero-panel {
    display: flex;
    align-items: center;
    min-height: 220px;
    padding: 20px 22px;
    overflow: hidden;
}

.briefing-hero-panel::after {
    content: '';
    position: absolute;
    right: -52px;
    bottom: -52px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 70%);
    filter: blur(8px);
    pointer-events: none;
}

.briefing-char-name {
    margin: 0;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: clamp(1.95rem, 3.8vw, 3.05rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    color: #f8fafc;
}

.briefing-subtext {
    margin: 10px 0 0;
    font-size: 12px;
}

.briefing-value-copy,
.briefing-metric-copy,
.briefing-section-note,
.briefing-log-note,
.comeback-copy,
.comeback-note {
    margin: 0;
    color: rgba(226, 232, 240, 0.62);
}

.briefing-value-card {
    align-self: end;
    border-radius: 22px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.03));
    border: 1px solid rgba(245, 158, 11, 0.14);
}

.briefing-value-figure {
    margin: 8px 0 0;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: #fff;
}

.briefing-value-copy {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.65;
}

.live-stats-bar {
    padding: 14px;
}

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

.briefing-metric-card {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.briefing-metric-label,
.phase-title,
.briefing-log-label {
    font-size: 10px;
    font-weight: 800;
    color: rgba(148, 163, 184, 0.76);
}

.briefing-metric-value {
    display: block;
    margin-top: 8px;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: #f8fafc;
}

.briefing-metric-copy,
.briefing-section-note,
.briefing-log-note,
.comeback-copy,
.comeback-note {
    font-size: 12px;
    line-height: 1.55;
}

.briefing-metric-copy {
    display: block;
    margin-top: 8px;
}

.briefing-stages-panel,
.briefing-feed-panel,
.briefing-side-panel {
    padding: 16px;
}

.briefing-section-head {
    margin-bottom: 12px;
}

.briefing-section-head-compact {
    display: block;
}

.briefing-section-title {
    margin: 0;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 1rem;
    letter-spacing: -0.03em;
    color: #f8fafc;
}

.briefing-stage-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.phase-card {
    min-height: 112px;
    padding: 16px;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.phase-card.active {
    border-color: rgba(245, 158, 11, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 48px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(245, 158, 11, 0.06);
    transform: translateY(-2px);
}

.phase-card.done {
    border-color: rgba(52, 211, 153, 0.24);
}

.phase-index {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(245, 158, 11, 0.68);
}

.phase-heading {
    gap: 10px;
    margin-bottom: 10px;
}

.phase-detail {
    margin: 0;
    line-height: 1.7;
}

.phase-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.phase-dot.pending {
    background: rgba(255, 255, 255, 0.12);
}

.phase-dot.active {
    background: linear-gradient(180deg, #fde68a, #f59e0b);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
    animation: phase-pulse 1.5s ease-in-out infinite;
}

.phase-dot.done {
    background: #34d399;
    box-shadow: 0 0 7px rgba(52, 211, 153, 0.38);
}

@keyframes phase-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(0.88); }
}

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

.briefing-feed-panel-wide {
    margin-top: 14px;
}

.briefing-queue-inline {
    margin-bottom: 14px;
}

.briefing-queue-inline .queue-card {
    max-width: 360px;
}

.briefing-log-card {
    padding: 14px;
    min-height: 152px;
}

.briefing-log-note {
    font-size: 11px;
}

.terminal-log {
    margin-top: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    line-height: 1.65;
    min-height: 82px;
    max-height: 112px;
    overflow-y: auto;
}

.terminal-log::-webkit-scrollbar {
    width: 3px;
}

.terminal-log::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.terminal-log-line {
    color: rgba(255, 255, 255, 0.56);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.terminal-log-line .log-prefix {
    color: rgba(252, 211, 77, 0.76);
}

.briefing-side-panel {
    display: grid;
    gap: 16px;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.queue-card,
.comeback-card {
    padding: 18px;
    animation: queue-fade-in 0.4s ease-out;
}

.queue-card {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.1), rgba(15, 20, 31, 0.92));
    border-color: rgba(245, 158, 11, 0.16);
}

.queue-position {
    margin: 14px 0 4px;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1;
    letter-spacing: -0.05em;
    color: #fff;
}

.queue-detail,
.queue-estimate {
    margin: 0;
}

.comeback-card {
    background: linear-gradient(180deg, rgba(13, 18, 28, 0.72), rgba(10, 14, 22, 0.9));
}

.comeback-row {
    gap: 10px;
    margin: 14px 0 10px;
}

.comeback-url {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(196, 181, 253, 0.96);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: all;
}

.comeback-copy-btn {
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    background: rgba(245, 158, 11, 0.1);
    color: rgba(255, 251, 235, 0.92);
    font-size: 11px;
    font-weight: 700;
    padding: 10px 12px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.comeback-copy-btn:hover {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.28);
    transform: translateY(-1px);
}

.comeback-copy-btn:focus-visible {
    outline: 2px solid rgba(252, 211, 77, 0.9);
    outline-offset: 2px;
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(252, 211, 77, 0.36);
}

/* Cache badge */
.cache-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    padding: 4px 8px;
    margin-left: 10px;
    vertical-align: middle;
    background: rgba(245, 158, 11, 0.08);
}

@keyframes queue-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.queue-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(245, 158, 11, 0.24);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: queue-spin 1s linear infinite;
}

@keyframes queue-spin {
    to { transform: rotate(360deg); }
}

/* === Tooltip styles === */
[data-tooltip] {
    position: relative;
    cursor: help;
}

.tooltips-enabled [data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background: rgba(10,10,10,0.95);
    color: #e5e7eb;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    width: max-content;
    max-width: 280px;
    text-align: center;
    z-index: 10000;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    white-space: normal;
}
.tooltips-enabled [data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(255,255,255,0.1);
    z-index: 10000;
}

/* JS floating tooltip (for modal, immune to overflow clipping) */
.floating-tooltip {
    position: fixed;
    z-index: 10001;
    background: rgba(10,10,10,0.95);
    color: #e5e7eb;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    max-width: 280px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.9);
    pointer-events: none;
    white-space: normal;
    animation: tooltip-fade-in 0.15s ease;
}
@keyframes tooltip-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ensure tiles don't clip tooltips */
.boss-tile, .search-bar {
    overflow: visible;
}

/* === Boss tile styles === */
.boss-tile {
    background: linear-gradient(180deg, rgba(13, 18, 28, 0.78), rgba(9, 13, 21, 0.92));
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    z-index: 1;
    box-shadow: 0 24px 55px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.03);
}
.boss-tile::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), transparent 28%),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.08), transparent 24%);
    pointer-events: none;
}
.boss-tile:hover {
    z-index: 100;
    border-color: rgba(245, 158, 11, 0.18);
    box-shadow: 0 28px 65px rgba(0,0,0,0.28), 0 0 0 1px rgba(245, 158, 11, 0.05);
    transform: translateY(-4px);
    cursor: pointer;
}
.boss-tile.visible {
    opacity: 1;
    transform: translateY(0);
}
.boss-tile.not-killed {
    opacity: 0.6;
}
.boss-tile.not-killed.visible {
    opacity: 0.6;
}
.boss-tile.not-killed:hover {
    transform: none;
    cursor: default;
    border-color: rgba(255,255,255,0.07);
    box-shadow: none;
}
.boss-tile.tile-no-signal,
.boss-tile.tile-no-signal.visible {
    opacity: 0.92;
}
.boss-tile.tile-no-signal:hover {
    transform: none;
    cursor: default;
}

/* Locked tile — frosted lock embossed behind glass */
.locked-tile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    position: relative;
}
.locked-tile-icon {
    width: 72px;
    height: 72px;
    color: rgba(255,255,255,0.08);
    filter: blur(1px);
    margin-bottom: 12px;
}
.locked-tile-name {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.18);
    letter-spacing: -0.01em;
}

.tile-loading-shell,
.tile-analysis-shell,
.tile-no-signal-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.tile-loading-header,
.tile-header,
.tile-loading-body,
.tile-metric-topline,
.tile-insight-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.tile-overall-row {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    gap: 14px;
}

.tile-loading-header,
.tile-header,
.tile-loading-body {
    align-items: flex-start;
}

.tile-loading-label,
.tile-verdict-kicker,
.tile-date-meta,
.tile-pull-meta,
.tile-mode-chip,
.tile-context-stack span,
.tile-insight-label,
.tile-metric-label,
.tile-metric-rank,
.tile-loading-chip {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.tile-loading-label,
.tile-verdict-kicker,
.tile-no-signal-kicker {
    margin: 0 0 6px;
    color: rgba(252, 211, 77, 0.9);
    font-weight: 800;
}

.tile-loading-title,
.tile-boss-title,
.tile-no-signal-title {
    margin: 0;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: -0.04em;
    color: #f8fafc;
}

.tile-no-signal-title {
    font-size: 1.1rem;
    line-height: 1.1;
    text-align: center;
}

.tile-loading-chip,
.tile-mode-chip,
.tile-no-signal-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: rgba(226, 232, 240, 0.72);
    font-weight: 700;
    white-space: nowrap;
}

.tile-mode-chip {
    max-width: min(100%, 240px);
    justify-content: flex-end;
    text-align: right;
    line-height: 1.35;
    white-space: normal;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    color: rgba(148, 163, 184, 0.82);
    font-size: 9px;
    letter-spacing: 0.1em;
}

.tile-no-signal-chip {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(226, 232, 240, 0.72);
}

.tile-loading-score {
    width: 88px;
    height: 88px;
    border-radius: 28px;
}

.tile-loading-lines {
    flex: 1;
    display: grid;
    gap: 8px;
}

.tile-loading-line {
    height: 14px;
    border-radius: 999px;
}

.tile-loading-line-short {
    width: 68%;
}

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

.tile-loading-card {
    height: 74px;
    border-radius: 18px;
}

.tile-meta-copy {
    min-width: 0;
}

.tile-date-meta,
.tile-pull-meta {
    margin: 0;
    color: rgba(148, 163, 184, 0.72);
    font-weight: 700;
}

.tile-pull-meta {
    text-align: right;
    line-height: 1.5;
}

.tile-header-right {
    display: grid;
    gap: 6px;
    justify-items: end;
    max-width: 52%;
}

.tile-verdict-band {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

.tile-verdict-band::before {
    content: '';
    position: absolute;
    inset: auto -32px -50px auto;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    filter: blur(10px);
    opacity: 0.8;
}

.tile-tone-elite {
    background: linear-gradient(180deg, rgba(226, 232, 240, 0.12), rgba(15, 23, 42, 0.38));
    border-color: rgba(226, 232, 240, 0.18);
}

.tile-tone-elite::before {
    background: radial-gradient(circle, rgba(226, 232, 240, 0.2), transparent 70%);
}

.tile-tone-strong {
    background: linear-gradient(180deg, rgba(103, 232, 249, 0.14), rgba(15, 23, 42, 0.38));
    border-color: rgba(103, 232, 249, 0.16);
}

.tile-tone-strong::before {
    background: radial-gradient(circle, rgba(103, 232, 249, 0.18), transparent 70%);
}

.tile-tone-steady {
    background: linear-gradient(180deg, rgba(52, 211, 153, 0.14), rgba(15, 23, 42, 0.38));
    border-color: rgba(52, 211, 153, 0.16);
}

.tile-tone-steady::before {
    background: radial-gradient(circle, rgba(52, 211, 153, 0.18), transparent 70%);
}

.tile-tone-fragile {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.38));
    border-color: rgba(245, 158, 11, 0.16);
}

.tile-tone-fragile::before {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 70%);
}

.tile-tone-critical {
    background: linear-gradient(180deg, rgba(251, 113, 133, 0.16), rgba(15, 23, 42, 0.38));
    border-color: rgba(251, 113, 133, 0.18);
}

.tile-tone-critical::before {
    background: radial-gradient(circle, rgba(251, 113, 133, 0.2), transparent 70%);
}

.tile-overall-score {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 4.5rem;
    line-height: 0.85;
    letter-spacing: -0.06em;
}

.tile-overall-label {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    opacity: 0.72;
}

.tile-context-stack {
    display: grid;
    gap: 6px;
    justify-items: end;
}

.tile-context-stack span {
    color: rgba(226, 232, 240, 0.56);
    font-weight: 700;
}

.tile-insight-card,
.tile-metric-card {
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.tile-insight-card {
    flex: 1;
    padding: 14px;
    display: grid;
    gap: 5px;
}

.tile-insight-label,
.tile-metric-label {
    color: rgba(148, 163, 184, 0.76);
    font-weight: 800;
}

.tile-insight-value {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 1rem;
    color: #f8fafc;
}

.tile-insight-sub,
.tile-metric-sub,
.tile-metric-rank {
    color: rgba(226, 232, 240, 0.52);
}

.tile-metric-rank {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.tile-metric-card {
    position: relative;
    padding: 12px;
    display: grid;
    gap: 8px;
}

.tile-metric-card > .tile-metric-rank {
    position: absolute;
    top: 10px;
    right: 10px;
}

.tile-metric-value {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 1rem;
    line-height: 1.15;
    min-height: 22px;
    color: #f8fafc;
}

.tile-metric-bar {
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
}

.tile-metric-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    opacity: 0.92;
}

.tile-no-signal-shell {
    justify-content: center;
    align-items: center;
    min-height: 100px;
    border-radius: 22px;
    border: 1px dashed rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
    padding: 16px 14px;
    gap: 8px;
}

.tile-no-signal-icon {
    width: 32px;
    height: 32px;
    color: rgba(255,255,255,0.2);
}

.tile-no-signal-icon svg {
    width: 100%;
    height: 100%;
}

.tile-analysis-ready {
    opacity: 1;
}

/* === Radar grid layout — dynamic boss count === */
.boss-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.not-pulled-shell {
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(12, 17, 27, 0.76), rgba(8, 12, 20, 0.9));
    padding: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.not-pulled-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.not-pulled-kicker {
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(252, 211, 77, 0.88);
}

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

.not-pulled-grid .radar-tile {
    min-height: 150px;
    padding: 0.7rem 0.85rem;
}
.radar-tile {
    padding: 1rem 1.25rem;
    min-height: 440px;
    display: flex;
    flex-direction: column;
}

/* Radar chart container */
.radar-chart-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Comparison mode toggle — vertical slider */
.comparison-toggle {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0px;
    border-radius: 9999px;
    padding: 3px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
}
.comparison-toggle-slider {
    position: absolute;
    left: 3px;
    right: 3px;
    top: 3px;
    height: 26px;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(103, 232, 249, 0.08));
    border: 1px solid rgba(245, 158, 11, 0.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    transition: top 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
}

@keyframes toggle-press {
    0%   { transform: scale(1); }
    35%  { transform: scale(0.92); }
    100% { transform: scale(1); }
}
.toggle-btn.pressing {
    animation: toggle-press 0.18s ease;
}
.toggle-btn {
    position: relative;
    z-index: 1;
    padding: 5px 14px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    border: 1px solid transparent;
    color: #94a3b8;
    background: transparent;
}
.toggle-btn:hover { color: #f8fafc; }
.toggle-btn.active {
    color: #fff;
}

/* Scope button pills (used inside modal) */
.scope-btn {
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    background: transparent;
}
.scope-btn:hover { color: #d1d5db; background: rgba(255,255,255,0.04); }
.scope-btn:active:not(.disabled) { transform: scale(0.92); }
.scope-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(255,255,255,0.08));
    border-color: rgba(245, 158, 11, 0.24);
}
.scope-btn.disabled { opacity: 0.3; cursor: default; pointer-events: none; }

/* Loading animation */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255,255,255,0.03); }
    50% { box-shadow: 0 0 40px rgba(255,255,255,0.06); }
}
.loading-tile {
    animation: pulse-glow 1.5s ease-in-out infinite;
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.04);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.02) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* Input depth + focus */
input, select {
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
    background: rgba(255,255,255,0.03);
}
input:focus, select:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.28);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4), 0 0 0 2px rgba(245, 158, 11, 0.09);
}

/* Analyze button */
#analyzeBtn {
    transition: all 0.2s ease;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(234, 88, 12, 0.92));
    border-color: rgba(251, 191, 36, 0.22);
    color: #09090b;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.18);
}
#analyzeBtn:hover:not(:disabled) {
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.24);
    transform: translateY(-1px);
}
#analyzeBtn:disabled {
    background: rgba(255,255,255,0.04);
    color: rgba(148, 163, 184, 0.5);
    box-shadow: none;
}

#mainTitle {
    font-family: 'Sora', 'Manrope', sans-serif;
    letter-spacing: -0.03em;
}

/* Expand arrow at bottom of tile */
.expand-arrow {
    transition: color 0.15s ease;
    cursor: pointer;
    user-select: none;
}
.expand-arrow:hover { color: rgba(255,255,255,0.5); }
.expand-arrow span {
    display: inline-block;
    transition: transform 0.25s ease;
}
.expand-arrow.open span {
    transform: rotate(180deg);
}

/* Expandable tray — thin horizontal strip */
.expand-tray {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 10px;
    margin-top: 6px;
    background: rgba(0, 0, 0, 0.3);
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    margin-bottom: -16px;
    padding-bottom: 12px;
    border-radius: 0 0 16px 16px;
}
/* Tray section separator */
.tray-sep {
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Metric value pill background */
.metric-pill {
    background: rgba(255,255,255,0.025);
    border-radius: 10px;
    padding: 4px 10px;
}

/* Expanded tile accent */
.boss-tile.expanded {
    border-color: rgba(255,255,255,0.1);
}
.boss-tile.expanded:hover {
    border-color: rgba(255,255,255,0.18);
}

/* RTR top-3 rank badges */
.rtr-rank-1 { border-color: rgba(255, 215, 0, 0.3); }
.rtr-rank-1:hover { border-color: rgba(255, 215, 0, 0.5); box-shadow: 0 4px 20px rgba(255, 215, 0, 0.1); }
.rtr-rank-2 { border-color: rgba(192, 192, 192, 0.3); }
.rtr-rank-2:hover { border-color: rgba(192, 192, 192, 0.5); box-shadow: 0 4px 20px rgba(192, 192, 192, 0.1); }
.rtr-rank-3 { border-color: rgba(205, 127, 50, 0.3); }
.rtr-rank-3:hover { border-color: rgba(205, 127, 50, 0.5); box-shadow: 0 4px 20px rgba(205, 127, 50, 0.1); }

/* Defensives value opacity transition */
.def-value-transition {
    transition: opacity 0.15s ease;
}

/* Comparison table */
#comparisonTable th { user-select: none; white-space: nowrap; }
#comparisonTable td { white-space: nowrap; }
.comparison-tab { white-space: nowrap; }

/* RTR player tile */
.rtr-player-tile {
    background: linear-gradient(180deg, rgba(13, 18, 28, 0.72), rgba(10, 14, 22, 0.88));
    border: 1px solid rgba(255,255,255,0.07);
    backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.rtr-player-tile.visible {
    opacity: 1;
    transform: translateY(0);
}
.rtr-player-tile:hover {
    border-color: rgba(245, 158, 11, 0.16);
    box-shadow: 0 18px 38px rgba(0,0,0,0.2);
}

/* RTR sort animation via FLIP */
.rtr-player-tile.rtr-sorting {
    transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.35s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* RTR searched character highlight */
.rtr-self-highlight {
    border-color: rgba(245, 158, 11, 0.34) !important;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(10, 14, 22, 0.9)) !important;
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.08), inset 0 0 20px rgba(245, 158, 11, 0.04);
}
.rtr-self-highlight:hover {
    border-color: rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.12);
}

/* RTR action buttons */
.rtr-action-btn {
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}
.rtr-cached-btn {
    color: #6ee7b7;
    background: rgba(52, 211, 153, 0.09);
    border-color: rgba(52, 211, 153, 0.24);
}
.rtr-cached-btn:hover {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.4);
}
.rtr-analyze-btn {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.09);
    border-color: rgba(245, 158, 11, 0.24);
}
.rtr-analyze-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.38);
}

/* RTR header tile */
.rtr-header-tile {
    background: linear-gradient(180deg, rgba(13, 18, 28, 0.72), rgba(10, 14, 22, 0.88));
    border: 1px solid rgba(255,255,255,0.07);
    backdrop-filter: blur(16px);
}

/* === Boss Detail Modal — BIGGER + smoother animation === */
#bossModal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#bossModal.hidden {
    display: none;
}
#bossModalBackdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(16px);
    opacity: 0;
    transition: opacity 0.4s ease;
}
#bossModalBackdrop.backdrop-visible {
    opacity: 1;
}
#bossModalContent {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    padding: 0 16px;
}
/* Open animation */
#bossModalContent.modal-opening {
    animation: modal-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes modal-enter {
    from { opacity: 0; transform: scale(0.88) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
/* Close animation — 0.4s to match #appContainer filter unblur + backdrop fade */
#bossModalContent.modal-closing {
    animation: modal-exit 0.4s ease forwards;
}
@keyframes modal-exit {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to { opacity: 0; transform: scale(0.92) translateY(10px); }
}
/* Navigate crossfade */
#modalBody.modal-fading {
    animation: modal-crossfade 0.3s ease;
}
@keyframes modal-crossfade {
    0% { opacity: 0.3; transform: scale(0.97); }
    100% { opacity: 1; transform: scale(1); }
}

#modalBody {
    flex: 1;
    background: linear-gradient(180deg, rgba(13, 18, 28, 0.82), rgba(8, 12, 20, 0.94));
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 24px;
    padding: 30px 36px 34px;
    max-height: 96vh;
    overflow-y: auto;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.4);
}
.modal-nav-btn {
    position: relative;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.4);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.modal-nav-btn:hover {
    background: rgba(255,255,255,0.10);
    color: #fff;
    border-color: rgba(255,255,255,0.25);
}
/* Boss name tooltip on arrow hover */
.modal-nav-btn[data-boss]:not([data-boss=""])::after {
    content: attr(data-boss);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#modalPrev[data-boss]:not([data-boss=""])::after {
    left: calc(100% + 10px);
}
#modalNext[data-boss]:not([data-boss=""])::after {
    right: calc(100% + 10px);
}
.modal-nav-btn:hover::after {
    opacity: 1;
}

/* Modal stat cards positioned around radar — BIGGER */
.modal-stat {
    position: absolute;
    text-align: center;
    white-space: nowrap;
    min-width: 122px;
}
.modal-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 5px;
    font-weight: 700;
}
.modal-stat-value {
    font-size: 18px;
    font-weight: 800;
    font-feature-settings: 'tnum';
    font-family: 'Sora', 'Manrope', sans-serif;
}
.modal-stat-help {
    display: inline-block;
    width: 13px;
    height: 13px;
    line-height: 13px;
    font-size: 9px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.3);
    cursor: help;
    margin-left: 3px;
    vertical-align: middle;
}
.modal-stat-help:hover {
    border-color: rgba(255,255,255,0.4);
    color: rgba(255,255,255,0.6);
}

/* Stat card sub-text (e.g. "HS 48% · Pot 91%") */
.modal-stat-sub {
    font-size: 10px;
    color: rgba(255,255,255,0.42);
    margin-top: 4px;
    font-feature-settings: 'tnum';
    white-space: normal;
    max-width: 170px;
}
/* Modal rank badge (always visible) */
.modal-rank-badge {
    font-size: 10px;
    color: rgba(255,255,255,0.34);
    margin-top: 4px;
}
/* Corner detail elements — positioned in empty radar container space */
.modal-corner-detail {
    z-index: 2;
    pointer-events: none;
}
.modal-corner-line {
    font-size: 11px;
    line-height: 1.6;
    white-space: nowrap;
    color: rgba(255,255,255,0.35);
}
.modal-corner-line .font-bold {
    color: rgba(255,255,255,0.45);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.modal-header-copy {
    min-width: 0;
}

.modal-panel-title-spaced {
    margin: 0 0 6px;
}

.modal-eyebrow {
    margin: 0 0 8px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(245, 158, 11, 0.75);
    font-weight: 800;
}

.modal-title {
    margin: 0;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 2rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #f8fafc;
}

.modal-subtitle {
    margin: 10px 0 0;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.6);
}

.modal-header-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.modal-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
    gap: 16px;
    margin-top: 18px;
}

.modal-mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.1);
    color: #f8fafc;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.modal-mode-pill-muted {
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: rgba(226, 232, 240, 0.68);
}

.modal-verdict-band {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 20px 22px 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

.modal-verdict-band::before {
    content: '';
    position: absolute;
    inset: auto -32px -50px auto;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    filter: blur(12px);
    opacity: 0.8;
}

.modal-tone-elite {
    background: linear-gradient(180deg, rgba(226, 232, 240, 0.12), rgba(15, 23, 42, 0.38));
    border-color: rgba(226, 232, 240, 0.18);
}
.modal-tone-elite::before {
    background: radial-gradient(circle, rgba(226, 232, 240, 0.2), transparent 70%);
}

.modal-tone-strong {
    background: linear-gradient(180deg, rgba(103, 232, 249, 0.14), rgba(15, 23, 42, 0.38));
    border-color: rgba(103, 232, 249, 0.16);
}
.modal-tone-strong::before {
    background: radial-gradient(circle, rgba(103, 232, 249, 0.18), transparent 70%);
}

.modal-tone-steady {
    background: linear-gradient(180deg, rgba(52, 211, 153, 0.14), rgba(15, 23, 42, 0.38));
    border-color: rgba(52, 211, 153, 0.16);
}
.modal-tone-steady::before {
    background: radial-gradient(circle, rgba(52, 211, 153, 0.18), transparent 70%);
}

.modal-tone-fragile {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.38));
    border-color: rgba(245, 158, 11, 0.16);
}
.modal-tone-fragile::before {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 70%);
}

.modal-tone-critical {
    background: linear-gradient(180deg, rgba(251, 113, 133, 0.16), rgba(15, 23, 42, 0.38));
    border-color: rgba(251, 113, 133, 0.18);
}
.modal-tone-critical::before {
    background: radial-gradient(circle, rgba(251, 113, 133, 0.2), transparent 70%);
}

.modal-verdict-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.modal-verdict-score {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 4.5rem;
    line-height: 0.85;
    letter-spacing: -0.06em;
}

.modal-verdict-label {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    opacity: 0.72;
}

.modal-verdict-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.modal-verdict-stat {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.7);
    letter-spacing: -0.01em;
}

.modal-verdict-dot {
    color: rgba(226, 232, 240, 0.3);
    font-size: 14px;
}

.modal-command-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}
.modal-command-panel::before {
    display: none;
}

.modal-command-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-top: 14px;
}

.modal-command-hero-simple {
    display: flex;
    align-items: flex-start;
    margin-top: 2px;
}

.modal-command-score {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: clamp(3rem, 7vw, 4.5rem);
    line-height: 0.9;
    letter-spacing: -0.06em;
}

.modal-command-copy {
    display: grid;
    gap: 8px;
}

.modal-command-copy-strong,
.modal-command-copy-sub {
    margin: 0;
    font-size: 12px;
    line-height: 1.65;
}

.modal-command-copy-strong {
    color: #f8fafc;
    font-weight: 700;
}

.modal-command-copy-sub {
    color: rgba(226, 232, 240, 0.64);
}

.modal-command-hero-muted .modal-command-copy-strong,
.modal-command-score-muted {
    color: rgba(148, 163, 184, 0.9);
}

.modal-command-grid,
.signal-matrix-grid {
    display: grid;
    gap: 12px;
}

.modal-command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}

.modal-command-cell,
.signal-matrix-card {
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.modal-command-cell {
    padding: 14px;
    display: grid;
    gap: 5px;
}

.modal-command-label,
.signal-matrix-label,
.signal-matrix-pct {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(148, 163, 184, 0.74);
}

.modal-command-value,
.signal-matrix-value {
    font-family: 'Sora', 'Manrope', sans-serif;
    color: #f8fafc;
}

.modal-command-value {
    font-size: 1rem;
}

.modal-command-sub,
.modal-radar-note,
.signal-matrix-sub,
.signal-matrix-rank {
    font-size: 11px;
    line-height: 1.5;
    color: rgba(226, 232, 240, 0.56);
}

.modal-radar-panel {
    display: flex;
    flex-direction: column;
}

.modal-radar-shell {
    position: relative;
    min-height: 320px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.03), transparent 62%),
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}

.modal-radar-note {
    margin: 10px 0 0;
}

.signal-matrix-panel {
    margin-top: 16px;
}

.signal-matrix-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 14px;
}

.signal-matrix-card {
    padding: 14px;
    display: grid;
    gap: 8px;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    outline: none;
}

.signal-matrix-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.signal-matrix-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.signal-matrix-value {
    font-size: 1rem;
    min-height: 24px;
    line-height: 1.2;
}

.signal-matrix-bar {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
}

.signal-matrix-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    opacity: 0.92;
}

.signal-matrix-card.is-active {
    border-color: rgba(103, 232, 249, 0.32);
    background: rgba(103, 232, 249, 0.08);
    transform: translateY(-1px);
}

.signal-matrix-card.is-muted {
    opacity: 0.38;
}

.signal-matrix-inline-detail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.signal-matrix-inline-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(148, 163, 184, 0.74);
}

.signal-matrix-inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.signal-matrix-inline-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(226, 232, 240, 0.78);
    font-size: 11px;
}

.signal-matrix-inline-pill strong {
    color: #f8fafc;
    font-weight: 700;
}

.signal-matrix-inline-icon {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: block;
}

.radar-point-group {
    transition: opacity 0.18s ease;
    outline: none;
}

.radar-point-group[data-signal-key] {
    cursor: pointer;
}

.radar-point-group.is-muted {
    opacity: 0.28;
}

.radar-point-group.is-active .radar-point-dot {
    filter: drop-shadow(0 0 6px rgba(103, 232, 249, 0.42));
}

.radar-point-group.is-active .radar-point-label {
    fill: #f8fafc;
}

.radar-point-dot,
.radar-point-label {
    transition: opacity 0.18s ease, fill 0.18s ease, transform 0.18s ease;
}

.radar-point-hit:focus,
.radar-point-group:focus,
.signal-matrix-card:focus {
    outline: none;
}

.modal-insight-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
    margin-top: 18px;
}

.modal-panel {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(14, 20, 31, 0.86), rgba(9, 13, 21, 0.94));
    padding: 18px 18px 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.modal-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,0.02), transparent 24%);
    pointer-events: none;
}

.modal-panel-secondary::before {
    background:
        radial-gradient(circle at top right, rgba(103, 232, 249, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,0.02), transparent 24%);
}

.modal-panel-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.modal-panel-kicker {
    margin: 0 0 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(148, 163, 184, 0.72);
    font-weight: 800;
}

.modal-panel-title {
    margin: 0;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

.modal-panel-chip {
    position: relative;
    z-index: 1;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 10px;
    font-weight: 700;
    color: #fcd34d;
    white-space: nowrap;
}

.modal-panel-chip-muted {
    background: rgba(103, 232, 249, 0.08);
    border-color: rgba(103, 232, 249, 0.16);
    color: #a5f3fc;
}

.modal-panel-description {
    position: relative;
    z-index: 1;
    margin: 10px 0 0;
    font-size: 11px;
    line-height: 1.55;
    color: rgba(226, 232, 240, 0.58);
}

.modal-panel-empty {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(255,255,255,0.08);
    color: rgba(226, 232, 240, 0.55);
    font-size: 12px;
}

.avoidable-breakdown-list {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.avoidable-breakdown-row {
    padding: 12px 12px 10px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}

.avoidable-breakdown-top,
.avoidable-breakdown-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.avoidable-breakdown-name {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
}

.avoidable-breakdown-meta,
.avoidable-breakdown-foot {
    margin: 4px 0 0;
    font-size: 10px;
    color: rgba(226, 232, 240, 0.48);
}

.avoidable-breakdown-values {
    text-align: right;
}

.avoidable-breakdown-total {
    display: block;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
}

.avoidable-breakdown-tag {
    display: inline-flex;
    margin-top: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.avoidable-breakdown-tag.high {
    color: #fdba74;
    background: rgba(249, 115, 22, 0.14);
}

.avoidable-breakdown-tag.mid {
    color: #f8fafc;
    background: rgba(255,255,255,0.08);
}

.avoidable-breakdown-tag.low {
    color: #67e8f9;
    background: rgba(103, 232, 249, 0.12);
}

.avoidable-breakdown-tag.clean {
    color: #6ee7b7;
    background: rgba(52, 211, 153, 0.12);
}

.avoidable-breakdown-bar {
    margin-top: 10px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    overflow: hidden;
}

.avoidable-breakdown-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255,255,255,0.18), rgba(255,255,255,0.28));
}

.avoidable-breakdown-fill.high {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.65), rgba(245, 158, 11, 0.95));
}

.avoidable-breakdown-fill.mid {
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.5), rgba(226, 232, 240, 0.78));
}

.avoidable-breakdown-fill.low {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.65), rgba(103, 232, 249, 0.95));
}

.avoidable-breakdown-fill.clean {
    background: linear-gradient(90deg, rgba(52, 211, 153, 0.55), rgba(110, 231, 183, 0.9));
}

.readout-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.readout-cell {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}

.readout-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(148, 163, 184, 0.74);
    font-weight: 800;
}

.readout-value {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 1rem;
    line-height: 1.2;
    color: #f8fafc;
}

.readout-sub {
    font-size: 11px;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.54);
}

/* === RaidyCheck title branding — purple gradient in landing mode === */
#appContainer.landing-mode #mainTitle {
    background: linear-gradient(135deg, #f8fafc, #fcd34d, #fb7185);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}
/* Glow behind landing title via pseudo-element (text-shadow won't work with transparent fill) */
#appContainer.landing-mode #searchSection {
    position: relative;
}
#appContainer.landing-mode #mainTitle::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    color: #f59e0b;
    filter: blur(20px);
    opacity: 0.28;
    pointer-events: none;
    z-index: -1;
}

/* Title click — cursor pointer in results mode */
#appContainer:not(.landing-mode) #mainTitle {
    cursor: pointer;
}
#appContainer:not(.landing-mode) #mainTitle:hover {
    opacity: 0.8;
}

/* === Completion Banner === */
.completion-banner {
    background: linear-gradient(180deg, rgba(13, 18, 28, 0.82), rgba(9, 13, 21, 0.94));
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: 20px;
    padding: 14px 16px;
    animation: banner-slide-in 0.4s ease;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.22);
}

.completion-banner-grid,
.completion-strip {
    display: grid;
    grid-template-columns: minmax(0, 700px) auto;
    gap: 12px;
    align-items: start;
}

.completion-summary {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.42));
    border: 1px solid rgba(245, 158, 11, 0.16);
}

.completion-summary-stack {
    display: grid;
    min-width: 0;
}

.completion-summary-rail {
    display: grid;
    grid-template-columns: max-content minmax(320px, 1fr);
    grid-template-areas: "controls summary";
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.completion-summary::before {
    content: '';
    position: absolute;
    inset: auto -30px -40px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2), transparent 68%);
    filter: blur(10px);
}

.completion-summary {
    grid-area: summary;
    width: 100%;
    max-width: none;
    min-width: 0;
    justify-self: start;
}

.completion-summary-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.completion-eyebrow {
    margin: 0;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    line-height: 1.1;
    color: rgba(252, 211, 77, 0.88);
}

.completion-title-stack,
.completion-value-stack {
    position: relative;
    z-index: 1;
}

.completion-title-stack {
    display: grid;
    gap: 2px;
    align-content: center;
    min-width: 68px;
}

.completion-eyebrow-bottom {
    color: rgba(252, 211, 77, 0.72);
}

.completion-value-stack {
    display: grid;
    justify-items: start;
    gap: 4px;
    min-width: 0;
}

.completion-minutes {
    margin: 0;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: clamp(1.7rem, 2.8vw, 2.35rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: #f8fafc;
    text-align: left;
    white-space: nowrap;
}

.completion-copy {
    margin: 0;
    max-width: 18ch;
    font-size: 10px;
    line-height: 1.35;
    color: rgba(226, 232, 240, 0.62);
    text-align: left;
}

.completion-metric-grid,
.completion-chip-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(96px, 118px)) minmax(180px, 220px);
    gap: 10px;
    justify-content: end;
}

.completion-controls-slot {
    grid-area: controls;
    min-height: 0;
    align-self: start;
    min-width: 0;
    justify-self: start;
}

.completion-controls-slot #radarControls {
    width: fit-content;
    max-width: 100%;
    align-items: flex-start;
    gap: 8px;
}

.completion-controls-slot #radarControls > div,
.completion-controls-slot #specSelector {
    justify-content: flex-start;
}

.completion-controls-slot .comparison-toggle,
.completion-controls-slot #specButtons {
    width: fit-content;
    max-width: 100%;
}


.completion-chip,
.completion-chip-checks {
    min-width: 0;
}

.completion-chip {
    padding: 10px 12px 9px;
}

.completion-chip-checks {
    padding: 10px 12px;
}

.completion-chip-value,
.completion-chip-sub {
    overflow-wrap: anywhere;
}

.completion-chip:not(.completion-chip-checks) .completion-chip-value {
    font-size: 0.9rem;
}

.completion-metric-card {
    padding: 12px 12px 10px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.completion-metric-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(148, 163, 184, 0.72);
}

.completion-metric-value {
    display: block;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 0.95rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

.completion-metric-sub {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.54);
}

.completion-chip {
    padding: 12px 12px 10px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.completion-chip-label {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(148, 163, 184, 0.72);
}

.completion-chip-value {
    display: block;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #f8fafc;
}

.completion-chip-checks {
    background: rgba(255,255,255,0.04);
}

.completion-chip-value-wrap {
    font-size: 0.92rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.completion-chip-sub {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.35;
    color: rgba(226, 232, 240, 0.54);
}
@keyframes banner-slide-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Comeback link reveal animation === */
.comeback-reveal {
    animation: comeback-fade-in 0.5s ease;
}
@keyframes comeback-fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* === Responsive: Tablet (<=1200px) === */
@media (max-width: 1200px) {
    .boss-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .not-pulled-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1320px) {
    .completion-banner-grid,
    .completion-strip {
        grid-template-columns: 1fr;
    }

    .completion-chip-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* === Responsive: Mobile (<=768px) === */
@media (max-width: 768px) {
    /* Boss grid — single column */
    .boss-grid {
        grid-template-columns: 1fr;
    }
    .not-pulled-grid,
    .completion-chip-row {
        grid-template-columns: 1fr;
    }
    .radar-tile {
        min-height: 320px;
    }
    .tile-loading-grid,
    .tile-metric-grid,
    .modal-summary-grid,
    .signal-matrix-grid,
    .modal-command-grid {
        grid-template-columns: 1fr;
    }
    .tile-insight-row {
        display: grid;
        grid-template-columns: 1fr;
    }
    .tile-header,
    .tile-loading-header,
    .tile-loading-body {
        flex-direction: column;
    }
    .tile-header-right,
    .tile-context-stack {
        justify-items: start;
        max-width: 100%;
    }
    .not-pulled-header,
    .completion-summary-row {
        grid-template-columns: 1fr;
        display: grid;
    }
    .completion-summary-rail {
        grid-template-columns: 1fr;
        grid-template-areas:
            "summary"
            "controls";
    }
    .completion-summary {
        width: 100%;
    }
    .completion-strip,
    .completion-chip-row {
        grid-template-columns: 1fr;
    }
    .completion-value-stack {
        justify-items: start;
    }
    .completion-minutes,
    .completion-copy {
        text-align: left;
    }
    .completion-controls-slot #radarControls {
        align-items: flex-start;
    }
    .completion-controls-slot .comparison-toggle,
    .completion-controls-slot #specButtons {
        width: 100%;
    }
    .completion-controls-slot .comparison-toggle {
        justify-content: space-between;
    }
    .completion-controls-slot .toggle-btn {
        flex: 1;
        text-align: center;
    }
    .not-pulled-header {
        align-items: start;
    }

    /* Search bar — stack inputs */
    .search-bar .flex {
        flex-wrap: wrap;
        gap: 8px;
    }
    .search-bar .search-inputs {
        order: 2;
        width: 100%;
    }
    .search-bar .search-inputs input,
    .search-bar .search-inputs select {
        flex: 1;
        min-width: 0;
    }
    .search-bar #mainTitle {
        order: 1;
    }
    .search-bar .shrink-0.text-right {
        order: 3;
        width: 100%;
        text-align: center;
    }

    /* Landing mode — tighter padding */
    #appContainer.landing-mode #searchSection {
        max-width: 100%;
        padding: 0 8px;
    }
    #appContainer.landing-mode .search-bar {
        padding: 1rem;
    }
    #appContainer.landing-mode #mainTitle {
        font-size: 1.4rem;
    }

    /* Loading dashboard — single column phases */
    #loadingPhases {
        grid-template-columns: 1fr;
    }
    .live-stats-bar {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    .live-stats-bar .text-gray-700 {
        display: none; /* hide pipe separators on mobile */
    }

    .completion-banner-grid,
    .completion-strip,
    .completion-metric-grid {
        grid-template-columns: 1fr;
    }

    /* Modal — full screen */
    #bossModalContent {
        padding: 0;
        max-width: 100%;
    }
    #modalBody {
        border-radius: 0;
        max-height: 100vh;
        padding: 16px;
    }
    .modal-nav-btn {
        display: none;
    }

    .modal-header {
        flex-direction: column;
    }

    .modal-header-pills {
        justify-content: flex-start;
    }

    .modal-insight-grid,
    .readout-grid {
        grid-template-columns: 1fr;
    }
    .modal-command-hero {
        grid-template-columns: 1fr;
    }
    .modal-verdict-score {
        font-size: 3.5rem;
    }
    .modal-verdict-label {
        font-size: 1rem;
    }
    .modal-verdict-stats {
        gap: 6px;
    }
    .modal-verdict-stat {
        font-size: 11px;
    }
    .modal-radar-shell {
        min-height: 240px;
    }

    /* RTR — hide less important columns */
    .rtr-col-hs, .rtr-col-pot {
        display: none;
    }
}

/* === Responsive: Small mobile (<=480px) === */
@media (max-width: 480px) {
    #appContainer {
        padding-left: 12px;
        padding-right: 12px;
    }
    .radar-tile {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 1200px) {
    .briefing-hero-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .executive-briefing-shell {
        padding-top: 0.5rem;
    }

    .briefing-frame {
        padding: 18px;
        border-radius: 24px;
    }

    .briefing-topline,
    .briefing-section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .briefing-hero-panel,
    .briefing-feed-grid,
    .briefing-metric-grid {
        grid-template-columns: 1fr;
    }

    .briefing-hero-panel {
        padding: 18px;
        min-height: 0;
    }

    .briefing-char-name {
        font-size: clamp(1.9rem, 11vw, 2.7rem);
    }
}

@media (max-width: 480px) {
    .briefing-frame {
        padding: 16px;
    }

    .briefing-status-pill {
        width: 100%;
        justify-content: center;
    }

    .phase-card,
    .briefing-log-card,
    .queue-card,
    .comeback-card {
        border-radius: 18px;
    }

    .comeback-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
