/* ==========================================================================
   ONTO ATLAS UI — INSPIRED BY ANIMALHUB (animalhub.earth)
   Pure White Canvas · Icy Breeze (#F4F6FC) Cards · Botanical Emerald (#16A34A)
   Anton + Bebas Neue (Ocean-to-Emerald Gradient) + Marcellus Editorial Type
   ========================================================================== */

:root,
html[data-theme="animalhub"] {
  color-scheme: light;

  /* AnimalHub Core Palette */
  --bg-canvas: #FFFFFF;
  --bg-icy-breeze: #F4F6FC;
  --bg-tile: #FFFFFF;
  --bg-pill: #E5E7EB;
  --bg-pill-hover: #15803D;

  --text-primary: #1F2937;
  --text-strong: #111827;
  --text-secondary: #374151;
  --text-muted: #6B7280;

  --emerald-50: #F0FDF4;
  --emerald-200: #BBF7D0;
  --emerald-300: #86EFAC;
  --emerald-500: #22C55E;
  --emerald-600: #16A34A;
  --emerald-700: #15803D;
  --emerald-800: #166534;

  --blue-400: #60A5FA;
  --blue-700: #1D4ED8;

  /* AnimalHub Pastel Highlights */
  --pastel-sky: #D4E4FE;
  --pastel-lime: #DEFF6A;
  --pastel-rose: #FFD4D8;

  --nav-rail: #E5E7EB;
  --border-subtle: #E5E7EB;
  --border-control: #9CA3AF;

  --accent: #15803D;
  --accent-hover: #166534;
  --accent-bright: #16A34A;
  --accent-on: #FFFFFF;

  --danger: #DC2626;

  --orb-grad-from: #BBF7D0;
  --orb-grad-to: #F0FDF4;
  --orb-horizon: #FFFFFF;

  --shadow-soft: 0 4px 12px -2px rgba(17, 24, 39, 0.05);
  --shadow-float: 0 20px 44px -12px rgba(17, 24, 39, 0.18);

  --radius-2xl: 16px;
  --radius-xl: 20px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-pill: 999px;

  --font-heading: 'Anton', Impact, -apple-system, sans-serif;
  --font-caption: 'Bebas Neue', Impact, sans-serif;
  --font-body: 'Marcellus', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg-canvas: #0B1117;
  --bg-icy-breeze: #131D27;
  --bg-tile: #1A2633;
  --bg-pill: #223142;
  --bg-pill-hover: #15803D;

  --text-primary: #F3F4F6;
  --text-strong: #FFFFFF;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;

  --emerald-50: #0F291E;
  --emerald-200: #164E35;
  --emerald-300: #22C55E;
  --emerald-500: #4ADE80;
  --emerald-600: #22C55E;
  --emerald-700: #15803D;
  --emerald-800: #16A34A;

  --blue-400: #60A5FA;
  --blue-700: #3B82F6;

  --pastel-sky: #1E3A5F;
  --pastel-lime: #283B15;
  --pastel-rose: #4A1D28;

  --nav-rail: #243447;
  --border-subtle: #243447;
  --border-control: #4B6078;

  --accent: #16A34A;
  --accent-hover: #22C55E;
  --accent-bright: #4ADE80;
  --accent-on: #FFFFFF;

  --danger: #F87171;

  --orb-grad-from: #164E35;
  --orb-grad-to: #0F241B;
  --orb-horizon: #0B1117;

  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.32);
  --shadow-float: 0 24px 50px rgba(0, 0, 0, 0.55);
}

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

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--accent);
}

::selection {
  background: var(--emerald-200);
  color: var(--text-strong);
}

.chat-log,
.settings-sections,
.radio-rundown-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-icy-breeze);
}

input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  cursor: pointer;
}

