/* =============================================
   WindowFM — Focus Environments for ADHD Minds
   Design: Intimate / Editorial / Organic
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: oklch(97% 0.012 80);
  --ink: oklch(12% 0.02 250);
  --ink-60: oklch(40% 0.02 250);
  --ink-30: oklch(65% 0.015 250);
  --warm: oklch(72% 0.10 60);
  --warm-glow: oklch(80% 0.12 65);
  --accent: oklch(62% 0.18 220);
  --accent-muted: oklch(50% 0.12 220);
  --surface: oklch(18% 0.015 250 / 0.7);
  --surface-solid: oklch(14% 0.015 250);
  --white-20: oklch(100% 0 0 / 0.20);
  --white-50: oklch(100% 0 0 / 0.50);
  --white-80: oklch(100% 0 0 / 0.80);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--ink);
  color: var(--cream);
}

/* ─── UTILITY ─── */
.hidden { display: none !important; }

/* ─── WINDOW STAGE ─── */
.window-stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ─── VIDEO STAGE ─── */
.video-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

/* Each iframe wrapper — covers viewport, handles any aspect ratio */
.yt-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Cover technique: scale to fill preserving ratio */
  width: 100vw;
  height: 56.25vw;      /* 16:9 height based on width */
  min-height: 100vh;
  min-width: 177.78vh;  /* 16:9 width based on height */
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.yt-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: none;
}

/* Subtle dark tint sits on top of video, under UI elements */
.video-overlay {
  position: absolute;
  inset: 0;
  background: oklch(0% 0 0 / 0.18);
  z-index: 2;
  pointer-events: none;
}

/* Loading ring */
.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
  transition: opacity 0.6s;
  opacity: 0;
}

.loading-ring {
  width: 36px;
  height: 36px;
  border: 2px solid oklch(100% 0 0 / 0.15);
  border-top-color: var(--warm);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Vignette */
.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 30%, oklch(0% 0 0 / 0.65) 100%);
  pointer-events: none;
  z-index: 3;
}

/* Rain canvas */
#rainCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s;
  z-index: 4;
}
#rainCanvas.raining { opacity: 1; }

/* ─── TOPBAR ─── */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 36px;
  z-index: 10;
  background: linear-gradient(to bottom, oklch(0% 0 0 / 0.55) 0%, transparent 100%);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--cream);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  color: var(--white-80);
}

.icon-btn:hover {
  background: var(--white-20);
  color: var(--cream);
}

.logo-icon {
  font-size: 1.4rem;
  color: var(--warm-glow);
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.92); }
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--white-20);
  color: var(--white-80);
  padding: 8px 18px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.25s;
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: var(--white-20);
  border-color: var(--white-50);
  color: var(--cream);
}

.btn-ghost.success {
  background: var(--warm);
  border-color: var(--warm);
  color: var(--ink);
  transform: scale(1.05);
  box-shadow: 0 0 20px oklch(72% 0.1 60 / 0.5);
}

.btn-primary {
  background: var(--warm);
  border: none;
  color: var(--ink);
  padding: 9px 20px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: all 0.25s;
}

.btn-primary:hover {
  background: var(--warm-glow);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px oklch(72% 0.10 60 / 0.35);
}

/* ─── LOCATION PILL ─── */
.location-pill {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--white-20);
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--white-80);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.5s;
  z-index: 10;
}

.loc-dot {
  width: 6px;
  height: 6px;
  background: var(--warm);
  border-radius: 50%;
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* ─── SIDEBAR ─── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 340px;
  background: oklch(15% 0.02 240 / 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--white-10);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: oklch(0% 0 0 / 0.4);
  backdrop-filter: blur(4px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}

.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--white-60);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
}

.sidebar-content {
  padding: 100px 40px 40px 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--white-80);
  margin-bottom: 32px;
}

.filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--white-60);
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  text-align: left;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s;
}

.filter-btn:hover {
  color: var(--white-80);
  background: var(--white-10);
}

.filter-btn.active {
  color: var(--surface-solid);
  background: var(--cream);
  font-weight: 500;
}

.sidebar-metadata {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid var(--white-10);
}

.meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-30);
  margin-bottom: 8px;
}

.meta-location {
  font-size: 1.1rem;
  color: var(--cream);
  margin-bottom: 4px;
  font-weight: 300;
  line-height: 1.4;
}

.meta-curator {
  font-size: 0.9rem;
  color: var(--white-50);
}

.sidebar-footer {
  margin-top: 32px;
}

/* ─── CENTER PROMPT ─── */
.center-prompt {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 520px;
  padding: 0 24px;
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.prompt-eyebrow {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 18px;
}

.prompt-headline {
  font-family: 'Fraunces', serif;
  font-weight: 200;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.12;
  color: var(--cream);
  margin-bottom: 36px;
  text-shadow: 0 2px 30px oklch(0% 0 0 / 0.5);
}

.prompt-headline em {
  font-style: italic;
  font-weight: 200;
  color: var(--warm-glow);
}

.btn-open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  color: var(--ink);
  border: none;
  padding: 16px 32px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 20px;
  box-shadow: 0 12px 40px oklch(0% 0 0 / 0.3);
}

