/**
 * ExplorerUK — App shell (premium map-first UX)
 * Design tokens unchanged from index.html :root.
 */
:root {
  --forest: #14532d;
  --forest-mid: #166534;
  --forest-soft: #dcfce7;
  --harvest: #b45309;
  --harvest-mid: #d97706;
  --harvest-soft: #fffbeb;
  --primary-green: var(--forest-mid);
  --accent-green: var(--forest);
  --gold: #334155;
  --dark-gold: #0f172a;
  --premium-gold: #64748b;
  --deep-navy: #0f172a;
  --charcoal: #1e293b;
  --slate: #334155;
  --soft-white: #ffffff;
  --warm-gray: #e2e8f0;
  --danger: #dc2626;
  --page-bg: #ffffff;
  --page-bg-alt: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --nav-bg: rgba(255, 255, 255, 0.97);
  --shell-shadow: 0 -8px 32px rgba(15, 23, 42, 0.08);
  --shell-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --shell-snap: 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  --euk-touch: 48px;
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-bg-strong: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.45);
  --glass-edge: rgba(15, 23, 42, 0.08);
  --glow-forest: 0 0 0 1px rgba(22, 101, 52, 0.12), 0 4px 24px rgba(22, 101, 52, 0.18);
  --glow-forest-soft: 0 0 40px rgba(22, 101, 52, 0.22);
  --glass-dark: rgba(15, 23, 42, 0.74);
  --glass-dark-mid: rgba(15, 23, 42, 0.62);
  --glass-dark-border: rgba(255, 255, 255, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --shell-transition: 0.01ms;
    --shell-snap: 0.01ms;
  }

  body.euk-app.euk-hook-phase .euk-map-slot-inner {
    animation: none;
  }

  body.euk-shell-intro .euk-app-top {
    animation: none;
  }

  .euk-search-stack {
    animation: none;
  }

  .euk-authority-line-dot {
    animation: none;
  }

  body.euk-app.euk-hook-phase .euk-hook-pin {
    opacity: 0.55;
    animation: none;
  }

  .euk-map-iframe {
    opacity: 1;
    animation: none;
  }

  .euk-persist-cta {
    animation: none;
  }

  .euk-wall-sheet {
    animation: none;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body.euk-app {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--deep-navy);
  color: var(--text-primary);
  overflow: hidden;
  line-height: 1.5;
}

#euk-app-root.euk-cinematic-boot {
  opacity: 0;
  transform: translateY(6px);
}

#euk-app-root.euk-cinematic-boot.euk-cinematic-boot--on {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.euk-app a {
  color: var(--forest-mid);
  font-weight: 600;
}

.euk-app a:hover {
  color: var(--forest);
}

.euk-bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 10%, rgba(15, 23, 42, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 90%, rgba(22, 101, 52, 0.05) 0%, transparent 55%);
}

#euk-app-root {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100dvh;
  isolation: isolate;
}