/* Fallback for older browsers without accent-color (per brand-consistent-forms) */
@supports not (accent-color: #15803D) {
  input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    display: inline-grid;
    place-content: center;
    background: var(--bg-tile);
    border: 2px solid var(--border-control);
    border-radius: 4px;
  }

  input[type="checkbox"]:checked {
    background-color: var(--accent);
    border-color: var(--accent);
  }

  input[type="checkbox"]:checked::before {
    content: "✓";
    color: var(--accent-on);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
  }

  input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text-primary);
  font-weight: 400;
}

.pretty-text {
  text-wrap: pretty;
}

.nowrap {
  white-space: nowrap;
}

.text-emerald {
  color: var(--accent-bright);
}

/* AnimalHub Signature Cobalt -> Emerald -> Sky Gradient Display Text */
.gradient-display {
  font-family: var(--font-caption);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background-image: linear-gradient(90deg, var(--blue-700) 0%, var(--emerald-500) 52%, var(--blue-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

@supports (background-image: linear-gradient(in oklab, red, blue)) {
  .gradient-display {
    background-image: linear-gradient(to right in oklab, var(--blue-700) 0%, var(--emerald-500) 52%, var(--blue-400) 100%);
  }
}

.caption-display {
  font-family: var(--font-caption);
  font-size: 1.85rem;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

/* ==========================================================================
   ANIMALHUB HEADER: ICY-BREEZE BAND + 4PX TOP-BORDER EMERALD NAV RAIL
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-icy-breeze);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 11px;
}

.atlas-crest {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 180ms ease;
}

.atlas-crest:hover {
  transform: scale(1.05);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--emerald-50);
  color: var(--accent);
  border: 1px solid color-mix(in oklab, var(--accent-bright) 35%, var(--border-subtle));
}

.pulse-orb {
  position: relative;
  width: 10px;
  height: 10px;
  display: inline-grid;
  place-items: center;
}

.pulse-core {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
}

.pulse-ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-bright);
  animation: pulseWave 2.6s ease-out infinite;
}

@keyframes pulseWave {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.85);
    opacity: 0;
  }
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 0.73rem;
  color: var(--text-secondary);
  max-width: 205px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Signature AnimalHub Top-Border Nav Tabs (inset rail avoids overflow clipping) */
.view-tabs {
  display: inline-flex;
  align-items: stretch;
  gap: 14px;
  box-shadow: inset 0 4px 0 var(--nav-rail);
  max-width: 100%;
  overflow-x: auto;
  margin-right: auto;
  margin-left: 6px;
}

.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 0;
  padding: 9px 2px 7px;
  border: none;
  border-top: 4px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.91rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 150ms ease, color 150ms ease;
}

.view-tab:hover {
  border-top-color: var(--emerald-600);
  color: var(--text-strong);
}

.view-tab.active {
  border-top-color: var(--emerald-600);
  color: var(--text-strong);
}

.tab-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--bg-pill);
  color: var(--text-primary);
  transition: background-color 150ms ease, color 150ms ease;
}

.view-tab.active .tab-count {
  background: var(--emerald-700);
  color: #FFFFFF;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.topbar-actions .btn {
  padding: 7px 11px;
  font-size: 0.82rem;
}

.topbar-actions .btn-icon {
  padding: 6px 10px;
}

/* ==========================================================================
   ANIMALHUB BUTTONS & INPUTS (.btn-primary Emerald + .btn-secondary Icy Breeze)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.2;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

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

.btn-sm {
  padding: 7px 13px;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--emerald-700);
  color: #FFFFFF;
  border-color: var(--emerald-700);
}

.btn-primary:hover:not(:disabled) {
  background: var(--emerald-800);
  border-color: var(--emerald-800);
}

.btn-secondary,
.btn-ghost {
  background: var(--bg-icy-breeze);
  color: var(--text-strong);
  border-color: var(--border-control);
}

.card .btn-secondary,
.topbar .btn-secondary {
  background: var(--bg-tile);
}

.btn-secondary:hover:not(:disabled),
.btn-ghost:hover:not(:disabled) {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: #FFFFFF;
}

.btn-voice {
  background: var(--emerald-600);
  color: #FFFFFF;
  border-color: var(--emerald-600);
  border-radius: var(--radius-pill);
}

.btn-voice:hover:not(:disabled) {
  background: var(--emerald-800);
  border-color: var(--emerald-800);
}

.btn-voice.is-speaking {
  background: var(--danger);
  border-color: var(--danger);
  color: #FFFFFF;
}

.btn-icon {
  padding: 7px 11px;
  background: var(--bg-tile);
  border-color: var(--border-control);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
}

.btn-icon:hover:not(:disabled) {
  border-color: var(--emerald-600);
  color: var(--emerald-600);
}

input[type="text"],
input[type="url"],
input[type="password"],
input[type="time"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-primary);
  background: var(--bg-tile);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--emerald-500) 24%, transparent);
}

/* ==========================================================================
   WORKSPACE SHELL & CACHED SPA VIEWS (faster-spa-view-transitions)
   ========================================================================== */

.workspace-shell {
  max-width: 1460px;
  margin: 0 auto;
  padding: 28px 28px 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 396px;
  gap: 28px;
  align-items: start;
}

.main-stage {
  position: relative;
  min-width: 0;
}

.spa-view {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.spa-view:focus {
  outline: none;
}

.spa-view.inactive {
  content-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

@supports not (content-visibility: hidden) {
  .spa-view.inactive {
    display: none;
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 160ms;
}

/* AnimalHub Signature Icy-Breeze Rounded-2XL Cards */
.card {
  background: var(--bg-icy-breeze);
  border-radius: var(--radius-2xl);
  border: 1px solid transparent;
}

.section-block {
  padding: 26px 28px;
}

/* AnimalHub Botanical Emerald Eyebrow (like "Panthera Onca" / "The Key Attributes") */
.eyebrow {
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--emerald-600);
  margin-bottom: 4px;
}

.mono-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

/* AnimalHub Signature Solid Green Divider (.animal-properties-card .divider) */
.emerald-divider {
  border: 0;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--emerald-600);
  margin: 16px 0 20px;
  opacity: 0.88;
}

/* AnimalHub Page Banner (like "EXQUISITE ANIMALS") */
.page-banner {
  text-align: center;
  max-width: 720px;
  margin: 4px auto 6px;
}

.banner-title {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 0.98;
}

.page-banner p {
  margin: 8px 0 0;
  font-size: 1.06rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   VIEW 1 HERO: MONUMENTAL ANTON HEADING + MINT SUN ORB WITH SOARING BIRDS
   ========================================================================== */

.hero-dispatch {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-showcase {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 28px;
  align-items: center;
  padding: 14px 6px 6px;
}

.editorial-kicker {
  font-family: var(--font-body);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.city-bar {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.city-bar h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 4.8vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

.canopy-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--emerald-600);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.canopy-link:hover {
  color: var(--emerald-800);
}

.inline-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  max-width: 440px;
}

.stylist-rationale {
  margin: 16px 0 18px;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 58ch;
}

.hero-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-icy-breeze);
  color: var(--emerald-700);
  border: 1px solid color-mix(in oklab, var(--emerald-600) 24%, var(--border-subtle));
}

html[data-theme="dark"] .meta-pill {
  color: var(--emerald-500);
}

/* AnimalHub Mint-Emerald Horizon Sun Orb */
.hero-orb-col {
  display: flex;
  justify-content: center;
}

.nature-orb {
  position: relative;
  width: min(330px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: linear-gradient(225deg, var(--orb-grad-from) 0%, var(--orb-grad-to) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px;
  overflow: hidden;
}

.soaring-birds {
  width: 78%;
  height: auto;
  margin-top: -12px;
  margin-bottom: 4px;
  opacity: 0.88;
}

.orb-temp-readout {
  text-align: center;
  z-index: 2;
}

.current-temp {
  font-size: 5.4rem;
  line-height: 0.92;
  font-variant-numeric: tabular-nums;
}

.sky-label {
  display: block;
  margin-top: 6px;
  font-size: 0.96rem;
  color: var(--text-primary);
}

.orb-horizon-line {
  position: absolute;
  bottom: 24px;
  left: 16%;
  right: 16%;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--emerald-600);
}

/* Ecological Profile Card: Thermal Curve + Wardrobe */
.atlas-profile-card {
  padding: 26px 28px;
}

.thermal-wardrobe-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 26px;
  align-items: start;
}

.thermal-panel,
.wardrobe-panel {
  background: var(--bg-tile);
  border-radius: var(--radius-2xl);
  padding: 22px 24px;
  box-shadow: var(--shadow-soft);
}

.panel-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.badge-subtle {
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid color-mix(in oklab, var(--emerald-600) 30%, transparent);
  white-space: nowrap;
  flex-shrink: 0;
}

html[data-theme="dark"] .badge-subtle {
  color: var(--emerald-500);
}

.thermal-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px;
  background: var(--bg-icy-breeze);
  border-radius: var(--radius-lg);
}

.thermal-stop {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stop-time {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stop-temp {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--emerald-600);
}

.stop-rain {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.thermal-connector {
  flex: 1;
  height: 3px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--blue-400), var(--emerald-500));
}

.atlas-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.wardrobe-slots {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slot-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}

.slot-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.slot-row dt {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-muted);
}

