/* Vastu Canvas — professional light theme (boundary pinning + 45-Devata mandala) */
:root {
    --vc-primary: #B8860B;
    --vc-primary-dark: #8B6508;
    --vc-bg: #FFFBF0;
    --vc-panel: #FFFFFF;
    --vc-panel-border: #E8D5A0;
    --vc-text: #2C1A00;
    --vc-text-muted: #8B6508;
    --vc-accent: #7B4F9E;
    --vc-danger: #B71C1C;
    --vc-good: #2E7D32;
    /* Width of the left nav rail, named so anything that needs to reason about
       it can reference the value instead of repeating the literal. */
    --vc-rail-w: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0; height: 100%;
    background: var(--vc-bg);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: var(--vc-text);
}

/* ── App shell: left rail + view switcher ───────────────────── */
#vc-app-shell { display: flex; height: calc(100vh - var(--agbd-nav-h, 0px)); }
.vc-rail {
    flex: 0 0 var(--vc-rail-w); background: #2C1A00; display: flex; flex-direction: column;
    align-items: stretch; padding: 14px 6px; gap: 4px; overflow-y: auto; overflow-x: hidden;
    scrollbar-width: thin; scrollbar-gutter: stable;
}
/* A classic (non-overlay) scrollbar reserves real layout width, which — on a
   fixed 84px rail — visibly narrows the icon/label column and worsens text
   wrapping the moment content needs to scroll (e.g. a rail sub-menu expands).
   scrollbar-gutter above keeps that reserved width constant at all times so
   nothing shifts; this makes the scrollbar itself thin so the constant
   reservation costs as little width as possible. */
