:root {
  --paper: #f7f6f0;
  --white: #fffefa;
  --ink: #17372d;
  --muted: #758078;
  --line: #e0e5dc;
  --green: #1c5140;
  --lime: #d4ed85;
  --orange: #d97948;
  --red: #ac3530;
  --radius: 18px;
  font-family: 'Trebuchet MS', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
.video-navigation { display: flex; justify-content: space-between; gap: 12px; margin: 16px 0 22px; }
.video-navigation .btn { font-size: 12px; padding: 10px 14px; }
.video-navigation button:disabled { cursor: default; }
.watch-mode { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.audio-mode-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 280px; padding: clamp(24px, 5vw, 48px); border-radius: var(--radius); background: var(--green); color: var(--white); }
.audio-mode-art { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 24px; border: 1px solid #ffffff40; border-radius: 50%; font-size: 38px; color: var(--lime); }
.audio-mode-card .eyebrow { color: var(--lime); }
.audio-mode-card h2 { margin: 8px 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -1.5px; }
.audio-mode-card p { max-width: 420px; line-height: 1.7; font-size: 13px; }
.audio-mode-card #audio-mode-status { color: var(--lime); margin-bottom: 0; }
.audio-mode-card .btn { margin-top: 16px; background: var(--lime); color: var(--green); }
.audio-mode-card [hidden] { display: none; }
#audio-copy-status, #native-next-status { grid-column: 1 / -1; margin: 0; font-size: 10px; overflow-wrap: anywhere; }
.player-pending { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.player-pending > div { flex: 1; min-width: 0; }
#audio-pending-status { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.player-pending [hidden] { display: none; }
.player-pending small { text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 400px) { .video-navigation { gap: 8px; } .video-navigation .btn { font-size: 11px; padding: 10px; } }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #a1b95e;
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2 {
  font-weight: 500;
  letter-spacing: -0.045em;
}
h1 {
  font-family: Georgia, serif;
}
p {
  line-height: 1.6;
}
small,
.muted {
  color: var(--muted);
}
.brand {
  font-size: 24px;
  font-weight: bold;
  letter-spacing: -1.2px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand-mark {
  background: var(--green);
  color: var(--lime);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 25px;
}
.brand em {
  font-style: normal;
  font-weight: normal;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--green);
  color: white;
  font-weight: bold;
  padding: 13px 20px;
  min-height: 45px;
  transition:
    transform 0.18s,
    background 0.18s;
}
.btn:hover {
  background: #29664f;
  transform: translateY(-1px);
}
.btn.light {
  background: var(--lime);
  color: var(--ink);
}
.btn.ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}
.btn.small {
  padding: 8px 12px;
  min-height: 38px;
  font-size: 12px;
}
.btn.danger {
  background: #fae9e7;
  color: var(--red);
}
.text-btn {
  border: 0;
  background: none;
  color: var(--green);
  padding: 10px;
  font-weight: bold;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: bold;
  display: block;
  margin-bottom: 18px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.between {
  justify-content: space-between;
}
.wrap {
  flex-wrap: wrap;
}
.spacer {
  flex: 1;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 30px;
  background: #e8eddf;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.7px;
  padding: 6px 10px;
  white-space: nowrap;
}
.badge.dot:before {
  content: '';
  width: 6px;
  height: 6px;
  background: #789745;
  border-radius: 50%;
  margin-right: 6px;
}
.landing {
  max-width: 1320px;
  margin: auto;
  padding: 0 52px;
}
.landing header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.landing nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 13px;
}
.landing-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 640px;
  padding: 65px 0;
}
.landing h1 {
  font-size: clamp(54px, 6.7vw, 88px);
  line-height: 1.03;
  margin-bottom: 26px;
}
.landing h1 em {
  font-weight: normal;
  color: #718e43;
}
.landing .intro {
  font-size: 17px;
  max-width: 450px;
  color: #6a776f;
}
.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 28px 0 20px;
}
.art {
  position: relative;
  border-radius: 45% 45% 16px 16px;
  background: #e8eddd;
  min-height: 470px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.art:before {
  content: '';
  position: absolute;
  width: 310px;
  height: 310px;
  border: 1px solid #bfcbb0;
  border-radius: 50%;
  box-shadow:
    0 0 0 36px #e0e8d4,
    0 0 0 37px #cbd7bd,
    0 0 0 74px #e3ebd7;
}
.record {
  width: 270px;
  height: 270px;
  background: repeating-radial-gradient(circle, #244939 0, #244939 2px, #18392c 3px, #18392c 5px);
  border-radius: 50%;
  box-shadow: 18px 25px 35px #153a2b26;
  display: grid;
  place-items: center;
  position: relative;
  transform: rotate(-18deg);
}
.record-label {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--lime);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.7;
}
.record-label b {
  font-size: 32px;
  font-weight: normal;
}
.art-caption {
  position: absolute;
  bottom: 32px;
  left: 28px;
  right: 28px;
  background: var(--white);
  padding: 18px 20px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 6px 25px #153a2b0a;
}
.art-caption strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.art-caption small {
  font-size: 11px;
}
.waves {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  margin-left: auto;
}
.waves i {
  width: 4px;
  background: #5e8043;
  border-radius: 4px;
  height: 14px;
}
.waves i:nth-child(2n) {
  height: 28px;
}
.waves i:nth-child(3n) {
  height: 20px;
}
.floating-tag {
  position: absolute;
  top: 45px;
  right: 18px;
  background: var(--orange);
  color: white;
  padding: 13px 18px;
  border-radius: 30px;
  transform: rotate(9deg);
  font-size: 12px;
}
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 35px 0 60px;
  border-top: 1px solid var(--line);
  gap: 50px;
}
.features span {
  font-size: 11px;
  letter-spacing: 2px;
  color: #82936f;
}
.features h3 {
  font-family: Georgia, serif;
  font-weight: normal;
  font-size: 25px;
  margin: 12px 0;
}
.features p {
  font-size: 13px;
  color: var(--muted);
}
.landing footer {
  padding: 25px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
.shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  background: #eeefe7;
  border-right: 1px solid var(--line);
  padding: 35px 23px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.sidebar .brand {
  font-size: 23px;
  margin-bottom: 48px;
}
.nav-label {
  font-size: 10px;
  color: #929c90;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin: 23px 12px 12px;
}
.nav-item {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 4px;
  border-radius: 10px;
  font-size: 13px;
  color: #6b7b6f;
  min-height: 43px;
}
.nav-item span:first-child {
  font-size: 18px;
  width: 21px;
  text-align: center;
}
.nav-item:hover {
  background: #e4e8dc;
}
.nav-item.active {
  background: var(--green);
  color: #f5f7ee;
}
.sidebar-note {
  margin-top: auto;
  background: #e1e7d6;
  padding: 18px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.6;
  color: #60764f;
}
.sidebar-note strong {
  display: block;
  color: #324f2f;
  margin-bottom: 5px;
}
.main {
  grid-column: 2;
  padding: 0 42px max(135px, var(--player-clearance, 0px));
  min-width: 0;
}
.topbar {
  height: 98px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 36px;
}
.crumb {
  font-size: 12px;
  color: #889082;
}
.topbar .search {
  max-width: 510px;
  flex: 1;
}
.search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
  padding: 5px 6px 5px 16px;
  gap: 8px;
}
.search input {
  border: 0;
  outline: none !important;
  width: 100%;
  background: transparent;
  padding: 9px 0;
  font-size: 13px;
  min-width: 0;
}
.search button {
  border: 0;
  border-radius: 8px;
  background: #e9eedf;
  color: var(--green);
  font-size: 19px;
  min-width: 37px;
  height: 36px;
}
.account-dropdown {
  position: relative;
  flex-shrink: 0;
}
.account-dropdown summary {
  list-style: none;
  cursor: pointer;
  border-radius: 30px;
  padding: 6px 9px 6px 6px;
}
.account-dropdown summary::-webkit-details-marker {
  display: none;
}
.account-dropdown summary:hover,
.account-dropdown[open] summary {
  background: #e9ede1;
}
.account-chevron {
  font-size: 18px;
  transition: transform 0.18s;
}
.account-dropdown[open] .account-chevron {
  transform: rotate(180deg);
}
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 50;
  width: min(310px, calc(100vw - 32px));
  padding: 8px;
  background: #faf9f3;
  border: 1px solid #dde3d6;
  border-radius: 18px;
  box-shadow: 0 16px 45px #173f2f24;
}
.account-menu-header {
  padding: 14px 14px 18px;
}
.account-menu-header strong {
  display: block;
  font-size: 20px;
  overflow-wrap: anywhere;
}
.account-menu-header small {
  display: block;
  margin: 5px 0 10px;
  color: #738078;
}
.account-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1c5141;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.account-menu button:hover,
.account-menu button:focus-visible {
  background: #e9ede1;
}
.account-menu button span {
  font-size: 18px;
}
.account-menu .account-menu-all {
  color: #7a5547;
  font-size: 12px;
}
.account-menu-divider {
  height: 1px;
  margin: 6px 12px;
  background: #dde3d6;
}
.avatar {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eadac1;
  font-size: 12px;
  font-weight: bold;
}
.account {
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.page-title {
  font-size: 36px;
  margin: 0 0 8px;
  font-family: Georgia, serif;
}
.page-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 32px 0 19px;
}
.section-head h2 {
  font-family: Georgia, serif;
  font-size: 26px;
  margin: 0;
}
.welcome {
  background: var(--green);
  border-radius: 18px;
  padding: 36px 38px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  min-height: 230px;
}
.welcome h1 {
  font-size: 43px;
  line-height: 1.07;
  margin: 12px 0;
}
.welcome p {
  font-size: 12px;
  color: #d4dec9;
  max-width: 360px;
  margin: 0;
}
.welcome .eyebrow {
  color: #c9dfa6;
  margin: 0;
  font-size: 9px;
}
.mini-record {
  width: 170px;
  height: 170px;
  background: repeating-radial-gradient(circle, #224c3d 0, #224c3d 2px, #32624d 3px, #32624d 4px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-right: 14px;
  transform: rotate(16deg);
  flex-shrink: 0;
}
.mini-record:after {
  content: 'À VOTRE\a RYTHME.';
  white-space: pre;
  text-align: center;
  padding: 24px 15px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 10px;
  line-height: 1.5;
  font-weight: bold;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 23px 0;
}
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: #788371;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 12px;
  min-height: 36px;
}
.chip.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 23px;
}
.media-card {
  min-width: 0;
}
.cover {
  aspect-ratio: 16/10;
  background: #e6e8d9;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  border: 0;
  display: block;
  width: 100%;
  color: var(--green);
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.cover:hover img {
  transform: scale(1.04);
}
.cover .note {
  font-family: Georgia, serif;
  font-size: 62px;
}
.cover:has(.note) {
  background: linear-gradient(140deg, #dce8c1, #cad9c2);
}
.cover .format {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: #183b2cdc;
  color: white;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 10px;
}
.cover .play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: #15372a22;
  transition: opacity 0.2s;
  font-size: 36px;
  color: white;
}
.cover:hover .play-overlay {
  opacity: 1;
}
.media-card h3 {
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.media-card p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.empty {
  border: 1px dashed #cdd7c6;
  border-radius: 16px;
  text-align: center;
  padding: 45px 22px;
  background: #f1f3e9;
}
.empty .empty-icon {
  display: block;
  font-size: 33px;
  color: #8fa175;
  margin-bottom: 15px;
}
.empty h3 {
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: normal;
  margin-bottom: 10px;
}
.empty p {
  font-size: 12px;
  color: var(--muted);
  max-width: 360px;
  margin: 0 auto 20px;
}
.playlist-card {
  background: #e7eadf;
  border-radius: 14px;
  padding: 24px;
  min-height: 155px;
  text-align: left;
  border: 1px solid var(--line);
  color: var(--ink);
  position: relative;
  width: 100%;
}
.playlist-card:nth-child(3n + 2) {
  background: #ece2d4;
}
.playlist-card:nth-child(3n + 3) {
  background: #e1e7e7;
}
.playlist-card .symbol {
  font-size: 24px;
  margin-bottom: 24px;
  display: block;
}
.playlist-card strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: normal;
  margin-bottom: 7px;
}
.playlist-card small {
  font-size: 11px;
}
.notice {
  background: #edf1e2;
  border: 1px solid #d7e0c6;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
  margin: 16px 0;
}
.notice.error {
  background: #fbeae5;
  color: var(--red);
  border-color: #efcec1;
}
.job {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.job strong {
  display: block;
  margin-bottom: 5px;
}
.job .job-icon {
  background: #e5ebd6;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.watch {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(240px, 1fr);
  gap: 25px;
  margin-top: 20px;
}
.watch iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  background: #15372a;
  border-radius: 14px;
}
.watch h1 {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 24px;
  letter-spacing: -0.6px;
  line-height: 1.4;
  margin: 20px 0 8px;
}
.panel {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}
.panel h2 {
  font-family: Georgia, serif;
  font-size: 26px;
  margin-bottom: 9px;
}
.panel .btn {
  width: 100%;
  margin-top: 12px;
}
.form label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  margin: 17px 0 7px;
}
.form input,
.form select,
.form textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid #d7dfd1;
  border-radius: 9px;
  padding: 12px;
  color: var(--ink);
  min-height: 45px;
}
.form textarea {
  min-height: 75px;
  resize: vertical;
}
.form .hint {
  font-size: 11px;
  line-height: 1.5;
  margin: 7px 0;
  color: var(--muted);
}
.form .btn {
  margin-top: 21px;
}
.form-error {
  color: var(--red);
  font-size: 12px;
  margin-top: 14px;
  line-height: 1.5;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
  background: var(--paper);
  color: var(--ink);
  width: min(470px, calc(100% - 28px));
  max-height: 90vh;
  box-shadow: 0 30px 100px #183c2c44;
}
dialog::backdrop {
  background: #18352bd0;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-family: Georgia, serif;
  font-size: 33px;
  margin: 15px 0 10px;
}
dialog .close {
  float: right;
  background: none;
  border: 0;
  font-size: 24px;
  padding: 3px 8px;
  color: var(--muted);
}
dialog .intro {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
dialog .btn {
  width: 100%;
}
.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-weight: normal !important;
  padding: 9px;
  border-bottom: 1px solid var(--line);
  margin: 0 !important;
}
.check-row input {
  width: 17px !important;
  min-height: 17px !important;
  accent-color: var(--green);
}
.check-list {
  max-height: 200px;
  overflow: auto;
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 26px 0;
}
.metric {
  font-family: Georgia, serif;
  font-size: 38px;
  display: block;
  margin: 15px 0;
}
.qr {
  display: block;
  max-width: 230px;
  width: 100%;
  margin: 18px auto;
  border-radius: 12px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
td,
th {
  text-align: left;
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.category-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  padding: 17px 20px;
  border-radius: 10px;
  margin-top: 10px;
  border: 1px solid var(--line);
}
.category-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #9daf79;
}
.category-row strong {
  font-size: 14px;
  flex: 1;
}

