* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Color Tokens - Mindcomplete Design System */
:root {
  /* Mindcomplete Colors - Dark Theme */
  --background: #141319;
  --background-surface: #1f1e26;
  --accent: #c3fb50;
  --text: #d9d9d9;
  --text-muted: rgba(255, 255, 255, 0.5);
  --input-background: rgba(255, 255, 255, 0.06);
  --add-btn-bg: rgba(255, 255, 255, 0.05);
  --text-btn: #141319;
  --btn-background: rgba(255, 255, 255, 0.1);
  --btn-primary-bg: #c3fb50;
  --btn-primary-text: #141319;
  --btn-secondary-bg: #1f1e26;
  --btn-secondary-text: var(--text);
  --text-prediction: #c3fb50;
  --btn-dark: #ffffff;
  --btn-dark-text: #141319;
  --border: rgba(255, 255, 255, 0.1);
  --modal-surface: rgba(25, 24, 30, 0.95);
  --modal-border: rgba(255, 255, 255, 0.1);
  --modal-background: #19181E;
  --sidebar-width: 260px;
  --sidebar-background: #19181E;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-muted: rgba(255, 255, 255, 0.5);
  --sidebar-hover: #2E2D37;
  --left-menu-overlay-bg: rgba(20, 19, 25, 0.9);
  --left-menu-panel-bg: #19181E;
  --left-menu-divider: rgba(255, 255, 255, 0.08);
  --active-valley-bg: #2E2D37;

  /* Derived */
  --background-rgb: 20, 19, 25;
  --text-rgb: 255, 255, 255;
  --ghost: rgba(var(--text-rgb), 0.5);
  --placeholder: rgba(var(--text-rgb), 0.5);
  --modal-overlay: rgba(0, 0, 0, 0.6);
}

:root {
  /* Typography - Unified Design System */

  /* Display (Landing Headlines) */
  --font-display-xl-size: 48px;
  --font-display-xl-weight: 500;
  --font-display-xl-line-height: 1.1;

  --font-display-lg-size: 40px;
  --font-display-lg-weight: 500;
  --font-display-lg-line-height: 1.15;

  --font-display-md-size: 32px;
  --font-display-md-weight: 500;
  --font-display-md-line-height: 1.2;

  --font-display-sm-size: 24px;
  --font-display-sm-weight: 500;
  --font-display-sm-line-height: 1.25;

  /* Headings (≥22px = weight 500) */
  --font-h1-size: 20px;
  --font-h1-weight: 500;
  --font-h2-size: 18px;
  --font-h2-weight: 500;

  /* Body (<22px = weight 400) */
  --font-body-large-size: 18px;
  --font-body-large-weight: 400;
  --font-body-size: 16px;
  --font-body-weight: 400;
  --font-body-small-size: 14px;
  --font-body-small-weight: 400;
  --font-caption-size: 12px;
  --font-caption-weight: 400;

  /* Icons */
  --icon-weight: 300;
  --icon-size-sm: 24px;
  --icon-size-lg: 40px;

  /* Spacing Scale */
  --space-2xs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-base: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 40px;
  --space-4xl: 48px;

  /* Border Radius */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-base: 16px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 999px;
  --radius-circle: 50%;

  /* Component Sizing */
  --size-icon-btn-sm: 32px;
  --size-icon-btn: 48px;
  --size-avatar-sm: 36px;
  --size-fab: 60px;
  --size-fab-lg: 72px;
  --header-height: 60px;
  --select-height: 48px;
  --textarea-height: 153px;
  --editor-min-height: 200px;
  --files-dropzone-min-height: 220px;

  /* Transitions */
  --transition-fast: 0.2s;
  --transition-base: 0.3s;
  --transition-slow: 0.8s;
  --easing-default: ease;
  --easing-out: ease-out;
  --easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Scale */
  --z-header-overlay: 50;
  --z-header: 100;
  --z-sidebar-backdrop: 130;
  --z-sidebar: 140;
  --z-sidebar-mobile: 150;
  --z-menu-overlay: 200;
  --z-fab: 401;
  --z-modal: 1000;
  --z-theme-overlay: 1600;

  /* Blur Effects */
  --blur-sm: blur(4px);
  --blur-lg: blur(24px);

  /* Shadows */
  --menu-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  --modal-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  --shadow-sidebar-mobile: 24px 0 45px rgba(0, 0, 0, 0.25);

  /* Semantic Colors */
  --color-white: #fff;
  --color-black: #000;
  --color-danger: var(--color-danger);
  --color-danger-light: rgba(231, 76, 60, 0.1);
  --color-warning: #FFDD00;
  --select-confirm-btn-bg: var(--select-confirm-btn-bg);
  --select-confirm-btn-text: var(--select-confirm-btn-text);

  /* Opacity */
  --opacity-muted: 0.8;
  --opacity-disabled: 0.5;

  /* Line Heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.4;
  --line-height-relaxed: 1.5;
}



html,
body {
  height: 100%;
  background: var(--background);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Google Sans Flex", "Inter", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-optical-sizing: auto;
  font-size: var(--font-body-size);
  font-weight: var(--font-body-weight);
  font-style: normal;
  overflow-x: hidden;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--background);
}

.app-main {
  position: relative;
  flex: 1;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--modal-background);
  border-right: none;
  display: flex;
  flex-direction: column;
  color: var(--text);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: var(--z-sidebar);
  transition: transform 0.3s ease;
  padding: 0 12px;
}

/* Sidebar Header - Logo + Close Button */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 12px;
  flex-shrink: 0;
}

.sidebar-logo-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.sidebar-logo {
  height: 24px;
  width: auto;
}

/* Sidebar Section Label */
.sidebar-section-label {
  font-family: 'Google Sans Flex', sans-serif;
  font-size: var(--font-body-small-size);
  font-weight: var(--font-body-small-weight);
  color: var(--text);
  padding: 0 12px;
  margin-bottom: 12px;
}

.sidebar-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* Sidebar Top Group - Header + Button + Valleys (gap-12) */
.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-top::-webkit-scrollbar {
  display: none;
}

.sidebar-brand {
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-caption-size);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sidebar-muted);
  margin: 0 10px;
}

.sidebar-icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 12px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: inherit;
}

.sidebar-section-title .material-symbols-outlined {
  font-size: var(--icon-size-sm);
}

/* Sidebar Primary CTA Button (pill style) */
.sidebar-primary-btn {
  width: 100%;
  height: 58px;
  border: none;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  padding: 14px 28px;
  border-radius: 999px;
  font-family: 'Google Sans Flex', sans-serif;
  font-size: var(--font-body-small-size);
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.sidebar-primary-btn:hover {
  opacity: 0.9;
}

.sidebar-item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-body-small-size);
  font-weight: var(--font-body-small-weight);
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-item .material-symbols-outlined {
  opacity: 0.8;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: -12px;
}

.sidebar-create-btn {
  height: 36px;
  background: var(--modal-background);
  gap: 4px;
  padding: 0 4px;
  border-radius: 10px;
}

.sidebar-create-btn .material-symbols-outlined {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 1;
}

.sidebar-divider {
  height: 1px;
  background: var(--left-menu-divider);
  margin: 0;
  width: 100%;
}

@media (hover: hover) {
  .sidebar-item:hover {
    background: var(--background);
  }

  .sidebar-icon-btn:hover,
  .sidebar-text-btn:hover {
    opacity: 0.7;
  }
}

