/* ============================================
   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 {
  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); color: #f0e6d3; 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 {
  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 {
  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);
}

/* 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: 2px; 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; }

@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;
}

/* Navbar */
.navbar { background: var(--ww-bg-primary); font-family: "Space Grotesk", sans-serif; }
.navbar-brand { font-family: "Space Grotesk", sans-serif; font-weight: 700; }
.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; }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.nav-link:hover .nav-icon { opacity: 1; }
/* 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.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: 26px; height: 26px; font-size: 0.7rem; }
.avatar-md { width: 40px; height: 40px; font-size: 1rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.5rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 2.5rem; }

/* 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 { border: 2px solid rgba(240,230,211,0.25); }

/* Calendar Grid */
.calendar-grid {
  display: grid; grid-template-columns: 50px repeat(7, 1fr); gap: 1px;
  background: rgba(240, 230, 211, 0.06); border-radius: var(--ww-radius-card); overflow: hidden;
  border: 1px solid rgba(240, 230, 211, 0.08);
}
.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 .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 .day-header::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--ww-accent);
  opacity: 0.1;
  pointer-events: none;
}
.calendar-grid .day-header.today {
  color: var(--ww-accent);
  border-bottom-color: var(--ww-accent);
}
.calendar-grid .day-header.today::before {
  opacity: 0.18;
}
.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 .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;
}
.calendar-grid .slot.mutual:hover {
  background: rgba(240, 230, 211, 0.06);
}
.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 {
  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 { color: var(--ww-accent); }
.invite-accepted .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: 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;
}
/* Notes in tooltip */
.pill-tip-notes-row {
  border-top: 1px solid rgba(240, 230, 211, 0.06);
  align-items: flex-start;
  gap: 8px;
}
.pill-tip-notes-text {
  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;
}
/* 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; }

/* 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 */
.time-grid {
  display: grid; grid-template-columns: 60px repeat(7, 1fr); gap: 1px;
  background: rgba(240, 230, 211, 0.05); border-radius: var(--ww-radius-card); overflow: hidden; user-select: none;
}
.time-grid .time-label {
  font-family: "IBM Plex Mono", monospace; font-size: 0.7rem; color: var(--ww-text-muted);
  padding: 0.15rem 0.25rem; display: flex; align-items: center; justify-content: flex-end;
}
.time-grid .day-header {
  font-weight: 600; font-size: 0.75rem; text-align: center; padding: 0.4rem;
  color: var(--ww-text-primary); background: var(--ww-bg-card);
}
.time-grid .cell {
  min-height: 24px; 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-highlight);
}
.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); }

/* 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; }
@media (max-width: 860px) {
  .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); }

.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 { grid-template-columns: 40px repeat(7, 1fr); }
  .calendar-grid .time-label { font-size: 0.65rem; }
  .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: 3px;
}
.landing-cal-header {
  font-size: 0.65rem;
  color: var(--ww-text-muted);
  text-align: center;
  padding: 4px 0;
  font-weight: 500;
}
.landing-cal-time {
  font-size: 0.6rem;
  color: rgba(224, 214, 200, 0.3);
  text-align: right;
  padding-right: 6px;
  line-height: 28px;
}
.landing-cal-cell {
  height: 28px;
  border-radius: 4px;
  background: rgba(240, 230, 211, 0.03);
  transition: all 0.3s ease;
}
.landing-cal-cell.mine {
  background: rgba(125, 138, 110, 0.2);
  border: 1px solid rgba(125, 138, 110, 0.15);
}
.landing-cal-cell.theirs {
  background: rgba(196, 112, 75, 0.15);
  border: 1px solid rgba(196, 112, 75, 0.1);
}
.landing-cal-cell.mutual {
  background: rgba(201, 168, 76, 0.4);
  border: 1px solid rgba(201, 168, 76, 0.5);
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.4), 0 0 16px rgba(201, 168, 76, 0.15);
  animation: slot-glow 2s ease-in-out infinite;
}
@keyframes slot-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(201, 168, 76, 0.4), 0 0 16px rgba(201, 168, 76, 0.15); }
  50% { opacity: 0.75; box-shadow: 0 0 12px rgba(201, 168, 76, 0.6), 0 0 24px rgba(201, 168, 76, 0.25); }
}
.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;
}
.landing-flake-gauge {
  position: relative;
  width: 180px;
  height: 100px;
  margin: 0 auto 1.5rem;
  overflow: hidden;
}
.landing-flake-gauge-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 180px;
  height: 90px;
  border-radius: 90px 90px 0 0;
  background: conic-gradient(
    from 270deg at 50% 100%,
    #b05a5a 0deg,
    #b05a5a 32deg,
    #c4704b 40deg,
    #c4704b 68deg,
    #e0d6c8 76deg,
    #e0d6c8 104deg,
    #7d8a6e 112deg,
    #7d8a6e 140deg,
    #c9a84c 148deg,
    #c9a84c 180deg
  );
}
.landing-flake-gauge-fill {
  position: absolute;
  bottom: 0;
  left: 20px;
  width: 140px;
  height: 70px;
  border-radius: 70px 70px 0 0;
  background: var(--ww-bg-card, #1e1e36);
}
.landing-flake-needle {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 3px;
  height: 72px;
  margin-left: -1.5px;
  background: linear-gradient(to top, var(--ww-highlight, #f0e6d3), transparent);
  border-radius: 2px;
  transform-origin: bottom center;
  transform: rotate(-80deg);
  transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.landing-flake-center {
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--ww-highlight, #f0e6d3);
  box-shadow: 0 0 8px rgba(240, 230, 211, 0.3);
}
.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;
}

/* 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-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-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ww-text-muted, #888);
  font-size: 0.875rem;
}

/* 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);
}