/* Floating dark glass top bar — cinematic chrome */
.euk-app-top {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  left: max(10px, env(safe-area-inset-left, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.4rem 0.18rem 0.5rem;
  min-height: 44px;
  max-width: min(720px, 100%);
  margin: 0 auto;
  background: var(--glass-dark);
  border: 1px solid var(--glass-dark-border);
  border-radius: 999px;
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition:
    opacity var(--shell-transition),
    transform var(--shell-transition),
    max-height var(--shell-transition),
    box-shadow 0.35s ease;
}

body.euk-shell-intro .euk-app-top {
  animation: eukChromeDrop 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

@keyframes eukChromeDrop {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.euk-app-top:focus-within {
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(22, 101, 52, 0.35),
    var(--glow-forest-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

body.euk-app.is-immersive .euk-app-top {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-120%);
}

body.euk-app.is-immersive .euk-search-stack {
  opacity: 0;
  pointer-events: none;
}

body.euk-app.is-immersive .euk-authority-line {
  opacity: 0;
}

body.euk-app.is-immersive #euk-bottom-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
}

body.euk-app.is-immersive .euk-persist-cta {
  opacity: 0;
  pointer-events: none;
}

body.euk-app.is-immersive .euk-focus-dim,
body.euk-app.is-immersive .euk-map-scrim {
  opacity: 0;
  pointer-events: none;
}

.euk-app-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: #f1f5f9;
  font-weight: 800;
}

.euk-app-brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.euk-app-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.euk-app-brand-main {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.euk-app-brand-live {
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  color: #dc2626;
}

.euk-app-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.euk-app-top .euk-icon-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    background var(--shell-transition),
    border-color var(--shell-transition),
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
}

.euk-app-top .euk-icon-btn:hover {
  border-color: rgba(134, 239, 172, 0.45);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--glow-forest);
}

/* Icon buttons outside top bar (e.g. immersive exit) */
.euk-icon-btn {
  font: inherit;
  cursor: pointer;
  border-radius: 14px;
}

.euk-icon-btn:focus-visible {
  outline: 2px solid var(--forest-mid);
  outline-offset: 2px;
}

.euk-icon-btn:active {
  transform: scale(0.94);
}

.euk-icon-btn--primary {
  background: linear-gradient(145deg, var(--forest-mid) 0%, var(--forest) 100%);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: 0 4px 18px rgba(22, 101, 52, 0.35);
}

.euk-icon-btn--primary:hover {
  box-shadow: 0 6px 26px rgba(22, 101, 52, 0.45);
}

.euk-icon-btn--glass {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.14);
}

/* Body: map + side */
.euk-app-body {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  position: relative;
}

.euk-map-slot {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  background: var(--deep-navy);
  border: 0;
}

.euk-map-slot-inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform-origin: center center;
}

body.euk-app.euk-hook-phase .euk-map-slot-inner {
  animation: eukMapCinematic 3.1s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

@keyframes eukMapCinematic {
  0% {
    transform: scale(1.048) translate(-0.45%, 0.12%);
  }
  28% {
    transform: scale(1.03) translate(0.35%, -0.08%);
  }
  55% {
    transform: scale(1.014) translate(-0.2%, 0.04%);
  }
  100% {
    transform: scale(1) translate(0, 0);
  }
}

#euk-map-slot.euk-slot-nudge-zoom .euk-map-slot-inner {
  animation: eukSheetZoomNudge 0.45s ease;
}

@keyframes eukSheetZoomNudge {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.014);
  }
  100% {
    transform: scale(1);
  }
}

.euk-map-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, transparent 26%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.58) 0%, transparent 38%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.2) 0%, transparent 14%, transparent 86%, rgba(15, 23, 42, 0.2) 100%),
    radial-gradient(ellipse 80% 55% at 50% 40%, transparent 0%, rgba(15, 23, 42, 0.15) 100%);
  opacity: 0.92;
  transition: opacity 0.4s ease, filter 0.4s ease;
}

body.euk-app.euk-search-focus .euk-map-scrim {
  opacity: 1;
  filter: saturate(1.05) brightness(0.92);
}

.euk-focus-dim {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: rgba(15, 23, 42, 0);
  opacity: 0;
  transition: opacity 0.4s ease, background 0.4s ease;
}

body.euk-app.euk-search-focus .euk-focus-dim {
  opacity: 1;
  background: rgba(15, 23, 42, 0.38);
}

.euk-map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--deep-navy);
  opacity: 0;
  animation: eukIframeFade 1.15s ease 0.12s forwards;
}

@keyframes eukIframeFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Decorative “pins” — shell-only, does not block map taps */
.euk-hook-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.euk-hook-pin {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--forest-mid);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.88);
  opacity: 0;
}

body.euk-app.euk-hook-phase .euk-hook-pin:nth-child(1) {
  top: 36%;
  left: 26%;
  animation: eukPinPop 0.75s ease 0.35s forwards;
}

body.euk-app.euk-hook-phase .euk-hook-pin:nth-child(2) {
  top: 52%;
  left: 58%;
  animation: eukPinPop 0.75s ease 0.65s forwards;
}

