/* Sentient 3 - Sentient Light brand palette, multi-screen */

/* ----- Brand variables ----- */
:root {
  --bg: #EAF4FB;
  --bg-card: #FFFFFF;
  --text: #0B2B4A;
  --text-muted: #4B6B85;
  --text-faint: #6B8AAB;
  --text-disabled: #8AA5BC;
  --border: #D7E5F0;
  --brand: #1E8FE5;
  --brand-dark: #1976C9;
  --brand-darker: #1670B8;
  --navy: #0B2B4A;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app {
  position: relative;
}

button { font-family: inherit; cursor: pointer; border: 0; background: transparent; padding: 0; color: inherit; }
button:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; border-radius: 12px; }
input { font-family: inherit; }
svg { display: block; }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* ----- Screens flow naturally with the page. Only the active screen is
   visible; others use display: none. The page (browser) handles scrolling,
   so there's no internal scrollbar inside the app. This works whether the
   app is standalone or embedded inside a CMS page like DNN. ----- */
.screen {
  display: none;
  background: var(--bg);
}
.screen.active {
  display: block;
}

/* Navigation is now the sticky top bar on all sizes. The old bottom-nav is
   disabled at its definition below - this avoids position:fixed problems in
   embedded/iframe contexts and frees the bottom real estate. */
.screen-home, .screen-library, .screen-saved, .screen-settings { padding-bottom: 32px; }
body.mini-active .screen-home,
body.mini-active .screen-library,
body.mini-active .screen-saved,
body.mini-active .screen-settings { padding-bottom: 96px; }

.screen-inner, .home-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 18px 0;
  padding-top: max(20px, env(safe-area-inset-top));
}

/* ----- Home header ----- */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.greeting { font-size: 24px; font-weight: 600; color: var(--text); letter-spacing: -0.3px; }
.greeting-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.avatar-btn {
  display: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: white;
  align-items: center; justify-content: center;
  transition: transform 100ms ease;
}
.avatar-btn svg { width: 20px; height: 20px; }
.avatar-btn:active { transform: scale(0.94); }

/* ----- Continue-where-you-left-off card ----- */
.continue-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--brand);
  color: white;
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 16px;
  transition: transform 120ms ease;
}
.continue-card:active { transform: scale(0.99); }
.continue-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.continue-icon svg { width: 22px; height: 22px; color: white; }
.continue-body { flex: 1; min-width: 0; }
.continue-eyebrow {
  font-size: 10px; opacity: 0.88; text-transform: uppercase;
  letter-spacing: 1px; font-weight: 600;
}
.continue-title {
  font-size: 15px; font-weight: 600; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.continue-meta { font-size: 11px; opacity: 0.9; margin-top: 1px; }
.continue-play {
  width: 32px; height: 32px; border-radius: 50%;
  background: white; color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.continue-play svg { width: 13px; height: 13px; }

/* ----- Section header & saved strip on Home ----- */
.section-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0 0 10px;
}
.section-title {
  font-size: 16px; font-weight: 600; margin: 4px 0 14px; color: var(--text);
}
.section-header .section-title { margin: 0; }
.see-all-link {
  font-size: 12px; color: var(--brand-dark); font-weight: 600;
}

.saved-section { margin-bottom: 22px; }
.saved-strip {
  display: flex; gap: 10px;
  overflow-x: auto;
  margin: 0 -18px;
  padding: 0 18px 4px;
  scroll-snap-type: x mandatory;
}
.saved-strip::-webkit-scrollbar { display: none; }
.saved-strip { scrollbar-width: none; }

.saved-strip-card {
  flex: 0 0 auto;
  width: 150px;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 12px;
  border: 0.5px solid var(--border);
  text-align: left;
  position: relative;
  scroll-snap-align: start;
}
.saved-strip-card:active { transform: scale(0.985); }
.saved-strip-fav {
  position: absolute; top: 10px; right: 10px;
  width: 14px; height: 14px; color: var(--brand);
}
.saved-strip-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.saved-strip-icon svg { width: 18px; height: 18px; }
.saved-strip-name {
  font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.saved-strip-meta {
  font-size: 11px; color: var(--text-muted); margin-top: 4px;
}

/* ----- Sessions list (used on Home, Category, Saved) ----- */
.sessions-list {
  display: flex; flex-direction: column; gap: 10px;
}

.session-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card);
  border-radius: 18px;
  padding: 14px;
  text-align: left;
  width: 100%;
  transition: transform 100ms ease;
  border: 0.5px solid var(--border);
}
.session-card:active { transform: scale(0.985); }

.session-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.session-icon svg { width: 22px; height: 22px; }

.session-body { flex: 1; min-width: 0; }
.session-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.session-meta {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
}

