:root {
    --bg: #0b0a16;
    --bg-panel: rgba(17, 15, 35, 0.88);
    --bg-panel-strong: rgba(22, 18, 44, 0.96);
    --bg-soft: rgba(255, 255, 255, 0.04);
    --line: rgba(139, 90, 255, 0.18);
    --line-strong: rgba(240, 141, 84, 0.34);
    --ink: #f7f2ec;
    --muted: #b3a7bf;
    --muted-strong: #d8d0df;
    --purple: #8c5cf6;
    --purple-soft: rgba(140, 92, 246, 0.18);
    --orange: #f08d54;
    --orange-soft: rgba(240, 141, 84, 0.16);
    --success: #68d38b;
    --danger: #ef6a6a;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(140, 92, 246, 0.16), transparent 26%),
        radial-gradient(circle at top right, rgba(240, 141, 84, 0.14), transparent 24%),
        linear-gradient(135deg, #090813 0%, #120f24 54%, #0a0915 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.experience-shell {
    width: min(1840px, calc(100vw - 20px));
    margin: 10px auto;
    min-height: calc(100vh - 20px);
    display: grid;
    grid-template-columns: 254px minmax(0, 1fr);
    gap: 18px;
    transition: grid-template-columns 180ms ease;
}

.experience-shell.nav-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
}

.nav-rail,
.workspace-card,
.hero-card {
    border: 1px solid var(--line);
    background: var(--bg-panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.nav-rail {
    position: relative;
    border-radius: 24px;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: padding 180ms ease;
}

.nav-toggle {
    position: absolute;
    top: 18px;
    right: -14px;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(240,141,84,0.34);
    background: #19152b;
    color: #fff0e6;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.36);
}

.mobile-nav-toggle,
.nav-mobile-backdrop {
    display: none;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 4px 10px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(240, 141, 84, 0.45);
    color: var(--orange);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: inset 0 0 0 2px rgba(140, 92, 246, 0.22);
}

.brand-copy strong {
    display: block;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.brand-copy span {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-section-title {
    color: rgba(255,255,255,0.48);
    font-size: 0.73rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 6px 8px 2px;
}

.nav-item,
.nav-subitem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 14px;
    color: var(--muted-strong);
    transition: 140ms ease;
}

.nav-item:hover,
.nav-subitem:hover {
    background: rgba(255,255,255,0.04);
}

.nav-item.active,
.nav-subitem.active {
    background: linear-gradient(180deg, rgba(140, 92, 246, 0.24), rgba(140, 92, 246, 0.12));
    border: 1px solid rgba(140, 92, 246, 0.26);
    color: var(--ink);
}

.nav-item i,
.nav-subitem i {
    width: 16px;
    text-align: center;
    color: rgba(255,255,255,0.78);
}

.nav-stack {
    display: grid;
    gap: 6px;
}

.nav-substack {
    display: grid;
    gap: 4px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid rgba(255,255,255,0.08);
}

.pill-tag {
    margin-left: auto;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(140, 92, 246, 0.22);
    color: #dfd2ff;
}

.nav-footer {
    display: none;
}

.experience-shell.nav-collapsed .nav-rail {
    padding: 18px 10px;
    gap: 14px;
}

.experience-shell.nav-collapsed .brand-lockup {
    justify-content: center;
    padding: 2px 0 10px;
}

.experience-shell.nav-collapsed .brand-copy,
.experience-shell.nav-collapsed .nav-section-title,
.experience-shell.nav-collapsed .nav-item span,
.experience-shell.nav-collapsed .nav-subitem span,
.experience-shell.nav-collapsed .pill-tag {
    display: none;
}

.experience-shell.nav-collapsed .nav-item,
.experience-shell.nav-collapsed .nav-subitem {
    justify-content: center;
    padding: 12px 8px;
}

.experience-shell.nav-collapsed .nav-item i,
.experience-shell.nav-collapsed .nav-subitem i {
    width: auto;
    font-size: 1rem;
}

.experience-shell.nav-collapsed .nav-substack {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.52fr) minmax(310px, 0.48fr);
    gap: 18px;
    align-items: start;
}

.workspace.hero-collapsed {
    grid-template-columns: minmax(0, 1fr);
}

.workspace.hero-collapsed .hero-card {
    display: none;
}

.workspace-card,
.hero-card {
    border-radius: 28px;
    overflow: hidden;
}

.workspace-card {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.assistant-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 2px 4px 0;
}

.assistant-header-main {
    min-width: 0;
}

.assistant-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding-top: 2px;
}

.assistant-info-trigger { gap: 7px; }
.assistant-info-trigger i { font-size: 0.94rem; }
.assistant-info-modal[hidden] { display: none; }
.assistant-info-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(4, 3, 11, 0.76);
    backdrop-filter: blur(10px);
}
.assistant-info-dialog {
    width: min(620px, 100%);
    overflow: hidden;
    border: 1px solid rgba(240, 141, 84, 0.42);
    border-radius: 22px;
    background: linear-gradient(145deg, #1d1831, #100e20);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
}
.assistant-info-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.assistant-info-head .section-kicker { margin: 0 0 5px; }
.assistant-info-head h2 { margin: 0; color: var(--ink); font-size: 1.32rem; line-height: 1.1; }
.assistant-info-close {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(240, 141, 84, 0.45);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--ink);
    cursor: pointer;
}
.assistant-info-body { display: grid; gap: 12px; padding: 18px 20px 20px; }
.assistant-info-body p {
    margin: 0;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted-strong);
    font-size: 0.88rem;
    line-height: 1.42;
}
.assistant-info-body p strong { color: var(--ink); }
.assistant-info-label {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.assistant-header h1 {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1;
    letter-spacing: -0.03em;
}

.assistant-subtitle {
    color: var(--muted);
    margin-top: 4px;
    font-size: 0.92rem;
    line-height: 1.3;
}

.assistant-explainer {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--muted-strong);
    line-height: 1.35;
    font-size: 0.86rem;
}

.assistant-explainer strong {
    color: var(--ink);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d8c6ff;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.chat-card {
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
    border: 1px solid rgba(140, 92, 246, 0.22);
    overflow: hidden;
}

.chat-line {
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.chat-line.user {
    background: linear-gradient(180deg, rgba(140,92,246,0.18), rgba(140,92,246,0.10));
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.chat-role {
    color: #d3c6ff;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 0.92rem;
}

.chat-copy {
    font-size: 0.92rem;
    line-height: 1.32;
    color: var(--ink);
}

.chat-time {
    color: rgba(255,255,255,0.50);
    font-size: 0.86rem;
    white-space: nowrap;
}

.strategy-card {
    padding: 14px;
}

.strategy-grid {
    --routing-panel-height: clamp(320px, 44vh, 540px);
    display: grid;
    grid-template-columns: minmax(260px, 0.76fr) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    min-width: 0;
}

.market-column { min-width: 0; }

.map-column {
    display: grid;
    gap: 8px;
    align-content: start;
    min-width: 0;
}

.section-kicker {
    color: var(--orange);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.market-results-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    height: 100%;
    min-height: 0;
}

.market-panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 4px;
    min-width: 0;
}

.market-panel-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 8px;
    min-width: 0;
    width: 100%;
}

.market-total {
    border: 1px solid rgba(240, 141, 84, 0.32);
    border-radius: 999px;
    background: rgba(240, 141, 84, 0.08);
    color: #f7d2bd;
    font-size: 0.64rem;
    font-weight: 750;
    letter-spacing: 0.01em;
    padding: 4px 7px;
    line-height: 1.25;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.market-panel-header .section-kicker {
    margin-bottom: 0;
}

.market-list-note {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
}

.market-view-select {
    appearance: none;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: var(--ink);
    padding: 7px 10px;
    font-size: 0.74rem;
    min-width: 140px;
}

.market-list-shell {
    height: var(--routing-panel-height);
    min-height: 0;
    max-height: none;
    min-width: 0;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    overflow: hidden;
    isolation: isolate;
}

.market-list {
    display: grid;
    gap: 6px;
    align-content: start;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    box-sizing: border-box;
    padding: 8px;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #ef8a50 rgba(255,255,255,0.045);
}

/* Keep every routing workspace scroller visually consistent and out of the content flow. */
.market-list,
.locator-suggestions,
.market-plan-body,
.approval-list-output,
.venue-tier-list,
.hero-image-wrap,
.venue-activity-dialog {
    scrollbar-width: thin;
    scrollbar-color: #ef8a50 rgba(255,255,255,0.045);
}

.market-list::-webkit-scrollbar,
.locator-suggestions::-webkit-scrollbar,
.market-plan-body::-webkit-scrollbar,
.approval-list-output::-webkit-scrollbar,
.venue-tier-list::-webkit-scrollbar,
.hero-image-wrap::-webkit-scrollbar,
.venue-activity-dialog::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 12px;
    height: 10px;
}

.market-list::-webkit-scrollbar-track,
.locator-suggestions::-webkit-scrollbar-track,
.market-plan-body::-webkit-scrollbar-track,
.approval-list-output::-webkit-scrollbar-track,
.venue-tier-list::-webkit-scrollbar-track,
.hero-image-wrap::-webkit-scrollbar-track,
.venue-activity-dialog::-webkit-scrollbar-track {
    margin: 6px 2px;
    border: 2px solid rgba(17,14,31,0.96);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(4,3,12,0.86));
    box-shadow: inset 0 0 0 1px rgba(240,141,84,0.12);
}