#toast {
  position: fixed;
  right: 25px;
  bottom: 95px;
  max-width: 380px;
  z-index: 100;
  background: var(--ink);
  color: white;
  border-radius: 12px;
  padding: 16px 22px;
  font-size: 13px;
  box-shadow: 0 10px 35px #15372a22;
  transform: translateY(25px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
#toast.show {
  transform: translateY(0);
  opacity: 1;
}
.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 45px;
}
.boot span {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}
.skeleton {
  height: 180px;
  border-radius: 12px;
  background: linear-gradient(90deg, #e8eddf, #f1f3ea, #e8eddf);
  background-size: 200%;
  animation: loading 1.4s infinite;
}
.loading {
  color: var(--muted);
  font-size: 13px;
  padding: 30px 0;
}
.mobile-brand {
  display: none;
}
@keyframes loading {
  to {
    background-position: -200%;
  }
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
#content {
  animation: reveal 0.35s ease-out;
}
@media (min-width: 1450px) {
  .main {
    max-width: 1500px;
    padding-left: 60px;
    padding-right: 60px;
  }
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1050px) {
  .main {
    padding: 0 25px max(135px, var(--player-clearance, 0px));
  }
  .shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .sidebar {
    width: 205px;
    padding: 30px 16px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar .crumb,
  .account .account-name {
    display: none;
  }
  .watch {
    grid-template-columns: 1fr;
  }
  .welcome h1 {
    font-size: 35px;
  }
  .mini-record {
    width: 130px;
    height: 130px;
  }
  .landing {
    padding: 0 30px;
  }
  .landing-hero {
    gap: 25px;
  }
  .art {
    min-height: 400px;
  }
  .record {
    width: 230px;
    height: 230px;
  }
}
@media (max-width: 720px) {
  .landing {
    padding: 0 22px;
  }
  .landing header {
    height: 80px;
  }
  .landing nav > a {
    display: none;
  }
  .landing-hero {
    grid-template-columns: 1fr;
    padding: 45px 0;
    gap: 35px;
  }
  .landing h1 {
    font-size: 59px;
  }
  .landing .intro {
    font-size: 15px;
  }
  .art {
    min-height: 340px;
    border-radius: 22px;
  }
  .features {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-bottom: 30px;
  }
  .features h3 {
    font-size: 24px;
  }
  .landing footer {
    gap: 20px;
    font-size: 10px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: 64px;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px;
    background: var(--paper);
    border-top: 1px solid var(--line);
    border-right: 0;
    z-index: 40;
  }
  .sidebar .brand,
  .sidebar .nav-label,
  .sidebar-note,
  .sidebar .desktop-only {
    display: none;
  }
  .nav-item {
    flex-direction: column;
    gap: 2px;
    font-size: 9px;
    padding: 7px 9px;
    margin: 0;
    min-width: 56px;
    min-height: 50px;
  }
  .nav-item span:first-child {
    font-size: 19px;
  }
  .nav-item.active {
    background: #e5ecd8;
    color: var(--green);
  }
  .main {
    padding: 0 20px max(160px, var(--player-clearance, 0px));
  }
  .topbar {
    height: 80px;
    gap: 10px;
    margin-bottom: 23px;
  }
  .topbar .search {
    min-width: 0;
  }
  .account {
    padding: 0;
  }
  .welcome {
    padding: 26px 23px;
    min-height: 230px;
  }
  .welcome h1 {
    font-size: 34px;
  }
  .welcome p {
    max-width: 230px;
    position: relative;
    z-index: 1;
  }
  .mini-record {
    position: absolute;
    right: -67px;
    bottom: -23px;
    opacity: 0.35;
    width: 190px;
    height: 190px;
  }
  .page-title {
    font-size: 31px;
  }
  .section-head h2 {
    font-size: 24px;
  }
  .section-head {
    align-items: flex-start;
  }
  .section-head .btn {
    padding: 8px 12px;
    font-size: 11px;
    min-height: 38px;
  }
  .grid {
    gap: 18px 12px;
  }
  .media-card h3 {
    font-size: 12px;
  }
  .card-actions .btn {
    font-size: 10px;
    padding: 7px;
    min-height: 34px;
  }
  .cover {
    border-radius: 9px;
  }
  .playlist-card {
    padding: 19px;
    min-height: 150px;
  }
  .playlist-card strong {
    font-size: 21px;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 21px;
  }
  .watch {
    gap: 18px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .empty {
    padding: 35px 18px;
  }
  .empty h3 {
    font-size: 22px;
  }
  .hero-actions .btn {
    padding: 12px 15px;
    font-size: 12px;
  }

  #toast {
    bottom: 150px;
    left: 15px;
    right: 15px;
    max-width: none;
  }
  .row.wrap .btn {
    font-size: 12px;
  }
  .category-row {
    padding: 12px;
  }
  .landing .badge {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}

.floating-tag {
  top: 105px;
  right: 16px;
}
@media (max-width: 720px) {
  .topbar > .spacer {
    display: none;
  }

  #toast {
    bottom: 215px;
  }
}

/* File pages keep the artwork, facts and existing actions together. */
.file-title-link:hover, .file-title-link:focus-visible, .player-file-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.player-file-link { display: block; overflow: hidden; text-overflow: ellipsis; }
.player-details-link { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.file-page { max-width: 1180px; margin: 0 auto; }
.file-back { display: inline-flex; margin-bottom: 24px; }
.file-hero { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); align-items: center; gap: 36px; margin-bottom: 38px; }
.file-artwork { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 24px; overflow: hidden; background: repeating-radial-gradient(circle at center, #1b493b 0 2px, #173e33 3px 7px); color: #d2e6ad; }
.file-artwork > span:first-child { display: grid; place-items: center; width: 40%; aspect-ratio: 1; border-radius: 50%; background: #d2e6ad; color: #173e33; font-size: 62px; }
.file-artwork img { width: 100%; height: 100%; object-fit: cover; }
.file-art-format { position: absolute; bottom: 16px; left: 16px; padding: 6px 12px; border-radius: 8px; color: white; background: #173e33e6; font-size: 11px; letter-spacing: .1em; font-weight: 700; }
.file-heading { min-width: 0; }
.file-heading h1 { margin: 14px 0 12px; font-size: clamp(28px, 3.6vw, 52px); line-height: 1.12; overflow-wrap: anywhere; }
.file-filename { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.file-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 12px; }
.file-badges .badge { background: #e5ecdf; }
.file-source { display: inline-flex; min-height: 44px; align-items: center; }
.file-page-layout { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); gap: 28px; align-items: start; }
.file-details { padding: 26px 0; }
.file-details h2 { margin: 12px 0 24px; font-size: 28px; }
.file-details dl { margin: 0; }
.file-details dl > div { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.file-details dt { color: var(--muted); font-size: 12px; }
.file-details dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.file-page-options { min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); }
.file-page-options > h2 { margin-bottom: 22px; font-size: 23px; }
.file-page-options .file-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.file-page-options .file-actions .btn { text-align: center; padding: 12px; }
.file-page-options .file-danger { position: static; background: transparent; padding-bottom: 0; }
.file-page-options .form { margin-top: 24px; }
.file-page-link { display: inline-flex; margin-bottom: 16px; }
@media (max-width: 1050px) {
  .file-hero { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
  .file-page-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 600px) {
  .file-hero { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-bottom: 18px; }
  .file-artwork { width: min(220px, 100%); }
  .file-page-options { padding: 20px 16px; }
  .file-page-options .file-actions { grid-template-columns: minmax(0, 1fr); }
  .file-details { padding-top: 8px; }
}

html {
  scroll-padding-bottom: var(--player-clearance, 0px);
}

/* Compact playback dock: collection, transport, options, then timeline. */
#player {
  position: fixed;
  left: 254px;
  right: 16px;
  bottom: 14px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto auto 30px;
  align-items: center;
  gap: 14px 18px;
  padding: 18px 20px 13px;
  border: 1px solid #dce4db;
  border-radius: 20px;
  background: #fcfcf7f5;
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 45px #173d2c16;
  max-height: 50vh;
  overflow: auto;
}
#player[hidden],
#player audio {
  display: none;
}
.player-track {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.player-art {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  background: #e5ecd5;
  color: #1c5140;
  border: 1px solid #d6dfc5;
  border-radius: 13px;
  font-size: 25px;
}
#player .track-meta {
  min-width: 0;
}
#player strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}
#player small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  color: #758477;
  letter-spacing: 0.03em;
}
#player small span {
  padding: 0 4px;
}
.player-transport {
  display: flex;
  align-items: center;
  gap: 12px;
}
.player-more.player-icon { display: none; }
.player-extra-controls { display: contents; }
.player-volume { display: flex; align-items: center; gap: 12px; }
#player button {
  cursor: pointer;
}
.player-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #285943;
  font-size: 17px;
}
.player-icon:hover {
  background: #eaf0e2;
}
.player-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: #194c3b;
  color: #fff;
  border: 0;
  border-radius: 50%;
  font-size: 17px;
  box-shadow: 0 3px 8px #194c3b22;
}
.player-toggle:hover {
  background: #28634d;
}
.play-options {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.play-options button,
.player-speed select {
  white-space: nowrap;
  font: inherit;
  font-size: 11px;
  color: #3a5949;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
}
.play-options button:hover {
  background: #eef2e9;
}
.play-options [aria-pressed='true'] {
  border-color: #d0dfca;
  background: #e8f0df;
  color: #1e553d;
}
.player-speed select {
  border-color: #e0e6db;
  background: #f5f7f0;
  cursor: pointer;
}
.player-close {
  align-self: start;
  color: #7f8b80;
  font-size: 22px;
}
.player-timeline {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: #718072;
}
.player-timeline > span {
  min-width: 30px;
}
.player-timeline input {
  min-width: 0;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  accent-color: #285943;
}
#play-seek {
  flex: 1;
  width: 100%;
  appearance: none;
  background: linear-gradient(to right, #285943 var(--progress, 0%), #e0e6da var(--progress, 0%));
}
#play-seek::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  background: #285943;
  border-radius: 50%;
}
#play-seek::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: #285943;
  border: 0;
  border-radius: 50%;
}
#play-seek:disabled {
  opacity: 0.5;
  cursor: default;
}
#play-volume {
  width: 64px;
}
#player video {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(420px, 100%);
  max-height: 220px;
  border-radius: 12px;
  background: #142e25;
}
.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;
}
#player button:focus-visible,
#player input:focus-visible,
#player select:focus-visible {
  outline: 2px solid #347756;
  outline-offset: 3px;
}
@media (max-width: 1100px) {
  #player {
    grid-template-columns: minmax(0, 1fr) auto 30px;
  }
  .player-close {
    grid-column: 3;
    grid-row: 1;
  }
  .play-options {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: center;
  }
}
@media (max-width: 1050px) {
  #player {
    left: 221px;
  }
}
@media (max-width: 720px) {
  #player {
    left: 8px;
    right: 8px;
    bottom: 72px;
    padding: 8px 12px;
    gap: 6px 8px;
    grid-template-columns: minmax(0, 1fr) 44px;
    border-radius: 16px;
  }
  .player-art {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 21px;
  }
  .player-track {
    gap: 9px;
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .player-transport {
    gap: 10px;
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
  }
  .player-toggle {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
  .player-transport .player-icon {
    width: 52px;
    height: 52px;
    font-size: 24px;
    background: #eef3e8;
    border: 1px solid #dce5d5;
  }
  .player-more.player-icon {
    display: grid;
    grid-column: 2;
    grid-row: 2;
    width: 44px;
    height: 44px;
    font-size: 28px;
    background: #eef3e8;
    border: 1px solid #dce5d5;
  }
  .player-more[aria-expanded='true'] { background: #e0ead7; }
  .player-extra-controls { display: none; }
  #player.options-open .player-extra-controls {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 4;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    border-top: 1px solid #dce5d5;
    padding-top: 8px;
  }
  .player-close {
    grid-column: 2;
    grid-row: 1;
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
  .play-options {
    grid-column: 1;
    grid-row: 1;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
  }
  .play-options button,
  .player-speed select {
    min-height: 44px;
    padding: 8px;
    font-size: 12px;
  }
  .player-timeline {
    grid-row: 3;
    flex-wrap: wrap;
    gap: 6px;
  }
  .player-volume { display: none; }
  #player.options-open .player-volume { display: flex; width: 100%; justify-content: center; gap: 10px; }
  .player-volume .player-icon { width: 44px; height: 44px; }
  #play-volume {
    width: min(160px, 60%);
  }
  #player strong {
    font-size: 12px;
  }
  #player:not(.options-open) .track-meta small { display: none; }
  #player small {
    font-size: 9px;
  }
}
#toast {
  bottom: 175px;
}
@media (max-width: 720px) {
  #toast {
    bottom: 235px;
  }
}