.session-play {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand); color: white;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 100ms ease, background 100ms ease;
}
.session-play svg { width: 16px; height: 16px; }
.session-card:hover .session-play { background: var(--brand-darker); }
.session-play:active { transform: scale(0.92); }

/* Tint backgrounds for session icons by category */
.tint-amber  { background: #E0EEFB; color: var(--brand-dark); }
.tint-coral  { background: #FDE7E0; color: #C04A28; }
.tint-green  { background: #DCF1E5; color: #2A7A48; }
.tint-purple { background: #EBE1F8; color: #6B4FB8; }
.tint-blue   { background: #DCE8F5; color: #2F5A8A; }
.tint-teal   { background: #D0EBE3; color: #1F6552; }

/* ----- Library preview section on Home ----- */
.library-preview-section {
  margin-top: 6px;
  margin-bottom: 12px;
}

/* ----- Session card with remove (Saved tab + Home strip) ----- */
.session-card .session-remove {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
  border: 0; padding: 0; background: transparent;
  transition: transform 100ms ease, opacity 100ms ease;
}
.session-card .session-remove svg { width: 20px; height: 20px; }
.session-card .session-remove:active { transform: scale(0.88); }
.session-card .session-remove:hover { opacity: 0.78; }

/* Bigger tap target on Home strip-card heart */
.saved-strip-fav-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.saved-strip-fav-btn svg { width: 14px; height: 14px; }
.saved-strip-fav-btn:active { transform: scale(0.88); }

/* ----- Toast with undo ----- */
.toast-undo {
  color: #8FB4DC;
  font-weight: 600;
  margin-left: 12px;
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 4px 8px;
  font-size: 13px;
  border-radius: 999px;
}
.toast-undo:active { opacity: 0.7; }

/* ----- Library screen ----- */
.screen-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.page-title {
  font-size: 22px; font-weight: 600; color: var(--text); letter-spacing: -0.3px;
}
.page-subtitle {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
}

.search-bar {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.search-bar svg { width: 16px; height: 16px; color: var(--text-faint); flex-shrink: 0; }
.search-bar input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 14px; color: var(--text); padding: 0;
  -webkit-appearance: none;
}
.search-bar input::placeholder { color: var(--text-faint); }
.search-bar input::-webkit-search-cancel-button { -webkit-appearance: none; }

.library-categories {
  display: flex; flex-direction: column; gap: 8px;
}

.library-category-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  text-align: left;
  border: 0.5px solid var(--border);
  transition: transform 100ms ease;
}
.library-category-card:active { transform: scale(0.99); }

.library-category-icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.library-category-icon svg { width: 20px; height: 20px; }

.library-category-body { flex: 1; min-width: 0; }
.library-category-name {
  font-size: 14px; font-weight: 600; color: var(--text);
}
.library-category-preview {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
  line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.library-category-chevron { width: 14px; height: 14px; color: var(--text-disabled); flex-shrink: 0; }

/* Library search results */
.library-search-results {
  display: flex; flex-direction: column; gap: 8px;
}
.library-search-empty {
  text-align: center; padding: 24px 16px;
  color: var(--text-muted); font-size: 14px;
}

/* ----- Category detail screen ----- */
.category-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.category-header-text { flex: 1; min-width: 0; }

/* ----- Saved screen empty state ----- */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 60px 32px;
  color: var(--text-muted);
}
.empty-state svg { width: 48px; height: 48px; color: var(--text-disabled); margin-bottom: 16px; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-body { font-size: 13px; color: var(--text-muted); line-height: 1.5; max-width: 280px; }

/* ----- Top nav (DESKTOP ONLY - hidden on mobile by default) ----- */
.top-nav {
  display: block;
  position: sticky;
  top: 0;
  z-index: 20;
  background: white;
  border-bottom: 0.5px solid var(--border);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top);
}
.top-nav-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.top-nav-back {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg); color: var(--brand-dark);
  border: 0; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 120ms ease;
}
.top-nav-back svg { width: 18px; height: 18px; }
.top-nav-back:hover { background: var(--brand); color: white; }
.top-nav-back.hidden { display: none; }
.top-nav-brand {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.2px;
  flex-shrink: 0;
}
.top-nav-items {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.top-nav-item {
  position: relative;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  transition: color 120ms ease, background 120ms ease;
  white-space: nowrap;
}
.top-nav-item:hover { background: var(--bg); }
.top-nav-item.active {
  color: var(--brand-dark);
  font-weight: 600;
}
.top-nav-item.active::after {
  content: "";
  position: absolute;
  bottom: -11px;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.top-nav-badge {
  background: var(--brand);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
}
.top-nav-settings {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 4px;
  transition: background 120ms ease, color 120ms ease;
}
.top-nav-settings:hover {
  background: var(--brand);
  color: white;
}
.top-nav-settings svg { width: 18px; height: 18px; }

/* ----- Settings screen ----- */
.settings-section {
  margin-bottom: 18px;
}
.settings-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--brand-dark);
  margin: 0 4px 8px;
}
.settings-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 14px 16px;
  border: 0.5px solid var(--border);
}
.settings-row-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 4px;
}
.settings-row-text strong { font-weight: 600; }
.settings-row-help {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0;
}
.settings-row-help + .settings-action-btn,
.settings-row-help + .settings-link {
  margin-top: 12px;
}
.settings-action-btn {
  display: inline-block;
  background: transparent;
  color: #C04A28;
  border: 1px solid #C04A28;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.settings-action-btn:hover {
  background: #C04A28;
  color: white;
}
.settings-link {
  display: inline-block;
  font-size: 13px;
  color: var(--brand-dark);
  font-weight: 600;
  text-decoration: none;
}
.settings-link:hover { text-decoration: underline; }
.settings-version {
  font-size: 11px;
  color: var(--text-disabled);
  text-align: center;
  padding: 12px 8px 24px;
}

/* ----- Playlists section on Home ----- */
.playlists-section { margin-bottom: 22px; }
.playlists-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }

.playlist-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--brand-dark);
  color: white;
  border-radius: 16px;
  padding: 16px;
  width: 100%;
  text-align: left;
  transition: transform 100ms ease;
}
.playlist-card:active { transform: scale(0.99); }
.playlist-card-icon {
  width: 52px; height: 52px; border-radius: 13px;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.playlist-card-icon svg { width: 26px; height: 26px; color: white; }
.playlist-card-body { flex: 1; min-width: 0; }
.playlist-card-name {
  font-size: 15px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.playlist-card-meta { font-size: 11px; opacity: 0.9; margin-top: 2px; }
.playlist-card-play {
  width: 40px; height: 40px; border-radius: 50%;
  background: white; color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 0; cursor: pointer;
  transition: transform 100ms ease;
}
.playlist-card-play svg { width: 16px; height: 16px; }
.playlist-card-play:active { transform: scale(0.9); }

/* Dashed "create / add" button (reused on Home and playlist detail) */
.playlist-add-btn {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--brand-light, #B5D4F4);
  border-radius: 14px;
  padding: 13px;
  color: var(--brand-dark);
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: background 120ms ease;
}
.playlist-add-btn svg { width: 18px; height: 18px; }
.playlist-add-btn:hover { background: rgba(30,143,229,0.06); }
.playlist-add-btn:active { transform: scale(0.99); }

/* ----- Playlist detail screen ----- */
.playlist-playall-bar {
  display: flex; align-items: stretch; gap: 0;
  background: var(--brand);
  border-radius: 16px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: background 120ms ease;
}
.playlist-playall-bar:hover { background: var(--brand-dark); }
.playlist-playall-btn {
  flex: 1 1 auto; min-width: 0;
  background: transparent;
  color: white;
  border: 0;
  border-radius: 0;
  padding: 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600;
  cursor: pointer;
  transition: transform 100ms ease;
}
.playlist-playall-btn:active { transform: scale(0.99); }
.playlist-playall-btn > svg { width: 20px; height: 20px; flex-shrink: 0; }
.playlist-playall-note {
  margin-left: auto;
  font-size: 11px; font-weight: 500; opacity: 0.92;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.playlist-playall-note svg { width: 13px; height: 13px; }

.playlist-loop-toggle {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 0;
  border-left: 1px solid rgba(255,255,255,0.28);
  border-radius: 0;
  padding: 0 16px;
  color: white;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 100ms ease;
}
.playlist-loop-toggle:active { transform: scale(0.97); }
.playlist-loop-icon { width: 18px; height: 18px; color: white; opacity: 0.92; flex-shrink: 0; }
.playlist-loop-switch {
  width: 38px; height: 22px; border-radius: 999px;
  background: rgba(255,255,255,0.32);
  position: relative; transition: background 140ms ease; flex: 0 0 auto;
}
.playlist-loop-toggle.on .playlist-loop-switch { background: white; }
.playlist-loop-knob {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: white;
  transition: transform 140ms ease, background 140ms ease; box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.playlist-loop-toggle.on .playlist-loop-knob { transform: translateX(16px); background: var(--brand); }

.playlist-hint {
  font-size: 12px; color: var(--text-muted);
  margin: 0 4px 12px;
  display: flex; align-items: center; gap: 6px;
}

.playlist-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }

.playlist-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card);
  border-radius: 14px;
  padding: 12px 10px 12px 8px;
  border: 0.5px solid var(--border);
  transition: opacity 120ms ease, box-shadow 120ms ease;
}
.playlist-item.dragging { opacity: 0.5; }
.playlist-item.drag-over { box-shadow: 0 -2px 0 var(--brand); }
.playlist-item-handle {
  color: #B0C4D8; cursor: grab; padding: 0 2px;
  display: flex; align-items: center; touch-action: none;
}
.playlist-item-handle svg { width: 18px; height: 18px; }
.playlist-item-num {
  font-size: 15px; font-weight: 600; color: var(--text-disabled);
  min-width: 16px; text-align: center;
}
.playlist-item-icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.playlist-item-icon svg { width: 20px; height: 20px; }
.playlist-item-body { flex: 1; min-width: 0; cursor: pointer; }
.playlist-item-name { font-size: 14px; font-weight: 600; color: var(--text); }
.playlist-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.playlist-item-remove {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: #B0C4D8; background: transparent; border: 0; cursor: pointer;
  flex-shrink: 0; transition: color 120ms ease;
}
.playlist-item-remove svg { width: 18px; height: 18px; }
.playlist-item-remove:hover { color: #C04A28; }

.playlist-empty {
  text-align: center; padding: 32px 24px;
  color: var(--text-muted); font-size: 13px; line-height: 1.5;
}

/* ----- Playlist context banner in player ----- */
.player-playlist-banner {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.16);
  border-radius: 12px;
  padding: 8px 14px;
  margin-bottom: 14px;
  width: 100%;
}
.player-playlist-banner svg { width: 18px; height: 18px; color: white; flex-shrink: 0; }
.player-playlist-text { display: flex; flex-direction: column; line-height: 1.3; }
.player-playlist-name { font-size: 13px; font-weight: 600; }
.player-playlist-progress { font-size: 11px; opacity: 0.9; }

/* ----- Add-to-playlist button on session cards ----- */
.session-add-playlist {
  width: 38px; height: 38px; border-radius: 50%;
  background: #E0EEFB; color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 0; cursor: pointer;
  transition: transform 100ms ease, background 120ms ease;
}
.session-add-playlist svg { width: 18px; height: 18px; }
.session-add-playlist:hover { background: #C9E1F7; }
.session-add-playlist:active { transform: scale(0.9); }

/* ----- Playlist picker overlay ----- */
.playlist-picker-overlay {
  position: fixed; inset: 0;
  background: rgba(11, 43, 74, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 200;
}
.playlist-picker-sheet {
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  width: 100%; max-width: 520px;
  padding: 18px 16px max(18px, env(safe-area-inset-bottom));
  max-height: 70vh; overflow-y: auto;
}
.playlist-picker-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; font-weight: 600; color: var(--text);
  margin-bottom: 14px;
}
.playlist-picker-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer;
}
.playlist-picker-close svg { width: 16px; height: 16px; }
.playlist-picker-list { display: flex; flex-direction: column; gap: 8px; }
.playlist-picker-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg); border: 0.5px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  font-size: 14px; font-weight: 500; color: var(--text);
  cursor: pointer; width: 100%; text-align: left;
  transition: background 120ms ease;
}
.playlist-picker-item:hover { background: #E0EEFB; }
.playlist-picker-count { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.playlist-picker-new { color: var(--brand-dark); font-weight: 600; justify-content: flex-start; }

/* ----- Bottom nav ----- */
.onboarding {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(11, 43, 74, 0.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.onboarding.hidden { display: none; }
.onboarding-card {
  background: #fff; border-radius: 20px; max-width: 380px; width: 100%;
  padding: 28px 24px 22px; text-align: center;
  box-shadow: 0 12px 40px rgba(11, 43, 74, 0.3);
}
.onboarding-step { display: none; }
.onboarding-step.active { display: block; }
.onboarding-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--bg); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 30px;
}
.onboarding-step h2 {
  font-size: 20px; font-weight: 600; color: var(--text); margin: 0 0 10px;
}
.onboarding-step p {
  font-size: 14px; line-height: 1.55; color: var(--text-muted); margin: 0;
}
.onboarding-dots {
  display: flex; justify-content: center; gap: 7px; margin: 22px 0 18px;
}
.onboarding-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border); transition: background 150ms ease, width 150ms ease;
}
.onboarding-dot.active { background: var(--brand); width: 20px; border-radius: 4px; }
.onboarding-btn {
  width: 100%; padding: 13px; border: 0; border-radius: 12px;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background 120ms ease, transform 100ms ease;
}
.onboarding-btn:hover { background: var(--brand-dark); }
.onboarding-btn:active { transform: scale(0.98); }