.sidebar-valleys {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-valley-card {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: var(--text);
  background: var(--input-background);
  transition: background 0.2s ease;
  position: relative;
}

/* Active state */
.sidebar-valley-card.active {
  background: var(--active-valley-bg);
}

.sidebar-valley-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-valley-title {
  font-family: 'Google Sans Flex', sans-serif;
  font-size: var(--font-h3-size);
  font-weight: var(--font-h3-weight);
  line-height: var(--line-height-tight);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-valley-subtitle {
  font-family: 'Google Sans Flex', sans-serif;
  font-size: var(--font-body-small-size);
  font-weight: var(--font-body-small-weight);
  line-height: var(--line-height-tight);
  color: var(--text);
  opacity: 0.7;
}

.sidebar-valley-menu {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

/* Desktop: hover states */
@media (hover: hover) {
  .sidebar-valley-card:hover {
    background: var(--active-valley-bg);
  }

  .sidebar-valley-menu:hover {
    opacity: 1;
  }
}

.sidebar-valleys-empty {
  font-size: var(--font-body-small-size);
  color: var(--sidebar-muted);
  padding: 0 12px;
  display: none;
}

.sidebar-valleys-empty.visible {
  display: block;
}

.sidebar-text-btn {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: var(--font-body-size);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 0;
}

/* Account Section (px-12, pt-12, pb-36, gap-10) */
.sidebar-account {
  padding: 12px 12px 36px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-account-trigger {
  border: none;
  width: 100%;
  padding: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-body-small-size);
  font-weight: var(--font-body-small-weight);
  transition: background 0.2s ease;
  margin-bottom: 10px;
}

.sidebar-account-trigger:hover {
  opacity: 0.8;
}

.sidebar-account-name {
  flex: 1;
  font-size: var(--font-body-small-size);
  font-weight: 300;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  line-height: 1.4;
}

.sidebar-account-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.5;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--input-background);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 300;
  font-size: var(--font-body-small-size);
  flex-shrink: 0;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: var(--z-sidebar-backdrop);
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-open .sidebar-backdrop {
  pointer-events: auto;
  transform: translateX(min(320px, 80vw));
}

/* Headings */
h1 {
  font-family: "Google Sans Flex", "Inter", Georgia, sans-serif;
  font-optical-sizing: auto;
  font-size: var(--font-h1-size);
  font-weight: var(--font-h1-weight);
  color: var(--text);
  line-height: 1.2;
}

h2 {
  font-family: "Google Sans Flex", "Inter", Georgia, sans-serif;
  font-optical-sizing: auto;
  font-size: var(--font-h2-size);
  font-weight: var(--font-h2-weight);
  color: var(--text);
  line-height: 1.3;
}


/* Material Symbols - Default 24px */
.material-symbols-outlined {
  font-variation-settings:
    'FILL' 0,
    'wght' var(--icon-weight),
    'GRAD' 0,
    'opsz' 24;
  font-size: var(--icon-size-sm);
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  color: var(--text);
}

/* Large icons - 40px */
.material-symbols-outlined.icon-lg {
  font-variation-settings:
    'FILL' 0,
    'wght' var(--icon-weight),
    'GRAD' 0,
    'opsz' 40;
  font-size: var(--icon-size-lg);
  width: var(--icon-size-lg);
  height: var(--icon-size-lg);
  color: var(--text);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  padding: 0 24px;
  z-index: var(--z-header);
  background: var(--background);
}

/* Gradient overlay to fade text under header */
.header-gradient-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--background);
  z-index: var(--z-header-overlay);
  pointer-events: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo {
  height: 24px;
  width: auto;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile: Adjust spacing when menu button shrinks */
body.sidebar-open .header-logo {
  /* Motion is handled by flexbox layout + menu-btn shrinking */
}

@media (min-width: 1025px) {
  .header-logo {
    pointer-events: auto;
  }
}

.header-right {
  display: flex;
  align-items: center;
}

/* Theme dissolve overlay for smoother theme switches */
.theme-dissolve-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: transparent;
  z-index: var(--z-theme-overlay);
}

.theme-dissolve-overlay.active {
  animation: theme-dissolve 320ms ease forwards;
}

@keyframes theme-dissolve {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* Logo - Text based */
.logo {
  display: flex;
  align-items: center;
  font-family: 'Google Sans Flex', sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
}

.logo-divider {
  color: var(--text);
  margin: 0 1px;
}

.logo-complete {
  color: var(--accent);
}

/* Text logo component for inline use */
.text-logo {
  display: inline-flex;
  align-items: center;
  font-family: 'Google Sans Flex', sans-serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
}

.text-logo-sm {
  font-size: 18px;
}

.text-logo-md {
  font-size: 22px;
}

.text-logo-lg {
  font-size: 28px;
}

/* Menu button icon toggle - show menu when closed, X when open */
.menu-icon-open {
  display: block;
}

.menu-icon-close {
  display: none;
}

/* Mobile: sidebar-open class controls icon */
.sidebar-open .menu-icon-open {
  display: none;
}

.sidebar-open .menu-icon-close {
  display: block;
}

/* Desktop: sidebar is visible by default, collapsed hides it */
@media (min-width: 1025px) {

  /* When sidebar is visible (not collapsed), show X */
  body:not(.sidebar-collapsed) .menu-icon-open {
    display: none;
  }

  body:not(.sidebar-collapsed) .menu-icon-close {
    display: block;
  }

  /* When sidebar is collapsed, show menu icon */
  body.sidebar-collapsed .menu-icon-open {
    display: block;
  }

  body.sidebar-collapsed .menu-icon-close {
    display: none;
  }
}

/* Icon Button (Circular Ghost style from Figma) */
/* Button Icon - 32x32px icon-only button */
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--size-icon-btn-sm);
  height: var(--size-icon-btn-sm);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s;
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.btn-icon:focus,
.btn-icon:focus-visible {
  outline: none;
}

.btn-icon:hover {
  opacity: 0.7;
}

.btn-icon .material-symbols-outlined {
  font-size: var(--icon-size-sm);
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  color: var(--text);
}

.logo-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  /* Reset default button styles */
  appearance: none;
  -webkit-appearance: none;
}



.logo-back-btn:focus,
.logo-back-btn:focus-visible {
  outline: none;
}

/* Legacy icon-btn - alias to btn-icon */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--size-icon-btn-sm);
  height: var(--size-icon-btn-sm);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s;
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.icon-btn:focus,
.icon-btn:focus-visible {
  outline: none;
}

.icon-btn:hover {
  opacity: 0.7;
}

.icon-btn .material-symbols-outlined {
  font-size: var(--icon-size-sm);
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  color: var(--text);
}



/* Menu Overlay */

.menu-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: var(--z-menu-overlay);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.menu-overlay.visible {
  pointer-events: auto;
  opacity: 1;
}