.slot-row dd {
  margin: 0;
  color: var(--text-strong);
}

/* ==========================================================================
   ANIMALHUB COLLECTION GRID: TODAY AT A GLANCE TILES
   ========================================================================== */

.digest-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
}

.atlas-section-intro {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.atlas-two-tone {
  font-family: var(--font-body);
  font-size: clamp(1.65rem, 2.6vw, 2.2rem);
  line-height: 1.3;
  color: var(--text-primary);
}

.atlas-intro-sub {
  margin: 8px 0 0;
  font-size: 1rem;
  color: var(--text-secondary);
}

.digest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.digest-tile {
  text-align: center;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--text-primary);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.digest-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.tile-display {
  display: block;
  font-family: var(--font-caption);
  font-size: 2.15rem;
  line-height: 1.05;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin: 2px 0 8px;
}

.digest-title {
  display: block;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--emerald-700);
  margin-bottom: 6px;
}

html[data-theme="dark"] .digest-title {
  color: var(--emerald-500);
}

.digest-sub {
  margin: 0 auto;
  max-width: 44ch;
  font-size: 0.92rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.digest-btn {
  margin-top: 4px;
}

/* ==========================================================================
   WONT 94.7 FM · PERSONAL RADIO NEWSROOM STUDIO & TODAY CALLOUT
   ========================================================================== */

.radio-callout-strip {
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-left: 6px solid var(--emerald-600);
}

.radio-callout-copy {
  max-width: 66ch;
}

.radio-callout-copy p {
  margin: 6px 0 0;
  font-size: 0.96rem;
  color: var(--text-secondary);
}

.radio-callout-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.radio-deck-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-station-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.radio-station-cluster h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  letter-spacing: 0.015em;
  line-height: 1.1;
}