body.euk-app.euk-hook-phase .euk-hook-pin:nth-child(3) {
  top: 44%;
  left: 42%;
  animation: eukPinPop 0.75s ease 0.95s forwards;
}

@keyframes eukPinPop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 0.92;
    transform: scale(1);
  }
}

.euk-guide-hint {
  position: absolute;
  left: 50%;
  top: calc(max(10px, env(safe-area-inset-top, 0px)) + 52px);
  transform: translateX(-50%);
  z-index: 19;
  margin: 0;
  padding: 0.42rem 1rem;
  max-width: min(92vw, 22rem);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.55s ease;
}

body.euk-app.euk-has-interacted .euk-guide-hint,
body.euk-app.euk-guide-spent .euk-guide-hint {
  opacity: 0;
}

body.euk-app.is-immersive .euk-guide-hint {
  opacity: 0;
}

/* Search stack — hero engine + authority (sits above focus dim) */
.euk-search-stack {
  position: absolute;
  left: 50%;
  top: 37%;
  bottom: auto;
  transform: translate(-50%, -50%);
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: min(96vw, 520px);
  pointer-events: none;
  animation: eukStackEnter 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), bottom 0.4s ease, top 0.4s ease;
}

.euk-search-stack > * {
  pointer-events: auto;
}

.euk-search-stack:has(.euk-float-search.is-focused) {
  transform: translate(-50%, -50%) scale(1.025);
}

body.euk-app.euk-bottom-expanded .euk-search-stack {
  top: auto;
  bottom: calc(min(44vh, 400px) + 24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
}

body.euk-app.euk-bottom-expanded .euk-search-stack:has(.euk-float-search.is-focused) {
  transform: translateX(-50%) scale(1.025);
}

@keyframes eukStackEnter {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 18px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.euk-authority-line {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.95);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.euk-authority-line-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--forest-soft);
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.55);
  animation: eukAuthPulse 2.4s ease-in-out infinite;
}