.menu-content {
  position: absolute;
  top: 54px;
  right: 40px;
  background: var(--input-background);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 16px;
  padding: 20px 24px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform-origin: top right;
  transform: scale(0.9) translateY(-8px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 194px;
  max-width: 280px;
}

.menu-overlay.menu-ready .menu-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.menu-content.left-aligned {
  right: auto;
  left: 20px;
  transform-origin: top left;
}

.left-menu-overlay {
  background: var(--left-menu-overlay-bg);
}

.valley-menu-overlay {
  background: transparent !important;
}

.left-menu-overlay .menu-content {
  top: 0;
  bottom: 0;
  left: 0;
  right: auto;
  width: min(320px, 80vw);
  min-width: 0;
  border-radius: 0;
  padding: 48px 32px 40px 32px;
  background: var(--modal-background);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  gap: 24px;
  transform: translateX(-110%);
  opacity: 0;
  transition: transform 0.28s ease-out, opacity 0.2s ease;
}

.left-menu-overlay.menu-ready .menu-content {
  opacity: 1;
  transform: translateX(0);
}

.left-menu-overlay .menu-item {
  width: 100%;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  font-size: var(--font-body-small-size);
  font-weight: var(--font-body-small-weight);
  letter-spacing: normal;
}

.left-menu-overlay .menu-item .material-symbols-outlined {
  display: none;
}

.left-menu-overlay .menu-label {
  font-size: var(--font-body-small-size);
  font-weight: var(--font-body-small-weight);
}

.menu-close-btn {
  position: absolute;
  top: 6px;
  right: 20px;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  padding: 0;
  border-radius: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.menu-close-btn .material-symbols-outlined {
  opacity: 1;
}

.left-menu-overlay.visible .menu-close-btn {
  pointer-events: auto;
  opacity: 1;
}

@media (hover: hover) {
  .menu-close-btn:hover {
    opacity: 0.7;
  }
}

.menu-item {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: var(--font-body-small-size);
  font-weight: var(--font-body-small-weight);
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.2s ease;
}

@media (hover: hover) {
  .menu-item:hover {
    opacity: 0.7;
  }
}

.menu-item.select-menu-btn.active {
  opacity: 0.7;
}

.menu-item.disabled {
  opacity: 0.5;
}

.menu-item .material-symbols-outlined {
  font-size: var(--icon-size-sm);
  color: var(--text);
  opacity: 0.5;
}

.menu-label {
  white-space: nowrap;
}


/* SELECT Mode */
body.select-mode-active .inline-prediction {
  cursor: pointer;
  touch-action: none;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--modal-overlay);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
}

.modal.visible {
  display: flex;
}

.modal-content {
  background: var(--modal-background);
  border: 1px solid var(--modal-border);
  border-radius: 16px;
  padding: 48px;
  max-width: 500px;
  position: relative;
  box-shadow: var(--modal-shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.settings-modal .settings-panel {
  width: min(900px, 90vw);
  background: var(--modal-background);
  border: 1px solid var(--modal-border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--modal-shadow);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settings-panel-header h3 {
  font-size: 22px;
  margin-bottom: 4px;
}

.settings-panel-header p {
  color: var(--ghost);
  font-size: var(--font-body-small-size);
}

.settings-close-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.settings-panel-body {
  display: flex;
  gap: 24px;
  min-height: 320px;
}

.settings-nav {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-nav-btn {
  border: none;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 14px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  cursor: pointer;
}

.settings-nav-btn.active {
  background: rgba(var(--text-rgb), 0.08);
}

.settings-content {
  flex: 1;
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-section {
  display: none;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--modal-border);
  background: rgba(var(--text-rgb), 0.02);
}

.settings-section.active {
  display: block;
}

.settings-section h4 {
  margin-bottom: 12px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(var(--text-rgb), 0.08);
}

.settings-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.settings-row small {
  color: var(--ghost);
}

.settings-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

#accent-select {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--modal-border);
  background: transparent;
  color: var(--text);
}

@media (max-width: 900px) {
  .settings-panel-body {
    flex-direction: column;
  }

  .settings-nav {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .settings-nav-btn {
    flex: 1 1 calc(50% - 8px);
  }
}

/* Subscription Styles */
.subscription-card {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.05), rgba(var(--accent-rgb), 0.02));
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.subscription-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.subscription-header h5 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.subscription-price {
  color: var(--ghost);
  font-size: 14px;
  margin: 0;
}

.subscription-badge {
  background: var(--accent);
  color: var(--text-btn);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.subscription-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.feature-row span {
  color: var(--ghost);
}

.feature-row strong {
  color: var(--text);
  font-weight: 500;
}

.container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  min-height: 100vh;
  padding: 100px 20px 80px 20px;
}

.editor-wrapper {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  align-items: flex-start;
  padding-top: 0;
  padding-bottom: 80px;
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
}

/* Inline prediction - appears directly in editor */
.inline-prediction {
  display: inline;
  font-family: 'Google Sans Flex', sans-serif;
  font-optical-sizing: auto;
  font-weight: var(--font-body-weight);
  color: var(--text-prediction);
  cursor: pointer;
  /* Prevent editing the prediction text */
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-modify: read-only;
  pointer-events: auto;
  /* Prevent contenteditable=false from creating block context */
  white-space: pre-wrap;
  word-break: normal;
}

/* Highlighted part (on hover) */
.inline-prediction .prediction-accept {
  color: var(--text);
}

/* Non-highlighted part */
.inline-prediction .prediction-remain {
  color: var(--text-prediction);
}

.word-fade {
  display: inline;
  opacity: 0;
  animation: word-fade-in 0.3s ease-out forwards;
}

@keyframes word-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


body.select-mode-active .inline-prediction .prediction-accept {
  color: var(--text);
  background: transparent;
  padding: 0;
  border-radius: 0;
}

body.mobile-touch:not(.select-mode-active) .inline-prediction {
  cursor: default;
  touch-action: pan-y;
}

/* Editable layer - on top */
.editor {
  position: relative;
  width: 100%;
  min-height: 200px;
  font-family: 'Google Sans Flex', sans-serif;
  font-optical-sizing: auto;
  font-size: var(--font-h1-size);
  line-height: 1.4;
  color: var(--text);
  background: transparent;
  outline: none;
  white-space: pre-wrap;
  word-break: normal;
  hyphens: none;
  caret-color: var(--accent);
  font-weight: var(--font-body-weight);
}

.editor h1 {
  font-family: "Google Sans Flex", "Inter", Georgia, sans-serif;
  font-optical-sizing: auto;
  font-size: var(--font-h1-size);
  font-weight: var(--font-h1-weight);
  margin-bottom: 0.5em;
}

.editor h2 {
  font-family: "Google Sans Flex", "Inter", Georgia, sans-serif;
  font-optical-sizing: auto;
  font-size: var(--font-h2-size);
  font-weight: var(--font-h2-weight);
  margin-bottom: 0.4em;
}

.editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(var(--text-rgb), 0.3);
  pointer-events: none;
}

.select-confirm-btn {
  width: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: width 0.3s ease, opacity 0.3s ease, margin 0.3s ease, background 0.2s;
  padding: 0;
  background: var(--accent);
  color: var(--text-btn);
  margin: 0;
}

.select-confirm-btn .material-symbols-outlined {
  color: var(--text-btn);
}

body.select-mode-active .select-confirm-btn {
  width: 48px;
  opacity: 1;
  pointer-events: auto;
  margin-left: 3px;
  background: var(--accent);
  color: var(--text-btn);
}

body.selection-ready .select-confirm-btn {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .container {
    padding: 100px 40px 80px 40px;
  }

  .editor-wrapper {
    grid-column: 1 / -1;
    max-width: 100%;
    width: 100%;
    min-width: 0;
  }

  .menu-content {
    top: 54px;
    right: 20px;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, 80vw);
    transform: translateX(-100%);
    box-shadow: none;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-sidebar-mobile);
  }

  .app-main {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    background: var(--background);
  }

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

  body.sidebar-open .app-main {
    transform: translateX(min(320px, 80vw));
  }

  .header,
  .header-gradient-overlay {
    left: 0;
    right: 0;
    width: auto;
  }

  #menu-btn {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.sidebar-open #menu-btn {
    opacity: 0;
    pointer-events: none;
    width: 0;
    margin: 0;
    margin-right: -8px;
    /* Negate the gap */
    padding: 0;
  }
}

