/* ============================================
   when&where — warm-base.css
   "Warm Machine" design system
   ============================================ */

:root {
  --ww-bg-primary: #1a1a2e;
  --ww-bg-secondary: #16213e;
  --ww-bg-card: #1e1e36;
  --ww-accent: #c4704b;
  --ww-accent-secondary: #7d8a6e;
  --ww-text-primary: #e0d6c8;
  --ww-text-muted: #888888;
  --ww-highlight: #f0e6d3;
  --ww-success: #c9a84c;
  --ww-danger: #b05a5a;
  --ww-radius-card: 12px;
  --ww-radius-button: 8px;
  --ww-radius-badge: 20px;
  --ww-slot-host: #7d8a6e;
  --ww-slot-travel: #6482a0;
  --ww-slot-both: #c9a84c;
  --ww-flake-ghost: #b05a5a;
  --ww-flake-flaky: #c4704b;
  --ww-flake-warming-up: #e0d6c8;
  --ww-flake-reliable: #7d8a6e;
  --ww-flake-rock-star: #c9a84c;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background-color: var(--ww-bg-primary);
  color: var(--ww-text-primary);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

/* Typography */
.font-data { font-family: "IBM Plex Mono", monospace; }

/* Accent Colors */
.text-accent { color: var(--ww-accent, #c4704b) !important; }
.border-accent { border-color: rgba(196, 112, 75, 0.15) !important; }
a.text-accent:hover { color: #d4805b !important; }

/* Card */
.card-warm, .card.card-warm {
  background: var(--ww-bg-card);
  border: 1px solid rgba(240, 230, 211, 0.08);
  border-radius: var(--ww-radius-card);
  box-shadow: 0 2px 12px rgba(196, 112, 75, 0.08);
}
.modal-content.card-warm { background: var(--ww-bg-card); }

/* Buttons */
.btn-warm {
  --bs-btn-color: #f0e6d3;
  --bs-btn-hover-color: #f0e6d3;
  --bs-btn-active-color: #f0e6d3;
  --bs-btn-bg: var(--ww-accent, #c4704b);
  --bs-btn-hover-bg: var(--ww-accent, #c4704b);
  --bs-btn-active-bg: var(--ww-accent, #c4704b);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-border-color: transparent;
  background: var(--ww-accent, #c4704b);
  color: #f0e6d3;
  border: none;
  border-radius: var(--ww-radius-button);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.btn-warm:hover { background: var(--ww-accent) !important; color: #f0e6d3 !important; opacity: 0.9; }
.btn-warm:active { transform: scale(0.97); }
.btn-warm:focus-visible { outline: 2px solid var(--ww-accent); outline-offset: 2px; }

.btn-warm-outline {
  --bs-btn-color: var(--ww-accent, #c4704b);
  --bs-btn-hover-color: var(--ww-accent, #c4704b);
  --bs-btn-active-color: var(--ww-accent, #c4704b);
  --bs-btn-bg: transparent;
  --bs-btn-hover-bg: rgba(196, 112, 75, 0.08);
  --bs-btn-active-bg: rgba(196, 112, 75, 0.12);
  --bs-btn-border-color: rgba(196, 112, 75, 0.3);
  --bs-btn-hover-border-color: rgba(196, 112, 75, 0.3);
  --bs-btn-active-border-color: rgba(196, 112, 75, 0.3);
  background: transparent;
  color: var(--ww-accent, #c4704b);
  border: 1px solid rgba(196, 112, 75, 0.3);
  border-radius: var(--ww-radius-button);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  transition: transform 0.1s ease, background-color 0.15s ease;
}
.btn-warm-outline:hover { background: rgba(196, 112, 75, 0.08); color: var(--ww-accent); }
.btn-warm-outline:active { transform: scale(0.97); }

.btn-success-warm {
  --bs-btn-color: var(--ww-success);
  --bs-btn-hover-color: var(--ww-success);
  --bs-btn-active-color: var(--ww-success);
  background: rgba(201, 168, 76, 0.2);
  color: var(--ww-success);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: var(--ww-radius-button);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
}
.btn-success-warm:hover { background: rgba(201, 168, 76, 0.3); color: var(--ww-success); }

/* Form Inputs */
.form-input-warm {
  background: var(--ww-bg-secondary) !important;
  border: 1px solid rgba(240, 230, 211, 0.12) !important;
  border-radius: var(--ww-radius-button) !important;
  color: var(--ww-text-primary) !important;
  font-family: "Space Grotesk", sans-serif;
}
.form-input-warm:focus {
  border-color: var(--ww-accent) !important;
  box-shadow: 0 0 0 2px rgba(196, 112, 75, 0.15) !important;
  background: var(--ww-bg-secondary) !important;
  color: var(--ww-text-primary) !important;
}
.form-input-warm::placeholder { color: var(--ww-text-muted); }

/* Alerts */
.alert-warm-success {
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.2);
  color: #c9a84c;
  border-radius: var(--ww-radius-button);
}
.alert-warm-danger {
  background: rgba(176, 90, 90, 0.12);
  border: 1px solid rgba(176, 90, 90, 0.2);
  color: #b05a5a;
  border-radius: var(--ww-radius-button);
}

/* All badges use pill shape */
.badge { border-radius: var(--ww-radius-badge); padding: 0.25em 0.65em; }

/* Flake Badges */
.badge-flake-rock-star { background: rgba(201,168,76,0.2); color: #c9a84c; border-radius: var(--ww-radius-badge); padding: 0.25em 0.65em; }
.badge-flake-reliable { background: rgba(125,138,110,0.2); color: #7d8a6e; border-radius: var(--ww-radius-badge); padding: 0.25em 0.65em; }
.badge-flake-warming-up { background: rgba(240,230,211,0.15); color: #f0e6d3; border-radius: var(--ww-radius-badge); padding: 0.25em 0.65em; }
.badge-flake-flaky { background: rgba(196,112,75,0.2); color: #c4704b; border-radius: var(--ww-radius-badge); padding: 0.25em 0.65em; }
.badge-flake-ghost { background: rgba(176,90,90,0.2); color: #b05a5a; border-radius: var(--ww-radius-badge); padding: 0.25em 0.65em; }

/* Flake Bar (Gradient Bar — Option C) */
.flake-bar {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 50px;
}
.flake-bar-track {
  width: 50px; height: 6px; border-radius: 3px; position: relative;
  background: rgba(240,230,211,0.08); overflow: visible;
}
.flake-bar-fill {
  height: 100%; border-radius: 3px; position: relative; overflow: hidden;
  transform-origin: left center;
}
.flake-bar-dot {
  position: absolute; top: -3px; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--ww-bg-card); box-shadow: 0 0 4px rgba(0,0,0,0.3);
  z-index: 1;
}
.flake-bar-label {
  font-family: "IBM Plex Mono", monospace; font-size: 0.5rem; font-weight: 600; line-height: 1;
}
.flake-bar.bar-lg .flake-bar-track { width: 80px; height: 8px; }
.flake-bar.bar-lg .flake-bar-dot { width: 14px; height: 14px; top: -3px; }
.flake-bar.bar-lg .flake-bar-label { font-size: 0.65rem; }

/* Flake bar animations — hybrid: spring bounce + shimmer sweep + label fade */

/* Spring bounce: fill bar overshoots then settles */
@keyframes flake-spring {
  0% { transform: scaleX(0); }
  50% { transform: scaleX(1.08); }
  70% { transform: scaleX(0.97); }
  85% { transform: scaleX(1.03); }
  100% { transform: scaleX(1); }
}
/* Ghost: restless drift */
@keyframes flake-ghost-drift {
  0%, 100% { transform: scaleX(1); opacity: 0.5; }
  30% { transform: scaleX(0.85); opacity: 0.35; }
  60% { transform: scaleX(1.05); opacity: 0.55; }
}
/* Shimmer: light streak across the fill */
@keyframes flake-shimmer-sweep {
  0% { left: -50%; }
  100% { left: 150%; }
}
/* Label fade in */
@keyframes flake-label-fade {
  0% { opacity: 0; transform: translateY(3px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Label: fade in on load for all tiers */
.flake-bar .flake-bar-label {
  animation: flake-label-fade 0.6s 0.4s ease-out both;
}

/* Ghost: drifting, faded */
.flake-anim-ghost .flake-bar-fill {
  animation: flake-ghost-drift 4s ease-in-out infinite;
}

/* Flaky: spring in, no shimmer */
.flake-anim-flaky .flake-bar-fill {
  animation: flake-spring 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Warming Up: spring in, slow shimmer */
.flake-anim-warming-up .flake-bar-fill {
  animation: flake-spring 1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.flake-anim-warming-up .flake-bar-fill::after {
  content: ''; position: absolute; top: -1px; bottom: -1px; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  border-radius: inherit;
  animation: flake-shimmer-sweep 4s 1.2s ease-in-out infinite;
}

/* Reliable: spring in, medium shimmer */
.flake-anim-reliable .flake-bar-fill {
  animation: flake-spring 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.flake-anim-reliable .flake-bar-fill::after {
  content: ''; position: absolute; top: -1px; bottom: -1px; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  border-radius: inherit;
  animation: flake-shimmer-sweep 3s 1s ease-in-out infinite;
}

/* Rock Star: spring in, fast shimmer */
.flake-anim-rock-star .flake-bar-fill {
  animation: flake-spring 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.flake-anim-rock-star .flake-bar-fill::after {
  content: ''; position: absolute; top: -1px; bottom: -1px; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  border-radius: inherit;
  animation: flake-shimmer-sweep 2s 0.9s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .flake-bar .flake-bar-label,
  .flake-anim-ghost .flake-bar-fill,
  .flake-anim-flaky .flake-bar-fill,
  .flake-anim-warming-up .flake-bar-fill,
  .flake-anim-warming-up .flake-bar-fill::after,
  .flake-anim-reliable .flake-bar-fill,
  .flake-anim-reliable .flake-bar-fill::after,
  .flake-anim-rock-star .flake-bar-fill,
  .flake-anim-rock-star .flake-bar-fill::after { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* Flake Meter Gauge */
.flake-meter .gauge-wrapper { border-radius: 44px 44px 0 0; background: rgba(240, 230, 211, 0.05); }
.flake-meter .gauge-bg {
  position: absolute; inset: 0; border-radius: 44px 44px 0 0;
  background: conic-gradient(from 0.75turn, #b05a5a 0%, #c4704b 25%, #f0e6d3 50%, #7d8a6e 75%, #c9a84c 100%);
  opacity: 0.3;
}
.flake-meter .gauge-needle {
  position: absolute; bottom: 0; left: 50%; width: 2px; height: 36px; margin-left: -1px;
  background: var(--ww-highlight); border-radius: 2px;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom center;
}

/* Animations */
@keyframes slot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.mutual-slot { animation: slot-pulse 3s ease-in-out infinite; }

/* Hover pulse — interactive cells glow on hover to signal clickability */
@keyframes cell-hover-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.calendar-grid .slot.mutual:hover,
.calendar-grid .slot.has-invite:hover,
.calendar-grid.edit-mode .slot:hover {
  animation: cell-hover-pulse 1s ease-in-out infinite;
}
.time-grid .cell:hover:not(.cell-blocked) {
  animation: cell-hover-pulse 1s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .calendar-grid .slot:hover,
  .time-grid .cell:hover { animation: none !important; }
  .calendar-grid .slot.mutual { animation: none !important; box-shadow: inset 0 0 8px rgba(210, 120, 50, 0.2); background: rgba(195, 105, 45, 0.2); }
}

@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
main { animation: fade-up 0.2s ease-out; }

@keyframes slide-in { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }

/* Toast */
.toast-warm {
  background: var(--ww-bg-card); border: 1px solid rgba(240, 230, 211, 0.12);
  border-radius: var(--ww-radius-card); color: var(--ww-text-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); animation: slide-in 0.3s ease-out;
  padding: 0.75rem 1rem; margin-bottom: 0.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.toast-dismiss {
  background: none; border: none; color: var(--ww-text-muted); cursor: pointer;
  padding: 2px; border-radius: 4px; flex-shrink: 0; line-height: 0;
  transition: color 0.15s ease;
}
.toast-dismiss:hover { color: var(--ww-text-primary); }
.flash-dismiss {
  background: none; border: none; cursor: pointer; flex-shrink: 0;
  font-size: 1.2rem; line-height: 1; padding: 0 0 0 8px; opacity: 0.6;
  color: inherit; transition: opacity 0.15s ease;
}
.flash-dismiss:hover { opacity: 1; }

/* Navbar */
.navbar { background: var(--ww-bg-primary); font-family: "Space Grotesk", sans-serif; padding-top: 0.15rem; padding-bottom: 0.15rem; }
.navbar .nav-link { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.navbar .navbar-nav .nav-item:last-child .nav-link { padding-bottom: 0.1rem; }
.navbar-brand { font-family: "Space Grotesk", sans-serif; font-weight: 700; padding-top: 0.25rem; padding-bottom: 0.25rem; margin-right: 0.5rem; }
.nav-link { font-family: "Space Grotesk", sans-serif; color: var(--ww-text-primary) !important; transition: color 0.15s ease; display: flex; align-items: center; gap: 0.4rem; }
.nav-link:hover { color: var(--ww-accent) !important; }
.navbar .nav-link.active { color: var(--ww-accent) !important; }
.navbar .nav-link.active .nav-icon { opacity: 1; }
.nav-link.btn-warm:hover { color: #f0e6d3 !important; }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.nav-link:hover .nav-icon { opacity: 1; }
.navbar .nav-link.dropdown-toggle::after { align-self: flex-start; margin-top: 0.55em; }
/* Theme Picker */
.theme-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.12s ease;
}
.theme-swatch:hover { background: rgba(240, 230, 211, 0.06); }
.theme-swatch.active { background: rgba(240, 230, 211, 0.1); }
.theme-swatch input[type="radio"] { display: none; }
.theme-swatch-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.theme-swatch:hover .theme-swatch-circle { transform: scale(1.1); }
.theme-swatch.active .theme-swatch-circle { transform: scale(1.12); box-shadow: inset 0 0 0 3px var(--ww-accent), 0 0 0 2px var(--ww-accent) !important; }
.theme-swatch-label {
  font-size: 0.68rem;
  color: var(--ww-text-muted);
  font-family: "Space Grotesk", sans-serif;
}
.theme-swatch.active .theme-swatch-label { color: var(--ww-text-primary); }

/* Brand Press-and-Hold Menu */
#brand-logo { cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.brand-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1060;
  background: var(--ww-bg-card, #1e1e36);
  border: 1px solid rgba(240, 230, 211, 0.1);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  padding: 0.4rem 0;
  min-width: 170px;
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.brand-menu.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.brand-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1rem;
  color: var(--ww-text-primary, #e0d6c8);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.12s ease;
}
.brand-menu-item:hover {
  background: rgba(196, 112, 75, 0.12);
  color: var(--ww-accent, #c4704b);
}
.brand-menu-item .nav-icon { width: 15px; height: 15px; opacity: 0.7; }
.brand-menu-item:hover .nav-icon { opacity: 1; }
.brand-menu-hint {
  padding: 0.4rem 1rem 0.3rem;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(240, 230, 211, 0.06);
  font-size: 0.72rem;
  color: var(--ww-text-muted);
  font-style: italic;
}

.nav-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ww-accent); color: var(--ww-bg-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.7rem; flex-shrink: 0;
}

/* Profile Dropdown */
.dropdown-menu-warm {
  background: var(--ww-bg-card, #1e1e36);
  border: 1px solid rgba(240, 230, 211, 0.1);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  padding: 0.35rem 0;
  min-width: 180px;
}
.dropdown-menu-warm .dropdown-item {
  color: var(--ww-text-primary, #e0d6c8);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.12s ease;
}
.dropdown-menu-warm .dropdown-item:hover,
.dropdown-menu-warm .dropdown-item:focus {
  background: rgba(196, 112, 75, 0.12);
  color: var(--ww-accent, #c4704b);
}
.dropdown-menu-warm .dropdown-item .nav-icon { width: 15px; height: 15px; opacity: 0.7; }
.dropdown-menu-warm .dropdown-item:hover .nav-icon { opacity: 1; }
.dropdown-menu-warm .dropdown-item.active { color: var(--ww-accent, #c4704b); background: rgba(196, 112, 75, 0.08); }
.dropdown-menu-warm .dropdown-item.active .nav-icon { opacity: 1; }
.dropdown-menu-warm .dropdown-item.text-muted { color: var(--ww-text-muted) !important; }
.dropdown-menu-warm .dropdown-item.text-muted:hover { color: var(--ww-danger, #b05a5a) !important; background: rgba(176, 90, 90, 0.1); }
.dropdown-menu-warm .dropdown-divider { border-color: rgba(240, 230, 211, 0.08); margin: 0.25rem 0; }

/* Profile Tabs */
.nav-tabs-warm { border-bottom: 1px solid rgba(240,230,211,0.1); }
.nav-tabs-warm .nav-link {
  color: var(--ww-text-muted) !important; border: none; border-bottom: 2px solid transparent;
  padding: 0.6rem 1rem; font-size: 0.9rem; border-radius: 0;
}
.nav-tabs-warm .nav-link:hover { color: var(--ww-text-primary) !important; border-bottom-color: rgba(240,230,211,0.2); }
.nav-tabs-warm .nav-link.active { color: var(--ww-accent) !important; border-bottom-color: var(--ww-accent); background: transparent; }

/* Avatar Circle System */
.avatar-circle {
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--ww-bg-primary); flex-shrink: 0;
  background-size: cover; background-position: center; overflow: hidden;
}
.avatar-sm { width: 28px; height: 28px; font-size: 0.7rem; }
.avatar-md { width: 44px; height: 44px; font-size: 1.05rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 2.5rem; }

/* Target avatar — crosshair reticle with terracotta lines */
.avatar-target {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='21' fill='%23252540'/%3E%3Ccircle cx='22' cy='22' r='15' fill='none' stroke='%23c4704b' stroke-width='1' opacity='0.5'/%3E%3Ccircle cx='22' cy='22' r='8' fill='none' stroke='%23c4704b' stroke-width='1' opacity='0.7'/%3E%3Cline x1='22' y1='4' x2='22' y2='18' stroke='%23c4704b' stroke-width='1' opacity='0.5'/%3E%3Cline x1='22' y1='26' x2='22' y2='40' stroke='%23c4704b' stroke-width='1' opacity='0.5'/%3E%3Cline x1='4' y1='22' x2='18' y2='22' stroke='%23c4704b' stroke-width='1' opacity='0.5'/%3E%3Cline x1='26' y1='22' x2='40' y2='22' stroke='%23c4704b' stroke-width='1' opacity='0.5'/%3E%3C/svg%3E");
  background-size: cover;
  color: var(--ww-highlight, #f0e6d3) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Clickable avatar link (me page) */
.avatar-link { text-decoration: none; color: inherit; display: inline-flex; }
.avatar-link:hover .avatar-circle { box-shadow: 0 0 0 2px var(--ww-accent, #c4704b); }

/* Online status dot */
.online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4caf50;
  border: 2px solid var(--ww-bg-card, #1e1e36);
}

/* Legacy alias */
.profile-avatar-lg {
  width: 56px; height: 56px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.5rem; color: var(--ww-bg-primary); flex-shrink: 0;
  background-size: cover; background-position: center;
}

/* Avatar Color Picker */
.avatar-color-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 12px;
}
.avatar-color-option {
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
}
.avatar-color-option input[type="radio"] { display: none; }
.avatar-color-swatch {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; color: var(--ww-bg-primary);
  border: 3px solid transparent; transition: border-color 0.15s, transform 0.15s;
}
.avatar-color-option input[type="radio"]:checked + .avatar-color-swatch {
  border-color: var(--ww-highlight); transform: scale(1.1);
}
.avatar-color-option:hover .avatar-color-swatch { transform: scale(1.05); }
.avatar-color-name { font-size: 0.65rem; color: var(--ww-text-muted); text-align: center; }

/* Avatar Photo Upload */
.avatar-upload-area {
  border: 2px dashed rgba(240,230,211,0.15); border-radius: var(--ww-radius-card);
  padding: 1.5rem; text-align: center; cursor: pointer; transition: border-color 0.15s;
}
.avatar-upload-area:hover { border-color: var(--ww-accent); }
.avatar-upload-area input[type="file"] { display: none; }
.avatar-upload-label { cursor: pointer; display: block; }
.avatar-photo-preview {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--ww-accent); margin: 0 auto;
}
.avatar-has-photo { box-shadow: inset 0 0 0 2.5px rgba(240,230,211,0.4); }

/* Calendar Grid — sticky header row (separate element) */
.calendar-grid-header {
  display: grid; grid-template-columns: 50px repeat(7, 1fr); gap: 1px;
  position: sticky; top: 0; z-index: 10;
  background: rgba(240, 230, 211, 0.06);
  border-radius: var(--ww-radius-card) var(--ww-radius-card) 0 0;
  border: 1px solid rgba(240, 230, 211, 0.08);
  border-bottom: none;
}
.calendar-grid-header .day-header {
  font-weight: 600; font-size: 0.8rem; text-align: center; padding: 0.6rem 0.25rem;
  color: var(--ww-text-primary);
  background: var(--ww-bg-card);
  border-bottom: 2px solid rgba(240, 230, 211, 0.12);
  position: relative;
}
.calendar-grid-header .day-header-corner {
  background: var(--ww-bg-card);
  border-bottom: 2px solid rgba(240, 230, 211, 0.12);
}
.calendar-grid-header .day-header:not(.day-header-corner)::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--ww-accent);
  opacity: 0.1;
  pointer-events: none;
}
.calendar-grid-header .day-header.today {
  color: var(--ww-accent);
  border-bottom-color: var(--ww-accent);
}
.calendar-grid-header .day-header.today::before {
  opacity: 0.18;
}

/* Calendar Grid — body */
.calendar-grid {
  display: grid; grid-template-columns: 50px repeat(7, 1fr); gap: 1px;
  background: rgba(240, 230, 211, 0.06);
  border-radius: 0 0 var(--ww-radius-card) var(--ww-radius-card);
  border: 1px solid rgba(240, 230, 211, 0.08);
  border-top: none;
}
.calendar-grid .time-label {
  font-family: "IBM Plex Mono", monospace; font-size: 0.65rem; color: var(--ww-text-muted);
  padding: 0.2rem 0.35rem; display: flex; align-items: flex-start; justify-content: flex-end;
  background: var(--ww-bg-primary);
}
.calendar-grid .slot {
  min-height: 38px; background: var(--ww-bg-secondary); border: 1px solid rgba(240, 230, 211, 0.03);
  transition: background 0.15s ease, border-color 0.15s ease; cursor: default;
  position: relative; overflow: hidden; padding: 1px;
}
.calendar-grid .time-gap-label {
  min-height: 12px; font-size: 0.6rem; color: var(--ww-text-muted); opacity: 0.4;
  display: flex; align-items: center; justify-content: flex-end;
}
.calendar-grid .time-gap-slot {
  min-height: 12px !important; background: transparent !important;
  border-top: 1px dashed rgba(240, 230, 211, 0.08) !important;
  border-bottom: none !important;
}
.calendar-grid .slot.available { background: color-mix(in srgb, var(--ww-slot-host) 10%, transparent); }
.calendar-grid .slot.host { background: color-mix(in srgb, var(--ww-slot-host) 18%, transparent); }
.calendar-grid .slot.travel { background: color-mix(in srgb, var(--ww-slot-travel) 22%, transparent); }
.calendar-grid .slot.both { background: color-mix(in srgb, var(--ww-slot-both) 18%, transparent); }
.calendar-grid .slot.blocked { background: rgba(240, 230, 211, 0.04); }
.calendar-grid .slot.mutual {
  cursor: pointer;
  background: rgba(180, 90, 40, 0.14);
  animation: ember-wander 6s ease-in-out infinite;
}
@keyframes ember-wander {
  0%, 100% {
    background: rgba(180, 90, 40, 0.14);
    box-shadow:
      inset 4px 3px 10px rgba(220, 130, 50, 0.25),
      inset -3px -2px 8px rgba(196, 80, 40, 0.15),
      inset 0 0 4px rgba(201, 168, 76, 0.1);
  }
  25% {
    background: rgba(195, 105, 45, 0.2);
    box-shadow:
      inset -2px 4px 12px rgba(225, 145, 55, 0.3),
      inset 3px -3px 8px rgba(200, 90, 45, 0.18),
      inset 0 0 5px rgba(210, 150, 60, 0.12);
  }
  50% {
    background: rgba(185, 95, 42, 0.16);
    box-shadow:
      inset 3px -4px 10px rgba(215, 125, 50, 0.22),
      inset -4px 2px 10px rgba(210, 100, 50, 0.2),
      inset 0 0 6px rgba(201, 168, 76, 0.08);
  }
  75% {
    background: rgba(200, 110, 48, 0.22);
    box-shadow:
      inset -3px -3px 12px rgba(230, 150, 60, 0.28),
      inset 2px 4px 8px rgba(190, 85, 42, 0.15),
      inset 0 0 4px rgba(220, 160, 70, 0.1);
  }
}
.calendar-grid .slot.mutual:hover {
  background: rgba(210, 120, 50, 0.28);
  box-shadow:
    inset 3px 3px 14px rgba(235, 155, 60, 0.35),
    inset -3px -2px 10px rgba(210, 100, 50, 0.25),
    inset 0 0 6px rgba(220, 170, 70, 0.15);
  animation: none;
}
.calendar-grid .slot.has-invite {
  cursor: pointer;
}

/* Ghost text labels in cells */
.slot-ghost {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.55rem;
  color: rgba(240, 230, 211, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
}

/* Buddy pills inside grid cells */
.slot-pills { display: flex; flex-wrap: wrap; gap: 1px; padding: 1px; overflow: hidden; justify-content: center; align-items: center; align-content: center; height: 100%; }
.slot-pills-more {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; min-width: 14px; border-radius: 50%;
  background: rgba(240, 230, 211, 0.12); color: var(--ww-text-muted);
  font-size: 0.5rem; font-weight: 700; font-family: "Space Grotesk", sans-serif;
  cursor: default;
}
.buddy-pill {
  display: inline-flex; align-items: center; gap: 2px; padding: 1px 4px 1px 1px;
  border-radius: 9px; background: var(--pill-color, rgba(201,168,76,0.3));
  max-width: 100%; overflow: hidden; width: fit-content;
  cursor: pointer; transition: box-shadow 0.2s ease, transform 0.1s ease;
}
.buddy-pill:hover {
  box-shadow: 0 0 8px var(--pill-color, rgba(201,168,76,0.5)), 0 0 16px var(--pill-color, rgba(201,168,76,0.25));
  transform: scale(1.05);
}
.buddy-avatar-wrap {
  padding: 2px; flex-shrink: 0; line-height: 0;
}
.buddy-avatar-wrap .avatar-circle {
  border: 2px solid rgba(240,230,211,0.25);
}
.buddy-avatar-wrap .avatar-has-photo {
  box-shadow: none;
}
.buddy-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; min-width: 14px; border-radius: 50%;
  background: rgba(0,0,0,0.25); color: var(--ww-highlight);
  font-size: 0.5rem; font-weight: 700; font-family: "Space Grotesk", sans-serif;
}
.buddy-pill-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ww-highlight); font-family: "Space Grotesk", sans-serif;
  font-weight: 500; font-size: 0.5rem; line-height: 1;
}
.pill-status-icon {
  font-size: 0.5rem; font-weight: 700; line-height: 1; margin-left: 1px; margin-right: 2px;
  flex-shrink: 0;
}
.invite-pending .pill-status-icon,
.invite-proposed .pill-status-icon { color: var(--ww-accent); }
.invite-accepted .pill-status-icon,
.invite-booked .pill-status-icon { color: var(--ww-accent-secondary); }
.invite-completed .pill-status-icon { color: var(--ww-success); }
.invite-cancelled .pill-status-icon,
.invite-declined .pill-status-icon { color: var(--ww-text-muted); }
.invite-no_show .pill-status-icon { color: var(--ww-danger); }

/* Buddy pill rich tooltip — floats at body level, styled like DM panel */
.pill-tooltip {
  position: absolute;
  top: 0; left: 0;
  background: var(--ww-bg-card, #1e1e36);
  border: 1px solid rgba(240, 230, 211, 0.1);
  border-radius: var(--ww-radius-card, 12px);
  padding: 0;
  width: 240px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(196, 112, 75, 0.1);
  z-index: 1080;
  pointer-events: auto;
  animation: fade-up 0.15s ease-out;
  overflow: visible;
}
/* Invisible bridge covers the gap between pill and tooltip so hover doesn't break */
.pill-tooltip::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 16px;
  pointer-events: auto;
}
.pill-tooltip[data-side="above"]::before { top: 100%; }
.pill-tooltip[data-side="below"]::before { bottom: 100%; }
/* Clip children so overflow:visible on tooltip doesn't leak rounded corners */
.pill-tooltip > :first-child { border-radius: 12px 12px 0 0; overflow: hidden; }
.pill-tooltip > :last-child  { border-radius: 0 0 12px 12px; overflow: hidden; }
.pill-tooltip > :only-child  { border-radius: 12px; overflow: hidden; }
/* Header — mimics DM chat header */
.pill-tip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--ww-bg-card, #1e1e36);
  border-bottom: 1px solid rgba(240, 230, 211, 0.06);
}
.pill-tip-avatar {
  width: 36px; height: 36px; min-width: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(240, 230, 211, 0.15);
}
.pill-tip-avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem; font-weight: 700;
  color: var(--ww-highlight, #f0e6d3);
}
.pill-tip-header-text {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.pill-tip-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem; font-weight: 600;
  color: var(--ww-text-primary, #e0d6c8);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pill-tip-flake {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem; font-weight: 600;
  padding: 1px 6px; border-radius: var(--ww-radius-badge, 20px);
  width: fit-content;
}
/* Info rows — location lines */
.pill-tip-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; white-space: nowrap;
}
.pill-tip-row + .pill-tip-row {
  border-top: 1px solid rgba(240, 230, 211, 0.06);
}
.pill-tip-icon { width: 14px; height: 14px; flex-shrink: 0; }
.pill-tip-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.7rem; font-weight: 600;
  color: var(--ww-text-muted, #888);
  min-width: 38px;
}
.pill-tip-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem; font-weight: 500;
  color: var(--ww-text-primary, #e0d6c8);
  overflow: hidden; text-overflow: ellipsis;
}
.pill-tip-unset {
  color: var(--ww-text-muted, #888);
  font-style: italic;
}
/* Inline notes area in tooltip */
.pill-tip-notes-area {
  position: relative;
  padding: 8px 12px;
  border-top: 1px solid rgba(240, 230, 211, 0.06);
  cursor: text;
  transition: background 0.15s ease;
}
.pill-tip-notes-area:hover {
  background: rgba(240, 230, 211, 0.04);
}
.pill-tip-notes-display {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--ww-text-muted, #888);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  white-space: normal;
}
.pill-tip-notes-placeholder {
  color: rgba(240, 230, 211, 0.25);
  font-style: italic;
}
.pill-tip-notes-edit-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  color: var(--ww-accent, #c4704b);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.pill-tip-notes-area:hover .pill-tip-notes-edit-icon {
  opacity: 0.7;
}
.pill-tip-notes-area:hover .pill-tip-notes-edit-icon:hover {
  opacity: 1;
}
/* Editing state */
.pill-tip-notes-input {
  width: 100%;
  background: var(--ww-bg-secondary, #16213e);
  border: 1px solid rgba(196, 112, 75, 0.3);
  border-radius: 6px;
  color: var(--ww-text-primary, #e0d6c8);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  padding: 6px 8px;
  resize: none;
  outline: none;
  line-height: 1.4;
}
.pill-tip-notes-input:focus {
  border-color: var(--ww-accent, #c4704b);
  box-shadow: 0 0 0 2px rgba(196, 112, 75, 0.15);
}
/* Notes form on connections page */
.conn-notes-panel {
  border-top: 1px solid rgba(240, 230, 211, 0.06);
}
.conn-notes-textarea {
  font-size: 0.85rem;
  resize: vertical;
  min-height: 48px;
}
/* Tooltip action buttons */
.pill-tip-actions {
  display: flex;
  border-top: 1px solid rgba(240, 230, 211, 0.06);
}
.pill-tip-actions > button {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 6px;
  border: none;
  background: rgba(196, 112, 75, 0.06);
  color: var(--ww-accent, #c4704b);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.pill-tip-actions > button:hover {
  background: rgba(196, 112, 75, 0.18);
  color: var(--ww-highlight, #f0e6d3);
}
.pill-tip-actions > button + button {
  border-left: 1px solid rgba(240, 230, 211, 0.06);
}
.pill-tip-actions > button svg { width: 13px; height: 13px; }
.pill-tip-actions > button:disabled {
  opacity: 0.35; cursor: not-allowed;
}
.pill-tip-actions > button:disabled:hover {
  background: rgba(196, 112, 75, 0.06);
  color: var(--ww-accent, #c4704b);
}
.pill-tip-actions[style*="flex-wrap"] > button {
  border-top: 1px solid rgba(240, 230, 211, 0.06);
}

/* Per-status slot backgrounds — removed, pills signify status */

/* Invite avatar pill in slot */
.slot-invite-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(196, 112, 75, 0.4); color: var(--ww-highlight);
  font-size: 0.55rem; font-weight: 700; margin: 2px;
}

/* Calendar legend */
.calendar-legend {
  display: flex; gap: 1rem; margin-top: 0.75rem; padding: 0.5rem 0;
  font-size: 0.75rem; color: var(--ww-text-muted); flex-wrap: wrap;
}
.legend-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  vertical-align: middle; margin-right: 4px;
}

/* Invite modal styles */
.invite-time-header {
  text-align: center; padding: 0.75rem 0; margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(240, 230, 211, 0.08);
}
.invite-date { font-size: 1rem; font-weight: 600; color: var(--ww-text-primary); }
.invite-time { font-size: 0.85rem; color: var(--ww-accent); margin-top: 0.25rem; }

.invite-buddy-card {
  background: rgba(240, 230, 211, 0.04); border: 1px solid rgba(240, 230, 211, 0.08);
  border-radius: var(--ww-radius-card); padding: 0.85rem; margin-bottom: 0.6rem;
}
.invite-buddy-header {
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.65rem;
}
.invite-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; min-width: 36px; border-radius: 50%;
  color: var(--ww-highlight); font-size: 1rem; font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
}
.invite-buddy-info { display: flex; align-items: center; flex-wrap: wrap; }
.invite-buddy-name {
  font-size: 1rem; font-weight: 600; color: var(--ww-text-primary);
  font-family: "Space Grotesk", sans-serif;
}

.invite-options { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.invite-option-form { flex: 1; min-width: 0; }
.invite-option-btn {
  display: flex; align-items: center; gap: 0.65rem; width: 100%;
  padding: 0.6rem 0.75rem; border-radius: var(--ww-radius-button);
  background: rgba(240, 230, 211, 0.06); border: 1px solid rgba(240, 230, 211, 0.1);
  color: var(--ww-text-primary); cursor: pointer; text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
  font-family: "Space Grotesk", sans-serif;
}
.invite-option-btn:hover {
  background: rgba(196, 112, 75, 0.12); border-color: rgba(196, 112, 75, 0.25);
}
.invite-option-icon { font-size: 1.3rem; }
.invite-option-text { display: flex; flex-direction: column; }
.invite-option-text strong {
  font-size: 0.85rem; font-weight: 600; color: var(--ww-text-primary);
}
.invite-option-text small {
  font-size: 0.7rem; color: var(--ww-text-muted); margin-top: 1px;
}

/* Disabled invite buttons with tooltip */
.invite-options .btn.disabled {
  opacity: 0.35; cursor: not-allowed; pointer-events: auto;
}

/* Onboarding Grid — sticky header row (separate element) */
.time-grid-header {
  display: grid; grid-template-columns: 50px repeat(7, 1fr); gap: 1px;
  position: sticky; top: 0; z-index: 10;
  background: rgba(240, 230, 211, 0.06);
  border-radius: var(--ww-radius-card) var(--ww-radius-card) 0 0;
  border: 1px solid rgba(240, 230, 211, 0.08);
  border-bottom: none;
  user-select: none;
}
.time-grid-header .day-header {
  font-weight: 600; font-size: 0.8rem; text-align: center; padding: 0.6rem 0.25rem;
  color: var(--ww-text-primary); background: var(--ww-bg-card);
  border-bottom: 2px solid rgba(240, 230, 211, 0.12);
  position: relative;
}
.time-grid-header .day-header:not(.day-header-corner)::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--ww-accent);
  opacity: 0.1;
  pointer-events: none;
}
.time-grid-header .day-header-corner {
  background: var(--ww-bg-card);
  border-bottom: 2px solid rgba(240, 230, 211, 0.12);
}

/* Onboarding Grid — body */
.time-grid {
  display: grid; grid-template-columns: 50px repeat(7, 1fr); gap: 1px;
  background: rgba(240, 230, 211, 0.06);
  border-radius: 0 0 var(--ww-radius-card) var(--ww-radius-card);
  border: 1px solid rgba(240, 230, 211, 0.08);
  border-top: none;
  user-select: none;
}
.time-grid .time-label {
  font-family: "IBM Plex Mono", monospace; font-size: 0.65rem; color: var(--ww-text-muted);
  padding: 0.2rem 0.35rem; display: flex; align-items: flex-start; justify-content: flex-end;
  background: var(--ww-bg-primary);
}
.time-grid .cell {
  min-height: 38px; background: var(--ww-bg-secondary); border: 1px solid rgba(240, 230, 211, 0.03);
  cursor: pointer; transition: background 0.15s ease;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; color: var(--ww-highlight);
  position: relative; overflow: hidden;
}
.time-grid .cell:hover { background: rgba(240, 230, 211, 0.08); }
.time-grid .cell.selected-blocked { background: rgba(240, 230, 211, 0.12); }
.time-grid .cell.selected-host { background: color-mix(in srgb, var(--ww-slot-host) 30%, transparent); }
.time-grid .cell.selected-travel { background: color-mix(in srgb, var(--ww-slot-travel) 30%, transparent); }

/* Logistics mode cells */
.time-grid .cell.cell-free { background: rgba(240, 230, 211, 0.12); }
.time-grid .cell.cell-free:hover { background: rgba(240, 230, 211, 0.18); }
.time-grid .cell.cell-host { background: color-mix(in srgb, var(--ww-slot-host) 40%, transparent); }
.time-grid .cell.cell-host:hover { background: color-mix(in srgb, var(--ww-slot-host) 50%, transparent); }
.time-grid .cell.cell-travel { background: color-mix(in srgb, var(--ww-slot-travel) 40%, transparent); }
.time-grid .cell.cell-travel:hover { background: color-mix(in srgb, var(--ww-slot-travel) 50%, transparent); }
.time-grid .cell.cell-both { background: color-mix(in srgb, var(--ww-slot-both) 35%, transparent); }
.time-grid .cell.cell-both:hover { background: color-mix(in srgb, var(--ww-slot-both) 45%, transparent); }
.time-grid .cell.cell-blocked { background: rgba(240, 230, 211, 0.05); cursor: default; opacity: 0.5; }
.time-grid .cell.cell-blocked:hover { background: rgba(240, 230, 211, 0.05); }

/* Paint mode cells */
.time-grid .cell.cell-work { background: rgba(240, 230, 211, 0.12); }
.time-grid .cell.cell-work:hover { background: rgba(240, 230, 211, 0.18); }
.time-grid .cell.cell-sleep { background: rgba(100, 80, 140, 0.25); }
.time-grid .cell.cell-sleep:hover { background: rgba(100, 80, 140, 0.35); }
.time-grid .cell.cell-commitment { background: rgba(176, 90, 90, 0.25); }
.time-grid .cell.cell-commitment:hover { background: rgba(176, 90, 90, 0.35); }

/* Brush toolbar */
.brush-toolbar {
  display: flex; gap: 4px; flex-wrap: wrap; align-items: center;
}
.brush-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0.25rem 0.6rem; border-radius: var(--ww-radius-button);
  font-size: 0.75rem; font-family: "Space Grotesk", sans-serif;
  font-weight: 500; cursor: pointer;
  background: transparent; color: var(--ww-text-muted);
  border: 1px solid rgba(240, 230, 211, 0.1);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.brush-btn:hover { background: rgba(240, 230, 211, 0.06); color: var(--ww-text-primary); }
.brush-btn.active {
  color: var(--ww-highlight); border-color: var(--ww-accent);
  background: rgba(196, 112, 75, 0.12);
  box-shadow: 0 0 0 1px rgba(196, 112, 75, 0.2);
}
.brush-swatch {
  display: inline-block; width: 10px; height: 10px; border-radius: 3px;
}

/* Legend swatches */
.legend-swatch {
  display: inline-block; width: 12px; height: 12px; border-radius: 3px;
  vertical-align: middle; margin-right: 4px;
}

/* Progress bar */
.progress-warm { background: rgba(240, 230, 211, 0.08); border-radius: var(--ww-radius-badge); height: 4px; }
.progress-warm .progress-bar { background: var(--ww-accent); border-radius: var(--ww-radius-badge); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--ww-bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(240, 230, 211, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(240, 230, 211, 0.25); }

::selection { background: rgba(196, 112, 75, 0.3); color: var(--ww-highlight); }

/* Form switches — theme-aware globally */
.form-check-input {
  background-color: rgba(240, 230, 211, 0.15);
  border-color: rgba(240, 230, 211, 0.2);
  cursor: pointer;
}
.form-check-input:checked {
  background-color: var(--ww-accent);
  border-color: var(--ww-accent);
}
.form-check-input:focus {
  box-shadow: 0 0 0 2px rgba(196, 112, 75, 0.15);
  border-color: var(--ww-accent);
}

/* Calendar toolbar */
.cal-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; flex-wrap: wrap;
}
.cal-toolbar-title { flex-shrink: 0; }
.cal-toolbar-controls {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
.cal-toolbar-nav { display: flex; gap: 0.35rem; }
.cal-toolbar-toggles { display: flex; align-items: center; gap: 0.5rem; }
/* Embers page 3-column toolbar */
.embers-toolbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.75rem;
}
.embers-toolbar-title { justify-self: start; }
.embers-toolbar-nav {
  display: flex; gap: 0.35rem; justify-content: center;
}
.embers-toolbar-controls {
  display: flex; align-items: center; gap: 0.5rem;
  justify-self: end;
}
.embers-toolbar-spacer { width: 1px; height: 20px; background: rgba(240, 230, 211, 0.12); margin: 0 0.25rem; }
@media (max-width: 860px) {
  .embers-toolbar { grid-template-columns: 1fr; justify-items: center; }
  .embers-toolbar-title { justify-self: center; }
  .embers-toolbar-controls { justify-self: center; }
  .cal-toolbar { flex-direction: column; align-items: stretch; }
  .cal-toolbar-title { text-align: center; }
  .cal-toolbar-controls { justify-content: center; }
}

/* Match Visibility Toggle */
.match-toggle {
  display: flex; align-items: center; gap: 0.5rem;
}
.match-toggle .form-check-input {
  width: 2.25rem; height: 1.15rem;
}
.match-toggle .form-check-label {
  font-size: 0.75rem; color: var(--ww-text-muted); cursor: pointer; user-select: none;
}

/* Edit mode — inline cell editing */
.calendar-grid.edit-mode .slot.mutual .slot-pills,
.calendar-grid.edit-mode .slot.has-invite .slot-pills { display: none !important; }
.calendar-grid.edit-mode .slot .slot-ghost { display: block !important; }
.calendar-grid.edit-mode .slot { cursor: pointer; }
.calendar-grid.edit-mode .slot:hover { filter: brightness(1.3); }
.calendar-grid.edit-mode .slot.edit-dirty { outline: 1px solid rgba(201,168,76,0.4); }
.calendar-grid.edit-mode .slot.row-empty { min-height: 14px; }
.calendar-grid.edit-mode .time-label.row-empty { min-height: 14px; font-size: 0.6rem; padding-top: 0; padding-bottom: 0; line-height: 14px; opacity: 0.5; }

.edit-save-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: var(--ww-radius-button);
}

/* Hide matches mode — hides pills but keeps host/travel colors and ghost labels */
.calendar-grid.hide-matches .slot.mutual .slot-pills { display: none !important; }
.calendar-grid.hide-matches .slot.mutual { cursor: default; }
.calendar-grid.hide-matches .slot.mutual .slot-ghost { display: block !important; }

/* Hide dates mode — hides invite pills but keeps host/travel colors and ghost labels */
.calendar-grid.hide-dates .slot.has-invite .slot-pills { display: none !important; }
.calendar-grid.hide-dates .slot.has-invite { cursor: default; }
.calendar-grid.hide-dates .slot.has-invite .slot-ghost { display: block !important; }

/* Override indicator dot on day headers */
.day-override-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ww-accent); margin-left: 4px; vertical-align: middle;
}

/* Edit Day Modal — single-day mini grid */
.edit-day-grid {
  display: grid; grid-template-columns: 50px 1fr; gap: 1px;
  background: rgba(240, 230, 211, 0.06); border-radius: var(--ww-radius-card);
  overflow: hidden; max-height: 400px; overflow-y: auto; user-select: none;
}
.edit-day-grid .time-label {
  font-family: "IBM Plex Mono", monospace; font-size: 0.65rem; color: var(--ww-text-muted);
  padding: 0.15rem 0.35rem; display: flex; align-items: center; justify-content: flex-end;
  background: var(--ww-bg-primary);
}
.edit-day-grid .cell {
  min-height: 28px; background: var(--ww-bg-secondary); border: 1px solid rgba(240, 230, 211, 0.04);
  cursor: pointer; transition: background 0.1s ease;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; color: var(--ww-text-muted);
}
.edit-day-grid .cell:hover { background: rgba(240, 230, 211, 0.08); }
.edit-day-grid .cell.cell-blocked {
  background: rgba(240, 230, 211, 0.05); color: var(--ww-text-muted); opacity: 0.6;
}
.edit-day-grid .cell.cell-host { background: color-mix(in srgb, var(--ww-slot-host) 40%, transparent); color: var(--ww-highlight); }
.edit-day-grid .cell.cell-host:hover { background: color-mix(in srgb, var(--ww-slot-host) 50%, transparent); }
.edit-day-grid .cell.cell-travel { background: color-mix(in srgb, var(--ww-slot-travel) 40%, transparent); color: var(--ww-highlight); }
.edit-day-grid .cell.cell-travel:hover { background: color-mix(in srgb, var(--ww-slot-travel) 50%, transparent); }
.edit-day-grid .cell.cell-both { background: color-mix(in srgb, var(--ww-slot-both) 35%, transparent); color: var(--ww-highlight); }
.edit-day-grid .cell.cell-both:hover { background: color-mix(in srgb, var(--ww-slot-both) 45%, transparent); }

@media (max-width: 768px) {
  .calendar-grid-header { grid-template-columns: 40px repeat(7, 1fr); }
  .calendar-grid { grid-template-columns: 40px repeat(7, 1fr); }
  .calendar-grid .time-label { font-size: 0.65rem; }
  .time-grid-header { grid-template-columns: 40px repeat(7, 1fr); }
  .time-grid { grid-template-columns: 40px repeat(7, 1fr); }
}

/* ═══════════════════════════════════════════════════════════
   Landing Page
   ═══════════════════════════════════════════════════════════ */

.text-sage { color: var(--ww-accent-secondary) !important; }
.text-gold { color: var(--ww-success) !important; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

/* Hero */
.landing-hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 4rem 0 3rem;
  position: relative;
}
.landing-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(196, 112, 75, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(125, 138, 110, 0.05) 0%, transparent 50%);
  pointer-events: none;
}
.landing-overline {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.landing-hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.landing-hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--ww-text-muted);
  line-height: 1.6;
  max-width: 520px;
  font-weight: 400;
}
.landing-price-tag {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.3rem;
  margin-top: 2rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--ww-radius-badge);
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.15);
}
.landing-price-tag .amount {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ww-success);
  line-height: 1;
}
.landing-price-tag .period {
  color: var(--ww-text-muted);
  font-size: 0.95rem;
}

/* Mini calendar preview */
.landing-cal-preview {
  max-width: 380px;
  margin: 0 auto;
}
.landing-cal-grid {
  display: grid;
  grid-template-columns: 40px repeat(7, 1fr);
  gap: 1px;
  background: rgba(240, 230, 211, 0.06);
  border-radius: 8px;
  border: 1px solid rgba(240, 230, 211, 0.08);
  overflow: hidden;
}
.landing-cal-header {
  font-size: 0.65rem;
  color: var(--ww-text-muted);
  text-align: center;
  padding: 6px 0;
  font-weight: 600;
  background: var(--ww-bg-card);
  border-bottom: 2px solid rgba(240, 230, 211, 0.12);
}
.landing-cal-time {
  font-size: 0.6rem;
  color: var(--ww-text-muted);
  text-align: right;
  padding-right: 6px;
  line-height: 32px;
  background: var(--ww-bg-primary);
}
.landing-cal-cell {
  height: 32px;
  background: var(--ww-bg-secondary);
  border: 1px solid rgba(240, 230, 211, 0.03);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.landing-cal-cell.host {
  background: color-mix(in srgb, var(--ww-slot-host) 18%, transparent);
}
.landing-cal-cell.travel {
  background: color-mix(in srgb, var(--ww-slot-travel) 22%, transparent);
}
.landing-cal-cell.both {
  background: color-mix(in srgb, var(--ww-slot-both) 18%, transparent);
}
.landing-cal-cell.mutual {
  background: rgba(180, 90, 40, 0.14);
  animation: ember-wander 6s ease-in-out infinite;
}
/* Mini buddy pills inside landing mutual cells */
.landing-pills {
  display: flex;
  gap: 2px;
  justify-content: center;
}
.landing-pill {
  display: inline-flex;
  align-items: center;
}
.landing-pill-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 600;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
}
/* Ember legend dot with animation */
.landing-legend-ember {
  background: rgba(195, 105, 45, 0.4);
  animation: ember-wander 6s ease-in-out infinite;
  border-radius: 3px;
}
.landing-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

/* Tagline */
.landing-tagline {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--ww-highlight);
  letter-spacing: -0.01em;
}

/* Section titles */
.landing-section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* How it works steps */
.landing-steps {
  padding: 5rem 0;
}
.landing-step-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}
.landing-step-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--ww-accent, #c4704b);
  line-height: 1;
}
.landing-step-icon {
  line-height: 1;
}
.landing-step-title {
  font-weight: 600;
  color: var(--ww-highlight);
}

/* Them vs Us contrast */
.landing-first100 {
  padding: 1.5rem 0 0;
}
.landing-first100-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  background: rgba(201, 168, 76, 0.04);
}
.landing-contrast {
  padding: 5rem 0;
  position: relative;
}
.landing-contrast::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(22, 33, 62, 0.5), transparent);
  pointer-events: none;
}
.landing-them-item {
  padding: 0.75rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ww-text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(176, 90, 90, 0.4);
}
.landing-us-item {
  padding: 0.75rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ww-text-primary);
}

/* Features */
.landing-features {
  padding: 5rem 0;
}
.landing-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.landing-feature-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ww-highlight);
}

/* Flake-o-Meter landing section */
.landing-flake {
  padding: 5rem 0;
  position: relative;
}
.landing-flake::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 30% 40%, rgba(196, 112, 75, 0.04) 0%, transparent 60%);
  pointer-events: none;
}
.landing-flake-demo {
  padding: 2rem 1rem;
}
/* Flake-o-Meter gauge is now rendered by FlakeMeterGauge (flake-meter-gauge.js) */
.landing-flake-active-tier {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
  min-height: 24px;
  transition: opacity 0.15s ease;
}
.landing-flake-tiers {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.landing-flake-tier {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--ww-radius-badge, 20px);
  opacity: 0.5;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.landing-flake-tier.active {
  opacity: 1;
  transform: scale(1.1);
}
.landing-flake-quote {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: var(--ww-highlight, #f0e6d3);
  line-height: 1.6;
  max-width: 580px;
  margin: 0 auto;
  position: relative;
  padding: 0 2rem;
}
.landing-flake-quote::before {
  content: '\201C';
  position: absolute;
  left: -0.5rem;
  top: -0.5rem;
  font-size: 3rem;
  color: var(--ww-accent, #c4704b);
  opacity: 0.3;
  font-style: normal;
  line-height: 1;
}
.landing-flake-quote::after {
  content: '\201D';
  position: absolute;
  right: -0.5rem;
  bottom: -0.5rem;
  font-size: 3rem;
  color: var(--ww-accent, #c4704b);
  opacity: 0.3;
  font-style: normal;
  line-height: 1;
}

/* Testimonials marquee */
.landing-testimonials {
  padding: 5rem 0 3rem;
  overflow: hidden;
}
.testimonial-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  margin-bottom: 1.25rem;
}
.testimonial-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  will-change: transform;
}
.testimonial-marquee--left .testimonial-track {
  animation: marquee-left 45s linear infinite;
}
.testimonial-marquee--right .testimonial-track {
  animation: marquee-right 50s linear infinite;
}
@keyframes marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes marquee-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}
.testimonial-marquee:hover .testimonial-track {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .testimonial-track { animation: none !important; }
}
.testimonial-card {
  flex-shrink: 0;
  width: 320px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.testimonial-text {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ww-text-primary);
  margin-bottom: 1rem;
  flex: 1;
}
.testimonial-text::before {
  content: "\201C";
  color: var(--ww-accent);
  opacity: 0.4;
  font-size: 1.25rem;
  line-height: 0;
  vertical-align: -0.15em;
  margin-right: 2px;
}
.testimonial-sig {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(240, 230, 211, 0.06);
}
.testimonial-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ww-highlight);
  display: block;
  margin-bottom: 1px;
}
.testimonial-sig .flake-bar {
  transform: scale(0.85);
  transform-origin: left center;
}
@media (max-width: 768px) {
  .testimonial-card { width: 280px; }
}

/* CTA */
.landing-cta {
  padding: 6rem 0 4rem;
}
.landing-cta-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

/* Landing fade-up animations */
.landing-hero .fade-up {
  animation: landing-fade-up 0.6s ease-out both;
}
@keyframes landing-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up-d1 { animation-delay: 0.1s; }
.fade-up-d2 { animation-delay: 0.2s; }
.fade-up-d3 { animation-delay: 0.35s; }
.fade-up-d4 { animation-delay: 0.5s; }

/* Landing responsive */
@media (max-width: 768px) {
  .landing-hero { min-height: auto; padding: 3rem 0 2rem; }
  .landing-hero-subtitle { text-align: left; }
  .landing-cal-preview { max-width: 320px; }
  .landing-first100-inner { flex-direction: column; text-align: center; gap: 0.75rem; }
  .landing-first100-inner .mx-2 { display: none; }
  .landing-first100-inner .ms-3 { margin-left: 0 !important; }
}

/* ========================================
   Direct Messages Panel
   ======================================== */
.dm-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1070;
}
.dm-toggle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ww-accent, #c4704b);
  color: #f0e6d3;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 16px rgba(196, 112, 75, 0.25);
  transition: transform 0.1s ease;
}
.dm-toggle-btn:hover { transform: scale(1.05); }
.dm-toggle-btn:active { transform: scale(0.97); }
.dm-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--ww-danger, #b05a5a);
  color: #f0e6d3;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
/* DM tooltip — hover label above toggle */
.dm-tooltip {
  position: absolute;
  bottom: 60px;
  right: 0;
  white-space: nowrap;
  background: var(--ww-bg-card, #1e1e36);
  color: var(--ww-text-primary);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.dm-panel.dm-panel-collapsed:hover .dm-tooltip {
  opacity: 1;
  transform: translateY(0);
}
.dm-panel-body {
  width: 340px;
  max-height: 480px;
  border-radius: var(--ww-radius-card, 12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: absolute;
  bottom: 62px;
  right: 0;
}
.dm-panel-header {
  background: var(--ww-bg-card, #1e1e36);
  min-height: 42px;
}
.dm-convo-list {
  overflow-y: auto;
  flex: 1;
  max-height: 420px;
}
.dm-convo-item {
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(240, 230, 211, 0.06);
  transition: background 0.15s ease;
}
.dm-convo-item:hover {
  background: rgba(196, 112, 75, 0.06);
}
.dm-convo-item .dm-convo-unread {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--ww-accent, #c4704b);
  color: #f0e6d3;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.dm-chat-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  max-height: 420px;
}
.dm-messages {
  overflow-y: auto;
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dm-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  max-width: 85%;
}
.dm-msg-row-sent {
  align-self: flex-end;
  flex-direction: row;
}
.dm-msg-row-received {
  align-self: flex-start;
  flex-direction: row;
}
.dm-bubble-wrap {
  min-width: 0;
}
.dm-msg {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.4;
  word-wrap: break-word;
}
.dm-msg-sent {
  background: rgba(196, 112, 75, 0.2);
  color: var(--ww-text-primary, #e0d6c8);
}
.dm-msg-received {
  background: rgba(240, 230, 211, 0.08);
  color: var(--ww-text-primary, #e0d6c8);
}
.dm-msg-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ww-text-muted, #888);
  margin-bottom: 2px;
  padding: 0 2px;
}
.dm-msg-time {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  color: var(--ww-text-muted, #888);
  margin-top: 2px;
}
.dm-send-form {
  background: var(--ww-bg-card, #1e1e36);
}
.dm-textarea {
  resize: none;
  overflow-y: auto;
  min-height: 2rem;
  max-height: 7rem;
  line-height: 1.4;
}
.dm-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ww-text-muted, #888);
  font-size: 0.875rem;
}

/* Group chat — stacked avatars in convo list */
.dm-group-avatars {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.dm-group-avatar-item {
  display: inline-block;
  position: relative;
  border: 2px solid var(--ww-bg-card, #1e1e36);
  border-radius: 50%;
  line-height: 0;
}
.dm-group-avatar-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ww-bg-secondary, #16213e);
  color: var(--ww-text-muted, #888);
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: -8px;
  position: relative;
}
/* Group chat — buddy picker */
.dm-buddy-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(240, 230, 211, 0.06);
  transition: background 0.15s ease;
}
.dm-buddy-picker-item:hover {
  background: rgba(196, 112, 75, 0.06);
}
.dm-buddy-picker-item input[type="checkbox"],
.dm-buddy-picker-item input[type="radio"] {
  accent-color: var(--ww-accent, #c4704b);
  flex-shrink: 0;
}
/* Group chat — sender name in group messages */
.dm-msg-group-sender {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ww-accent, #c4704b);
  margin-bottom: 2px;
  padding: 0 2px;
}
/* Add-to-group button */
.dm-add-to-group-btn {
  font-size: 0.75rem;
}

/* DM panel mobile */
@media (max-width: 576px) {
  .dm-panel {
    bottom: 12px;
    right: 12px;
  }
  .dm-panel-body {
    width: calc(100vw - 24px);
    max-height: 60vh;
    right: 0;
  }
}

/* ── Location Autocomplete ──────────────────────────────────── */
.location-ac-wrapper {
  position: relative;
}
.location-ac-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  background: var(--ww-bg-card, #1e1e36);
  border: 1px solid rgba(240, 230, 211, 0.12);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  margin-top: 4px;
  max-height: 320px;
  overflow-y: auto;
}
.location-ac-item {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.1s ease;
}
.location-ac-item:hover,
.location-ac-item.active {
  background: rgba(196, 112, 75, 0.12);
}
.location-ac-item + .location-ac-item {
  border-top: 1px solid rgba(240, 230, 211, 0.06);
}
.location-ac-label {
  color: var(--ww-text-primary, #e0d6c8);
  font-size: 0.95rem;
}
.location-ac-path {
  color: var(--ww-text-muted, #888888);
  font-size: 0.78rem;
  font-family: "IBM Plex Mono", monospace;
  margin-top: 1px;
}

/* ═══════════════════════════════════════════════════════════
   Beta Badge
   ═══════════════════════════════════════════════════════════ */
.badge-beta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: lowercase;
  padding: 2px 7px;
  border-radius: var(--ww-radius-badge, 20px);
  background: rgba(196, 112, 75, 0.18);
  color: var(--ww-accent, #c4704b);
  vertical-align: middle;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════
   Feedback Status Badges
   ═══════════════════════════════════════════════════════════ */
.badge-status-open {
  background: rgba(201, 168, 76, 0.18); color: #c9a84c;
  font-size: 0.68rem; padding: 2px 8px; border-radius: var(--ww-radius-badge);
}
.badge-status-in-progress {
  background: rgba(196, 112, 75, 0.18); color: #c4704b;
  font-size: 0.68rem; padding: 2px 8px; border-radius: var(--ww-radius-badge);
}
.badge-status-resolved {
  background: rgba(125, 138, 110, 0.2); color: #7d8a6e;
  font-size: 0.68rem; padding: 2px 8px; border-radius: var(--ww-radius-badge);
}
.badge-status-closed {
  background: rgba(240, 230, 211, 0.1); color: var(--ww-text-muted);
  font-size: 0.68rem; padding: 2px 8px; border-radius: var(--ww-radius-badge);
}
.badge-status-wont-fix {
  background: rgba(176, 90, 90, 0.15); color: #b05a5a;
  font-size: 0.68rem; padding: 2px 8px; border-radius: var(--ww-radius-badge);
}

/* Category Badges */
.badge-category-bug {
  background: rgba(176, 90, 90, 0.15); color: #b05a5a;
  font-size: 0.68rem; padding: 2px 8px; border-radius: var(--ww-radius-badge);
}
.badge-category-feature {
  background: rgba(125, 138, 110, 0.2); color: #7d8a6e;
  font-size: 0.68rem; padding: 2px 8px; border-radius: var(--ww-radius-badge);
}
.badge-category-general {
  background: rgba(240, 230, 211, 0.12); color: var(--ww-highlight);
  font-size: 0.68rem; padding: 2px 8px; border-radius: var(--ww-radius-badge);
}

/* Admin comment highlight */
.comment-admin {
  border-left: 3px solid var(--ww-accent, #c4704b) !important;
}

/* ═══════════════════════════════════════════════════════════
   Admin Panel
   ═══════════════════════════════════════════════════════════ */

/* Stat cards */
.admin-stat-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.admin-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(196, 112, 75, 0.12);
}
.admin-stat-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}
.admin-stat-label {
  margin-top: 2px;
}

/* Section titles in detail panels */
.admin-section-title {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(240, 230, 211, 0.1);
  font-weight: 600;
}

/* User row hover */
.admin-user-row {
  transition: background 0.15s ease;
}
.admin-user-row:hover {
  background: rgba(196, 112, 75, 0.04) !important;
}

/* Toggle rows */
.admin-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(240, 230, 211, 0.06);
}
.admin-toggle-row:last-child {
  border-bottom: none;
}

/* Subscription status badges */
.badge-sub-free-trial {
  background: rgba(201, 168, 76, 0.18); color: #c9a84c;
  font-size: 0.68rem; padding: 2px 8px; border-radius: var(--ww-radius-badge, 20px);
}
.badge-sub-active {
  background: rgba(125, 138, 110, 0.2); color: #7d8a6e;
  font-size: 0.68rem; padding: 2px 8px; border-radius: var(--ww-radius-badge, 20px);
}
.badge-sub-expired {
  background: rgba(240, 230, 211, 0.1); color: var(--ww-text-muted, #888);
  font-size: 0.68rem; padding: 2px 8px; border-radius: var(--ww-radius-badge, 20px);
}
.badge-sub-cancelled {
  background: rgba(176, 90, 90, 0.15); color: #b05a5a;
  font-size: 0.68rem; padding: 2px 8px; border-radius: var(--ww-radius-badge, 20px);
}
.badge-sub-lifetime-free {
  background: rgba(201, 168, 76, 0.25); color: #c9a84c;
  font-size: 0.68rem; padding: 2px 8px; border-radius: var(--ww-radius-badge, 20px);
  font-weight: 600;
}

/* Flake type badges */
.badge-flake-type-no-show {
  background: rgba(176, 90, 90, 0.18); color: #b05a5a;
  font-size: 0.65rem; padding: 2px 6px; border-radius: var(--ww-radius-badge, 20px);
}
.badge-flake-type-late-cancel {
  background: rgba(196, 112, 75, 0.18); color: #c4704b;
  font-size: 0.65rem; padding: 2px 6px; border-radius: var(--ww-radius-badge, 20px);
}
.badge-flake-type-cancel {
  background: rgba(240, 230, 211, 0.12); color: var(--ww-highlight, #f0e6d3);
  font-size: 0.65rem; padding: 2px 6px; border-radius: var(--ww-radius-badge, 20px);
}

/* ═══════════════════════════════════════════════════════════
   Onboarding — Progress, Animations, Coach Mark, Mini-Cal
   ═══════════════════════════════════════════════════════════ */

/* Progress bar fill animation */
.progress-warm.ob-progress .progress-bar {
  animation: ob-progress-fill 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.15s;
  transform-origin: left;
}
@keyframes ob-progress-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Step dots */
.ob-step-dots {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 4px;
}
.ob-step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(240, 230, 211, 0.12);
  transition: background 0.3s ease, transform 0.3s ease;
}
.ob-step-dot.completed { background: var(--ww-accent-secondary); }
.ob-step-dot.current { background: var(--ww-accent); transform: scale(1.3); }
.ob-step-name {
  text-align: center; font-size: 0.72rem; color: var(--ww-text-muted);
  margin-top: 2px; margin-bottom: 0;
}

/* Cascade fade-in */
.ob-fade-in {
  opacity: 0;
  animation: landing-fade-up 0.4s ease-out both;
}
.ob-d1 { animation-delay: 0.05s; }
.ob-d2 { animation-delay: 0.12s; }
.ob-d3 { animation-delay: 0.2s; }
.ob-d4 { animation-delay: 0.3s; }

/* Coach mark */
.grid-coach-mark {
  position: absolute;
  border: 2px dashed rgba(196, 112, 75, 0.4);
  border-radius: 8px;
  pointer-events: none;
  animation: slot-pulse 2s ease-in-out infinite;
  z-index: 5;
  transition: opacity 0.3s ease;
}
.grid-coach-mark.fade-out { opacity: 0; }
.coach-label {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  color: var(--ww-accent);
  white-space: nowrap;
  font-family: "Space Grotesk", sans-serif;
}

/* Mini-cal preview on step 6 */
.ob-mini-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  max-width: 400px;
  margin: 0 auto;
}
.ob-mini-cal-header {
  font-size: 0.6rem; color: var(--ww-text-muted); text-align: center;
  padding: 2px 0; font-weight: 500;
}
.ob-mini-slot {
  height: 8px;
  border-radius: 2px;
}
.ob-mini-slot.blocked { background: rgba(240, 230, 211, 0.04); }
.ob-mini-slot.free { background: rgba(125, 138, 110, 0.15); }
.ob-mini-slot.mutual { background: rgba(201, 168, 76, 0.3); animation: slot-pulse 3s ease-in-out infinite; }

/* Slot summary counter */
.ob-slot-summary {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--ww-text-muted);
  min-height: 1.2em;
}

/* Finale CTA — hidden for JS animation, auto-reveals after 8s as safety net */
.finale-cta-initial {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: finale-cta-safety 0s 8s forwards;
}
.finale-cta-initial.finale-cta-shown {
  opacity: 1 !important;
  transform: translateY(0) !important;
  animation: none;
}
@keyframes finale-cta-safety {
  to { opacity: 1; transform: translateY(0); }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .ob-fade-in { animation: none !important; opacity: 1; }
  .progress-warm.ob-progress .progress-bar { animation: none !important; transform: none; }
  .grid-coach-mark { animation: none !important; }
  .ob-mini-slot.mutual { animation: none !important; }
  .finale-cta-initial { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   Buddy Filter Floating Panel (Calendar)
   ═══════════════════════════════════════════════════════════ */
.bf-panel {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1070;
}

/* Toggle button — mirrors DM toggle style */
.bf-toggle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ww-accent-secondary, #7d8a6e);
  color: #f0e6d3;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 16px rgba(125, 138, 110, 0.25);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.bf-toggle-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(125, 138, 110, 0.35);
}
.bf-toggle-btn:active { transform: scale(0.95); }
.bf-toggle-btn.bf-btn-active {
  background: var(--ww-accent, #c4704b);
  box-shadow: 0 4px 20px rgba(196, 112, 75, 0.3);
}

/* Badge on toggle button */
.bf-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--ww-danger, #b05a5a);
  color: #f0e6d3;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* Panel body */
.bf-panel-body {
  width: 300px;
  max-height: 480px;
  border-radius: var(--ww-radius-card, 12px);
  overflow: hidden;
  display: none;
  flex-direction: column;
  position: absolute;
  bottom: 62px;
  left: 0;
  /* Animation: start state */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.bf-panel-body.bf-open {
  opacity: 1;
  transform: translateY(0);
}
.bf-panel-body.bf-closing {
  opacity: 0;
  transform: translateY(6px);
}

.bf-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(240, 230, 211, 0.1);
  background: var(--ww-bg-card, #1e1e36);
}

/* Scrollable buddy list */
.bf-list {
  overflow-y: auto;
  flex: 1;
  max-height: 400px;
  padding: 4px 0;
}

.bf-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ww-text-muted);
  font-size: 0.85rem;
}

/* Buddy row */
.buddy-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(240, 230, 211, 0.06);
  transition: background 0.15s ease, opacity 0.15s ease;
}
.buddy-filter-row.bf-row-off { opacity: 0.5; filter: grayscale(1); }
.buddy-filter-row:last-child { border-bottom: none; }
.buddy-filter-row:hover { background: rgba(196, 112, 75, 0.06); }

.buddy-filter-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ww-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.buddy-filter-flake .flake-bar { transform: scale(0.8); transform-origin: left center; }
.buddy-filter-row .form-check-input { width: 2.25rem; height: 1.1rem; flex-shrink: 0; }

/* Mobile */
@media (max-width: 576px) {
  .bf-panel { bottom: 12px; left: 12px; }
  .bf-panel-body {
    width: calc(100vw - 24px);
    max-height: 60vh;
    left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bf-panel-body { transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   GPS Toggle Button
   ═══════════════════════════════════════════════════════════ */
/* Floating GPS toggle FAB — positioned left of DM button */
.geo-fab {
  position: fixed;
  bottom: 20px;
  right: 82px;
  z-index: 1070;
}
.geo-toggle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ww-bg-card, #1e1e36);
  color: var(--ww-text-muted);
  border: 1px solid rgba(240, 230, 211, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s ease, color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.geo-toggle-btn:hover { transform: scale(1.05); color: var(--ww-text-primary); }
.geo-toggle-btn:active { transform: scale(0.97); }
.geo-toggle-btn.geo-active {
  background: var(--ww-accent, #c4704b);
  color: #f0e6d3;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(196, 112, 75, 0.25);
}
.geo-toggle-btn.geo-pending {
  animation: geo-spin 1s linear infinite;
}
.geo-toggle-btn.geo-denied {
  animation: geo-shake 0.4s ease;
  color: var(--ww-danger);
}
/* Tooltip */
.geo-tooltip {
  position: absolute;
  bottom: 60px;
  right: 0;
  white-space: nowrap;
  background: var(--ww-bg-card, #1e1e36);
  color: var(--ww-text-primary);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.geo-fab:hover .geo-tooltip,
.geo-tooltip.geo-tooltip-show {
  opacity: 1;
  transform: translateY(0);
}
@keyframes geo-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes geo-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}
@media (prefers-reduced-motion: reduce) {
  .geo-toggle-btn.geo-pending,
  .geo-toggle-btn.geo-denied { animation: none !important; }
}
@media (max-width: 576px) {
  .geo-fab { right: 74px; bottom: 12px; }
  .geo-toggle-btn { width: 46px; height: 46px; }
}

/* ─────────────────────────────────────
   Onboarding v2: Illustrations
   ───────────────────────────────────── */
.ob-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
  animation: ob-illo-fade 0.6s ease-out;
}
.ob-illustration-svg {
  width: 120px;
  height: 120px;
}
@keyframes ob-illo-fade {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ─────────────────────────────────────
   Onboarding v2: OTP Input
   ───────────────────────────────────── */
.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.5rem;
  font-weight: 600;
  background: var(--ww-bg-secondary);
  border: 2px solid rgba(240, 230, 211, 0.15);
  border-radius: var(--ww-radius-button);
  color: var(--ww-text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.otp-input:focus {
  border-color: var(--ww-accent);
  box-shadow: 0 0 0 3px rgba(196, 112, 75, 0.15);
}
.otp-input::selection {
  background: rgba(196, 112, 75, 0.3);
}

/* ─────────────────────────────────────
   Onboarding v2: Geo Button
   ───────────────────────────────────── */
.geo-btn {
  transition: all 0.3s ease;
}
.geo-btn.geo-loading {
  opacity: 0.7;
  pointer-events: none;
}
.geo-btn.geo-loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: geo-spin 0.8s linear infinite;
  margin-left: 6px;
  vertical-align: middle;
}
.geo-btn.geo-found {
  border-color: var(--ww-success);
  color: var(--ww-success);
}

/* ─────────────────────────────────────
   Draw-then-classify: Selected cells
   ───────────────────────────────────── */
.time-grid .cell.cell-selected {
  background: rgba(201, 168, 76, 0.25);
  border: 1px dashed rgba(201, 168, 76, 0.6);
  animation: cell-selected-pulse 1.2s ease-in-out infinite;
}
@keyframes cell-selected-pulse {
  0%, 100% { background: rgba(201, 168, 76, 0.2); }
  50% { background: rgba(201, 168, 76, 0.35); }
}

/* ─────────────────────────────────────
   Draw-then-classify: Classification Popover
   ───────────────────────────────────── */
.classification-popover {
  position: absolute;
  z-index: 20;
  background: var(--ww-bg-card);
  border: 1px solid rgba(240, 230, 211, 0.15);
  border-radius: var(--ww-radius-card);
  padding: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  min-width: 260px;
  animation: ob-pop-in 0.2s ease-out;
}
.classification-popover .class-group {
  margin-bottom: 0.5rem;
}
.classification-popover .class-group-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ww-text-muted);
  margin-bottom: 0.25rem;
}
.classification-popover .class-pills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.class-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--ww-radius-button);
  border: 1px solid rgba(240, 230, 211, 0.12);
  background: rgba(240, 230, 211, 0.05);
  color: var(--ww-text-primary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.class-pill:hover {
  background: rgba(240, 230, 211, 0.12);
  transform: scale(1.05);
}
.class-pill:active {
  transform: scale(0.97);
}
.class-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.classification-popover .class-label-row {
  margin-top: 0.4rem;
}
.classification-popover .class-label-row input {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}
.classification-popover .class-cancel-row {
  margin-top: 0.4rem;
  text-align: right;
}

/* ─────────────────────────────────────
   Draw-then-classify: Cursor Follower
   ───────────────────────────────────── */
.paint-cursor-follower {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 3px;
  background: var(--ww-bg-card, #1e1e36);
  border: 1px solid rgba(240, 230, 211, 0.15);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  color: var(--ww-accent, #c4704b);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}
.pcf-ring {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.pcf-countdown {
  transition: stroke-dashoffset 0.1s linear;
}
.pcf-label {
  color: var(--ww-text-primary, #e0d6c8);
}

/* ─────────────────────────────────────
   Onboarding v2: Commitment Label Popover
   ───────────────────────────────────── */
.commitment-label-popover {
  position: absolute;
  z-index: 20;
  background: var(--ww-bg-card);
  border: 1px solid rgba(240, 230, 211, 0.15);
  border-radius: var(--ww-radius-card);
  padding: 0.5rem 0.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  min-width: 220px;
  animation: ob-pop-in 0.2s ease-out;
}
@keyframes ob-pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.commitment-label-popover input {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}
.cell.has-label {
  font-size: 0.55rem;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ww-highlight);
}

/* ─────────────────────────────────────
   Onboarding v2: Finale Grid
   ───────────────────────────────────── */
/* ─────────────────────────────────────
   Finale: Illustrated Walkthrough Panels
   ───────────────────────────────────── */
#finale-panels {
  position: relative;
  min-height: 240px;
}
.finale-panel {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.finale-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Dot navigation */
.finale-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.finale-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(240, 230, 211, 0.15);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}
.finale-dot:hover {
  background: rgba(240, 230, 211, 0.3);
  transform: scale(1.2);
}
.finale-dot.active {
  background: var(--ww-success, #c9a84c);
  box-shadow: 0 0 6px rgba(201, 168, 76, 0.3);
}

/* ─────────────────────────────────────
   Reduced Motion: Onboarding v2
   ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ob-illustration { animation: none; }
  .finale-panel { transition: none; }
  .commitment-label-popover { animation: none; }
  .classification-popover { animation: none; }
  .time-grid .cell.cell-selected { animation: none; }
  .paint-cursor-follower { display: none !important; }
  .ob-illustration-svg * { animation: none !important; }
  .geo-btn.geo-loading::after { animation: none; }
}

/* ─────────────────────────────────────
   User Identity Component
   ───────────────────────────────────── */
.user-id { display: flex; align-items: center; }

/* Row layout (default) */
.user-id-row { gap: 0.5rem; }
.user-id-row .user-id-avatar { flex-shrink: 0; }
.user-id-row .user-id-text { min-width: 0; line-height: 1; }
.user-id-row .user-id-name { display: block; margin-bottom: -1px; }
.user-id-row .user-id-extra { font-size: 0.8rem; color: var(--ww-text-muted); }

/* Stack layout (profile headers, onboarding) */
.user-id-stack { flex-direction: column; text-align: center; }
.user-id-stack .user-id-avatar { margin-bottom: 0.5rem; }
.user-id-stack .user-id-name { font-size: 1.25rem; font-weight: 600; color: var(--ww-accent); }
.user-id-stack .user-id-extra { font-size: 0.8rem; color: var(--ww-text-muted); }
.user-id-stack .user-id-flake { margin-top: 0.25rem; }
.user-id-lg.user-id-stack .user-id-name { font-size: 1.5rem; }

/* Inline layout (nav) */
.user-id-inline { display: inline-flex; gap: 0.4rem; align-items: center; }
.user-id-inline .user-id-name { white-space: nowrap; }

/* ============================================
   Connections Toggle (Buddies / Requests)
   ============================================ */
.conn-toggle-bar {
  display: flex; gap: 0; border-radius: var(--ww-radius-button);
  overflow: hidden; border: 1px solid rgba(240,230,211,0.12);
  width: fit-content;
}
.conn-toggle {
  background: transparent; border: none; color: var(--ww-text-muted);
  font-family: "Space Grotesk", sans-serif; font-size: 0.88rem;
  padding: 0.45rem 1.1rem; cursor: pointer; transition: background 0.15s, color 0.15s;
  display: flex; align-items: center; gap: 0.4rem;
}
.conn-toggle:hover { color: var(--ww-text-primary); }
.conn-toggle.active {
  background: var(--ww-accent); color: #f0e6d3;
}
.conn-toggle-count {
  font-size: 0.72rem; font-family: "IBM Plex Mono", monospace;
  background: rgba(240,230,211,0.1); border-radius: 10px;
  padding: 0.1rem 0.45rem; min-width: 1.4em; text-align: center;
}
.conn-toggle.active .conn-toggle-count { background: rgba(255,255,255,0.2); }
.conn-toggle-count-alert { background: var(--ww-danger); color: #f0e6d3; }
.conn-toggle.active .conn-toggle-count-alert { background: rgba(255,255,255,0.25); }

/* ============================================
   Buddy Detail Row (location + availability)
   ============================================ */
.buddy-detail-row {
  padding-left: 0.25rem;
  gap: 1rem;
}
.date-detail-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 0.25rem;
  line-height: 1.6;
}
.buddy-location-col {
  flex: 1;
  min-width: 0;
  line-height: 1.6;
}
.buddy-avail-col {
  flex-shrink: 0;
  white-space: nowrap;
}
.buddy-notes-preview {
  line-height: 1.5;
}

/* ============================================
   Buddy Sort Bar & Drag-and-Drop
   ============================================ */
.buddy-sort-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}
.buddy-sort-bar .sort-label {
  font-size: 0.8rem;
  color: var(--ww-text-muted);
  margin-right: 0.25rem;
}
.buddy-sort-bar .btn {
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--ww-radius-badge);
}
.buddy-sort-bar .sort-saved {
  font-size: 0.75rem;
  color: var(--ww-success);
  transition: opacity 0.3s;
  display: none;
}

/* Buddy card outer — two-column layout for drag + content */
.buddy-card-outer {
  display: flex;
}
.buddy-card-content {
  flex: 1;
  min-width: 0;
}

/* Drag column — full-height left strip, hidden unless priority mode */
.buddy-drag-col {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  cursor: grab;
  color: var(--ww-text-muted);
  padding: 0.5rem 0.6rem;
  padding-top: 1.3rem;
  touch-action: none;
  flex-shrink: 0;
  background: rgba(240, 230, 211, 0.04);
  border-right: 1px solid rgba(240, 230, 211, 0.06);
  border-radius: var(--ww-radius-card) 0 0 var(--ww-radius-card);
  transition: background 0.15s, color 0.15s;
}
.buddy-drag-col svg { margin: auto 0; }
.buddy-drag-col:hover {
  background: rgba(240, 230, 211, 0.1);
  color: var(--ww-text-primary);
}
.buddy-drag-col:active { cursor: grabbing; background: rgba(196, 112, 75, 0.12); }
.priority-mode .buddy-drag-col { display: flex; }

/* Priority badge — lives inside drag column */
.buddy-priority-badge {
  display: none;
  font-size: 0.7rem;
  color: var(--ww-text-muted);
  background: rgba(240,230,211,0.08);
  border-radius: 50%;
  width: 1.4rem;
  height: 1.4rem;
  line-height: 1.4rem;
  text-align: center;
  flex-shrink: 0;
  font-family: 'IBM Plex Mono', monospace;
}
.priority-mode .buddy-priority-badge { display: block; }

/* Dragging state */
.buddy-card-dragging {
  opacity: 0.4;
  border: 1px dashed var(--ww-accent) !important;
}

/* Drop indicator line */
.buddy-drop-indicator {
  height: 2px;
  background: var(--ww-accent);
  border-radius: 1px;
  margin: 0.15rem 0;
}

/* Touch clone */
.buddy-card-touch-clone {
  opacity: 0.85;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  border-radius: var(--ww-radius-card);
}

/* Next mutual slot badge */
.next-mutual-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  color: var(--ww-accent);
  border: 1px solid rgba(196, 112, 75, 0.25);
  border-radius: var(--ww-radius-badge);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.next-mutual-badge:hover {
  background: rgba(196, 112, 75, 0.1);
  border-color: rgba(196, 112, 75, 0.45);
}
.next-mutual-none {
  color: var(--ww-text-muted);
  font-style: italic;
}

/* Buddy invite popover */
.buddy-invite-popover {
  position: relative;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  background: var(--ww-bg-card);
  border: 1px solid rgba(240, 230, 211, 0.12);
  border-radius: var(--ww-radius-card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  max-width: 220px;
  z-index: 20;
}
.buddy-invite-popover .popover-header {
  color: var(--ww-text-muted);
  border-bottom: 1px solid rgba(240, 230, 211, 0.06);
  padding-bottom: 0.35rem;
}

/* ============================================
   View Toggle (calendar/list switcher)
   ============================================ */
.view-toggle {
  display: inline-flex;
  gap: 2px;
  background: rgba(240, 230, 211, 0.06);
  border-radius: var(--ww-radius-button);
  padding: 2px;
}
.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--ww-text-muted);
  border-radius: calc(var(--ww-radius-button) - 2px);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.view-toggle-btn:hover {
  color: var(--ww-text-primary);
  background: rgba(240, 230, 211, 0.08);
}
.view-toggle-btn.active {
  background: var(--ww-accent);
  color: #fff;
}

/* ============================================
   Month Calendar Grid (Dates page)
   ============================================ */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.month-nav-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ww-text-primary);
  min-width: 160px;
  text-align: center;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.month-header {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ww-text-muted);
  padding: 6px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ww-bg-primary);
}
.month-cell {
  min-height: 54px;
  padding: 4px;
  border-radius: 6px;
  background: rgba(240, 230, 211, 0.03);
  border: 1px solid rgba(240, 230, 211, 0.06);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.month-cell:hover {
  background: rgba(240, 230, 211, 0.06);
}
.month-cell-empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}
.month-cell-empty:hover {
  background: transparent;
}
.month-cell-today {
  border-color: var(--ww-accent);
  background: rgba(196, 112, 75, 0.08);
}
.month-cell-selected {
  border-color: var(--ww-success);
  background: rgba(201, 168, 76, 0.1);
}
.month-cell-has-dates {
  cursor: pointer;
}
.month-day-num {
  font-size: 0.8rem;
  color: var(--ww-text-primary);
  line-height: 1;
  margin-bottom: 2px;
}
.month-dots {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2px;
}
.month-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.month-dot-more {
  font-size: 0.55rem;
  color: var(--ww-text-muted);
  line-height: 7px;
}
.month-detail-panel {
  border-top: 1px solid rgba(240, 230, 211, 0.1);
  padding-top: 12px;
}

/* ============================================
   Availability Mode Slider
   ============================================ */
.avail-mode-slider {
  display: flex;
  gap: 8px;
  background: rgba(240, 230, 211, 0.04);
  border-radius: var(--ww-radius-card);
  padding: 6px;
  border: 1px solid rgba(240, 230, 211, 0.08);
}
.avail-mode-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ww-text-muted);
  border-radius: calc(var(--ww-radius-card) - 4px);
  cursor: pointer;
  transition: all 0.2s;
}
.avail-mode-btn:hover {
  background: rgba(240, 230, 211, 0.06);
  color: var(--ww-text-primary);
}
.avail-mode-btn.active {
  background: rgba(196, 112, 75, 0.12);
  border-color: var(--ww-accent);
  color: var(--ww-text-primary);
}
.avail-mode-title {
  font-weight: 600;
  font-size: 0.85rem;
}
.avail-mode-desc {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* ============================================
   Matches List View
   ============================================ */
.matches-list-mutual {
  transition: border-color 0.15s, transform 0.1s;
}
.matches-list-mutual:hover {
  border-color: rgba(196, 112, 75, 0.3);
  transform: translateY(-1px);
}

/* Past slot styling */
.slot.past-slot {
  opacity: 0.35;
  pointer-events: none;
}

/* Alert warm-info */
.alert-warm-info {
  background: rgba(196, 112, 75, 0.08);
  border: 1px solid rgba(196, 112, 75, 0.2);
  border-radius: var(--ww-radius-card);
  color: var(--ww-text-primary);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}

/* Notification toggle group */
.btn-outline-warm-toggle {
  background: transparent;
  color: var(--ww-text-muted);
  border: 1px solid rgba(240, 230, 211, 0.12);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-outline-warm-toggle:hover {
  background: rgba(196, 112, 75, 0.08);
  color: var(--ww-text-primary);
  border-color: rgba(240, 230, 211, 0.2);
}
.btn-check:checked + .btn-outline-warm-toggle {
  background: rgba(196, 112, 75, 0.18);
  color: var(--ww-accent);
  border-color: rgba(196, 112, 75, 0.4);
}
.btn-check:checked + .btn-outline-warm-toggle-danger {
  background: rgba(176, 90, 90, 0.2);
  color: var(--ww-danger);
  border-color: rgba(176, 90, 90, 0.45);
}
.notify-toggle-group {
  margin-left: 1rem;
}
@media (max-width: 576px) {
  .notify-event-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem;
  }
  .notify-toggle-group {
    margin-left: 0;
    align-self: flex-end;
  }
}

/* ═══ Date card — 3-column layout (avatar | details | actions) ═══ */
.date-card-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem;
}
.date-card-avatar {
  flex-shrink: 0;
  white-space: nowrap;
  width: 160px;
}
.date-card-avatar .user-id-row {
  flex-wrap: nowrap;
}
.date-card-avatar .user-id-text {
  overflow: hidden;
}
.date-card-avatar .user-id-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.date-card-details {
  flex: 1;
  min-width: 0;
}
.date-card-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
@media (max-width: 480px) {
  .date-card-row { flex-wrap: wrap; }
  .date-card-avatar { width: auto; min-width: auto; }
  .date-card-actions { margin-left: auto; }
}

/* ═══ Accordion (warm theme) ═══ */
.accordion-warm .accordion-item {
  background: var(--ww-bg-card, #1e1e36);
  border: 1px solid rgba(240, 230, 211, 0.08);
  border-radius: var(--ww-radius-card, 12px) !important;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.accordion-warm .accordion-item:last-child { margin-bottom: 0; }
.accordion-warm .accordion-button {
  background: var(--ww-bg-card, #1e1e36);
  color: var(--ww-text-primary, #e0d6c8);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 1rem 1.25rem;
  border: none;
  box-shadow: none;
}
.accordion-warm .accordion-button:not(.collapsed) {
  background: rgba(196, 112, 75, 0.06);
  color: var(--ww-accent, #c4704b);
  box-shadow: none;
}
.accordion-warm .accordion-button:focus {
  box-shadow: 0 0 0 2px rgba(196, 112, 75, 0.2);
}
.accordion-warm .accordion-button::after {
  filter: invert(0.6) sepia(0.3) saturate(1.5) hue-rotate(340deg);
}
.accordion-warm .accordion-body {
  background: var(--ww-bg-card, #1e1e36);
  color: var(--ww-text-primary, #e0d6c8);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
}
.accordion-warm .accordion-body ul { padding-left: 1.25rem; }
.accordion-warm .accordion-body li { margin-bottom: 0.3rem; }