@keyframes eukAuthPulse {
  0%,
  100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

.euk-authority-line-text {
  max-width: 20rem;
  text-align: center;
  line-height: 1.25;
}

/* Dark glass search — primary engine */
.euk-float-search {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  z-index: 1;
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  width: 100%;
  padding: 0.4rem 0.45rem 0.4rem 1.15rem;
  background: var(--glass-dark-mid);
  border: 1px solid var(--glass-dark-border);
  border-radius: 999px;
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  box-shadow:
    0 16px 56px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(22, 101, 52, 0.2),
    var(--glow-forest),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease, border-color 0.35s ease;
}

.euk-float-search.is-focused {
  background: var(--glass-dark);
  border-color: rgba(134, 239, 172, 0.35);
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(22, 101, 52, 0.45),
    var(--glow-forest-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

@keyframes eukFadeUp {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .euk-search-stack:has(.euk-float-search.is-focused) {
    transform: translate(-50%, -50%);
  }

  body.euk-app.euk-bottom-expanded .euk-search-stack:has(.euk-float-search.is-focused) {
    transform: translateX(-50%);
  }

  #euk-app-root.euk-cinematic-boot,
  #euk-app-root.euk-cinematic-boot.euk-cinematic-boot--on {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.euk-float-search input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 54px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: clamp(1.05rem, 3.4vw, 1.18rem);
  font-weight: 600;
  color: #f8fafc;
}

.euk-float-search input::placeholder {
  color: rgba(203, 213, 225, 0.72);
  font-weight: 500;
}

.euk-float-search input:focus {
  outline: none;
}

.euk-float-search-submit {
  min-height: 52px;
  padding: 0 1.35rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--forest-mid) 0%, var(--forest) 100%);
  color: #fff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(22, 101, 52, 0.38);
  transition: transform 0.18s ease, box-shadow 0.25s ease, background var(--shell-transition);
}

.euk-float-search-submit:hover {
  box-shadow: 0 10px 32px rgba(22, 101, 52, 0.48);
}

.euk-float-search-submit:active {
  transform: scale(0.95);
}

/* Edge FAB — reopen layers when panel collapsed */
.euk-side-edge-fab {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 17;
  min-width: 48px;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid var(--glass-dark-border);
  background: var(--glass-dark-mid);
  color: #f8fafc;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: opacity var(--shell-transition), transform var(--shell-transition), box-shadow 0.25s ease;
}

.euk-side-edge-fab:hover {
  box-shadow: var(--glow-forest), 0 8px 26px rgba(15, 23, 42, 0.16);
}

.euk-side-edge-fab:active {
  transform: translateY(-50%) scale(0.94);
}

/* Left “DEMO” control — pulse + visible flash so it’s hard to miss */
.euk-demo-side-fab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 56px;
  min-height: 56px;
  padding: 6px 8px;
  border-radius: 14px;
  border: 2px solid rgba(253, 224, 71, 0.95);
  background: linear-gradient(160deg, #b45309 0%, #9a3412 100%);
  color: #fffbeb;
  font-weight: 900;
  text-transform: uppercase;
  animation:
    eukDemoFabPulse 1.45s ease-in-out infinite,
    eukDemoFabFlash 0.65s ease-in-out infinite;
  box-shadow:
    0 0 0 0 rgba(251, 191, 36, 0.5),
    0 10px 32px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.euk-demo-side-fab-kicker {
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.95;
  animation: eukDemoFabIconFlash 0.65s ease-in-out infinite;
}

.euk-demo-side-fab-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  animation: eukDemoFabLabelFlash 0.65s ease-in-out infinite;
}

@keyframes eukDemoFabFlash {
  0% {
    filter: brightness(1);
    border-color: rgba(253, 224, 71, 0.95);
  }
  50% {
    filter: brightness(1.55);
    border-color: rgba(255, 255, 255, 1);
  }
  100% {
    filter: brightness(1);
    border-color: rgba(253, 224, 71, 0.95);
  }
}

@keyframes eukDemoFabIconFlash {
  0% {
    opacity: 0.95;
  }
  50% {
    opacity: 0.35;
  }
  100% {
    opacity: 0.95;
  }
}

@keyframes eukDemoFabLabelFlash {
  0% {
    opacity: 1;
    color: #fffbeb;
  }
  50% {
    opacity: 0.45;
    color: #fef9c3;
  }
  100% {
    opacity: 1;
    color: #fffbeb;
  }
}

@keyframes eukDemoFabPulse {
  0%,
  100% {
    transform: translateY(-50%) scale(1);
    box-shadow:
      0 0 0 0 rgba(251, 191, 36, 0.35),
      0 10px 32px rgba(0, 0, 0, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    transform: translateY(-50%) scale(1.06);
    box-shadow:
      0 0 0 12px rgba(251, 191, 36, 0),
      0 14px 40px rgba(180, 83, 9, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  .euk-demo-side-fab,
  .euk-demo-side-fab-kicker,
  .euk-demo-side-fab-label {
    animation: none;
  }
}

body.euk-app.is-immersive .euk-side-edge-fab {
  opacity: 0;
  pointer-events: none;
}

/* Hide edge FAB while layers panel is open (map slot is sibling of aside) */
.euk-app-body:has(#euk-side-panel:not(.is-collapsed)) .euk-map-slot .euk-side-edge-fab {
  opacity: 0;
  pointer-events: none;
}

.euk-immersive-exit {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  z-index: 25;
}

body.euk-app.is-immersive .euk-immersive-exit:not([hidden]) {
  animation: eukFadeIn 0.25s ease both;
}

@keyframes eukFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.euk-app.is-immersive .euk-immersive-exit:not([hidden]) {
    animation: none;
  }
}

.euk-map-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.euk-side-copy {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.euk-side-copy--muted {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.euk-side-panel .euk-side-copy {
  color: rgba(226, 232, 240, 0.92);
}

.euk-side-panel .euk-side-copy code {
  color: #bbf7d0;
  font-size: 0.82em;
}

.euk-side-panel .euk-side-copy--muted {
  color: rgba(148, 163, 184, 0.95);
}

/* Side panel */
.euk-side-panel {
  flex: 0 0 min(320px, 42vw);
  max-width: 360px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 12px 0 48px rgba(0, 0, 0, 0.35);
  transform: translateX(0);
  transition: transform var(--shell-transition), opacity var(--shell-transition), flex-basis var(--shell-transition), max-width var(--shell-transition);
}

.euk-side-panel.is-collapsed {
  flex-basis: 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  border: 0;
  transform: translateX(-6px);
  pointer-events: none;
}

.euk-side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(148, 163, 184, 0.95);
}

.euk-side-panel-title {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}

.euk-side-panel-close {
  flex-shrink: 0;
  min-width: 40px;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.euk-side-panel-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.euk-side-inline-demo {
  color: #fde68a;
  letter-spacing: 0.08em;
}

body.euk-app--map-demo .euk-persist-cta {
  display: none !important;
}

/* Map demo: no glass top bar — controls live in the floating pill */
body.euk-app--map-demo .euk-app-top {
  display: none !important;
}

/* Bottom-left floating pill (below flyouts / walls so menus still win) */
body.euk-app--map-demo .euk-float-controls {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  z-index: 52;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 5px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body.euk-app.is-immersive .euk-float-controls {
  opacity: 0;
  pointer-events: none;
}

.euk-float-divider {
  width: 1px;
  height: 18px;
  margin: 0 2px;
  background: rgba(255, 255, 255, 0.2);
}

.euk-float-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #f8fafc;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.88;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.euk-float-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.euk-float-btn--primary {
  background: #1a4d2e !important;
  opacity: 1 !important;
  color: #fff !important;
}

.euk-float-btn--primary:hover {
  background: #14532d !important;
}

/* Demo panel CTAs */
.euk-side-panel-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  flex-shrink: 0;
}

.euk-member-tools-cta {
  flex: 1 1 120px;
  display: block;
  padding: 11px 10px;
  border-radius: 10px;
  border: 0;
  background: #1a4d2e;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.01em;
  line-height: 1.25;
  animation: eukFlashGreen 1.2s ease-in-out infinite;
}

.euk-close-demo-btn {
  flex: 0 0 auto;
  padding: 11px 14px;
  border-radius: 10px;
  border: 0;
  background: #ea580c;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  animation: eukFlashBtn 1.2s ease-in-out infinite;
}

.euk-member-tools-cta:hover {
  animation: none !important;
  background: #14532d !important;
}

.euk-close-demo-btn:hover {
  animation: none !important;
  background: #c2410c !important;
}

@keyframes eukFlashBtn {
  0%,
  100% {
    background: #ea580c;
    box-shadow: none;
  }
  50% {
    background: #f97316;
    box-shadow: 0 0 14px 4px rgba(249, 115, 22, 0.7);
  }
}

@keyframes eukFlashGreen {
  0%,
  100% {
    background: #1a4d2e;
    box-shadow: none;
  }
  50% {
    background: #16a34a;
    box-shadow: 0 0 14px 4px rgba(22, 163, 74, 0.7);
  }
}

@media (prefers-reduced-motion: reduce) {
  .euk-member-tools-cta,
  .euk-close-demo-btn {
    animation: none;
  }
}

/* Map demo: open side panel = almost full screen overlay so Command Hub is usable */
body.euk-app--map-demo #euk-side-panel:not(.is-collapsed) {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  flex: 0 0 0;
  min-width: 0;
  margin: 0;
  z-index: 56;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  border-radius: 0;
  border-right: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.97);
}

body.euk-app--map-demo #euk-side-panel:not(.is-collapsed) .euk-side-panel-body--hub {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.65rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}

body.euk-app--map-demo .euk-side-hub-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

body.euk-app--map-demo .euk-side-hub-iframe {
  min-height: calc(100vh - 11.5rem);
  min-height: calc(100dvh - 11.5rem);
}

.euk-side-panel-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0.85rem 1rem 1rem;
}

.euk-side-panel-body--hub {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
}

.euk-side-copy--tight {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
}

.euk-side-hub-wrap {
  flex: 1 1 auto;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.euk-side-hub-iframe {
  flex: 1 1 auto;
  width: 100%;
  min-height: 240px;
  border: 0;
  display: block;
  background: #0f172a;
}

/* Bottom sheet — dark glass, rounded, weighted motion */
.euk-bottom-panel {
  flex: 0 0 auto;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -16px 56px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 30;
  transition: opacity var(--shell-transition), transform var(--shell-transition);
  transform: translateY(0);
  overflow: hidden;
}

.euk-bottom-panel-handle {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-height: 48px;
  padding-top: 0.15rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  color: rgba(148, 163, 184, 0.95);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s ease;
}

.euk-bottom-panel-handle:active {
  background: rgba(22, 101, 52, 0.12);
}

.euk-bottom-panel-handle-grip {
  width: 44px;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.5), rgba(248, 250, 252, 0.85), rgba(148, 163, 184, 0.5));
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.25);
}