.btn-open:hover {
  background: var(--warm-glow);
  transform: translateY(-2px);
  box-shadow: 0 20px 50px oklch(0% 0 0 / 0.4);
}

.btn-open:active {
  transform: translateY(0);
}

.prompt-sub {
  font-size: 0.82rem;
  color: var(--white-50);
  font-weight: 300;
  letter-spacing: 0.03em;
}

/* ─── WINDOW CONTROLS BAR ─── */
.window-controls {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--white-20);
  border-radius: 100px;
  padding: 8px 8px;
  z-index: 10;
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.ctrl-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--white-80);
  padding: 8px 16px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.2s;
}

.ctrl-btn:hover {
  background: var(--white-20);
  color: var(--cream);
}

.window-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 20px;
  border-left: 1px solid var(--white-20);
  border-right: 1px solid var(--white-20);
  min-width: 80px;
}

#timerDisplay {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--cream);
  line-height: 1;
}

.timer-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-30);
  margin-top: 2px;
}

/* ─── FOCUS NUDGE ─── */
.focus-nudge {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--white-20);
  border-radius: 16px;
  padding: 14px 20px 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 480px;
  width: 90%;
  z-index: 20;
  animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.focus-nudge p {
  font-size: 0.84rem;
  color: var(--white-80);
  line-height: 1.5;
  flex: 1;
}

.focus-nudge strong {
  color: var(--warm);
}

.btn-nudge {
  white-space: nowrap;
  background: var(--warm);
  border: none;
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-nudge:hover {
  background: var(--warm-glow);
  transform: scale(1.03);
}

/* ─── MODAL ─── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: oklch(0% 0 0 / 0.65);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: backdropIn 0.3s ease;
}

@keyframes backdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: oklch(100% 0 0 / 0.05); /* Ultra-transparent layer */
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 0.5px solid oklch(100% 0 0 / 0.15);
  border-radius: 28px;
  max-width: 860px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 80px oklch(0% 0 0 / 0.4);
  animation: modalIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: oklch(100% 0 0 / 0.1);
  border: none;
  color: var(--white-80);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.2s;
}

.modal-close:hover {
  background: oklch(100% 0 0 / 0.2);
}

.modal-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
}

.modal-left {
  padding: 48px 40px;
  border-right: 1px solid oklch(100% 0 0 / 0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 16px;
  font-weight: 400;
}

.modal-headline {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.25;
  color: var(--cream);
  margin-bottom: 20px;
}

.modal-body {
  font-size: 0.88rem;
  color: var(--ink-30);
  line-height: 1.7;
  margin-bottom: 28px;
  font-weight: 300;
}

.modal-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--white-80);
  font-weight: 300;
  line-height: 1.5;
}

.benefit-icon {
  color: var(--warm);
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ─── FORM ─── */
.modal-right {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-30);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: oklch(100% 0 0 / 0.06);
  border: 1px solid oklch(100% 0 0 / 0.12);
  border-radius: 10px;
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--ink-30);
}

.form-group select option {
  background: var(--surface-solid);
  color: var(--cream);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--warm);
  background: oklch(100% 0 0 / 0.09);
}

.checkbox-group {
  flex-direction: row;
  align-items: flex-start;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.80rem;
  color: var(--ink-30);
  cursor: pointer;
  line-height: 1.5;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--warm);
  margin-top: 2px;
}

.btn-submit {
  background: var(--warm);
  border: none;
  color: var(--ink);
  padding: 14px 24px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: all 0.25s;
  margin-top: 4px;
}

.btn-submit:hover {
  background: var(--warm-glow);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px oklch(72% 0.10 60 / 0.3);
}

.form-disclaimer {
  font-size: 0.72rem;
  color: var(--ink-30);
  text-align: center;
  margin-top: 4px;
}

/* Form Success */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
  gap: 12px;
}

.success-icon {
  font-size: 2.4rem;
  color: var(--warm);
  animation: breathe 3s ease-in-out infinite;
}

.form-success h3 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 1.4rem;
  color: var(--cream);
}

.form-success p {
  font-size: 0.86rem;
  color: var(--ink-30);
  line-height: 1.6;
  font-weight: 300;
}

.success-sub {
  font-size: 0.78rem !important;
  color: var(--warm) !important;
}