.vc-rail::-webkit-scrollbar { width: 5px; }
.vc-rail::-webkit-scrollbar-track { background: transparent; }
.vc-rail::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 3px; }
.vc-rail-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: none; border: none; color: #E8D5A0; padding: 12px 4px;
    border-radius: 10px; cursor: pointer; font-size: 11.5px; font-weight: 600;
    min-width: 0; width: 100%; box-sizing: border-box;
}
.vc-rail-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.vc-rail-item.active { background: var(--vc-primary); color: #fff; }
/* Sample-Demo mode (assets/vc-sample-demo.js): every rail tab other than
   Map/AstroVastu/Planets Hits/Lo Shu Grid is dimmed and reads as locked
   before a visitor even tries clicking it — the click itself is blocked
   separately, via a document-level listener, not by disabling the button
   (keeps this purely visual, so screen readers/keyboard nav still reach it
   and get the same upgrade prompt on activation). */
.vc-rail-item-locked { opacity: .4; cursor: not-allowed; }
.vc-rail-item-locked:hover { background: none; color: #E8D5A0; }
/* "Home" link back to the marketing site — sits above the tool's own tabs,
   separated by a subtle divider. It's an <a>, so kill the underline and
   never let it pick up the .active tab styling. */
.vc-rail-home { text-decoration: none; margin-bottom: 9px; position: relative; }
.vc-rail-home::after {
    content: ''; position: absolute; left: 12px; right: 12px; bottom: -5px;
    height: 1px; background: rgba(255,255,255,.16);
}
.vc-rail-icon { font-size: 20px; line-height: 1; }
.vc-rail-label { line-height: 1.2; text-align: center; }
.vc-rail-sub {
    display: none; flex-direction: column; gap: 2px; margin: 0 0 6px 6px;
    border-left: 2px solid rgba(255,255,255,.14); padding-left: 4px;
    min-width: 0; width: 100%; box-sizing: border-box;
}
.vc-rail-sub.show { display: flex; }
.vc-rail-sub-item {
    background: none; border: none; color: #E8D5A0; padding: 8px 3px; text-align: left;
    border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 600;
    min-width: 0; width: 100%; box-sizing: border-box; white-space: normal;
    overflow-wrap: break-word; hyphens: auto;
}
.vc-rail-sub-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.vc-rail-sub-item.active { background: rgba(255,255,255,.14); color: #fff; }
.vc-view { display: none; flex: 1 1 auto; min-width: 0; height: calc(100vh - var(--agbd-nav-h, 0px)); overflow: hidden; }
.vc-view.active { display: flex; flex-direction: column; }

#vc-root { display: flex; flex-direction: column; height: calc(100vh - var(--agbd-nav-h, 0px)); flex: 1 1 auto; min-width: 0; }

/* ── Top bar ─────────────────────────────────────────────── */
.vc-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 18px; background: var(--vc-panel);
    border-bottom: 1px solid var(--vc-panel-border);
    flex: 0 0 auto; position: relative; z-index: 50;
    box-shadow: 0 1px 3px rgba(16,24,40,.06);
}
.vc-topbar-left { display: flex; align-items: center; gap: 22px; }
.vc-brand { font-weight: 700; letter-spacing: .3px; color: var(--vc-primary-dark); font-size: 17px; }

.vc-menu { position: relative; }
.vc-menu-btn {
    background: none; border: none; color: var(--vc-text);
    font-size: 14px; cursor: pointer; padding: 6px 4px;
}
.vc-menu-btn:hover { color: var(--vc-primary); }
.vc-menu-panel {
    display: none; position: absolute; top: 100%; left: 0;
    background: var(--vc-panel); border: 1px solid var(--vc-panel-border);
    border-radius: 8px; padding: 10px; min-width: 230px;
    box-shadow: 0 8px 24px rgba(16,24,40,.14); z-index: 60;
}
.vc-menu-panel.open { display: block; }
.vc-menu-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; }
.vc-menu-row input[type="range"] { flex: 1; }
/* Sub-option indented under the checkbox it depends on (cut & extension sits
   under Marm Sthan — Angular, which is the only layer that draws it). */
.vc-menu-row-sub { padding-left: 20px; font-size: 12.5px; color: var(--vc-text-muted, #667085); }

/* Cut/extension numeric summary — the percentages are the useful output, not
   the shading. See VC_renderCutExtReadout(). */
.vc-cutext-readout {
    margin: 2px 0 6px 20px; padding: 7px 9px;
    background: #f8fafc; border: 1px solid var(--vc-panel-border);
    border-radius: 6px; font-size: 12px; line-height: 1.5;
}
.vc-cutext-line { display: flex; gap: 7px; align-items: baseline; }
.vc-cutext-tag {
    flex: 0 0 auto; font-weight: 700; font-size: 10.5px; letter-spacing: .3px;
    padding: 1px 5px; border-radius: 3px; color: #fff;
}
.vc-cutext-tag.ext { background: #1e8449; }
.vc-cutext-tag.cut { background: #c0392b; }
.vc-cutext-note { margin-top: 4px; color: var(--vc-text-muted, #667085); font-size: 11px; }
.vc-cutext-warn {
    margin-top: 6px; padding: 5px 7px; border-radius: 4px;
    background: #fef6e7; border: 1px solid #f0c987; color: #7a4b00; font-size: 11px; line-height: 1.45;
}
.vc-menu-item {
    display: block; width: 100%; text-align: left; background: none; border: none;
    color: var(--vc-text); padding: 6px 4px; font-size: 13px; cursor: pointer; border-radius: 4px;
}
.vc-menu-item:hover:not(:disabled) { background: #f1f5fb; color: var(--vc-primary-dark); }
/* Rotate/Move/Recentre are disabled for rect-fitted chakra styles, whose
   placement comes from the adjustable rectangle — see CHAKRA_STYLE_FITS_RECT. */
.vc-menu-item:disabled { opacity: .4; cursor: not-allowed; }
.vc-menu-row input[type="range"]:disabled { opacity: .4; cursor: not-allowed; }
.vc-menu-readout { font-size: 12px; color: var(--vc-text-muted); padding-top: 4px; }
.vc-menu-sep { height: 1px; background: var(--vc-panel-border); margin: 8px 0; }
.vc-menu-section-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--vc-text-muted); margin: 2px 0 4px;
}

/* ── Step indicator strip ────────────────────────────────── */
.vc-steps {
    display: flex; gap: 4px; padding: 8px 18px; background: var(--vc-panel);
    border-bottom: 1px solid var(--vc-panel-border); flex: 0 0 auto; font-size: 12.5px;
}
.vc-step {
    display: flex; align-items: center; gap: 6px; color: var(--vc-text-muted);
    padding: 4px 12px; border-radius: 20px;
}
.vc-step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%; background: #e2e8f0;
    color: var(--vc-text-muted); font-size: 11px; font-weight: 700;
}
.vc-step.active { color: var(--vc-primary-dark); background: #FFF8E7; }
.vc-step.active .vc-step-num { background: var(--vc-primary); color: #fff; }
.vc-step.done { color: var(--vc-good); }
.vc-step.done .vc-step-num { background: var(--vc-good); color: #fff; }

/* ── Map tabs (multi-floor / multi-plot) ─────────────────── */
.vc-map-tabs {
    display: flex; align-items: center; gap: 6px; padding: 8px 18px;
    background: var(--vc-panel); border-bottom: 1px solid var(--vc-panel-border);
    flex: 0 0 auto;
}
.vc-map-tab {
    display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 14px;
    border-radius: 20px; background: #F0E4B8; color: var(--vc-text-muted);
    font-size: 12.5px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
    max-width: 180px;
}
.vc-map-tab:hover { color: var(--vc-text); }
.vc-map-tab.active { background: #FFF8E7; color: var(--vc-primary-dark); border-color: var(--vc-primary); }
.vc-map-tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-map-tab-close {
    width: 18px; height: 18px; border-radius: 50%; border: none; background: transparent;
    color: var(--vc-text-muted); cursor: pointer; font-size: 13px; line-height: 1;
    display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.vc-map-tab-close:hover { background: rgba(220,38,38,.14); color: #dc2626; }
.vc-map-tab-add {
    width: 28px; height: 28px; border-radius: 50%; border: 1px dashed var(--vc-panel-border);
    background: #fff; color: var(--vc-text-muted); cursor: pointer; font-size: 16px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.vc-map-tab-add:hover { border-color: var(--vc-primary); color: var(--vc-primary); }
.vc-map-tab-add:disabled { opacity: .4; cursor: not-allowed; }
.vc-map-compare-btn {
    margin-left: 8px; padding: 6px 14px; border-radius: 20px; border: 1px solid var(--vc-panel-border);
    background: #fff; color: var(--vc-text); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.vc-map-compare-btn:hover:not(:disabled) { border-color: var(--vc-primary); color: var(--vc-primary); }
.vc-map-compare-btn:disabled { opacity: .4; cursor: not-allowed; }

.vc-map-namebox {
    position: absolute; bottom: 14px; left: 14px; z-index: 20;
    background: rgba(255,255,255,.92); padding: 4px; border-radius: 8px;
    border: 1px solid var(--vc-panel-border); box-shadow: 0 2px 8px rgba(16,24,40,.08);
}
.vc-map-namebox input {
    border: none; background: transparent; font-size: 13px; font-weight: 600;
    color: var(--vc-text); padding: 5px 8px; width: 240px; outline: none;
}
.vc-map-namebox input:focus { background: #FFF8E7; border-radius: 5px; }

/* ── Body layout ─────────────────────────────────────────── */
/* position:relative so the floating Guide re-open button can anchor to the
   content area itself rather than to the viewport — see .vc-tour-reopen. */
.vc-body { flex: 1 1 auto; display: flex; min-height: 0; position: relative; }
.vc-canvas-shell {
    flex: 1 1 auto; position: relative; overflow: hidden;
    background: var(--vc-bg);
    display: flex; align-items: center; justify-content: center;
}
/* Once a plan is loaded the whole work area is a white sheet. */
.vc-canvas-shell.vc-has-img { background: #ffffff; }
#vc-plan { display: block; touch-action: none; cursor: crosshair; }
#vc-plan.vc-grab { cursor: grab; }
#vc-plan.vc-grabbing { cursor: grabbing; }

.vc-drop {
    position: absolute; z-index: 5; text-align: center; color: var(--vc-text-muted);
}
.vc-drop.hide { display: none; }

.vc-canvas-hand, .vc-canvas-nudge, .vc-canvas-zoom, .vc-canvas-history, .vc-canvas-chakra {
    position: absolute; top: 14px; z-index: 20; display: flex; gap: 6px;
    background: rgba(255,255,255,.92); padding: 6px; border-radius: 10px;
    border: 1px solid var(--vc-panel-border); box-shadow: 0 2px 8px rgba(16,24,40,.08);
}
.vc-canvas-chakra { right: 470px; }
.vc-canvas-history { right: 374px; }
.vc-canvas-hand { right: 320px; }
.vc-canvas-nudge { right: 106px; }
.vc-canvas-zoom { right: 14px; }
.vc-canvas-hand button, .vc-canvas-nudge button, .vc-canvas-zoom button, .vc-canvas-history button, .vc-canvas-chakra button {
    width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--vc-panel-border);
    background: #fff; color: var(--vc-text); cursor: pointer; font-size: 14px;
}
.vc-canvas-hand button:hover, .vc-canvas-nudge button:hover, .vc-canvas-zoom button:hover, .vc-canvas-history button:hover:not(:disabled), .vc-canvas-chakra button:hover {
    border-color: var(--vc-primary); color: var(--vc-primary);
}
.vc-canvas-hand button.active, .vc-canvas-chakra button.active { background: var(--vc-primary); border-color: var(--vc-primary); color: #fff; }
.vc-canvas-history button:disabled { opacity: .4; cursor: default; }

.vc-toast {
    position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(10px);
    background: rgba(17,24,39,.94); color: #f9fafb; padding: 8px 16px; border-radius: 8px;
    font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 30;
}
.vc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.vc-modeTag {
    position: absolute; top: 14px; left: 14px; background: var(--vc-primary); color: #fff;
    padding: 6px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 600;
    display: none; z-index: 20; box-shadow: 0 2px 8px rgba(184,134,11,.35);
    /* Also the cancel control -- Escape has no equivalent on touch, so the label
       that says which mode you are in is the thing you press to leave it. */
    cursor: pointer; align-items: center; gap: 8px; border: none; text-align: left;
    max-width: calc(100% - 28px);
}
.vc-modeTag.show { display: inline-flex; }
.vc-modeTag:hover, .vc-modeTag:focus-visible { background: var(--vc-primary-dark); }
.vc-modeTag:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vc-modeTag-x {
    flex: 0 0 auto; font-size: 14px; line-height: 1; opacity: .85;
    border-left: 1px solid rgba(255,255,255,.4); padding-left: 8px;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.vc-tools {
    flex: 0 0 292px; background: var(--vc-panel); border-left: 1px solid var(--vc-panel-border);
    padding: 18px; overflow-y: auto;
}
.vc-tools h2 { margin: 0 0 16px; font-size: 18px; color: var(--vc-text); }
.vc-tools h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--vc-text-muted); }
.vc-tool-group { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--vc-panel-border); }
.vc-tool-group:last-child { border-bottom: none; }

/* ── Guided Tour (left of the canvas) ────────────────────── */
.vc-tour {
    flex: 0 0 260px; background: var(--vc-panel); border-right: 1px solid var(--vc-panel-border);
    /* Bottom padding, not 16px, because .vc-pill-row ("Demo access?" / "Try a
       Sample Plan") is position:fixed with z-index 500 and paints over this
       panel's last step -- step 9, "Generate a report", measured 6,312px covered
       at 1440px even scrolled fully down. The panel already scrolls
       (overflow-y:auto); it just needed somewhere to scroll TO. Padding rather
       than margin: margin would not scroll. Applies at every width because the
       collision happens at every width -- it is not a mobile-only bug.

       Driven by a variable because the pill row sits at a DIFFERENT height on
       mobile (it has to clear .vc-map-namebox there), and a hardcoded value
       silently stopped being enough the moment that offset changed. Keep the
       two definitions of --vc-pill-clearance in step with .vc-pill-row's
       `bottom` + its ~33px height + breathing room. */
    padding: 16px 16px var(--vc-pill-clearance, 68px); overflow-y: auto;
}
.vc-tour.collapsed { display: none; }
.vc-tour-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.vc-tour-head h2 { margin: 0; font-size: 16px; color: var(--vc-text); }
.vc-tour-head button {
    background: none; border: none; color: var(--vc-text-muted); font-size: 18px;
    line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px;
}
.vc-tour-head button:hover { background: var(--vc-bg); color: var(--vc-text); }
/* Anchored to .vc-body (the content area), NOT to the viewport. This button
   marks where the tour panel reappears, so it belongs at that panel's top-left
   corner. It was previously `position: fixed; left: 14px; top: 176px`, whose
   viewport-relative coordinates landed it on top of the rail's third item
   ("All Devta"), hiding it completely; simply shifting it right by the rail
   width then dropped it onto the map-tab strip instead, because a fixed offset
   cannot know where the header ends. Anchoring to .vc-body — which already
   starts below the tabs and to the right of the rail — clears both without
   hard-coded numbers, and keeps clearing them if either header changes height. */
.vc-tour-reopen {
    position: absolute; left: 14px; top: 14px; z-index: 25;
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--vc-panel-border);
    background: var(--vc-panel); color: var(--vc-text); font-size: 18px; cursor: pointer;
    box-shadow: 0 2px 8px rgba(16,24,40,.14);
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.vc-tour-reopen:hover { border-color: var(--vc-primary); color: var(--vc-primary); }
.vc-tour-step {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 4px;
    border-bottom: 1px solid var(--vc-panel-border);
}
.vc-tour-step:last-child { border-bottom: none; }
.vc-tour-step-num {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; background: #e2e8f0;
    color: var(--vc-text-muted); font-size: 12px; font-weight: 700; margin-top: 1px;
}
.vc-tour-step.done .vc-tour-step-num { background: var(--vc-good); color: #fff; }
.vc-tour-step-body { flex: 1 1 auto; min-width: 0; }
.vc-tour-step-label { font-size: 13px; font-weight: 600; color: var(--vc-text); }
.vc-tour-step.done .vc-tour-step-label { color: var(--vc-good); }
.vc-tour-step-hint { font-size: 12px; color: var(--vc-text-muted); margin: 2px 0 6px; }
.vc-tour-step-go {
    background: none; border: 1px solid var(--vc-panel-border); color: var(--vc-primary);
    font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 14px; cursor: pointer;
}
.vc-tour-step-go:hover { background: var(--vc-primary); color: #fff; border-color: var(--vc-primary); }
.vc-tour-step.done .vc-tour-step-go { display: none; }
@keyframes vc-tour-flash-anim {
    0%, 100% { box-shadow: 0 0 0 0 rgba(184,134,11,0); }
    25%, 75% { box-shadow: 0 0 0 3px rgba(184,134,11,.55); }
}
.vc-tour-flash { animation: vc-tour-flash-anim 1.2s ease-in-out 2; border-radius: 8px; }

.vc-btn {
    background: #fff; border: 1px solid var(--vc-panel-border); color: var(--vc-text);
    padding: 8px 12px; border-radius: 7px; cursor: pointer; font-size: 13px;
}
.vc-btn:hover { border-color: var(--vc-primary); color: var(--vc-primary); }
.vc-btn.active { background: var(--vc-primary); color: #fff; border-color: var(--vc-primary); }
.vc-btn-block { display: block; width: 100%; margin-bottom: 8px; text-align: center; padding: 10px; }
.vc-btn-primary { background: var(--vc-primary); color: #fff; border-color: var(--vc-primary); }
.vc-btn-primary:hover { background: var(--vc-primary-dark); color: #fff; }
.vc-btn-danger { background: var(--vc-danger); color: #fff; border-color: var(--vc-danger); }
.vc-btn-danger:hover { background: #b91c1c; color: #fff; }
.vc-btn-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.vc-seg { flex: 1; text-align: center; }

.vc-field { display: block; font-size: 12.5px; color: var(--vc-text-muted); margin-bottom: 10px; }
.vc-field select, .vc-field input, .vc-field textarea {
    display: block; width: 100%; margin-top: 4px; background: #fff; color: var(--vc-text);
    border: 1px solid var(--vc-panel-border); border-radius: 6px; padding: 7px 8px; font-size: 13px;
}
.vc-pin-sub { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--vc-panel-border); }
.vc-hint { font-size: 12px; color: var(--vc-text-muted); font-style: italic; margin: 8px 0 0; }
.vc-tiltBtn.active { background: var(--vc-primary); color: #fff; border-color: var(--vc-primary); }

/* Rooms & Areas list */
.vc-room-row {
    position: relative; margin-top: 8px; padding: 8px 28px 8px 10px;
    background: #fff8ee; border: 1px solid #f3d9ac; border-radius: 8px;
}
.vc-room-row-main { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.vc-room-row-name { font-weight: 600; color: #92400e; }
.vc-room-row-area { color: var(--vc-text-muted); font-size: 12px; white-space: nowrap; }
.vc-room-verdict { margin-top: 4px; font-size: 11.5px; font-weight: 600; }
.vc-room-verdict-ideal { color: #16a34a; }
.vc-room-verdict-acceptable { color: #1565C0; }
/* Between acceptable and prohibited: the reviewed zone table does not forbid
   this placement, but the reference layer records a clearly negative effect. */
.vc-room-verdict-caution { color: #ea580c; }
.vc-room-verdict-prohibited { color: #dc2626; }
.vc-room-verdict-neutral { color: #6b7280; }
.vc-room-delete-btn {
    position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; line-height: 18px;
    border: none; background: transparent; color: var(--vc-text-muted); font-size: 16px; cursor: pointer; border-radius: 50%;
}
.vc-room-delete-btn:hover { background: #fee2e2; color: #b91c1c; }

/* Placements palette */
.vc-place-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vc-place-btn { text-align: left; font-size: 12.5px; padding: 7px 8px; }
.vc-place-btn.active { background: var(--vc-primary); color: #fff; border-color: var(--vc-primary); }

/* Canvas-anchored tooltip */
.vc-tooltip {
    position: absolute; z-index: 40; pointer-events: none;
    background: #fff; color: var(--vc-text); border: 1px solid var(--vc-panel-border);
    padding: 6px 10px; border-radius: 6px; font-size: 12.5px; max-width: 240px;
    box-shadow: 0 4px 14px rgba(16,24,40,.14);
    opacity: 0; transform: translate(-50%, -100%) translateY(-8px); transition: opacity .12s;
}
.vc-tooltip.show { opacity: 1; }

/* ── Devata detail slide-over ────────────────────────────── */
.vc-devata-panel {
    position: fixed; top: var(--agbd-nav-h, 0px); right: -360px; width: 340px;
    height: calc(100% - var(--agbd-nav-h, 0px));
    background: var(--vc-panel); border-left: 1px solid var(--vc-panel-border);
    box-shadow: -6px 0 24px rgba(16,24,40,.12);
    transition: right .25s ease; z-index: 200; overflow-y: auto;
}
.vc-devata-panel.open { right: 0; }
.vc-devata-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--vc-panel-border); }
.vc-devata-panel-head h3 { margin: 0; font-size: 16px; }
.vc-devata-panel-head button { background: none; border: none; color: var(--vc-text); font-size: 20px; cursor: pointer; }
.vc-devata-panel-body { padding: 16px; font-size: 13.5px; line-height: 1.55; }
.vc-devata-panel-body .vc-tier { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-bottom: 10px; }

/* ── Chart modal ─────────────────────────────────────────── */
.vc-chart-modal {
    display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 300;
    align-items: center; justify-content: center; padding: 40px 20px;
}
.vc-chart-modal.open { display: flex; }
.vc-chart-modal-inner {
    background: var(--vc-panel); border-radius: 10px; padding: 20px 20px 12px; position: relative;
    max-height: 100%; max-width: 100%; overflow-y: auto; overflow-x: hidden;
    box-shadow: 0 12px 40px rgba(16,24,40,.25);
}
.vc-chart-modal-close {
    position: sticky; top: 0; float: right; margin: -20px -8px 0 0;
    background: var(--vc-panel); border: none; color: var(--vc-text); font-size: 22px; cursor: pointer; z-index: 2;
}
/* ── Generic modal (Vastu Score / Compare Maps) ──────────── */
.vc-modal {
    display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 300;
    align-items: center; justify-content: center; padding: 40px 20px;
}
.vc-modal.open { display: flex; }
.vc-modal-inner {
    background: var(--vc-panel); border-radius: 10px; padding: 20px 20px 12px; position: relative;
    max-height: 100%; max-width: 480px; width: 100%; overflow-y: auto; overflow-x: hidden;
    box-shadow: 0 12px 40px rgba(16,24,40,.25);
}
.vc-modal-inner.vc-modal-wide { max-width: 920px; }
.vc-modal-close {
    position: sticky; top: 0; float: right; margin: -20px -8px 0 0;
    background: var(--vc-panel); border: none; color: var(--vc-text); font-size: 22px; cursor: pointer; z-index: 2;
}

.vc-score-big { font-size: 48px; font-weight: 800; text-align: center; clear: both; }
.vc-score-big span { font-size: 20px; color: var(--vc-text-muted); font-weight: 600; }
.vc-score-badge-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 0 16px; }
.vc-score-badge { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.vc-score-findings { margin-top: 12px; font-size: 13px; }
.vc-score-findings ul { margin: 6px 0 0; padding-left: 18px; }
.vc-score-findings li { margin-bottom: 4px; }

.vc-compare-picker { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; clear: both; }
.vc-compare-columns { display: flex; gap: 20px; flex-wrap: wrap; }
.vc-compare-col { flex: 1 1 320px; min-width: 260px; }
.vc-compare-col h3 { margin-top: 0; }
.vc-compare-col img { max-width: 100%; border: 1px solid var(--vc-panel-border); border-radius: 6px; }

.vc-client-save-row { display: flex; gap: 8px; margin-bottom: 16px; clear: both; }
.vc-client-save-row input { flex: 1; padding: 7px 10px; border: 1px solid var(--vc-panel-border); border-radius: 6px; }
.vc-client-row {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--vc-panel-border);
}
.vc-client-row-name { font-weight: 600; }
.vc-client-row-date { font-size: 12px; color: var(--vc-text-muted); }
.vc-client-row-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.vc-client-empty { color: var(--vc-text-muted); text-align: center; padding: 16px 0; }

/* ── Saved Projects (real cloud storage, assets/vc-saved-projects.js) ────
   Reuses .vc-modal/.vc-modal-inner (generic modal), .vc-client-save-row/
   .vc-client-row/.vc-client-row-*/.vc-client-empty (Client Library, just
   above) for the list/save-row look, and .vc-sample-upgrade-card (further
   down this file) for the logged-out/no-plan prompt — only the slots
   indicator below is new. */
.vc-saved-slots-indicator {
    font-size: 12px; color: var(--vc-text-muted); text-align: right;
    margin: -6px 0 10px; clear: both;
}

.vc-remedy-toolkit { margin-top: 14px; text-align: left; }
.vc-remedy-toolkit-cat { margin-bottom: 8px; }
.vc-remedy-toolkit-cat strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--vc-text-muted); }

.vc-score-projected { text-align: center; font-size: 13px; margin: -6px 0 12px; color: var(--vc-text-muted); }
.vc-remedy-sim { margin-top: 14px; text-align: left; border-top: 1px solid var(--vc-panel-border); padding-top: 12px; }
.vc-remedy-sim-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 12.5px; flex-wrap: wrap; }
.vc-remedy-sim-row select { font-size: 12px; padding: 3px 6px; border: 1px solid var(--vc-panel-border); border-radius: 6px; }
.vc-remedy-sim-projected { font-size: 12px; font-weight: 600; color: var(--vc-primary-dark); white-space: nowrap; }

/* ── Symptoms Analysis modal ─────────────────────────────── */
.vc-symptom-toolbar {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 8px 10px; margin-bottom: 12px; background: #FFF8E7; border-radius: 8px;
    font-size: 13px; font-weight: 600; clear: both;
}
.vc-symptom-count { color: var(--vc-text-muted); font-weight: 500; }
.vc-symptom-group { margin-bottom: 16px; }
.vc-symptom-group h4 {
    margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--vc-text-muted);
}
.vc-symptom-row {
    display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px;
    border-radius: 8px; font-size: 13px; cursor: pointer; line-height: 1.45;
}
.vc-symptom-row:hover { background: #FFF8E7; }
.vc-symptom-row.confirmed { background: #fef3c7; }
.vc-symptom-row input { margin-top: 3px; flex: 0 0 auto; }
.vc-symptom-source {
    display: block; font-weight: 600; font-size: 12px; color: var(--vc-primary-dark);
}

/* ── Good & Bad Impact Summary modal/report ─────────────────── */
.vc-impact-positive, .vc-impact-negative {
    margin-bottom: 18px; padding: 10px 14px; border-radius: 8px; clear: both;
}
.vc-impact-positive { background: #f0fdf4; border: 1px solid #bbf7d0; }
.vc-impact-negative { background: #fef2f2; border: 1px solid #fecaca; }
.vc-impact-positive h3 { margin: 0 0 8px; font-size: 14px; color: var(--vc-good); }
.vc-impact-negative h3 { margin: 0 0 8px; font-size: 14px; color: var(--vc-danger); }
.vc-impact-positive ul, .vc-impact-negative ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.vc-impact-positive li, .vc-impact-negative li { margin-bottom: 8px; }
.vc-impact-positive li em, .vc-impact-negative li em { color: var(--vc-text-muted); font-style: normal; }

#vc-chartCanvas { display: block; clear: both; }
.vc-chart-head {
    display: flex; gap: 24px; align-items: center; justify-content: center;
    padding: 4px 8px 14px; clear: both; font-size: 14px;
}
.vc-chart-head label { display: flex; gap: 8px; align-items: center; }
.vc-chart-head select {
    background: #fff; color: var(--vc-text); border: 1px solid var(--vc-panel-border);
    border-radius: 6px; padding: 6px 10px; font-size: 13px; min-width: 160px;
}
.vc-chart-body { position: relative; }
.vc-chart-tip {
    position: absolute; z-index: 5; pointer-events: none; display: none;
    background: rgba(31,41,55,.95); color: #fff; padding: 6px 10px; border-radius: 6px;
    font-size: 12.5px; white-space: nowrap; transform: translate(-50%, -110%);
}
.vc-chart-tip.show { display: block; }
.vc-chart-summary {
    font-size: 12.5px; padding: 8px 4px 0; color: var(--vc-text);
}
.vc-chart-summary-ext { color: #1565C0; }
.vc-chart-summary-cut { color: #dc2626; }
.vc-chart-summary-ok { color: #16a34a; }
.vc-chart-foot {
    display: flex; gap: 10px; justify-content: flex-end;
    border-top: 1px solid var(--vc-panel-border); margin-top: 14px; padding: 10px 4px 2px;
}
#vc-printChartBtn { color: #16a34a; border-color: #16a34a; }
#vc-printChartBtn:hover { background: #16a34a; color: #fff; }

/* Devata status-summary table (mirrors the 45-Devata Plotter's report) */
.vc-status-table-wrap { clear: both; }
.vc-status-summary { display: flex; gap: 16px; margin: 4px 0 14px; font-size: 13px; flex-wrap: wrap; }
.vc-status-summary span { color: var(--vc-text-muted); }
.vc-status-summary b { color: var(--vc-text); }
.vc-status-table { border-collapse: collapse; font-size: 13px; min-width: 560px; }
.vc-status-table th, .vc-status-table td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--vc-panel-border); }
.vc-status-table th { color: var(--vc-text-muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.vc-marm-room-input {
    width: 100%; min-width: 220px; background: #fff; color: var(--vc-text);
    border: 1px solid var(--vc-panel-border); border-radius: 6px; padding: 5px 8px; font-size: 12.5px;
}
.vc-marm-violation-summary {
    background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 8px;
    padding: 8px 12px; font-size: 13px; font-weight: 600; margin-bottom: 12px;
}
.vc-marm-violated-row { background: #fef2f2; }
.vc-marm-violation-badge {
    display: inline-block; margin-top: 5px; padding: 2px 8px; border-radius: 20px;
    font-size: 11px; font-weight: 600; background: #fee2e2; color: #b91c1c;
}
.vc-status-pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.vc-status-pill.full { background: #dcfce7; color: #15803d; }
.vc-status-pill.partial { background: #ffedd5; color: #c2410c; }
.vc-status-pill.cut { background: #fee2e2; color: #b91c1c; }
.vc-status-pill.na { background: #f1f5f9; color: #64748b; }
.vc-ext-badge { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; background: #ccfbf1; color: #0f766e; }

/* Report-inclusion checkbox in status tables */
.vc-report-check-cell { white-space: nowrap; }
.vc-report-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--vc-text-muted); cursor: pointer; font-weight: 400; text-transform: none; letter-spacing: normal; }

/* Collapsible per-devata / per-marma-level detail panel — auto-collapsed,
   expands via a plain <button> (not <details><summary>: a native <summary>
   can't safely nest another interactive control, e.g. the per-marma-level
   "Report" checkbox, without an a11y "interactive inside interactive"
   violation — so the toggle button and any extra control are siblings). */
.vc-detail-row td { padding: 0 10px 10px; border-bottom: 1px solid var(--vc-panel-border); }
.vc-detail-details, .vc-marm-level-details .vc-detail-details {
    background: #f8fafc; border: 1px solid var(--vc-panel-border); border-radius: 8px;
    padding: 4px 12px; margin: 4px 0 10px;
}
.vc-detail-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vc-detail-summary-btn {
    cursor: pointer; padding: 8px 4px; font-size: 12.5px; font-weight: 600; color: var(--vc-primary-dark);
    display: flex; align-items: center; gap: 6px; flex: 1; text-align: left;
    background: none; border: none; font-family: inherit;
}
.vc-detail-chevron { color: var(--vc-primary-dark); font-size: 11px; }
.vc-detail-scroll { max-height: 320px; overflow-y: auto; padding: 4px 4px 12px; font-size: 12.5px; line-height: 1.55; }
.vc-detail-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--vc-text-muted); margin-bottom: 8px; }
.vc-detail-meta b { color: var(--vc-text); }
.vc-detail-desc { color: var(--vc-text); margin: 6px 0; }
.vc-detail-details h4 { margin: 10px 0 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--vc-text-muted); }
.vc-detail-details ul { margin: 0 0 6px; padding-left: 18px; }
.vc-detail-details li { margin-bottom: 3px; }
.vc-detail-dos li::marker { color: #16a34a; }
.vc-detail-donts li::marker { color: #dc2626; }
.vc-detail-remedies li::marker { color: #1565C0; }
.vc-detail-empty { color: var(--vc-text-muted); font-style: italic; font-size: 12.5px; }
.vc-marm-level-details { margin-top: 14px; }

/* Devata Status modal — 3 collapsible sections (Quick Glance / Devata
   Report / Detailed Guidance), each independently expand/minimize. */
.vc-devata-section { border: 1px solid var(--vc-panel-border); border-radius: 10px; margin-bottom: 14px; overflow: hidden; }
.vc-devata-section-head {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; background: #f8fafc; border: none; cursor: pointer;
    font-size: 13.5px; font-weight: 700; color: var(--vc-text); text-align: left;
}
.vc-devata-section-head:hover { background: #f1f5f9; }
.vc-devata-section-chevron { color: var(--vc-text-muted); font-size: 12px; }
.vc-devata-section-body { padding: 14px; }

/* Section A: Quick Glance — summary cards */
.vc-status-summary-cards { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.vc-summary-card { flex: 1; min-width: 150px; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--vc-panel-border); border-radius: 8px; }
.vc-summary-card h4 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--vc-text-muted); }
.vc-summary-big { font-size: 24px; font-weight: 700; color: var(--vc-text); }
.vc-summary-names { font-size: 11px; color: var(--vc-text-muted); margin-top: 2px; }
.vc-summary-full { border-left: 3px solid #16a34a; }
.vc-summary-partial { border-left: 3px solid #ea580c; }
.vc-summary-cut { border-left: 3px solid #dc2626; }
.vc-summary-ext { border-left: 3px solid #1565C0; }

/* Section A: coverage bar chart + mini-mandala heatmap, side by side */
.vc-devata-quickglance-charts { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.vc-devata-coverage-chart-wrap { position: relative; flex: 1 1 560px; min-width: 320px; }
.vc-devata-coverage-chart-wrap canvas { width: 100%; height: auto; display: block; }
.vc-devata-mandala-wrap { position: relative; flex: 0 0 auto; }
.vc-devata-mandala-title { font-size: 12px; font-weight: 600; color: var(--vc-text-muted); margin-bottom: 6px; text-align: center; }
.vc-devata-mandala-wrap canvas { width: 220px; height: 220px; display: block; cursor: pointer; border: 1px solid var(--vc-panel-border); border-radius: 6px; }

/* Section B: Devata Report — filter row + table */
.vc-devata-filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.vc-devata-filter-btn.active { background: var(--vc-primary); color: #fff; border-color: var(--vc-primary); }
.vc-status-table-scroll { max-height: 480px; overflow-y: auto; }
.vc-covbar { display: inline-block; width: 46px; height: 7px; background: #e5e7eb; border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 4px; }
.vc-covbar div { height: 100%; }
@keyframes vc-row-pulse { 0%, 100% { background: transparent; } 50% { background: #fef3c7; } }
.vc-row-pulse { animation: vc-row-pulse 0.7s ease-in-out 2; }

/* ── Print report ────────────────────────────────────────── */
@media print {
    .vc-topbar, .vc-steps, .vc-map-tabs, .vc-map-namebox, .vc-tools, .vc-canvas-hand, .vc-canvas-nudge, .vc-canvas-zoom, .vc-canvas-history, .vc-canvas-chakra, .vc-toast, .vc-modeTag, .vc-tooltip, .vc-devata-panel, .vc-chart-modal, .vc-modal { display: none !important; }
}
.vc-print-page { display: none; }
.vc-print-page.active { display: block; padding: 30px; max-width: 900px; margin: 0 auto; color: #1a1a1a; background: #fff; }

/* =========================================================
   ASTROVASTU — birth-chart-driven Shakti Chakra, ported from
   the vastu-devata-v2 Vue chakra tab into plain markup/JS.
   ========================================================= */
.vc-astro-subtitle { font-size: 12.5px; color: var(--vc-text-muted); margin-left: 6px; }
.vc-astro-body { flex: 1 1 auto; display: flex; min-height: 0; overflow: hidden; }
.vc-astro-form-col {
    flex: 0 0 300px; background: var(--vc-panel); border-right: 1px solid var(--vc-panel-border);
    padding: 18px; overflow-y: auto;
}
.vc-astro-form-col h3 { margin: 0 0 8px; font-size: 15px; }
.vc-astro-place-suggest {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    border: 1px solid var(--vc-panel-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(16,24,40,.14);
    z-index: 40; max-height: 220px; overflow-y: auto; display: none;
}
.vc-astro-place-suggest.show { display: block; }
.vc-astro-place-suggest-item { padding: 8px 12px; font-size: 12.5px; cursor: pointer; }
.vc-astro-place-suggest-item:hover { background: #f1f5fb; }
.vc-astro-main { flex: 1 1 auto; min-width: 0; padding: 18px 24px; overflow-y: auto; }
.vc-astro-subpanel { display: none; }
.vc-astro-subpanel.active { display: block; }

/* Reports tab checklist */
.vc-report-check-row {
    display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--vc-text);
    padding: 6px 0; cursor: pointer;
}
.vc-report-check-row input { width: auto; margin: 0; }

/* Live per-module status in the Simple Report modal's "Missing analyses"
   section — replaces a static "leave unticked and it just notes what's
   missing" sentence with an honest checklist, so the reminder is visible in
   the flow instead of easy to skim past. */
.vc-analysis-status-row {
    display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0;
}
.vc-analysis-status-row.vc-analysis-missing { color: #A4243B; }
.vc-analysis-icon { flex: 0 0 auto; }

/* Report language toggle (English / हिंदी) */
.vc-report-lang-toggle { display: flex; gap: 6px; padding: 4px 0 2px; }
.vc-report-lang-btn { flex: 1; font-size: 12.5px; padding: 6px 8px; }
.vc-report-lang-btn.active {
    background: var(--vc-primary, #2563eb); color: #fff;
    border-color: var(--vc-primary, #2563eb);
}

/* D1 birth chart (sidebar, below the form) */
.vc-chart-section {
    margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--vc-panel-border);
}
.vc-chart-section h3 { margin: 0 0 8px; font-size: 14px; color: var(--vc-primary-dark); }
.vc-chart-display { text-align: center; background: #f8fafc; border-radius: 6px; padding: 10px; overflow: visible; }
.vc-chart-display svg { display: block; max-width: 100% !important; width: 100% !important; height: auto !important; margin: 0 auto; }

/* Header / view toggle */
.vc-chakra-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.vc-chakra-title { margin: 0; font-size: 20px; }
.vc-chakra-subtitle { margin: 4px 0 0; font-size: 13px; color: var(--vc-text-muted); }
.vc-chakra-view-toggle { display: flex; gap: 6px; background: #f1f5fb; padding: 4px; border-radius: 10px; }
.vc-chakra-toggle-btn { background: none; border: none; padding: 7px 14px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--vc-text-muted); cursor: pointer; }
.vc-chakra-toggle-btn.active { background: #fff; color: var(--vc-primary-dark); box-shadow: 0 1px 3px rgba(16,24,40,.1); }

/* Layout: canvas + detail panel */
.vc-chakra-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .vc-chakra-layout { grid-template-columns: 1fr; } }
.vc-chakra-canvas-wrap { display: flex; align-items: center; justify-content: center; min-height: 320px; }
.vc-chakra-svg { width: 100%; max-width: 560px; height: auto; }
.vc-chakra-dir-cardinal { font-size: 15px; font-weight: 700; fill: #b71c1c; }
.vc-chakra-dir-sub { font-size: 11px; font-weight: 600; fill: #475569; }
.vc-chakra-dir-16 { font-size: 8.5px; fill: #94a3b8; }
.vc-chakra-seg { cursor: pointer; transition: filter .12s; }
.vc-chakra-seg:hover { filter: brightness(1.08); }
.vc-chakra-seg.selected { stroke-width: 4; filter: drop-shadow(0 0 4px rgba(184,134,11,.7)); }
.vc-chakra-seg-label { font-weight: 700; pointer-events: none; }
.vc-chakra-seg-label.tiny { font-size: 8px; }
.vc-chakra-seg-label.small { font-size: 10px; }
.vc-chakra-seg-label.center-label { font-size: 13px; }
.vc-chakra-seg.seg-dimmed { opacity: .18; }
.vc-chakra-seg.seg-theme-lit { filter: drop-shadow(0 0 7px rgba(218,165,32,.9)); stroke-width: 3 !important; }

/* Square / traditional grid views */
.vc-chakra-square, .vc-chakra-trad { width: 100%; max-width: 520px; margin: 0 auto; }
.vc-chakra-square-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; aspect-ratio: 1/1; }
.vc-chakra-trad-grid { display: grid; grid-template-columns: repeat(9, 1fr); grid-template-rows: repeat(9, 1fr); gap: 2px; aspect-ratio: 1/1; }
.vc-chakra-sq-cell, .vc-chakra-trad-cell {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: 2px solid transparent; border-radius: 4px; cursor: pointer; text-align: center; overflow: hidden;
}
.vc-chakra-sq-cell.selected, .vc-chakra-trad-cell.selected { box-shadow: 0 0 0 3px rgba(184,134,11,.5) inset; }
.vc-sq-empty, .vc-trad-empty { background: transparent; cursor: default; }
.vc-sq-good { background: rgba(46,125,50,.85); }
.vc-sq-bad { background: rgba(183,28,28,.85); }
.vc-sq-neutral { background: rgba(21,101,192,.80); }
.vc-sq-inactive { background: #fff8e7; }
.vc-sq-name { font-size: 8px; font-weight: 700; line-height: 1.1; }
.vc-sq-code { font-size: 7px; opacity: .8; }
.vc-trad-name { font-size: 8px; font-weight: 700; line-height: 1.1; }
.vc-trad-code { font-size: 7px; opacity: .8; }
.vc-sq-dir-label { font-size: 9px; color: var(--vc-text-muted); }

/* Detail panel */
.vc-chakra-detail-panel { position: sticky; top: 0; }
.vc-chakra-detail-card { background: var(--vc-panel); border: 1px solid var(--vc-panel-border); border-radius: 10px; overflow: hidden; }
.vc-cd-accent { height: 6px; }
.vc-cd-body { padding: 14px 16px; }
.vc-cd-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.vc-cd-status-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.vc-cd-status-badge.good { background: #dcfce7; color: #15803d; }
.vc-cd-status-badge.bad { background: #fee2e2; color: #b91c1c; }
.vc-cd-status-badge.neutral { background: #dbeafe; color: #1565c0; }
.vc-cd-status-badge.inactive { background: #f1f5f9; color: #64748b; }
.vc-cd-house-badge { font-size: 11px; font-weight: 700; background: #f1f5fb; color: var(--vc-primary-dark); padding: 3px 9px; border-radius: 20px; }
.vc-cd-name { margin: 4px 0 2px; font-size: 18px; }
.vc-cd-punch { margin: 0 0 10px; font-size: 12.5px; color: var(--vc-text-muted); font-style: italic; }
.vc-cd-identity-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.vc-cd-location-badge { border: 1px solid; border-radius: 20px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; }
.vc-cd-rashi-badge { font-size: 12px; color: var(--vc-text-muted); }
.vc-cd-rows { font-size: 12.5px; margin-bottom: 10px; }
.vc-cd-row { display: flex; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--vc-panel-border); }
.vc-cd-label { color: var(--vc-text-muted); flex: 0 0 90px; }
.vc-cd-value { color: var(--vc-text); }
.vc-cd-section h4 { margin: 12px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--vc-text-muted); }
.vc-cd-keyword { display: inline-block; background: #f1f5fb; color: var(--vc-primary-dark); font-size: 11px; padding: 2px 8px; border-radius: 20px; margin: 2px 3px 0 0; }
.vc-cd-mantra { font-style: italic; color: var(--vc-primary-dark); font-size: 12.5px; }
.vc-cd-empty { padding: 30px 16px; text-align: center; color: var(--vc-text-muted); font-size: 13px; }
.vc-cd-brahma-warn { margin-top: 10px; padding: 8px 10px; background: #fef3c7; border: 1px solid #fbbf24; border-radius: 8px; font-size: 11.5px; color: #92400e; }

/* Life themes — horizontal layout, below the Shakti Chakra header */
.vc-chakra-themes-section { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--vc-panel-border); }
.vc-chakra-themes-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.vc-chakra-themes-title { margin: 0; font-size: 14px; }
.vc-chakra-theme-clear { font-size: 12px; color: var(--vc-primary-dark); background: none; border: none; cursor: pointer; }
.vc-chakra-theme-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.vc-chakra-theme-card {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: var(--vc-panel); border: 2px solid var(--vc-panel-border); border-radius: 14px;
    padding: 12px 14px; min-width: 84px; font-size: 12px; cursor: pointer; text-align: center;
    font-family: inherit; transition: all .18s;
}
.vc-chakra-theme-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(16,24,40,.12); border-color: var(--vc-primary); }
.vc-chakra-theme-card.active { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(184,134,11,.25); }
.vc-chakra-theme-card-icon { font-size: 20px; }
.vc-chakra-theme-card-label { font-weight: 600; margin-top: 2px; font-size: 11.5px; }
.vc-ctc-active-dot { position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 50%; }

.vc-chakra-theme-result { margin-top: 14px; background: var(--vc-panel); border: 1px solid var(--vc-panel-border); border-radius: 14px; overflow: hidden; }
.vc-ctr-header { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 12px 14px; border-left: 5px solid var(--vc-primary); background: #f8fafc; }
.vc-ctr-icon { font-size: 22px; flex-shrink: 0; }
.vc-ctr-title { font-size: 13px; font-weight: 700; }
.vc-ctr-houses { font-size: 11px; color: var(--vc-text-muted); margin-top: 2px; }
.vc-ctr-bv-warn { font-size: 11px; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; border-radius: 6px; padding: 5px 9px; margin-top: 6px; line-height: 1.4; }
.vc-ctr-count { background: var(--vc-primary); color: #fff; border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.vc-ctr-segs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; }
.vc-ctr-seg-chip { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all .15s; }
.vc-ctr-seg-chip:hover { transform: scale(1.05); }
.vc-ctr-seg-chip.vc-chip-good { background: rgba(46,125,50,.15); color: #2e7d32; border-color: rgba(46,125,50,.4); }
.vc-ctr-seg-chip.vc-chip-bad { background: rgba(183,28,28,.12); color: #b71c1c; border-color: rgba(183,28,28,.35); }
.vc-ctr-seg-chip.vc-chip-neutral { background: rgba(21,101,192,.12); color: #1565c0; border-color: rgba(21,101,192,.35); }
.vc-ctr-seg-chip.vc-chip-inactive { background: #f1f5fb; color: var(--vc-text-muted); border-color: var(--vc-panel-border); }

/* Birth-place autocomplete + form spacing reuse .vc-field/.vc-btn from Map view */

/* =========================================================
   ASTROVASTU — Overview & Your Zones tabs, ported verbatim
   from vastu-devata-v2/styles.css (same classes, same rules).
   ========================================================= */
:root {
    --color-primary: #B8860B;
    --color-primary-dark: #8B6508;
    --color-secondary: #7B4F9E;
    --color-accent: #FFF8E7;
    --color-surface: #FFFFFF;
    --color-surface-alt: #FFF8E7;
    --color-border: #E8D5A0;
    --color-divider: #F0E4B8;
    --color-text-dark: #2C1A00;
    --color-text-medium: #5C3D00;
    --color-text-muted: #8B6508;
    --color-status-good: #2E7D32;
    --color-status-good-bg: #E8F5E9;
    --color-status-good-border: #A5D6A7;
    --color-status-bad: #B71C1C;
    --color-status-bad-bg: #FFEBEE;
    --color-status-bad-border: #EF9A9A;
    --color-status-neutral: #1565C0;
    --color-status-neutral-bg: #E3F2FD;
    --color-status-neutral-border: #90CAF9;
}

/* ─── Data Sections ──────────────────────────────────────────────────────── */
.data-section {
    background: var(--color-surface);
    padding: 18px; border-radius: 8px;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 6px rgba(184, 134, 11, 0.06);
}
.data-section h2 {
    color: var(--color-primary); font-size: 16px;
    margin: 0 0 12px 0; padding-bottom: 8px;
    border-bottom: 1px solid var(--color-divider);
}

.data-display {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--color-surface-alt);
    border-radius: 6px;
    border: 1px solid var(--color-divider);
    padding: 2px;
}

/* ─── Tables ─────────────────────────────────────────────────────────────── */
.planet-table, .direction-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 500px;
}
.planet-table th, .direction-table th {
    background-color: var(--color-primary);
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    position: sticky; top: 0; z-index: 1;
}
.planet-table td, .direction-table td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid var(--color-divider);
    vertical-align: middle;
}
.planet-table tr:hover, .direction-table tr:hover {
    background-color: var(--color-surface-alt);
}
.planet-table tr:last-child td, .direction-table tr:last-child td {
    border-bottom: none;
}

/* ─── Status Badges ──────────────────────────────────────────────────────── */
.status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 12px;
    font-size: 12px; font-weight: 700;
    white-space: nowrap;
}
.status-badge.good {
    background-color: var(--color-status-good-bg);
    color: var(--color-status-good);
    border: 1px solid var(--color-status-good-border);
}
.status-badge.bad {
    background-color: var(--color-status-bad-bg);
    color: var(--color-status-bad);
    border: 1px solid var(--color-status-bad-border);
}
.status-badge.neutral {
    background-color: var(--color-status-neutral-bg);
    color: var(--color-status-neutral);
    border: 1px solid var(--color-status-neutral-border);
}
td.good { background-color: var(--color-status-good-bg); }
td.bad  { background-color: var(--color-status-bad-bg); }
td.neutral { background-color: var(--color-status-neutral-bg); }

.reason-cell { font-size: 0.78rem; color: var(--color-text-muted); white-space: normal; line-height: 1.4; min-width: 180px; }
.mapped-planets-cell { font-size: 0.78rem; color: var(--color-text-medium); font-weight: 500; }

.zone-chip {
    display: inline-block;
    background: rgba(74,158,255,0.12);
    color: #4a9eff;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.72rem;
    font-weight: 600;
    margin: 1px 2px 1px 0;
}
.zone-chip.muted { background: transparent; color: var(--color-text-muted); }

.devata-chip {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 1px 4px 1px 0;
    white-space: nowrap;
}
.devata-chip.small { font-size: 10px; padding: 1px 5px; }

.house-devata-table { table-layout: auto; }
.house-devata-table td, .house-devata-table th { white-space: nowrap; }
.house-devata-table td.reason-cell { white-space: normal; }

/* Section-level collapsibles — display toggled via inline style in JS (mirrors Vue v-show) */
.collapsible-section { margin-bottom: 16px; }
.section-collapsible-trigger {
    background: rgba(201,166,74,0.10);
    border: 1px solid rgba(201,166,74,0.25);
    border-radius: 8px;
    color: var(--color-text-dark);
    cursor: pointer; padding: 12px 18px;
    width: 100%; text-align: left;
    font-size: 15px; font-weight: 600;
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px;
    transition: background 0.2s;
}
.section-collapsible-trigger:hover { background: rgba(201,166,74,0.18); }
.collapsible-trigger .icon { transition: transform 0.3s ease-out; font-style: normal; }
.collapsible-section .collapsible-content {
    max-height: none;
    overflow: visible;
    padding: 12px 0 0 0;
}
.dasha-reading-subtitle {
    font-size: 0.78rem; color: var(--color-text-muted); margin: 0 0 14px 0; font-style: italic;
}

/* Vastu Summary Section */
.vastu-summary-section { margin-bottom: 20px; }
.vastu-summary-section h2 { font-size: 1rem; font-weight: 700; color: var(--color-primary-dark); margin-bottom: 12px; }

.summary-group { margin-bottom: 16px; }
.summary-group-title {
    font-size: 0.82rem; font-weight: 700; margin: 0 0 6px 0;
    padding: 4px 10px; border-radius: 6px; display: inline-block;
}
.summary-group-subtitle {
    font-size: 0.76rem; color: var(--color-text-muted); margin: 0 0 6px 0; font-style: italic;
}
.summary-group-good { background: #e8f5e9; color: #2e7d32; }
.summary-group-bad  { background: #ffebee; color: #b71c1c; }

.summary-mini-table {
    width: 100%; border-collapse: collapse; font-size: 0.76rem;
    table-layout: auto;
}
.summary-mini-table th {
    background: var(--color-surface-alt); color: var(--color-text-medium);
    padding: 4px 8px; text-align: left; font-weight: 600; white-space: nowrap;
    border-bottom: 1px solid var(--color-border);
}
.summary-mini-table td {
    padding: 4px 8px; border-bottom: 1px solid var(--color-divider);
    vertical-align: top; white-space: nowrap;
}
.summary-mini-table td:last-child { white-space: normal; }

.dir-badge {
    display: inline-block; padding: 2px 7px; border-radius: 10px;
    font-size: 0.72rem; font-weight: 600;
}
.good-dir { background: #e8f5e9; color: #2e7d32; }
.bad-dir  { background: #ffebee; color: #b71c1c; }

/* Ashta Siddhi success-flow strip */
.ashta-flow-strip {
    background: linear-gradient(135deg, rgba(74,158,255,0.05), rgba(201,166,74,0.06));
    border: 1px solid rgba(201,166,74,0.22);
    border-radius: 10px; padding: 12px 16px; margin-bottom: 18px;
}
.ashta-flow-title {
    font-size: 0.78rem; font-weight: 700; color: var(--color-text-medium);
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px;
}
.ashta-flow-steps {
    display: flex; align-items: center; gap: 4px;
    flex-wrap: wrap;
}
.ashta-step {
    flex: 1; min-width: 90px;
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: 8px; padding: 8px 10px; text-align: center;
    transition: border-color 0.2s;
}
.ashta-step-bad  { border-color: rgba(255,90,90,0.5); background: rgba(255,90,90,0.05); }
.ashta-step-good { border-color: rgba(74,232,100,0.4); background: rgba(74,232,100,0.05); }
.ashta-step-dir  { font-size: 0.68rem; color: #B8860B; font-weight: 700; margin-bottom: 3px; }
.ashta-step-label { font-size: 0.75rem; font-weight: 600; margin-bottom: 3px; }
.ashta-step-devatas { font-size: 0.68rem; color: var(--color-text-muted); }
.ashta-flow-arrow {
    font-size: 1rem; color: var(--color-text-muted);
    flex-shrink: 0; padding: 0 2px;
}

/* ── Good Life Houses to Activate (beginner action list) ── */
.life-houses-section {
    border: 1px solid rgba(201,166,74,0.35);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(201,166,74,0.05), rgba(74,232,212,0.04));
    margin-bottom: 18px;
    overflow: hidden;
}
.life-houses-count {
    display: inline-block; margin-left: 8px;
    background: rgba(201,166,74,0.18); color: #B8860B;
    border-radius: 10px; padding: 2px 9px; font-size: 12px; font-weight: 700;
}
.life-houses-intro {
    font-size: 0.82rem; color: var(--color-text-medium);
    line-height: 1.5; margin: 4px 0 14px;
    padding: 9px 12px; background: rgba(201,166,74,0.08);
    border-radius: 7px; border-left: 3px solid #B8860B;
}
.life-houses-cards {
    display: flex; flex-direction: column; gap: 12px;
}
.life-house-card {
    border: 1px solid var(--color-border);
    border-radius: 10px; padding: 13px 15px;
    background: var(--color-surface);
    border-left: 4px solid #4ae8d4;
}
.life-house-card.lh-good    { border-left-color: #2E7D32; }
.life-house-card.lh-neutral { border-left-color: #b8b8c4; }

.life-house-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 8px; flex-wrap: wrap;
}
.lh-area-block { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.lh-area {
    font-size: 1rem; font-weight: 700;
}
.lh-house-badge {
    font-size: 0.72rem; font-weight: 700; color: #B8860B;
    background: rgba(201,166,74,0.12); border: 1px solid rgba(201,166,74,0.3);
    border-radius: 8px; padding: 2px 9px;
}
.lh-status-badge {
    font-size: 0.72rem; font-weight: 700; border-radius: 10px;
    padding: 3px 10px; white-space: nowrap;
}
.lh-status-badge.good    { background: rgba(46,204,113,0.14); color: #2E7D32; border: 1px solid rgba(46,204,113,0.35); }
.lh-status-badge.neutral { background: rgba(150,150,160,0.14); color: #6b6b78; border: 1px solid rgba(150,150,160,0.3); }

.lh-benefit {
    font-size: 0.82rem; color: var(--color-text-medium);
    line-height: 1.45; margin-bottom: 9px;
}
.lh-meta-row {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    margin-bottom: 11px;
}
.lh-meta-chip {
    font-size: 0.74rem; color: var(--color-text-medium);
    background: var(--color-surface-alt); border-radius: 7px; padding: 3px 9px;
}
.lh-dir-chip { background: rgba(74,158,255,0.1); color: #1a5fa8; }
.lh-zone-chip {
    font-size: 0.7rem; color: #7B4F9E;
    background: rgba(168,122,255,0.12); border-radius: 7px; padding: 3px 8px; font-weight: 600;
}

/* Devata block within a life-house card */
.lh-devatas { display: flex; flex-direction: column; gap: 11px; }
.lh-devata-block {
    border-top: 1px solid var(--color-divider); padding-top: 10px;
}
.lh-devata-head {
    display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 4px;
}
.lh-devata-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.lh-devata-name { font-size: 0.9rem; font-weight: 700; }
.lh-devata-punch { font-size: 0.74rem; color: var(--color-text-muted); font-style: italic; }
.lh-devata-role { font-size: 0.76rem; color: var(--color-text-medium); margin-bottom: 6px; }
.lh-activate-label {
    font-size: 0.74rem; font-weight: 700; color: #B8860B;
    text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;
}
.lh-remedies { margin: 0 0 8px; padding-left: 18px; }
.lh-remedies li { font-size: 0.8rem; margin-bottom: 4px; line-height: 1.45; }
.lh-bhog-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 5px; }
.lh-bhog-chip {
    font-size: 0.74rem; color: var(--color-text-medium);
    background: var(--color-surface-alt); border-radius: 6px; padding: 3px 9px;
}
.lh-mantra {
    font-size: 0.76rem; color: var(--color-text-medium);
    background: rgba(201,166,74,0.07); border-radius: 6px; padding: 5px 9px;
    line-height: 1.4;
}
.lh-no-devata {
    font-size: 0.8rem; color: var(--color-text-muted);
    font-style: italic; padding: 6px 0;
}

/* No favourable houses fallback */
.life-houses-empty {
    text-align: center; padding: 16px 12px;
    background: var(--color-surface-alt); border-radius: 9px;
}
.life-houses-empty h4 { font-size: 0.9rem; margin: 0 0 6px; }
.life-houses-empty p { font-size: 0.8rem; color: var(--color-text-medium); margin: 0; line-height: 1.5; }

/* Skipped (afflicted) houses transparency note */
.life-houses-skipped {
    margin-top: 14px; padding: 11px 13px;
    background: rgba(255,90,90,0.05); border: 1px solid rgba(255,90,90,0.2);
    border-radius: 9px;
}
.lh-skipped-title { font-size: 0.8rem; font-weight: 700; color: #b71c1c; margin: 0 0 5px; }
.lh-skipped-note { font-size: 0.76rem; color: var(--color-text-medium); margin: 0 0 8px; line-height: 1.45; }
.lh-skipped-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lh-skipped-chip {
    font-size: 0.72rem; color: #b71c1c;
    background: rgba(255,90,90,0.1); border: 1px solid rgba(255,90,90,0.25);
    border-radius: 7px; padding: 3px 9px; text-decoration: line-through; opacity: 0.85;
}

/* Results summary banner */
.results-banner {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--color-accent);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 20px;
    align-items: center;
}
.results-banner-chip {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.results-banner-chip.good { background: var(--color-status-good-bg); color: var(--color-status-good); }
.results-banner-chip.bad { background: var(--color-status-bad-bg); color: var(--color-status-bad); }
.results-banner-chip.neutral { background: var(--color-status-neutral-bg); color: var(--color-status-neutral); }
.results-banner-chip.dasha { background: var(--color-accent); color: var(--color-primary); border: 1px solid var(--color-border); }

/* ── Dasha Pressure Strip ── */
.dasha-pressure-strip { background: linear-gradient(135deg, #1a0a2e 0%, #2d1654 100%); border: 1px solid #7B4F9E44; border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.dasha-pressure-title { color: #7B4F9E; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.dasha-pressure-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dasha-pressure-chip { display: flex; align-items: center; gap: 6px; background: rgba(183,71,71,0.15); border: 1px solid #B7474744; border-radius: 20px; padding: 4px 10px; }
.dasha-pressure-planet { font-weight: 700; color: #f08080; font-size: 12px; }
.dasha-pressure-dir { color: #e0a0a0; font-size: 12px; }
.dasha-pressure-tag { color: #c07070; font-size: 11px; background: rgba(183,71,71,0.2); border-radius: 10px; padding: 1px 6px; }
.dasha-pressure-summary { color: #7B4F9E; font-size: 12px; font-style: italic; margin-left: 4px; }
.dasha-pressure-none { color: #9cb8a0; font-size: 13px; font-style: italic; }
.dasha-pressure-lords-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.dasha-pressure-lord-chip { display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; padding: 6px 14px; }
.dasha-pressure-lord-chip.mahadasha { border-color: #B8860B66; background: rgba(218,165,32,0.12); }
.dasha-pressure-lord-chip.antardasha { border-color: #7B4F9E66; background: rgba(201,166,245,0.08); }
.dasha-pressure-lord-chip.subperiod { border-color: rgba(255,255,255,0.1); }
.dpl-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: #7B4F9E; opacity: 0.7; }
.dpl-planet { font-size: 15px; font-weight: 700; color: #fff; }
.dasha-pressure-lord-sep { color: #7B4F9E; opacity: 0.4; font-size: 18px; }

/* ── Dasha Planets — Devatas Activated card ── */
.dasha-devatas-card { background: linear-gradient(135deg, #1a0a2e 0%, #2d1654 100%); border: 1px solid #7B4F9E44; border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.dasha-devatas-title { color: #7B4F9E; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.dasha-devatas-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.dasha-devatas-row:first-of-type { border-top: none; padding-top: 0; }
.ddr-planet { display: flex; flex-direction: column; align-items: flex-start; min-width: 90px; }
.ddr-planet-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: #7B4F9E; opacity: 0.7; }
.ddr-planet-name { font-size: 14px; font-weight: 700; color: #fff; }
.ddr-direction { font-size: 12px; color: #e0a0a0; background: rgba(183,71,71,0.15); border: 1px solid #B7474744; border-radius: 12px; padding: 3px 10px; white-space: nowrap; }
.ddr-devatas { display: flex; flex-wrap: wrap; gap: 2px 6px; flex: 1; min-width: 160px; }
.ddr-devatas .devata-chip { font-size: 11px; }

/* =========================================================
   ASTROVASTU — Dasha (life reading only) & All Devatas tabs,
   ported from vastu-devata-v2/styles.css (same classes/rules).
   ========================================================= */

/* ── Dasha Life Reading ── */
.dasha-reading-section { margin-bottom: 20px; }
.dasha-lords-inline { font-size: 0.78rem; font-weight: 600; color: var(--color-secondary); margin-left: 8px; opacity: 0.9; }
.dasha-group { margin-bottom: 18px; border-radius: 10px; overflow: hidden; }
.dasha-group-title { font-size: 0.88rem; font-weight: 700; margin: 0 0 10px 0; padding: 7px 14px; border-radius: 8px; }
.dasha-group-challenges .dasha-group-title { background: #FFEBEE; color: #b71c1c; border-left: 4px solid #B71C1C; }
.dasha-group-favorable  .dasha-group-title { background: #E8F5E9; color: #2e7d32; border-left: 4px solid #2E7D32; }
.dasha-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; }
.dasha-group-challenges .dasha-item { border-left: 3px solid #ef9a9a; }
.dasha-group-favorable  .dasha-item { border-left: 3px solid #a5d6a7; }
.dasha-item-header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.dasha-planet-badge { font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 12px; }
.dasha-planet-badge.bad  { background: #ffebee; color: #b71c1c; }
.dasha-planet-badge.good { background: #e8f5e9; color: #2e7d32; }
.dasha-period-label { font-size: 0.72rem; color: var(--color-text-muted); font-weight: 500; }
.dasha-tag { font-size: 0.68rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.dasha-tag.bad  { background: #FFEBEE; color: #B71C1C; }
.dasha-tag.good { background: #E8F5E9; color: #2E7D32; }
.dasha-house-badge { font-size: 0.72rem; color: var(--color-text-medium); background: var(--color-surface-alt); padding: 2px 8px; border-radius: 8px; font-weight: 600; }
.dasha-why { font-size: 0.8rem; color: var(--color-text-dark); line-height: 1.5; margin: 4px 0 8px 0; }
.dasha-vastu-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 0.75rem; }
.dasha-vastu-label { font-size: 0.7rem; font-weight: 600; color: var(--color-text-muted); white-space: nowrap; }
.dasha-empty { font-size: 0.8rem; color: var(--color-text-muted); font-style: italic; text-align: center; padding: 16px 0; }
.dasha-item-devatas { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

/* ── Dasha summary cards (Mahadasha/Antardasha/Sub-Period + Activated Zones) ── */
.summary-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; }
.summary-card { background: #fff; border: 1px solid var(--color-border); border-radius: 10px; padding: 16px; border-top-width: 3px; }
.summary-card.dasha-card { border-top-color: var(--color-primary); }
.summary-card.zones-card { border-top-color: var(--color-status-good); }
.summary-card-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #8B6508; margin-bottom: 6px; }
.summary-card-value { font-size: 18px; font-weight: 700; color: #2C1A00; }
.summary-card-dates { font-size: 12px; color: var(--color-text-medium); margin-top: 3px; }
.zones-counts { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.zone-count { font-size: 13px; font-weight: 600; }
.zone-count.good { color: var(--color-status-good); }
.zone-count.bad { color: var(--color-status-bad); }
.zone-count.neutral { color: var(--color-status-neutral); }
.dasha-summary-section { margin-bottom: 20px; }
.dasha-summary-title { font-size: 16px; font-weight: 700; color: var(--color-primary-dark); margin: 0 0 12px; }

/* ── Devata cards (All Devatas tab) ── */
.devata-card {
    background: #fff; border: 1px solid var(--color-border); border-radius: 12px;
    overflow: hidden; transition: all 0.25s; display: flex; flex-direction: column;
}
.devata-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(184, 134, 11, 0.14); border-color: #E8D5A0; }
.card-accent { height: 3px; width: 100%; }
.card-header { padding: 14px 16px 10px; display: flex; align-items: flex-start; gap: 12px; }
.card-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.card-title-area h2 { font-size: 15px; font-weight: 700; color: #2C1A00; margin: 0; }
.card-punchline { font-size: 11px; color: #8B6508; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; }
.badges { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.badge { padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; text-transform: uppercase; }
.badge-location { background: rgba(184, 134, 11, 0.08); color: #8B6508; border: 1px solid rgba(184, 134, 11, 0.2); }
.badge-zone { background: rgba(232, 120, 240, 0.1); color: #7B4F9E; border: 1px solid rgba(232, 120, 240, 0.3); }
.activation-badge { margin: 0 16px 8px; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; display: inline-block; }
.activation-badge.good { background: var(--color-status-good-bg); color: var(--color-status-good); }
.activation-badge.bad { background: var(--color-status-bad-bg); color: var(--color-status-bad); }
.activation-badge.neutral { background: var(--color-status-neutral-bg); color: var(--color-status-neutral); }

.card-tabs { display: flex; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); background: #fffbf0; overflow-x: auto; }
.tab-btn { padding: 8px 12px; background: none; border: none; color: #8B6508; font-size: 11px; text-transform: uppercase; cursor: pointer; white-space: nowrap; font-weight: 600; position: relative; transition: color 0.2s; }
.tab-btn:hover { color: var(--color-primary); }
.tab-btn.active { color: var(--color-primary); }
.tab-btn.active::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--color-primary); border-radius: 2px 2px 0 0; }
.tab-panel { display: none; padding: 14px 16px; }
.tab-panel.active { display: block; }

.dos-donts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .dos-donts-grid { grid-template-columns: 1fr; } }
.dos-block h4, .donts-block h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 8px 0; }
.dos-block h4 { color: #2E7D32; }
.donts-block h4 { color: #B71C1C; }
.dos-block ul, .donts-block ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.dos-block li, .donts-block li { font-size: 12px; color: var(--color-text-dark); padding-left: 16px; position: relative; line-height: 1.4; }
.dos-block li::before { content: "✓"; color: #2E7D32; position: absolute; left: 0; font-weight: 700; }
.donts-block li::before { content: "✗"; color: #B71C1C; position: absolute; left: 0; font-weight: 700; }

.remedies-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.remedies-list li { padding: 7px 10px 7px 28px; background: rgba(184, 134, 11, 0.04); border: 1px solid rgba(184, 134, 11, 0.12); border-radius: 6px; position: relative; font-size: 13px; color: var(--color-text-dark); line-height: 1.4; }
.remedies-list li::before { content: "◈"; color: #B8860B; position: absolute; left: 10px; font-size: 12px; }

.imbalance-box { background: rgba(239, 68, 68, 0.04); border: 1px solid rgba(239, 68, 68, 0.15); border-radius: 6px; padding: 10px 12px; font-size: 13px; color: var(--color-text-dark); line-height: 1.5; }

.bhog-panel { display: flex; flex-direction: column; gap: 8px; }
.bhog-row { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--color-divider); }
.bhog-row:last-child { border-bottom: none; }
.bhog-label { color: #B8860B; min-width: 70px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 1px; }
.bhog-value { font-size: 13px; color: var(--color-text-dark); flex: 1; line-height: 1.4; }
.mantra-box { background: rgba(184, 134, 11, 0.05); border: 1px solid rgba(184, 134, 11, 0.15); border-radius: 6px; padding: 10px 12px; color: #8B6508; font-style: italic; font-size: 13px; line-height: 1.6; }

.keyword-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.keyword-tag { padding: 2px 7px; border-radius: 3px; font-size: 9px; font-weight: 600; background: rgba(184, 134, 11, 0.06); color: #8B6508; border: 1px solid rgba(184, 134, 11, 0.15); }

.rashi-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 5px; }
.rashi-meta-badge { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 3px; border: 1px solid; background: rgba(255, 255, 255, 0.04); white-space: nowrap; }
.rashi-meta-item { font-size: 10px; color: #8B6508; white-space: nowrap; }

.kona-badge { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 2px 9px; border-radius: 10px; background: rgba(201,166,74,0.15); color: #B8860B; border: 1px solid rgba(201,166,74,0.35); margin-bottom: 6px; }
.in-chart-note { background: linear-gradient(135deg, rgba(74,158,255,0.06), rgba(201,166,74,0.06)); border: 1px solid rgba(74,158,255,0.25); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.core-role-static { background: rgba(201,166,74,0.06); border: 1px solid rgba(201,166,74,0.2); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.core-role-line { font-size: 0.82rem; color: var(--color-text-medium); margin-bottom: 4px; }
.extension-line { font-size: 0.78rem; color: var(--color-text-muted); margin-bottom: 4px; font-style: italic; }
.success-flow-line { font-size: 0.76rem; color: #B8860B; margin-bottom: 6px; padding: 3px 7px; background: rgba(201,166,74,0.1); border-radius: 4px; }
.in-chart-callout { display: flex; gap: 8px; align-items: flex-start; font-size: 0.82rem; color: var(--color-text-medium); margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(74,158,255,0.15); }
.in-chart-icon { font-size: 1rem; flex-shrink: 0; line-height: 1.4; }
.correction-note { font-size: 0.78rem; color: var(--color-text-muted); background: rgba(255,184,74,0.08); border: 1px solid rgba(255,184,74,0.25); border-radius: 6px; padding: 8px 10px; margin-top: 10px; }

.key-functions-block { margin: 12px 0 10px; }
.kf-title { font-size: 0.8rem; font-weight: 700; color: var(--color-text-medium); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.kf-list { margin: 0; padding-left: 18px; }
.kf-list li { font-size: 0.82rem; margin-bottom: 4px; line-height: 1.45; }

.partner-badge { display: flex; gap: 8px; align-items: flex-start; font-size: 0.8rem; background: rgba(232,120,240,0.08); border: 1px solid rgba(232,120,240,0.25); border-radius: 7px; padding: 8px 11px; margin: 10px 0; }
.partner-icon { font-size: 1rem; flex-shrink: 0; color: #7B4F9E; }

.real-examples-block { margin-top: 14px; border-top: 1px solid var(--color-divider); padding-top: 12px; }
.examples-title { font-size: 0.8rem; font-weight: 700; color: var(--color-text-medium); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 7px; }
.examples-list { margin: 0; padding-left: 18px; }
.examples-list li { font-size: 0.8rem; margin-bottom: 5px; line-height: 1.45; }

.extra-remedies-block { margin-top: 14px; border-top: 1px solid var(--color-divider); padding-top: 12px; }
.extra-remedies-title { font-size: 0.78rem; font-weight: 700; color: #B8860B; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 7px; }
.fud-row { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; font-size: 0.82rem; }

.symptoms-table-block { margin-top: 14px; border-top: 1px solid var(--color-divider); padding-top: 12px; }
.symptoms-title { font-size: 0.8rem; font-weight: 700; color: var(--color-text-medium); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.symptoms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 500px) { .symptoms-grid { grid-template-columns: 1fr; } }
.symptoms-col { border-radius: 7px; padding: 10px 12px; }
.weak-col { background: rgba(255,90,90,0.06); border: 1px solid rgba(255,90,90,0.2); }
.high-col { background: rgba(255,184,74,0.07); border: 1px solid rgba(255,184,74,0.25); }
.symptoms-col-header { font-size: 0.77rem; font-weight: 700; margin-bottom: 7px; color: var(--color-text-medium); }
.weak-col .symptoms-col-header { color: #b71c1c; }
.high-col .symptoms-col-header { color: #8a5f00; }
.symptoms-col ul { margin: 0; padding-left: 16px; }
.symptoms-col ul li { font-size: 0.78rem; margin-bottom: 4px; line-height: 1.4; }

/* ── All Devatas: search/filter controls + grid wrapper ──
   (these wrapper classes have no upstream CSS in vastu-devata-v2 —
   minimal layout added here so the ported controls aren't unstyled) */
.devata-section-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.devata-section-header h2 { margin: 0; font-size: 17px; color: var(--color-primary-dark); }
.devata-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.search-wrap-vastu { display: flex; }
.devata-search-input { padding: 7px 12px; border: 1px solid var(--color-border); border-radius: 8px; font-size: 13px; width: 200px; outline: none; background: var(--color-surface); color: var(--color-text-dark); }
.devata-search-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.15); }
.filter-row-vastu { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn-vastu { padding: 5px 12px; border-radius: 20px; border: 1px solid var(--color-border); background: transparent; color: #8B6508; font-size: 11px; font-weight: 600; text-transform: uppercase; cursor: pointer; }
.filter-btn-vastu:hover { background: var(--color-surface-alt); border-color: var(--color-primary); }
.filter-btn-vastu.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.toggle-all-btn { padding: 5px 14px; border-radius: 20px; border: 1px solid var(--color-primary); color: var(--color-primary); background: transparent; font-size: 11px; font-weight: 600; cursor: pointer; }
.toggle-all-btn:hover { background: var(--color-primary); color: #fff; }
.no-results { text-align: center; padding: 24px; color: var(--color-text-muted); font-style: italic; }
.devata-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }

/* ── All Devatas: Grid View / Classical Text toggle + Classical Text cards ── */
.devata-view-toggle { display: flex; gap: 6px; padding: 3px; border-radius: 22px; background: var(--color-surface-alt); border: 1px solid var(--color-border); }
.devata-view-toggle-btn { padding: 5px 14px; border-radius: 18px; border: none; background: transparent; color: #8B6508; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; cursor: pointer; }
.devata-view-toggle-btn:hover { color: var(--color-primary); }
.devata-view-toggle-btn.active { background: var(--color-primary); color: #fff; }

.devata-shastra-list { display: flex; flex-direction: column; gap: 16px; }
.shastra-card { display: block; }
.shastra-card-body { padding: 14px 18px 18px; }
.shastra-chapter-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; background: rgba(147, 51, 234, 0.08); color: #7B4F9E; border: 1px solid rgba(147, 51, 234, 0.25); }
.shastra-alt-names { font-size: 11px; color: var(--color-text-muted); font-style: italic; margin-top: 5px; }

.shastra-section { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--color-divider); }
.shastra-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.shastra-section-title { font-size: 0.78rem; font-weight: 700; color: #8B6508; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 8px; }
.shastra-subfields { display: flex; flex-direction: column; gap: 6px; }
.shastra-field { font-size: 0.83rem; color: var(--color-text-dark); line-height: 1.5; }
.shastra-field-label { font-weight: 600; color: var(--color-text-medium); }
.shastra-list { margin: 4px 0 0; padding-left: 18px; }
.shastra-list li { font-size: 0.83rem; color: var(--color-text-dark); margin-bottom: 4px; line-height: 1.45; }
.shastra-field-value { color: var(--color-text-dark); }
.shastra-empty-note { font-size: 0.82rem; color: var(--color-text-muted); font-style: italic; margin: 0; }

/* ── 30-Day Ritual ── */
.ritual-section { margin-bottom: 20px; }
.ritual-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
.ritual-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; padding: 14px; position: relative; }
.ritual-day-badge { position: absolute; top: -10px; left: 14px; background: var(--color-primary); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 2px 10px; }
.ritual-house-head { display: flex; align-items: center; gap: 8px; margin-top: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.ritual-area { font-weight: 700; color: var(--color-text-dark); font-size: 14px; }
.ritual-dir-badge { font-size: 11px; background: var(--color-accent); color: var(--color-primary); border-radius: 8px; padding: 2px 8px; border: 1px solid var(--color-border); }
.ritual-benefit { font-size: 13px; color: var(--color-text-medium); margin-bottom: 10px; font-style: italic; }
.ritual-devata-name { font-weight: 600; color: var(--color-primary); font-size: 13px; margin-bottom: 8px; }
.ritual-label { font-size: 11px; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.ritual-list { margin: 0 0 8px 0; padding-left: 16px; }
.ritual-list li { font-size: 13px; color: var(--color-text-medium); margin-bottom: 3px; }
.ritual-chips-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ritual-chip { font-size: 12px; border-radius: 8px; padding: 3px 8px; }
.ritual-chip.bhog-chip { background: #FFF3CD; color: #856404; border: 1px solid #FFDEA0; }
.ritual-chip.fud-chip { background: #D1ECF1; color: #0C5460; border: 1px solid #A0D8E0; }
.ritual-mantra { font-size: 12px; color: var(--color-primary-dark); background: var(--color-accent); border-radius: 6px; padding: 6px 10px; font-style: italic; border: 1px solid var(--color-border); }
.ritual-no-devata { font-size: 13px; color: var(--color-text-muted); font-style: italic; }
.ritual-actions { margin-bottom: 8px; }

/* ── Heatmap ── */
.heatmap-section { margin-bottom: 20px; }
.heatmap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
@media (max-width: 600px) { .heatmap-grid { grid-template-columns: repeat(2, 1fr); } }
.heatmap-card { border-radius: 10px; padding: 12px 10px; text-align: center; border: 2px solid transparent; transition: transform 0.15s; }
.heatmap-card:hover { transform: translateY(-2px); }
.heatmap-good { background: var(--color-status-good-bg); border-color: var(--color-status-good); }
.heatmap-bad { background: var(--color-status-bad-bg); border-color: var(--color-status-bad); }
.heatmap-neutral { background: var(--color-status-neutral-bg); border-color: var(--color-status-neutral); }
.heatmap-dir-label { font-size: 20px; font-weight: 800; color: var(--color-text-dark); }
.heatmap-full-name { font-size: 10px; color: var(--color-text-muted); margin-bottom: 4px; line-height: 1.3; }
.heatmap-status-icon { font-size: 18px; margin: 4px 0; }
.heatmap-houses { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.heatmap-house-chip { font-size: 10px; background: rgba(255,255,255,0.6); border-radius: 6px; padding: 1px 5px; color: var(--color-text-dark); }
.heatmap-devatas { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px; }

/* ── Planet Affliction Causal Chain ── */
.affliction-section { margin-bottom: 20px; }
.affliction-chains { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.affliction-chain-card { background: var(--color-status-bad-bg); border: 1px solid var(--color-status-bad); border-radius: 10px; padding: 14px; }
.affliction-chain-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chain-node { background: #fff; border-radius: 8px; padding: 10px 12px; min-width: 100px; text-align: center; flex: 1; }
.chain-icon { font-size: 18px; margin-bottom: 4px; }
.chain-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-text-muted); margin-bottom: 4px; }
.chain-value { font-size: 13px; font-weight: 600; color: var(--color-text-dark); }
.chain-chip { font-size: 11px; background: var(--color-accent); border-radius: 6px; padding: 1px 6px; margin: 1px; display: inline-block; }
.chain-arrow { font-size: 20px; color: var(--color-status-bad); font-weight: 700; flex-shrink: 0; }

/* ── Room Placement ── */
.room-placement-section { margin-bottom: 20px; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.room-card { border-radius: 10px; padding: 12px 14px; border: 1px solid var(--color-border); background: var(--color-surface); }
.room-good { border-left: 4px solid var(--color-status-good); }
.room-bad { border-left: 4px solid var(--color-status-bad); background: var(--color-status-bad-bg); }
.room-neutral { border-left: 4px solid var(--color-status-neutral); }
.room-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.room-dir-label { font-size: 18px; font-weight: 800; color: var(--color-text-dark); }
.room-element-chip { font-size: 11px; background: var(--color-accent); color: var(--color-primary); border-radius: 8px; padding: 2px 8px; border: 1px solid var(--color-border); }
.room-devatas-row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.room-ideal { font-size: 12px; color: var(--color-text-medium); margin-bottom: 4px; }
.room-avoid { font-size: 12px; color: var(--color-status-bad); margin-bottom: 4px; }
.room-tip { font-size: 12px; color: var(--color-text-muted); font-style: italic; border-top: 1px solid var(--color-divider); padding-top: 6px; margin-top: 4px; }

/* Overview tab — persistent amber banner */
.basic-vastu-banner {
    background: linear-gradient(135deg, #fff8ed 0%, #fef3c7 100%);
    border: 1.5px solid #f59e0b;
    border-left: 5px solid #b45309;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
}
.bv-banner-title {
    font-weight: 700;
    font-size: 14px;
    color: #92400e;
    margin-bottom: 6px;
    letter-spacing: .2px;
}
.bv-banner-desc {
    font-size: 12.5px;
    color: #78350f;
    line-height: 1.55;
    margin-bottom: 12px;
}
.bv-banner-zones {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.bv-zone-chip {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 8px 12px;
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.bv-zone-dir {
    font-size: 13px;
    font-weight: 700;
    color: #b45309;
    letter-spacing: .5px;
}
.bv-zone-reason {
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
}
.bv-zone-detail {
    font-size: 11.5px;
    color: #78350f;
    line-height: 1.45;
}

/* Overview tab — Sample-Demo only "AI-written reading" preview card. Never
   rendered for real reports (see script.js AV_renderOverviewPanel: gated on
   AV.reportData.sampleWrittenReport, a field only assets/vc-sample-demo.js
   ever sets). Distinct purple accent so it doesn't get confused with the
   amber Basic Vastu caution banner above it. */
.sample-written-report {
    background: var(--color-surface, #fff);
    border: 1.5px solid var(--color-secondary, #7B4F9E);
    border-left: 5px solid var(--color-secondary, #7B4F9E);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
}
.sample-written-report-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--color-secondary, #7B4F9E);
    margin-bottom: 10px;
    letter-spacing: .2px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.sample-written-report-badge {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
    background: var(--color-accent, #FFF8E7);
    color: var(--color-text-muted, #8B6508);
    border: 1px solid var(--color-border, #E8D5A0);
    border-radius: 20px;
    padding: 2px 9px;
}
.sample-written-report p {
    font-size: 13px;
    color: var(--color-text-dark, #2C1A00);
    line-height: 1.65;
    margin: 0 0 10px;
}
.sample-written-report p:last-child { margin-bottom: 0; }

/* =========================================================
   VANASPATI VASTU — 3rd rail view (botanical placement page)
   New classes only; reuses .data-section/.direction-table/
   .zone-chip/.devata-chip/.search-wrap-vastu/.no-results from
   the AstroVastu section above (same --color-* variables).
   ========================================================= */
/* ── AYADI SHADVARGA — rail view before Vanaspati Vastu ── */
.ay-main { display: flex; flex-direction: column; gap: 0; max-width: 720px; }
.ay-form-card, .ay-result-card {
    background: var(--vc-panel, #fff); border: 1px solid var(--vc-panel-border, #e2e8f0);
    border-radius: 10px; padding: 16px 18px; margin-bottom: 16px;
}
.ay-result-card table.vc-status-table { width: 100%; min-width: 0; margin-top: 10px; }

.vv-main { display: flex; flex-direction: column; gap: 16px; }
.vv-main .data-section { margin-bottom: 0; }

.vv-intro-treatises { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.vv-treatise-chip {
    display: inline-block; background: var(--color-surface-alt);
    border: 1px solid var(--color-border); border-radius: 20px;
    padding: 3px 12px; font-size: 11.5px; font-weight: 600;
    color: var(--color-text-medium);
}
.vv-premise { font-size: 13.5px; line-height: 1.55; color: var(--color-text-dark); margin: 0 0 12px; }
.vv-data-axes h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); }
.vv-data-axes ul { margin: 0; padding-left: 20px; font-size: 12.5px; color: var(--color-text-medium); line-height: 1.6; }

.vv-section-desc { font-size: 12.5px; color: var(--color-text-muted); margin: 0 0 12px; font-style: italic; }

.vv-cycles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.vv-cycle-card { border-radius: 8px; padding: 12px 14px; }
.vv-cycle-card h4 { margin: 0 0 6px; font-size: 12.5px; }
.vv-cycle-card ol { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.55; }
.vv-cycle-good { background: var(--color-status-good-bg); border: 1px solid var(--color-status-good-border); }
.vv-cycle-good h4 { color: var(--color-status-good); }
.vv-cycle-bad { background: var(--color-status-bad-bg); border: 1px solid var(--color-status-bad-border); }
.vv-cycle-bad h4 { color: var(--color-status-bad); }
.vv-validation-rule {
    margin-top: 12px; padding: 10px 14px; border-radius: 8px;
    background: var(--color-surface-alt); border: 1px solid var(--color-border);
    font-size: 12.5px; color: var(--color-text-dark);
}

.vv-zone-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.vv-zone-card {
    border-radius: 10px; padding: 12px 14px;
    background: var(--color-surface-alt); border: 2px solid var(--color-border);
    display: flex; flex-direction: column; gap: 8px;
}
.vv-zone-card.vv-sensitivity-highest { border-color: var(--color-status-bad-border); }
.vv-zone-card.vv-sensitivity-high { border-color: #f59e0b; }
.vv-zone-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.vv-zone-dir { font-size: 14.5px; font-weight: 700; color: var(--color-text-dark); }
.vv-zone-sensitivity { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); }
.vv-zone-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.vv-zone-plants { font-size: 12px; line-height: 1.5; }
.vv-plant-good { color: var(--color-status-good); }
.vv-plant-bad { color: var(--color-status-bad); margin-top: 3px; }
.vv-zone-note { margin: 0; font-size: 11.5px; color: var(--color-text-muted); font-style: italic; }

.vv-mandala-structure { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-bottom: 14px; }
.vv-structure-chip {
    background: var(--color-surface-alt); border: 1px solid var(--color-divider);
    border-radius: 8px; padding: 8px 10px; font-size: 11.5px; color: var(--color-text-medium); line-height: 1.4;
}
.vv-structure-chip strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--color-primary-dark); margin-bottom: 2px; }

.vv-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 10px; }
.vv-devata-table { min-width: 900px; }

.vv-plant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.vv-plant-card { border-radius: 10px; padding: 12px 14px; border: 1px solid var(--color-border); }
.vv-plant-good-card { background: var(--color-status-good-bg); border-color: var(--color-status-good-border); }
.vv-plant-bad-card { background: var(--color-status-bad-bg); border-color: var(--color-status-bad-border); }
.vv-plant-name { font-weight: 700; font-size: 13px; color: var(--color-text-dark); margin-bottom: 6px; }
.vv-plant-zones { margin-bottom: 6px; }
.vv-plant-avoid { font-size: 11.5px; color: var(--color-status-bad); margin: 4px 0 0; }
.vv-plant-benefit { margin: 4px 0 0; font-size: 12px; color: var(--color-text-medium); line-height: 1.5; }

.vv-quote-card {
    font-style: italic; font-size: 13px; text-align: center;
    padding: 12px 16px; margin-bottom: 12px; color: var(--color-text-dark);
    background: var(--color-surface-alt); border-left: 3px solid var(--color-primary);
    border-radius: 6px;
}
.vv-arbor-rule-card {
    padding: 10px 14px; margin-bottom: 14px; border-radius: 8px;
    background: var(--color-status-bad-bg); border: 1px solid var(--color-status-bad-border);
    font-size: 12.5px; color: var(--color-text-dark);
}
.vv-arbor-rule-card p { margin: 4px 0 0; color: var(--color-text-medium); }
.vv-rules-list { margin: 14px 0 0; padding-left: 20px; font-size: 12.5px; color: var(--color-text-medium); line-height: 1.6; }

.vv-module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.vv-module-card { background: var(--color-surface-alt); border: 1px solid var(--color-divider); border-radius: 8px; padding: 10px 12px; }
.vv-module-name { font-weight: 700; font-size: 12.5px; color: var(--color-primary-dark); margin-bottom: 4px; }
.vv-module-card p { margin: 0; font-size: 12px; color: var(--color-text-medium); line-height: 1.5; }

.vv-remedy-card {
    background: var(--color-status-neutral-bg); border: 1px solid var(--color-status-neutral-border);
    border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px;
    font-size: 12.5px; color: var(--color-text-dark);
}

/* =========================================================
   AROMA VASTU — 4th rail view (fragrance placement page)
   New classes only; reuses .data-section/.direction-table/
   .zone-chip/.devata-chip/.search-wrap-vastu/.no-results from
   the AstroVastu section above (same --color-* variables).
   ========================================================= */
.ar-main { display: flex; flex-direction: column; gap: 16px; }
.ar-main .data-section { margin-bottom: 0; }

.ar-premise { font-size: 13.5px; line-height: 1.55; color: var(--color-text-dark); margin: 0 0 12px; }
.ar-core-functions h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); }
.ar-core-functions ul { margin: 0 0 12px; padding-left: 20px; font-size: 12.5px; color: var(--color-text-medium); line-height: 1.6; }
.ar-purity-rule {
    margin-bottom: 14px; padding: 10px 14px; border-radius: 8px;
    background: var(--color-surface-alt); border: 1px solid var(--color-border);
    font-size: 12.5px; color: var(--color-text-dark);
}
.ar-subhead { margin: 0 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); }

.ar-zone-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ar-zone-card {
    border-radius: 10px; padding: 12px 14px;
    background: var(--color-surface-alt); border: 2px solid var(--color-border);
    display: flex; flex-direction: column; gap: 8px;
}
.ar-zone-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ar-zone-dir { font-size: 14.5px; font-weight: 700; color: var(--color-text-dark); }
.ar-zone-sanskrit { font-size: 11px; font-style: italic; color: var(--color-text-muted); }
.ar-zone-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.ar-zone-attribute { margin: 0; font-size: 12px; color: var(--color-text-medium); line-height: 1.5; }
.ar-zone-aromas, .ar-zone-rooms { font-size: 12px; line-height: 1.6; }
.ar-zone-aromas .zone-chip, .ar-zone-rooms { margin-top: 2px; }
.ar-zone-method { margin: 0; font-size: 11.5px; color: var(--color-text-muted); font-style: italic; }

.ar-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 10px; }
.ar-devata-table { min-width: 760px; }
.ar-partial-row td { color: var(--color-text-muted); }
.ar-table-legend { margin: 8px 0 0; font-size: 11px; color: var(--color-text-muted); font-style: italic; }

.ar-dosha-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ar-dosha-card {
    border-radius: 10px; padding: 12px 14px;
    background: var(--color-surface-alt); border: 1px solid var(--color-border);
    display: flex; flex-direction: column; gap: 8px;
}
.ar-dosha-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ar-dosha-name { font-size: 14.5px; font-weight: 700; color: var(--color-text-dark); }
.ar-dosha-zones { display: flex; gap: 6px; flex-wrap: wrap; }
.ar-dosha-signs, .ar-dosha-aromas { font-size: 12px; color: var(--color-text-medium); line-height: 1.5; }
.ar-dosha-aromas .zone-chip { margin-top: 4px; }

.ar-remedy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ar-remedy-item-card {
    border-radius: 10px; padding: 12px 14px; border: 1px solid var(--color-border);
    background: var(--color-surface-alt); display: flex; flex-direction: column; gap: 6px;
}
.ar-remedy-defect { font-weight: 700; font-size: 13px; color: var(--color-text-dark); }
.ar-remedy-problem { font-size: 12px; color: var(--color-status-bad); }
.ar-remedy-fix { font-size: 12px; color: var(--color-text-medium); line-height: 1.5; }
.ar-remedy-timeline { font-size: 11px; color: var(--color-text-muted); }
.ar-remedy-note { font-size: 11.5px; color: var(--color-text-muted); font-style: italic; }

.ar-carrier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ar-carrier-card { background: var(--color-surface-alt); border: 1px solid var(--color-divider); border-radius: 8px; padding: 10px 12px; }
.ar-carrier-name { font-weight: 700; font-size: 12.5px; color: var(--color-primary-dark); margin-bottom: 4px; }
.ar-carrier-card p { margin: 0; font-size: 12px; color: var(--color-text-medium); line-height: 1.5; }
.ar-protocol-lines { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--color-text-dark); margin-bottom: 14px; }
.ar-consecration-list { margin: 0; padding-left: 20px; font-size: 12.5px; color: var(--color-text-medium); line-height: 1.6; }

.ar-routine-card {
    background: var(--color-status-neutral-bg); border: 1px solid var(--color-status-neutral-border);
    border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px;
    font-size: 12.5px; color: var(--color-text-dark);
}
.ar-safety-list { margin: 0; padding-left: 20px; font-size: 12.5px; color: var(--color-text-medium); line-height: 1.65; }
.ar-safety-list li { margin-bottom: 4px; }

/* =========================================================
   PLANETS HITS — table + hit-color styling, ported verbatim
   from western-hits-analyzer/styles.css (same classes, same
   rules) for the Planetary Hits Table / Detailed Remedies tabs.
   ========================================================= */
:root {
    --color-text-light: #8B6508;
    --color-hit-positive-strong: #4CAF50;
    --color-hit-positive-mild: #81C784;
    --color-hit-negative-strong: #F44336;
    --color-hit-negative-mild: #E57373;
    --color-hit-irritating: #FFC107;
    --color-hit-conjunction: #2196F3;
    --color-hit-none: #BDBDBB;
}

#vc-phPanel-table, #vc-phPanel-remedies, #vc-phPanel-nakshatra {
    overflow-x: auto;
}
#vc-phPanel-table table, #vc-phPanel-nakshatra table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
    color: var(--color-text-medium);
}
#vc-phPanel-table th, #vc-phPanel-table td,
#vc-phPanel-nakshatra th, #vc-phPanel-nakshatra td {
    border: 1px solid var(--color-divider);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}
#vc-phPanel-table th, #vc-phPanel-nakshatra th {
    background-color: var(--color-surface-alt);
    color: var(--color-text-dark);
    font-weight: 600;
}
#vc-phPanel-table tr:nth-child(even), #vc-phPanel-nakshatra tr:nth-child(even) {
    background-color: #f9f9f9;
}
#vc-phPanel-table td.hit-cell {
    font-weight: 500;
    text-align: center;
}
.hit-positive-strong { background-color: var(--color-hit-positive-strong) !important; color: white; }
.hit-positive-mild { background-color: var(--color-hit-positive-mild) !important; color: var(--color-text-dark); }
.hit-negative-strong { background-color: var(--color-hit-negative-strong) !important; color: white; }
.hit-negative-mild { background-color: var(--color-hit-negative-mild) !important; color: white; }
.hit-irritating { background-color: var(--color-hit-irritating) !important; color: var(--color-text-dark); }
.hit-conjunction { background-color: var(--color-hit-conjunction) !important; color: white; }
.hit-none { color: var(--color-text-light); }

#vc-phPanel-remedies table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 13px;
    color: var(--color-text-medium);
    table-layout: fixed;
}
#vc-phPanel-remedies th,
#vc-phPanel-remedies td {
    border: 1px solid var(--color-divider);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
    white-space: normal;
}
#vc-phPanel-remedies th {
    background-color: var(--color-surface-alt);
    color: var(--color-text-dark);
    font-weight: 600;
}
#vc-phPanel-remedies tr:nth-child(even) {
    background-color: #f9f9f9;
}
#vc-phPanel-remedies th:nth-child(1), #vc-phPanel-remedies td:nth-child(1) { width: 18%; }
#vc-phPanel-remedies th:nth-child(2), #vc-phPanel-remedies td:nth-child(2) { width: 12%; }
#vc-phPanel-remedies th:nth-child(3), #vc-phPanel-remedies td:nth-child(3) { width: 10%; }
#vc-phPanel-remedies th:nth-child(4), #vc-phPanel-remedies td:nth-child(4) { width: 12%; }
#vc-phPanel-remedies th:nth-child(5), #vc-phPanel-remedies td:nth-child(5) { width: 22%; }
#vc-phPanel-remedies th:nth-child(6), #vc-phPanel-remedies td:nth-child(6) { width: 12%; }
#vc-phPanel-remedies th:nth-child(7), #vc-phPanel-remedies td:nth-child(7) { width: 8%; }
#vc-phPanel-remedies th:nth-child(8), #vc-phPanel-remedies td:nth-child(8) { width: 8%; }
#vc-phPanel-remedies td.na-cell, .na-cell {
    color: var(--color-text-light);
    font-style: italic;
}

/* =========================================================
   ASK VASTU — AI CHAT MODULE
   Uses the original --vc-* token namespace (see top of this file).
   ========================================================= */
#vc-view-ask .ask-body {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    max-width: 760px;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
}

/* =========================================================
   VASTU REMEDIES — 5th rail view (metal/helix/pyramid/soil
   remedies reference page)
   New classes only; reuses .data-section/.direction-table/
   .zone-chip/.devata-chip/.search-wrap-vastu/.no-results from
   the AstroVastu section above (same --color-* variables).
   ========================================================= */
.rm-main { display: flex; flex-direction: column; gap: 16px; }
.rm-main .data-section { margin-bottom: 0; }

.rm-premise { font-size: 13.5px; line-height: 1.55; color: var(--color-text-dark); margin: 0 0 12px; }
.rm-subhead { margin: 14px 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); }
.rm-section-desc { font-size: 12.5px; color: var(--color-text-muted); margin: 0 0 10px; font-style: italic; }

.rm-orientation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rm-orientation-card {
    background: var(--color-surface-alt); border: 1px solid var(--color-divider);
    border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--color-text-medium); line-height: 1.4;
}
.rm-orientation-card strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--color-primary-dark); margin-bottom: 2px; }

.rm-vithi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rm-vithi-card {
    border-radius: 10px; padding: 12px 14px; border: 1px solid var(--color-border);
    background: var(--color-surface-alt); display: flex; flex-direction: column; gap: 4px;
}
.rm-vithi-name { font-weight: 700; font-size: 13px; color: var(--color-text-dark); }
.rm-vithi-zone { font-size: 11px; color: var(--color-text-muted); }
.rm-vithi-card p { margin: 4px 0 0; font-size: 12px; color: var(--color-text-medium); line-height: 1.5; }

.rm-philosophy-list { margin: 0; padding-left: 20px; font-size: 12.5px; color: var(--color-text-medium); line-height: 1.6; }
.rm-philosophy-list li { margin-bottom: 4px; }

.rm-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 10px; }
.rm-devata-table { min-width: 980px; }
.rm-mantra-cell { font-style: italic; }
.rm-object-table { min-width: 900px; }

.rm-specs-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rm-spec-chip {
    background: var(--color-surface-alt); border: 1px solid var(--color-divider);
    border-radius: 8px; padding: 6px 10px; font-size: 12px; color: var(--color-text-medium);
}
.rm-spec-chip strong { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--color-primary-dark); }

.rm-safety-list { margin: 0; padding-left: 20px; font-size: 12.5px; color: var(--color-text-medium); line-height: 1.65; }
.rm-safety-list li { margin-bottom: 4px; }

.rm-helix-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rm-helix-card {
    border-radius: 10px; padding: 12px 14px; border: 1px solid var(--color-border);
    background: var(--color-surface-alt); display: flex; flex-direction: column; gap: 6px;
}
.rm-helix-type { font-weight: 700; font-size: 13px; color: var(--color-text-dark); }
.rm-helix-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.rm-helix-card p { margin: 0; font-size: 12px; color: var(--color-text-medium); line-height: 1.5; }

.rm-combo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.rm-combo-card { background: var(--color-surface-alt); border: 1px solid var(--color-divider); border-radius: 8px; padding: 10px 12px; }
.rm-combo-card strong { display: block; font-size: 12.5px; color: var(--color-primary-dark); margin-bottom: 4px; }
.rm-combo-card p { margin: 0; font-size: 12px; color: var(--color-text-medium); line-height: 1.5; }

.rm-test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.rm-test-card {
    border-radius: 10px; padding: 12px 14px; border: 1px solid var(--color-border);
    background: var(--color-surface-alt); display: flex; flex-direction: column; gap: 6px;
}
.rm-test-name { font-weight: 700; font-size: 13px; color: var(--color-text-dark); }
.rm-test-method { margin: 0; font-size: 12px; color: var(--color-text-muted); font-style: italic; }
.rm-test-pass { font-size: 12px; color: var(--color-status-good); }
.rm-test-fail { font-size: 12px; color: var(--color-status-bad); }

.rm-ivh-card {
    background: var(--color-status-neutral-bg); border: 1px solid var(--color-status-neutral-border);
    border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px;
    font-size: 12.5px; color: var(--color-text-dark); margin-bottom: 12px;
}
.rm-ivh-name { font-weight: 700; font-size: 14px; }
.rm-ivh-card p { margin: 0; color: var(--color-text-medium); line-height: 1.5; }
.rm-ivh-validation { font-size: 11.5px; color: var(--color-text-muted); font-style: italic; }

.rm-money-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.rm-money-card {
    background: var(--color-surface-alt); border: 1px solid var(--color-divider);
    border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px;
}
.rm-money-location { font-size: 12px; font-weight: 600; color: var(--color-text-dark); }
.rm-money-card p { margin: 0; font-size: 11.5px; color: var(--color-text-medium); line-height: 1.4; }

.rm-metal-deep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 14px 0; }
.rm-metal-deep-card {
    border-radius: 10px; padding: 14px; border: 2px solid var(--color-border);
    background: var(--color-surface-alt); display: flex; flex-direction: column; gap: 8px;
}
.rm-metal-deep-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rm-metal-deep-name { font-size: 14.5px; font-weight: 700; color: var(--color-text-dark); }
.rm-metal-deep-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rm-metal-composition { font-size: 11px; color: var(--color-text-muted); font-style: italic; }
.rm-metal-symbolism { margin: 0; font-size: 12px; font-style: italic; color: var(--color-text-muted); }
.rm-metal-science-line, .rm-metal-emotion { margin: 0; font-size: 12px; color: var(--color-text-medium); line-height: 1.5; }
.rm-metal-deficiency, .rm-metal-list, .rm-metal-care { font-size: 12px; color: var(--color-text-medium); }
.rm-metal-deficiency ul, .rm-metal-list ul, .rm-metal-care ul { margin: 4px 0 0; padding-left: 18px; line-height: 1.5; }
.rm-metal-crystal { font-size: 11.5px; color: var(--color-primary-dark); }
.rm-metal-copper { border-color: #c2703d; }
.rm-metal-brass { border-color: #b8860b; }
.rm-metal-silver { border-color: #9ca3af; }

.rm-triad-line {
    margin: 12px 0; padding: 10px 14px; border-radius: 8px; text-align: center;
    background: var(--color-surface-alt); border: 1px solid var(--color-border);
    font-size: 12.5px; font-style: italic; color: var(--color-text-dark);
}

.rm-faq-list { display: flex; flex-direction: column; gap: 8px; }
.rm-faq-item { background: var(--color-surface-alt); border: 1px solid var(--color-divider); border-radius: 8px; padding: 10px 12px; }
.rm-faq-q { font-weight: 700; font-size: 12.5px; color: var(--color-text-dark); margin-bottom: 4px; }
.rm-faq-a { font-size: 12px; color: var(--color-text-medium); line-height: 1.5; }

.rm-sensory-block { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--color-text-dark); margin-bottom: 14px; }
.rm-vegetation-row { display: flex; gap: 6px; flex-wrap: wrap; }

.rm-bhumi-test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.rm-bhumi-test-card {
    border-radius: 10px; padding: 12px 14px; border: 1px solid var(--color-border);
    background: var(--color-surface-alt); display: flex; flex-direction: column; gap: 6px;
    font-size: 12px; color: var(--color-text-medium); line-height: 1.5;
}
.rm-bhumi-test-name { font-weight: 700; font-size: 13px; color: var(--color-text-dark); }
.rm-bhumi-test-method { margin: 0; font-style: italic; color: var(--color-text-muted); }
.rm-bhumi-results { margin: 0; padding-left: 18px; }
.rm-bhumi-mechanism { margin: 0; font-size: 11.5px; color: var(--color-text-muted); }
.rm-bhumi-modern { font-size: 11px; color: var(--color-text-muted); font-style: italic; }

.rm-protocol-steps { display: flex; flex-direction: column; gap: 10px; }
.rm-protocol-step { display: flex; gap: 12px; align-items: flex-start; }
.rm-protocol-step-num {
    flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
    background: var(--color-primary); color: #fff; font-weight: 700; font-size: 12.5px;
    display: flex; align-items: center; justify-content: center;
}
.rm-protocol-step-body strong { font-size: 13px; color: var(--color-text-dark); }
.rm-protocol-step-body p { margin: 2px 0 0; font-size: 12px; color: var(--color-text-medium); line-height: 1.5; }

.rm-layer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.rm-layer-card { background: var(--color-surface-alt); border: 1px solid var(--color-divider); border-radius: 8px; padding: 10px 12px; }
.rm-layer-card strong { display: block; font-size: 12.5px; color: var(--color-primary-dark); margin-bottom: 4px; }
.rm-layer-card p { margin: 0; font-size: 12px; color: var(--color-text-medium); line-height: 1.5; }
.ask-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 4px 16px;
}
.ask-message {
    padding: 10px 14px;
    border-radius: 10px;
    line-height: 1.5;
    max-width: 85%;
}
.ask-message.ask-user {
    align-self: flex-end;
    background: var(--vc-primary);
    color: #fff;
}
.ask-message.ask-ai {
    align-self: flex-start;
    background: var(--vc-panel);
    border: 1px solid var(--vc-panel-border);
    color: var(--vc-text);
}
.ask-message.ask-ai ul { margin: 6px 0; padding-left: 20px; }
.ask-message.ask-error {
    align-self: flex-start;
    background: #fef2f2;
    border: 1px solid var(--vc-danger);
    color: var(--vc-danger);
}
/* Calm, non-alarming banner for expected conditions (rate limit reached,
   input too large) — deliberately NOT styled like .ask-error's red/danger
   look, so it reads as a message from us rather than a system fault. */
.ask-message.ask-notice {
    align-self: flex-start;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    color: #92400e;
}
.ask-message.ask-loading {
    align-self: flex-start;
    color: var(--vc-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.ask-turn-collapsed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--vc-bg);
    border: 1px solid var(--vc-panel-border);
    border-radius: 8px;
    color: var(--vc-text-muted);
    font-size: 0.85rem;
    cursor: pointer;
}
.ask-turn-collapsed .ask-collapsed-q {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ask-turn-collapsed .ask-collapsed-toggle {
    flex-shrink: 0;
    color: var(--vc-primary);
}
.ask-turn-collapsed:hover {
    border-color: var(--vc-primary);
}
.ask-spinner {
    width: 14px; height: 14px;
    border: 2px solid var(--vc-panel-border);
    border-top-color: var(--vc-primary);
    border-radius: 50%;
    animation: ask-spin 0.7s linear infinite;
}
@keyframes ask-spin { to { transform: rotate(360deg); } }
.ask-quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 4px;
}
.ask-quick-q {
    background: var(--vc-panel);
    border: 1px solid var(--vc-panel-border);
    color: var(--vc-text-muted);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
}
.ask-quick-q:hover {
    border-color: var(--vc-primary);
    color: var(--vc-primary);
}
.ask-input-row {
    display: flex;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--vc-panel-border);
}

/* ── Auth gate overlay (assets/vc-tool-gate.js) — only ever shown once
   AUTH_ENFORCEMENT=enforce; hidden by default via the [hidden] attribute. */
.vc-auth-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--vc-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.vc-auth-gate[hidden] { display: none; }
.vc-auth-gate-card {
    max-width: 420px;
    width: 100%;
    background: var(--vc-panel);
    border: 1px solid var(--vc-panel-border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
}
.vc-auth-gate-card h2 {
    margin: 0 0 8px;
    color: var(--vc-text);
}
.vc-auth-gate-card p {
    margin: 0 0 20px;
    color: var(--vc-text-muted);
}

/* ── Demo-account access (assets/vc-demo-auth.js) + Sample-Demo picker
   (assets/vc-sample-demo.js) — share one fixed bottom-left row so the two
   pills sit side by side regardless of which one is hidden. ────────── */
.vc-pill-row {
    position: fixed; bottom: 16px; left: 16px; z-index: 500;
    display: flex; gap: 10px;
}
.vc-demo-login-pill {
    background: var(--vc-panel); border: 1px solid var(--vc-panel-border);
    border-radius: 999px; padding: 8px 16px; font-size: 13px; cursor: pointer;
    box-shadow: 0 2px 10px rgba(16,24,40,.12); color: var(--vc-text);
}
.vc-sample-demo-pill { font-weight: 600; }
.vc-sample-demo-list {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px; margin-top: 14px;
}
.vc-sample-demo-card {
    border: 1px solid var(--vc-panel-border); border-radius: 10px; padding: 12px;
    display: flex; flex-direction: column; gap: 6px;
}
.vc-sample-demo-card img {
    width: 100%; height: 120px; object-fit: cover; border-radius: 6px;
    border: 1px solid var(--vc-panel-border);
}
.vc-sample-demo-card h4 { margin: 2px 0 0; font-size: 14px; }
.vc-sample-demo-card .vc-sample-demo-meta { font-size: 11.5px; color: var(--vc-text-muted); }
.vc-sample-demo-card .vc-sample-demo-note { font-size: 12px; color: var(--vc-text-muted); flex: 1; }
.vc-sample-demo-card .vc-btn { margin-top: 4px; }
.vc-demo-used-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9998;
    background: #7c3aed; color: #fff; text-align: center;
    padding: 8px 16px; font-size: 13px; font-weight: 600;
}
/* Above .vc-auth-gate's z-index:9999 — the demo login modal must be
   reachable (and the warning modal usable) even while the Auth0 gate is
   showing its full-screen "Please log in" overlay on top of everything. */
#vc-demoLoginModal, #vc-demoWarningModal { z-index: 10000; }
.ask-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--vc-panel-border);
    border-radius: 8px;
    font-size: 0.95rem;
}
.ask-send-btn {
    padding: 10px 20px;
    background: var(--vc-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}
.ask-send-btn:hover { background: var(--vc-primary-dark); }

/* =========================================================
   SYMPTOM FINDER — checklist-driven, deterministic devata lookup
   (no chat, no LLM). New classes only; reuses .devata-card and its
   supporting --color-* tokens from the AstroVastu section for the
   "view full details" expand-in-place card.
   ========================================================= */
.sf-body { flex: 1 1 auto; display: flex; min-height: 0; overflow: hidden; }

.sf-checklist {
    flex: 0 0 38%; min-width: 260px; max-width: 480px;
    display: flex; flex-direction: column; min-height: 0;
    padding: 16px; border-right: 1px solid var(--color-divider);
    box-sizing: border-box;
}
.sf-search-wrap { flex-shrink: 0; margin-bottom: 10px; }
.sf-search-input {
    width: 100%; padding: 8px 12px; border: 1px solid var(--color-border);
    border-radius: 8px; font-size: 13px; outline: none; box-sizing: border-box;
    background: var(--color-surface); color: var(--color-text-dark);
}
.sf-search-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.15); }
.sf-no-results { text-align: center; padding: 16px; color: var(--color-text-muted); font-style: italic; font-size: 13px; }

.sf-item-list { flex: 1 1 auto; overflow-y: auto; list-style: none; margin: 0; padding: 0 4px 0 0; }
.sf-item { border-bottom: 1px solid var(--color-divider); }
.sf-item label {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 9px 4px; font-size: 13px; line-height: 1.4;
    color: var(--color-text-dark); cursor: pointer;
}
.sf-item input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; cursor: pointer; }
.sf-item-text-wrap { display: flex; flex-direction: column; gap: 4px; }
.sf-item .keyword-tags { margin-top: 0; }
.sf-submit-btn {
    margin-top: 12px; padding: 11px 18px; border: none; border-radius: 8px;
    background: var(--color-primary-dark); color: #fff; font-weight: 600;
    font-size: 13.5px; cursor: pointer; flex-shrink: 0;
}
.sf-submit-btn:hover { opacity: 0.9; }

.sf-results { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 20px; box-sizing: border-box; }
.sf-results-placeholder { color: var(--color-text-muted); font-size: 13.5px; font-style: italic; }
.sf-results-summary { font-size: 13px; color: var(--color-text-medium); margin: 0 0 14px; }

.sf-result-card {
    border: 1px solid var(--color-border); border-radius: 10px;
    padding: 14px 16px; margin-bottom: 14px; background: #fff;
}
.sf-result-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sf-result-name { font-size: 15px; font-weight: 700; color: var(--color-text-dark); }
.sf-result-punchline { font-size: 11px; color: var(--color-text-muted); letter-spacing: 0.05em; text-transform: uppercase; }
.sf-result-matches, .sf-result-remedy { font-size: 12.5px; color: var(--color-text-medium); margin-bottom: 8px; }
.sf-result-matches strong, .sf-result-remedy strong { color: var(--color-primary-dark); font-size: 12px; }
.sf-result-matches ul, .sf-result-remedy ul { margin: 4px 0 0; padding-left: 18px; line-height: 1.5; }
.sf-result-fud { margin-top: 4px; font-size: 12px; color: var(--color-text-medium); }
.sf-expand-btn {
    background: none; border: none; color: var(--color-primary-dark);
    font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 0;
}
.sf-expand-btn:hover { text-decoration: underline; }
.sf-full-card { margin-top: 10px; }
.sf-full-card:empty { margin-top: 0; }

@media (max-width: 860px) {
    .sf-body { flex-direction: column; overflow-y: auto; }
    .sf-checklist { flex: 0 0 auto; max-width: none; border-right: none; border-bottom: 1px solid var(--color-divider); max-height: 46vh; }
    .sf-results { flex: 1 1 auto; }
}

/* ── All Devta (45-Devata Mandala reference page, under Map in the rail) ──
   New classes only; reuses .badge/.badge-location/.card-punchline,
   .dos-donts-grid/.dos-block/.donts-block, .remedies-list, .imbalance-box,
   .bhog-panel/.bhog-row/.bhog-label/.bhog-value, .mantra-box and
   .vastu-pre-hero/.hero-icon as-is from the All Devatas tab above. */
.ad-main { flex: 1 1 auto; min-width: 0; padding: 18px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.ad-loading { padding: 40px; text-align: center; color: var(--color-text-muted); font-style: italic; }

/* flex-shrink:0 on all three direct children is required: .ad-main relies
   on its own overflow-y:auto to handle tall content, but flex items default
   to shrink-to-fit their container — and since .ad-grid has overflow:hidden
   (for the rounded corners), the flex algorithm treats its automatic
   min-height as 0 instead of content-based, so without this it silently
   crushes the grid down to whatever height is left instead of scrolling. */
.ad-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.ad-toolbar-title { font-size: 13px; color: var(--color-text-medium); }
.ad-lang-toggle { display: flex; border: 1px solid var(--color-border); border-radius: 20px; overflow: hidden; flex-shrink: 0; }
.ad-lang-btn { padding: 6px 16px; border: none; background: var(--color-surface); color: var(--color-text-muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.ad-lang-btn.active { background: var(--color-primary); color: #fff; }
.ad-lang-btn:not(.active):hover { background: var(--color-surface-alt); }

/* Capped width (rather than stretching to the full main-column width) keeps
   each cell — and so each row, since aspect-ratio:1 ties height to width —
   compact enough that all 9 rows fit comfortably instead of forcing a huge
   scroll just to see the grid. */
.ad-grid {
    display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 2px;
    background: var(--color-border); border: 1px solid var(--color-border); border-radius: 8px;
    overflow: hidden; flex-shrink: 0; width: 100%; max-width: 620px; margin: 0 auto;
}
.ad-cell {
    aspect-ratio: 1; border: none; background: var(--color-surface); color: var(--ad-color, var(--color-primary-dark));
    font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; cursor: pointer;
    display: flex; align-items: center; justify-content: center; text-align: center; padding: 2px; line-height: 1.1;
    transition: background 0.15s, transform 0.15s;
}
.ad-cell:hover { background: var(--color-surface-alt); transform: scale(1.04); position: relative; z-index: 1; }
.ad-cell.selected { background: var(--ad-color, var(--color-primary)); color: #fff; }
@media (max-width: 700px) { .ad-cell { font-size: 7.5px; } }

.ad-detail { background: #fff; border: 1px solid var(--color-border); border-radius: 12px; padding: 4px 20px 20px; flex-shrink: 0; }
.ad-back-btn { background: none; border: none; color: var(--color-primary-dark); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 12px 0 0; }
.ad-back-btn:hover { text-decoration: underline; }
.ad-detail-header { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0 16px; border-bottom: 1px solid var(--color-divider); margin-bottom: 14px; }
.ad-detail-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.ad-detail-title-area h2 { margin: 0; font-size: 19px; color: var(--color-text-dark); }
.ad-section { margin-bottom: 18px; }
.ad-section:last-child { margin-bottom: 0; }
.ad-section h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-primary-dark); margin: 0 0 8px; }
.ad-section p { font-size: 13px; color: var(--color-text-dark); line-height: 1.55; margin: 0 0 8px; }
.ad-section p:last-child { margin-bottom: 0; }
.ad-section-mythology { background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: 8px; padding: 14px 16px; }
.ad-subheading { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-medium); margin: 12px 0 8px; }
.ad-subblock { margin-bottom: 14px; }
.ad-subblock:last-child { margin-bottom: 0; }
.ad-subblock .ad-subheading:first-child { margin-top: 0; }
.ad-plain-list { margin: 0; padding-left: 18px; }
.ad-plain-list li { font-size: 13px; color: var(--color-text-dark); line-height: 1.5; margin-bottom: 4px; }
.ad-hindi-fallback { font-size: 12px; color: var(--color-text-muted); background: var(--color-surface-alt); border: 1px dashed var(--color-border); border-radius: 6px; padding: 8px 12px; margin-bottom: 14px; }
.ad-missing { padding: 30px; text-align: center; color: var(--color-text-muted); font-style: italic; }

@media (max-width: 700px) {
    .ad-main { padding: 14px; }
    .ad-detail { padding: 4px 14px 14px; }
    .ad-grid { max-width: 400px; }
}

/* ── LO SHU GRID NUMEROLOGY — rail view before Ask Vastu ──
   Follows the same sidebar-form (vc-astro-form-col) + main-report
   (vc-astro-main) layout as AstroVastu/Planets Hits, instead of a
   single stacked column. */
.ls-main { max-width: 900px; }
.ls-result-card {
    background: var(--vc-panel, #fff); border: 1px solid var(--vc-panel-border, #e2e8f0);
    border-radius: 10px; padding: 16px 18px; margin-bottom: 16px;
}
.ls-result-card table.vc-status-table { width: 100%; min-width: 0; margin-top: 10px; }

.ls-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    max-width: 320px; margin: 8px auto 14px;
}
.ls-cell {
    aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 10px; border: 2px solid var(--vc-panel-border, #e2e8f0); gap: 2px;
}
.ls-cell-digits { font-size: 18px; font-weight: 800; letter-spacing: 1px; }
.ls-cell-dir { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--vc-text-muted); }
.ls-cell-present { background: var(--color-status-good-bg, #f0fdf4); border-color: var(--color-status-good-border, #86efac); }
.ls-cell-present .ls-cell-digits { color: var(--vc-good, #16a34a); }
.ls-cell-missing { background: var(--color-status-bad-bg, #fef2f2); border-color: var(--color-status-bad-border, #fca5a5); border-style: dashed; }
.ls-cell-missing .ls-cell-digits { color: var(--vc-danger, #dc2626); font-weight: 400; }
.ls-cell-excess { background: #fffbeb; border-color: #fcd34d; }
.ls-cell-excess .ls-cell-digits { color: #b45309; }

.ls-arrow-list, .ls-remedy-list { display: flex; flex-direction: column; gap: 10px; }
.ls-arrow-item, .ls-remedy-item {
    border-radius: 8px; padding: 10px 12px; background: var(--color-surface-alt, #f8fafc);
    border: 1px solid var(--color-border, #e2e8f0); font-size: 12.5px; line-height: 1.5;
}
.ls-arrow-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.ls-arrow-nodes { font-size: 11px; color: var(--vc-text-muted); font-variant-numeric: tabular-nums; }
.ls-plane-partial-tag { margin: 0; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--vc-primary-dark); font-weight: 700; }
.ls-arrow-item.ls-arrow-active { border-color: var(--color-status-good-border, #86efac); background: var(--color-status-good-bg, #f0fdf4); }
.ls-arrow-item.ls-arrow-inactive { opacity: .55; }
.ls-arrow-item.ls-arrow-weak { border-color: var(--color-status-bad-border, #fca5a5); background: var(--color-status-bad-bg, #fef2f2); }
.ls-remedy-item strong { display: block; margin-bottom: 4px; color: var(--vc-primary-dark, #1d4ed8); }
.ls-excess-remedy { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--color-border, #e2e8f0); }
.ls-missing-impact { margin: 6px 0 0; padding-top: 6px; border-top: 1px dashed var(--color-border, #e2e8f0); }
.ls-missing-remedy-list { margin: 4px 0 0; padding-left: 18px; }
.ls-missing-remedy-list li { margin-bottom: 2px; }

.ls-fs-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
    max-width: 380px; margin: 10px auto;
}
.ls-fs-cell {
    aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 8px; border: 1px solid var(--color-border, #e2e8f0); gap: 2px; font-size: 11px; padding: 4px;
    text-align: center;
}
.ls-fs-star { font-size: 20px; font-weight: 800; }
.ls-fs-label { font-size: 9.5px; line-height: 1.2; color: var(--vc-text-muted); }
.ls-fs-good { background: var(--color-status-good-bg, #f0fdf4); border-color: var(--color-status-good-border, #86efac); }
.ls-fs-good .ls-fs-star { color: var(--vc-good, #16a34a); }
.ls-fs-bad { background: var(--color-status-bad-bg, #fef2f2); border-color: var(--color-status-bad-border, #fca5a5); }
.ls-fs-bad .ls-fs-star { color: var(--vc-danger, #dc2626); }

.ls-element-cycles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.ls-element-cycle-good, .ls-element-cycle-bad {
    border-radius: 8px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5;
    border: 1px solid var(--color-border, #e2e8f0); background: var(--color-surface-alt, #f8fafc);
}
.ls-element-cycle-good strong { color: var(--color-status-good, #16a34a); }
.ls-element-cycle-bad strong { color: var(--color-status-bad, #dc2626); }

/* =========================================================
   DASHA -> DEVATA ENGINE (Symptom Finder right-hand pane)
   New selectors only. The single override, `.dde-right > .sf-results`,
   is scoped to this block's own wrapper class and leaves the existing
   `.sf-results` rule untouched — inside the wrapper the engine and the
   results share one scroll container instead of each owning its own.
   ========================================================= */
.dde-right {
    flex: 1 1 auto; min-width: 0; min-height: 0;
    display: flex; flex-direction: column;
    overflow-y: auto; box-sizing: border-box;
}
.dde-right > .sf-results { flex: 0 0 auto; overflow: visible; min-height: 0; }

.dde-panel { flex: 0 0 auto; padding: 16px 20px 4px; box-sizing: border-box; }

.dde-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start; justify-content: space-between; }
.dde-head-titles { flex: 1 1 260px; min-width: 0; }
.dde-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--color-text-dark); }
.dde-lede { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--color-text-muted); }
.dde-mode-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dde-src-badge {
    font-size: 11px; padding: 3px 9px; border-radius: 20px; white-space: nowrap;
    border: 1px solid var(--color-border); color: var(--color-text-medium);
}
.dde-src-badge.auto { border-color: rgba(22, 163, 74, 0.45); color: #15803d; background: rgba(22, 163, 74, 0.08); }
.dde-src-badge.manual { border-color: rgba(184, 134, 11, 0.45); color: var(--color-primary-dark); background: rgba(184, 134, 11, 0.08); }
.dde-mini-btn {
    font-size: 11.5px; padding: 4px 10px; border-radius: 6px; cursor: pointer;
    border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-medium);
}
.dde-mini-btn:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }

.dde-steps {
    list-style: none; margin: 12px 0 14px; padding: 0;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.dde-steps li {
    font-size: 11.5px; line-height: 1.45; color: var(--color-text-medium);
    border: 1px solid var(--color-divider); border-radius: 8px; padding: 8px 10px;
    background: var(--color-surface);
}
.dde-step-n { display: block; font-size: 10px; letter-spacing: 0.14em; color: var(--color-primary-dark); margin-bottom: 4px; }

.dde-manual {
    border: 1px solid var(--color-border); border-radius: 10px;
    padding: 12px 14px; margin-bottom: 14px; background: var(--color-surface);
}
.dde-manual-note { margin: 0 0 10px; font-size: 12.5px; color: var(--color-text-medium); }
.dde-link-btn {
    background: none; border: none; padding: 0; cursor: pointer;
    color: var(--color-primary-dark); font-weight: 600; font-size: 12.5px; text-decoration: underline;
}
.dde-manual-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dde-manual-label { flex: 0 0 130px; font-size: 12px; color: var(--color-text-muted); }
.dde-select {
    flex: 1 1 auto; min-width: 0; padding: 7px 10px; font-size: 13px; border-radius: 7px;
    border: 1px solid var(--color-border); background: #fff; color: var(--color-text-dark);
}
.dde-manual-chk { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--color-text-muted); cursor: pointer; }
.dde-manual-hint { margin: 6px 0 0; font-size: 11px; font-style: italic; color: var(--color-text-muted); }

.dde-empty { text-align: center; padding: 26px 16px; color: var(--color-text-muted); }
.dde-empty-icon { font-size: 26px; margin-bottom: 8px; }
.dde-empty p { margin: 0; font-size: 13px; }

.dde-tier { border: 1px solid var(--color-border); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.dde-tier.afflicted { border-color: rgba(220, 38, 38, 0.4); }
.dde-tier-head {
    width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 10px 12px; border: none; cursor: pointer; text-align: left;
    background: var(--color-surface); font-size: 12.5px; color: var(--color-text-dark);
}
.dde-tier.afflicted > .dde-tier-head { background: rgba(220, 38, 38, 0.05); }
.dde-tier-labels { display: flex; gap: 4px; }
.dde-tier-label {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--color-text-muted); border: 1px solid var(--color-divider);
    border-radius: 4px; padding: 2px 6px;
}
.dde-tier-planet { font-size: 14.5px; font-weight: 700; }
.dde-dates { font-size: 11px; color: var(--color-text-muted); }
.dde-tier-zones { display: flex; flex-wrap: wrap; gap: 3px; }
.dde-zone-chip {
    font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 4px;
    background: rgba(184, 134, 11, 0.12); color: var(--color-primary-dark);
}
.dde-affl-badge { font-size: 10.5px; padding: 2px 8px; border-radius: 20px; background: rgba(220, 38, 38, 0.12); color: #b91c1c; }
.dde-ok-badge { font-size: 10.5px; padding: 2px 8px; border-radius: 20px; background: rgba(22, 163, 74, 0.1); color: #15803d; }
.dde-hit-badge { font-size: 10.5px; padding: 2px 8px; border-radius: 20px; background: rgba(184, 134, 11, 0.16); color: var(--color-primary-dark); font-weight: 600; }
.dde-caret { margin-left: auto; font-size: 10px; color: var(--color-text-muted); }
.dde-intensify, .dde-affl-list { margin: 0; padding: 8px 12px; font-size: 12px; line-height: 1.5; background: rgba(220, 38, 38, 0.04); color: var(--color-text-medium); }
.dde-affl-list { padding-left: 30px; }
.dde-affl-list li { margin-bottom: 3px; }
.dde-tier-body { padding: 4px 12px 12px; }

.dde-devata { border-top: 1px solid var(--color-divider); padding: 12px 0; }
.dde-devata:first-child { border-top: none; }
.dde-devata.hit { background: rgba(184, 134, 11, 0.04); border-radius: 8px; padding-left: 10px; padding-right: 10px; }
.dde-devata-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 5px; }
.dde-devata-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dde-devata-name { font-size: 13.5px; font-weight: 700; color: var(--color-text-dark); }
.dde-devata-punch { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); }
.dde-devata-zone { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: rgba(184, 134, 11, 0.12); color: var(--color-primary-dark); }
.dde-act-badge { font-size: 10.5px; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--color-divider); color: var(--color-text-medium); }
.dde-act-badge.good { border-color: rgba(22, 163, 74, 0.4); color: #15803d; }
.dde-act-badge.bad { border-color: rgba(220, 38, 38, 0.4); color: #b91c1c; }

.dde-zone-line { margin: 0 0 8px; font-size: 11.5px; color: var(--color-text-muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.dde-zone-effect { color: var(--color-primary-dark); font-weight: 600; }

.dde-sub { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-primary-dark); margin-bottom: 5px; }
.dde-sym-block { margin-bottom: 10px; }
.dde-sym-list { list-style: none; margin: 0; padding: 0; }
.dde-sym { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-bottom: 3px; }
.dde-sym-btn {
    background: none; border: none; padding: 2px 0; text-align: left; cursor: pointer;
    font-size: 12.5px; line-height: 1.45; color: var(--color-text-medium);
    border-bottom: 1px dotted var(--color-border);
}
.dde-sym-btn:hover { color: var(--color-primary-dark); border-bottom-color: var(--color-primary); }
.dde-sym-btn.as-text { cursor: default; border-bottom: none; }
.dde-sym.checked .dde-sym-btn { color: var(--color-text-dark); font-weight: 600; border-bottom-color: transparent; }
.dde-sym-flag { font-size: 10.5px; padding: 1px 6px; border-radius: 20px; background: rgba(22, 163, 74, 0.12); color: #15803d; white-space: nowrap; }

.dde-remedy { border-left: 2px solid var(--color-primary); padding-left: 10px; margin-bottom: 8px; }
.dde-remedy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.dde-remedy-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dde-remedy-grid span:first-child { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); }
.dde-remedy-grid span:last-child { font-size: 12px; color: var(--color-text-dark); }
.dde-remedy-list { margin: 0 0 8px; padding-left: 16px; font-size: 12px; line-height: 1.5; color: var(--color-text-medium); }
.dde-remedy-list li { margin-bottom: 3px; }
.dde-verdict { margin: 0; font-size: 12px; line-height: 1.5; color: var(--color-text-dark); }

.dde-expand-btn { background: none; border: none; padding: 4px 0; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--color-primary-dark); }
.dde-expand-btn:hover { text-decoration: underline; }
.dde-full-card { margin-top: 8px; }
.dde-full-card:empty { margin-top: 0; }

.dde-unexplained {
    margin: 0 0 14px; padding: 10px 12px; border-radius: 8px;
    font-size: 12px; line-height: 1.5; color: var(--color-text-medium);
    background: rgba(184, 134, 11, 0.07); border: 1px dashed var(--color-border);
}
.dde-unexplained.all { background: rgba(22, 163, 74, 0.07); }

.dde-ref { border: 1px solid var(--color-border); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.dde-ref summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--color-primary-dark); }
.dde-ref-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 11.5px; }
.dde-ref-table th, .dde-ref-table td { text-align: left; padding: 5px 7px; border-bottom: 1px solid var(--color-divider); vertical-align: top; }
.dde-ref-table th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); }
.dde-ref-note { margin: 10px 0 0; font-size: 11px; line-height: 1.55; font-style: italic; color: var(--color-text-muted); }
.dde-ref-note code { font-style: normal; font-size: 10.5px; }

/* Brief highlight on the checklist row a clicked symptom jumps to. */
.sf-item.dde-flash { background: rgba(184, 134, 11, 0.18); transition: background 0.6s ease; }

@media (max-width: 1100px) {
    .dde-steps { grid-template-columns: 1fr 1fr; }
    .dde-remedy-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .dde-right { overflow-y: visible; }
    .dde-panel { padding: 14px 16px 4px; }
    .dde-manual-row { flex-wrap: wrap; }
    .dde-manual-label { flex: 0 0 100%; }
}

/* =========================================================
   DASHA ZONES (AstroVastu sub-tab)
   Reuses the .dde-* card/tier/remedy classes above; only the
   house -> sign -> direction -> zone chain presentation is new.
   ========================================================= */
.dz-head { margin-bottom: 4px; }
.dz-steps { margin-bottom: 16px; }

.dz-planet-sign { font-size: 11.5px; color: var(--color-text-muted); font-style: italic; }
.dz-house-badge {
    font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px;
    background: rgba(74, 158, 255, 0.14); color: #1d4ed8;
}
.dz-house-badge.missing { background: rgba(107, 114, 128, 0.14); color: #4b5563; font-weight: 500; font-style: italic; }
.dz-dir-badge {
    font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px;
    background: rgba(22, 163, 74, 0.12); color: #15803d;
}
.dz-missing {
    margin: 0; padding: 9px 12px; font-size: 12px; line-height: 1.5;
    background: rgba(107, 114, 128, 0.07); color: var(--color-text-medium);
    border-bottom: 1px solid var(--color-divider);
}

.dz-chain {
    border: 1px solid var(--color-divider); border-left-width: 3px;
    border-radius: 8px; padding: 11px 13px; margin: 10px 0;
    background: var(--color-surface);
}
.dz-chain-occupies { border-left-color: var(--color-primary); }
.dz-chain-rules { border-left-color: #7c9cbf; }
.dz-chain.dz-status-bad { border-left-color: #dc2626; }
.dz-chain.dz-status-good { border-left-color: #16a34a; }

.dz-chain-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 7px; }
.dz-chain-kind {
    font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 700;
    padding: 2px 7px; border-radius: 4px;
    background: rgba(184, 134, 11, 0.14); color: var(--color-primary-dark);
}
.dz-chain-rules .dz-chain-kind { background: rgba(124, 156, 191, 0.18); color: #40608a; }
.dz-chain-title { font-size: 13px; font-weight: 700; color: var(--color-text-dark); }
.dz-chain-status { margin-left: auto; font-size: 11px; color: var(--color-text-muted); }
.dz-chain-status.bad { color: #b91c1c; }
.dz-chain-status.good { color: #15803d; }

.dz-steps-strip {
    display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
    padding: 7px 9px; margin-bottom: 7px; border-radius: 6px;
    background: rgba(184, 134, 11, 0.06);
}
.dz-hop {
    font-size: 11.5px; font-weight: 600; color: var(--color-text-dark);
    padding: 2px 7px; border-radius: 4px; background: #fff;
    border: 1px solid var(--color-divider);
}
.dz-arrow { font-size: 11px; color: var(--color-primary-dark); }

.dz-why { margin: 0 0 7px; font-size: 12px; line-height: 1.55; color: var(--color-text-medium); }
.dz-chain-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.dz-meta-chip {
    font-size: 11px; padding: 2px 8px; border-radius: 4px;
    background: var(--color-surface-alt, #f8fafc); border: 1px solid var(--color-divider);
    color: var(--color-text-muted);
}
.dz-meta-chip strong { color: var(--color-text-dark); font-weight: 600; }
.dz-notes { margin: 0 0 8px; font-size: 11.5px; font-style: italic; line-height: 1.5; color: var(--color-text-muted); }
.dz-chain-empty { margin: 6px 0; font-size: 12px; font-style: italic; color: var(--color-text-muted); }

@media (max-width: 860px) {
    .dz-steps-strip { gap: 4px; }
    .dz-chain-status { margin-left: 0; }
}


/* =========================================================
   LAYOUT BUILDER — wall-based plan editor (rail: Layout Builder)
   ========================================================= */
.lb-topbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lb-body { display: flex; flex: 1 1 auto; min-height: 0; }

.lb-tools {
    flex: 0 0 232px; overflow-y: auto; padding: 14px;
    background: var(--vc-panel); border-right: 1px solid var(--vc-panel-border);
}
.lb-tool-group { margin-bottom: 18px; }
.lb-group-title {
    display: block; font-size: 11px; font-weight: 700; letter-spacing: .6px;
    text-transform: uppercase; color: var(--vc-text-muted, #667085); margin-bottom: 8px;
}
.lb-tool {
    display: flex; align-items: center; gap: 9px; width: 100%;
    padding: 7px 10px; margin-bottom: 4px; font-size: 13px; text-align: left;
    background: transparent; border: 1px solid transparent; border-radius: 6px;
    color: var(--vc-text, #1b2430); cursor: pointer;
}
.lb-tool span {
    flex: 0 0 22px; height: 22px; display: flex; align-items: center; justify-content: center;
    font-size: 13px; border-radius: 4px; background: #eef1f5;
}
.lb-tool:hover { background: #f1f5fb; }
.lb-tool.active { background: #e8f0fe; border-color: #2563eb; color: #1d4ed8; font-weight: 600; }
.lb-tool.active span { background: #2563eb; color: #fff; }

.lb-field { display: block; font-size: 12px; color: var(--vc-text-muted, #667085); margin-bottom: 8px; }
.lb-field input[type="text"], .lb-field input[type="number"], .lb-field select {
    width: 100%; margin-top: 3px; padding: 5px 7px; font-size: 13px;
    border: 1px solid var(--vc-panel-border); border-radius: 5px; background: #fff;
}
.lb-inline { display: flex; gap: 6px; align-items: center; margin-top: 3px; }
.lb-inline input { flex: 1 1 auto; min-width: 0; }
.lb-inline select { flex: 0 0 62px; }
.lb-inline em { font-style: normal; font-size: 12px; color: var(--vc-text-muted, #667085); }
.lb-check { display: flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 3px 0; cursor: pointer; }
.lb-btn-row { display: flex; gap: 6px; margin-bottom: 6px; }
.lb-btn-row .vc-btn { flex: 1 1 0; min-width: 0; }
.lb-prop-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 3px 0; }
.lb-prop-row span { color: var(--vc-text-muted, #667085); }
.lb-del { width: 100%; margin-top: 6px; color: #b42318; border-color: #f3c4be; }

.lb-canvas-shell { position: relative; flex: 1 1 auto; min-width: 0; background: #fff; overflow: hidden; }
.lb-canvas-shell canvas { display: block; width: 100%; height: 100%; }
.lb-hint {
    position: absolute; left: 14px; bottom: 14px; max-width: 460px;
    padding: 8px 11px; font-size: 12px; line-height: 1.45;
    background: rgba(27,36,48,.86); color: #fff; border-radius: 6px; pointer-events: none;
}
.lb-readout {
    position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
    padding: 5px 11px; font-size: 13px; font-weight: 600;
    background: #2563eb; color: #fff; border-radius: 5px; pointer-events: none;
}
.lb-zoom { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.lb-zoom button {
    width: 30px; height: 30px; font-size: 17px; line-height: 1; cursor: pointer;
    background: var(--vc-panel); border: 1px solid var(--vc-panel-border); border-radius: 6px;
}
.lb-zoom button:hover { border-color: var(--vc-primary); color: var(--vc-primary); }

@media (max-width: 900px) {
    .lb-body { flex-direction: column; }
    .lb-tools { flex: 0 0 auto; max-height: 42vh; border-right: none; border-bottom: 1px solid var(--vc-panel-border); }
}

/* Open-loop warning — an unjoined wall end means LB_outerBoundary() can't trace
   the plan and the Map boundary silently falls back to a rectangle. */
.lb-openwarn {
    position: absolute; left: 14px; top: 14px; max-width: 460px;
    padding: 8px 11px; font-size: 12px; line-height: 1.45;
    background: #fef3f2; border: 1px solid #f3c4be; color: #912018;
    border-radius: 6px; pointer-events: none;
}

/* Typed-dimension fields in the Layout Builder's selection panel */
.lb-anchor-btn { flex: 0 0 34px; padding: 4px 0; font-size: 14px; line-height: 1; }
.lb-prop-hint { margin: -3px 0 8px; font-size: 11px; color: var(--vc-text-muted, #667085); line-height: 1.4; }

/* ── Sample-Demo mode (assets/vc-sample-demo.js) ──────────────────────────
   A bundled sample plan, reachable via ?sample=<id> with no login. Separate
   from the disposable "demo-xxxxx" account system (assets/vc-demo-auth.js)
   on purpose — different CSS namespace, different banner, so the two never
   collide if a page somehow carries both. */
.vc-sample-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9997;
    background: var(--vc-primary); color: #fff; text-align: center;
    padding: 9px 16px; font-size: 13px; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.vc-sample-banner a {
    color: #fff; text-decoration: underline; font-weight: 700;
}
.vc-sample-locked-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9996;
    background: #5A4A1A; color: #fff; text-align: center;
    padding: 7px 16px; font-size: 12.5px;
}
/* When both the Sample-Demo banner and the upload-locked notice show at once,
   stack the second one directly under the first rather than overlapping it. */
/* 38px is the desktop height of .vc-sample-banner, and was hardcoded here.
   On a narrow screen that banner wraps to two lines (62px measured at 390px),
   so the notice below it rode 24px too high and its first line disappeared
   behind the banner above -- leaving the visible text reading just "plan."
   reserveSpaceForBanners() in assets/vc-sample-demo.js already measures both
   banners; it now publishes the first one's height as this variable. The 38px
   fallback keeps the old behaviour if that script has not run yet. */
.vc-sample-banner ~ .vc-sample-locked-banner { top: var(--vc-sample-banner-h, 38px); }

/* Upgrade prompt shown when a Sample-Demo visitor clicks a download / print /
   export control. Deliberately styled like .vc-auth-gate-card rather than a
   new visual language. */
.vc-sample-upgrade {
    position: fixed; inset: 0; z-index: 10001;
    background: rgba(20, 16, 4, .55);
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.vc-sample-upgrade-card {
    max-width: 420px; width: 100%; background: var(--vc-panel);
    border: 1px solid var(--vc-panel-border); border-radius: 12px;
    padding: 28px; text-align: center;
}
.vc-sample-upgrade-card h2 { margin: 0 0 8px; color: var(--vc-text); font-size: 19px; }
.vc-sample-upgrade-card p { margin: 0 0 20px; color: var(--vc-text-muted); font-size: 14px; line-height: 1.55; }
.vc-sample-upgrade-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Sample-Demo loading overlay — shown the instant ?sample=<id> is detected,
   removed once the project restores (or replaced by the red error banner on
   failure). Covers the tool's own default empty-canvas state so a first-time
   visitor never sees what looks like a blank/broken page while script.js
   (a large bundle) and the sample fetches are still in flight. */
.vc-sample-loading {
    position: fixed; inset: 0; z-index: 9995;
    background: var(--vc-bg, #FFFBF0);
    display: flex; align-items: center; justify-content: center;
}
/* Same specificity as the rule above, so cascade order alone decided which
   won — without this, [hidden]'s UA-stylesheet display:none lost to the
   class rule above and the overlay showed on every page load, sample or
   not. This must stay declared after .vc-sample-loading. */
.vc-sample-loading[hidden] { display: none; }
.vc-sample-loading-card { text-align: center; color: var(--vc-text-muted, #667085); }
.vc-sample-loading-card p { margin: 14px 0 0; font-size: 14px; }
.vc-sample-spinner {
    width: 34px; height: 34px; margin: 0 auto;
    border: 3px solid var(--vc-panel-border, #E4D9B8);
    border-top-color: var(--vc-primary, #B8860B);
    border-radius: 50%;
    animation: vc-sample-spin 0.8s linear infinite;
}
@keyframes vc-sample-spin { to { transform: rotate(360deg); } }

/* ── Out-of-credits / analysis error banner ──────────────────────────────
   Shown in place of the raw "Failed to submit analysis (status 429)" that the
   AstroVastu and Planets Hits forms used to print. Both endpoints are metered
   (countUsage:true), so a 429 there means the account's credits are spent —
   which needs explaining and a way forward, not an HTTP status code.
   Built by VC_explainAnalysisError() in script.js. */
.vc-limit-banner {
    background: #FBF3DA;
    border: 1px solid #E4D9B8;
    border-left: 4px solid #B8860B;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 12px 0;
    text-align: left;
    color: #5a4320;
    font-size: 13.5px;
    line-height: 1.6;
}
.vc-limit-head {
    font-size: 15px;
    font-weight: 700;
    color: #8A6510;
    margin-bottom: 6px;
}
.vc-limit-banner p { margin: 0 0 8px; }
.vc-limit-counts {
    display: inline-block;
    background: #fff;
    border: 1px solid #E4D9B8;
    border-radius: 6px;
    padding: 6px 10px;
    font-weight: 600;
    font-size: 13px;
}
.vc-limit-note { font-size: 12.5px; color: #6b5a30; }
.vc-limit-cta {
    display: inline-block;
    margin-top: 4px;
    background: #B8860B;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    padding: 9px 16px;
    font-weight: 600;
    font-size: 13.5px;
}
.vc-limit-cta:hover { background: #8A6510; color: #fff; }

/* Basis-of-measurement footnote inside report tables (e.g. the entrance row,
   where the pada comes from the mandala cell and the bearing from the compass
   ring — two different measurements that must not read as one). */
.vc-report-note { display: inline-block; font-size: 11px; color: var(--vc-text-muted, #777); font-style: italic; line-height: 1.35; }

/* ============================================================
   PHONE / SMALL-TABLET LAYOUT
   The Map tab had no small-screen breakpoint at all: .vc-tour
   (260px) and .vc-tools (292px) are fixed flex columns, so on a
   390px phone 552px of panels competed for the screen and
   the canvas was left with a sliver — which is why the plan
   rendered tiny before the image even loaded.

   Both panels become overlay drawers here instead of columns, so
   the canvas gets the full width. Purely additive: every rule is
   scoped inside this media query and no existing rule is edited,
   so a desktop browser above 860px never evaluates any of it and
   renders exactly as before.
   ============================================================ */
@media (max-width: 860px) {
    /* 84px of rail is a fifth of a phone screen. The labels are the accessible
       name for each tab, so they are shrunk rather than removed — .vc-rail-item
       carries the label text, .vc-rail-icon has its own explicit size. */
    :root { --vc-rail-w: 58px; }
    .vc-rail-item, .vc-rail-sub-item { font-size: 9px; line-height: 1.15; padding: 6px 2px; }
    .vc-rail-icon { font-size: 17px; }

    /* .vc-body is already the positioning context for .vc-tour-reopen, so both
       drawers anchor to it without any new wrapper. */
    .vc-tour,
    .vc-tools {
        position: absolute; top: 0; bottom: 0; z-index: 40;
        width: min(88vw, 330px); max-width: 88vw;
        box-shadow: 0 6px 28px rgba(16, 24, 40, .28);
        overscroll-behavior: contain;
    }
    .vc-tour { left: 0; border-right: 1px solid var(--vc-panel-border); }
    /* Same pill row, second collision. .vc-map-namebox is absolute at
       bottom:14px/left:14px inside the canvas shell and .vc-pill-row is fixed
       at bottom:16px/left:16px, so both want the bottom-left corner. Above
       this breakpoint the tour panel fills that strip and the overlap never
       showed; now that the tour starts collapsed on a phone, the pills landed
       directly on the map-name input -- 7,236px of overlap measured at 390px.
       The namebox reaches 49px up (14px offset + 35px tall), so clear it. */
    .vc-pill-row { bottom: 60px; }
    /* 60px offset + ~33px pill height + 19px breathing = 112px. Lifting the
       pills above the namebox pushed their top edge to 93px off the bottom,
       which the base 68px no longer covered -- the tour's last step went back
       under them (5,432px measured at 390px) until this matched. */
    :root { --vc-pill-clearance: 112px; }
    /* .vc-tour.collapsed{display:none} already exists and the Guide / × buttons
       already toggle it, so the drawer reuses that machinery rather than
       introducing a second mechanism. */
    .vc-tools { right: 0; display: none; }
    .vc-tools.vc-drawer-open { display: block; }
    /* Above .vc-tools (z-index 40) — at 25 the drawer covered its own close
       button and left the user with no visible way back to the map. */
    .vc-tools-toggle { display: flex !important; }
    /* Sits clear of the drawer edge once open, so it reads as "close this". */
    .vc-tools.vc-drawer-open ~ .vc-tools-toggle,
    .vc-tools-toggle[aria-expanded="true"] { box-shadow: 0 2px 10px rgba(16,24,40,.35); }

    /* Give the canvas the whole remaining width. */
    .vc-canvas-shell { flex: 1 1 auto; min-width: 0; }

    /* The on-canvas control clusters are absolutely positioned by right-offsets
       (470 / 374 / 320 / 106 / 14px) that assume a canvas at least ~520px wide.
       On a 300px canvas those resolve to negative lefts and the clusters slide
       off the edge and pile on top of each other. Re-anchored here into two
       left-aligned rows that fit. */
    .vc-canvas-hand    { left: 6px;   right: auto; top: 8px; }
    .vc-canvas-chakra  { left: 58px;  right: auto; top: 8px; }
    .vc-canvas-history { left: 110px; right: auto; top: 8px; }
    .vc-canvas-zoom    { right: 6px;  left: auto;  top: 60px; }
    /* Pan arrows are redundant on touch: one-finger drag already pans and
       pinch already zooms (see panTouch / pinchState). Hiding 5 buttons that
       duplicate native gestures buys back the whole first row. */
    .vc-canvas-nudge { display: none; }

    /* Both drawer openers sit on the second row, clear of the clusters above. */
    .vc-tour-reopen  { left: 6px;  top: 60px; }
    .vc-tools-toggle { right: 6px; top: 8px; }

    /* The mode tag became a cancel BUTTON, so it can no longer sit under other
       controls. At its desktop spot (top/left 14px) it covered the re-anchored
       clusters above -- measured 1,520px over the hand tool, 1,840px over the
       chakra toggle and 3,360px over undo/redo -- and being z-index 20 it won,
       making three buttons unpressable for as long as a mode was active.

       Nowhere else on a 332x378 shell fits it. Measured gaps: row 1 leaves
       194->278 (84px), row 2 leaves 46->204 (158px), and the tag needs 191px
       even for the shortest wording once the longest label ("Washing Machine")
       is in it. A full-width bar across the canvas middle would be worse than
       either: it is a button at z-index 20, so a tap aimed at the map to PLACE
       something would cancel instead.

       So: the bottom strip, full width, X at the far right for a big target.
       That strip already belongs to .vc-map-namebox, which already blocks map
       taps there -- so this adds no new obstruction to the canvas, and the
       namebox steps aside for the duration rather than being buried under it
       (display:none keeps whatever was typed). :has() has no previous-sibling
       alternative here: #vc-mapNameBox precedes #vc-modeTag in the DOM. Where
       :has() is unsupported the tag simply overlaps it, which is the same
       outcome as doing nothing. */
    .vc-modeTag {
        top: auto; left: 6px; right: 6px; bottom: 14px;
        max-width: none; justify-content: space-between;
    }
    .vc-canvas-shell:has(.vc-modeTag.show) .vc-map-namebox { display: none; }

    /* Header wraps rather than pushing the canvas narrower. */
    .vc-topbar { flex-wrap: wrap; row-gap: 6px; }
    /* .vc-topbar wrapping is not enough on its own: every one of the 11 toolbar
       buttons lives in this single flex child, so the child stayed one
       965px-wide nowrap row inside a 332px header. Nothing in the ancestor
       chain scrolls horizontally and the page does not either, so 8 of the 11
       were simply unreachable on a phone -- Measurement, Report, Vastu Score,
       Symptoms, Impact Summary, Simple Report, Guide and Checklist, i.e. every
       entry point to the report. Measured on a 390px viewport before this
       rule: 3 reachable, 8 clipped off-screen. */
    .vc-topbar-left { flex-wrap: wrap; row-gap: 6px; }
    .vc-steps { flex-wrap: wrap; row-gap: 4px; }
}

/* Opener button for the right-hand tools drawer. Hidden above the
   breakpoint, where .vc-tools is a permanent column and needs none. */
.vc-tools-toggle {
    display: none;
    /* Above .vc-tools (z-index 40): the drawer must never cover its own
       close button. Declared here, not in the media query above — this rule is
       later in the file and a media query adds no specificity, so a value set
       there would lose to this one. */
    position: absolute; right: 14px; top: 14px; z-index: 45;
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--vc-panel-border);
    background: var(--vc-panel); color: var(--vc-text); font-size: 17px; cursor: pointer;
    box-shadow: 0 2px 8px rgba(16, 24, 40, .14);
    align-items: center; justify-content: center; padding: 0;
}
.vc-tools-toggle:hover { border-color: var(--vc-primary); color: var(--vc-primary); }