.euk-bottom-panel-handle-label {
  color: rgba(226, 232, 240, 0.88);
}

.euk-bottom-panel-expand {
  max-height: min(44vh, 480px);
  overflow: hidden;
  transition: max-height var(--shell-snap), opacity var(--shell-snap);
}

.euk-bottom-panel.is-collapsed .euk-bottom-panel-expand {
  max-height: 0;
  opacity: 0;
}

/* Peek — sheet opens slightly on first load (hook) */
.euk-bottom-panel.is-peek .euk-bottom-panel-expand {
  max-height: 78px;
  opacity: 1;
}

.euk-bottom-panel.is-peek .euk-results-iframe {
  display: none !important;
}

.euk-bottom-hint {
  margin: 0;
  padding: 0.65rem 1rem 0.35rem;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.88);
}

#euk-bottom-expand {
  position: relative;
}

.euk-results-loading {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.euk-results-loading.is-visible {
  display: flex;
}

.euk-results-loading-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--warm-gray);
  border-top-color: var(--forest-mid);
  animation: eukResultsSpin 0.75s linear infinite;
}

@keyframes eukResultsSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .euk-results-loading-spinner {
    animation: none;
    border-color: var(--forest-mid);
  }
}

.euk-results-iframe {
  display: block;
  width: 100%;
  min-height: 240px;
  height: min(38vh, 420px);
  border: 0;
  background: var(--page-bg-alt);
}