.market-list::-webkit-scrollbar-thumb,
.locator-suggestions::-webkit-scrollbar-thumb,
.market-plan-body::-webkit-scrollbar-thumb,
.approval-list-output::-webkit-scrollbar-thumb,
.venue-tier-list::-webkit-scrollbar-thumb,
.hero-image-wrap::-webkit-scrollbar-thumb,
.venue-activity-dialog::-webkit-scrollbar-thumb {
    min-height: 42px;
    border: 2px solid rgba(17,14,31,0.96);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffb06b 0%, #ef8a50 48%, #b6532d 100%);
    box-shadow: 0 0 10px rgba(240,141,84,0.40);
}

.market-list::-webkit-scrollbar-thumb:hover,
.locator-suggestions::-webkit-scrollbar-thumb:hover,
.market-plan-body::-webkit-scrollbar-thumb:hover,
.approval-list-output::-webkit-scrollbar-thumb:hover,
.venue-tier-list::-webkit-scrollbar-thumb:hover,
.hero-image-wrap::-webkit-scrollbar-thumb:hover,
.venue-activity-dialog::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffd09a 0%, #ff985b 48%, #d96635 100%);
    box-shadow: 0 0 14px rgba(255,164,93,0.68);
}

.market-list-note {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 650;
    white-space: nowrap;
}

.booking-lead-list {
    gap: 5px;
}

.booking-lead {
    min-height: 58px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    overflow: hidden;
}

.booking-lead:hover,
.booking-lead.active {
    border-color: rgba(240,141,84,0.55);
    background: rgba(240,141,84,0.075);
}