.on-air-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: var(--bg-pill);
  color: var(--text-strong);
  border: 1px solid var(--border-control);
  user-select: none;
}

.on-air-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.on-air-pill.is-live {
  background: #DC2626;
  border-color: #DC2626;
  color: #FFFFFF;
}

.on-air-pill.is-live::before {
  background: #FFFFFF;
  animation: micPulse 1.1s ease-in-out infinite;
}

.radio-telemetry {
  display: flex;
  align-items: center;
  gap: 14px;
}

.radio-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  padding: 2px 6px;
  border-radius: var(--radius-md);
  background: var(--bg-tile);
  border: 1px solid var(--border-subtle);
  user-select: none;
}

.radio-eq span {
  width: 3px;
  height: 5px;
  border-radius: 2px;
  background: var(--emerald-600);
  opacity: 0.45;
  transition: height 160ms ease, opacity 160ms ease;
}

.radio-eq.is-live span {
  opacity: 1;
  animation: eqBounce 0.95s ease-in-out infinite alternate;
}

.radio-eq.is-live span:nth-child(2n) {
  animation-duration: 0.68s;
}
.radio-eq.is-live span:nth-child(3n) {
  animation-duration: 1.12s;
}
.radio-eq.is-live span:nth-child(4n) {
  animation-duration: 0.54s;
}