@media (min-width: 1025px) {

  /* Hide header menu button when sidebar is expanded (not collapsed) */
  body:not(.sidebar-collapsed) #menu-btn {
    opacity: 0;
    pointer-events: none;
    width: 0;
    margin: 0;
    margin-right: -8px;
    /* Negate the gap */
    padding: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --font-body-small-size: 16px;
    --font-caption-size: 14px;
    --size-icon-btn-sm: 44px;
    --icon-size-sm: 28px;
  }

  .sidebar {
    box-shadow: none;
  }

  .header {
    height: 60px;
    padding: 0 10px;
    background: var(--background);
  }

  .header-left {
    gap: 8px;
  }

  .sidebar-item,
  .sidebar-account-name,
  .sidebar-create-btn,
  .sidebar-valley-title {
    font-size: var(--font-body-size);
  }

  .sidebar-top {
    gap: 16px;
  }

  .sidebar-valleys {
    gap: 4px;
  }

  /* Menu overlay adjustments for mobile */
  .menu-content {
    top: 54px;
    right: 20px;
  }

  .menu-close-btn {
    right: 10px;
  }

  .menu-item {
    font-size: var(--font-body-size);
  }

  .modal {
    padding: 20px;
  }

  .modal-content {
    width: 100%;
    max-width: 440px;
    height: auto;
    max-height: 90vh;
    border-radius: 24px;
    background: var(--modal-background);
    border: 1px solid var(--modal-border);
    box-shadow: var(--modal-shadow);
    padding: 32px 24px;
    margin: auto;
    overflow-y: auto;
  }

  /* Context modal not full width on mobile anymore */
  .modal-content.context-modal-content {
    max-width: calc(100vw - 40px);
    min-width: unset;
    width: 100%;
    height: auto;
    max-height: 90vh;
    border-radius: 24px;
    padding: 0;
    background: var(--modal-background);
    border: 1px solid var(--modal-border);
    box-shadow: var(--modal-shadow);
  }

  /* Image guidance modal on mobile - floating centered */
  .modal-content.image-guidance-modal-content {
    width: calc(100vw - 40px);
    max-width: 400px;
    height: auto;
    border-radius: 16px;
    padding: 0;
    background: var(--background);
  }

  .image-guidance-header {
    display: flex;
  }

  .image-guidance-title {
    display: block;
  }


  .modal-content p:not(.section-description),
  .modal-content ol {
    line-height: 1.4;
  }

  .modal-close {
    top: 16px;
    right: 16px;
  }

  .container {
    padding: 100px 20px 80px 20px;
  }

  .editor-wrapper {
    grid-column: 1 / 13;
    padding-top: 0;
    align-items: flex-start;
    width: 100%;
  }

  .editor {
    font-size: var(--font-h2-size);
    text-align: left;
    width: 100%;
    word-break: normal;
    hyphens: none;
  }
}

@media (min-width: 1025px) {
  .app-main {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    flex-shrink: 0;
    transform: translateX(0);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .header,
  .header-gradient-overlay {
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* When sidebar is collapsed on desktop */
  body.sidebar-collapsed .app-main {
    margin-left: 0;
  }

  body.sidebar-collapsed .header,
  body.sidebar-collapsed .header-gradient-overlay {
    left: 0;
    width: 100%;
  }

  body.sidebar-collapsed .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
    pointer-events: none;
  }

  /* Show menu button only when sidebar is collapsed on desktop, logo always visible */
  #menu-btn {
    width: 48px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
  }

  .header-logo {
    opacity: 1;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.sidebar-collapsed #menu-btn {
    opacity: 1;
    pointer-events: auto;
    width: 48px;
  }
}

/* Visually hidden but still functional for iOS file inputs */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Donate Button */
.modal-donate {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(var(--text-rgb), 0.1);
  text-align: center;
}

.donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #FFDD00;
  color: #000;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 300;
  font-size: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.donate-btn span {
  font-size: 20px;
}

/* Context Modal - New Design */
.context-modal-content {
  min-width: 440px;
  max-width: 440px;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-radius: 30px;
  background: var(--modal-background);
  border: 1px solid var(--modal-border);
  box-shadow: var(--modal-shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.context-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 20px;
  flex-shrink: 0;
}

.header-spacer {
  width: 48px;
}

.context-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
}

.context-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  padding: 0;
}

.context-modal-close .material-symbols-outlined {
  font-size: var(--icon-size-sm);
  color: var(--text);
}

.context-modal-body {
  padding: 0 40px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  overflow-y: auto;
}

.context-modal-header.close-only {
  justify-content: flex-end;
  padding: 0 4px 0 0;
}

/* Not full width modal on tablets and mobile anymore */
@media (max-width: 1024px) {
  .modal-content.context-modal-content {
    max-width: calc(100vw - 40px);
    min-width: unset;
    width: 440px;
    height: auto;
    max-height: 90vh;
    border-radius: 24px;
    background: var(--modal-background);
    border: 1px solid var(--modal-border);
    box-shadow: var(--modal-shadow);
    margin: auto;
  }

  .context-modal-header {
    padding: 0 10px;
  }
}

.context-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: -4px;
}

.section-title {
  font-size: var(--font-body-size);
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}

.section-description {
  font-size: var(--font-body-size);
  font-weight: var(--font-body-weight);
  color: var(--ghost);
  margin: 0;
  line-height: 1.4;
}

.section-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rules-status {
  margin-left: auto;
  font-size: var(--font-caption-size);
  font-weight: var(--font-caption-weight);
  color: var(--accent);
}

.rules-status:empty {
  display: none;
}

/* Primary Button (Accent colored per Figma) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 28px;
  height: 58px;
  font-size: var(--font-body-small-size);
  font-weight: 400;
  font-family: 'Google Sans Flex', sans-serif;
  color: var(--text-btn);
  background: var(--btn-primary-bg, var(--btn-background));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

/* When btn-primary has an icon, adjust left padding */
.btn-primary:has(.material-symbols-outlined) {
  padding-left: 18px;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary .material-symbols-outlined {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: var(--text-btn);
}

.btn-primary:hover {
  opacity: 0.9;
}

/* Secondary Button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 28px;
  height: 58px;
  font-size: var(--font-body-small-size);
  font-weight: 400;
  font-family: 'Google Sans Flex', sans-serif;
  color: var(--btn-secondary-text);
  background: var(--btn-secondary-bg);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s;
}

/* When btn-secondary has an icon, adjust left padding */
.btn-secondary:has(.material-symbols-outlined) {
  padding-left: 18px;
}

.btn-secondary:hover {
  opacity: 0.7;
}

.btn-secondary .material-symbols-outlined {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: var(--text);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Button Small - 40px height, 20px horizontal padding */
.btn-sm {
  height: 40px;
  padding: 0 20px;
  font-size: var(--font-body-small-size);
}

/* Button Small can be combined with primary or secondary */
.btn-sm.btn-primary,
.btn-sm.btn-secondary {
  height: 40px;
  padding: 0 20px;
}

.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  height: 48px;
  font-size: var(--font-body-size);
  font-weight: 500;
  font-family: inherit;
  color: var(--btn-dark-text);
  background: var(--btn-dark);
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: opacity 0.2s;
}

@media (hover: hover) {
  .btn-dark:hover {
    opacity: 0.85;
  }
}

/* Textarea */
#context-textarea {
  width: 100%;
  height: 153px;
  padding: 12px;
  background: var(--input-background);
  border: 1px solid var(--modal-border);
  border-radius: 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 17px;
  font-weight: 300;
  resize: none;
  box-sizing: border-box;
  line-height: 1.4;
  transition: border-color 0.2s;
}

#context-textarea:focus {
  outline: none;
  border-color: var(--text);
}

#context-textarea::placeholder {
  color: var(--ghost);
  font-size: var(--font-body-size);
  font-weight: 300;
}

/* File List */
.context-file {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 12px;
  background: var(--input-background);
  border-radius: 16px;
  box-sizing: border-box;
}

