/* Global Base Resets & Psychological Calm Defaults */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

/* Enforce Weights 400 & 500 Only on Stacey's Mobile & TV Surfaces */
body:not(.surface-admin) strong,
body:not(.surface-admin) b,
body:not(.surface-admin) h1,
body:not(.surface-admin) h2,
body:not(.surface-admin) h3,
body:not(.surface-admin) h4 {
  font-weight: 500;
}

body:not(.surface-admin) .font-editorial {
  font-weight: 400 !important;
}

/* Elevated Calm Cards */
.calm-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-calm);
}

.calm-card-anchor {
  background-color: var(--pastel-sage);
  border: 1px solid rgba(43, 47, 45, 0.09);
  border-radius: var(--radius-card);
}

/* Glassmorphism Utilities */
.glass-nav {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-soft);
}

.glass-pill {
  background: rgba(237, 234, 228, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-soft);
}

/* 1.5px Monochrome Lucide Icon Enforcement */
svg.lucide {
  stroke-width: 1.5px;
  stroke: currentColor;
}

/* Custom Minimalist Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(120, 126, 122, 0.25);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 126, 122, 0.4);
}

/* Hide Scrollbar for Horizontal Appointment Strip */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 65-Inch TV 16:9 Ambient Viewport Scaling */
.tv-viewport {
  min-height: 100vh;
  width: 100vw;
  background-color: var(--tv-bg);
  color: var(--tv-text);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.75rem, 3vw, 3.5rem);
  transition: background-color 1200ms ease, color 1200ms ease;
}

.tv-surface-card {
  background-color: var(--tv-surface);
  border: 1px solid var(--tv-border);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Safe-area spacing for iOS PWA home bar */
.pb-safe {
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

/* Focus Ring Accessibility */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #787E7A;
  outline-offset: 2px;
}