@keyframes eqBounce {
  0% {
    height: 4px;
  }
  100% {
    height: 20px;
  }
}

.radio-now-box {
  background: var(--bg-tile);
  border-radius: var(--radius-2xl);
  padding: 18px 22px;
  box-shadow: var(--shadow-soft);
  border-left: 5px solid var(--emerald-600);
  margin-bottom: 18px;
}

.radio-now-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.radio-desk-tag,
.radio-speaker-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.radio-desk-tag {
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid color-mix(in oklab, var(--emerald-600) 30%, transparent);
}

html[data-theme="dark"] .radio-desk-tag {
  color: var(--emerald-500);
}

.radio-speaker-tag {
  background: var(--pastel-sky);
  color: #1E3A8A;
}

.radio-speaker-tag.is-correspondent {
  background: var(--pastel-lime);
  color: #1A2E05;
}

html[data-theme="dark"] .radio-speaker-tag {
  color: #DBEAFE;
}
html[data-theme="dark"] .radio-speaker-tag.is-correspondent {
  color: #ECFCCB;
}

.radio-now-headline {
  font-family: var(--font-body);
  font-size: 1.14rem;
  line-height: 1.42;
  color: var(--text-strong);
}

.radio-transport-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.radio-transport-main,
.radio-transport-prefs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-speed-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.radio-speed-control select {
  width: auto;
  padding: 6px 10px;
  font-size: 0.84rem;
}

/* Inline multi-choice pills using <input> inside <label> + label:has(:checked) (per browser-ui-theming) */
.radio-builder-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.choice-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.choice-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  background: var(--bg-tile);
  border: 1px solid var(--border-control);
  color: var(--text-strong);
  font-family: var(--font-body);
  font-size: 0.89rem;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.choice-pill-sm {
  padding: 6px 13px;
  font-size: 0.84rem;
}

.choice-pill:hover {
  border-color: var(--emerald-600);
}

.choice-pill input[type="checkbox"],
.choice-pill input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.75px solid var(--border-control);
  background: var(--bg-canvas);
  display: inline-grid;
  place-content: center;
  flex-shrink: 0;
}

.choice-pill input[type="checkbox"] {
  border-radius: 4px;
}

.choice-pill input[type="checkbox"]:checked,
.choice-pill input[type="radio"]:checked {
  background: #FFFFFF;
  border-color: #FFFFFF;
}

.choice-pill input[type="checkbox"]:checked::before {
  content: "✓";
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  color: var(--emerald-700);
}

.choice-pill input[type="radio"]:checked::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-700);
}

label.choice-pill:has(:checked) {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: #FFFFFF;
}

label.choice-pill:has(:focus-visible) {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.radio-custom-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
}

.radio-custom-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-custom-row input {
  flex: 1;
  min-width: 240px;
}

.radio-segments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 760px;
  overflow-y: auto;
  padding-right: 6px;
}

.radio-segment-card {
  background: var(--bg-tile);
  border-radius: var(--radius-2xl);
  padding: 20px 22px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-soft);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.radio-segment-card.is-playing {
  border-color: var(--emerald-600);
  border-left: 6px solid var(--emerald-600);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--emerald-500) 24%, transparent), var(--shadow-soft);
}

.radio-seg-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: nowrap;
  margin-bottom: 10px;
}

.radio-seg-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.radio-seg-num {
  font-family: var(--font-caption);
  font-size: 1.55rem;
  line-height: 1;
  color: var(--emerald-600);
  margin-right: 2px;
}

.radio-seg-cue {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.radio-seg-headline {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 8px;
}

/* Keep teleprompter copy selectable (never user-select: none on content text) */
.radio-seg-script {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.64;
  color: var(--text-primary);
  white-space: pre-line;
}

/* ==========================================================================
   VIEW 2: DAILY LESSONS (PSYCHOLOGY, 2 WEB SEO TRICKS, CRM BUSINESS)
   ========================================================================== */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  letter-spacing: 0.015em;
  line-height: 1.15;
}