.context-file-name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-caption-size);
  font-weight: var(--font-caption-weight);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
  min-width: 0;
}

.context-file-name .material-symbols-outlined {
  font-size: var(--icon-size-sm);
  flex-shrink: 0;
}

.context-file-remove {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

@media (hover: hover) {
  .context-file-remove:hover {
    opacity: 0.7;
  }
}

.context-file-remove .material-symbols-outlined {
  font-size: var(--icon-size-sm);
}

.context-status {
  font-size: var(--font-caption-size);
  font-weight: var(--font-caption-weight);
  color: var(--accent);
}

.context-status:empty {
  display: none;
}

/* Context indicator in menu button */
.context-menu-btn.has-context .menu-label::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
}

/* Projects List */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.projects-list:empty+.projects-empty {
  display: block;
}

.projects-list:not(:empty)+.projects-empty {
  display: none;
}

.projects-empty {
  display: block;
  text-align: center;
  padding: 40px 0;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 48px;
  padding: 12px;
  background: var(--input-background);
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  position: relative;
  overflow: hidden;
}

@media (hover: hover) {
  .project-item:hover {
    background: var(--background);
  }
}

.project-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: padding-right 0.3s ease;
}

.project-item-title {
  font-size: var(--font-body-small-size);
  font-weight: var(--font-body-small-weight);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.project-item-date {
  font-size: var(--font-caption-size);
  font-weight: var(--font-caption-weight);
  color: var(--ghost);
}

.project-item-delete {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
  position: absolute;
  right: 12px;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

@media (hover: hover) {
  .project-item:hover .project-item-delete {
    opacity: 0.5;
    transform: translateX(0);
    pointer-events: auto;
  }

  .project-item:hover .project-item-content {
    padding-right: 32px;
  }

  .project-item-delete:hover {
    opacity: 1;
  }
}

.project-item-delete .material-symbols-outlined {
  font-size: var(--icon-size-sm);
}

/* Image Guidance Modal */
.image-guidance-modal-content {
  max-width: 440px;
  width: 440px;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-radius: 30px;
  background: var(--modal-background);
  border: 1px solid var(--modal-border);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: var(--modal-shadow);
}

.image-guidance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 16px;
  flex-shrink: 0;
}

.image-guidance-title {
  font-size: var(--font-body-size);
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.image-guidance-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  padding: 12px;
}

.image-guidance-close .material-symbols-outlined {
  font-size: var(--icon-size-sm);
  color: var(--text);
}

.image-guidance-body {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 0 40px 40px 40px;
}

.image-guidance-body.unauth-view {
  text-align: center;
}

#image-guidance-textarea {
  width: 100%;
  height: 153px;
  padding: 12px;
  background: var(--input-background);
  border: 1px solid var(--modal-border);
  border-radius: 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 17px;
  font-weight: 300;
  resize: none;
  box-sizing: border-box;
  line-height: 1.4;
  transition: border-color 0.2s;
}

#image-guidance-textarea:focus {
  outline: none;
  border-color: var(--text);
}

#image-guidance-textarea::placeholder {
  color: var(--ghost);
  font-size: var(--font-body-size);
  font-weight: 300;
}

.image-guidance-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.image-guidance-field label {
  font-size: var(--font-body-small-size);
  font-weight: 500;
  color: var(--ghost);
  padding-left: 4px;
}

.image-style-select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--input-background);
  border: none;
  border-radius: 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 300;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 -960 960 960' width='24'%3E%3Cpath d='M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  outline: none;
}

.image-guidance-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.image-guidance-buttons #skip-guidance-btn {
  background: transparent;
  border: none;
  padding: 12px 20px;
}

/* Floating Editor Toolbar */
.editor-toolbar {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  padding: 6px;
  background: var(--input-background);
  border-radius: 12px;
  z-index: var(--z-fab);
  box-shadow: var(--menu-shadow);
  align-items: center;
  width: fit-content;
}

/* Toast notification above toolbar */
.toolbar-toast {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--modal-background);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: var(--font-body-small-size);
  font-weight: 400;
  z-index: calc(var(--z-fab) + 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toolbar-toast.visible {
  opacity: 1;
}

.toolbar-btn {
  width: 48px;
  height: 48px;
  border: none;
  background: var(--modal-background);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s, width 0.3s ease, margin 0.3s ease;
  color: var(--text);
  padding: 0;
  flex-shrink: 0;
  margin: 0 3px;
}

.toolbar-btn:first-child {
  margin-left: 0;
}

.toolbar-btn:last-child {
  margin-right: 0;
}

.toolbar-btn:hover {
  background: var(--background);
}

.toolbar-btn .material-symbols-outlined {
  font-size: 24px;
}

.toolbar-btn.active {
  background: var(--accent);
  color: #141319;
}

.toolbar-btn.active .material-symbols-outlined {
  color: #141319;
}

.toolbar-btn.disabled {
  opacity: 0.5;
}

/* Adjust layout when sidebar is expanded on desktop to keep toolbar centered in editor area */
@media (min-width: 1025px) {
  .editor-toolbar {
    left: calc(var(--sidebar-width) + (100% - var(--sidebar-width)) / 2);
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.sidebar-collapsed .editor-toolbar {
    left: 50%;
  }
}

@media (max-width: 768px) {
  .editor-toolbar {
    bottom: 40px;
  }
}

@media (max-width: 1024px) {
  .editor-toolbar {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.sidebar-open .editor-toolbar {
    transform: translateX(calc(-50% + min(320px, 80vw)));
  }
}

/* Inline images in editor */
.editor-image-container {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 20px 0;
  line-height: 0;
}

@media (hover: hover) {
  .editor-image-container:hover .editor-image-remove {
    opacity: 1;
  }
}

.editor-image-container.show-remove .editor-image-remove {
  opacity: 1;
}

.editor-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

/* Broken image state */
.editor-image-container.is-broken {
  width: 100%;
  height: 180px;
  background: var(--input-background);
  border: 1px dashed var(--modal-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  color: var(--ghost);
  text-align: center;
  cursor: pointer;
}

.editor-image-container.is-broken .editor-image {
  display: none;
}

.editor-image-container.is-broken::before {
  content: "sentiment_dissatisfied";
  font-family: 'Material Symbols Outlined';
  font-size: 32px;
}

.editor-image-container.is-broken::after {
  content: "Oops! This image moved to a better place... (It expired)";
  font-family: 'Google Sans Flex', sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.4;
}

.editor-image-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: var(--background);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.editor-image-remove .material-symbols-outlined {
  font-size: 18px;
  color: var(--text);
  width: auto;
  height: auto;
  line-height: 1;
}

/* Loading state for create image button */
.create-image-btn.loading {
  opacity: 0.5;
  pointer-events: none;
}

.create-image-btn.loading .material-symbols-outlined {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Image generation loading placeholder */
.image-loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 200px;
  background: var(--input-background);
  border-radius: 16px;
  margin: 20px 0;
  color: var(--ghost);
  font-size: var(--font-body-small-size);
}

.image-loading-placeholder .material-symbols-outlined {
  font-size: 24px;
  margin-right: 8px;
  animation: spin 1s linear infinite;
}

/* Auth Modal Styles */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-radius: 14px;
  background: rgba(var(--text-rgb), 0.04);
  padding: 4px;
  border: 1px solid rgba(var(--text-rgb), 0.04);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ghost);
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  .auth-tab:hover:not(.active) {
    color: var(--text);
  }
}

.auth-tab.active {
  background: var(--modal-background);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(var(--text-rgb), 0.04);
}

.auth-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  background: rgba(var(--text-rgb), 0.04);
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 0;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.auth-input:focus {
  outline: none;
  background: var(--input-background);
  border-color: var(--text-muted);
}

.auth-input::placeholder {
  color: var(--ghost);
}

.auth-error {
  color: var(--color-danger);
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 12px;
  text-align: center;
  padding: 8px;
  border-radius: 10px;
  background: rgba(231, 76, 60, 0.08);
}

.auth-error:empty {
  display: none;
}

.auth-error.success {
  color: var(--accent);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(var(--text-rgb), 0.1);
}

.auth-divider span {
  padding: 0 16px;
  color: var(--ghost);
  font-size: var(--font-caption-size);
}

/* Account Modal Styles */
.account-buttons {
  flex-direction: column;
  gap: 10px;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  height: 48px;
  font-size: var(--font-body-size);
  font-weight: var(--font-body-weight);
  font-family: inherit;
  color: var(--color-danger);
  background: transparent;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

/* ============================================
   Files Modal - Drop Zone Style
   ============================================ */
.files-modal-content {
  min-width: 440px;
  max-width: 560px;
  padding: 0;
  overflow: hidden;
  position: relative;
  border-radius: 30px;
  background: var(--modal-background);
  border: 1px solid var(--modal-border);
  box-shadow: var(--modal-shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.files-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--background);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text);
  z-index: 1;
  transition: opacity 0.2s;
}

@media (hover: hover) {
  .files-modal-close:hover {
    opacity: 0.7;
  }
}

.files-bottom-sheet {
  position: relative;
}

.files-sheet-handle {
  padding: 12px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  position: relative;
  z-index: 2;
}

.files-bottom-sheet .files-dropzone {
  border-bottom: none;
  margin: 0;
  border-radius: 0;
  padding: 40px 20px;
  border: none;
  background: transparent;
  box-shadow: none;
}

.files-dropzone {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: transparent;
  border: none;
  transition: background 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 1;
}

.files-bottom-sheet {
  position: relative;
  overflow: hidden;
}

.files-bottom-sheet::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 260px;
  background: transparent;
  border-radius: inherit;
  z-index: 0;
}

.files-dropzone.drag-active {
  background: rgba(146, 70, 255, 0.08);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.08);
}