.mini-player {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  margin: 0 10px 10px;
  margin-bottom: calc(10px + env(safe-area-inset-bottom));
  background: var(--brand);
  color: #fff;
  border-radius: 14px;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  z-index: 11;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(11, 43, 74, 0.22);
}
.mini-player.hidden { display: none; }
.mini-player-dial {
  position: relative; width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.mini-dial-svg { width: 100%; height: 100%; position: absolute; inset: 0; }
#miniDialProgress { transition: stroke-dashoffset 1s linear; }
.mini-dial-freq { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-player-info { flex: 1; min-width: 0; }
.mini-player-title {
  font-size: 13px; font-weight: 600; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-player-sub {
  font-size: 11px; opacity: 0.88; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.mini-player-btn {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.2); border: 0; color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 120ms ease, transform 100ms ease;
}
.mini-player-btn:hover { background: rgba(255,255,255,0.3); }
.mini-player-btn:active { transform: scale(0.92); }
.mini-player-btn svg { width: 18px; height: 18px; }
.mini-player-close svg { width: 16px; height: 16px; }

@media (min-width: 768px) {
  .mini-player {
    bottom: 16px; left: auto; right: 16px; margin: 0;
    width: 340px;
  }
}

.bottom-nav {
  display: none; /* Replaced by the sticky top-nav on all sizes. */
}
.bottom-nav-legacy-unused {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(234, 244, 251, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 0.5px solid var(--border);
  justify-content: space-around;
  padding: 10px 8px max(8px, env(safe-area-inset-bottom));
  z-index: 10;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; color: var(--text-disabled);
  padding: 4px 10px;
  transition: color 120ms ease;
  min-width: 56px;
  position: relative;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--brand-dark); font-weight: 600; }
.nav-item:not(.active):active { color: var(--text-muted); }
.nav-badge {
  position: absolute; top: 0; right: 6px;
  background: var(--brand); color: white;
  font-size: 9px; font-weight: 600;
  padding: 1px 5px; border-radius: 999px;
  min-width: 14px; text-align: center;
}

/* ----- Round button (shared) ----- */
.round-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  transition: transform 100ms ease, background 100ms ease;
  border: 0.5px solid var(--border);
  flex-shrink: 0;
}
.round-btn svg { width: 20px; height: 20px; color: var(--text); }
.round-btn:active { transform: scale(0.92); }
/* Bug A fix: the top-nav now handles "back" globally on all sizes, so the
   per-screen back buttons are redundant. Hide them rather than removing the
   HTML / JS handlers, so we can revert instantly if needed. */
#categoryBack,
#settingsBack,
#playlistBack { display: none; }
.round-btn-light { background: rgba(255,255,255,0.22); border: 0; }
.round-btn-light svg { color: white; }

/* ----- Player ----- */
.screen-player {
  background: var(--bg);
  padding-bottom: 40px;
}
.player-amber {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-darker) 100%);
  color: white;
  padding-bottom: 18px;
  border-radius: 0 0 24px 24px;
}