.inline-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.psych-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.psych-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.psych-col p,
.psych-practice-box p,
.crm-move-box p {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.psych-muted {
  color: var(--text-secondary);
}

.psych-label {
  display: inline-block;
  font-family: var(--font-caption);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--emerald-600);
}

.psych-practice-box,
.crm-move-box {
  padding: 20px 22px;
  border-radius: var(--radius-2xl);
  background: var(--bg-tile);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-move-box {
  border-top: 4px solid var(--emerald-600);
}

.psych-practice-box {
  border-top: 4px solid var(--blue-400);
}

.seo-tricks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.seo-trick-card {
  padding: 20px 22px;
  border-radius: var(--radius-2xl);
  background: var(--bg-tile);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.seo-trick-card h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.06rem;
  line-height: 1.38;
  color: var(--text-strong);
}

.seo-why {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.seo-how {
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-icy-breeze);
  border-left: 4px solid var(--emerald-600);
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* ==========================================================================
   VIEW 3: NEWS & CREATORS (10 AI NEWS, YOUTUBE, DISPATCHES, GALLOWAY SOCIAL)
   ========================================================================== */

.ai-news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ai-news-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-2xl);
  background: var(--bg-tile);
  border: 1px solid transparent;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: border-color 150ms ease, transform 150ms ease;
}

.ai-news-card:hover {
  border-color: var(--emerald-600);
  transform: translateY(-2px);
}

.ai-news-num {
  font-family: var(--font-caption);
  font-size: 1.65rem;
  line-height: 1;
  color: var(--emerald-600);
}

.feeds-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.channel-add-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.channel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-tile);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.chip-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 2px;
  font-size: 0.96rem;
  line-height: 1;
}

.chip-remove:hover {
  color: var(--danger);
}

.video-list,
.news-list,
.services-list,
.memories-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-item {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 13px;
  padding: 12px;
  border-radius: var(--radius-2xl);
  background: var(--bg-tile);
  border: 1px solid transparent;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: border-color 150ms ease, transform 150ms ease;
}

.video-item:hover,
.news-item:hover,
.social-card:hover {
  border-color: var(--emerald-600);
  transform: translateY(-2px);
}

.video-thumb {
  width: 116px;
  height: 66px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--border-subtle);
}

.video-title {
  font-size: 0.94rem;
  line-height: 1.38;
  color: var(--text-strong);
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.new-badge {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--pastel-lime);
  color: #1A2E05;
}

html[data-theme="dark"] .new-badge {
  color: #ECFCCB;
}

.news-item {
  display: block;
  padding: 14px 16px;
  border-radius: var(--radius-2xl);
  background: var(--bg-tile);
  border: 1px solid transparent;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: border-color 150ms ease, transform 150ms ease;
}

.news-source-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--emerald-600);
  margin-bottom: 4px;
}

.news-title {
  font-size: 0.97rem;
  line-height: 1.38;
  color: var(--text-strong);
  margin-bottom: 4px;
}

.news-summary {
  margin: 0;
  font-size: 0.87rem;
  color: var(--text-secondary);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.social-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 20px;
  border-radius: var(--radius-2xl);
  background: var(--bg-tile);
  border: 1px solid transparent;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: border-color 150ms ease, transform 150ms ease;
}

.social-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.social-author {
  font-size: 0.94rem;
  color: var(--emerald-700);
}

html[data-theme="dark"] .social-author {
  color: var(--emerald-500);
}

.social-text {
  margin: 6px 0 0;
  font-size: 0.93rem;
  line-height: 1.54;
  color: var(--text-primary);
  white-space: pre-line;
}

.social-embed-pill {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--pastel-sky);
  color: var(--blue-700);
}

html[data-theme="dark"] .social-embed-pill {
  color: #BFDBFE;
}