.files-dropzone-icon {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.files-dropzone-icon .material-symbols-outlined {
  font-size: 40px;
  width: auto;
  height: auto;
  line-height: 1;
  color: var(--text-btn);
}

.files-dropzone-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.files-dropzone-text {
  font-size: var(--font-body-size);
  color: var(--ghost);
  margin-bottom: 20px;
}

/* File List */
.files-list {
  padding: 20px;
}

.files-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.files-list-title {
  font-size: var(--font-body-size);
  font-weight: 600;
  color: var(--text);
}

.files-list-count {
  font-size: var(--font-caption-size);
  color: var(--ghost);
  background: var(--input-background);
  padding: 4px 12px;
  border-radius: 12px;
}

.files-list-empty {
  text-align: center;
  padding: 20px;
  color: var(--ghost);
  font-size: var(--font-body-size);
}

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.1);
}

.file-row:last-child {
  border-bottom: none;
}

.file-thumb {
  width: 40px;
  height: 40px;
  background: var(--input-background);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-thumb .material-symbols-outlined {
  font-size: 20px;
  color: var(--accent);
}

.file-details {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: var(--font-body-size);
  font-weight: 400;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-icon-small {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--accent);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-icon-small:hover {
  opacity: 1;
  background: rgba(var(--accent-rgb), 0.15);
}

.btn-icon-small .material-symbols-outlined {
  font-size: 16px;
}

.file-meta {
  font-size: var(--font-caption-size);
  color: var(--ghost);
  margin-top: 2px;
}

.file-delete {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ghost);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.file-delete .material-symbols-outlined {
  font-size: 20px;
}

@media (hover: hover) {
  .file-delete:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--color-danger);
  }
}

/* ============================================
   Rules Modal
   ============================================ */
.rules-modal-content {
  min-width: 440px;
  max-width: 440px;
  padding: 0;
  overflow: hidden;
  border-radius: 30px;
  background: var(--modal-background);
  border: 1px solid var(--modal-border);
  box-shadow: var(--modal-shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.rules-modal-body {
  padding: 0 40px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.rules-description {
  font-size: var(--font-body-size);
  color: var(--ghost);
  margin-bottom: 20px;
  line-height: 1.5;
}

.rules-textarea {
  width: 100%;
  min-height: 180px;
  padding: 16px;
  background: var(--input-background);
  border: 1px solid var(--modal-border);
  border-radius: 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 17px;
  font-weight: 300;
  resize: none;
  line-height: 1.5;
  transition: border-color 0.2s;
}

.rules-textarea:focus {
  outline: none;
  border-color: var(--text);
}

.rules-textarea::placeholder {
  color: var(--placeholder);
}

.rules-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  align-items: center;
}

.rules-status {
  margin-left: auto;
  font-size: var(--font-caption-size);
  color: var(--accent);
}

/* ============================================
   Bottom Sheet (Mobile)
   ============================================ */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay);
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.bottom-sheet-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 5px;
  right: 5px;
  background: var(--modal-background);
  border: 1px solid var(--modal-border);
  border-radius: 32px 32px 0 0;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  box-shadow: var(--modal-shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.bottom-sheet-overlay.visible .bottom-sheet {
  transform: translateY(0);
}

.bottom-sheet-handle {
  padding: 12px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.bottom-sheet-handle-bar {
  width: 36px;
  height: 4px;
  background: rgba(var(--text-rgb), 0.2);
  border-radius: 2px;
}

.bottom-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
  flex-shrink: 0;
}

.bottom-sheet-title {
  font-size: var(--font-h2-size);
  font-weight: 600;
  color: var(--text);
}

.bottom-sheet-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-sheet-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Bottom sheet dropzone - more compact */
.bottom-sheet .files-dropzone {
  min-height: 160px;
  padding: 24px;
}

.bottom-sheet .files-dropzone-icon {
  width: 60px;
  height: 60px;
}

.bottom-sheet .files-dropzone-icon .material-symbols-outlined {
  font-size: 28px;
}

.bottom-sheet .files-dropzone-title {
  font-size: 18px;
}

.bottom-sheet .files-dropzone-text {
  display: none;
}

/* Bottom sheet rules */
.bottom-sheet .rules-modal-body {
  padding: 0 20px 20px;
}

.bottom-sheet .rules-textarea {
  min-height: 200px;
}

/* ============================================
   Responsive: Desktop vs Mobile modals
   ============================================ */
/* Desktop: Show modals, hide bottom sheets */
@media (min-width: 769px) {
  .bottom-sheet-overlay {
    display: none !important;
  }
}

/* Mobile: Hide desktop modals for files/rules, show bottom sheets */
@media (max-width: 768px) {

  #files-modal,
  #rules-modal {
    display: none !important;
  }
}

/* User Menu (Top Right) */
.user-menu-content {
  position: absolute;
  top: 72px;
  right: 24px;
  bottom: auto;
  left: auto;
  transform-origin: top right;
  width: 240px;
  min-width: auto;
  max-width: none;
  transform: scale(0.9) translateY(-8px);
}

@media (max-width: 1024px) {
  .user-menu-content {
    width: 240px;
    right: 24px;
    left: auto;
    bottom: auto;
    top: 72px;
  }
}

.menu-overlay.menu-ready .user-menu-content {
  transform: scale(1) translateY(0);
}

/* ============================================
   Right Side Menu Panel
   ============================================ */
.side-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.side-menu-open .side-menu-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.side-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  background: var(--modal-background);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.side-menu::-webkit-scrollbar {
  display: none;
}

body.side-menu-open .side-menu {
  transform: translateX(0);
}

.side-menu-resizer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
  cursor: ew-resize;
  z-index: 10;
  transition: background 0.2s;
}