.preference-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.form .preference-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
}
.preference-row small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  margin-top: 5px;
}
@media (max-width: 600px) {
  .main {
    padding-bottom: max(210px, var(--player-clearance, 0px));
  }
}

.preferences-page { max-width: 1080px; margin: 32px auto 100px; }
.preferences-heading { margin-bottom: 32px; }
.preferences-heading h1 { font-size: clamp(38px, 4vw, 58px); margin: 12px 0; }
.preferences-heading p { color: var(--muted); margin-bottom: 15px; }
.preferences-account { font-size: 11px; color: var(--green); background: #eaf0df; padding: 7px 12px; border-radius: 30px; display: inline-block; }
.preferences-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.preferences-sections { display: grid; gap: 22px; }
.preference-section { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.preference-section-heading { display: flex; gap: 15px; align-items: start; margin-bottom: 10px; }
.preference-number { color: var(--green); background: var(--lime); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex-shrink: 0; }
.preference-section-heading h2 { font-family: Georgia, serif; font-size: 25px; margin: 2px 0 6px; }
.preference-section-heading p { font-size: 12px; color: var(--muted); }
.preferences-page .preference-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0; padding: 19px 0; border-bottom: 1px solid var(--line); }
.preferences-page .preference-row:last-child { border-bottom: 0; }
.preference-row strong { font-size: 13px; font-weight: 500; }
.preferences-page small { display: block; font-size: 11px; line-height: 1.65; color: var(--muted); margin-top: 5px; }
.preferences-page .preference-row input { appearance: none; width: 42px; height: 24px; border: 0; border-radius: 30px; background: #dce1d8; flex: 0 0 42px; padding: 3px; margin: 0; cursor: pointer; transition: background .2s; }
.preferences-page .preference-row input::before { content: ''; display: block; width: 18px; height: 18px; background: var(--white); border-radius: 50%; box-shadow: 0 1px 3px #17372d22; transition: transform .2s; }
.preferences-page .preference-row input:checked { background: var(--green); }
.preferences-page .preference-row input:checked::before { transform: translateX(18px); }
.preference-select { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 19px; font-size: 13px; }
.preferences-page select { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--white); color: var(--ink); max-width: 100%; font-size: 12px; }
.preference-aside { background: var(--green); color: var(--white); border-radius: 20px; padding: 27px; }
.preference-aside .eyebrow { color: var(--lime); }
.preference-aside h2 { font-family: Georgia, serif; font-size: 30px; line-height: 1.15; margin: 20px 0 16px; }
.preference-aside p { font-size: 12px; color: #d1dfd4; }
.preference-aside label { display: block; font-size: 12px; margin: 24px 0 10px; }
.preference-aside select { width: 100%; }
.preference-aside small { color: #c5d6c8; }
.preference-tip { border-top: 1px solid #ffffff26; margin-top: 27px; padding-top: 23px; font-size: 13px; color: var(--lime); }
.preference-tip p { margin: 8px 0 0; }
.preferences-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 0; }
.preferences-footer span { font-size: 12px; color: var(--muted); }
dialog.inline-editor { position: relative; inset: auto; width: 100%; max-width: 900px; max-height: none; margin: 24px auto; background: var(--white); box-shadow: none; border-left: 4px solid var(--green); scroll-margin-top: 20px; }
dialog.inline-editor .btn { width: auto; }
dialog.inline-editor .check-list { max-height: 320px; overflow-y: auto; }
@media (max-width: 1000px) { .preferences-layout { grid-template-columns: 1fr; } .preference-aside { max-width: none; } }
@media (max-width: 720px) { .preferences-page { margin-top: 20px; } .preference-section { padding: 18px; } .preference-section-heading h2 { font-size: 22px; } .preference-select, .preferences-footer { flex-direction: column; align-items: stretch; } .preferences-footer .btn { width: 100%; } dialog.inline-editor { padding: 22px 18px; } }
@media (prefers-reduced-motion: reduce) { .preferences-page input, .preferences-page input::before { transition: none !important; } }

.category-link { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.category-link:hover { text-decoration: underline; }
.category-row { flex-wrap: wrap; }

/* File actions stay visible alongside their item. */
.card-actions { display: flex; gap: 8px; align-items: center; }
.card-actions [data-more][aria-expanded="true"] { background: var(--green); color: white; }
.media-card:has(.file-editor[open]) { align-self: start; }
dialog.inline-editor.file-editor { width: 100%; margin: 12px 0 0; padding: 20px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f4f6ee; }
dialog.file-editor h2 { font-family: 'Trebuchet MS', sans-serif; font-size: 16px; padding-right: 28px; margin: 0 0 16px; }
dialog.file-editor .file-actions { display: grid; gap: 8px; }
dialog.file-editor .btn { width: 100%; margin: 0; font-size: 12px; padding: 10px 12px; }
dialog.file-editor .form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
dialog.file-editor .close { top: 10px; right: 10px; }
dialog.file-editor select { min-width: 0; width: 100%; }

/* Creation forms stay centered and scroll within the viewport. */
dialog:modal { overscroll-behavior: contain; }
dialog:modal h2 { clear: both; }
dialog:modal .check-list { max-height: 260px; overflow-y: auto; }
@media (max-width: 720px) {
  dialog:modal { padding: 22px 18px; max-height: 90dvh; }
  dialog:modal h2 { font-size: 28px; }
}

/* UX review: compact filters, readable content and stable mobile controls. */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--paper); }
.topbar .search { min-width: 0; }
.topbar > .spacer { flex: 0; }
.search:focus-within, .library-search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px #1c514018; }
.account-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar { overflow-y: auto; }
.section-head > div { min-width: 0; }
.section-head:has(.page-title) { flex-wrap: wrap; }
.section-head:has(.page-title) > div:first-child { flex: 1 1 260px; }
.section-head > .row { flex: 0 1 auto; flex-wrap: wrap; }
.section-head > .btn, .section-head > .text-btn { flex-shrink: 0; }
.page-title, .page-subtitle, .playlist-card strong, .media-card h3, .job strong, .notice, dialog h2, .check-row { overflow-wrap: anywhere; }
.card-actions { overflow: visible; flex-wrap: wrap; }
.card-actions .btn { flex-shrink: 0; }
.library-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 260px); gap: 12px; margin-top: 24px; }
.library-search { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 14px; border: 1px solid var(--line); background: var(--white); border-radius: 11px; }
.library-search input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); padding: 13px 0; outline: none; font-size: 14px; }
.library-category { min-width: 0; }
.library-category select { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); color: var(--ink); font-size: 13px; text-overflow: ellipsis; }
.library-filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 24px; }
.library-filters .chips { margin: 0; }
#library-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.library-play { margin-bottom: 18px; }
.empty .row { justify-content: center; }
.dialog-feedback { margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; background: #eaf0df; color: var(--green); font-size: 13px; }
dialog:modal.file-editor h2 { font-size: 24px; margin: 0 40px 20px 0; }
dialog:modal.file-editor .close { position: absolute; top: 15px; right: 15px; float: none; min-width: 40px; min-height: 40px; }
dialog:modal.file-editor .btn { font-size: 14px; min-height: 46px; }
dialog.inline-editor { scroll-margin-top: 115px; }
.table-wrap { border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.table-wrap table { min-width: 580px; }
.table-wrap td { overflow-wrap: anywhere; }
.table-wrap td:first-child { min-width: 140px; }
.table-wrap .text-btn { min-height: 44px; }
.nav-short { display: none; }
.nav-caption b { font-weight: inherit; }
.job > div, .check-list .row, .check-row { min-width: 0; }
.check-row input { flex-shrink: 0; }
@media (max-width: 1050px) {
  .library-toolbar { grid-template-columns: minmax(0, 1fr); }
  .topbar { gap: 12px; }
}
@media (max-width: 720px) {
  .landing header { gap: 12px; }
  .landing nav { gap: 0; }
  .landing nav > .btn { display: none; }
  .landing nav .text-btn { padding: 10px 0; white-space: nowrap; font-size: 12px; }
  .landing .brand { font-size: 22px; gap: 6px; }
  .landing .brand .badge { display: none; }
  .sidebar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: calc(64px + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); overflow: visible; }
  .sidebar .nav-item { min-width: 0; padding: 6px 2px; gap: 3px; font-size: 10px; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
  .sidebar .nav-item span:first-child { flex-shrink: 0; }
  .topbar { gap: 8px; }
  .topbar .search { max-width: none; }
  .search input, .form input, .form select, .form textarea, .library-search input, .library-category select { font-size: 16px; }
  .topbar .search button { min-width: 40px; height: 40px; }
  .account-chevron { display: none; }
  .account-menu { right: 0; }
  .section-head:has(.page-title) { flex-wrap: wrap; }
  .section-head:has(.page-title) > div:first-child { flex: 1 1 190px; }
  .section-head .row { flex-wrap: wrap; }
  .category-row { display: grid; grid-template-columns: 11px minmax(0, 1fr) auto; gap: 4px 12px; padding: 15px 12px; }
  .category-dot { grid-column: 1; grid-row: 1 / 3; }
  .category-link { grid-column: 2; grid-row: 1; }
  .category-row > small { grid-column: 2; grid-row: 2; font-size: 12px; }
  .category-row > button { grid-column: 3; grid-row: 1 / 3; min-height: 44px; }
  .library-filters { flex-wrap: wrap; }
  .library-filters .chip { min-height: 42px; padding: 9px 14px; }
  #player { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .table-wrap { margin-bottom: 24px; }
  .table-wrap table { min-width: 580px; font-size: 13px; }
  dialog:modal.file-editor h2 { font-size: 24px; }
}
@media (max-width: 480px) {
  .grid:has(.card-actions) { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .media-card:has(.card-actions) { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 4px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .media-card:has(.card-actions) .cover { grid-column: 1; grid-row: 1 / 4; aspect-ratio: 1; align-self: start; }
  .media-card:has(.card-actions) h3 { grid-column: 2; margin: 0; font-size: 14px; line-height: 1.45; }
  .media-card:has(.card-actions) p { grid-column: 2; font-size: 11px; }
  .media-card:has(.card-actions) .card-actions { grid-column: 2; margin-top: 5px; gap: 6px; }
  .card-actions .btn { font-size: 12px; padding: 8px 10px; min-height: 40px; }
  .section-head h2 { font-size: 23px; }
  .section-head > .text-btn { font-size: 12px; padding: 8px 0; }
  .hero-actions { flex-wrap: wrap; }
}
@media (max-width: 360px) {
  .main { padding-left: 14px; padding-right: 14px; }
  .sidebar .nav-item { font-size: 9px; }
  .media-card:has(.card-actions) { grid-template-columns: 64px minmax(0, 1fr); gap: 4px 10px; }
  .landing { padding-left: 16px; padding-right: 16px; }
  .landing h1 { font-size: 51px; }
  .landing .brand { font-size: 20px; }
  .welcome h1 { font-size: 30px; }
}
/* File controls: a named file, quick actions, and explicit collection management. */
dialog:modal.file-editor { width: min(580px, calc(100% - 28px)); padding: 28px; }
.file-identity { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.file-symbol { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; background: var(--green); color: var(--paper); font-size: 24px; }
.file-identity > div, .file-playlist-row > div { min-width: 0; }
.file-identity strong, .file-playlist-row strong { display: block; overflow-wrap: anywhere; line-height: 1.4; }
.file-identity small, .file-playlist-row small { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
dialog:modal.file-editor .file-actions { grid-template-columns: 1fr 1fr; gap: 10px; }
dialog:modal.file-editor .file-actions .btn { display: flex; align-items: center; justify-content: center; text-align: center; }
.file-category-controls { display: flex; gap: 10px; align-items: stretch; }
.file-category-controls select, .file-category-controls input { flex: 1; width: 100%; min-width: 0; }
dialog:modal.file-editor .file-category-controls .btn { width: auto; flex: 0 0 auto; }
.file-playlists { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.file-playlists h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.file-playlists h3 span { border-radius: 20px; padding: 3px 8px; background: #e5ecdf; font-size: 12px; }
.file-playlists .hint { margin: 8px 0 12px; }
.file-playlist-list { max-height: 200px; overflow-y: auto; }
.file-playlist-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.file-playlist-row strong { font-size: 14px; }
dialog:modal.file-editor .file-playlist-row .btn { width: auto; flex: 0 0 auto; }
dialog:modal.file-editor .file-playlist-row [data-included="true"] { background: #e5ecdf; border-color: #c3d2bc; }
.file-new-playlist { margin-top: 16px; }
.file-new-playlist label { display: block; font-size: 12px; font-weight: bold; margin-bottom: 8px; }
.file-new-playlist input { border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); padding: 12px; font-size: 16px; }
.file-danger { position: sticky; bottom: -28px; margin-top: 22px; padding: 12px 0; border-top: 1px solid var(--line); background: var(--paper); }
.file-danger > .text-btn { color: #a13932; padding: 8px 0; min-height: 44px; }
#file-delete-confirm { margin-top: 10px; padding: 14px; border-radius: 12px; background: #f8eae5; }
#file-delete-confirm p { font-size: 13px; line-height: 1.6; margin: 0 0 12px; }
@media (max-width: 480px) {
  dialog:modal.file-editor { padding: 22px 18px; }
  .file-identity { padding: 12px; gap: 10px; }
  .file-danger { bottom: -22px; }
  .file-category-controls { gap: 8px; }
  dialog:modal.file-editor .btn { padding: 10px; font-size: 13px; }
  #file-delete-confirm .file-category-controls { flex-direction: column; }
}
/* Listening queue floats above the player, keeping playback within reach. */
dialog.queue-editor { position: fixed; inset: 96px 24px auto auto; margin: 0; width: min(440px, calc(100% - 32px)); max-height: none; padding: 24px; display: flex; flex-direction: column; border-radius: 20px; background: var(--paper); box-shadow: 0 16px 70px #183c2c38; z-index: 80; }
dialog.queue-editor:not([open]) { display: none; }
dialog.queue-editor .close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; float: none; }
dialog.queue-editor h2 { margin: 8px 30px 8px 0; font-size: 28px; }
.queue-editor .eyebrow { font-size: 10px; letter-spacing: .14em; }
.queue-summary { margin: 0; font-size: 12px; color: var(--muted); }
.queue-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0; }
dialog.queue-editor .queue-toolbar .btn { width: auto; min-height: 42px; font-size: 12px; margin: 0; }
.queue-toolbar .text-btn { font-size: 12px; min-height: 42px; }
.queue-caption { margin: 0 0 10px; font-size: 10px; font-weight: bold; letter-spacing: .12em; color: var(--muted); }
.queue-list { list-style: none; padding: 0 3px 0 0; margin: 0; overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; scrollbar-width: thin; }
.queue-row { display: flex; align-items: center; gap: 4px; padding: 8px 6px; border-radius: 12px; margin-bottom: 6px; border: 1px solid transparent; }
.queue-row:hover { background: var(--white); border-color: var(--line); }
.queue-row.is-current { background: var(--green); color: var(--paper); }
.queue-row.is-current:hover { background: var(--green); border-color: var(--green); }
.queue-row.is-pending { border-color: var(--green); background: #e4eadc; }
.queue-row.is-failed:not(.is-current) { border-color: #c78b62; }
.queue-toolbar { flex-wrap: wrap; gap: 6px; }
.player-icon:disabled { opacity: .3; cursor: default; }
.queue-track { display: flex; align-items: center; gap: 10px; padding: 0; min-width: 0; flex: 1; border: 0; background: none; color: inherit; text-align: left; min-height: 48px; }
.queue-number { width: 20px; flex: 0 0 20px; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); }
.is-current .queue-number { color: var(--lime); font-size: 20px; }
.queue-art { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 9px; overflow: hidden; background: #e4eadc; color: var(--green); font-size: 20px; }
.queue-art img { width: 100%; height: 100%; object-fit: cover; }
.is-current .queue-art { background: #ffffff18; color: var(--lime); }
.queue-meta { min-width: 0; }
.queue-meta strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 13px; line-height: 1.4; }
.queue-meta small { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }
.is-current .queue-meta small { color: #d7e4ce; }
.queue-row-actions { display: flex; align-items: center; flex: 0 0 auto; }
.queue-row-actions button { width: 28px; height: 42px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 18px; }
.queue-row-actions button:hover:not(:disabled) { color: var(--green); background: #e4eadc; }
.queue-row-actions button:disabled { opacity: .25; cursor: default; }
.queue-note { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.5; color: var(--muted); }
dialog.queue-compact { padding: 12px 14px; }
dialog.queue-compact h2 { font-size: 20px; margin: 0 40px 4px 0; }
.queue-compact .eyebrow, .queue-compact .queue-summary, .queue-compact .queue-caption, .queue-compact .queue-note { display: none; }
.queue-compact .queue-toolbar { margin: 4px 0 8px; }
@media (max-width: 720px) {
  dialog.queue-editor { top: 78px; right: 12px; width: calc(100% - 24px); padding: 18px 14px; }
  .queue-track { gap: 7px; }
  .queue-number { width: 16px; flex-basis: 16px; }
  .queue-art { width: 34px; height: 40px; flex-basis: 34px; }
  .queue-row-actions button { width: 26px; min-height: 44px; }
}
/* The watch page shows the saved files beside their source video. */
.watch-files { margin: 20px 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.watch-file-heading { display: flex; gap: 9px; align-items: center; font-size: 13px; }
.watch-file-heading .brand-mark { width: 28px; height: 28px; font-size: 20px; flex: 0 0 28px; }
.watch-saved-file { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.watch-saved-file strong { display: block; margin: 9px 0 5px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.watch-saved-file small { color: var(--muted); font-size: 11px; }
.watch-saved-file .badge { font-size: 9px; background: #e6efd7; color: var(--green); }
.watch-file-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.watch-file-actions .btn { padding: 10px 12px; font-size: 11px; }
.watch-file-actions .text-btn { min-height: 40px; font-size: 11px; }
.watch-preparation { font-size: 12px; line-height: 1.6; padding: 12px; margin: 12px 0 0; background: #f1f3e9; border-radius: 10px; }
.watch-files .hint { font-size: 12px; line-height: 1.6; margin-bottom: 0; }
.device-menu-link { display: block; padding: 14px; color: var(--green); font-size: 13px; text-decoration: none; }
.device-download { padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.device-library { max-width: 860px; margin: auto; padding: max(24px, env(safe-area-inset-top)) 24px max(40px, env(safe-area-inset-bottom)); }
.device-heading { padding-top: 36px; }
.device-heading h1 { font-size: clamp(34px, 8vw, 60px); margin: 12px 0; }
.device-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 14px 0; }
.device-filter { display: flex; align-items: center; gap: 16px; margin: 26px 0; }
.device-filter select { min-width: 0; max-width: 75%; padding: 12px; font-size: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.device-file { display: flex; align-items: start; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.device-file > div { min-width: 0; }
.device-file h2 { font-size: 20px; margin: 0 0 8px; overflow-wrap: anywhere; }
.device-file small { font-size: 12px; }
#device-player { margin-top: 24px; padding: 20px; background: var(--green); color: var(--paper); border-radius: 18px; }
#local-player { width: 100%; max-height: 420px; }
#local-player.audio-only { height: 54px; }
#device-player .btn { color: var(--paper); border-color: var(--paper); }
.boot .btn { margin-top: 20px; }

/* Official WavMigo branding. */
.brand-logo { display: block; width: 100px; height: 100px; object-fit: contain; border-radius: 12px; }
.sidebar .brand { justify-content: center; }
@media (max-width: 720px) { .landing .brand-logo { width: 64px; height: 64px; } }

/* Keep startup recovery controls readable on desktop and mobile. */
.boot { padding: 24px; gap: 12px; }
.boot .btn, .boot .text-btn { font-family: var(--font-body, sans-serif); font-size: 16px; line-height: 1.5; letter-spacing: normal; white-space: normal; }
.boot .btn { max-width: 420px; margin-inline: auto; }