.player-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 4px;
  padding-top: max(14px, env(safe-area-inset-top));
  gap: 12px;
}
.player-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px;
  opacity: 0.92; font-weight: 600;
  flex: 1; text-align: center;
}

.player-body {
  max-width: 520px; margin: 0 auto;
  padding: 8px 18px 0;
  display: flex; flex-direction: column; align-items: center;
}
.player-category {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px;
  opacity: 0.88; margin-bottom: 6px; font-weight: 600;
}
.player-title {
  font-size: 24px; font-weight: 600; text-align: center;
  margin: 0 0 18px; letter-spacing: -0.3px;
}

.player-dial {
  position: relative;
  width: 188px; height: 188px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.dial-svg { width: 100%; height: 100%; }
#dialProgress { transition: stroke-dashoffset 1s linear; }

.dial-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.dial-freq-row { display: flex; align-items: baseline; gap: 4px; }
.dial-freq { font-size: 34px; font-weight: 600; line-height: 1; letter-spacing: -0.5px; }
.dial-unit { font-size: 13px; opacity: 0.88; }
.dial-divider { width: 66px; height: 1px; background: rgba(255,255,255,0.35); margin: 10px 0; }
.dial-time {
  font-size: 25px; font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.dial-time-label {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.7px;
  opacity: 0.8; margin-top: 4px;
}

.player-controls {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  margin-bottom: 18px;
}
.ctrl-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: white;
  display: flex; align-items: center; justify-content: center;
  transition: transform 100ms ease, background 100ms ease;
  border: 0; padding: 0;
}
.ctrl-btn svg { width: 22px; height: 22px; }
.ctrl-btn:active { transform: scale(0.92); }
.ctrl-btn-main {
  width: 72px; height: 72px;
  background: white; color: var(--brand-dark);
}
.ctrl-btn-main svg { width: 30px; height: 30px; }

.player-duration {
  background: rgba(255,255,255,0.18);
  border-radius: 13px;
  padding: 11px 13px;
  width: 100%;
  margin-bottom: 9px;
}
.player-duration-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 9px;
}
.player-duration-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  font-weight: 600; opacity: 0.92;
}
.player-duration-stepper {
  display: flex; align-items: center; gap: 11px;
}
.player-duration-value {
  font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums;
  min-width: 56px; text-align: center;
}
.duration-step {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.22); border: 0; color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: transform 100ms ease, background 120ms ease;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
}
.duration-step svg { width: 16px; height: 16px; }
.duration-step:active { transform: scale(0.9); }
.duration-step:hover { background: rgba(255,255,255,0.3); }