.side-menu-resizer:hover {
  background: rgba(var(--accent-rgb), 0.2);
}

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 60px;
  margin-top: -24px;
  margin-right: -12px;
  margin-bottom: -24px;
  flex-shrink: 0;
}

.sidebar-favicon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.side-menu-close {
  width: 32px;
  height: 32px;
}

.side-menu-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.side-menu-section-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-menu-title {
  font-family: 'Literata', Georgia, serif;
  font-size: 24px;
  font-weight: 300;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}

.side-menu-description {
  font-family: 'Google Sans Flex', sans-serif;
  font-size: var(--font-body-small-size);
  font-weight: 300;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}

.side-menu-files-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-menu-files-list:empty {
  display: none;
}

.side-menu-tokens {
  font-family: 'Google Sans Flex', sans-serif;
  font-size: var(--font-caption-size);
  font-weight: 300;
  color: var(--ghost);
  padding: 0 4px;
}

.side-menu-file {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 12px;
  background: var(--input-background);
  border-radius: 16px;
  position: relative;
}

.side-menu-file-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.side-menu-file-icon .material-symbols-outlined {
  font-size: 24px;
  color: var(--text);
}

.side-menu-file-name {
  flex: 1;
  font-family: 'Google Sans Flex', sans-serif;
  font-size: var(--font-body-small-size);
  font-weight: 300;
  color: var(--text);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  transition: padding-right 0.3s ease;
}

.side-menu-file-remove {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: absolute;
  right: 12px;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.side-menu-file-remove .material-symbols-outlined {
  font-size: 24px;
  color: var(--text);
}

/* Desktop: show on hover */
@media (hover: hover) {
  .side-menu-file:hover .side-menu-file-remove {
    opacity: 0.5;
    transform: translateX(0);
    pointer-events: auto;
  }

  .side-menu-file:hover .side-menu-file-name {
    padding-right: 28px;
  }

  .side-menu-file-remove:hover {
    opacity: 1 !important;
  }
}

/* Mobile: always show */
@media (hover: none) {
  .side-menu-file-remove {
    opacity: 0.5;
    transform: translateX(0);
    pointer-events: auto;
  }

  .side-menu-file-name {
    padding-right: 28px;
  }
}

.side-menu-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-menu-buttons .btn-primary {
  height: 48px;
  padding: 14px 28px;
}

.side-menu-buttons .btn-primary:has(.material-symbols-outlined) {
  padding-left: 18px;
}

.side-menu-buttons .btn-secondary {
  height: 54px;
  padding: 12px 20px;
}

.side-menu-textarea {
  width: 100%;
  height: 140px;
  padding: 12px;
  background: var(--input-background);
  border: 1px solid var(--modal-border);
  border-radius: 16px;
  color: var(--text);
  font-family: 'Google Sans Flex', sans-serif;
  font-size: 17px;
  font-weight: 300;
  resize: none;
  line-height: 1.4;
  transition: border-color 0.2s;
}

.side-menu-textarea:focus {
  outline: none;
  border-color: var(--text);
}

.side-menu-textarea::placeholder {
  color: var(--placeholder);
  opacity: 0.5;
}

/* Shared Input Surface Component */
.input-surface {
  width: 100%;
  background: var(--input-background);
  color: var(--text);
  border: 1px solid var(--modal-border);
  border-radius: var(--radius-sm);
  /* 12px */
  transition: border-color 0.2s;
}

.input-surface:focus-within,
.input-surface:focus {
  outline: none;
  border-color: var(--text);
}

.custom-dropdown {
  position: relative;
  width: 100%;
}

.custom-dropdown-trigger {
  /* Inherit input-surface styles manually */

  width: 100%;
  background: var(--input-background);
  color: var(--text);
  border: 1px solid var(--modal-border);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s;
  text-align: left;
}

.custom-dropdown-trigger:focus {
  outline: none;
  border-color: var(--text);
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--modal-background);
  border: 1px solid var(--modal-border);
  border-radius: 12px;
  padding: 8px;
  z-index: 100;
  display: none;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--modal-shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.custom-dropdown.active .custom-dropdown-menu {
  display: flex;
}

.custom-dropdown-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
  color: var(--text);
}

.custom-dropdown-item:hover {
  background: rgba(var(--text-rgb), 0.05);
}

.custom-dropdown-item.selected {
  background: var(--active-valley-bg);
  color: var(--btn-primary-bg);
}

/* Side Menu Mobile */
@media (max-width: 768px) {
  .side-menu {
    width: 100% !important;
    max-width: none !important;
    padding: 24px;
    transform: translateX(100%);
    /* Maintain off-screen state */
  }

  .side-menu-resizer {
    display: none;
    /* No resizing on mobile */
  }

  .side-menu-backdrop {
    background: rgba(0, 0, 0, 0.5);
    z-index: 400;
  }
}

/* ===========================================
   BRAIN PANEL STYLES (Unified Context Management)
   =========================================== */

/* Brain Panel Container */
/* Brain Panel Layout */
.brain-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
  height: 100%;
  /* Ensure it fills parent */
  overflow: hidden;
  /* Contain scroll */
}

.brain-header {
  padding: var(--space-xl) var(--space-xl) var(--space-base) var(--space-xl);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brain-title {
  font-size: var(--font-h2-size);
  font-weight: 500;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.brain-title .material-symbols-outlined {
  font-size: var(--icon-size-sm);
  color: var(--accent);
}

/* Scrollable Anchor List */
.brain-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--space-xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
}

/* Empty State */
.brain-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--ghost);
  text-align: center;
  gap: var(--space-xl);
  opacity: 0.6;
  padding: 0 var(--space-lg);
}

.brain-empty-state .material-symbols-outlined {
  font-size: 48px;
  opacity: 0.5;
}

.brain-empty-state p {
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

/* Anchor Card (Stacked Item) */
.brain-anchor-card {
  background: rgba(var(--text-rgb), 0.02);
  border: 1px solid var(--modal-border);
  border-radius: var(--radius-sm);
  padding: 12px 40px 12px 12px;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48px;
}

.brain-anchor-card:hover {
  background: rgba(var(--text-rgb), 0.04);
  border-color: rgba(var(--text-rgb), 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.brain-anchor-summary {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
  white-space: pre-wrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.anchor-remove-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  padding: 0;
}

.brain-anchor-card:hover .anchor-remove-btn {
  opacity: 1;
}

.anchor-remove-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.anchor-remove-btn .material-symbols-outlined {
  font-size: 18px;
}

/* Fixed Input Area */
.brain-input-area {
  flex-shrink: 0;
  background: var(--modal-background);
  /* Use modal background for contrast if needed, or normal bg */
  padding: var(--space-lg) var(--space-xl) 40px var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  z-index: 10;
}

/* Input Container - The "Pill" */
.brain-input-container {
  /* Reuse input styles */
  background: var(--input-background);
  border: 1px solid var(--modal-border);
  border-radius: 30px;
  padding: 8px 8px 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s;
}

.brain-input-container:focus-within {
  border-color: var(--text);
  box-shadow: none;
  /* Matches dropdown behavior */
}

/* Attachment Preview */
.brain-attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
  padding-right: 8px;
  /* Alignment */
}




/* Ensure empty preview takes no space */
.brain-attachment-preview:empty {
  display: none;
}

.attachment-chip {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  padding: 6px var(--space-sm) 6px var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.attachment-chip .attachment-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Input Controls (Textarea + Buttons) */
.brain-input-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
}

.brain-textarea {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 0;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  resize: none;
  max-height: 120px;
  min-height: 24px;
  /* Height of one line */
  outline: none;
}

.brain-textarea::placeholder {
  color: var(--ghost);
}

.brain-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon-primary {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--text-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3);
}

.btn-icon-primary .material-symbols-outlined {
  color: var(--text-btn);
}

.btn-icon-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.4);
}