/* ==========================================================================
   VIEW 4: PROACTIVE & SYSTEM (.animal-filters CAPSULE PILLS + CARDS)
   ========================================================================== */

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* AnimalHub .animal-filters rounded-3xl capsule style */
.pill {
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--bg-pill);
  color: var(--text-strong);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.pill:hover,
.pill.active {
  background: var(--emerald-700);
  color: #FFFFFF;
}

.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 16px;
}

.suggestion-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-2xl);
  background: var(--bg-tile);
  border: 1px solid transparent;
  box-shadow: var(--shadow-soft);
}

.suggestion-card.is-accepted {
  border-color: var(--emerald-600);
}

/* AnimalHub Pastel Category Chips (#D4E4FE, #DEFF6A, #FFD4D8) */
.cat-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 9px;
}

.cat-assistant_service {
  background: var(--pastel-sky);
  color: #1E3A8A;
}

.cat-business_opportunity {
  background: var(--pastel-lime);
  color: #1A2E05;
}

.cat-workflow_upgrade {
  background: var(--pastel-rose);
  color: #881337;
}

html[data-theme="dark"] .cat-assistant_service {
  color: #DBEAFE;
}
html[data-theme="dark"] .cat-business_opportunity {
  color: #ECFCCB;
}
html[data-theme="dark"] .cat-workflow_upgrade {
  color: #FFE4E6;
}

.suggestion-card h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.03rem;
  line-height: 1.36;
  margin-bottom: 6px;
}

.suggestion-summary {
  margin: 0 0 8px;
  font-size: 0.91rem;
  color: var(--text-secondary);
}

.suggestion-why {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  border-left: 3px solid var(--emerald-600);
  padding-left: 10px;
}

.suggestion-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.service-row,
.memory-row,
.activity-item {
  padding: 14px 16px;
  border-radius: var(--radius-2xl);
  background: var(--bg-tile);
  box-shadow: var(--shadow-soft);
}

.service-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.service-row strong {
  display: block;
  font-size: 0.96rem;
}

.service-row p {
  margin: 3px 0 5px;
  font-size: 0.87rem;
  color: var(--text-secondary);
}

.memory-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.activity-item {
  font-size: 0.86rem;
}

.empty-card {
  padding: 20px;
  border-radius: var(--radius-2xl);
  background: var(--bg-tile);
  border: 1px dashed var(--border-control);
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   RIGHT RAIL: ANIMALHUB ICY-BREEZE VOICE & TEXT COMPANION
   ========================================================================== */

.assistant-rail {
  position: sticky;
  top: 92px;
}

.chat-panel {
  padding: 22px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 122px);
  min-height: 540px;
  max-height: 780px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.chat-header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.engine-bar {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px dotted var(--border-control);
}

.chip-action {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: var(--emerald-700);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: left;
}

html[data-theme="dark"] .chip-action {
  color: var(--emerald-500);
}

.voice-key-banner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
  padding: 10px 13px;
  border-radius: var(--radius-lg);
  background: var(--emerald-50);
  border: 1px solid color-mix(in oklab, var(--emerald-600) 32%, transparent);
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  margin-bottom: 12px;
}

.chat-bubble {
  max-width: 92%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 0.91rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-user {
  align-self: flex-end;
  background: var(--emerald-700);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

.chat-assistant {
  align-self: flex-start;
  background: var(--bg-tile);
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
  border-bottom-left-radius: 4px;
}

.bubble-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.bubble-speak-btn {
  background: none;
  border: none;
  padding: 0 2px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--emerald-600);
  cursor: pointer;
}

.bubble-speak-btn:hover {
  color: var(--emerald-800);
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 11px;
}

.prompt-chip {
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--bg-pill);
  color: var(--text-strong);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.prompt-chip:hover {
  background: var(--emerald-700);
  color: #FFFFFF;
}

.chat-composer {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.chat-composer textarea {
  resize: none;
  flex: 1;
}

.composer-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: space-between;
}

.btn-mic {
  background: var(--bg-tile);
  color: var(--text-strong);
  border-color: var(--border-control);
}

.btn-mic:hover:not(:disabled) {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: #FFFFFF;
}

.btn-mic.is-recording {
  background: var(--danger);
  border-color: var(--danger);
  color: #FFFFFF;
  animation: micPulse 1.2s ease-in-out infinite;
}

@keyframes micPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

/* ==========================================================================
   SETTINGS DIALOG & TOAST POPOVER
   ========================================================================== */

.settings-dialog {
  width: min(760px, 94vw);
  max-height: 88vh;
  padding: 0;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-xl);
  background: var(--bg-canvas);
  color: var(--text-primary);
  box-shadow: var(--shadow-float);
}