.duration-presets { display: flex; flex-wrap: nowrap; gap: 5px; }
.duration-chip {
  flex: 1 1 0; min-width: 0;
  text-align: center; font-size: 11px; font-weight: 600;
  padding: 6px 0; background: rgba(255,255,255,0.12); border: 0; color: white;
  border-radius: 7px; cursor: pointer; position: relative;
  font-variant-numeric: tabular-nums;
  transition: background 120ms ease, transform 100ms ease;
}
.duration-chip:active { transform: scale(0.96); }
.duration-chip:hover { background: rgba(255,255,255,0.2); }
.duration-chip.active { background: white; color: var(--brand-dark); }
.duration-chip-dot {
  position: absolute; top: 2px; right: 4px;
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; opacity: 0.85;
}

.duration-reset {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 10px; opacity: 0.85; margin-top: 7px;
}
.duration-reset svg { width: 11px; height: 11px; flex-shrink: 0; }
.duration-reset-link {
  background: transparent; border: 0; color: white; cursor: pointer;
  font-size: 10px; font-weight: 600; text-decoration: underline; padding: 1px 3px;
}
.duration-reset-link:active { opacity: 0.7; }

.player-studied-line {
  text-align: center; font-size: 11px; opacity: 0.9;
  margin-top: 4px; padding: 2px 0;
}

