:root {
  color-scheme: dark light;
  --bg: #090b10;
  --bg-elevated: #11151d;
  --panel: rgba(24, 29, 39, 0.82);
  --panel-solid: #181d27;
  --text: #f5f7fb;
  --muted: #9ba5b5;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #8dffb6;
  --accent-strong: #4de987;
  --accent-ink: #062612;
  --danger: #ff707d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f4f0;
  --bg-elevated: #ffffff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --text: #121714;
  --muted: #657068;
  --line: rgba(8, 29, 17, 0.11);
  --accent: #16a65a;
  --accent-strong: #087b3d;
  --accent-ink: #ffffff;
  --danger: #c72e42;
  --shadow: 0 24px 70px rgba(35, 50, 40, 0.12);
}

@media (prefers-color-scheme: light) {
  html[data-theme="system"] {
    color-scheme: light;
    --bg: #f2f4f0;
    --bg-elevated: #ffffff;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-solid: #ffffff;
    --text: #121714;
    --muted: #657068;
    --line: rgba(8, 29, 17, 0.11);
    --accent: #16a65a;
    --accent-strong: #087b3d;
    --accent-ink: #ffffff;
    --danger: #c72e42;
    --shadow: 0 24px 70px rgba(35, 50, 40, 0.12);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 34rem),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select,
summary {
  outline-offset: 4px;
}

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

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(18px);
}