/* ─── COACH PANEL ─── */
.coach-panel {
  position: fixed;
  inset: 0;
  background: oklch(0% 0 0 / 0.65);
  backdrop-filter: blur(6px);
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.coach-panel-inner {
  background: var(--surface-solid);
  border: 1px solid oklch(100% 0 0 / 0.1);
  border-radius: 24px 24px 0 0;
  padding: 40px 40px 48px;
  max-width: 700px;
  width: 100%;
  position: relative;
  animation: panelUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes panelUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.panel-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: oklch(100% 0 0 / 0.1);
  border: none;
  color: var(--white-80);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.panel-close:hover { background: oklch(100% 0 0 / 0.2); }

.panel-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 10px;
}

.panel-headline {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 1.7rem;
  color: var(--cream);
  margin-bottom: 10px;
}

.panel-body {
  font-size: 0.86rem;
  color: var(--ink-30);
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: 24px;
}

.coach-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.coach-card {
  background: oklch(100% 0 0 / 0.05);
  border: 1px solid oklch(100% 0 0 / 0.1);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: background 0.2s;
}

.coach-card:hover {
  background: oklch(100% 0 0 / 0.09);
}

.coach-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink);
  flex-shrink: 0;
}

.coach-info h4 {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.3;
}

.coach-info p {
  font-size: 0.74rem;
  color: var(--ink-30);
  margin-top: 2px;
  line-height: 1.4;
}

.coach-tag {
  display: inline-block;
  background: oklch(72% 0.10 60 / 0.2);
  color: var(--warm);
  border: 1px solid oklch(72% 0.10 60 / 0.3);
  border-radius: 100px;
  font-size: 0.66rem;
  padding: 2px 8px;
  margin-top: 6px;
  letter-spacing: 0.04em;
}

.panel-cta {
  width: 100%;
  padding: 14px;
  font-size: 0.92rem;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 700px) {
  .modal-inner {
    grid-template-columns: 1fr;
  }
  .modal-left {
    border-right: none;
    border-bottom: 1px solid oklch(100% 0 0 / 0.08);
    padding: 36px 28px 28px;
  }
  .modal-right {
    padding: 28px 28px 36px;
  }
  .coach-cards {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 18px 20px;
  }
  .topbar-right .btn-ghost {
    display: none;
  }
  .prompt-headline {
    font-size: 2.2rem;
  }
  .focus-nudge {
    flex-direction: column;
    text-align: center;
    border-radius: 20px;
    gap: 12px;
  }
  .window-controls {
    width: 90%;
  }
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: oklch(100% 0 0 / 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: oklch(100% 0 0 / 0.25); }

/* ─── CTA: UNLOCK PRO (NATIVE GLASS — MATCHES NAV) ─── */
.btn-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--white-20);
  color: var(--white-80);
  padding: 8px 18px;
  height: 40px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.25s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-upgrade .btn-icon {
  color: var(--warm-glow);
  font-size: 0.75rem;
}

.btn-upgrade:hover {
  background: var(--white-20);
  border-color: var(--white-50);
  color: var(--cream);
  transform: translateY(-1px);
}

.btn-upgrade:active {
  transform: translateY(0);
}



/* ─── MAP MODAL ─── */
.map-modal-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(0% 0 0 / 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.map-modal-wrapper.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.map-modal {
  background: var(--surface-solid);
  width: 90vw;
  max-width: 900px;
  height: 80vh;
  max-height: 700px;
  border-radius: 16px;
  border: 1px solid var(--white-20);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
  transform: scale(1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-modal-wrapper.hidden .map-modal {
  transform: scale(0.95);
}

.map-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--white-20);
}

.map-modal-header h2 {
  font-family: inherit;
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0;
  letter-spacing: -0.01em;
}

.leaflet-map-container {
  flex: 1;
  width: 100%;
}

/* CUSTOM LEAFLET STYLES */
.leaflet-container {
  background: var(--ink);
  font-family: inherit;
}
.leaflet-popup-content-wrapper {
  background: var(--surface-solid);
  color: var(--cream);
  border: 1px solid var(--white-20);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
}
.leaflet-popup-tip {
  background: var(--surface-solid);
  border: 1px solid var(--white-20);
}
.leaflet-popup-content {
  margin: 12px;
}
.leaflet-popup-content button {
  background: var(--cream);
  color: var(--ink);
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 8px;
  width: 100%;
  transition: opacity 0.2s;
}
.leaflet-popup-content button:hover {
  opacity: 0.8;
}

/* For Map custom markers */
.custom-map-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cream);
  border: 4px solid var(--ink);
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease;
}
.custom-map-marker:hover, .custom-map-marker.active {
  transform: scale(1.4);
  background: var(--accent);
  z-index: 1000 !important;
}


/* ─── ZEN MODE — TOTAL IMMERSION (Single Authoritative Rule) ─── */

/* Smooth transition on ALL UI chrome */
.topbar, .logo, .window-controls, .location-pill, .focus-nudge {
  transition:
    opacity 0.8s ease,
    transform 0.8s ease,
    visibility 0.8s linear;
}

.ui-idle {
  cursor: none;
}

/* Everything hides: logo, nav, controls, pill */
.ui-idle .topbar,
.ui-idle .logo,
.ui-idle .window-controls,
.ui-idle .location-pill,
.ui-idle .focus-nudge {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.ui-idle .topbar {
  transform: translateY(-16px);
}
.ui-idle .window-controls,
.ui-idle .location-pill {
  transform: translateY(16px);
}