.btn-icon-primary:active {
  transform: scale(0.95);
}

.btn-icon-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: var(--ghost);
}

.brain-attach-btn {
  color: var(--ghost);
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  transition: all 0.2s;
}

.brain-attach-btn:hover {
  color: var(--text);
  background: rgba(var(--text-rgb), 0.05);
}

/* Loading Overlay for Processing */
.brain-processing-overlay {
  position: absolute;
  inset: 0;
  background: rgba(var(--background-rgb), 0.8);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  gap: 16px;
}

.brain-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(var(--accent-rgb), 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.brain-processing-text {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

/* =========================================
   DASHBOARD VIEW STYLES
   ========================================= */

.view-container {
  width: 100%;
  min-height: 100vh;
  background: var(--background);
  transition: opacity 0.2s ease;
}

/* Dashboard Header */
.dashboard-header {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--background);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-logo {
  height: 26px;
  width: auto;
}

.logo-text {
  font-family: 'Google Sans Flex', sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
}

.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin-left: 12px;
}

.user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--btn-background);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* Dashboard Content */
.dashboard-content {
  padding: 40px 48px 48px 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-controls {
  margin: 32px 0 48px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.view-selector {
  display: flex;
  gap: 24px;
}

.view-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Google Sans Flex', sans-serif;
  font-size: 16px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-tab.active {
  color: var(--text-btn);
  background: var(--accent);
}

.dashboard-section-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-weight: 500;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Project Card */
.project-card {
  aspect-ratio: 4/3;
  background: var(--background-surface);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}


.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  background: #2a2933;
  border-color: rgba(255, 255, 255, 0.1);
}


/* Create Card Variant */
.create-card {
  background: transparent;
  /* Override project-card for transparent background */
  align-items: center;
  justify-content: center;
  gap: 16px;
}



.create-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.03);
  /* Subtle hover background */
}

.create-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--btn-primary-bg);
  /* Primary Button Style */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--btn-primary-text);
  /* Dark Text (#141319) */
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.create-icon-wrapper .material-symbols-outlined {
  color: var(--btn-primary-text);
  /* Enforce dark color on icon */
}

.create-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

/* Valley Card Content */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-emoji {
  font-size: 32px;
  cursor: pointer;
  transition: transform 0.2s ease;
  user-select: none;
}

.card-emoji:hover {
  transform: scale(1.2);
}

.card-menu-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
}

.project-card:hover .card-menu-btn {
  opacity: 1;
}

.card-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* Card Context Menu */
.card-context-menu {
  background: var(--modal-background);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.context-menu-item:hover {
  background: var(--sidebar-hover);
}

.context-menu-item .material-symbols-outlined {
  font-size: 20px;
}

.context-menu-item--danger {
  color: #ff4444;
}

.context-menu-item--danger:hover {
  background: rgba(255, 68, 68, 0.1);
}

/* Emoji Picker Dropdown */
.emoji-picker {
  background: var(--modal-background);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  z-index: 1001;
  width: 196px;
}

.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.emoji-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.emoji-btn:hover {
  background: var(--sidebar-hover);
  transform: scale(1.1);
}

/* Card Inline Editor */
.card-inline-editor {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-inline-input {
  flex: 1;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
}

.card-inline-input:focus {
  outline: none;
  border-color: var(--text-muted);
}

.card-inline-actions {
  display: flex;
  gap: 6px;
}

.card-inline-save,
.card-inline-cancel {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.card-inline-save {
  background: var(--accent);
  color: var(--text-btn);
}

.card-inline-save:hover {
  filter: brightness(1.1);
}

.card-inline-cancel {
  background: var(--sidebar-hover);
  color: var(--text-muted);
}

.card-inline-cancel:hover {
  color: var(--text);
}

.card-inline-save .material-symbols-outlined,
.card-inline-cancel .material-symbols-outlined {
  font-size: 18px;
}

.card-content {
  margin-top: auto;
}

.card-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* Editor Header Updates */
#back-to-dashboard-btn {
  margin-right: 16px;
  color: var(--text-muted);
}

.project-title-container {
  position: relative;
  display: flex;
  align-items: center;
}

.title-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  /* Ensure min width for empty state visibility */
  min-width: 60px;
}

.project-title-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-family: 'Google Sans Flex', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: transparent;
  /* Text is transparent, only caret visible on focus */
  background: transparent;
  border: none;
  padding: 0;
  /* Match display padding if any, here 0 */
  border-radius: 6px;
  caret-color: var(--text);
}

.project-title-input:focus {
  opacity: 1;
  background: transparent;
  cursor: text;
  outline: none;
  /* Removed outline, relying on cursor */
  color: var(--text);
  /* Make text visible on focus */
}

/* Hide display when input is focused to prevent double text */
.project-title-input:focus+.project-title-display,
.editing .project-title-display {
  opacity: 0;
}


/* Emoji Picker */
.emoji-picker-container {
  display: none;
}

.project-emoji-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-emoji-btn:hover {
  background-color: var(--surface-hover);
}

.project-emoji-display {
  font-size: 20px;
  line-height: 1;
}

.emoji-picker-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 12px;
  z-index: 1000;
  width: 320px;
  display: none;
  /* Glassmorphism fallback */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.emoji-picker-dropdown.visible {
  display: block;
  animation: popIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

.emoji-option {
  font-size: 20px;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  background: none;
  transition: transform 0.1s, background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-option:hover {
  background-color: var(--surface-hover);
  transform: scale(1.2);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.project-title-display {
  font-family: 'Google Sans Flex', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  white-space: pre;
  /* Preserve spaces */
  pointer-events: none;
}


/* Mobile Responsiveness */
@media (max-width: 768px) {
  .dashboard-content {
    padding: 24px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project-card {
    aspect-ratio: auto;
    /* Allow auto height */
    min-height: 180px;
  }

  .view-selector {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 8px;
  }
}

/* ============================================
   Auth Modal - Modern Google Style
   ============================================ */

/* Auth Modal Title */
.auth-modal-title {
  font-size: var(--font-h1-size);
  font-weight: var(--font-h1-weight);
  color: var(--text);
  margin: 0 0 20px 0;
  text-align: center;
}

/* Auth Form Layout */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  /* 12px between fields */
}

.auth-form-actions {
  margin-top: 8px;
}

.auth-form .section-buttons {
  margin-top: 0;
}

/* Google Sign-In Button - Modern rounded style */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
  height: var(--size-icon-btn);
  /* 48px */
  padding: 0 var(--space-lg);
  background: var(--input-background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  /* 24px - rounded modern style */
  color: var(--text);
  font-family: 'Google Sans Flex', sans-serif;
  font-size: var(--font-body-small-size);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-google:hover {
  background: var(--sidebar-hover);
  border-color: var(--text-muted);
}

.btn-google .google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  width: 100%;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider-text,
.auth-divider span {
  padding: 0 var(--space-md);
  color: var(--text-muted);
  font-size: var(--font-caption-size);
  font-weight: 400;
  text-transform: lowercase;
}

/* Auth Footer */
.auth-footer {
  margin-top: var(--space-xl);
  /* 24px */
  text-align: center;
  font-size: var(--font-body-small-size);
  color: var(--text-muted);
}

.auth-footer p {
  margin: 0;
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
}

.auth-footer a:hover {
  text-decoration: underline;
}