/* "Optimal settings per this study" block inside the clinical study card */
.info-study-optimal {
  background: #E0EEFB;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 12px;
}
.info-study-optimal-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
  font-weight: 600; color: var(--brand-darker); margin-bottom: 5px;
}
.info-study-optimal-value { font-size: 16px; color: var(--text); font-weight: 600; }
.info-study-optimal-intensity { font-size: 14px; color: var(--text-muted); font-weight: 500; margin-top: 4px; }
.info-study-optimal-note { font-size: 13px; color: var(--text-muted); margin-top: 5px; line-height: 1.45; }

.player-volume {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  padding: 12px 14px;
  width: 100%;
  margin-bottom: 4px;
}
.vol-icon { width: 18px; height: 18px; flex-shrink: 0; color: white; }
.vol-labelblock { flex: 1; }
.vol-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  font-weight: 600; opacity: 0.92; margin-bottom: 6px;
}
#volumeSlider {
  width: 100%;
  -webkit-appearance: none; appearance: none;
  height: 4px; background: rgba(255,255,255,0.3); border-radius: 2px;
  outline: none; padding: 0; margin: 0;
}
#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: white; cursor: pointer; border: none;
}
#volumeSlider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: white; cursor: pointer; border: none;
}
.vol-value {
  font-size: 14px; min-width: 28px; text-align: right;
  font-variant-numeric: tabular-nums; font-weight: 600;
}