.euk-results-iframe[hidden] {
  display: none !important;
}

/* Flyouts: menu + planner */
.euk-flyout {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.euk-flyout.is-open {
  pointer-events: auto;
}

.euk-flyout-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  opacity: 0;
  transition: opacity var(--shell-transition);
}

.euk-flyout.is-open .euk-flyout-backdrop {
  opacity: 1;
}

.euk-flyout-sheet {
  position: absolute;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -20px 56px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform var(--shell-snap), opacity var(--shell-snap);
}

.euk-flyout-sheet--menu {
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100vw, 320px);
  transform: translateX(100%);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.euk-flyout.is-open .euk-flyout-sheet--menu {
  transform: translateX(0);
}

.euk-flyout--planner .euk-flyout-sheet--planner {
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 78vh;
  border-radius: 18px 18px 0 0;
  transform: translateY(105%);
}

.euk-flyout--planner.is-open .euk-flyout-sheet--planner {
  transform: translateY(0);
}

.euk-flyout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.euk-flyout-title {
  margin: 0;
  font-size: 1rem;
  color: #f8fafc;
}

.euk-flyout-close {
  min-width: var(--euk-touch);
  min-height: var(--euk-touch);
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.euk-flyout-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.euk-flyout-close:active {
  transform: scale(0.94);
}

.euk-flyout-body {
  padding: 1rem;
  overflow: auto;
  flex: 1 1 auto;
}

.euk-flyout-body .euk-side-copy {
  color: rgba(226, 232, 240, 0.92);
}

.euk-menu-links {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0 1rem;
}

.euk-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  font-size: 1rem;
  text-decoration: none;
  color: rgba(248, 250, 252, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-height: var(--euk-touch);
  transition: background 0.2s ease, transform 0.15s ease;
}

.euk-menu-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.euk-menu-link:active {
  transform: scale(0.99);
  background: rgba(22, 101, 52, 0.14);
}

.euk-menu-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.95);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.euk-menu-foot {
  margin: 0;
  padding: 0.75rem 1rem 1rem;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.9);
}

