/* Picker identity v1 — warm editorial utility */

@property --bg { syntax: "<color>"; inherits: true; initial-value: #281e19; }
@property --rail { syntax: "<color>"; inherits: true; initial-value: #281e19; }
@property --library { syntax: "<color>"; inherits: true; initial-value: #382b24; }
@property --stage { syntax: "<color>"; inherits: true; initial-value: #281e19; }
@property --field { syntax: "<color>"; inherits: true; initial-value: #382b24; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #f4ebdd; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #c6b5a5; }
@property --faint { syntax: "<color>"; inherits: true; initial-value: #a18d7d; }
@property --line { syntax: "<color>"; inherits: true; initial-value: rgba(118, 98, 83, 0.55); }
@property --line-strong { syntax: "<color>"; inherits: true; initial-value: #766253; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #ff7a3d; }
@property --accent-hot { syntax: "<color>"; inherits: true; initial-value: #ff864b; }
@property --accent-ink { syntax: "<color>"; inherits: true; initial-value: #281e19; }
@property --accent-soft { syntax: "<color>"; inherits: true; initial-value: rgba(255, 122, 61, 0.16); }
@property --teal { syntax: "<color>"; inherits: true; initial-value: #8fc4be; }
@property --danger { syntax: "<color>"; inherits: true; initial-value: #e7a092; }
@property --danger-line { syntax: "<color>"; inherits: true; initial-value: rgba(224, 122, 98, 0.5); }
@property --good { syntax: "<color>"; inherits: true; initial-value: #b7d7b4; }
@property --good-bg { syntax: "<color>"; inherits: true; initial-value: #1c2b20; }
@property --info { syntax: "<color>"; inherits: true; initial-value: #8fc4be; }
@property --info-bg { syntax: "<color>"; inherits: true; initial-value: #225e58; }
@property --warn { syntax: "<color>"; inherits: true; initial-value: #f0d7a4; }
@property --warn-bg { syntax: "<color>"; inherits: true; initial-value: #332818; }

:root {
  color-scheme: dark;
  --bg: #281e19;
  --rail: #281e19;
  --library: #382b24;
  --stage: #281e19;
  --field: #382b24;
  --ink: #f4ebdd;
  --muted: #c6b5a5;
  --faint: #a18d7d;
  --line: rgba(118, 98, 83, 0.55);
  --line-strong: #766253;
  --accent: #ff7a3d;
  --accent-hot: #ff864b;
  --accent-ink: #281e19;
  --accent-soft: rgba(255, 122, 61, 0.16);
  --teal: #8fc4be;
  --danger: #e7a092;
  --danger-line: rgba(224, 122, 98, 0.5);
  --good: #b7d7b4;
  --good-bg: #1c2b20;
  --info: #8fc4be;
  --info-bg: #225e58;
  --warn: #f0d7a4;
  --warn-bg: #332818;
  --shadow: 0 18px 40px rgba(40, 30, 25, 0.28);
  --sans: system-ui, sans-serif;
  --display: system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --theme-ease: cubic-bezier(0.45, 0.05, 0.2, 1);
  --theme-duration: 0.9s;
  --radius-control: 8px;
  --radius-panel: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  transition:
    --bg var(--theme-duration) var(--theme-ease),
    --rail var(--theme-duration) var(--theme-ease),
    --library var(--theme-duration) var(--theme-ease),
    --stage var(--theme-duration) var(--theme-ease),
    --field var(--theme-duration) var(--theme-ease),
    --ink var(--theme-duration) var(--theme-ease),
    --muted var(--theme-duration) var(--theme-ease),
    --faint var(--theme-duration) var(--theme-ease),
    --line var(--theme-duration) var(--theme-ease),
    --line-strong var(--theme-duration) var(--theme-ease),
    --accent var(--theme-duration) var(--theme-ease),
    --accent-hot var(--theme-duration) var(--theme-ease),
    --accent-ink var(--theme-duration) var(--theme-ease),
    --accent-soft var(--theme-duration) var(--theme-ease),
    --teal var(--theme-duration) var(--theme-ease),
    --danger var(--theme-duration) var(--theme-ease),
    --danger-line var(--theme-duration) var(--theme-ease),
    --good var(--theme-duration) var(--theme-ease),
    --good-bg var(--theme-duration) var(--theme-ease),
    --info var(--theme-duration) var(--theme-ease),
    --info-bg var(--theme-duration) var(--theme-ease),
    --warn var(--theme-duration) var(--theme-ease),
    --warn-bg var(--theme-duration) var(--theme-ease);
}

body {
  isolation: isolate;
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  background: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(210, 190, 230, 0.45), transparent 58%),
    radial-gradient(900px 480px at 100% 0%, rgba(244, 214, 196, 0.4), transparent 52%);
  transition: opacity var(--theme-duration) var(--theme-ease);
}

html[data-picker-theme="new-age"] body::before {
  opacity: 1;
}

::selection {
  background: #225e58;
  color: #f4ebdd;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  filter: grayscale(0.35);
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 80;
  transform: translateY(-180%);
  border-radius: 2px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

.grain {
  display: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  height: 100dvh;
  grid-template-columns: 252px minmax(280px, 0.92fr) minmax(380px, 1.15fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "mast mast mast"
    "nav bench watch";
}

.mast {
  grid-area: mast;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) repeat(5, auto);
  align-items: center;
  gap: 1.2rem;
  min-height: 4.6rem;
  padding: 0.75rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: var(--rail);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 140px;
  height: auto;
}

.brand-logo--on-light,
.brand-logo--new-age {
  display: none;
}

html[data-picker-theme="new-age"] .brand-logo--on-dark,
html[data-picker-theme="new-age"] .brand-logo--on-light {
  display: none;
}

html[data-picker-theme="new-age"] .brand-logo--new-age {
  display: block;
}

.brand-tagline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 560;
  line-height: 1.25;
}

.brand-verbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.brand-promise {
  color: var(--muted);
  font-weight: 450;
}

.status-line {
  justify-self: end;
  margin: 0;
  max-width: 62ch;
  min-width: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.45;
  display: inline-flex;
  align-items: flex-start;
  gap: 0.52rem;
  transition: color 0.25s var(--ease);
}

.status-line .status-text {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.status-line.is-running {
  color: var(--ink);
}

.status-line .status-dot {
  display: inline-block;
  width: 0.44rem;
  height: 0.44rem;
  margin-top: 0.32rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 162, 58, 0.2), 0 0 8px rgba(232, 162, 58, 0.45);
  flex-shrink: 0;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.status-line.is-running .status-dot {
  display: none;
}

.status-line .status-throbber {
  display: none;
}

.status-line.is-running .status-throbber {
  display: inline-flex;
  margin-top: 0.18rem;
}

.status-line:not(:has(.status-dot)):not(:has(.status-throbber))::before {
  content: "";
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.5rem;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 162, 58, 0.18);
  vertical-align: 0.05rem;
}

/* ============================================================
   Tungsten Film Desk — Brownish / Orange Throbber & Spinner
   ============================================================ */

@keyframes amber-throbber-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes amber-throbber-reverse-spin {
  0% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes amber-throbber-pulse {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.85;
    box-shadow:
      0 0 8px rgba(232, 162, 58, 0.5),
      0 0 16px rgba(184, 94, 22, 0.3);
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
    box-shadow:
      0 0 14px rgba(240, 194, 122, 0.8),
      0 0 28px rgba(232, 162, 58, 0.55),
      0 0 42px rgba(184, 94, 22, 0.3);
  }
}

@keyframes amber-throbber-glow-aura {
  0%, 100% {
    opacity: 0.7;
    filter: drop-shadow(0 0 6px rgba(232, 162, 58, 0.4));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 14px rgba(240, 194, 122, 0.75));
  }
}

.amber-throbber {
  --throbber-size: 1.5rem;
  --throbber-border: 2px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--throbber-size);
  height: var(--throbber-size);
  flex-shrink: 0;
  vertical-align: middle;
  border-radius: 50%;
  pointer-events: none;
  animation: amber-throbber-glow-aura 2.4s ease-in-out infinite;
}

/* Base structural track: hairline deep warm bronze rim */
.amber-throbber-track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: var(--throbber-border) solid rgba(140, 78, 26, 0.24);
}

/* Outer orbital ring: sweeping warm brownish copper to blazing amber/orange */
.amber-throbber::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: var(--throbber-border);
  background: conic-gradient(
    from 0deg,
    rgba(64, 30, 8, 0.05) 0deg,
    rgba(140, 78, 26, 0.28) 60deg,
    #9e5014 140deg,
    #c96e1b 210deg,
    #e8a23a 290deg,
    #f0c27a 340deg,
    #fff4dc 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--throbber-border)), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--throbber-border)), #000 0);
  animation: amber-throbber-spin 0.95s cubic-bezier(0.42, 0.08, 0.58, 0.92) infinite;
}

/* Inner optical aperture / warm tungsten core */
.amber-throbber::after {
  content: "";
  position: absolute;
  width: calc(var(--throbber-size) * 0.34);
  height: calc(var(--throbber-size) * 0.34);
  border-radius: 50%;
  background: radial-gradient(circle, #fff7e6 0%, #f0c27a 35%, #e8a23a 70%, #8c4e1a 100%);
  animation: amber-throbber-pulse 1.8s ease-in-out infinite;
}

/* Internal film spool spokes (optional element inside amber-throbber) */
.amber-throbber-spokes {
  position: absolute;
  inset: calc(var(--throbber-border) * 1.5);
  border-radius: 50%;
  border: 1px dashed rgba(232, 162, 58, 0.32);
  animation: amber-throbber-reverse-spin 3.6s linear infinite;
}

/* Size Modifiers */
.amber-throbber--xs {
  --throbber-size: 0.82rem;
  --throbber-border: 1.5px;
}

.amber-throbber--sm {
  --throbber-size: 1.15rem;
  --throbber-border: 2px;
}

.amber-throbber--md {
  --throbber-size: 1.85rem;
  --throbber-border: 2.5px;
}

.amber-throbber--lg {
  --throbber-size: 3rem;
  --throbber-border: 3.5px;
}

.amber-throbber--xl {
  --throbber-size: 4.5rem;
  --throbber-border: 4.5px;
}

.picker-loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: transparent;
  pointer-events: none;
}

.picker-loader[hidden] {
  display: none;
}

.picker-loader-card {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.picker-loader-card p {
  margin: 0;
  color: var(--ink);
  font: 500 0.85rem/1.2 var(--sans);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Inline progress feedback card / badge */
.amber-progress-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(27, 24, 20, 0.95), rgba(20, 18, 16, 0.95));
  border: 1px solid rgba(232, 162, 58, 0.28);
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 14px rgba(232, 162, 58, 0.08);
}

.amber-progress-card-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.amber-progress-card-title {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.amber-progress-card-sub {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.storage-pill {
  display: grid;
  justify-items: end;
  min-width: 4.5rem;
  padding-left: 0.8rem;
  border-left: 1px solid var(--line);
  line-height: 1;
}

.storage-pill span:first-child {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}

.storage-pill span:last-child {
  margin-top: 0.2rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rail,
.bench,
.watch-column {
  min-width: 0;
  min-height: 0;
}

.rail {
  grid-area: nav;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 16px 16px 16px;
  border-right: 1px solid var(--line);
  background: var(--bg);
}

.nav-brand {
  display: block;
  margin: 0 8px 16px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-rule {
  height: 1px;
  margin: 8px 12px;
  background: var(--line);
}

.nav-more,
.more-action,
.phone-library-head,
.mobile-back,
.phone-icon,
.nav-glyph {
  display: none;
}

.nav-icon {
  width: 22px;
  height: 22px;
  flex: none;
  background-color: var(--muted);
  -webkit-mask-image: url("/brand/icons/picker_leftnav_icons_mask.png");
  mask-image: url("/brand/icons/picker_leftnav_icons_mask.png");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 66px 44px;
  mask-size: 66px 44px;
}

.nav-icon--library { -webkit-mask-position: 0 0; mask-position: 0 0; }
.nav-icon--downloads { -webkit-mask-position: -22px 0; mask-position: -22px 0; }
.nav-icon--transcripts { -webkit-mask-position: -44px 0; mask-position: -44px 0; }
.nav-icon--history { -webkit-mask-position: 0 -22px; mask-position: 0 -22px; }
.nav-icon--playlists { -webkit-mask-position: -22px -22px; mask-position: -22px -22px; }
.nav-icon--favourites { -webkit-mask-position: -44px -22px; mask-position: -44px -22px; }

.workspace-nav label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.workspace-nav .nav-group label:hover,
.workspace-nav .nav-group input:checked + label {
  color: var(--accent);
}

.workspace-nav .nav-group label:hover .nav-icon,
.workspace-nav .nav-group input:checked + label .nav-icon {
  background-color: var(--accent);
}

.workspace-nav .nav-group input:checked + label {
  background: var(--library);
}

.workspace-nav .nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--bg);
}

.search-suggest {
  position: absolute;
  z-index: 1000;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--ink) 14%, transparent);
  max-height: 16rem;
  overflow: auto;
}

#searchFeedSuggest[hidden] {
  display: none;
}

.search-suggest button {
  display: grid;
  width: 100%;
  gap: 0.1rem;
  margin: 0;
  padding: 0.45rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: 560 0.92rem/1.2 var(--sans);
  text-align: left;
  cursor: pointer;
}

.search-suggest button span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.search-suggest button:hover,
.search-suggest button[aria-selected="true"] {
  background: var(--library);
}

.nav-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
}

.nav-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.nav-search-clear {
  display: none;
  place-items: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  margin-right: -4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.nav-search.has-value .nav-search-clear {
  display: grid;
}

.nav-search-clear:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.nav-search:focus-within,
.nav-search:has(.search-suggest:not([hidden])) {
  z-index: 100 !important;
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.nav-panel {
  display: none;
  padding: 1.4rem 1.25rem;
}

.nav-panel h2 {
  margin: 0 0 8px;
}

.nav-panel p {
  margin: 0;
  color: var(--muted);
}

.activity-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.activity-body {
  min-width: 0;
}

.activity-list button {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.activity-action {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
}

.activity-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-detail,
.activity-link {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.activity-detail {
  color: var(--muted);
}

.activity-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.activity-list time {
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.activity-empty {
  margin: 0;
  color: var(--muted);
}

body:has(#activityList:not(:empty)) .activity-empty {
  display: none;
}

@media (max-width: 720px) {
  .activity-list li {
    grid-template-columns: 7.5rem minmax(0, 1fr);
  }

  .activity-list time {
    grid-column: 2;
  }
}

body:has(#desk-youtube:checked) #youtubePanel,
body:has(#desk-feeds:checked) #feedsPanel,
body:has(#desk-shop:checked) #shopPanel,
body:has(#desk-history:checked) #historyPanel,
body:has(#desk-playlists:checked) #playlistsPanel,
body:has(#desk-favourites:checked) #favouritesPanel {
  display: block;
}

#youtubeNav[hidden] {
  display: none;
}

#shopNav .nav-icon,
#youtubeNav .nav-icon,
#feedsNav .nav-icon {
  display: none;
}

#shopNav .nav-glyph,
#youtubeNav .nav-glyph,
#feedsNav .nav-glyph {
  display: block;
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#youtubePanel {
  padding: 0.85rem 1rem 1.5rem 0.5rem;
}

.feed-layout {
  display: grid;
  grid-template-columns: minmax(11rem, 16rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.feed-sources {
  display: grid;
  gap: 0.85rem;
  max-height: calc(100dvh - 8rem);
  overflow: auto;
}

.feed-sources h3 {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feed-sources button {
  display: block;
  width: 100%;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.feed-sources button[aria-pressed="true"] {
  color: var(--accent);
}

.feed-articles {
  display: grid;
}

.feed-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.feed-item a {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.feed-item p {
  margin: 0;
  color: var(--muted);
}

.feed-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.feed-connect {
  max-width: 36rem;
}

.feed-connect .primary-button {
  display: inline-flex;
  margin-top: 0.9rem;
  text-decoration: none;
}

@media (max-width: 760px) {
  .feed-layout {
    grid-template-columns: 1fr;
  }

  .feed-sources {
    max-height: 14rem;
  }
}

#youtubePanel .section-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.yt-home {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0.25rem 1.15rem;
  align-items: start;
}

.yt-rail {
  position: sticky;
  top: 0.5rem;
  min-width: 0;
  max-height: calc(100dvh - 5.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.yt-rail-label {
  margin: 0.85rem 0.55rem 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
}

.yt-channels {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.yt-channel,
.yt-rail-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-width: 0;
  min-height: 2.4rem;
  padding: 0.2rem 0.55rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: 500 0.92rem/1.2 var(--sans);
  text-align: left;
}

.yt-channel-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yt-channel-badge {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 6px color-mix(in srgb, #38bdf8 65%, transparent);
}

.yt-channel[aria-pressed="true"],
.yt-rail-link[aria-pressed="true"] {
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.yt-avatar {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 999px;
  object-fit: cover;
  background: var(--library);
}

.yt-card-body .yt-avatar {
  width: 36px;
  height: 36px;
}

.yt-avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.yt-rail-icon,
.yt-rail-icon-liked {
  width: 22px;
  height: 22px;
  flex: none;
  background: currentColor;
}

.yt-rail-icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 6h12v2H8zm0 5h12v2H8zm0 5h12v2H8zM4 6h2v2H4zm0 5h2v2H4zm0 5h2v2H4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 6h12v2H8zm0 5h12v2H8zm0 5h12v2H8zM4 6h2v2H4zm0 5h2v2H4zm0 5h2v2H4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.yt-rail-icon-liked {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 11v8H5v-8zm3 .2V19h6.2a2 2 0 0 0 2-1.7l1.2-6A2 2 0 0 0 18.4 9H14V6.4A2.4 2.4 0 0 0 11.6 4L11 8.2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 11v8H5v-8zm3 .2V19h6.2a2 2 0 0 0 2-1.7l1.2-6A2 2 0 0 0 18.4 9H14V6.4A2.4 2.4 0 0 0 11.6 4L11 8.2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.yt-main {
  min-width: 0;
}

.yt-chips {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  overflow-x: auto;
  margin: 0 0 1rem;
  padding-bottom: 0.15rem;
  position: sticky;
  top: 0;
  z-index: 2;
}

.yt-search {
  flex: 0 1 14rem;
  min-width: 8.5rem;
  margin-left: auto;
}

.yt-search input {
  width: 100%;
  min-height: 2rem;
  padding: 0.2rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
  font: 500 0.88rem/1 var(--sans);
}

.yt-search input::placeholder {
  color: var(--muted);
}

.yt-chips button {
  flex: none;
  min-height: 2rem;
  padding: 0.2rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
  font: 560 0.88rem/1 var(--sans);
}

.yt-chips button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.yt-topics-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  margin: 0 0 1rem;
  padding: 0.1rem 0 0.4rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.yt-topics-bar::-webkit-scrollbar {
  display: none;
}

.yt-topic-chip {
  flex: none;
  min-height: 2.1rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
  font: 500 0.86rem/1.2 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.yt-topic-chip:hover {
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  border-color: color-mix(in srgb, var(--ink) 25%, transparent);
}

.yt-topic-chip[aria-pressed="true"],
.yt-topic-chip.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  font-weight: 600;
}

.yt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.45rem 0.85rem;
}

.yt-grid.is-shorts {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}

.yt-grid.is-shorts .yt-thumb {
  aspect-ratio: 9 / 16;
}

.yt-channel-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.2rem;
  min-width: 0;
  max-width: 100%;
}

.yt-featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem 0.9rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.yt-featured .yt-card-copy h3 {
  font-size: 1.08rem;
}

@media (max-width: 640px) {
  .yt-featured {
    grid-template-columns: 1fr;
  }
}

.yt-carousel-title {
  margin: 0;
  font-size: 1.15rem;
}

.yt-carousel-frame {
  position: relative;
}

.yt-carousel-track {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0.35rem;
}

.yt-carousel-track::-webkit-scrollbar {
  display: none;
}

.yt-carousel-track .yt-card {
  flex: 0 0 272px;
  scroll-snap-align: start;
}

.yt-carousel-arrow {
  position: absolute;
  top: 62px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 14, 12, 0.82);
  color: #f4ebdd;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.yt-carousel-arrow[hidden] {
  display: none;
}

.yt-carousel-arrow svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yt-carousel-prev {
  left: 0.35rem;
}

.yt-carousel-next {
  right: 0.35rem;
}

.yt-carousel-arrow:hover {
  background: rgba(18, 14, 12, 0.94);
}

.yt-card {
  position: relative;
  display: block;
  min-width: 0;
  border-radius: 14px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.yt-card.is-hiding {
  opacity: 0;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
}

.yt-card-swipe-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  background: linear-gradient(135deg, #e53935, #c62828);
  color: #ffffff;
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  font-weight: 600;
  font-size: 0.9rem;
}

.yt-card-hide-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.yt-card-content {
  position: relative;
  display: grid;
  gap: 0.7rem;
  width: 100%;
  background: var(--bg, #ffffff);
  border-radius: 14px;
  will-change: transform;
  touch-action: pan-y;
}

.yt-card.is-swiping .yt-card-content {
  transition: none !important;
  user-select: none;
}

.yt-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: var(--library);
}

.yt-thumb-wrap {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.yt-thumb img,
.yt-thumb-fallback {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.22s ease-in-out;
}

.yt-thumb img.is-loaded,
.yt-thumb-fallback {
  opacity: 1;
}

.yt-duration {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.yt-card-body {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
}

.yt-hide-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: var(--muted, #666);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.yt-hide-button:hover,
.yt-hide-button:focus-visible {
  opacity: 1;
  background: rgba(229, 57, 53, 0.14);
  color: #e53935;
}

.yt-card-copy h3,
.yt-card-copy p {
  margin: 0;
}

.yt-card-copy h3 {
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-card-copy p {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.yt-empty {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .yt-home {
    grid-template-columns: 1fr;
  }

  .yt-rail {
    position: static;
    display: block;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0 -0.15rem 0.35rem;
    padding: 0.1rem 0 0.45rem;
    scrollbar-width: none;
  }

  .yt-rail::-webkit-scrollbar {
    display: none;
  }

  .yt-rail-label,
  .yt-rail-link {
    display: none;
  }

  .yt-channels {
    display: flex;
    align-items: flex-start;
    gap: 0.15rem;
    width: max-content;
    min-width: 100%;
  }

  .yt-channel {
    flex: 0 0 4.85rem;
    width: 4.85rem;
    min-width: 4.85rem;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.15rem 0.4rem;
    text-align: center;
  }

  .yt-channel .yt-avatar {
    width: 52px;
    height: 52px;
  }

  .yt-channel[aria-pressed="true"] {
    background: transparent;
  }

  .yt-channel[aria-pressed="true"] .yt-avatar {
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink);
  }

  .yt-channel-name {
    display: -webkit-box;
    flex: none;
    width: 100%;
    min-height: 2.4em;
    overflow: hidden;
    font-size: 0.75rem;
    font-weight: 550;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

body:has(#desk-youtube:checked) .library-panel,
body:has(#desk-feeds:checked) .library-panel,
body:has(#desk-history:checked) .library-panel,
body:has(#desk-playlists:checked) .library-panel,
body:has(#desk-feeds:checked) .library-panel,
body:has(#desk-shop:checked) .library-panel,
body:has(#desk-favourites:checked) .library-panel,
body:has(#desk-downloads:checked) .library-panel,
body:has(#desk-transcripts:checked) .bench {
  display: none;
}

.downloads-panel {
  display: none;
  padding: 1.15rem 1.15rem 1.5rem;
}

body:has(#desk-downloads:checked) .downloads-panel {
  display: block;
}

body:has(#desk-downloads:checked) .watch-column,
body:has(#desk-youtube:checked) .watch-column,
body:has(#desk-feeds:checked) .watch-column,
body:has(#desk-history:checked) .watch-column,
body:has(#desk-playlists:checked) .watch-column,
body:has(#desk-feeds:checked) .watch-column,
body:has(#desk-shop:checked) .watch-column,
body:has(#desk-favourites:checked) .watch-column {
  display: none;
}

body:has(#desk-downloads:checked) .app-shell,
body:has(#desk-youtube:checked) .app-shell,
body:has(#desk-feeds:checked) .app-shell,
body:has(#desk-history:checked) .app-shell,
body:has(#desk-playlists:checked) .app-shell,
body:has(#desk-feeds:checked) .app-shell,
body:has(#desk-shop:checked) .app-shell,
body:has(#desk-favourites:checked) .app-shell {
  grid-template-columns: 252px minmax(0, 1fr);
  grid-template-areas:
    "mast mast"
    "nav bench";
}

body:has(#desk-downloads:checked) .bench,
body:has(#desk-youtube:checked) .bench,
body:has(#desk-feeds:checked) .bench,
body:has(#desk-history:checked) .bench,
body:has(#desk-playlists:checked) .bench,
body:has(#desk-feeds:checked) .bench,
body:has(#desk-shop:checked) .bench,
body:has(#desk-favourites:checked) .bench {
  border-right: 0;
}

@media (min-width: 1181px) {
  body:has(#desk-youtube:checked),
  body:has(#desk-feeds:checked) {
    height: 100dvh;
    overflow: hidden;
  }

  body:has(#desk-youtube:checked) .bench,
  body:has(#desk-feeds:checked) .bench {
    overflow: auto;
    min-height: 0;
  }

  body:has(#desk-youtube:checked) .nav-search {
    position: sticky;
    bottom: 0;
    z-index: 4;
    background: var(--bg);
  }
}

body:has(#desk-library:checked) .app-shell {
  grid-template-columns: 252px minmax(380px, 1.15fr) minmax(280px, 0.92fr);
  grid-template-areas:
    "mast mast mast"
    "nav watch bench";
}

body:has(#desk-library:checked) .bench {
  border-right: 0;
  border-left: 1px solid var(--line);
}

body:has(#desk-transcripts:checked) .app-shell {
  grid-template-columns: 252px minmax(0, 1fr);
  grid-template-areas:
    "mast mast"
    "nav watch";
}

.now-playing {
  display: grid;
  gap: 8px;
  margin: 16px 0 8px;
}

.player-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: max-content;
  margin: 0;
  padding: 0.22rem 0.8rem 0.22rem 0.22rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--ink);
  font: 620 0.84rem/1 var(--sans);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent);
}

.player-back[hidden] {
  display: none;
}

.player-back-mark {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform 180ms ease;
}

.player-back svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player-back:hover .player-back-mark,
.player-back:focus-visible .player-back-mark {
  transform: translateX(-3px);
}

@media (prefers-reduced-motion: reduce) {
  .player-back-mark {
    transition: none;
  }
}

.now-playing-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.now-playing h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 650;
  line-height: 1.2;
}

.now-playing p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.watch-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--stage);
}

.watch-tabs label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 0 8px 10px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.watch-tabs svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:has(#watch-summary:checked) .watch-tabs label[for="watch-summary"],
body:has(#watch-transcript:checked) .watch-tabs label[for="watch-transcript"],
body:has(#watch-chapters:checked) .watch-tabs label[for="watch-chapters"] {
  border-bottom-color: var(--teal);
  color: var(--teal);
}

.summary-panel,
.transcript-panel,
.chapters-panel {
  display: none;
}

body:has(#watch-summary:checked) .summary-panel,
body:has(#watch-transcript:checked) .transcript-panel,
body:has(#watch-chapters:checked) .chapters-panel {
  display: block;
}

body:has(#desk-transcripts:checked) .player-panel,
body:has(#desk-transcripts:checked) .chapters-panel,
body:has(#desk-transcripts:checked) .source-panel,
body:has(#desk-library:checked) .source-panel {
  display: none;
}

body:has(#desk-transcripts:checked) .transcript-panel {
  display: block;
}

.chapter-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chapter-list button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.chapter-time {
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}

.chapters-panel {
  padding: 0.85rem 1rem 1.35rem;
}

.chapter-empty {
  display: grid;
  place-items: center;
  align-content: start;
  gap: 0.55rem;
  min-height: min(42vh, 18rem);
  margin: 0.35rem 0 0;
  padding: 1.25rem 1.35rem 2rem;
  text-align: center;
}

.chapter-empty-mark {
  width: min(11rem, 52vw);
  aspect-ratio: 1;
  margin: 0 auto 0.35rem;
  background: url("/brand/logos/picker-mark-dark.svg") center / 72% no-repeat;
  opacity: 0.14;
  filter: saturate(0.85);
  pointer-events: none;
}

.chapter-empty-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.chapter-empty-copy {
  margin: 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.chapter-empty-note {
  margin: 0.25rem 0 0;
  max-width: 38ch;
  color: var(--faint);
  font-size: 0.875rem;
  line-height: 1.5;
}

.chapter-empty[data-tone="loading"] .chapter-empty-mark {
  opacity: 0.1;
  animation: chapter-empty-pulse 1.6s ease-in-out infinite;
}

@keyframes chapter-empty-pulse {
  0%,
  100% {
    opacity: 0.08;
    transform: scale(0.98);
  }

  50% {
    opacity: 0.16;
    transform: scale(1);
  }
}

body:has(#chapterList:not(:empty)) .chapter-empty {
  display: none;
}

html[data-picker-theme="new-age"] .chapter-empty-mark {
  background-image: url("/brand/logos/picker-mark-light.svg");
  opacity: 0.11;
  filter: none;
}

html[data-picker-theme="new-age"] .chapter-empty-title {
  color: var(--ink);
}

html[data-picker-theme="new-age"] .chapter-empty-copy {
  color: var(--muted);
}

html[data-picker-theme="new-age"] .chapter-empty-note {
  color: var(--faint);
}

.topic-search,
.library-topic {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.library-topic {
  margin: 0;
  padding: 0;
  border-top: 0;
}

.library-topic h3 {
  margin: 0;
  font-size: 0.95rem;
}

.topic-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.topic-sources button {
  min-height: 2rem;
  padding: 0.15rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 560 0.82rem/1 var(--sans);
}

.topic-sources button[aria-pressed="true"] {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
}

.topic-results {
  display: grid;
}

.topic-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.35rem 0;
  border-top: 1px solid var(--line);
}

.topic-result-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.topic-feedback {
  display: inline-flex;
  gap: 0.2rem;
}

.topic-vote {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.action-notice {
  position: fixed;
  z-index: 90;
  margin: 0;
  padding: 0.42rem 0.7rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 90%, var(--stage));
  color: var(--bg);
  font: 600 0.8rem/1.2 var(--sans);
  box-shadow: 0 10px 24px rgba(20, 12, 8, 0.28);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.action-notice.is-shown {
  opacity: 1;
  transform: translateY(0);
}

.action-notice[hidden] {
  display: none;
}

@keyframes action-pop {
  0% { transform: scale(1); }
  32% { transform: scale(0.78); }
  64% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

.is-action-pop {
  animation: action-pop 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .action-notice,
  .action-notice.is-shown {
    transition: none;
    transform: none;
  }

  .is-action-pop {
    animation: none;
  }
}

.topic-vote svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topic-vote[aria-pressed="true"] {
  border-color: transparent;
  color: var(--accent-ink);
}

.topic-vote-up[aria-pressed="true"] {
  background: var(--good);
}

.topic-vote-down[aria-pressed="true"] {
  background: color-mix(in srgb, var(--danger) 72%, var(--stage));
  color: var(--ink);
}

html[data-picker-theme="new-age"] .topic-vote-down[aria-pressed="true"] {
  background: #f8e4e6;
  color: #8b3a45;
}

.topic-open {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
  padding: 0.2rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.topic-open:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.topic-download {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
}

.topic-download svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topic-download[aria-pressed="true"] {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
}

.topic-thumb-wrap {
  position: relative;
  width: 4.6rem;
  height: 3.2rem;
  flex: 0 0 auto;
}

.topic-thumb-wrap img,
.topic-thumb-wrap .topic-thumb-fallback {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  background: var(--field);
}

.topic-thumb-wrap .playing-mark svg {
  width: 1.65rem;
  height: 1.65rem;
  padding: 0.38rem 0.32rem 0.38rem 0.44rem;
}

.topic-result.is-current-in-player .topic-open {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.topic-now-badge {
  display: inline-flex;
  margin-right: 0.35rem;
  vertical-align: -0.12em;
  color: var(--teal);
}

.topic-now-badge svg {
  width: 0.82rem;
  height: 0.82rem;
  fill: currentColor;
}

.now-playing-actions .player-feedback {
  gap: 0.2rem;
}

.now-playing-actions .topic-vote {
  width: 2.15rem;
  height: 2.15rem;
}

.now-playing-actions [data-tooltip],
.card-actions [data-tooltip],
.topic-result-actions [data-tooltip],
.yt-hide-button[data-tooltip] {
  position: relative;
}

.now-playing-actions [data-tooltip]::after,
.card-actions [data-tooltip]::after,
.topic-result-actions [data-tooltip]::after,
.yt-hide-button[data-tooltip]::after,
.yt-carousel-arrow[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(100% + 0.5rem);
  width: max-content;
  max-width: 13rem;
  padding: 0.38rem 0.52rem;
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  font: 600 0.72rem/1.2 var(--sans);
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.2rem);
  transition: opacity 120ms ease, transform 120ms ease;
}

.now-playing-actions [data-tooltip]:hover::after,
.now-playing-actions [data-tooltip]:focus-visible::after,
.card-actions [data-tooltip]:hover::after,
.card-actions [data-tooltip]:focus-visible::after,
.topic-result-actions [data-tooltip]:hover::after,
.topic-result-actions [data-tooltip]:focus-visible::after,
.yt-hide-button[data-tooltip]:hover::after,
.yt-hide-button[data-tooltip]:focus-visible::after,
.yt-carousel-arrow[data-tooltip]:hover::after,
.yt-carousel-arrow[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .now-playing-actions [data-tooltip]::after,
  .card-actions [data-tooltip]::after,
  .topic-result-actions [data-tooltip]::after,
  .yt-hide-button[data-tooltip]::after,
  .yt-carousel-arrow[data-tooltip]::after {
    transition: none;
  }
}

.topic-result strong,
.topic-result span span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-result span span {
  color: var(--muted);
  font-size: 0.78rem;
}

dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 1.5rem 1.75rem 2rem;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: var(--bg);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(30, 22, 18, 0.78);
  backdrop-filter: blur(4px);
}

.dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
}

.import-panel {
  display: grid;
  gap: 12px;
}

.bench {
  grid-area: bench;
  background: var(--library);
  border-right: 1px solid var(--line);
}

.watch-column {
  grid-area: watch;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(232, 162, 58, 0.05), transparent 12rem),
    var(--stage);
  container-type: inline-size;
}

.collection-panel,
.import-panel {
  padding: 0.85rem 0 1rem;
  border-bottom: 1px solid var(--line);
}

.player-panel,
.transcript-panel,
.source-panel {
  padding: 0.95rem 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.player-panel {
  border-bottom: 0;
  padding-bottom: 0.35rem;
}

.summary-panel {
  padding: 0.85rem 1rem 1.2rem;
}

.transcript-panel .transcript-actions {
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
}

.transcript-target {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
  margin: 0 0 0 0.35rem;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.3;
}

.transcript-target[data-empty="true"] {
  color: var(--muted);
  font-weight: 500;
}

.transcript-target-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.transcript-target[data-empty="true"] .transcript-target-title {
  font-weight: 500;
}

.transcript-target-speaker:empty {
  display: none;
}

.transcript-target-speaker {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.section-heading.compact {
  margin-bottom: 0.65rem;
}

.library-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.library-filter-bar {
  flex: 0 0 auto;
  padding: 0.8rem 1rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

.library-filter-bar .library-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.library-block {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.library-block[hidden] {
  display: none;
}

.library-block--latest {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
}

.library-block--queue {
  flex: 1;
  min-height: 0;
}

.library-block-header {
  padding: 0.85rem 1rem 0.65rem;
}

.library-block--queue .library-block-header {
  padding-bottom: 0.45rem;
}

.library-block-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.library-block-chevron {
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.28rem;
  flex: 0 0 auto;
  transition: transform 160ms var(--ease);
}

.library-block.is-collapsed .library-block-chevron {
  transform: rotate(-90deg);
}

.library-block-heading {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.library-block-title {
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.2;
}

.library-block--queue .library-totals {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.library-block-body {
  min-height: 0;
}

.library-block.is-collapsed .library-block-body {
  display: none;
}

.library-block--latest:not(.is-collapsed) .library-block-body {
  max-height: min(42vh, 26rem);
  overflow: auto;
  padding: 0 1rem 0.85rem;
}

.library-block--queue .library-block-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.library-block--queue .queue-heading {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0 1rem 0.75rem;
}

.library-filters button {
  min-height: 2rem;
  padding: 0.15rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 560 0.82rem/1 var(--sans);
}

.library-filters button[aria-pressed="true"] {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
}

.library-filter-status {
  flex: 1 0 100%;
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.thumb-style {
  position: relative;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(244, 235, 221, 0.06);
  box-shadow: inset 0 0 0 1px rgba(244, 235, 221, 0.1);
}

.theme-thumb {
  position: absolute;
  z-index: 0;
  top: 3px;
  left: 0;
  height: calc(100% - 6px);
  border-radius: 999px;
  background: var(--accent);
  pointer-events: none;
  transition: transform var(--theme-duration) var(--theme-ease), width var(--theme-duration) var(--theme-ease);
}

.thumb-style button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.75rem;
  padding: 0.15rem 0.72rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 560 0.75rem/1 var(--sans);
  letter-spacing: 0.01em;
  transition: color var(--theme-duration) var(--theme-ease);
}

.theme-icon {
  width: 0.9rem;
  height: 0.9rem;
  flex: none;
}

.thumb-style button[aria-pressed="true"] {
  background: transparent;
  color: var(--accent-ink);
}

@media (prefers-reduced-motion: reduce) {
  .theme-thumb,
  .thumb-style button {
    transition: none;
  }
}

.thumb-style button:hover {
  color: var(--ink);
}

.thumb-style button[aria-pressed="true"]:hover {
  color: var(--accent-ink);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 560;
}

h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.eyebrow {
  margin: 0 0 0.28rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.collection-total {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.recent-sources {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.recent-source-value {
  display: block;
  overflow: hidden;
  color: var(--accent-hot);
  font-size: 0.8rem;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--accent-hot);
}

label {
  display: grid;
  gap: 0.35rem;
  color: #cfc3b2;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

label[for="htmlPaste"] {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--field);
  color: var(--ink);
  padding: 0.68rem 0.72rem;
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--sans);
  font-size: 0.95rem;
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: #9a8e7e;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 55%,
    calc(100% - 9px) 55%;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
  padding-right: 1.6rem;
}

.url-form,
.collection-create,
.fallback-box,
.metadata-grid,
.transcript-grid,
.page-import-box,
.history-box {
  display: grid;
  gap: 0.7rem;
}

.input-row,
.button-row,
.filter-row,
.tool-strip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.input-row {
  align-items: stretch;
  flex-wrap: wrap;
}

.rail .input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.rail .folder-scan-card .input-row {
  grid-template-columns: 1fr 1fr;
}

.rail .folder-scan-card .input-row input {
  grid-column: 1 / -1;
}

.input-row input,
.input-row select {
  flex: 1 1 9rem;
}

.button-row {
  flex-wrap: wrap;
}

.button-row.tight {
  gap: 0.35rem;
}

.filter-row {
  flex: 1 1 16rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter-row input {
  width: min(16rem, 100%);
  flex: 1 1 10rem;
}

.glyph {
  display: inline-flex;
  width: 0.9rem;
  height: 0.9rem;
}

.glyph svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.account-link,
.account-sign-out,
.cms-edit {
  min-height: 2rem;
  padding: 0.2rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 560 0.82rem/1 var(--sans);
  text-decoration: none;
}

.account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  color: var(--muted);
}

.account-link:hover {
  color: var(--ink);
}

.global-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.global-search-trigger:hover {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
  transform: scale(1.04);
}

.header-bag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0 0.35rem;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink);
  font: 600 0.875rem/1 var(--sans);
  cursor: pointer;
  transition: background 160ms var(--ease);
}

.header-bag:hover {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.header-bag svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-bag-count {
  display: inline-flex;
  gap: 0.25rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.global-search-dialog {
  width: min(680px, 94vw);
  max-height: 85vh;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--library);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.global-search-dialog::backdrop {
  background: rgba(18, 14, 12, 0.75);
  backdrop-filter: blur(6px);
}

.global-search-container {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.global-search-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
}

.global-search-input-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.global-search-input-icon {
  position: absolute;
  left: 0.85rem;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--muted);
  pointer-events: none;
}

.global-search-input-box input {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.4rem 2.4rem 0.4rem 2.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--ink);
  font: 500 0.95rem/1.2 var(--sans);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.global-search-input-box input:focus {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.global-search-clear {
  position: absolute;
  right: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
}

.global-search-clear:hover {
  color: var(--ink);
}

.global-search-close-form {
  margin: 0;
  display: flex;
}

.global-search-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.global-search-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.global-search-recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.global-search-recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.global-search-recent-chip:hover {
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}

.global-search-recent-del {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0;
  cursor: pointer;
}

.global-search-recent-del:hover {
  color: var(--ink);
}

.global-search-clear-all {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
}

.global-search-autocomplete {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.global-search-autocomplete-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 550;
  cursor: pointer;
}

.global-search-autocomplete-chip:hover {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}

.global-search-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.global-search-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.global-search-item:hover {
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  border-color: color-mix(in srgb, var(--ink) 18%, transparent);
}

.global-search-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.global-search-item-info {
  flex: 1;
  min-width: 0;
}

.global-search-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-item-title mark {
  background: color-mix(in srgb, var(--accent) 35%, transparent);
  color: inherit;
  padding: 0 0.15rem;
  border-radius: 3px;
}

.global-search-item-sub {
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

.global-search-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  color: var(--muted);
  flex-shrink: 0;
  text-transform: uppercase;
}

.account-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.account-icon-outline {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-icon-full {
  display: none;
  fill: currentColor;
  stroke: none;
}

.account-link[data-signed-in="true"] .account-icon-outline {
  display: none;
}

.account-link[data-signed-in="true"] .account-icon-full {
  display: block;
}

.account-link[data-signed-in="true"] {
  display: inline-flex;
}

#accountChip #accountSignOut {
  display: none;
}

.account-link[aria-disabled="true"] {
  pointer-events: none;
}

.account-form {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1.15rem;
}

.account-form:last-child {
  margin-bottom: 0;
}

.account-form h3 {
  margin: 0 0 0.3rem 0;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.account-form label {
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.account-form input {
  min-height: 2.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--field);
  color: var(--ink);
  font-size: 0.9rem;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.account-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.account-form button[type="submit"] {
  min-height: 2.55rem;
  margin-top: 0.2rem;
  font-size: 0.9rem;
}

.account-google {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  margin: 0 0 1.15rem;
  border-radius: 999px;
  background: var(--accent);
  color: #281e19;
  font-weight: 650;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(255, 122, 61, 0.22);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease);
}

.account-google:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 122, 61, 0.32);
}

html[data-picker-theme="new-age"] .account-google {
  color: #f6f3f0;
}

.account-session {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.account-session p {
  margin: 0;
  font: 560 0.95rem/1.4 var(--sans);
}

.account-session-email {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

#accountDialog [hidden] {
  display: none !important;
}

.account-sign-out-action {
  width: 100%;
  min-height: 2.65rem;
  font-size: 0.9rem;
}

#accountDialog {
  width: min(29rem, calc(100vw - 2rem));
  max-height: min(90dvh, 780px);
  overflow: hidden;
  padding: 1.4rem 1.75rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--stage);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(20, 12, 8, 0.42);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    background 160ms var(--ease),
    border-color 160ms var(--ease),
    color 160ms var(--ease),
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled:hover,
.secondary-button:disabled:hover,
.ghost-button:disabled:hover,
.danger-button:disabled:hover {
  transform: none;
  filter: grayscale(0.35);
}

.primary-button {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  font-weight: 650;
}

.primary-button:hover {
  filter: brightness(1.08);
}

.secondary-button {
  background: #2a241c;
  color: var(--ink);
  border-color: var(--line-strong);
}

.secondary-button:hover {
  border-color: rgba(232, 162, 58, 0.55);
}

.ghost-button {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.ghost-button:hover {
  border-color: rgba(232, 162, 58, 0.65);
  background: rgba(232, 162, 58, 0.08);
}

.danger-button {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger-line);
}

.danger-button:hover {
  background: rgba(224, 122, 98, 0.12);
}

.compact-button {
  min-height: 2rem;
  padding: 0 0.55rem;
  font-size: 0.75rem;
}

.hint,
.empty-note {
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
}

.folder-scan-card {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.85rem;
  background:
    linear-gradient(var(--accent), var(--accent)) left top / 12px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left top / 1px 12px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top / 12px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top / 1px 12px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 12px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 1px 12px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 12px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 1px 12px no-repeat,
    rgba(232, 162, 58, 0.05);
  border: 1px solid rgba(232, 162, 58, 0.28);
}

.folder-scan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.folder-scan-header .eyebrow {
  margin-bottom: 0.15rem;
}

.folder-badge {
  flex: none;
  border: 1px solid rgba(232, 162, 58, 0.4);
  padding: 0.2rem 0.4rem;
  color: var(--accent-hot);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.folder-options-row {
  margin-top: 0.1rem;
}

.disclosure {
  border-top: 1px solid var(--line);
  padding-top: 0.15rem;
}

.disclosure + .disclosure {
  margin-top: 0.35rem;
}

.page-import-box summary,
.fallback-box summary,
.history-box summary,
#sourceDisclosure summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.4rem;
  color: var(--ink);
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
}

.page-import-box summary::-webkit-details-marker,
.fallback-box summary::-webkit-details-marker,
.history-box summary::-webkit-details-marker,
#sourceDisclosure summary::-webkit-details-marker {
  display: none;
}

.page-import-box summary::after,
.fallback-box summary::after,
.history-box summary::after,
#sourceDisclosure summary::after {
  content: "+";
  margin-left: auto;
  color: var(--accent);
  font-family: var(--mono);
}

.page-import-box[open] > summary::after,
.fallback-box[open] > summary::after,
.history-box[open] > summary::after,
#sourceDisclosure[open] > summary::after {
  content: "–";
}

.page-import-box[open] > summary,
.fallback-box[open] > summary,
.history-box[open] > summary {
  margin-bottom: 0.65rem;
}

.history-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.4rem;
  height: 1.3rem;
  padding: 0 0.3rem;
  background: var(--accent-soft);
  color: var(--accent-hot);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.history-list {
  display: grid;
  gap: 0.45rem;
  max-height: 16rem;
  overflow: auto;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 0.55rem;
  align-items: center;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--line);
  background: rgba(16, 14, 12, 0.45);
}

.history-item[data-status="blocked"] {
  border-color: var(--danger-line);
}

.history-item[data-status="completed"] {
  border-color: rgba(183, 215, 180, 0.28);
}

.history-url {
  overflow: hidden;
  color: var(--accent-hot);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.35;
}

.history-use {
  grid-row: 1 / span 2;
  grid-column: 2;
  min-height: 2rem;
}

.history-clear {
  justify-self: start;
  margin-top: 0.35rem;
}

.collection-create {
  margin-top: 0.85rem;
}

.collection-list {
  display: grid;
  gap: 0.15rem;
  max-height: min(18rem, 38vh);
  overflow: auto;
}

.collection-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 2.45rem;
  padding: 0.4rem 0.55rem;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.collection-item:hover {
  background: rgba(243, 234, 223, 0.05);
}

.collection-item[aria-current="true"] {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}

.collection-item strong {
  overflow: hidden;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-item span {
  min-width: 1.4rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-align: right;
}

.collection-actions {
  margin-top: 0.7rem;
}

.collection-actions .button-row button {
  flex: 1;
}

.bulk-manager {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.bulk-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  font-size: 0.84rem;
}

.bulk-heading strong {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.library-offline-bar {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem 1rem 0.85rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(232, 162, 58, 0.045);
}

.library-offline-copy {
  display: grid;
  gap: 0.15rem;
}

.library-offline-copy strong,
.offline-destination strong {
  font-size: 0.84rem;
  font-weight: 600;
}

.library-offline-copy span,
.offline-destination span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.library-offline-bar > .button-row {
  justify-content: flex-start;
}

.offline-destination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.library-offline-copy,
.offline-destination > div {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.offline-destination .ghost-button {
  flex: none;
}

.permission-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.permission-check input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--accent);
}

.proofread-options-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: -0.25rem;
  padding: 0.15rem 0.1rem;
}

/* Script Desk Search & Index Pills */
.transcript-search-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding: 0.85rem;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
}

.transcript-search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.transcript-search-field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.transcript-search-field .search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--muted, #94a3b8);
  pointer-events: none;
}

.transcript-search-field input {
  width: 100%;
  padding: 0.55rem 2.2rem;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--field);
  color: var(--ink);
  font-size: 0.84rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.transcript-search-field input::placeholder {
  color: var(--muted);
}

.transcript-search-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.clear-search-btn {
  position: absolute;
  right: 0.6rem;
  background: transparent;
  border: none;
  color: var(--muted, #94a3b8);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.clear-search-btn:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.search-match-count {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}

/* Index Pills Section */
.transcript-pills-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pills-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pills-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #94a3b8);
}

.pills-count-badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.15rem 0.45rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--muted);
}

.transcript-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  max-height: 7.5rem;
  overflow-y: auto;
  padding-right: 0.2rem;
  scrollbar-width: thin;
}

.empty-pills-notice {
  font-size: 0.76rem;
  color: var(--muted, #94a3b8);
  font-style: italic;
  padding: 0.25rem 0;
}

.pill-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
  transition: color 160ms var(--ease);
}

.pill-tag:hover,
.pill-tag:focus-visible {
  color: var(--accent);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.pill-tag.active,
.pill-tag.type-author,
.pill-tag.type-subject,
.pill-tag.type-term,
.pill-tag.type-author:hover,
.pill-tag.type-subject:hover,
.pill-tag.type-term:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.pill-tag.active {
  color: var(--accent);
}

.pill-tag .pill-count {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 1;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

/* Script Desk Search Results Panel */
.script-desk-results-panel {
  display: flex;
  flex-direction: column;
  max-height: 14rem;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.script-desk-results-panel[hidden] {
  display: none;
}

.no-results-notice {
  font-size: 0.78rem;
  color: var(--muted, #94a3b8);
  font-style: italic;
  padding: 0.35rem 0.2rem;
}

.script-desk-result-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease;
}

.script-desk-result-card:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.script-desk-result-card.active-video {
  background: var(--accent-soft);
}

.result-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.result-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.result-card-speaker {
  font-size: 0.75rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.result-card-snippet {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-card-snippet mark {
  background: #225e58;
  color: #f4ebdd;
  padding: 0 0.2rem;
  border-radius: var(--radius-control);
}

.bulk-download-progress,
.card-download-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.bulk-download-progress[hidden],
.card-download-progress[hidden] {
  display: none;
}

.bulk-download-progress span,
.card-download-progress span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  white-space: nowrap;
}

.bulk-download-report {
  display: grid;
  gap: 0.65rem;
  max-height: 12rem;
  overflow: auto;
  padding: 0.75rem;
  border: 1px solid var(--danger-line);
  background: rgba(58, 34, 28, 0.46);
  color: var(--muted);
}

.bulk-download-report[hidden] {
  display: none;
}

.bulk-download-report strong {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
}

.bulk-download-report ul {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bulk-download-report li {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  padding-left: 0.55rem;
  border-left: 2px solid rgba(231, 160, 146, 0.48);
}

.bulk-report-title,
.bulk-report-message {
  overflow-wrap: anywhere;
}

.bulk-report-title {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 600;
}

.bulk-report-message {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.45;
}

progress {
  width: 100%;
  height: 0.4rem;
  border: 0;
  border-radius: 99px;
  background: rgba(243, 234, 223, 0.12);
  overflow: hidden;
  appearance: none;
}

progress::-webkit-progress-bar {
  background: rgba(243, 234, 223, 0.12);
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, #c47a2a, var(--accent-hot));
}

progress::-moz-progress-bar {
  background: var(--accent);
}

.video-list {
  position: relative;
  counter-reset: reel;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.video-card {
  counter-increment: reel;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.2rem 0.15rem;
  padding: 0.55rem 0.65rem 0.55rem 0.35rem;
  transition: background 160ms var(--ease);
}

.video-card:hover,
.video-card:focus-within {
  background: rgba(243, 234, 223, 0.04);
}

.video-card.selected {
  background: rgba(232, 162, 58, 0.07);
}

.video-card.active {
  background:
    linear-gradient(90deg, rgba(232, 162, 58, 0.2), rgba(232, 162, 58, 0.04) 55%, transparent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.video-select {
  display: grid;
  place-items: center;
  padding: 0.35rem;
}

.video-select-input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--accent);
}

.card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.9rem;
  align-items: center;
  width: 100%;
  min-height: 6rem;
  padding: 0.1rem 0.15rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.card-main::before {
  content: none;
}

.card-thumb {
  position: relative;
  grid-column: 1;
  display: grid;
  place-items: center;
  width: 6rem;
  height: 6rem;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 122, 61, 0.16), rgba(40, 30, 25, 0.2)),
    #2a211c;
  box-shadow: inset 0 0 0 1px rgba(244, 235, 221, 0.08);
}

.thumb-spinner {
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid rgba(244, 235, 221, 0.28);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: thumb-spin 0.7s linear infinite;
}

@keyframes thumb-spin {
  to { transform: rotate(360deg); }
}

.thumb-render {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: rgba(40, 30, 25, 0.62);
  color: var(--ink);
  cursor: pointer;
}

.thumb-render svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thumb-render:hover,
.thumb-render:focus-visible {
  background: var(--accent);
  color: var(--accent-ink);
}

.card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  align-self: stretch;
  justify-self: stretch;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.22s ease-in-out;
}

.card-thumb img.is-loaded {
  opacity: 1;
}

.playing-mark {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.playing-mark svg {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.58rem 0.5rem 0.58rem 0.68rem;
  border-radius: 50%;
  background: var(--accent);
  fill: var(--accent-ink);
  box-shadow: 0 8px 18px rgba(20, 14, 12, 0.42);
}

.card-copy {
  grid-column: 2;
  display: grid;
  align-content: center;
  gap: 0.16rem;
  min-width: 0;
}

.card-copy strong,
.card-copy span {
  display: block;
  min-width: 0;
}

.card-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: 640;
  line-height: 1.22;
  letter-spacing: -0.015em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.library-totals {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.card-speaker,
.card-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  color: #b3a394;
  font-size: 0.78rem;
}

.card-duration {
  position: absolute;
  left: 0.35rem;
  bottom: 0.35rem;
  z-index: 1;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(20, 14, 12, 0.72);
  color: #f4ebdd;
  font: 600 0.75rem/1.2 var(--sans);
}

.add-to-list,
.favourite-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-right: 0.15rem;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
}

.add-to-list svg,
.favourite-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.add-to-list:hover,
.add-to-list.is-listed,
.favourite-toggle:hover,
.favourite-toggle.is-favourite {
  color: var(--accent);
}

.favourite-toggle .heart-solid {
  display: none;
}

.favourite-toggle.is-favourite {
  color: var(--accent);
}

.favourite-toggle.is-favourite .heart-line {
  display: none;
}

.favourite-toggle.is-favourite .heart-solid {
  display: block;
  fill: currentColor;
  stroke: none;
}

.card-actions,
.now-playing-actions {
  display: flex;
  align-items: center;
}

.now-playing .add-to-list,
.now-playing .favourite-toggle {
  flex: 0 0 auto;
  margin: 6px 0 0;
}

.playlist-create {
  display: grid;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.playlist-create label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
}

.playlist-empty {
  margin: 0;
  color: var(--muted);
}

.playlist-list {
  display: grid;
  gap: 1.25rem;
}

.playlist-block header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.35rem;
}

.playlist-block.is-collapsed header {
  margin-bottom: 0;
}

.playlist-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.playlist-chevron {
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.22rem;
  flex: 0 0 auto;
  transition: transform 160ms var(--ease);
}

.playlist-block.is-collapsed .playlist-chevron {
  transform: rotate(-90deg);
}

.playlist-heading {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.playlist-name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.playlist-videos[hidden] {
  display: none;
}

.playlist-count {
  color: var(--muted);
  font-size: 0.78rem;
}

.playlist-videos {
  margin: 0;
  padding: 0;
  list-style: none;
}

.playlist-videos li {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.playlist-videos button {
  min-width: 0;
  padding: 0.7rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.playlist-videos .playlist-open {
  flex: 1;
}

.playlist-videos .favourite-toggle {
  flex: 0 0 auto;
  padding: 0;
}

.playlist-videos .playlist-open span,
.playlist-note {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.playlist-videos .playlist-remove,
.playlist-delete,
.playlist-add {
  flex: 0 0 auto;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
}

.playlist-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 0 0 auto;
}

.playlist-remove:hover,
.playlist-delete:hover,
.playlist-add:hover,
.playlist-add[aria-expanded="true"] {
  color: var(--accent);
}

.playlist-play {
  flex: 0 0 auto;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.78rem;
}

.playlist-play:hover {
  color: var(--ink);
}

.playlist-block.is-playing .playlist-name {
  color: var(--accent);
}

.playlist-adder {
  display: grid;
  gap: 0.65rem;
  margin: 0.15rem 0 0.85rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
}

.playlist-add-results {
  max-height: 16rem;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.playlist-add-results[hidden],
.playlist-add-note[hidden],
.playlist-add-toolbar [data-playlist-add-all][hidden] {
  display: none;
}

.playlist-add-results input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

.playlist-add-results li:last-child {
  border-bottom: 0;
}

.playlist-add-results label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.35rem 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.playlist-add-results label span span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 450;
}

.playlist-add-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.playlist-add-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.playlist-add-toolbar [data-playlist-add-all] {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
}

.playlist-add-toolbar [data-playlist-add-all]:hover {
  color: var(--accent);
}

.playlist-menu {
  position: fixed;
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(18rem, calc(100vw - 16px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--library);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.menu-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.menu-close svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.8;
  display: block;
}

.menu-close:hover,
.menu-close:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  border-color: var(--ink);
  transform: scale(1.06);
}

.playlist-menu[hidden] {
  display: none;
}

.playlist-menu-lead {
  margin: 0;
  padding-right: 1.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.playlist-menu-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.playlist-menu-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0.45rem 0.2rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.playlist-menu-list button[aria-pressed="true"] {
  color: var(--accent);
}

.playlist-menu-state {
  color: var(--muted);
  font-size: 0.75rem;
}

.playlist-menu-list button[aria-pressed="true"] .playlist-menu-state {
  color: var(--accent);
}

.playlist-menu-create {
  display: flex;
  gap: 8px;
}

.playlist-menu-create input {
  min-width: 0;
  flex: 1;
}

.playback-badge[data-status="unchecked"] {
  display: none;
}

.playback-badge {
  justify-self: end;
  margin-right: 0.35rem;
  padding: 0.18rem 0.38rem;
  border-radius: 2px;
  background: #2b261f;
  color: #ddd2c3;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.playback-badge[data-status="ready"],
.playback-badge[data-status="verified"] {
  background: var(--good-bg);
  color: var(--good);
}

.playback-badge[data-status="offline"] {
  background: var(--info-bg);
  color: var(--info);
}

.playback-badge[data-status="incomplete"] {
  background: var(--warn-bg);
  color: var(--warn);
}

.playback-badge[data-status="blocked"] {
  background: #3a221c;
  color: var(--danger);
}

.playback-badge[data-status="checking"],
.playback-badge[data-status="saving"] {
  background: var(--warn-bg);
  color: var(--warn);
}

.card-download-progress {
  grid-column: 1 / -1;
  padding: 0 0.7rem 0.65rem 2.4rem;
}

.empty-reels {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.85rem;
  min-height: 18rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.empty-reels::before {
  content: "";
  width: 3rem;
  height: 3rem;
  background: url("/brand/logos/picker-mark-dark.svg") center / contain no-repeat;
}

.empty-reels p {
  max-width: 28ch;
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.75rem;
  font-style: normal;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.empty-reels .empty-add-video {
  min-height: 2.75rem;
  margin-top: 0.25rem;
}

.player-stage {
  position: static;
  margin-bottom: 0.95rem;
  background: var(--stage);
}

@media (min-height: 760px) {
  .player-stage {
    position: sticky;
    top: 0;
    z-index: 3;
  }
}

.player-shell {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-panel);
  background: #f4ebdd;
}

.player-shell::before,
.player-shell::after {
  content: none;
}

.player-shell video,
.player-shell iframe,
.empty-player {
  position: relative;
  z-index: 1;
  display: none;
  grid-area: 1 / 1;
  width: 100%;
  min-height: 12rem;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #281e19;
}

.player-shell[data-mode="video"] video,
.player-shell[data-mode="embed"] iframe,
.player-shell[data-mode="empty"] .empty-player {
  display: grid;
}

.play-bubble {
  position: fixed;
  z-index: 70;
  right: 1.15rem;
  bottom: 1.15rem;
  width: min(320px, calc(100vw - 2rem));
  overflow: hidden;
  border-radius: 18px;
  background: #140f0c;
  box-shadow:
    0 22px 50px rgba(20, 12, 8, 0.42),
    inset 0 0 0 1px rgba(244, 235, 221, 0.16);
  cursor: grab;
  touch-action: none;
}

.play-bubble[hidden] {
  display: none !important;
}

.play-bubble.is-dragging {
  cursor: grabbing;
}

.play-bubble-stage {
  position: relative;
  z-index: 1;
  aspect-ratio: 16 / 9;
  background: #140f0c;
}

.play-bubble-stage video,
.play-bubble-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #140f0c;
  pointer-events: none;
}

.play-bubble-scrim {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: rgba(20, 12, 8, 0.001);
}

.play-bubble-title {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 1.6rem 0.8rem 0.55rem;
  background: linear-gradient(transparent, rgba(12, 8, 6, 0.88));
  color: #f4ebdd;
  font-size: 0.75rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.play-bubble-return,
.play-bubble-close {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #f4ebdd;
  background: rgba(20, 12, 8, 0.62);
  box-shadow: inset 0 0 0 1px rgba(244, 235, 221, 0.2);
}

.play-bubble-return {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3.35rem;
  height: 3.35rem;
  transform: translate(-50%, -62%);
  cursor: pointer;
}

.play-bubble-return svg,
.play-bubble-close svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.play-bubble-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.7rem;
  height: 1.7rem;
  cursor: pointer;
}

.play-bubble-return:hover,
.play-bubble-close:hover {
  background: rgba(20, 12, 8, 0.82);
}

@media (max-width: 760px) {
  .play-bubble {
    display: none !important;
  }
}

@media (min-width: 761px) {
  body.is-player-floating .watch-column {
    display: block !important;
    position: fixed;
    z-index: 70;
    right: 1.15rem;
    bottom: 1.15rem;
    width: min(320px, calc(100vw - 2rem));
    height: auto;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: #140f0c;
    box-shadow:
      0 22px 50px rgba(20, 12, 8, 0.42),
      inset 0 0 0 1px rgba(244, 235, 221, 0.16);
    pointer-events: none;
  }

  body.is-player-floating .watch-column > :not(.player-panel),
  body.is-player-floating .player-stage > :not(.player-shell) {
    display: none !important;
  }

  body.is-player-floating .player-panel,
  body.is-player-floating .player-stage {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body.is-player-floating .player-shell,
  body.is-player-floating .player-shell video,
  body.is-player-floating .player-shell iframe {
    min-height: 0;
    border-radius: 18px;
  }

  body.is-player-floating .play-bubble {
    z-index: 71;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
  }

  body.is-player-floating .play-bubble-stage {
    background: transparent;
  }

  body.is-player-floating .play-bubble-scrim {
    pointer-events: auto;
  }
}

.empty-player {
  place-items: center;
  align-content: center;
  gap: 0.35rem;
  padding: 1.4rem;
  text-align: center;
  color: #281e19;
  background: #f4ebdd;
}

.empty-player strong {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2rem);
  font-style: normal;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.empty-caption {
  max-width: 36ch;
  color: #685348;
  font-size: 0.92rem;
}

#reconnectFolderButton {
  margin-top: 0.85rem;
}

#reconnectFolderButton[hidden],
#addSelectionToPlaylist[hidden],
#addSelectionNote[hidden],
#selectAllVideos[hidden] {
  display: none;
}

.note-menu {
  width: min(22rem, calc(100vw - 16px));
}

.note-menu form {
  display: grid;
  gap: 8px;
}

.note-menu textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.player-loading-overlay {
  position: relative;
  z-index: 5;
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse at center, rgba(38, 26, 15, 0.92) 0%, rgba(12, 10, 8, 0.96) 70%),
    #070605;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(232, 162, 58, 0.24);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
  text-align: center;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.player-loading-overlay[hidden] {
  display: none !important;
}

.player-loading-text {
  margin: 0;
  max-width: 44ch;
  color: var(--accent-hot);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(232, 162, 58, 0.55);
}

button.is-busy {
  cursor: wait !important;
  opacity: 0.9 !important;
  pointer-events: none;
}

button.is-busy .amber-throbber {
  margin-right: 0.45rem;
}

.playback-fallback[hidden] {
  display: none;
}

.playback-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(232, 162, 58, 0.35);
  border-radius: 0 0 2px 2px;
  background: #16130f;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.4;
}

.playback-fallback .button-row {
  flex: none;
}

.playback-fallback button {
  min-height: 2rem;
  padding: 0 0.6rem;
  font-size: 0.75rem;
}

.screen-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.screen-meta div {
  display: flex;
  gap: 0.35rem;
}

.screen-meta dt {
  color: var(--faint);
}

.screen-meta dd {
  margin: 0;
}

.metadata-grid,
.transcript-grid {
  grid-template-columns: 1fr;
}

.full-span {
  grid-column: 1 / -1;
}

.tool-strip {
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 0.85rem;
}

.tool-strip label {
  flex: 1 1 8.5rem;
  min-width: 8rem;
}

.tool-strip button {
  align-self: end;
}

.rec-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #e25b45;
  box-shadow: 0 0 0 3px rgba(226, 91, 69, 0.18);
}

.transcript-status {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-hot);
  font-size: 0.8rem;
  line-height: 1.45;
}

.transcript-status[data-tone="error"] {
  border-left-color: #e07a62;
  background: rgba(224, 122, 98, 0.12);
  color: var(--danger);
}

.transcript-status[data-tone="working"] {
  border-left-color: #e0b15a;
  background: rgba(224, 177, 90, 0.12);
  color: var(--warn);
}

#transcriptText,
#translatedText {
  min-height: 16rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.65;
}

.source-preview {
  width: 100%;
  min-height: 18rem;
  margin-top: 0.65rem;
  padding: 24px;
  border: 1px solid var(--line);
  background: #f4f0e7;
  color: #28241f;
  font-family: ui-serif, Georgia, serif;
  line-height: 1.6;
}

.source-preview header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #c9c0af;
}

.source-preview h3 {
  margin: 0 0 6px;
  color: #28241f;
  font-family: ui-serif, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.source-preview small {
  display: block;
  overflow-wrap: anywhere;
  color: #756b5d;
  font: 0.75rem/1.45 ui-monospace, monospace;
}

.source-preview p {
  margin: 0 0 1em;
}

.source-preview .notice {
  color: #756b5d;
  font-style: italic;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.desk-nav {
  display: none;
}

@container (min-width: 520px) {
  .metadata-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@container (min-width: 760px) {
  .transcript-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1181px) {
  .mast {
    grid-template-columns: auto minmax(0, 1fr) repeat(5, auto);
  }

  .nav-brand {
    display: none;
  }

  #addVideoButton {
    justify-self: end;
    width: auto;
  }
}

@media (max-width: 1180px) {
  .brand-lockup {
    align-items: flex-start;
  }

  body {
    height: auto;
    overflow: auto;
    padding-bottom: 5.4rem;
  }

  .app-shell {
    display: block;
    height: auto;
    min-height: 100dvh;
  }

  .rail,
  .bench,
  .watch-column,
  .library-panel,
  .video-list {
    height: auto;
    overflow: visible;
  }

  .bench,
  .rail,
  .watch-column {
    padding-bottom: 5.8rem;
  }

  .rail {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid var(--line);
    background: var(--rail);
  }

  .nav-brand,
  .nav-rule,
  .nav-sub {
    display: none;
  }

  .nav-group {
    display: contents;
  }

  .workspace-nav .nav-search {
    position: fixed;
    z-index: 25;
    top: 4.6rem;
    right: 12px;
    left: 12px;
    margin-top: 0;
  }

  .bench {
    padding-top: 3.4rem;
  }

  .workspace-nav label {
    justify-content: center;
    gap: 0;
    min-height: 44px;
    font-size: 12px;
  }

  .workspace-nav label .nav-icon {
    display: none;
  }

  .bench,
  body:has(#desk-library:checked) .bench,
  body:has(#desk-downloads:checked) .bench {
    border-right: 0;
    border-left: 0;
  }

  body:has(#desk-downloads:checked) .watch-column,
  body:has(#desk-transcripts:checked) .bench {
    display: none;
  }

  body:has(#desk-transcripts:checked) .app-shell {
    display: block;
  }

  body:has(#desk-library:checked) .workspace-nav label[for="desk-library"],
  body:has(#desk-youtube:checked) .workspace-nav label[for="desk-youtube"],
  body:has(#desk-feeds:checked) .workspace-nav label[for="desk-feeds"] {
    background: var(--accent);
    color: var(--accent-ink);
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .mast {
    grid-template-columns: minmax(0, 1fr) repeat(5, auto);
    gap: 0.75rem;
  }

  .mast .status-line {
    display: none;
  }

  #addVideoButton {
    width: auto;
  }

  .thumb-style button,
  .account-link,
  .global-search-trigger {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .account-link,
  .global-search-trigger {
    width: 2.75rem;
    height: 2.75rem;
  }

  .rail {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  body:has(#youtubeNav:not([hidden])) .rail {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
}

@media (min-width: 761px) and (max-width: 940px) {
  .mast .brand-tagline {
    display: none;
  }
}

@media (max-width: 680px) {
  .mast {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand action"
      "theme status";
    padding: 0.75rem 0.85rem 0.85rem;
  }

  .brand-lockup {
    grid-area: brand;
  }

  .thumb-style {
    grid-area: theme;
    justify-self: start;
  }

  .status-line {
    grid-area: status;
  }

  #addVideoButton {
    grid-area: action;
    justify-self: end;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }

  #addVideoButton:hover {
    background: transparent;
    filter: none;
  }

  .brand-name {
    font-size: 0.82rem;
  }

  .brand-name em {
    font-size: 1.15rem;
  }

  .storage-pill {
    border-left: 0;
    padding-left: 0;
  }

  .filter-row,
  .section-heading,
  .playback-fallback,
  .offline-destination,
  .bulk-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-row {
    width: 100%;
    justify-content: stretch;
  }

  .filter-row input,
  .filter-row button,
  .playback-fallback button,
  .library-offline-bar > .button-row,
  .library-offline-bar > .button-row button {
    width: 100%;
  }

  .filter-row input {
    flex: none;
    height: auto;
  }

  .library-offline-bar > .button-row {
    display: grid;
  }

  .bulk-download-progress,
  .card-download-progress {
    grid-template-columns: 1fr;
    padding-left: 0.35rem;
  }

  .bulk-download-progress span,
  .card-download-progress span {
    white-space: normal;
  }

  .card-copy strong,
  .card-copy > span {
    white-space: normal;
  }

  .video-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .video-card .card-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .video-card .add-to-list,
  .video-card .favourite-toggle {
    margin-right: 0;
  }

  .playback-badge {
    grid-column: 2;
    justify-self: start;
    margin: 0 0 0.45rem 5.65rem;
  }

  .video-select {
    grid-row: 1 / span 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.rail,
.video-list,
.watch-column,
.collection-list,
.history-list {
  scrollbar-width: thin;
  scrollbar-color: #4a4034 transparent;
}

html[data-picker-theme="new-age"] {
  color-scheme: light;
  --bg: #f3f0ed;
  --rail: #f7f5f3;
  --library: #fffcfa;
  --stage: #f6f3f0;
  --field: #ffffff;
  --ink: #3b2a4a;
  --muted: #7a6a86;
  --faint: #756580;
  --line: rgba(130, 95, 161, 0.22);
  --line-strong: #cbb8d8;
  --accent: #825fa1;
  --accent-hot: #6e4d8c;
  --accent-ink: #ffffff;
  --accent-soft: rgba(130, 95, 161, 0.16);
  --teal: #6f9a86;
  --danger: #b55264;
  --danger-line: rgba(181, 82, 100, 0.4);
  --good: #3d6a50;
  --good-bg: #e5f3e4;
  --info: #3d6a50;
  --info-bg: #e5f3e4;
  --warn: #8a6230;
  --warn-bg: #f8ead4;
  --shadow: 0 18px 40px rgba(90, 60, 120, 0.1);
}

html[data-picker-theme="new-age"] body {
  background: var(--bg);
}

html[data-picker-theme="new-age"] ::selection,
html[data-picker-theme="new-age"] .result-card-snippet mark {
  background: #e4d4f0;
  color: #3b2a4a;
}

html[data-picker-theme="new-age"] .watch-column {
  background:
    linear-gradient(180deg, rgba(196, 176, 220, 0.18), transparent 14rem),
    var(--stage);
}

html[data-picker-theme="new-age"] .thumb-style {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(130, 95, 161, 0.18);
}

html[data-picker-theme="new-age"] .workspace-nav .nav-group input:checked + label {
  background: #efe6f6;
}

html[data-picker-theme="new-age"] .primary-button,
html[data-picker-theme="new-age"] .secondary-button,
html[data-picker-theme="new-age"] .ghost-button {
  border-radius: 999px;
}

html[data-picker-theme="new-age"] .secondary-button:hover,
html[data-picker-theme="new-age"] .ghost-button:hover {
  border-color: rgba(130, 95, 161, 0.45);
  background: rgba(130, 95, 161, 0.08);
}

html[data-picker-theme="new-age"] label:not(.cms-image-choose):not(.feeds-opml-upload),
html[data-picker-theme="new-age"] .secondary-button {
  color: var(--ink);
}

html[data-picker-theme="new-age"] .secondary-button {
  background: #fffaf6;
}

html[data-picker-theme="new-age"] .card-thumb {
  background:
    linear-gradient(145deg, rgba(210, 190, 230, 0.55), rgba(244, 214, 196, 0.45)),
    #f6f0f8;
  box-shadow: inset 0 0 0 1px rgba(130, 95, 161, 0.14);
}

html[data-picker-theme="new-age"] .player-shell,
html[data-picker-theme="new-age"] .empty-player {
  background: #fffaf6;
  color: var(--ink);
}

html[data-picker-theme="new-age"] .player-shell video,
html[data-picker-theme="new-age"] .player-shell iframe {
  background: #2c2430;
}

html[data-picker-theme="new-age"] .playback-badge {
  border-radius: 999px;
  background: #f3eef6;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  text-transform: none;
}

html[data-picker-theme="new-age"] .playback-badge[data-status="offline"],
html[data-picker-theme="new-age"] .playback-badge[data-status="ready"],
html[data-picker-theme="new-age"] .playback-badge[data-status="verified"] {
  background: var(--good-bg);
  color: var(--good);
}

html[data-picker-theme="new-age"] .playback-badge[data-status="blocked"] {
  background: #f8e4e6;
  color: var(--danger);
}

html[data-picker-theme="new-age"] .playback-fallback {
  background: #fffcfa;
  border-color: rgba(130, 95, 161, 0.22);
  color: var(--ink);
}

html[data-picker-theme="new-age"] .rail,
html[data-picker-theme="new-age"] .video-list,
html[data-picker-theme="new-age"] .watch-column,
html[data-picker-theme="new-age"] .collection-list,
html[data-picker-theme="new-age"] .history-list {
  scrollbar-color: #d4c4e0 transparent;
}

@media (max-width: 760px) {
  body {
    padding-bottom: 0;
  }

  .mast {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 3.6rem;
    padding: 0.65rem 0.85rem;
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .brand-tagline,
  .status-line {
    display: none;
  }

  .brand-lockup {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand {
    min-width: 0;
    max-width: 100%;
  }

  .brand-logo {
    width: min(104px, 100%);
    max-width: 100%;
  }

  .account-chip {
    flex: none;
    min-width: 0;
  }

  .account-sign-out {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account-link[data-signed-in="true"] {
    display: inline-flex;
  }

  #accountSignOut,
  .cms-edit,
  #cmsEdit {
    display: none !important;
  }

  .thumb-style {
    margin-left: auto;
  }

  .thumb-style button {
    position: relative;
    justify-content: center;
    width: 2rem;
    min-height: 2rem;
    padding: 0;
    gap: 0;
  }

  .thumb-style .theme-icon {
    width: 1rem;
    height: 1rem;
  }

  .theme-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  #addVideoButton {
    display: none;
  }

  #addVideoButton .add-video-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  #addVideoButton .phone-icon,
  .phone-icon {
    display: block;
    width: 1rem;
    height: 1rem;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  #addVideoButton .phone-icon {
    display: none;
  }

  .phone-icon--fill {
    fill: currentColor;
    stroke: none;
  }

  .mobile-back {
    display: none;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
  }

  .mobile-back svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body.is-mobile-player .mast {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 0.4rem;
    padding-inline: 0.55rem;
  }

  .yt-card-body {
    position: relative;
    padding-bottom: 0.35rem;
  }

  .yt-hide-button {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 1.85rem;
    height: 1.85rem;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--field) 85%, transparent);
    color: var(--muted);
    opacity: 0.9;
    z-index: 2;
  }

  .yt-swipe-hint {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin: 0 0 0.85rem;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 15%, var(--field));
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 550;
    animation: fadeInHint 0.3s var(--ease);
  }

  .yt-swipe-hint-icon {
    display: inline-block;
    width: 0.95rem;
    height: 0.95rem;
    margin-right: 0.35rem;
    vertical-align: -0.15rem;
    animation: pulseChevron 1.2s ease-in-out infinite;
  }

  .yt-swipe-hint-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 0.9rem;
    cursor: pointer;
  }

  .yt-swipe-hint-close:hover {
    color: var(--ink);
  }

  @keyframes pulseChevron {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-4px); }
  }

  @keyframes ytNudgeCard {
    0% { transform: translateX(0); }
    35% { transform: translateX(-64px); }
    65% { transform: translateX(-64px); }
    100% { transform: translateX(0); }
  }

  @keyframes ytNudgeBg {
    0% { opacity: 0; }
    25%, 75% { opacity: 1; }
    100% { opacity: 0; }
  }

  .yt-card-nudge .yt-card-content {
    animation: ytNudgeCard 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
  }

  .yt-card-nudge .yt-card-swipe-bg {
    animation: ytNudgeBg 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
  }

  body.is-mobile-player .mobile-back {
    display: grid;
    grid-column: 1;
    justify-self: start;
    position: relative;
    z-index: 1;
  }

  body.is-mobile-player .thumb-style,
  body.is-mobile-player #addVideoButton {
    display: none;
  }

  body.is-mobile-player .brand-lockup {
    position: static;
    left: auto;
    grid-column: 2;
    flex: none;
    justify-self: center;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    transform: none;
  }

  body.is-mobile-player .brand-logo {
    width: min(104px, 32vw);
  }

  body.is-mobile-player .account-chip {
    grid-column: 3;
    justify-self: end;
    position: relative;
    z-index: 1;
  }

  body.is-mobile-player .account-sign-out {
    padding-inline: 0.6rem;
  }

  @media (max-width: 370px) {
    body.is-mobile-player .mast {
      grid-template-columns: auto minmax(0, 1fr) auto;
    }

    body.is-mobile-player .brand-logo {
      width: 104px;
      max-width: 100%;
    }
  }

  .rail {
    position: static;
    display: block;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .phone-library-head {
    display: block;
    padding: 0.35rem 1rem 0.15rem;
  }

  .phone-library-title {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 680;
    letter-spacing: -0.03em;
    line-height: 1.1;
  }

  .phone-library-head p {
    margin: 0.2rem 0 0;
    color: var(--muted);
  }

  body:not(:has(#desk-library:checked)) .phone-library-head,
  body:not(:has(#desk-library:checked)):not(:has(#desk-youtube:checked)) .nav-search,
  body.is-mobile-player .phone-library-head,
  body.is-mobile-player .nav-search,
  body.is-mobile-player .bench {
    display: none;
  }

  .search-suggest {
    top: calc(100% + 6px);
    bottom: auto;
    z-index: 1000;
  }

  .nav-search,
  .workspace-nav .nav-search,
  .topic-search,
  .yt-search {
    display: none !important;
  }

  .bench {
    padding-top: 0;
    padding-bottom: calc(5.2rem + env(safe-area-inset-bottom));
  }

  .library-block-header {
    padding: 0.75rem 1rem 0.55rem;
  }

  .library-block--latest:not(.is-collapsed) .library-block-body {
    max-height: none;
    padding: 0 1rem 0.85rem;
  }

  .library-filter-bar {
    padding: 0.75rem 1rem 0.65rem;
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--library);
  }

  .library-filter-bar .library-filters {
    gap: 0.45rem;
  }

  .library-block--queue .queue-heading {
    display: none;
  }

  .library-filters button {
    flex: none;
    min-height: 2.75rem;
    padding: 0.35rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font: 560 0.82rem/1 var(--sans);
    cursor: pointer;
  }

  .library-filter-status {
    flex: 1 0 100%;
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
  }

  .library-filters button[aria-pressed="true"] {
    border-color: transparent;
    background: var(--accent);
    color: var(--accent-ink);
  }

  .video-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 0.75rem;
    padding: 0 1rem 1.5rem;
    overflow: visible;
  }

  .empty-reels {
    grid-column: 1 / -1;
  }

  .video-card {
    container-type: inline-size;
    position: relative;
    display: block;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .video-card:hover,
  .video-card:focus-within,
  .video-card.selected,
  .video-card.active {
    background: transparent;
    box-shadow: none;
  }

  .video-select {
    display: none;
  }

  .card-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    min-height: 0;
    padding: 0;
  }

  .card-thumb {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 16px;
  }

  .card-duration {
    display: block;
    position: absolute;
    left: 0.45rem;
    bottom: 0.45rem;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    background: rgba(20, 14, 12, 0.72);
    color: #f4ebdd;
    font: 600 0.75rem/1.2 var(--sans);
  }

  .card-copy {
    padding-right: 1.8rem;
  }

  .card-copy strong {
    font-size: 0.92rem;
  }

  .card-meta {
    display: none;
  }

  .card-speaker {
    font-size: 0.78rem;
  }

  .video-card .playback-badge {
    position: absolute;
    right: 0.45rem;
    top: calc(100cqi - 1.7rem);
    margin: 0;
  }

  .video-card .card-actions {
    position: absolute;
    right: 0;
    top: calc(100cqi + 0.35rem);
  }

  .video-card .add-to-list {
    display: none;
  }

  .nav-group:not(.nav-sub) {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--rail);
  }

  .nav-group:not(.nav-sub) #youtubeNav[hidden] {
    display: none;
  }

  .nav-more,
  .workspace-nav .nav-group:not(.nav-sub) label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 3.1rem;
    margin: 0;
    padding: 0.2rem;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 560;
  }

  .nav-glyph {
    display: block;
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .nav-glyph--fill {
    fill: currentColor;
    stroke: none;
  }

  .workspace-nav label .nav-icon {
    display: none;
  }

  body:has(#desk-library:checked) .workspace-nav label[for="desk-library"],
  body:has(#desk-youtube:checked) .workspace-nav label[for="desk-youtube"],
  body:has(#desk-feeds:checked) .workspace-nav label[for="desk-feeds"],
  body:has(#desk-downloads:checked) .nav-more,
  body:has(#desk-transcripts:checked) .nav-more,
  body:has(#desk-history:checked) .nav-more,
  body:has(#desk-playlists:checked) .nav-more,
  body:has(#desk-shop:checked) .nav-more,
  body:has(#desk-favourites:checked) .nav-more {
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: var(--accent-hot);
  }

  .nav-sub {
    display: none;
  }

  body.is-more-open .nav-sub {
    position: fixed;
    z-index: 35;
    right: 0.75rem;
    bottom: calc(4.6rem + env(safe-area-inset-bottom));
    left: 0.75rem;
    display: grid;
    gap: 0.15rem;
    padding: 0.4rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--library);
    box-shadow: var(--shadow);
  }

  body.is-more-open .nav-sub label[for="desk-downloads"],
  [data-library-filter="offline"],
  .topic-download,
  #downloadCurrentButton,
  .card-download-progress,
  .recent-offline,
  .playback-badge[data-status="offline"],
  .playback-badge[data-status="saving"],
  .playback-badge[data-status="paused"],
  .playback-badge[data-status="verified"],
  .playback-badge[data-status="incomplete"],
  .playback-badge[data-status="failed"] {
    display: none;
  }

  body.is-more-open .nav-sub label,
  .more-action {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.7rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0 0.75rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    font: 560 0.95rem/1 var(--sans);
    text-align: left;
  }

  body:has(#desk-library:checked):not(.is-mobile-player) .watch-column {
    display: none;
  }

  body.is-mobile-player .watch-column {
    display: block;
    padding: 0 1rem calc(5.4rem + env(safe-area-inset-bottom));
  }

  body.is-mobile-player .player-shell,
  body.is-mobile-player .empty-player {
    border-radius: 16px;
    overflow: hidden;
  }

  body.is-mobile-player .now-playing h2 {
    font-size: 1.35rem;
  }

  body.is-mobile-player .now-playing .button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  body.is-mobile-player .now-playing .primary-button,
  body.is-mobile-player .now-playing .secondary-button,
  body.is-mobile-player .now-playing .ghost-button {
    width: 100%;
    border-radius: 999px;
  }

  body:has(#desk-transcripts:checked) .player-panel {
    display: block;
  }

  .watch-tabs {
    top: 3.6rem;
    justify-content: center;
  }

  body:has(#desk-transcripts:checked) .player-shell,
  body:has(#desk-transcripts:checked) .watch-tabs,
  body:has(#desk-transcripts:checked) .summary-panel,
  body:has(#desk-transcripts:checked) .playback-fallback,
  body:has(#desk-transcripts:checked) .now-playing .button-row {
    display: none;
  }

  body:has(#desk-transcripts:checked) .watch-column {
    padding: 0.25rem 1rem calc(5.4rem + env(safe-area-inset-bottom));
  }

  body:has(#desk-transcripts:checked) .now-playing {
    margin: 0 0 0.8rem;
  }

  body:has(#desk-transcripts:checked) .now-playing h2 {
    font-size: 1rem;
  }

  body:has(#watch-transcript:checked) .transcript-panel,
  body:has(#desk-transcripts:checked) .transcript-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .transcript-search-section {
    order: 1;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .transcript-search-bar,
  .transcript-panel .hint,
  .transcript-panel .section-heading .transcript-target {
    display: none;
  }

  .transcript-status {
    order: 2;
  }

  .transcript-grid {
    order: 3;
    display: grid;
  }

  .transcript-panel .section-heading {
    order: 4;
    display: block;
    margin: 0;
    padding: 0;
  }

  .transcript-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  #startTranscriptButton {
    min-height: 3rem;
    border-radius: 14px;
    background: var(--accent);
    color: var(--accent-ink);
  }

  #startTranscriptButton .rec-dot {
    display: none;
  }

  #startTranscriptButton .phone-icon {
    display: block;
  }

  #playVideoButton .pause-glyph,
  #playVideoButton.is-playing .play-glyph {
    display: none;
  }

  #playVideoButton.is-playing .pause-glyph {
    display: block;
  }

  .tool-strip {
    order: 5;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .tool-strip label {
    min-width: 0;
  }

  .tool-strip button,
  .proofread-options-row {
    width: 100%;
  }

  #proofreadButton,
  .proofread-options-row {
    grid-column: 1 / -1;
  }

  .proofread-options-row {
    order: 6;
  }
}

.shop-panel {
  display: none;
  padding: 1.35rem 1.25rem 2.5rem;
}

.shop-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.shop-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.shop-lead {
  max-width: 42rem;
  margin: 0.55rem 0 0;
}

.shop-bag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
}

.shop-bag span {
  min-width: 1.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.shop-colors:empty {
  display: none;
}

.shop-colors,
.shop-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
}

.shop-colors button,
.shop-categories button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.15rem 0.8rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
  font: 560 0.84rem/1 var(--sans);
}

.shop-colors button[aria-pressed="true"],
.shop-categories button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.shop-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 25%, transparent);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
  margin-top: 1.25rem;
}

.shop-card {
  display: grid;
  align-content: start;
  align-self: start;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--stage);
}

.shop-card.is-featured {
  grid-column: span 2;
}

.shop-card.is-featured .shop-piece {
  aspect-ratio: 16 / 9;
  max-height: 340px;
}

.shop-piece-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: zoom-in;
}

[data-colorway="espresso"] {
  --garment: #1a1411;
  --garment-ink: #f4ebdd;
}

[data-colorway="parchment"] {
  --garment: #f4ebdd;
  --garment-ink: #281e19;
}

[data-colorway="teal"] {
  --garment: #173833;
  --garment-ink: #e7f4f1;
}

.shop-piece {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 42%),
    color-mix(in srgb, var(--library) 82%, var(--stage));
}

.shop-garment,
.shop-mark {
  grid-area: 1 / 1;
}

.shop-garment {
  position: relative;
  width: 58%;
  height: 64%;
  background: var(--garment);
  border-radius: 16% 16% 10% 10%;
  box-shadow: 0 16px 28px rgba(20, 12, 8, 0.18);
}

.shop-piece[data-piece="hoodie"] .shop-garment {
  width: 68%;
  height: 70%;
  border-radius: 42% 42% 12% 12%;
}

.shop-piece[data-piece="cap"] .shop-garment {
  width: 72%;
  height: 28%;
  margin-top: 18%;
  border-radius: 40% 40% 16% 16%;
  box-shadow: 0 16px 0 -6px var(--garment);
}

.shop-piece[data-piece="tote"] .shop-garment {
  width: 62%;
  height: 58%;
  margin-top: 10%;
  border-radius: 6% 6% 10% 10%;
}

.shop-piece[data-piece="tote"] .shop-garment::before,
.shop-piece[data-piece="tote"] .shop-garment::after {
  content: "";
  position: absolute;
  top: 16%;
  width: 18%;
  height: 16%;
  border: 3px solid var(--garment);
  border-bottom: 0;
  border-radius: 40% 40% 0 0;
}

.shop-piece[data-piece="tote"] .shop-garment::before { left: 22%; }
.shop-piece[data-piece="tote"] .shop-garment::after { right: 22%; }

.shop-piece[data-piece="poster"] .shop-garment {
  width: 48%;
  height: 70%;
  border-radius: 2px;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--garment-ink) 16%, var(--library));
}

.shop-piece[data-piece="mug"] .shop-garment {
  width: 42%;
  height: 48%;
  border-radius: 8% 8% 18% 18%;
}

.shop-piece[data-piece="mug"] .shop-garment::after {
  content: "";
  position: absolute;
  top: 38%;
  right: 24%;
  width: 14%;
  height: 22%;
  border: 4px solid var(--garment);
  border-left: 0;
  border-radius: 0 40% 40% 0;
}

.shop-piece[data-piece="stickers"] .shop-garment {
  width: 34%;
  height: 34%;
  border-radius: 999px;
  box-shadow:
    -28px 10px 0 var(--garment),
    26px 8px 0 color-mix(in srgb, var(--garment) 75%, var(--accent));
}

.shop-piece[data-piece="patch"] .shop-garment {
  width: 62%;
  height: 36%;
  border-radius: 8px;
  box-shadow: inset 0 0 0 3px var(--garment-ink);
}

.shop-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18%;
  height: 18%;
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.shop-piece-photo {
  display: block;
  background: #120e0c;
}

.shop-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--shop-image-x, 50%) var(--shop-image-y, 50%);
  transform: scale(var(--shop-image-zoom, 1));
  transform-origin: center;
  display: block;
}

body.is-cms [data-cms] {
  outline: 1px dashed color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 3px;
  border-radius: 4px;
  cursor: text;
}

.cms-edit[aria-pressed="true"] {
  background: var(--accent);
  color: var(--stage);
  border-color: transparent;
}

.cms-fields {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.cms-fields label {
  display: grid;
  gap: 0.2rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.cms-fields input,
.cms-fields textarea {
  width: 100%;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--stage);
  color: var(--ink);
  font: inherit;
}

.cms-fields textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.cms-image-editor {
  min-width: 0;
  margin: 0;
  padding: 0.75rem 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cms-image-editor legend {
  margin-bottom: 0.55rem;
  padding: 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cms-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cms-image-choose,
.cms-image-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink);
  font: 650 0.78rem/1 var(--sans);
  cursor: pointer;
}

.cms-image-choose,
label.cms-image-choose {
  background: var(--ink);
  color: var(--bg) !important;
}

.cms-image-choose span {
  color: inherit;
}

.cms-image-choose:focus-within,
.cms-image-reset:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.cms-image-status {
  min-height: 1.1rem;
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.cms-image-status[data-state="ready"] {
  color: var(--green);
}

.cms-image-status[data-state="error"] {
  color: var(--danger);
}

.cms-image-controls {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.65rem;
}

.cms-image-controls label {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.cms-image-controls output {
  color: var(--ink);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.cms-fields input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  padding: 0;
  border: 0;
  accent-color: var(--accent);
}

.shop-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.shop-price {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.shop-price small,
.shop-card p,
.shop-specs {
  color: var(--muted);
}

.shop-card h3,
.shop-card p,
.shop-specs {
  margin: 0;
}

.shop-card h3 {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.shop-badge {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shop-specs {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.45rem;
  font-size: 0.78rem;
}

.shop-specs div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.shop-specs dt {
  color: var(--faint);
}

.shop-option {
  min-width: 0;
  margin: 0.75rem 0 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.shop-option legend {
  margin-bottom: 0.45rem;
  padding: 0;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
}

.shop-option-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.shop-option-choices label {
  position: relative;
  cursor: pointer;
}

.shop-option-choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
}

.shop-option-choices label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink);
  font: 600 0.875rem/1 var(--sans);
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}

.shop-option-choices label:hover span {
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.shop-option-choices input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.shop-option-choices input:focus-visible + span {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.shop-option--single {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.shop-option--single strong {
  color: var(--ink);
}

.shop-card .primary-button {
  width: 100%;
  border-radius: 999px;
}

.shop-stock {
  color: var(--muted);
  font-size: 0.75rem;
}

.shop-drawer[hidden],
.shop-lightbox[hidden] {
  display: none;
}

.shop-drawer,
.shop-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.shop-drawer-scrim,
.shop-lightbox-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 12, 8, 0.46);
}

.shop-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(24rem, 100%);
  padding: 1rem 1rem 1.25rem;
  background: var(--stage);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.shop-drawer:not([hidden]) .shop-drawer-panel {
  animation: shop-drawer-enter 160ms var(--ease) both;
}

@keyframes shop-drawer-enter {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .shop-drawer:not([hidden]) .shop-drawer-panel {
    animation: none;
  }
}

.shop-drawer-head,
.shop-line,
.shop-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.shop-drawer-head h2,
.shop-empty,
.shop-receipt h3 {
  margin: 0;
}

.shop-lines {
  display: grid;
  gap: 0.85rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  overflow: auto;
}

.shop-line {
  align-items: flex-start;
}

.shop-line .shop-piece {
  width: 4.4rem;
  flex: none;
}

.shop-line h3 {
  margin: 0;
  font-size: 0.92rem;
}

.shop-line p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.shop-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.shop-qty button,
.shop-remove {
  min-width: 1.7rem;
  min-height: 1.7rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
  font: inherit;
}

.shop-drawer-foot {
  display: grid;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.85rem;
}

.shop-ship {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.shop-receipt {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}

.shop-lightbox {
  z-index: 90;
  display: grid;
  place-items: center;
}

.shop-lightbox figure {
  position: relative;
  z-index: 1;
  width: min(36rem, calc(100% - 2rem));
  margin: 0;
}

.shop-lightbox-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--stage);
  overflow: hidden;
  cursor: zoom-in;
}

.shop-lightbox.is-zoomed .shop-lightbox-zoom {
  cursor: zoom-out;
}

.shop-lightbox.is-zoomed .shop-piece {
  transform: scale(1.45);
}

.shop-lightbox .shop-piece {
  aspect-ratio: 3 / 4;
  transition: transform 0.25s var(--ease);
}

.shop-lightbox-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
}

.shop-lightbox-hint,
.shop-lightbox figcaption {
  margin: 0.55rem 0 0;
  color: #f4ebdd;
  text-align: center;
}

@media (max-width: 1180px) {
  body:has(#desk-shop:checked) .nav-search,
  body:has(#desk-feeds:checked) .nav-search {
    display: none;
  }

  body:has(#desk-shop:checked) .bench,
  body:has(#desk-feeds:checked) .bench {
    padding-top: 0;
  }
}

@media (max-width: 900px) {
  .shop-card.is-featured {
    grid-column: auto;
  }

  .shop-card.is-featured .shop-piece {
    aspect-ratio: 3 / 4;
    max-height: none;
  }
}

@media (max-width: 720px) {
  .shop-card.is-featured {
    grid-column: auto;
  }

  .shop-head-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.feeds-panel {
  display: none;
  padding: 1.15rem 1.25rem 2rem;
}

.feeds-head,
.feeds-tools,
.feeds-filters {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.feeds-head {
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.feeds-head h2,
.feeds-head .eyebrow {
  margin: 0;
}

.feeds-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.feeds-filters {
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}

.feeds-filters button,
.feed-choices button,
.feed-list button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 560 0.86rem/1 var(--sans);
  cursor: pointer;
}

.feeds-filters button {
  min-height: 2rem;
  padding: 0 0.8rem;
  border-radius: 999px;
}

.feeds-filters button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.feeds-discover {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

#feedTopicSearch label,
.feeds-discover > form > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.feeds-discover input {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  color: var(--ink);
  font: 500 0.95rem/1.2 var(--sans);
}

.feeds-discover-invite {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 1rem;
  padding: 0.85rem 2.4rem 0.85rem 0.95rem;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
}

.feeds-discover-dismiss {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.feeds-discover-dismiss svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.8;
  display: block;
}

.feeds-discover-dismiss:hover {
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  border-color: var(--ink);
  color: var(--ink);
  transform: scale(1.06);
}

.feeds-discover-invite strong {
  display: block;
  margin: 0 0 0.2rem;
  font: 650 0.98rem/1.25 var(--sans);
}

.feeds-discover-invite p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.feeds-dialog-title {
  margin: 0 0 0.35rem;
  font: 650 1.15rem/1.2 var(--sans);
  letter-spacing: -0.02em;
}

.feeds-discover-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin: 0.55rem 0 0.65rem;
  padding: 0;
  list-style: none;
}

.feeds-discover-steps li {
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 600 0.75rem/1 var(--sans);
  letter-spacing: 0.02em;
}

.feeds-discover-steps li.is-current {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
  color: var(--ink);
}

.feeds-discover-steps li.is-done {
  border-color: transparent;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
}

.feeds-discover-lead {
  margin: 0.35rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.feeds-discover-more {
  display: none;
  margin: 0 0 0.85rem;
}

.feeds-add-dialog[data-mode="discover"] .feeds-discover-more {
  display: block;
}

.feeds-add-dialog[data-mode="discover"] .feeds-setup-block:not([open]) {
  display: none;
}

.feeds-add-dialog[data-mode="setup"] .feeds-discover {
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
}

.feeds-add-dialog[data-mode="setup"] .feeds-discover-steps,
.feeds-add-dialog[data-mode="setup"] .feeds-discover-more {
  display: none;
}

.feeds-add-dialog[data-mode="setup"] .feeds-dialog-title {
  margin-bottom: 0.65rem;
}

.feeds-setup-block {
  margin: 0;
  border: 0;
}

.feeds-setup-summary {
  cursor: pointer;
  color: var(--muted);
  font: 600 0.88rem/1.3 var(--sans);
  list-style: none;
}

.feeds-setup-summary::-webkit-details-marker {
  display: none;
}

.feeds-add-dialog[data-mode="setup"] .feeds-setup-summary {
  display: none;
}

.feeds-directory-tools {
  display: flex;
  justify-content: flex-end;
  margin: 0.7rem 0 0;
}

.feeds-directory-tools[hidden] {
  display: none !important;
}

.feeds-discover-bar {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: 0 -4px 20px color-mix(in srgb, var(--ink) 8%, transparent);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.feeds-discover-bar[hidden] {
  display: none !important;
}

.feeds-discover-bar > p {
  margin: 0 0 0.5rem;
  color: var(--ink);
  font: 600 0.92rem/1.3 var(--sans);
}

.feeds-discover-folder {
  display: block;
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.feed-directory-pick {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: flex-start;
  width: 100%;
}

.feed-directory-pick input[type="checkbox"] {
  width: 1.25rem !important;
  height: 1.25rem !important;
  min-height: 1.25rem !important;
  min-width: 1.25rem !important;
  margin: 0.2rem 0 0 0 !important;
  padding: 0 !important;
  accent-color: var(--accent);
  cursor: pointer;
}

.feed-directory-copy {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.3rem !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: var(--sans) !important;
  color: var(--ink) !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
}

.feed-directory-tag,
.feed-directory-copy p:first-child {
  margin: 0 !important;
  color: var(--accent) !important;
  font: 650 0.75rem/1.2 var(--sans) !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

.feed-directory-title,
.feed-directory-copy h3 {
  margin: 0 !important;
  color: var(--ink) !important;
  font: 650 1rem/1.3 var(--sans) !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
}

.feed-directory-blurb,
.feed-directory-copy p:last-child {
  margin: 0 !important;
  color: var(--muted) !important;
  font: 400 0.85rem/1.4 var(--sans) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.feed-directory-card.is-picked {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
}

.feed-directory-card.is-following {
  opacity: 0.85;
}

.feeds-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.feeds-topics button {
  min-height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 560 0.82rem/1 var(--sans);
  cursor: pointer;
}

.feeds-topics button[aria-pressed="true"] {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
}

.feeds-directory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.feeds-directory-empty {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.feed-directory-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  min-width: 0;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--ink) 5%, transparent);
}

.feed-directory-card > button {
  align-self: flex-start;
  margin-top: auto;
}

.feeds-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.feeds-rail label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.feeds-status,
.feeds-empty,
.feeds-river-empty,
.feed-choices p {
  margin: 0.7rem 0 0;
  color: var(--muted);
}

.feed-choices {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.feed-choices button,
.feed-list button[data-feed-id] {
  width: 100%;
  min-height: 2.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
  text-align: left;
}

.feed-choices button:hover,
.feed-list button[data-feed-id]:hover,
.feed-list button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.feed-list {
  display: grid;
  gap: 0.15rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.feed-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.feed-list button[data-feed-id] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.feed-list button[data-feed-id] span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-list em {
  color: var(--muted);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.feed-unfollow {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 1.1rem;
}

.feeds-river {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
}

.feed-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 1rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}

.feed-card a {
  display: grid;
  gap: 0.3rem;
  color: inherit;
  text-decoration: none;
}

.feed-card h3,
.feed-card p {
  margin: 0;
}

.feed-card h3 {
  font-size: 1.05rem;
  line-height: 1.3;
}

.feed-card-meta,
.feed-card a > p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.feed-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.feed-card:not(.is-read) h3::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-0.08rem);
}

.feed-card.is-read {
  opacity: 0.72;
}

.feed-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

@media (max-width: 800px) {
  .feeds-head,
  .feeds-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .feeds-tools {
    justify-content: flex-start;
  }
}

.feeds-reeder-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.5rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.feeds-kicker-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.15rem;
  min-width: 0;
}

.feeds-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.feeds-heading-row {
  display: flex;
  align-items: center;
  gap: 0.45rem 0.65rem;
  min-width: 0;
}

.feeds-sort {
  display: inline-flex;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.feeds-sort button {
  min-height: 1.7rem;
  padding: 0 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 0.75rem/1 var(--sans);
  cursor: pointer;
}

.feeds-sort button[aria-pressed="true"] {
  border-color: transparent;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  color: var(--ink);
}

.feeds-reeder-title h2,
.feeds-reeder-title p {
  margin: 0;
}

.feeds-reeder-title h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.feeds-back-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--accent, #6366f1);
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.feeds-back-kicker:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.feeds-title-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.feeds-title-link:hover {
  opacity: 0.85;
}

.feeds-title-arrow {
  font-size: 0.7em;
  opacity: 0.55;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.feeds-title-link:hover .feeds-title-arrow {
  opacity: 1;
  transform: translateX(3px);
}

.feeds-count {
  padding: 0.18rem 0.55rem 0.14rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.feeds-count:empty {
  display: none;
}

.feeds-status {
  color: var(--muted);
  font-size: 0.86rem;
}

.feeds-status:empty {
  display: none;
  margin: 0;
}

.feeds-status-line {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--field) 65%, transparent);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 500;
  animation: fadeInStatusLine 0.22s var(--ease);
}

@keyframes fadeInStatusLine {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.feeds-status.is-warn {
  margin: 0 0 0.85rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--ink);
}

.feeds-status.is-warn > p {
  margin: 0;
}

.feeds-repair {
  display: grid;
  gap: 0.45rem;
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
}

.feeds-repair li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.feeds-repair li > span {
  flex: 1 1 12rem;
  min-width: 0;
}

.feeds-repair button,
.feeds-feed-resolve {
  height: 1.85rem;
  padding: 0 0.55rem;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  font: 600 0.75rem/1 var(--sans);
  cursor: pointer;
}

.feeds-repair .is-dead > span,
.feeds-feed-badge.is-dead {
  color: color-mix(in srgb, var(--ink) 72%, var(--accent));
}

.feeds-feed-badge {
  align-self: center;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  font: 650 0.75rem/1 var(--sans);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.feeds-feed-row.is-broken,
.feeds-feed-row.is-dead {
  grid-template-columns: 1.5rem minmax(0, 1fr) auto auto;
}

.feeds-icon-button,
.feeds-add-button {
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 400 1.7rem/1 var(--sans);
  cursor: pointer;
}

.feeds-reeder-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.feeds-discover-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.4rem;
  padding: 0 0.85rem 0 0.7rem;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  color: var(--ink);
  font: 650 0.82rem/1 var(--sans);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.feeds-discover-cta svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
  stroke: none;
}

.feeds-discover-cta:hover,
.feeds-discover-cta:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  background: color-mix(in srgb, var(--accent) 18%, var(--bg));
}

.feeds-discover-cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.feeds-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--accent);
  color: #281e19;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 38%, transparent);
}

html[data-picker-theme="new-age"] .feeds-add-button {
  color: #f6f3f0;
}

.feeds-add-button:hover,
.feeds-add-button:focus-visible {
  transform: translateY(-1px);
}

.feeds-add-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.feeds-panel.is-empty .feeds-discover-cta {
  animation: feeds-add-nudge 1.8s ease-in-out infinite;
}

.feeds-welcome {
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  max-width: 28rem;
  margin: 12vh auto 0;
  text-align: center;
}

.feeds-welcome p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.feeds-welcome .primary-button {
  min-width: min(100%, 18rem);
}

.feeds-signin-note {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

.feeds-signin-note button {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.feeds-welcome-mark {
  width: 4.5rem;
  height: auto;
}

.feeds-welcome-mark--light {
  display: none;
}

html[data-picker-theme="new-age"] .feeds-welcome-mark--dark {
  display: none;
}

html[data-picker-theme="new-age"] .feeds-welcome-mark--light {
  display: block;
}

.feeds-opml {
  margin: 0.2rem 0 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.feeds-opml p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.feeds-add-dialog .feeds-opml a {
  color: var(--accent);
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.feeds-opml-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  margin-top: 0.85rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: #281e19;
  font-weight: 650;
  cursor: pointer;
}

html[data-picker-theme="new-age"] .feeds-opml-upload {
  color: #f6f3f0;
}

.feeds-opml-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@keyframes feeds-add-nudge {
  0%, 100% { box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 38%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 22%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .feeds-panel.is-empty .feeds-discover-cta,
  .feeds-panel.is-empty .feeds-add-button {
    animation: none;
  }

  .feeds-discover-cta,
  .feeds-discover-bar.is-sticky {
    transition: none;
  }
}

.feeds-icon-button svg,
.feeds-add-button svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feeds-icon-button[hidden] {
  display: grid !important;
  visibility: hidden;
  pointer-events: none;
}

.feeds-swipe {
  min-width: 0;
}

.feeds-source-list,
.feeds-folder ul {
  display: grid;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feeds-source-list button,
.feeds-folder > button[data-source],
.feeds-folder ul button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  width: 100%;
  min-height: 2.6rem;
  padding: 0.35rem 0.45rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: 560 1rem/1.2 var(--sans);
  text-align: left;
  cursor: pointer;
}

.feeds-source-list button[aria-pressed="true"],
.feeds-folder > button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.feeds-source-list em,
.feeds-folder em {
  color: var(--muted);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.feeds-folder-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 1.1rem 0.45rem 0.35rem;
  color: var(--ink);
  font: 650 1.15rem/1 var(--sans);
}

.feeds-folder-heading button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: 600 0.82rem/1 var(--sans);
  cursor: pointer;
}

.feeds-folder-heading button.feeds-section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font: 650 1.15rem/1 var(--sans);
  padding: 0;
  user-select: none;
}

.feeds-folder-heading button.feeds-section-toggle .feeds-section-count {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.92rem;
  font-style: normal;
}

.feeds-section-toggle.is-collapsed .feeds-folder-chevron {
  transform: rotate(-90deg);
}

.feeds-folder {
  display: grid;
  grid-template-columns: 2.25rem 2.75rem minmax(0, 1fr) 2.75rem 2.75rem;
  align-items: center;
  gap: 0.1rem;
  min-width: 0;
}

.feeds-folder-name {
  min-width: 0;
  min-height: 2.75rem;
  border-radius: 10px;
}

.feeds-folder.is-current .feeds-folder-name {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.feeds-folder > .feeds-folder-toggle {
  display: grid;
  place-items: center;
  width: 2.25rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.feeds-folder > .feeds-folder-toggle:hover,
.feeds-folder > .feeds-folder-toggle:focus-visible {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--ink);
}

.feeds-folder-chevron {
  width: 0.9rem;
  height: 0.9rem;
  transition: transform 160ms var(--ease);
}

.feeds-folder.is-collapsed .feeds-folder-chevron {
  transform: rotate(-90deg);
}

.feeds-folder .feeds-folder-name-button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 2.75rem;
  min-width: 0;
  padding: 0.35rem 0.55rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: 560 1rem/1.2 var(--sans);
  text-align: left;
  cursor: text;
}

.feeds-folder .feeds-folder-name-button:hover,
.feeds-folder .feeds-folder-name-button:focus-visible {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

.feeds-folder-name-button > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feeds-folder-name-button > em {
  margin-left: auto;
}

.feeds-folder-rename {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  margin: 0;
}

.feeds-folder-rename input {
  width: 100%;
  min-width: 0;
  min-height: 2.35rem;
  padding: 0.3rem 0.5rem;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  outline: 0;
  background: var(--bg);
  color: var(--ink);
  font: 560 1rem/1.2 var(--sans);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.feeds-folder > .feeds-folder-select,
.feeds-folder > .feeds-folder-action {
  display: grid;
  place-items: center;
  width: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}

.feeds-folder > .feeds-folder-select svg,
.feeds-folder > .feeds-folder-action svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feeds-folder > .feeds-folder-select svg circle {
  fill: transparent;
}

.feeds-folder > .feeds-folder-select[data-selection-state="all"],
.feeds-folder > .feeds-folder-select[data-selection-state="some"] {
  color: var(--accent);
}

.feeds-folder > .feeds-folder-select[data-selection-state="all"] svg circle {
  fill: currentColor;
}

.feeds-folder > .feeds-folder-select[data-selection-state="all"] svg path {
  stroke: var(--accent-ink);
  stroke-width: 2.2;
}

.feeds-folder > .feeds-folder-select:hover:not(:disabled),
.feeds-folder > .feeds-folder-select:focus-visible,
.feeds-folder > .feeds-folder-action:hover,
.feeds-folder > .feeds-folder-action:focus-visible {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
  transform: translateY(-1px);
}

.feeds-folder > .feeds-folder-select:disabled {
  opacity: 0.35;
  cursor: default;
}

.feeds-folder > .feeds-folder-show {
  color: var(--accent);
}

.feeds-folder > .feeds-folder-remove:hover,
.feeds-folder > .feeds-folder-remove:focus-visible {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.feeds-folder ul {
  grid-column: 1 / -1;
  margin-left: 5.1rem;
}

.feeds-folder-toggle-space {
  display: inline-block;
  width: 2.25rem;
  height: 2.75rem;
}

.feeds-feed-health {
  display: grid;
  place-items: center;
  min-width: 0;
}

.feeds-folder-name-button small {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.85;
}

.feeds-feed-empty {
  padding: 0.4rem 0.45rem;
  color: var(--muted);
}

.feeds-select {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 2.6rem;
}

.feeds-select input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--accent);
}

.feeds-feed-row > button > span,
.feeds-folder > button[data-source] > span,
.feeds-source-list button > span {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.feeds-source-list em,
.feeds-folder em {
  margin-left: auto;
}

.feeds-selection,
.feeds-folder-view,
.feeds-new-folder,
.feeds-folder-pick {
  display: grid;
  gap: 0.45rem;
  margin: 0.35rem 0 0.7rem;
}

.feeds-selection p {
  margin: 0;
  color: var(--muted);
}

.feeds-folder-view {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: 0.3rem 0 0.75rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.feeds-folder-view p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.feeds-folder-view p strong {
  color: var(--ink);
  font-weight: 650;
}

.feeds-folder-view > div {
  display: flex;
  gap: 0.4rem;
}

.feeds-folder-view .primary-button,
.feeds-folder-view .secondary-button,
.feeds-folder-view .ghost-button {
  min-height: 2.75rem;
  padding: 0 0.75rem;
  white-space: nowrap;
}

.feeds-selection-actions,
.feeds-new-folder,
.feeds-folder-pick {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.feeds-selection-actions select,
.feeds-new-folder input,
.feeds-folder-pick select,
.feeds-folder-pick input {
  flex: 1;
  min-width: 0;
  min-height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  padding: 0 0.8rem;
}

.feeds-folder-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 9%, var(--bg));
  color: var(--ink);
  font-size: 0.85rem;
}

.feeds-folder-filter-banner > span:first-child {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.feeds-folder-filter-banner svg {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feeds-folder-filter-banner strong {
  font-weight: 650;
}

.feeds-folder-filter-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.25rem;
}

.feeds-folder-filter-actions button {
  min-height: 2.75rem;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font: 650 0.78rem/1 var(--sans);
  cursor: pointer;
}

.feeds-folder-filter-actions button:hover,
.feeds-folder-filter-actions button:focus-visible {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

@media (max-width: 480px) {
  .feeds-folder-view,
  .feeds-folder-filter-banner {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .feeds-folder-view {
    display: grid;
  }

  .feeds-folder-view > div,
  .feeds-folder-filter-actions {
    justify-content: flex-start;
  }

  .feeds-folder-filter-banner {
    flex-direction: column;
  }
}

.feeds-folder ul button span:first-child,
.feeds-source-list button span {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  text-align: left;
}

.feed-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.6rem;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 0.15rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.feed-row.is-selected {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.feed-row-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.feed-row-source {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feed-row strong {
  font-size: 1.02rem;
  line-height: 1.25;
}

.feed-row-copy > span:last-child {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.feed-row-thumb-wrap,
.feed-row-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 10px;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  flex-shrink: 0;
}

.feed-row-thumb-wrap img,
.feed-row img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.22s ease-in-out;
}

.feed-row-thumb-wrap img.is-loaded,
.feed-row img.is-loaded {
  opacity: 1;
}

.feed-article-thumb-wrap {
  position: relative;
  width: 100%;
  min-height: 120px;
  max-height: 380px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.feed-article-thumb-wrap img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.22s ease-in-out;
}

.feed-article-thumb-wrap img.is-loaded {
  opacity: 1;
}

.feeds-day {
  margin: 0.9rem 0 0.2rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feed-article {
  display: grid;
  gap: 0.55rem;
  max-width: 42rem;
  touch-action: pan-y;
  will-change: transform;
}

.feed-article h3 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.12;
}

.feed-article-date,
.feed-article-by,
.feed-article-source,
.feed-article-body {
  margin: 0;
}

.feed-article-date,
.feed-article-source {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feed-article-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease;
}

.feed-article-source-btn:hover {
  color: var(--ink);
  text-decoration: underline;
}

.feed-article img {
  width: 100%;
  border-radius: 16px;
}

.feed-article-link {
  justify-self: center;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
}

.feed-article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.feeds-setup-sources {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.feeds-add-dialog {
  width: min(560px, calc(100vw - 1.5rem));
  max-height: min(80dvh, 720px);
  overflow: auto;
  padding: 1rem 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  color: var(--ink);
}

.feeds-add-dialog[data-mode="discover"] {
  width: min(640px, calc(100vw - 1.5rem));
}

.feeds-add-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.feeds-add-dialog h3:not(.feed-directory-title),
.feeds-setup-block label,
.feeds-opml label {
  margin: 0.8rem 0 0.35rem;
}

.feeds-add-dialog .feeds-discover > h3 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.feeds-add-close {
  display: flex;
  justify-content: flex-end;
}

.feeds-add-close button,
.dialog-bar .ghost-button[value="close"],
.dialog-bar .ghost-button[aria-label="Close"],
.shop-drawer-head .ghost-button[aria-label="Close"],
.shop-lightbox-close.ghost-button,
.global-search-close,
.account-dialog-close,
.feeds-discover-dismiss,
.menu-close,
button[aria-label="Close"],
button[value="close"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.feeds-add-close button svg,
.dialog-bar .ghost-button[value="close"] svg,
.dialog-bar .ghost-button[aria-label="Close"] svg,
.shop-drawer-head .ghost-button[aria-label="Close"] svg,
.shop-lightbox-close.ghost-button svg,
.global-search-close svg,
.account-dialog-close svg,
.feeds-discover-dismiss svg,
.menu-close svg,
button[aria-label="Close"] svg,
button[value="close"] svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  display: block;
}

.feeds-add-close button:hover,
.dialog-bar .ghost-button[value="close"]:hover,
.dialog-bar .ghost-button[aria-label="Close"]:hover,
.shop-drawer-head .ghost-button[aria-label="Close"]:hover,
.shop-lightbox-close.ghost-button:hover,
.global-search-close:hover,
.account-dialog-close:hover,
.feeds-discover-dismiss:hover,
.menu-close:hover,
button[aria-label="Close"]:hover,
button[value="close"]:hover {
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  border-color: var(--ink);
  color: var(--ink);
  transform: scale(1.06);
}

.feeds-add-close button:active,
.dialog-bar .ghost-button[value="close"]:active,
.dialog-bar .ghost-button[aria-label="Close"]:active,
.shop-drawer-head .ghost-button[aria-label="Close"]:active,
.shop-lightbox-close.ghost-button:active,
.global-search-close:active,
.account-dialog-close:active,
.feeds-discover-dismiss:active,
.menu-close:active,
button[aria-label="Close"]:active,
button[value="close"]:active {
  transform: scale(0.94);
}

@media (max-width: 768px) {
  .feeds-add-close button,
  .feeds-discover-dismiss,
  .dialog-bar .ghost-button[value="close"],
  .dialog-bar .ghost-button[aria-label="Close"],
  .shop-drawer-head .ghost-button[aria-label="Close"],
  .shop-lightbox-close.ghost-button,
  .global-search-close,
  .account-dialog-close,
  .menu-close,
  button[aria-label="Close"],
  button[value="close"] {
    width: 3rem;
    height: 3rem;
    min-height: 3rem;
    min-width: 3rem;
    font-size: 1.2rem;
  }

  .feeds-add-close button svg,
  .feeds-discover-dismiss svg,
  .dialog-bar .ghost-button[value="close"] svg,
  .dialog-bar .ghost-button[aria-label="Close"] svg,
  .shop-drawer-head .ghost-button[aria-label="Close"] svg,
  .shop-lightbox-close.ghost-button svg,
  .global-search-close svg,
  .account-dialog-close svg,
  .menu-close svg,
  button[aria-label="Close"] svg,
  button[value="close"] svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
  }
}

.feeds-feedly-note,
.feeds-add-dialog a {
  color: var(--muted);
  font-size: 0.82rem;
}

.feeds-add-dialog .feeds-directory {
  margin-top: 0.7rem;
}

@media (min-width: 761px) {
  .feeds-swipe {
    overflow: visible;
  }

  .feeds-track {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 1.4rem;
    align-items: start;
    width: auto;
    transform: none;
  }

  .feeds-pane--list,
  .feeds-pane--reader {
    min-width: 0;
  }

  .feeds-track:not(.is-reading) {
    grid-template-columns: minmax(0, 1fr);
  }

  .feeds-track:not(.is-reading) .feeds-pane--reader {
    display: none;
  }
}

@media (max-width: 760px) {
  body:has(#desk-feeds:checked) #feedsPanel {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 8.6rem);
    padding: 0.35rem 0.85rem 0.4rem;
    overflow: hidden;
  }

  .feeds-reeder-actions {
    gap: 0.35rem;
  }

  .feeds-discover-cta {
    min-height: 2.35rem;
    padding: 0 0.7rem 0 0.55rem;
    font-size: 0.78rem;
  }

  .feeds-add-dialog {
    width: min(100vw - 0.75rem, 560px);
    max-height: min(92dvh, 820px);
    padding: 0.85rem 0.85rem 1rem;
    border-radius: 16px;
  }

  .feeds-add-dialog[data-mode="discover"] {
    width: min(100vw - 0.75rem, 640px);
  }

  .feeds-discover-lead {
    font-size: 0.88rem;
  }

  .feeds-discover-bar.is-sticky {
    position: sticky;
    bottom: 0.35rem;
    z-index: 2;
    margin-top: 1rem;
    box-shadow: 0 -10px 28px color-mix(in srgb, var(--bg) 55%, transparent);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(8px);
  }

  .feeds-swipe {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .feeds-track {
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.28s ease;
  }

  .feeds-pane {
    flex: none;
    width: 50%;
    height: 100%;
    overflow: auto;
    padding-bottom: 0.6rem;
  }

  .feeds-track[data-pane="1"] {
    transform: translateX(-50%);
  }

  .nav-search input,
  .yt-search input,
  .feeds-discover input,
  .transcript-search-field input,
  input[type="search"] {
    font-size: 16px;
  }
}

@media (max-width: 760px) {
  .mast {
    gap: 0.375rem;
    padding-inline: 0.5rem;
  }

  .global-search-trigger,
  .header-bag {
    flex: none;
  }

  .header-bag {
    gap: 0.25rem;
    padding-inline: 0.2rem;
    font-size: 0.75rem;
  }

  .header-bag svg {
    width: 1.35rem;
    height: 1.35rem;
  }

  .header-bag-count {
    gap: 0.15rem;
  }

  body.is-mobile-player .mast {
    display: flex;
    gap: 0.3rem;
  }

  body.is-mobile-player .brand-lockup {
    flex: 1 1 auto;
    width: auto;
  }
}

/* Compact mobile chrome; all actions retain a 44px touch target. */
@media (max-width: 760px) {
  .mast {
    gap: 4px;
    padding: 8px 16px;
    min-height: 60px;
  }

  .thumb-style {
    flex: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .thumb-style .theme-thumb,
  .thumb-style button[aria-pressed="true"] {
    display: none;
  }

  .thumb-style button,
  .account-link,
  .global-search-trigger,
  .header-bag {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .thumb-style .theme-icon {
    width: 20px;
    height: 20px;
  }

  .header-bag {
    position: relative;
    padding: 0;
  }

  .header-bag-count {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding-inline: 4px;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 10px;
  }

  .header-bag-count > span:not(#headerBagCount) {
    display: none;
  }

  body:has(#desk-feeds:checked) #feedsPanel {
    padding-inline: 16px;
  }

  .feeds-reeder-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding-block: 8px;
  }

  .feeds-reeder-title {
    display: contents;
  }

  .feeds-kicker-row {
    display: none;
  }

  .feeds-heading-row {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .feeds-heading-row h2 {
    min-width: 0;
    font-size: 20px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .feeds-count {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 12px;
  }

  .feeds-sort {
    margin: 0;
    flex-wrap: wrap;
  }

  .feeds-sort button {
    min-height: 44px;
    padding-inline: 10px;
  }

  .feeds-reeder-actions {
    gap: 4px;
  }

  .feeds-discover-cta {
    min-height: 44px;
    padding-inline: 10px;
  }

  .feeds-add-button,
  .feeds-icon-button {
    width: 44px;
    height: 44px;
    flex: none;
    box-shadow: none;
  }

  .feeds-icon-button[hidden] {
    display: none !important;
  }

  .feeds-panel.is-empty .feeds-discover-cta {
    animation: none;
    box-shadow: none;
  }

  /* Give the back action its own column only while it is visible. */
  .feeds-reeder-bar:has(#feedsBack:not([hidden])) {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .feeds-reeder-bar:has(#feedsBack:not([hidden])) .feeds-heading-row {
    grid-column: 2 / -1;
  }

  .feeds-reeder-bar:has(#feedsBack:not([hidden])) .feeds-sort {
    grid-column: 1 / 3;
  }

  .mast button:focus-visible,
  .feeds-sort button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
  }
}

@media (max-width: 360px) {
  .mast {
    gap: 2px;
  }

  .feeds-reeder-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 360px) {
  .feeds-discover-cta svg {
    display: none;
  }
}