.booking-lead-select {
    width: 100%;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 16px;
    gap: 9px;
    align-items: center;
    padding: 8px 10px;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.booking-lead-rank {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    color: #1b1421;
    font-size: 0.76rem;
    font-weight: 850;
    background: linear-gradient(135deg, #ffab70, #ee7842);
}

.booking-lead-content {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.booking-lead-title {
    color: #fff8f1;
    font-size: 0.81rem;
    line-height: 1.18;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.booking-lead-meta,
.booking-lead-location,
.booking-lead-contact {
    font-size: 0.67rem;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.booking-lead-meta,
.booking-lead-location { color: var(--muted); }
.booking-lead-contact { color: #f3d8c6; }
.booking-lead-arrow { align-self: center; color: #ef935b; font-size: 0.72rem; }

.booking-lead-location,
.booking-lead-contact {
    display: none;
}

.market-quick-venues { margin-top: 16px; }
.market-quick-venues h4 { margin: 0 0 8px; font-size: 0.78rem; }
.market-quick-venue {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 9px;
    color: var(--muted);
    font-size: 0.72rem;
}
.market-quick-venue + .market-quick-venue { margin-top: 6px; }
.market-quick-venue strong { color: #fff8f1; font-size: 0.78rem; }
.market-quick-venue span:last-child { color: #f3d8c6; }

@media (max-width: 760px) {
    .market-list-note {
        text-align: right;
        white-space: normal;
    }

    .booking-lead-location,
    .booking-lead-contact {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }
}

.market-list.view-tiled {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    align-content: start;
}

.market-list.view-simple {
    gap: 5px;
}

.market-item {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    gap: 10px;
    align-items: start;
    padding: 8px 10px;
    border-radius: 12px;
    transition: 140ms ease;
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.06);
}

.market-item:hover {
    background: rgba(255,255,255,0.03);
}

.market-item.active .market-rank {
    background: linear-gradient(180deg, var(--orange), #dc7643);
    color: #1c120c;
    box-shadow: 0 10px 22px rgba(240, 141, 84, 0.28);
}

.market-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--orange-soft);
    color: #ffcdac;
    font-weight: 800;
    margin-top: 2px;
    font-size: 0.76rem;
}

.market-name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.market-classification {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 4px;
}

.market-class-pill {
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #e8dff2;
    font-size: 0.58rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
}

.market-summary {
    color: #d6cedf;
    font-size: 0.75rem;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.market-item-main {
    min-width: 0;
    cursor: pointer;
}

.market-item.simple {
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
}

.market-item.simple .market-rank {
    display: none;
}

.market-item.simple .market-name {
    margin-bottom: 0;
    font-size: 0.84rem;
}

.market-item.simple .market-summary {
    -webkit-line-clamp: 1;
    font-size: 0.7rem;
    margin-top: 3px;
}

.market-simple-metric {
    text-align: right;
    min-width: 54px;
}

.market-simple-metric strong {
    display: block;
    font-size: 0.96rem;
    line-height: 1;
}

.market-simple-metric span {
    display: block;
    margin-top: 4px;
    color: #d3cbdd;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.market-item-actions {
    display: none;
}

.market-card-tile {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.025);
    cursor: pointer;
    transition: 140ms ease;
    min-width: 0;
    color: var(--ink);
    text-align: left;
}

.market-card-tile:hover,
.market-card-tile.active {
    border-color: rgba(240, 141, 84, 0.36);
    background: linear-gradient(180deg, rgba(240,141,84,0.10), rgba(255,255,255,0.03));
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.20);
}

.market-card-tile-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: start;
}

.market-card-tile-select {
    appearance: none;
    display: grid;
    gap: 10px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.market-card-tile-title {
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
}

.market-card-tile-copy {
    color: #d6cedf;
    font-size: 0.69rem;
    line-height: 1.25;
}

.market-card-tile-score {
    text-align: right;
    min-width: 44px;
}

.market-card-tile-score strong {
    display: block;
    font-size: 1rem;
    line-height: 1;
}

.market-card-tile-score span {
    color: #d3cbdd;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.market-card-tile-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.market-card-tile-metric {
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    padding: 8px 6px;
    text-align: center;
}

.market-card-tile-metric strong {
    display: block;
    font-size: 0.86rem;
}

.market-card-tile-metric span {
    display: block;
    margin-top: 3px;
    color: #d7cfdf;
    font-size: 0.58rem;
    line-height: 1.2;
}

.market-card-tile-venues {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(240, 141, 84, 0.28);
    background: rgba(240, 141, 84, 0.08);
    color: #fff3ea;
    font-size: 0.7rem;
    font-weight: 750;
    cursor: pointer;
}

.market-card-tile-venues:hover {
    border-color: rgba(240, 141, 84, 0.52);
    background: rgba(240, 141, 84, 0.15);
}

.map-frame {
    position: relative;
    min-height: 0;
    height: var(--routing-panel-height);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: #12101f;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.map-plan-action {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 900;
    box-shadow: 0 12px 28px rgba(0,0,0,0.42);
    backdrop-filter: blur(12px);
}

.map-search-here {
    position: absolute;
    top: 12px;
    left: 50%;
    z-index: 950;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
    padding: 11px 18px;
    border: 1px solid rgba(255, 186, 139, 0.78);
    border-radius: 999px;
    background: linear-gradient(135deg, #f59a61, #e77942);
    color: #160d0a;
    box-shadow: 0 14px 34px rgba(0,0,0,0.46), 0 0 24px rgba(240,141,84,0.24);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 850;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.map-search-here[hidden] {
    display: none;
}

.map-search-here:hover {
    transform: translateX(-50%) translateY(-1px);
    box-shadow: 0 17px 38px rgba(0,0,0,0.52), 0 0 30px rgba(240,141,84,0.34);
}

.map-popout-action {
    position: absolute;
    top: 12px;
    right: 144px;
    z-index: 940;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(240,141,84,0.38);
    background:
        radial-gradient(circle at 30% 20%, rgba(240,141,84,0.22), transparent 42%),
        rgba(11,10,22,0.88);
    color: #fff3ea;
    box-shadow: 0 14px 34px rgba(0,0,0,0.42);
    backdrop-filter: blur(14px);
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.map-popout-action:hover {
    transform: translateY(-1px);
    border-color: rgba(240,141,84,0.70);
    background:
        radial-gradient(circle at 30% 20%, rgba(240,141,84,0.34), transparent 46%),
        rgba(22,17,36,0.94);
}

.map-frame.is-popout {
    position: fixed;
    inset: 22px;
    z-index: 9000;
    height: calc(100vh - 44px);
    min-height: 0;
    border-radius: 24px;
    border-color: rgba(240,141,84,0.48);
    box-shadow: 0 30px 120px rgba(0,0,0,0.78), 0 0 0 9999px rgba(5,4,12,0.76);
}

.map-frame.is-popout .map-canvas {
    min-height: 0;
    height: 100%;
}

.map-frame.is-popout .map-popout-action {
    right: 144px;
    border-color: rgba(255,248,239,0.42);
    background: rgba(11,10,22,0.92);
}

.map-zone-toolbar {
    position: absolute;
    top: 86px;
    right: 12px;
    z-index: 900;
    display: grid;
    gap: 6px;
    padding: 8px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(11, 10, 22, 0.90);
    box-shadow: 0 14px 34px rgba(0,0,0,0.44);
    backdrop-filter: blur(14px);
}

.map-zone-toolbar-title {
    color: #ffad78;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
}

.map-zone-tool {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: #fff3ea;
    padding: 6px 9px;
    font-size: 0.66rem;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.map-zone-tool:hover,
.map-zone-tool.is-active {
    border-color: rgba(240, 141, 84, 0.62);
    background: rgba(240, 141, 84, 0.18);
    transform: translateY(-1px);
}

.map-zone-tool.clear-zone {
    color: #d9d2e5;
    background: rgba(255,255,255,0.035);
}

.map-zone-instructions {
    position: absolute;
    top: 12px;
    left: 50%;
    z-index: 901;
    transform: translateX(-50%);
    max-width: min(420px, calc(100% - 180px));
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(240, 141, 84, 0.38);
    background: rgba(11, 10, 22, 0.90);
    color: #fff3ea;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 14px 34px rgba(0,0,0,0.38);
}

.map-zone-instructions[hidden] {
    display: none;
}

.map-zone-drag-handle {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 2px solid #fff8ef;
    background:
        radial-gradient(circle at 50% 50%, #fff8ef 0 3px, transparent 4px),
        linear-gradient(90deg, transparent 0 13px, rgba(11,10,22,0.62) 13px 17px, transparent 17px),
        linear-gradient(0deg, transparent 0 13px, rgba(11,10,22,0.62) 13px 17px, transparent 17px),
        radial-gradient(circle at 35% 28%, #ffcfaa, #f08d54 62%, #8c3f2b);
    box-shadow: 0 0 0 8px rgba(240,141,84,0.18), 0 0 28px rgba(240,141,84,0.72), 0 10px 26px rgba(0,0,0,0.52);
    cursor: grab;
}

.map-zone-drag-handle:active {
    cursor: grabbing;
}

.map-zone-resize-handle {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2px solid #fff8ef;
    background:
        radial-gradient(circle at 50% 50%, #fff8ef 0 2px, transparent 3px),
        radial-gradient(circle at 35% 30%, #fbd7bd, #38bdf8 58%, #1d4ed8);
    box-shadow: 0 0 0 7px rgba(56,189,248,0.18), 0 0 24px rgba(56,189,248,0.70), 0 10px 24px rgba(0,0,0,0.48);
    cursor: ew-resize;
}

.map-zone-resize-handle:active {
    cursor: grabbing;
}

.map-canvas {
    width: 100%;
    height: 100%;
    min-height: 260px;
}

.workspace.hero-collapsed .map-frame {
    height: clamp(420px, 64vh, 760px);
}

.workspace.hero-collapsed .strategy-grid {
    --routing-panel-height: clamp(420px, 64vh, 760px);
}

.leaflet-control-layers {
    border: 1px solid rgba(255,255,255,0.10) !important;
    background: rgba(11, 10, 22, 0.92) !important;
    color: var(--ink);
    border-radius: 14px !important;
    box-shadow: 0 18px 40px rgba(0,0,0,0.34) !important;
    backdrop-filter: blur(16px);
}

.leaflet-control-layers-expanded {
    padding: 12px 14px !important;
}

.leaflet-control-layers-base label,
.leaflet-control-layers-overlays label {
    color: var(--ink);
    font-size: 0.82rem;
}

.leaflet-control-layers-toggle {
    background-color: rgba(11, 10, 22, 0.94);
    border-radius: 12px;
}

.map-support {
    display: grid;
    gap: 6px;
    margin: 0;
    min-width: 0;
    order: -1;
}

.map-signal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.map-helper {
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.18;
    min-width: 0;
}

.active-scope {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted-strong);
    font-size: 0.82rem;
}

.active-scope-label {
    display: none;
}

.active-scope-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(240, 141, 84, 0.10);
    border: 1px solid rgba(240, 141, 84, 0.28);
    color: #fff1e6;
    font-weight: 600;
    font-size: 0.74rem;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.map-filter-menus {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.map-filter-menu {
    flex: 1 1 230px;
    min-width: 0;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 11px;
    background: rgba(255,255,255,0.025);
    overflow: hidden;
}

.map-filter-menu summary {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: #fff7f0;
    font-size: 0.72rem;
    font-weight: 750;
    list-style: none;
    padding: 8px 10px;
}

.map-filter-menu summary::-webkit-details-marker { display: none; }
.map-filter-menu summary::after {
    content: '+';
    color: #f08d54;
    font-size: 1rem;
    font-weight: 500;
    margin-left: auto;
}
.map-filter-menu[open] summary::after { content: '−'; }

.map-filter-menu-body {
    display: grid;
    gap: 7px;
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 8px 10px 10px;
}

.map-filter-group-label {
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footprint-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.footprint-stat {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.08);
}

button.footprint-stat {
    appearance: none;
    width: auto;
    text-align: left;
    color: var(--ink);
    cursor: pointer;
    transition: 140ms ease;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

button.footprint-stat:hover {
    border-color: rgba(240, 141, 84, 0.32);
    background: rgba(240, 141, 84, 0.08);
    transform: translateY(-1px);
}

button.footprint-stat.is-active {
    border-color: rgba(240, 141, 84, 0.42);
    background: linear-gradient(180deg, rgba(240,141,84,0.16), rgba(255,255,255,0.03));
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.footprint-stat strong {
    display: inline;
    font-size: 0.84rem;
    letter-spacing: -0.04em;
}

.footprint-stat span {
    display: inline;
    margin-top: 0;
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.2;
}

.search-tools {
    display: grid;
    gap: 5px;
}

.footprint-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.search-caption {
    display: none;
}

.legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--muted-strong);
    font-size: 0.7rem;
    line-height: 1.1;
}

button.legend-pill {
    cursor: pointer;
    transition: 140ms ease;
}

button.legend-pill:hover {
    border-color: rgba(240, 141, 84, 0.32);
    color: var(--ink);
}

button.legend-pill.is-active {
    border-color: rgba(240, 141, 84, 0.40);
    background: rgba(240, 141, 84, 0.10);
    color: #fff1e6;
}

button.legend-pill.is-inactive {
    opacity: 0.48;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 10px;
}

.venue-type-icon {
    width: 12px;
    color: #f7b083;
    font-size: 0.7rem;
    text-align: center;
}

button.legend-pill.is-active .venue-type-icon {
    color: #fff1e6;
}

button.legend-pill.is-inactive .venue-type-icon {
    color: var(--muted);
}

.legend-dot.ring {
    width: 12px;
    height: 12px;
    border: 2px solid #fff2e8;
    background: #f08d54;
    box-shadow: 0 0 0 6px rgba(240, 141, 84, 0.18);
}

.legend-dot.history {
    width: 10px;
    height: 10px;
    background: #d7d1df;
    border: 1px solid rgba(255,255,255,0.8);
}

.legend-dot.selection {
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border: 2px solid #ffffff;
}

.market-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 12px;
}

.market-tile {
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    padding: 14px;
    cursor: pointer;
    transition: 140ms ease;
    min-width: 0;
    color: #f7f2ec;
}

.market-tile:hover,
.market-tile.active {
    border-color: rgba(240, 141, 84, 0.36);
    background: linear-gradient(180deg, rgba(240,141,84,0.12), rgba(255,255,255,0.03));
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.market-tile-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: start;
}

.market-tile-title {
    font-weight: 700;
    font-size: 0.94rem;
    line-height: 1.3;
}

.market-tile-fit {
    color: #ffb582;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 4px;
}

.market-tile-subcopy {
    color: #d9d0e4;
    font-size: 0.74rem;
    line-height: 1.35;
    margin-top: 6px;
}

.market-tile-score {
    min-width: 50px;
    text-align: right;
}

.market-tile-score strong {
    display: block;
    font-size: 1.1rem;
    letter-spacing: -0.04em;
}

.market-tile-score span {
    color: #d3cbdd;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.market-tile-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.market-tile-metric {
    padding: 10px 8px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}

.market-tile-metric strong {
    display: block;
    font-size: 0.94rem;
}

.market-tile-metric span {
    display: block;
    margin-top: 4px;
    color: #d7cfdf;
    font-size: 0.68rem;
    line-height: 1.25;
}

.assistant-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-wrap: wrap;
}

.assistant-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.map-utility-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.next-step {
    min-width: 0;
}

.next-step strong {
    display: block;
    color: var(--orange);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.next-step span {
    color: var(--muted-strong);
    line-height: 1.25;
    font-size: 0.82rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    border: 1px solid transparent;
    padding: 9px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 140ms ease;
    font-size: 0.86rem;
}

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

.btn-primary {
    background: linear-gradient(180deg, var(--orange), #dd7b49);
    color: #1a120c;
}

.btn-secondary {
    background: transparent;
    border-color: rgba(240, 141, 84, 0.38);
    color: var(--ink);
}

.btn-ghost {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.08);
    color: var(--muted-strong);
}

.prompt-card {
    position: relative;
    display: grid;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.02);
}

/* Keep typeahead options above Leaflet's panes and controls when the list extends
   into the routing grid. :focus-within limits the elevated stacking context to
   the active composer. */
.prompt-card:focus-within {
    z-index: 1200;
}

.strategy-card > .prompt-card {
    margin: 0 0 10px;
}

.prompt-bar {
    display: grid;
    grid-template-columns: minmax(176px, auto) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.prompt-scope {
    align-self: center;
    width: 100%;
    min-height: 54px;
    max-width: 260px;
    padding: 0 42px 0 17px;
    color: #fff4ea;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 850;
    letter-spacing: 0.01em;
    border: 1px solid rgba(240, 141, 84, 0.64);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(64, 42, 67, 0.98), rgba(30, 22, 47, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 24px rgba(8,5,20,0.24);
    cursor: pointer;
}

.prompt-scope:focus-visible {
    outline: 2px solid #f08d54;
    outline-offset: 2px;
}

.prompt-scope option {
    color: #181228;
    background: #fffaf6;
}

.prompt-input-shell {
    position: relative;
    min-width: 0;
    filter: drop-shadow(0 10px 22px rgba(8, 5, 20, 0.24));
}

.prompt-input-column {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.prompt-perimeter {
    display: inline-flex;
    align-items: center;
    justify-self: auto;
    gap: 8px;
    color: rgba(238, 226, 245, 0.76);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.025em;
}

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

.prompt-radius-controls[hidden] {
    display: none;
}

.prompt-radius-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.prompt-radius-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.prompt-radius-toggle-track {
    position: relative;
    pointer-events: none;
    width: 34px;
    height: 19px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    transition: 150ms ease;
}

.prompt-radius-toggle-track::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255,255,255,0.72);
    content: '';
    transition: 150ms ease;
}

.prompt-radius-toggle input:checked + .prompt-radius-toggle-track {
    border-color: rgba(255, 174, 124, 0.82);
    background: rgba(240, 141, 84, 0.34);
}

.prompt-radius-toggle input:checked + .prompt-radius-toggle-track::after {
    transform: translateX(15px);
    background: #fff5ed;
}

.prompt-radius-toggle input:focus-visible + .prompt-radius-toggle-track {
    box-shadow: 0 0 0 3px rgba(240, 141, 84, 0.16);
}

.prompt-custom-radius {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(238, 226, 245, 0.76);
}

.prompt-custom-radius[hidden] {
    display: none;
}

.prompt-custom-radius input {
    width: 92px;
    min-height: 32px;
    padding: 0 9px;
    color: #fff8f2;
    font: inherit;
    font-weight: 800;
    border: 1px solid rgba(240, 141, 84, 0.48);
    border-radius: 10px;
    background: rgba(31, 23, 50, 0.96);
}

.prompt-custom-radius input:focus-visible {
    border-color: #ff9a62;
    box-shadow: 0 0 0 3px rgba(240, 141, 84, 0.14);
    outline: none;
}

.prompt-perimeter select {
    min-height: 32px;
    padding: 0 30px 0 11px;
    color: #fff4ea;
    font: inherit;
    font-weight: 800;
    border: 1px solid rgba(240, 141, 84, 0.40);
    border-radius: 11px;
    background: rgba(240, 141, 84, 0.10);
    cursor: pointer;
}

.prompt-perimeter select:hover,
.prompt-perimeter select:focus-visible {
    border-color: rgba(255, 174, 124, 0.82);
    box-shadow: 0 0 0 3px rgba(240, 141, 84, 0.12);
    outline: none;
}

.prompt-perimeter option {
    color: #181228;
    background: #fffaf6;
}

.locator-suggestions {
    position: absolute;
    z-index: 1210;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: min(250px, 38vh);
    overflow: auto;
    padding: 6px;
    border: 1px solid rgba(167, 139, 250, 0.48);
    border-radius: 12px;
    background: #17122a;
    box-shadow: 0 18px 36px rgba(0,0,0,0.40);
}

.locator-suggestions.open-above {
    top: auto;
    bottom: calc(100% + 6px);
}

.locator-suggestions.is-portal {
    position: fixed;
    right: auto;
    bottom: auto;
    z-index: 10040;
}

.locator-suggestion {
    display: grid;
    width: 100%;
    gap: 2px;
    padding: 9px 10px;
    text-align: left;
    color: var(--ink);
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.locator-suggestion:hover,
.locator-suggestion:focus-visible {
    background: rgba(109, 74, 255, 0.24);
    outline: none;
}

.locator-suggestion strong {
    font-size: 0.8rem;
}

.locator-suggestion span {
    color: var(--muted-strong);
    font-size: 0.7rem;
}

.external-discovery-add {
    width: max-content;
    margin: 6px 0 0 50px;
    padding: 5px 8px;
    color: #fff3e8;
    font: inherit;
    font-size: 0.69rem;
    font-weight: 800;
    border: 1px solid rgba(240, 141, 84, 0.58);
    border-radius: 8px;
    background: rgba(240, 141, 84, 0.12);
    cursor: pointer;
}

.external-discovery-add:hover,
.external-discovery-add:focus-visible {
    background: rgba(240, 141, 84, 0.26);
    outline: none;
}

.strategy-progress {
    align-items: center;
    gap: 7px;
    color: #f7bb91;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.strategy-progress:not([hidden]) {
    display: inline-flex;
}

.strategy-progress::before {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(240, 141, 84, 0.26);
    border-top-color: #f08d54;
    border-radius: 50%;
    content: '';
    animation: strategy-progress-spin 700ms linear infinite;
}

#strategyPromptSend.is-processing {
    cursor: wait;
    opacity: 0.82;
}

#strategyPromptSend {
    align-self: start;
    min-width: 126px;
    min-height: 54px;
    padding: 0 24px;
    border-radius: 18px;
    border-color: rgba(255, 190, 146, 0.72);
    box-shadow: 0 10px 24px rgba(240, 141, 84, 0.24), inset 0 1px 0 rgba(255,255,255,0.34);
    font-size: 0.98rem;
    font-weight: 850;
    letter-spacing: 0.01em;
}

#strategyPromptSend i {
    font-size: 1.05rem;
}

#strategyPromptSend:hover,
#strategyPromptSend:focus-visible {
    border-color: #ffd1b2;
    box-shadow: 0 13px 30px rgba(240, 141, 84, 0.34), 0 0 0 3px rgba(240, 141, 84, 0.16);
    outline: none;
}

button.footprint-stat.is-processing {
    cursor: wait;
    box-shadow: 0 0 0 2px rgba(240, 141, 84, 0.13), 0 12px 26px rgba(240, 141, 84, 0.12);
}

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

.prompt-input {
    width: 100%;
    min-height: 54px;
    border-radius: 18px;
    border: 1px solid rgba(240, 141, 84, 0.48);
    background: linear-gradient(135deg, rgba(42, 31, 66, 0.98), rgba(25, 19, 42, 0.98));
    color: #fff8f2;
    padding: 13px 48px 13px 18px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: 0.005em;
    caret-color: #ff9a62;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(109, 74, 255, 0.08);
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.prompt-input:hover {
    border-color: rgba(255, 174, 124, 0.72);
}

.prompt-input:focus {
    border-color: #ff9a62;
    background: linear-gradient(135deg, rgba(49, 35, 76, 1), rgba(29, 21, 48, 1));
    box-shadow: 0 0 0 3px rgba(240, 141, 84, 0.18), 0 12px 30px rgba(7, 4, 17, 0.34);
    outline: none;
}

.prompt-clear {
    position: absolute;
    top: 50%;
    right: 8px;
    z-index: 2;
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: var(--muted-strong);
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease;
}

.prompt-clear:hover,
.prompt-clear:focus-visible {
    background: rgba(240,141,84,0.20);
    color: #fff4ec;
    outline: none;
}

.prompt-input::placeholder {
    color: rgba(245, 232, 224, 0.66);
    font-weight: 550;
}

.prompt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.routing-primary-chips {
    align-items: center;
    width: 100%;
    min-height: 32px;
}

.routing-refine {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 10px;
    border-left: 2px solid rgba(240,141,84,0.45);
    background: rgba(255,255,255,0.025);
    border-radius: 0 12px 12px 0;
}

.routing-refine-label {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 2px;
}

.prompt-chip-refine {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.prompt-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.prompt-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted-strong);
    font-size: 0.72rem;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
}

.prompt-checkbox-inline {
    margin-left: 2px;
    padding: 4px 2px;
}

.prompt-checkbox input {
    width: 15px;
    height: 15px;
    accent-color: var(--orange);
    cursor: pointer;
}

.prompt-chip {
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--muted-strong);
    padding: 6px 9px;
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1.1;
}

.prompt-chip-reset {
    margin-left: auto;
    border-color: rgba(240,141,84,0.30);
    color: #fff0e6;
    background: rgba(240,141,84,0.09);
}

.support-grid {
    display: none;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 14px;
    align-items: start;
}

.support-grid.is-open {
    display: grid;
}

.market-plan-modal[hidden] { display: none; }

.market-plan-modal {
    position: fixed;
    inset: 0;
    z-index: 4800;
    display: grid;
    place-items: start center;
    padding: max(16px, 3vh) 20px 20px;
    background: rgba(5,4,12,0.80);
    backdrop-filter: blur(14px);
}

.market-plan-dialog {
    width: min(1180px, 100%);
    max-height: min(92vh, 960px);
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(240,141,84,0.30);
    background: linear-gradient(150deg, #1a162b, #0f0d1c 68%);
    box-shadow: 0 30px 100px rgba(0,0,0,0.68), 0 0 60px rgba(240,141,84,0.12);
    color: var(--ink);
}

.market-plan-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(18,15,32,0.96);
}

.market-plan-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.market-plan-head h2 {
    margin: 3px 0 4px;
    font-size: 1.35rem;
}

.market-plan-subtitle {
    color: var(--muted);
    font-size: 0.82rem;
}

.market-plan-body {
    max-height: calc(min(92vh, 960px) - 86px);
    overflow: auto;
    padding: 18px;
}

.market-plan-body .support-grid {
    margin: 0;
}

.market-plan-dialog:not(.is-detail-open) .venue-tier-panel,
.market-plan-dialog:not(.is-detail-open) .support-grid > .support-card:not(#marketPlanPanel) {
    display: none;
}

.market-plan-dialog:not(.is-detail-open) .support-grid.is-open {
    grid-template-columns: minmax(0, 1fr);
}

.market-plan-dialog:not(.is-detail-open) #marketPlanPanel {
    padding: 20px;
}

.market-plan-dialog:not(.is-detail-open) #marketPlanPanel .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.approval-list-panel {
    display: none;
    margin: 0 0 16px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(240,141,84,0.30);
    background:
        radial-gradient(circle at top left, rgba(240,141,84,0.12), transparent 34%),
        rgba(255,255,255,0.025);
}

.approval-list-panel.is-open {
    display: block;
}

.approval-list-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.approval-list-head h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.approval-list-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.approval-list-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.approval-map-preview {
    display: none;
    margin: 12px 0;
    border-radius: 18px;
    border: 1px solid rgba(240,141,84,0.28);
    background: rgba(7,6,16,0.76);
    overflow: hidden;
}

.approval-map-preview.is-open {
    display: block;
}

.approval-map-preview img {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: #070612;
}

.approval-list-output {
    width: 100%;
    min-height: 180px;
    max-height: 260px;
    overflow: auto;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(7,6,14,0.72);
    color: #fff6ef;
    padding: 14px;
    white-space: pre-wrap;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.78rem;
    line-height: 1.45;
}

.venue-tier-panel {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.venue-tier-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 12px;
}

.venue-tier-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.035);
    color: var(--muted-strong);
    padding: 8px 12px;
    font-weight: 800;
    font-size: 0.78rem;
    cursor: pointer;
}

.venue-tier-tab.is-active {
    border-color: rgba(240,141,84,0.62);
    background: linear-gradient(135deg, rgba(240,141,84,0.25), rgba(103,58,183,0.22));
    color: #fff6ef;
    box-shadow: 0 10px 24px rgba(240,141,84,0.12);
}

.venue-tier-count {
    min-width: 24px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    text-align: center;
    color: #fff;
}

.venue-tier-summary {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
    margin-bottom: 10px;
}

.venue-tier-list {
    display: grid;
    gap: 9px;
    max-height: 280px;
    overflow: auto;
    padding-right: 2px;
}

.venue-tier-card {
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
    padding: 11px 12px;
}

.venue-tier-card.is-rejected {
    border-color: rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.018);
    opacity: 0.84;
}

.venue-tier-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    color: #fff6ef;
    font-weight: 900;
    line-height: 1.25;
}

.venue-tier-title span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.venue-tier-copy {
    margin-top: 6px;
    color: var(--muted-strong);
    font-size: 0.82rem;
    line-height: 1.4;
}

.support-disclosure {
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    overflow: hidden;
}

.support-disclosure summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.support-disclosure summary::-webkit-details-marker {
    display: none;
}

.support-disclosure summary span {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.92rem;
}

.support-disclosure-body {
    padding: 0 18px 18px;
    display: grid;
    gap: 14px;
}

.support-card {
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.025);
    padding: 18px;
}

.support-card h3 {
    margin: 0 0 10px;
    font-size: 1.08rem;
}

.support-card p,
.support-card .helper {
    color: var(--muted);
    line-height: 1.55;
    margin: 0 0 12px;
}

.demand-explanation {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(240, 141, 84, 0.32);
    border-radius: 12px;
    background: rgba(240, 141, 84, 0.07);
}

.demand-explanation summary {
    color: #f4a06f;
    font-weight: 800;
    cursor: pointer;
}

.demand-explanation p {
    margin: 9px 0 0;
}

.demand-explanation-results {
    margin: 0 14px 10px;
    flex: 0 0 auto;
}

.demand-explanation-results p {
    color: var(--muted);
    line-height: 1.45;
}

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

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

.metric {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}

.metric strong {
    display: block;
    font-size: 1.55rem;
    letter-spacing: -0.04em;
}

.metric span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.fit-badges,
.city-cloud,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fit-badge,
.city-chip,
.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 9px 13px;
    font-size: 0.9rem;
}

.fit-badge {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--muted-strong);
}