/* Persistent upgrade chip — no price on chip (pricing in walls only) */
.euk-persist-cta {
  position: fixed;
  right: max(10px, env(safe-area-inset-right, 0px));
  bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.08rem;
  padding: 0.45rem 0.75rem 0.5rem;
  max-width: min(46vw, 200px);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(145deg, var(--forest-mid) 0%, var(--forest) 100%);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 28px rgba(22, 101, 52, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity var(--shell-transition);
  animation: eukPersistPulse 6s ease-in-out infinite;
}

.euk-persist-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(22, 101, 52, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.euk-persist-cta:active {
  transform: translateY(0) scale(0.97);
}

.euk-persist-cta-sub {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.88;
  text-transform: none;
}

@keyframes eukPersistPulse {
  0%,
  100% {
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.22);
  }
  50% {
    box-shadow: 0 8px 26px rgba(22, 101, 52, 0.35);
  }
}

/* Soft / hard conversion walls */
.euk-wall {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-left, 0px));
  pointer-events: none;
}

.euk-wall[hidden] {
  display: none !important;
}

.euk-wall:not([hidden]) {
  pointer-events: auto;
}

.euk-wall-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.euk-wall-sheet {
  position: relative;
  width: min(100%, 400px);
  margin-bottom: 0.5rem;
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: 22px 22px 16px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 -20px 56px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  animation: eukWallRise 0.36s cubic-bezier(0.33, 1, 0.68, 1) both;
}

@keyframes eukWallRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.euk-wall-dismiss {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(8px);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  transition: transform 0.18s ease;
}

.euk-wall-dismiss:active {
  transform: scale(0.92);
}

.euk-wall-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--harvest-mid);
}

.euk-wall-title {
  margin: 0 0 0.65rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.25;
  color: var(--text-primary);
  padding-right: 2rem;
}

.euk-wall-lead {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.euk-wall-list {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.55;
}

.euk-wall-proof {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0.55rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.euk-wall-proof li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.euk-wall-proof li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--forest-mid);
  flex-shrink: 0;
}

.euk-wall-cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--forest-mid) 0%, var(--forest) 100%);
  box-shadow: 0 8px 24px rgba(20, 83, 45, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.euk-wall-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(20, 83, 45, 0.42);
}

.euk-wall-cta:active {
  transform: translateY(0) scale(0.98);
}

.euk-wall-price {
  margin: 0.65rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.euk-wall--hard .euk-wall-title {
  font-size: 1.15rem;
}

/* Utility */
.euk-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .euk-search-stack {
    top: 35%;
    width: min(94vw, 460px);
  }

  body.euk-app.euk-bottom-expanded .euk-search-stack {
    bottom: calc(min(48vh, 400px) + 22px + env(safe-area-inset-bottom, 0px));
  }

  .euk-side-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 55;
    max-width: min(100vw, 320px);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
  }

  .euk-side-panel.is-collapsed {
    transform: translateX(-105%);
    opacity: 1;
    flex-basis: auto;
    max-width: min(100vw, 320px);
    pointer-events: none;
  }

  .euk-side-panel:not(.is-collapsed) {
    pointer-events: auto;
  }

  .euk-side-hub-wrap {
    min-height: 42vh;
  }

  .euk-side-hub-iframe {
    min-height: 40vh;
  }
}