.topbar nav,
.topbar nav form {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar nav a,
.link-button {
  color: var(--muted);
  transition: color 160ms ease;
}

.topbar nav a:hover,
.link-button:hover {
  color: var(--text);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 0 32px color-mix(in srgb, var(--accent) 28%, transparent);
}

.brand-large {
  font-size: 1rem;
}

.brand-large .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.app-shell {
  width: min(1440px, 92vw);
  margin: 0 auto;
  padding: 4rem 0 7rem;
}

.app-shell.narrow {
  width: min(920px, 92vw);
}

.dashboard-page {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
}

.dashboard-page .topbar {
  flex: 0 0 auto;
}

.dashboard-shell {
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: clamp(1.25rem, 3vw, 3rem);
  flex: 1 0 auto;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.hero h1,
.cast-meta h1,
.login-panel h1 {
  margin: 0.3rem 0 0.5rem;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  font-weight: 740;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

.panel {
  padding: clamp(1.25rem, 2.5vw, 2rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel h2,
.panel h3 {
  margin-top: 0.5rem;
}

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

.now-playing {
  grid-column: span 8;
}

.clock-widget {
  grid-column: span 4;
}

.extension-widget {
  grid-column: span 4;
}

.clock-widget strong {
  display: block;
  margin-top: 1rem;
  font-size: clamp(3rem, 7vw, 6rem);
  letter-spacing: -0.07em;
}

.clock-widget span {
  color: var(--muted);
}

.weather-widget {
  grid-column: span 8;
}

.status-widget {
  grid-column: span 4;
}

.rss-widget-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.rss-widget-row .rss-widget {
  min-width: 0;
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.panel-heading h2 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
}

.panel-heading p:last-child {
  margin-top: 0;
}

.pill {
  display: inline-flex;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-solid) 78%, transparent);
  font-size: 0.75rem;
  text-transform: capitalize;
}

.player {
  position: relative;
  margin-top: 1.5rem;
  overflow: hidden;
  border-radius: calc(var(--radius) - 7px);
  background: #000;
}

.player video {
  display: block;
  width: 100%;
  max-height: 62vh;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}

.player-actions {
  position: absolute;
  right: 0.8rem;
  bottom: 3.7rem;
  left: 0.8rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 160ms ease;
}

.player:hover .player-actions,
.player:focus-within .player-actions {
  opacity: 1;
}

.player-actions button {
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(12, 14, 18, 0.78);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.player-actions button:hover,
.player-actions button.is-active {
  color: #06180d;
  background: var(--accent);
}

.empty-player {
  display: grid;
  min-height: 360px;
  margin-top: 1.5rem;
  place-content: center;
  justify-items: center;
  gap: 0.75rem;
  border: 1px dashed var(--line);
  border-radius: calc(var(--radius) - 7px);
  color: var(--muted);
  background: var(--bg);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.stat-row:last-child {
  border: 0;
}

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

.admin-card {
  display: block;
  transition: transform 160ms ease, border-color 160ms ease;
}

.admin-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}

.admin-card > span {
  color: var(--accent);
  font-family: ui-monospace, monospace;
}

.admin-card p {
  color: var(--muted);
}

.cache-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.cache-summary .panel {
  display: grid;
  gap: 0.5rem;
}

.cache-summary strong {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  letter-spacing: -0.05em;
}

.cache-summary span {
  color: var(--muted);
}

.cache-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cache-controls h2 {
  margin-bottom: 0;
}

.cache-controls p {
  margin-bottom: 0;
}

.acceleration-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.25rem 2rem;
  margin-bottom: 1rem;
}

.acceleration-panel h2 {
  margin-bottom: 0;
}

.capability-list {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  gap: 0.65rem;
  list-style: none;
}

.capability-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.2rem 0.65rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.capability-list small {
  grid-column: 2;
  color: var(--muted);
}

.acceleration-panel .setup-note {
  grid-column: 1 / -1;
  margin: 0;
}

.acceleration-panel .setup-note span,
.acceleration-panel .setup-note small {
  display: block;
}

.widget-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.rss-config-section {
  margin-top: 3rem;
}

.section-heading {
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  margin: 0.4rem 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.section-heading p:last-child {
  margin-bottom: 0;
}

.rss-config-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rss-config-card > form:last-child {
  margin-top: auto;
}

.widget-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.checkbox-label input {
  width: 1.1rem;
  min-height: 1.1rem;
  accent-color: var(--accent);
}

.widget-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.weather-temperature {
  display: block;
  margin-top: 0.65rem;
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: -0.07em;
}

.rss-items {
  display: grid;
  margin: 0.75rem 0 0;
  padding: 0;
  gap: 0.7rem;
  list-style: none;
}

.rss-items li {
  display: grid;
  gap: 0.2rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.rss-items li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rss-items a:hover {
  color: var(--accent);
}

.rss-items small {
  color: var(--muted);
}

.widget-disabled {
  border-style: dashed;
}

.widget-error {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

.widget-state-stale,
.widget-state-error {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
}

.cache-row,
.cache-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cache-row {
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.cache-row:last-child {
  border-bottom: 0;
}

.cache-row > div:first-child {
  display: grid;
  min-width: 0;
  gap: 0.35rem;
}

.cache-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--panel-solid);
  cursor: pointer;
}

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

.button-primary:hover {
  background: var(--accent-strong);
}

.button-quiet {
  background: transparent;
}

.stack,
.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: var(--bg-elevated);
}

.inline-form {
  display: flex;
  align-items: end;
  gap: 0.75rem;
}

.account-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-width: 22rem;
}

.account-actions .inline-form {
  flex: 1 1 20rem;
}

.account-actions .inline-form input {
  min-width: 12rem;
}

.table-panel {
  margin-top: 1rem;
}

.extension-list {
  margin-top: 1rem;
}

.extension-row,
.extension-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.extension-row {
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.extension-row > div:first-child {
  display: grid;
  gap: 0.45rem;
}

.extension-health {
  max-width: 48rem;
  color: var(--muted);
}

.button-danger {
  border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
  color: var(--danger);
  background: transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.library-list {
  display: grid;
  gap: 0.75rem;
}

.library-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.library-disabled {
  opacity: 0.78;
}

.library-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}

.library-summary > div {
  display: grid;
  gap: 0.35rem;
}

.library-card code,
code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.library-facts {
  color: var(--muted);
}

.library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.library-progress {
  display: grid;
  gap: 0.35rem;
}

.library-progress progress {
  width: 100%;
  accent-color: var(--accent);
}

.library-editor,
.library-remove {
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.library-editor summary,
.library-remove summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.library-editor form,
.library-remove form {
  margin-top: 1rem;
}

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

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--muted);
}

.status-completed {
  background: var(--accent);
}

.status-failed {
  background: var(--danger);
}

.status-running {
  background: #ffd266;
}

.status-queued {
  background: #7fb5ff;
}

.status-disabled {
  background: var(--muted);
}

.video-list {
  display: grid;
  gap: 0.75rem;
}

.catalog-filters {
  margin-bottom: 1rem;
}

.catalog-filters form {
  display: grid;
  grid-template-columns: minmax(14rem, 2fr) repeat(3, minmax(9rem, 1fr)) auto;
  align-items: end;
  gap: 0.75rem;
}

.catalog-filters-admin form {
  grid-template-columns: minmax(14rem, 2fr) repeat(4, minmax(8rem, 1fr)) auto;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
}

.search-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem 0;
  color: var(--muted);
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.search-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 14rem;
}

.search-card > div {
  display: grid;
  gap: 0.55rem;
}

.search-tags {
  color: var(--muted);
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.pagination > :last-child {
  justify-self: end;
}

.video-editor {
  border: 1px solid var(--line);
  border-radius: 14px;
}

.video-editor summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
}

.video-editor summary span:first-child {
  display: grid;
  gap: 0.25rem;
}

.video-editor summary small {
  color: var(--muted);
}

.video-editor form {
  padding: 0 1rem 1rem;
}

.provider-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}

.provider-actions form {
  padding: 0;
}

.settings-list {
  padding: 0;
  list-style: none;
}

.settings-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.settings-list li > span {
  display: grid;
  gap: 0.25rem;
}

.settings-list small {
  color: var(--muted);
}

.recommendation-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.recommendation-settings label small {
  min-height: 2.5em;
  color: var(--muted);
  font-weight: 400;
}

.recommendation-settings .button {
  align-self: end;
}

.recommendation-reset {
  margin-top: 0.75rem;
}

.recommendation-reason {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state {
  padding: 2rem;
  color: var(--muted);
  text-align: center;
}

.flash {
  position: fixed;
  z-index: 50;
  top: 84px;
  right: 2rem;
  max-width: 440px;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.flash-success {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
}

.flash-error,
.form-error {
  color: var(--danger);
}

.login-page {
  overflow: hidden;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 0.8fr) 1.2fr;
}

.login-panel {
  display: grid;
  align-content: center;
  padding: clamp(2rem, 7vw, 7rem);
  background: var(--bg);
}

.login-panel form {
  margin-top: 2rem;
}

.login-art {
  position: relative;
  display: grid;
  place-content: end start;
  padding: 4rem;
  overflow: hidden;
  background:
    linear-gradient(145deg, transparent 20%, rgba(0, 0, 0, 0.7)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 80px),
    #17261f;
}

.login-art::before,
.signal {
  position: absolute;
  width: min(70vw, 850px);
  aspect-ratio: 1;
  border: 2px solid rgba(141, 255, 182, 0.25);
  border-radius: 50%;
  content: "";
}

.login-art::before {
  top: -25%;
  right: -18%;
  box-shadow:
    0 0 0 80px rgba(141, 255, 182, 0.04),
    0 0 0 160px rgba(141, 255, 182, 0.03),
    0 0 120px rgba(141, 255, 182, 0.14);
}

.signal {
  top: 20%;
  right: 5%;
  width: 180px;
  background: var(--accent);
  filter: blur(70px);
  opacity: 0.35;
}

.login-art p {
  z-index: 1;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1rem, 2vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.22em;
}

.setup-note {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 12px;
  color: var(--muted);
}

.setup-note strong,
.setup-note code {
  display: block;
  margin-bottom: 0.4rem;
}

.cast-page {
  overflow: hidden;
  background: #000;
}

.cast-shell {
  position: relative;
  min-height: 100vh;
  background: #000;
}

.player-cast {
  width: 100vw;
  height: 100vh;
  margin: 0;
  border-radius: 0;
}

.player-cast video {
  width: 100vw;
  height: 100vh;
  max-height: none;
}

.cast-overlay {
  position: fixed;
  z-index: 5;
  right: 0;
  left: 0;
  display: flex;
  pointer-events: none;
}

.cast-top {
  top: 0;
  align-items: start;
  justify-content: space-between;
  padding: 2rem 2.5rem 5rem;
  color: #fff;
  background: linear-gradient(#000a, transparent);
}

.cast-top a {
  pointer-events: auto;
}

.cast-time {
  display: grid;
  text-align: right;
}

.cast-time strong {
  font-size: 2rem;
}

.cast-meta {
  bottom: 0;
  display: block;
  padding: 8rem 2.5rem 2.5rem;
  color: #fff;
  background: linear-gradient(transparent, #000c);
}

.cast-meta h1 {
  font-size: clamp(2rem, 5vw, 5rem);
}

.cast-meta p:last-child {
  font-size: 1.2rem;
}

.hero-actions,
.playlist-actions,
.playlist-item-actions,
.playlist-settings {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.playlist-create,
.playlist-add,
.playlist-settings {
  margin-bottom: 1rem;
}

.playlist-create h2,
.playlist-add h2 {
  margin-top: 0;
}

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.playlist-card {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  justify-content: space-between;
}

.playlist-card h2 {
  overflow-wrap: anywhere;
}

.playlist-settings {
  justify-content: space-between;
}

.playlist-items {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.playlist-item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.playlist-item:last-child {
  border-bottom: 0;
}

.playlist-position {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.playlist-meta {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
}

.playlist-meta strong,
.playlist-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-meta small {
  color: var(--muted);
}

.playlist-item-actions form {
  display: inline-flex;
}

.playlist-move,
.playlist-move-spacer {
  width: 2.5rem;
}

.playlist-move-spacer {
  display: inline-block;
}

@media (max-width: 900px) {
  .topbar {
    position: static;
    align-items: start;
    padding: 1rem 4vw;
  }

  .topbar nav {
    flex-wrap: wrap;
    justify-content: end;
    gap: 0.8rem 1rem;
  }

  .dashboard-grid,
  .admin-grid,
  .cache-summary,
  .widget-config-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-grid > *,
  .admin-grid > *,
  .cache-summary > *,
  .widget-config-grid > * {
    grid-column: 1;
  }

  .form-grid,
  .library-summary {
    grid-template-columns: 1fr;
  }

  .catalog-filters form,
  .catalog-filters-admin form,
  .search-grid,
  .recommendation-settings {
    grid-template-columns: 1fr;
  }

  .filter-actions > * {
    flex: 1;
    text-align: center;
  }

  .table-panel {
    overflow-x: auto;
  }

  .cache-controls,
  .cache-row,
  .acceleration-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .acceleration-panel {
    display: flex;
  }

  .capability-list {
    grid-template-columns: 1fr;
  }

  .playlist-item {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .playlist-item-actions {
    grid-column: 2;
    flex-wrap: wrap;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-art {
    display: none;
  }
}

@media (max-width: 620px) {
  .topbar {
    display: block;
  }

  .topbar nav {
    justify-content: start;
    margin-top: 1rem;
  }

  .hero {
    align-items: start;
    flex-direction: column;
  }

  .player-actions {
    position: static;
    flex-wrap: wrap;
    padding: 0.8rem;
    opacity: 1;
  }

  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .account-actions {
    align-items: stretch;
    min-width: 14rem;
  }

  .hero-actions,
  .playlist-settings {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