/* Cream / cream-equivalent (light blue) bottom section with solid white info cards */
.player-info {
  max-width: 520px; margin: 0 auto;
  padding: 16px 16px 24px;
}
.info-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 0.5px solid var(--border);
  box-shadow: 0 1px 2px rgba(11, 43, 74, 0.04);
}
.info-card-label {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px;
  font-weight: 600; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.info-card-label svg { width: 14px; height: 14px; }
.info-outcome   { color: var(--brand-dark); }
.info-nutrition { color: #2A7A48; }
.info-mechanism { color: #6B4FB8; }
.info-study     { color: var(--brand-dark); }

.info-card-body {
  font-size: 16px; color: var(--text); line-height: 1.55;
}
.info-study-title {
  font-size: 16px; font-weight: 600; color: var(--text); margin-top: 2px;
}
.info-study-detail {
  font-size: 14px; color: var(--text-muted); line-height: 1.5; margin-top: 4px;
}
.info-study-pmid {
  font-size: 14px; color: var(--brand-dark); font-weight: 600; margin-top: 8px;
}
.info-study-pmid:empty { display: none; }
.info-study-pmid a { color: var(--brand-dark); text-decoration: none; display: inline-block; padding: 2px 0; }
.info-study-pmid a:hover { text-decoration: underline; }
.info-study-pmid a:active { opacity: 0.7; }
.info-study-ref { margin-top: 12px; padding-top: 12px; border-top: 0.5px solid var(--border, rgba(0,0,0,0.1)); }
.info-study-ref:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.info-study-ref-cite { font-size: 15px; color: var(--text); line-height: 1.5; margin-bottom: 5px; font-weight: 400; }
.info-study-ref-link { font-size: 14px; color: var(--brand-dark); font-weight: 600; text-decoration: none; display: inline-block; padding: 2px 0; }
.info-study-ref-link:hover { text-decoration: underline; }
.info-study-ref-link:active { opacity: 0.7; }
.nutrition-item { padding: 14px 0; border-bottom: 0.5px solid var(--border); }
.nutrition-item:first-child { padding-top: 0; }
.nutrition-item:last-child { padding-bottom: 0; border-bottom: none; }
.nutrition-name { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.nutrition-text { font-size: 16px; color: var(--text); line-height: 1.5; }
.nutrition-source { font-size: 13px; color: var(--text-muted); line-height: 1.4; margin-top: 4px; }
.nutrition-source-link { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.nutrition-source-link:hover { color: var(--brand-darker); }

.player-disclaimer {
  font-size: 12px; color: var(--text-disabled); line-height: 1.5;
  text-align: center; padding: 16px 8px 4px;
}

/* ----- Toast ----- */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(11, 43, 74, 0.94);
  color: white;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 100;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ----- Responsive ----- */
@media (max-width: 360px) {
  .player-dial { width: 168px; height: 168px; }
  .dial-freq { font-size: 30px; }
  .saved-strip-card { width: 140px; }
}

/* ----- Small / older iPhones (SE, mini, ~320-375px): trim the enlarged
   type one step so cards stay readable without overflowing the narrow
   viewport. Mid and large phones keep the full size. ----- */
@media (max-width: 375px) {
  .info-card-label { font-size: 12px; letter-spacing: 0.4px; }
  .info-card-body { font-size: 15px; }
  .info-study-title { font-size: 15px; }
  .info-study-detail { font-size: 13px; }
  .info-study-pmid { font-size: 13px; }
  .info-study-ref-cite { font-size: 14px; }
  .info-study-ref-link { font-size: 13px; }
  .nutrition-name { font-size: 15px; }
  .nutrition-text { font-size: 14px; }
  .nutrition-source { font-size: 12px; }
  .info-study-optimal-value { font-size: 15px; }
  .player-disclaimer { font-size: 11px; }
}

/* ----- Player is full-screen on ALL sizes: hide the top-nav so the player's
   own X / back controls take over. Applies on mobile and desktop. ----- */
body.player-active .top-nav { display: none; }

/* ----- Desktop: 768px and wider ----- */
@media (min-width: 768px) {
  /* Hide the contextual back button on desktop - tabs are always visible and
     screens are wide, so the back arrow isn't needed. */
  .top-nav-back { display: none !important; }

  /* Wider content column with comfortable margins. */
  .screen-inner, .home-inner {
    max-width: 880px;
    padding: 28px 24px 0;
  }

  /* Hide the per-screen settings gear on desktop (top-nav has its own) */
  .home-header .avatar-btn { display: none; }

  /* Saved strip becomes a 3-column row (no horizontal scroll) on desktop */
  .saved-strip {
    overflow-x: visible;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .saved-strip-card { width: auto; }

  /* Library categories - slightly more breathing room */
  .library-category-card { padding: 14px 16px; }

  /* Larger greeting */
  .greeting { font-size: 26px; }

  /* Player keeps its mobile-shaped width centered on desktop -
     a clinical player at 720px-wide would look strange. */
  .screen-player {
    background: var(--bg);
  }
  .player-amber {
    max-width: 520px;
    margin: 0 auto;
    border-radius: 0 0 24px 24px;
  }
  .player-info {
    max-width: 520px;
  }
}


/* ---- Custom session ---- */
.custom-session-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--card, #fff); border: 0.5px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; cursor: pointer;
  text-align: left; transition: transform 0.06s ease;
}
.custom-session-btn:active { transform: scale(0.99); }
.custom-session-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--brand-soft, #e8f1fb); color: var(--brand-dark, #1976C9);
  display: flex; align-items: center; justify-content: center;
}
.custom-session-icon svg { width: 22px; height: 22px; }
.custom-session-body { flex: 1; min-width: 0; }
.custom-session-title { font-size: 16px; font-weight: 600; color: var(--text); }
.custom-session-sub { font-size: 13px; color: var(--text-muted); margin-top: 1px; }
.custom-session-arrow { color: var(--text-muted); flex-shrink: 0; }
.custom-session-arrow svg { width: 20px; height: 20px; }

/* full custom page */
.custom-page-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.custom-page-title { font-size: 22px; font-weight: 600; color: var(--text); margin: 0; }
.custom-page-sub { font-size: 14px; color: var(--text-muted); margin: 2px 0 0; }
.custom-page-body { display: flex; flex-direction: column; gap: 20px; }
.custom-field { display: flex; flex-direction: column; gap: 6px; }
.custom-label { font-size: 14px; font-weight: 600; color: var(--text); }
.custom-sublabel { font-size: 13px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.custom-input {
  font-size: 16px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border, rgba(0,0,0,0.15)); background: var(--bg, #fff);
  color: var(--text); width: 100%; -webkit-appearance: none; box-sizing: border-box;
}
.custom-input:focus { outline: none; border-color: var(--brand-dark, #1976C9); }
.custom-hint { font-size: 12px; color: var(--text-muted); }
.custom-mode-toggle { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.custom-mode-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border, rgba(0,0,0,0.12)); background: var(--bg, #fff);
  color: var(--text-muted); font-size: 14px; font-weight: 600;
}
.custom-mode-btn svg { width: 22px; height: 22px; }
.custom-mode-btn.active {
  border: 2px solid var(--brand-dark, #1976C9);
  background: var(--brand-soft, #e8f1fb); color: var(--brand-dark, #1976C9);
}
.custom-sweep-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.custom-range { width: 100%; accent-color: var(--brand-dark, #1976C9); }
.custom-error {
  font-size: 13px; color: #C0392B; background: #FDECEA;
  border-radius: 10px; padding: 10px 12px; line-height: 1.4;
}
.custom-start-btn {
  font-size: 16px; font-weight: 600; color: #fff;
  background: var(--brand-dark, #1976C9); border: none; border-radius: 12px;
  padding: 14px; cursor: pointer; width: 100%;
}
.custom-start-btn:active { opacity: 0.9; }
.custom-addplaylist-btn {
  font-size: 16px; font-weight: 600; color: var(--brand-dark, #1976C9);
  background: transparent; border: 1.5px solid var(--brand-dark, #1976C9); border-radius: 12px;
  padding: 12px; cursor: pointer; width: 100%; margin-top: 10px;
}
.custom-addplaylist-btn:active { opacity: 0.85; }
.custom-disclaimer { font-size: 11px; color: var(--text-muted); line-height: 1.45; text-align: center; margin: 0; }

/* ---- Sweep range label on player ---- */
.player-sweep-range {
  display: flex; align-items: baseline; justify-content: center; gap: 5px;
  margin: -2px 0 16px; color: #fff; font-size: 14px; font-weight: 500;
  letter-spacing: 0.02em;
}
.player-sweep-range .sweep-tag { opacity: 0.7; font-size: 12px; font-weight: 500; }
.player-sweep-range .sweep-val { font-size: 16px; font-weight: 600; }
.player-sweep-range .sweep-unit { opacity: 0.75; font-size: 12px; margin-left: -2px; }
.player-sweep-range .sweep-sep { opacity: 0.5; margin: 0 4px; }

/* ---- Doc-driven card content ----
   Hierarchy comes from weight, not from dimming the text: the lede is heavier,
   the body is the same near-navy at regular weight. Long evidence paragraphs
   stay fully legible instead of fading into the card. */
.card-lede {
  font-size: 17px; font-weight: 600; color: var(--text);
  line-height: 1.6; margin: 0 0 15px; letter-spacing: -0.005em;
}
.card-body {
  font-size: 16px; font-weight: 400; color: var(--text);
  line-height: 1.75; margin: 0 0 15px;
}
.card-body:last-child, .card-lede:last-child { margin-bottom: 0; }

.nutrition-disclaimer {
  font-size: 14px; color: var(--text-muted); font-style: italic; line-height: 1.65;
  border-top: 0.5px solid var(--border); padding-top: 13px; margin-top: 13px;
}
.info-study-ref-detail {
  font-size: 15px; color: var(--text); line-height: 1.7; margin: 5px 0 7px;
}
.info-study-ref-links { margin-top: 5px; }

/* Safety card — amber, matching the approved preview */
.info-card-safety { background: #FAEEDA; border-color: #EFC988; }
.info-safety { color: #854F0B; }
.info-card-safety .card-lede { color: #43270A; }
.info-card-safety .card-body { color: #4E2F08; }

/* Laptop / desktop: wider measure and a step up in size. */
@media (min-width: 700px) {
  .player-info { max-width: 660px; padding: 20px 20px 28px; }
  .card-lede { font-size: 19px; line-height: 1.55; }
  .card-body { font-size: 17px; line-height: 1.8; }
  .info-study-ref-detail { font-size: 16px; line-height: 1.75; }
  .nutrition-text { font-size: 17px; line-height: 1.7; }
  .nutrition-name { font-size: 17px; }
  .nutrition-disclaimer { font-size: 15px; }
  .info-card { padding: 22px 26px; }
}

/* Older / smaller iPhones: one step down, never below 15px for body copy. */
@media (max-width: 375px) {
  .card-lede { font-size: 16px; }
  .card-body { font-size: 15px; line-height: 1.7; }
  .info-study-ref-detail { font-size: 14px; }
  .nutrition-disclaimer { font-size: 13px; }
}