.settings-dialog::backdrop {
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(4px);
}

.settings-content {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
}

.dialog-header,
.dialog-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-icy-breeze);
  border-bottom: 1px solid var(--border-subtle);
}

.dialog-footer {
  border-bottom: none;
  border-top: 1px solid var(--border-subtle);
  justify-content: flex-end;
  gap: 10px;
}

.settings-sections {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-group {
  margin: 0;
  padding: 16px 18px;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-subtle);
  background: var(--bg-icy-breeze);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-group legend {
  font-family: var(--font-caption);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--emerald-700);
  padding: 0 6px;
}

html[data-theme="dark"] .settings-group legend {
  color: var(--emerald-500);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.field label a {
  color: var(--emerald-700);
}

.input-with-btn {
  display: flex;
  gap: 6px;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.toggle-row strong {
  font-size: 0.92rem;
}

.toggle-row p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.toast-banner {
  position: fixed;
  inset: auto 24px 24px auto;
  margin: 0;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--emerald-600);
  background: #111827;
  color: #FFFFFF;
  box-shadow: var(--shadow-float);
  font-size: 0.9rem;
  align-items: center;
  gap: 12px;
}

[popover]:is(:popover-open, .\:popover-open) {
  display: inline-flex;
}

.toast-close {
  background: none;
  border: none;
  color: var(--emerald-300);
  font-size: 1.12rem;
  cursor: pointer;
}

/* ==========================================================================
   FORCED COLORS, RESPONSIVE BREAKPOINTS & REDUCED MOTION
   ========================================================================== */

@media (forced-colors: active) {
  .gradient-display {
    background: none !important;
    color: CanvasText !important;
    -webkit-text-fill-color: CanvasText !important;
  }
  .card,
  .thermal-panel,
  .wardrobe-panel,
  .seo-trick-card,
  .ai-news-card,
  .video-item,
  .news-item,
  .social-card,
  .suggestion-card,
  .service-row,
  .memory-row,
  .activity-item,
  .chat-assistant,
  .radio-now-box,
  .radio-segment-card {
    border: 1px solid CanvasText;
  }
  .view-tab.active,
  .pill.active,
  label.choice-pill:has(:checked),
  .radio-segment-card.is-playing {
    outline: 2px solid Highlight;
  }
}

@media (max-width: 1180px) {
  .workspace-shell {
    grid-template-columns: 1fr;
  }
  .assistant-rail {
    position: static;
  }
  .chat-panel {
    height: 540px;
  }
}

@media (max-width: 820px) {
  .topbar-inner {
    padding: 12px 16px;
  }
  .workspace-shell {
    padding: 18px 16px 40px;
  }
  .hero-showcase,
  .thermal-wardrobe-grid,
  .digest-grid,
  .psych-grid,
  .seo-tricks-grid,
  .ai-news-grid,
  .social-grid,
  .feeds-grid,
  .activity-list,
  .field-grid {
    grid-template-columns: 1fr;
  }
  .hero-showcase {
    text-align: center;
  }
  .city-bar,
  .hero-meta-pills {
    justify-content: center;
  }
  .stylist-rationale {
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-ring,
  .btn-mic.is-recording,
  .on-air-pill.is-live::before,
  .radio-eq.is-live span {
    animation: none;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  * {
    transition: none !important;
  }
}