.city-chip {
    background: rgba(140, 92, 246, 0.14);
    color: #dfd2ff;
    border: 1px solid rgba(140, 92, 246, 0.28);
}

.footer-link {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--ink);
}

form {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field,
.select {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
    color: var(--ink);
    padding: 13px 14px;
}

.notice {
    margin-top: 10px;
    padding: 13px 14px;
    border-radius: 14px;
    font-size: 0.94rem;
}

.notice-success {
    color: #d7ffd7;
    background: rgba(101, 196, 102, 0.12);
    border: 1px solid rgba(101, 196, 102, 0.28);
}

.notice-error {
    color: #ffd3d3;
    background: rgba(239, 106, 106, 0.12);
    border: 1px solid rgba(239, 106, 106, 0.28);
}

.hero-card {
    position: relative;
    background:
        radial-gradient(circle at top center, rgba(240, 141, 84, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
        var(--bg-panel-strong);
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-topline {
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.76rem;
    text-align: right;
    font-weight: 700;
}

.hero-image-wrap {
    position: relative;
    min-height: 0;
    max-height: min(48vh, 500px);
    border-radius: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(11, 10, 22, 0.94), rgba(18, 14, 34, 0.96));
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6px;
}

.hero-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(44vh, 480px);
    object-fit: contain;
    background: radial-gradient(circle at top center, rgba(240, 141, 84, 0.08), transparent 42%);
}

.generic-band-hero {
    width: 100%;
    min-height: 350px;
    display: grid;
    align-content: center;
    gap: 18px;
    padding: 34px 28px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 36%, rgba(240, 141, 84, 0.24), transparent 30%),
        linear-gradient(155deg, rgba(140, 92, 246, 0.22), rgba(11, 10, 22, 0.96) 62%);
}

.generic-band-hero-mark {
    color: var(--orange);
    font-size: 2.5rem;
    filter: drop-shadow(0 0 22px rgba(240, 141, 84, 0.38));
}

.generic-band-hero h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4.6rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.generic-band-hero p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.proof-pill {
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.72rem;
    background: rgba(11, 10, 22, 0.76);
    border: 1px solid rgba(255,255,255,0.10);
    color: var(--ink);
    backdrop-filter: blur(12px);
}

.hero-social-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.social-proof-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    padding: 7px 10px;
    color: #fff7ef;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 800;
    background: rgba(240, 141, 84, 0.12);
    border: 1px solid rgba(240, 141, 84, 0.34);
    box-shadow: 0 10px 24px rgba(0,0,0,0.20);
}

