/* =========================================================
   Sanctuarie - Relational Topography (style.heart.css)
   Pure Structural Scaffolding. GSAP is the Master Animator.
   ✨ ZERO-SHADOW AUDIT: All drop-shadows, text-shadows, and heavy GPU inset calculations purged.
   ✨ BLAZING FAST: Relies purely on solid backgrounds, borders, and JS-injected 'seen' glows.
   ✨ ENTITY STATES: Intended (Bright Colourful) and Seen (Inverted/Glowing) variants added for Reg/Lite.
   ========================================================= */

/* --- 1. CORE LAYOUT & CANVAS --- */
body { overflow-x: hidden; }

.universe-track { 
    display: flex; width: 200vw; height: 100vh; position: absolute; inset: 0; will-change: transform; 
}
.heart-section { 
    width: 100vw; height: 100vh; position: relative; flex-shrink: 0; overflow: hidden;
    background: color-mix(in srgb, var(--bgBot, #000) 90%, #050508); 
}

/* Baseline vector map loaded unblurred for clean geometric rendering */
.heart-map-svg { 
    position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; 
    filter: none !important; opacity: 0.15; transition: opacity 0.3s ease; 
}
body:has(.heart-scrubber-wrap.is-scrubbing) .heart-map-svg { opacity: 0.35; }

.heart-orbs-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }


/* --- 2. ORBS (THE ENTITIES) --- */
.heart-orb {
    position: absolute; top: 0; left: 0; cursor: pointer;
    z-index: 5; pointer-events: none;
    filter: none !important;
    box-shadow: none !important;
}
body.heart-mode-active .heart-orb {
    pointer-events: auto;
}

/* Flat UI entity blocks featuring bold borders */
.orb-inner {
    display: inline-flex; align-items: center; justify-content: center; position: relative;
    padding: 5px 13px; border-radius: 20px;
    font-family: 'Noto Sans JP', sans-serif; font-size: 11px; font-weight: 900; white-space: nowrap; user-select: none;
    
    background: color-mix(in srgb, var(--bgMid, #05070a) 85%, rgb(var(--circadian-dark, 5,5,8)));
    border: 1px solid color-mix(in srgb, var(--capsuleAccent) 30%, rgba(255,255,255,0.1));
    color: color-mix(in srgb, rgb(var(--circadian-accent, 255,255,255)) 30%, rgba(255,255,255,0.6));
    
    box-shadow: none !important; 
    text-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important; 
    transform-origin: center center;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

/* State: Engaged (Hovered/Active Base) */
.heart-orb[data-engaged="true"] .orb-inner {
    color: #fff;
    border-color: color-mix(in srgb, var(--capsuleAccent) 80%, rgba(255,255,255,0.3));
    box-shadow: none !important; 
    text-shadow: none !important;
}

/* State: Intended (Bright Colourful) */
.heart-orb[data-status="intended"] .orb-inner,
.heart-orb[data-state="intended"] .orb-inner {
    background: color-mix(in srgb, var(--capsuleAccent) 30%, rgb(var(--circadian-dark, 5,5,8)));
    border-color: var(--capsuleAccent);
    color: #fff;
}

/* State: Seen (Glowing White with Node-Matching Glow) */
.heart-orb[data-status="seen"] .orb-inner,
.heart-orb[data-state="seen"] .orb-inner {
    background: #fff;
    border-color: #fff;
    color: #000;
    box-shadow: 0 0 15px var(--capsuleAccent) !important;
}

/* Hover Overrides */
.heart-orb:hover .orb-inner {
    background: var(--capsuleAccent) !important;
    border-color: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
}

.orb-count { 
    margin-left: 8px; opacity: 0.7; font-size: 9px; font-family: 'Neuton', serif; 
    text-shadow: none !important; 
}
.heart-orb:hover .orb-count { color: #000; opacity: 1; }

.consistency-ring {
    position: absolute; inset: 0; border-radius: 50%;
    pointer-events: none; z-index: -1;
}

.orb-bg-count {
    position: absolute; top: 50%; left: 50%; 
    transform: translate(-50%, -50%) scale(0.8);
    font-size: 80px; 
    font-family: 'Neuton', serif; font-weight: bold; 
    opacity: 0; z-index: -2; pointer-events: none;
    color: currentColor; 
    text-shadow: none !important; filter: none !important;
    transition: all 0.4s ease;
}

.heart-orb:hover .orb-bg-count { 
    opacity: 0.15; 
    transform: translate(-50%, -50%) scale(1); 
}

body.is-aligned-layout .orb-bg-count { opacity: 0.04; transform: translate(-50%, -50%) scale(0.9); }
body.is-aligned-layout .heart-orb:hover .orb-bg-count { opacity: 0.2; transform: translate(-50%, -50%) scale(1.05); }


/* --- 3. ANIMATIONS & INTERACTIONS --- */
.heart-orb.is-long-pressing .orb-inner {
    border-color: #ff6666 !important;
    background: color-mix(in srgb, #ff6666 20%, #050508) !important;
    color: #ff6666 !important;
    box-shadow: none !important;
}
.heart-link-hitbox { pointer-events: none; cursor: no-drop; transition: stroke 0.2s ease; }
body.heart-mode-active .heart-link-hitbox { pointer-events: stroke; }
.heart-link-hitbox:hover { stroke: rgba(255, 102, 102, 0.5); }
.chrono-ripple { position: absolute; top: 50%; left: 50%; width: 50vw; height: 50vw; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid #ff6666; pointer-events: none; z-index: 1; box-shadow: none !important; }


/* --- 4. GLOBAL UI & CONTROLS --- */
.nav-arrow, #navToMain { 
  position: fixed !important; top: 50% !important; transform: translateY(-50%); 
  font-size: 32px; color: color-mix(in srgb, rgb(var(--circadian-accent, 255,255,255)) 40%, rgba(255,255,255,0.3)); cursor: pointer; 
  z-index: 3500 !important; padding: 20px; transition: color 0.2s ease; 
  opacity: 0; pointer-events: none; text-shadow: none !important; filter: none !important;
}
body.heart-mode-active .nav-arrow, body.heart-mode-active #navToMain {
  opacity: 1 !important; pointer-events: auto !important;
}
.nav-arrow:hover, #navToMain:hover { color: #ff6666; }
.nav-arrow.right-edge { right: 10px !important; } .nav-arrow.left-edge { left: 10px !important; }

/* Constellation Button Base */
.heart-btn { 
    background: color-mix(in srgb, var(--capsuleAccent) 15%, #050508); 
    color: #fff; 
    border: 1px solid var(--capsuleAccent); padding: 12px 24px; 
    border-radius: 30px; font-family: 'Noto Sans JP', sans-serif; 
    font-size: 11px; font-weight: 900; letter-spacing: 3px; 
    text-transform: uppercase; cursor: pointer; 
    transition: background-color 0.2s, color 0.2s, border-color 0.2s; 
    backdrop-filter: none; box-shadow: none !important; filter: none !important; text-shadow: none !important;
}
.heart-btn:hover { background: var(--capsuleAccent); color: #000; border-color: #fff; }
body.is-aligned-layout .heart-btn { background: color-mix(in srgb, #88ffaa 15%, #050508); color: #88ffaa; border-color: #88ffaa; }
body.is-aligned-layout .heart-btn:hover { background: #88ffaa; color: #000; border-color: #fff; }

/* --- UI STACKING --- */
.heart-ui-stack {
    position: fixed !important;
    bottom: 40px !important;
    left: 120px !important;
    display: flex;
    flex-direction: column; /* Stack vertically, top to bottom */
    gap: 12px;
    z-index: 3500 !important;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
body.heart-mode-active .heart-ui-stack { 
    opacity: 1 !important; 
    pointer-events: auto !important; 
}

.heart-ui-stack .heart-btn {
    width: 220px;
    text-align: center;
}


/* --- 5. THE CHRONO SCRUBBER (VERTICAL) --- */
.heart-scrubber-wrap { 
    position: absolute; top: 50%; left: 0; bottom: auto; right: auto;
    transform: translateY(-50%); 
    height: 60vh; max-height: 700px; width: 100px; 
    display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 15px; 
    z-index: 3000 !important; opacity: 0; pointer-events: none; 
    transition: opacity 0.4s ease; 
}
body.heart-mode-active .heart-scrubber-wrap { opacity: 0.25 !important; pointer-events: auto !important; filter: none; }
body.heart-mode-active .heart-scrubber-wrap:hover, body.heart-mode-active .heart-scrubber-wrap.is-scrubbing { opacity: 1 !important; }

.hs-step-btn { background: color-mix(in srgb, rgb(var(--circadian-dark, 0,0,0)) 80%, #000); border: 1px solid rgb(var(--circadian-accent, 255,255,255)); color: #fff; min-width: 40px; height: 40px; border-radius: 50%; font-size: 20px; font-weight: 900; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; box-shadow: none !important; filter: none !important; transition: background-color 0.2s, color 0.2s, border-color 0.2s; text-shadow: none !important; }
.hs-step-btn:hover { background: #ff6666; border-color: #ff6666; color: #000; }
.hs-track-wrap { position: relative; width: 100%; flex-grow: 1; display: flex; justify-content: center; }

.hs-ticks { position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; z-index: 0; }
.hs-tick { position: absolute; left: 50%; transform: translate(-50%, 50%); display: flex; flex-direction: row; align-items: center; gap: 12px; width: 10px; justify-content: center;}
.hs-tick-mark { width: 10px; height: 2px; background: color-mix(in srgb, rgb(var(--circadian-accent, 255,255,255)) 40%, rgba(255, 255, 255, 0.2)); border-radius: 1px; }
.hs-tick span { font-family: 'Noto Sans JP', sans-serif; font-size: 10px; font-weight: 900; color: color-mix(in srgb, rgb(var(--circadian-accent, 255,255,255)) 60%, rgba(255, 255, 255, 0.5)); text-transform: uppercase; letter-spacing: 2px; position: absolute; left: 20px; white-space: nowrap; text-shadow: none !important;}

.hs-track-bg { position: absolute; bottom: 0; width: 4px; height: 100%; background: color-mix(in srgb, rgb(var(--circadian-accent, 255,255,255)) 20%, rgba(255,255,255,0.1)); border-radius: 2px; pointer-events: none; z-index: 1; transition: width 0.2s ease; }
.hs-fill { position: absolute; bottom: 0; width: 4px; height: 0%; background: #ff6666; border-radius: 2px; pointer-events: none; z-index: 2; overflow: hidden; box-shadow: none !important; transition: width 0.2s ease; }
.hs-fill-energy { position: absolute; bottom: 0; left: 0; right: 0; height: 100%; background: rgba(255,255,255,0.3); opacity: 1; transition: none; animation: none; }
.heart-scrubber-wrap.is-scrubbing .hs-track-bg, .heart-scrubber-wrap.is-scrubbing .hs-fill { width: 8px; }

.hs-slider-container { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }

.hs-slider { 
    -webkit-appearance: slider-vertical; 
    appearance: slider-vertical;
    width: 100%; height: 100%; 
    background: transparent; outline: none; cursor: pointer; z-index: 5; 
    pointer-events: none; margin: 0;
}

body.heart-mode-active .hs-slider {
    pointer-events: auto;
}

.hs-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 12px; border-radius: 4px; background: #ffffff; border: 1px solid #ff6666; box-shadow: none !important; cursor: grab; transition: transform 0.2s ease, background-color 0.2s ease; }
.hs-slider::-webkit-slider-thumb:hover { transform: scaleX(1.3) scaleY(1.3); background: #ff6666; }
.hs-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scaleX(1.5) scaleY(1.5); background: #ff6666; }

.hs-tooltip { position: absolute; left: 55px; transform: translateY(50%); background: #050508; border: 1px solid #ff6666; padding: 8px 16px; border-radius: 12px; box-shadow: none !important; pointer-events: none; text-align: left; min-width: 120px; backdrop-filter: none; z-index: 6; transition: left 0.2s ease; text-shadow: none !important; }
.heart-scrubber-wrap.is-scrubbing .hs-tooltip { left: 65px; }
.hs-tooltip::after { content: ''; position: absolute; left: -6px; top: 50%; transform: translateY(-50%); border-width: 6px 6px 6px 0; border-style: solid; border-color: transparent #ff6666 transparent transparent; }
.hs-relative { font-family: 'Noto Sans JP', sans-serif; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 900; color: #ff6666; margin-bottom: 4px; text-shadow: none !important;}
.hs-date { font-family: 'Neuton', serif; font-size: 14px; color: #fff; font-weight: bold; white-space: nowrap; text-shadow: none !important;}


/* --- 6. SEARCH & MODALS --- */
.heart-quick-search {
    position: absolute; top: 40px; left: 50%; transform: translateX(-50%);
    font-family: 'Noto Sans JP', sans-serif; font-size: 24px; font-weight: 900; letter-spacing: 4px; text-transform: uppercase;
    color: #fff; background: #050508; 
    padding: 12px 40px; border-radius: 40px;
    border: 2px solid rgb(var(--circadian-accent, 255,255,255)); 
    box-shadow: none !important; filter: none !important; backdrop-filter: none;
    pointer-events: none; opacity: 0; 
    z-index: 3000; 
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-shadow: none !important;
}
.heart-quick-search.is-active { opacity: 1; transform: translateX(-50%) translateY(10px); }

.hs-center-modal { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%) scale(0.9); text-align: center; pointer-events: none; z-index: 1; opacity: 0; filter: none !important; transition: opacity 0.3s ease, transform 0.3s ease; }
.hs-center-modal.is-scrubbing { opacity: 1; transform: translate(-50%, -50%) scale(1); z-index: 3000; }
.hs-center-modal.is-resting { opacity: 0.15; transform: translate(-50%, -50%) scale(0.95); }
#hscmDate { font-family: 'Neuton', serif; font-size: 80px; font-weight: bold; color: #fff; line-height: 1; white-space: nowrap; text-shadow: none !important; }
#hscmRelative { font-family: 'Noto Sans JP', sans-serif; font-size: 16px; font-weight: 900; letter-spacing: 6px; text-transform: uppercase; color: #ff6666; margin-top: 15px; text-shadow: none !important; }

/* Inline Inputs infused with active circadian and layout variables */
.heart-inline-modal { position: absolute; transform: translate(-50%, -50%); z-index: 3000; filter: none !important; box-shadow: none !important; }
.heart-inline-modal input { background: color-mix(in srgb, rgb(var(--circadian-dark, 0,0,0)) 80%, #000); border: 1.5px solid rgb(var(--circadian-accent, 255,255,255)); border-radius: 20px; padding: 6px 16px; color: #fff; font-family: 'Noto Sans JP', sans-serif; font-size: 11px; font-weight: bold; outline: none; text-align: center; width: 140px; box-shadow: none !important; filter: none !important; backdrop-filter: none; transition: border-color 0.2s ease; text-shadow: none !important; }
.heart-inline-modal input:focus { border-color: #ff6666; }

.heart-modal-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(0, 0, 0, 0.9); backdrop-filter: none; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.heart-modal-overlay.is-active { opacity: 1; pointer-events: auto; }

/* Solid Modal Interface */
.heart-modal { background: linear-gradient(var(--bgAngle, 180deg), color-mix(in srgb, rgb(var(--circadian-accent, 255,255,255)) 15%, #111), color-mix(in srgb, rgb(var(--circadian-dark, 5,5,8)) 80%, #050508)); border: 2px solid #ff6666; padding: 35px 45px; border-radius: 16px; box-shadow: none !important; filter: none !important; text-align: center; transform: scale(0.98) translateY(5px); transition: transform 0.2s ease; display: flex; flex-direction: column; gap: 15px; }
.heart-modal-overlay.is-active .heart-modal { transform: scale(1) translateY(0); }
.hm-subtitle { font-family: 'Noto Sans JP', sans-serif; font-size: 10px; font-weight: 900; letter-spacing: 3px; text-transform: uppercase; color: #ff6666; text-shadow: none !important; }
.heart-modal button { cursor: pointer; transition: transform 0.2s ease; box-shadow: none !important; text-shadow: none !important; }
.heart-modal button:hover { transform: scale(1.05); }