.social-proof-pill:hover {
    color: #fff;
    border-color: rgba(255, 181, 132, 0.72);
    background: rgba(240, 141, 84, 0.20);
}

.hero-bottom {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.hero-bottom p {
    margin: 0;
    max-width: 36rem;
    color: #efe3d6;
    line-height: 1.35;
    font-size: 0.84rem;
}

.detail-panel {
    padding: 12px 12px 14px;
    border-radius: 18px;
    background: rgba(11, 10, 22, 0.72);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(14px);
}

.detail-panel h3 {
    margin: 0 0 8px;
    font-size: 0.98rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.detail-meta .meta-pill {
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 0.7rem;
    border: 1px solid transparent;
}

.meta-pill.fit-theater,
.meta-pill.fit-pac { background: rgba(59,130,246,0.15); color: #c4dbff; border-color: rgba(59,130,246,0.28); }
.meta-pill.fit-casino { background: rgba(34,197,94,0.15); color: #c7f3cf; border-color: rgba(34,197,94,0.28); }
.meta-pill.fit-premium { background: rgba(240,141,84,0.14); color: #ffd4bf; border-color: rgba(240,141,84,0.30); }
.meta-pill.fit-college { background: rgba(168,85,247,0.15); color: #ebd2ff; border-color: rgba(168,85,247,0.26); }
.meta-pill.fit-festival { background: rgba(245,158,11,0.15); color: #ffe0ad; border-color: rgba(245,158,11,0.28); }
.meta-pill.fit-general { background: rgba(255,255,255,0.08); color: #eee8df; border-color: rgba(255,255,255,0.12); }

.detail-panel p {
    margin: 0 0 8px;
    color: var(--muted-strong);
    line-height: 1.3;
    font-size: 0.82rem;
}

.detail-list {
    display: grid;
    gap: 6px;
}

.detail-row {
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--muted-strong);
    font-size: 0.8rem;
}

.market-group-list {
    display: grid;
    gap: 12px;
}

.market-group {
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    padding: 14px;
}

.market-group.is-selected {
    border-color: rgba(240, 141, 84, 0.34);
    background: linear-gradient(180deg, rgba(240,141,84,0.10), rgba(255,255,255,0.03));
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.market-group-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    margin-bottom: 10px;
}

.market-group-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
}

.market-group-subtitle {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.market-group-score {
    text-align: right;
    min-width: 72px;
}

.market-group-score strong {
    display: block;
    font-size: 1.25rem;
    color: var(--ink);
    letter-spacing: -0.04em;
}

.market-group-score span {
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.market-group-children {
    display: grid;
    gap: 10px;
}

.market-group-child-block {
    display: grid;
    gap: 8px;
}

.market-group-child-label {
    color: rgba(255,255,255,0.58);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.scenario-venue-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.scenario-venue-chip {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
    color: var(--muted-strong);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.76rem;
    cursor: pointer;
    transition: 140ms ease;
}

.scenario-venue-chip:hover {
    border-color: rgba(240, 141, 84, 0.28);
    color: var(--ink);
}

.scenario-venue-chip.is-active {
    border-color: rgba(240, 141, 84, 0.38);
    background: rgba(240, 141, 84, 0.10);
    color: #fff1e6;
}

.scenario-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 12px;
    margin-top: 14px;
}

.scenario-panel {
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    padding: 14px;
}

.scenario-panel h4 {
    margin: 0 0 10px;
    font-size: 0.94rem;
    color: var(--ink);
}

.scenario-kicker {
    color: var(--orange);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    margin-bottom: 8px;
}

.scenario-copy {
    color: var(--muted-strong);
    font-size: 0.84rem;
    line-height: 1.45;
}

.scenario-layout-list,
.scenario-run-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.scenario-row {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(11, 10, 22, 0.42);
    border: 1px solid rgba(255,255,255,0.06);
}

.scenario-row strong {
    display: block;
    color: var(--ink);
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.scenario-row span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.scenario-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.scenario-metric {
    padding: 12px;
    border-radius: 16px;
    background: rgba(11, 10, 22, 0.42);
    border: 1px solid rgba(255,255,255,0.06);
}

.scenario-metric strong {
    display: block;
    color: var(--ink);
    font-size: 1.1rem;
    letter-spacing: -0.04em;
}

.scenario-metric span {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.3;
    margin-top: 6px;
}

.market-group-child-list {
    display: grid;
    gap: 8px;
}

.market-group-child {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    color: var(--muted-strong);
    font-size: 0.88rem;
    line-height: 1.35;
}

button.market-group-child,
button.market-venue-inline {
    width: 100%;
    text-align: left;
    cursor: pointer;
}

button.market-group-child:hover,
button.market-venue-inline:hover {
    border-color: rgba(240,141,84,0.38);
    background: rgba(240,141,84,0.09);
}

.market-venue-inline-list { display: grid; gap: 5px; margin-top: 7px; }
.market-venue-inline {
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.025);
    color: #e8dfeb;
    padding: 6px 8px;
    font-size: 0.68rem;
    line-height: 1.25;
}
.market-venue-played { color: #ffb582; font-weight: 700; }

.venue-cluster-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #fff8f1;
    font: 800 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at 36% 32%, #ffd0a9 0 7%, #f08d54 24%, #9a452c 58%, rgba(50,19,25,0.92) 72%);
    border: 1px solid rgba(255,238,222,0.9);
    box-shadow: 0 0 0 7px rgba(240,141,84,0.14), 0 0 28px rgba(240,141,84,0.72), 0 12px 28px rgba(0,0,0,0.36);
}

.venue-map-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff8f1;
    background: #211a2a;
    border: 2px solid var(--map-marker-accent, #f08d54);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--map-marker-accent, #f08d54) 22%, transparent), 0 6px 16px rgba(0,0,0,0.42);
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.venue-map-icon i {
    font-size: 0.72rem;
    line-height: 1;
}

.venue-map-icon:hover {
    transform: scale(1.14);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--map-marker-accent, #f08d54) 24%, transparent), 0 8px 20px rgba(0,0,0,0.48);
}

.venue-map-icon.is-tour-anchor {
    width: 30px;
    height: 30px;
    background: #151726;
    border-color: #ffffff;
    box-shadow: 0 0 0 5px var(--map-marker-accent, #3b82f6), 0 0 22px color-mix(in srgb, var(--map-marker-accent, #3b82f6) 82%, transparent), 0 8px 20px rgba(0,0,0,0.48);
}

.venue-map-icon.is-tour-anchor i {
    color: var(--map-marker-accent, #3b82f6);
    font-size: 0.8rem;
}

.venue-map-icon.is-tour-candidate {
    background: #211a2a;
    border-width: 2px;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--map-marker-accent, #f08d54) 24%, transparent), 0 0 20px color-mix(in srgb, var(--map-marker-accent, #f08d54) 72%, transparent), 0 8px 20px rgba(0,0,0,0.48);
}
.venue-cluster-icon.is-dense {
    width: 54px;
    height: 54px;
    font-size: 13px;
    box-shadow: 0 0 0 9px rgba(240,141,84,0.15), 0 0 40px rgba(240,141,84,0.88), 0 14px 32px rgba(0,0,0,0.4);
}

.venue-cluster-icon.is-sweet-spot {
    background: radial-gradient(circle at 36% 32%, #ffd8d4 0 7%, #ff493d 24%, #9e1718 58%, rgba(54, 9, 13, 0.94) 72%);
    box-shadow: 0 0 0 7px rgba(255, 59, 48, 0.15), 0 0 30px rgba(255, 59, 48, 0.78), 0 12px 28px rgba(0,0,0,0.36);
}

.prompt-chip.is-active {
    border-color: rgba(255, 84, 73, 0.72) !important;
    background: linear-gradient(180deg, rgba(255, 59, 48, 0.28), rgba(240, 141, 84, 0.11));
    color: #fff7f3 !important;
    box-shadow: 0 0 18px rgba(255, 59, 48, 0.22);
}
.venue-popup-action {
    display: inline-flex;
    margin-top: 9px;
    padding: 7px 10px;
    border: 0;
    border-radius: 9px;
    background: #f08d54;
    color: #1a110c;
    font-weight: 800;
    cursor: pointer;
}

.venue-activity-modal[hidden] { display: none; }
.venue-activity-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(5,4,12,0.78);
    backdrop-filter: blur(12px);
}
.venue-activity-dialog {
    width: min(900px, 100%);
    max-height: min(86vh, 820px);
    overflow: auto;
    border-radius: 24px;
    border: 1px solid rgba(240,141,84,0.28);
    background: linear-gradient(150deg, #1a162b, #0f0d1c 68%);
    box-shadow: 0 30px 90px rgba(0,0,0,0.6), 0 0 50px rgba(240,141,84,0.12);
    color: var(--ink);
}
.venue-activity-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    background: rgba(18,15,32,0.94);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
}
.venue-activity-head h2 { margin: 3px 0 4px; font-size: 1.35rem; }
.venue-activity-location { color: var(--muted); font-size: 0.82rem; }
.venue-activity-close { padding: 8px 11px; }
.venue-activity-body { padding: 20px 22px 24px; }
.venue-activity-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.venue-activity-column,
.venue-pitch-panel {
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.025);
    padding: 14px;
}
.venue-activity-column h3,
.venue-pitch-panel h3 { margin: 0 0 10px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.09em; color: #ffad78; }
.venue-event-list { display: grid; gap: 7px; }
.venue-event { padding: 9px 10px; border-radius: 11px; background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.06); }
.venue-event strong { display: block; font-size: 0.78rem; }
.venue-event span { display: block; margin-top: 3px; color: var(--muted); font-size: 0.68rem; }
.venue-event.is-players { border-color: rgba(240,141,84,0.34); background: rgba(240,141,84,0.08); }
.venue-pitch-panel { margin-top: 12px; }
.venue-pitch-dates { display: flex; flex-wrap: wrap; gap: 8px; }
.venue-pitch-date { border-radius: 999px; padding: 8px 11px; background: rgba(240,141,84,0.10); border: 1px solid rgba(240,141,84,0.28); color: #ffe7d7; font-size: 0.75rem; }
.venue-campaign-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.venue-campaign-actions a { text-decoration: none; }
.venue-pitch-disclaimer { margin: 10px 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.4; }

.venue-candidate-modal[hidden] { display: none; }
.venue-candidate-modal {
    position: fixed;
    inset: 0;
    z-index: 5100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(5,4,12,0.80);
    backdrop-filter: blur(12px);
}
.venue-candidate-dialog {
    width: min(620px, 100%);
    border-radius: 22px;
    border: 1px solid rgba(240,141,84,0.34);
    background: linear-gradient(150deg, #1a162b, #0f0d1c 72%);
    box-shadow: 0 30px 90px rgba(0,0,0,0.62), 0 0 44px rgba(240,141,84,0.12);
    color: var(--ink);
}
.venue-candidate-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.venue-candidate-head h2 { margin: 3px 0 4px; font-size: 1.3rem; }
.venue-candidate-location { color: var(--muted); font-size: 0.82rem; }
.venue-candidate-body { padding: 20px 22px 24px; }
.venue-candidate-intro, .venue-candidate-note { margin: 0 0 16px; color: var(--muted); line-height: 1.5; font-size: 0.88rem; }
.venue-candidate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.venue-candidate-grid label { display: grid; gap: 7px; color: #f7eee8; font-size: 0.78rem; font-weight: 800; }
.venue-candidate-grid select, .venue-candidate-grid input { width: 100%; box-sizing: border-box; border: 1px solid rgba(255,255,255,0.14); border-radius: 11px; padding: 10px 11px; background: rgba(255,255,255,0.055); color: var(--ink); font: inherit; }
.venue-candidate-grid option { color: #171321; }
.venue-candidate-fit { margin: 14px 0 10px; padding: 10px 12px; border-radius: 12px; background: rgba(240,141,84,0.10); border: 1px solid rgba(240,141,84,0.24); color: #ffe1cf; font-size: 0.83rem; }
.venue-candidate-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.venue-candidate-status { min-height: 1.3em; margin-top: 12px; color: #ffbe94; font-size: 0.82rem; }

@media (max-width: 760px) {
    .venue-activity-columns { grid-template-columns: 1fr; }
    .venue-candidate-grid { grid-template-columns: 1fr; }
    .venue-activity-modal { padding: 8px; }
    .venue-activity-dialog { max-height: 94vh; border-radius: 18px; }
    .market-plan-modal { padding: 8px; }
    .market-plan-dialog { max-height: 96vh; border-radius: 18px; }
    .market-plan-body { max-height: calc(96vh - 82px); padding: 12px; }
}

.leaflet-container {
    background: #131022;
}

.leaflet-overlay-pane svg path.leaflet-interactive.market-heat {
    transition: fill-opacity 140ms ease, opacity 140ms ease;
}

.leaflet-overlay-pane svg path.leaflet-interactive.venue-heat {
    transition: fill-opacity 140ms ease, opacity 140ms ease;
}

.leaflet-popup-content-wrapper {
    border-radius: 16px;
    background: #ffffff;
}

.leaflet-popup-content {
    margin: 12px 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.map-popup-title {
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 4px;
}

.map-popup-copy {
    color: #4b5563;
    font-size: 0.86rem;
    line-height: 1.45;
}

.helper {
    color: var(--muted);
    font-size: 0.89rem;
    line-height: 1.55;
}

.muted-link {
    color: #d8c6ff;
}

@media (max-width: 1580px) {
    .workspace {
        grid-template-columns: 1fr;
    }

    .hero-card {
        min-height: auto;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }

}

@media (min-width: 981px) {
    .workspace {
        position: relative;
        display: block;
    }

    .workspace-card {
        width: 100%;
    }

    .assistant-header {
        /* The feature card floats independently, so it does not reserve header space. */
        min-height: 0;
        padding-right: 184px;
    }

    .strategy-card > .prompt-card {
        /* Keep the submit action clear of the independently floated feature card. */
        margin-right: 184px;
    }

    #strategyPromptSend {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .assistant-header-actions {
        display: block;
        position: absolute;
        top: 8px;
        right: 194px;
        z-index: 5;
    }

    .assistant-header-actions .btn:not(.assistant-info-trigger) {
        display: none;
    }

    .assistant-info-trigger {
        width: 38px;
        height: 38px;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
    }

    .assistant-info-trigger span {
        display: none;
    }

    .hero-card,
    .workspace.hero-collapsed .hero-card {
        position: absolute;
        top: 14px;
        right: 14px;
        z-index: 4;
        display: block;
        width: 160px;
        min-height: 0;
        padding: 7px;
        border-radius: 20px;
        background: linear-gradient(160deg, rgba(40,27,53,0.98), rgba(12,10,24,0.98));
        box-shadow: 0 18px 48px rgba(0,0,0,0.42), 0 0 32px rgba(240,141,84,0.08);
    }

    .hero-card .hero-topline,
    .hero-card .hero-proof,
    .hero-card .hero-bottom,
    .hero-card .detail-panel {
        display: none;
    }

    .hero-card .hero-image-wrap {
        min-height: 0;
        max-height: none;
        overflow: hidden;
        padding: 3px;
        border-radius: 14px;
    }

    .hero-card .hero-image {
        width: 100%;
        height: auto;
        max-height: 210px;
        object-fit: contain;
    }

    .hero-card .generic-band-hero {
        min-height: 296px;
        padding: 20px 12px;
    }

    .hero-card .generic-band-hero h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 1320px) {
    .experience-shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .workspace {
        grid-template-columns: 1fr;
    }

    .hero-card {
        min-height: auto;
    }
}

@media (max-width: 980px) {
    body.nav-mobile-open {
        overflow: hidden;
    }

    .mobile-nav-toggle {
        display: grid;
        place-items: center;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 1300;
        width: 44px;
        height: 44px;
        padding: 0;
        color: #fff5eb;
        font-size: 1.1rem;
        background: rgba(20, 15, 42, 0.98);
        border: 1px solid rgba(240, 141, 84, 0.72);
        border-radius: 14px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
    }

    .nav-mobile-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1280;
        padding: 0;
        pointer-events: none;
        opacity: 0;
        background: rgba(5, 4, 16, 0.64);
        border: 0;
        transition: opacity 180ms ease;
    }

    .nav-mobile-backdrop.is-visible {
        pointer-events: auto;
        opacity: 1;
    }

    .experience-shell {
        width: min(100vw - 16px, 1600px);
        grid-template-columns: 1fr;
        margin: 8px auto;
    }

    .experience-shell.nav-collapsed {
        grid-template-columns: 1fr;
    }

    .nav-rail {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1290;
        width: min(288px, 86vw);
        height: 100dvh;
        overflow-y: auto;
        border-radius: 0 20px 20px 0;
        box-shadow: 20px 0 45px rgba(0, 0, 0, 0.42);
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

    .nav-rail.nav-mobile-open {
        transform: translateX(0);
    }

    .nav-toggle {
        display: none;
    }

    .nav-stack {
        grid-template-columns: 1fr;
    }

    .nav-substack {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }

    .strategy-grid,
    .support-grid,
    .form-row,
    .metric-grid,
    .market-tile-grid,
    .footprint-strip {
        grid-template-columns: 1fr;
    }

    .market-panel-header {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    .market-view-select {
        width: 100%;
    }

    .market-list-shell {
        height: var(--routing-panel-height);
        min-height: 0;
        max-height: none;
    }

    .strategy-grid { --routing-panel-height: 360px; }

    .hero-image-wrap {
        min-height: 300px;
        max-height: min(44vh, 420px);
    }
}

@media (max-width: 640px) {
    .experience-shell {
        width: min(100vw - 10px, 1600px);
        gap: 10px;
    }

    .nav-rail,
    .workspace-card,
    .hero-card {
        border-radius: 20px;
    }

    .workspace-card,
    .hero-card,
    .nav-rail {
        padding-left: 14px;
        padding-right: 14px;
    }

    .nav-stack {
        grid-template-columns: 1fr;
    }

    .assistant-header h1 {
        font-size: 1.6rem;
    }

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

    .prompt-chip-reset {
        margin-left: 0;
    }

    .assistant-header-actions {
        width: 100%;
    }

    .chat-line,
    .strategy-card,
    .support-card,
    .detail-panel {
        padding-left: 14px;
        padding-right: 14px;
    }

    .prompt-bar {
        grid-template-columns: 1fr;
    }

    .prompt-scope {
        max-width: none;
    }

    .prompt-perimeter {
        justify-self: stretch;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .prompt-radius-controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .prompt-perimeter select {
        min-width: 190px;
    }

    .map-frame,
    .map-canvas {
        min-height: 280px;
    }

    .strategy-grid { --routing-panel-height: clamp(320px, 48vh, 500px); }
    .workspace.hero-collapsed .strategy-grid { --routing-panel-height: clamp(360px, 54vh, 620px); }

    .map-frame,
    .workspace.hero-collapsed .map-frame { height: var(--routing-panel-height); }

    .hero-card {
        min-height: auto;
    }
}
