:root {
  color-scheme: light;
  --bg: #faf9f7;
  --panel: #ffffff;
  --soft: #f1eeea;
  --line: #e4dfd8;
  --text: #292623;
  --muted: #716b65;
  --accent: #b34b36;
  --accent-soft: #f7e9e4;
  --button: #292623;
  --button-text: #ffffff;
  --bad: #a82f2f;
  --shadow: 0 8px 24px rgba(49, 39, 30, .055);
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  grid-template-rows: minmax(calc(100vh - 88px), auto) auto;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button, input, select { font: inherit; color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, select { touch-action: manipulation; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 78%, white); outline-offset: 3px; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
.skip-link { position: fixed; left: 16px; top: -100px; padding: 10px 14px; z-index: 20; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.topbar {
  position: sticky;
  top: 0;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 168px;
  height: 100vh;
  padding: 27px 17px 22px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  z-index: 4;
}
.brand { display: flex; gap: 9px; align-items: center; min-width: 0; }
.brand strong { display: block; font-size: 17px; font-weight: 500; letter-spacing: -.025em; }
.brand small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.moon { display: grid; place-items: center; width: 29px; height: 29px; flex-shrink: 0; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 17px; }
.sidebar-navigation { margin-top: 38px; }
.nav-label { display: block; margin: 0 10px 9px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.topbar nav { display: flex; flex-direction: column; gap: 4px; }
.topbar nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.topbar nav a:hover { color: var(--text); background: var(--soft); }
.topbar nav a[aria-current="page"] { color: var(--text); background: var(--soft); font-weight: 500; }
.topbar nav .search-link { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.sidebar-note { margin: auto 8px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

main {
  grid-column: 2;
  width: min(1040px, calc(100% - 52px));
  margin: 28px auto 58px;
  outline: none;
}
.hero { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; margin: 0 0 22px; }
.hero h1 { margin: 0; font-size: clamp(23px, 3vw, 29px); font-weight: 500; line-height: 1.35; letter-spacing: -.035em; }
.hero p { max-width: 720px; margin: 0; color: var(--muted); font-size: 13px; }

.home-categories { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 17px; }
.home-categories a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
}
.home-categories a:hover { color: var(--text); border-color: #c9c1b8; background: var(--soft); }

.category-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 8px 0 20px; }
.category-entry { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.category-entry:hover { border-color: #c9c1b8; }
.category-entry h2 { margin: 5px 0; font-size: 17px; font-weight: 500; }
.category-entry p { margin: 0; color: var(--muted); font-size: 12px; }
.eyebrow { color: var(--accent); font-size: 11px; letter-spacing: .09em; }

.section-heading { margin: 27px 0 13px; font-size: 16px; font-weight: 500; }
.creator-filter { width: min(100%,430px); min-height: 42px; margin-bottom: 15px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.creator-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 13px; margin-bottom: 25px; }
.creator-home { grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); }
.creator-link {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: border-color .16s ease, transform .16s ease;
}
.creator-link:hover { border-color: color-mix(in srgb, var(--accent) 65%, var(--line)); transform: translateY(-1px); }
.creator-cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  height: 78px;
  padding: 9px 12px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 15% 0%, #eee1d2 0 39%, transparent 40%),
    radial-gradient(ellipse at 88% 125%, #c79d89 0 44%, transparent 45%),
    #dfc7b8;
  color: rgba(57, 42, 34, .5);
}
.creator-link:nth-child(3n+2) .creator-cover {
  background:
    radial-gradient(ellipse at 84% 104%, #91a49a 0 42%, transparent 43%),
    radial-gradient(ellipse at 20% -15%, #e8e6dc 0 45%, transparent 46%),
    #bdcabc;
}
.creator-link:nth-child(3n) .creator-cover {
  background:
    radial-gradient(ellipse at 100% 0%, #d7c4df 0 39%, transparent 40%),
    radial-gradient(ellipse at 10% 130%, #a89bb8 0 45%, transparent 46%),
    #cec1d3;
}
.creator-cover-mark { font-family: Georgia, serif; font-size: 29px; font-style: italic; line-height: 1; }
.creator-row { display: flex; align-items: center; gap: 10px; min-height: 70px; padding: 11px 13px; }
.creator-avatar { display: grid; place-items: center; width: 35px; height: 35px; flex: none; border-radius: 50%; background: var(--soft); color: var(--text); font-size: 12px; }
.creator-copy { min-width: 0; flex: 1; }
.creator-link strong { display: block; overflow-wrap: anywhere; font-size: 14px; font-weight: 500; line-height: 1.45; }
.creator-link small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.creator-state { opacity: .82; }
.creator-arrow { flex: none; color: var(--muted); font-size: 15px; }

.hierarchy { display: flex; flex-wrap: wrap; }
.hierarchy a { border: 0; background: transparent; padding: 0; border-radius: 0; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.button:hover { border-color: #c7beb5; background: var(--soft); }
.button.primary { border-color: var(--button); border-radius: 999px; background: var(--button); color: var(--button-text); font-weight: 500; }
.button.primary:hover { background: #4a4540; border-color: #4a4540; }
.button:disabled { cursor: not-allowed; opacity: .45; border-color: var(--line); }

.search { display: flex; gap: 8px; max-width: 640px; align-items: stretch; margin-top: 8px; }
.search input { min-width: 0; flex: 1; padding: 9px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); font-size: 16px; }
.search .button { flex-shrink: 0; font-size: 14px; }
.results-summary { margin: 0 0 13px; color: var(--muted); font-size: 12px; }
.results-summary.error { color: var(--bad); }
.grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 14px; }
.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: border-color .16s ease, transform .16s ease;
}
.card::before {
  content: "";
  display: block;
  width: 100%;
  height: 112px;
  flex: none;
  border-radius: 9px;
  background:
    radial-gradient(ellipse at 24% 122%, #bda18d 0 42%, transparent 43%),
    linear-gradient(132deg, #eee7df, #cfbaa6);
}
.card:nth-child(3n+2)::before { background: radial-gradient(circle at 81% 28%, #e3ddc9 0 23%, transparent 24%), linear-gradient(35deg,#aeb9a7,#dfe2d7); }
.card:nth-child(3n)::before { background: radial-gradient(ellipse at 95% 110%, #b8a2bf 0 43%, transparent 44%), linear-gradient(130deg,#eee6ef,#cbbdce); }
.card:hover { border-color: #c9c1b8; transform: translateY(-1px); }
.card.current { border-color: var(--accent); background: #fffdfa; }
.card-open { display: block; }
.card-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }
.card-actions .button { min-width: 92px; font-size: 13px; }
.quick-select { width: 100%; min-width: 0; min-height: 40px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.quick-audio { width: 100%; min-width: 0; height: 40px; }
.card-timeline { width: 100%; min-width: 0; padding-top: 4px; }
.card-seek { display: block; width: 100%; min-width: 0; height: 28px; margin: 0; padding: 0; accent-color: var(--accent); cursor: pointer; }
.card-seek:disabled { cursor: default; opacity: .45; }
.card-seek:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 5px; }
.card-times { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.card .status:empty, .card .now:empty { display: none; }
.card .status { min-height: 0; font-size: 12px; }
.card h2 { display: -webkit-box; min-height: 2.9em; margin: 0; overflow: hidden; overflow-wrap: anywhere; font-size: 15px; font-weight: 500; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card p { min-height: 1.5em; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.card .meta { margin-top: auto; padding-top: 1px; }
.meta { color: var(--muted); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }

.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 13px; color: var(--muted); font-size: 12px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 40px; flex-shrink: 0; text-decoration: underline; text-underline-offset: 4px; }
.crumbs span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 18px; align-items: start; }
.panel { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.work h1 { margin: 0; overflow-wrap: anywhere; font-size: 23px; font-weight: 500; line-height: 1.45; }
.work h1.collapsed { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.title-toggle { margin-top: 8px; }
.work-description { margin: 15px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.track-heading { margin: 20px 0 11px; font-size: 15px; font-weight: 500; }
.tracklist { display: grid; gap: 7px; }
.track { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 10px; border: 1px solid transparent; border-radius: 10px; background: var(--bg); }
.track.current { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: var(--accent-soft); }
.track button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--button); color: var(--button-text); cursor: pointer; }
.track button:disabled { opacity: .4; cursor: not-allowed; }
.track strong { display: block; overflow-wrap: anywhere; font-size: 13px; font-weight: 500; line-height: 1.55; }
.track small { display: block; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }
.track .track-number { margin-right: 6px; color: var(--accent); font-variant-numeric: tabular-nums; }
.player { position: sticky; top: 24px; }
.player audio { display: block; width: 100%; height: 40px; margin: 11px 0; }
.player-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.player-heading h2 { margin: 0; color: var(--muted); font-size: 12px; font-weight: 500; }
.now { overflow-wrap: anywhere; font-size: 14px; font-weight: 500; line-height: 1.55; }
.now:empty { display: none; }
.track-controls { display: flex; gap: 7px; }
.track-controls .button { flex: 1; padding: 7px; }
.status { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.error { color: var(--bad); }
.player-options { margin-top: 7px; font-size: 13px; }
.player-options summary { display: list-item; min-height: 40px; padding: 9px 0; color: var(--accent); cursor: pointer; }
.option-row { display: flex; align-items: center; justify-content: space-between; gap: 11px; margin: 7px 0; }
.option-row select { min-height: 40px; max-width: 170px; padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.sleep-status { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.recent { margin: 0 0 23px; }
.recent summary { min-height: 40px; padding: 7px 0; cursor: pointer; }
.recent-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 7px; margin-top: 7px; }
.recent-item { display: block; min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.recent-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.recent-item small { color: var(--muted); font-size: 11px; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 11px; margin: 23px 0; }
.empty,.loading { padding: 29px 18px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); text-align: center; }
.empty .button { margin-top: 11px; }
footer { grid-column: 2; padding: 22px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 760px) {
  body { display: block; min-height: 100vh; }
  .topbar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: auto;
    padding: 10px 14px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand { gap: 7px; }
  .brand strong { font-size: 16px; }
  .brand small, .nav-label, .sidebar-note { display: none; }
  .moon { width: 27px; height: 27px; font-size: 16px; }
  .sidebar-navigation { width: 100%; margin-top: 7px; }
  .topbar nav { flex-direction: row; gap: 3px; }
  .topbar nav a { justify-content: center; min-height: 38px; flex: 1; padding: 7px 8px; }
  .topbar nav .search-link { margin-top: 0; padding-top: 7px; border-top: 0; border-radius: 8px; }
  main { width: calc(100% - 28px); margin: 21px auto 42px; }
  .hero { margin-bottom: 18px; }
  .hero h1 { font-size: 22px; }
  .work { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .player { position: static; order: -1; }
  .player .status { margin-top: 6px; }
  .panel { padding: 15px; }
  .work h1 { font-size: 20px; }
  .track { grid-template-columns: 40px minmax(0,1fr); gap: 9px; padding: 9px; }
  .track > small { grid-column: 2; margin-top: -7px; }
  .grid { gap: 12px; }
  .card { padding: 11px; }
  .crumbs { margin-bottom: 7px; }
  footer { padding: 20px 14px; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: minmax(0,1fr); }
  .creator-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .creator-cover { height: 70px; }
  .creator-row { min-height: 65px; padding: 9px; gap: 7px; }
  .creator-avatar { width: 29px; height: 29px; font-size: 11px; }
  .creator-arrow { display: none; }
  .creator-link strong { font-size: 12px; }
  .creator-link small { font-size: 11px; }
  .category-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 390px) {
  main { width: calc(100% - 22px); }
  .topbar { padding-inline: 11px; }
  .topbar nav a { font-size: 12px; }
  .creator-list { gap: 7px; }
  .creator-cover { height: 63px; }
  .creator-row { align-items: flex-start; min-height: 62px; }
  .creator-avatar { display: none; }
  .creator-state { display: none !important; }
  .card::before { height: 130px; }
  .search { flex-wrap: wrap; }
  .search .button { width: 100%; }
}
@media (pointer: coarse) {
  .button, .topbar nav a, .home-categories a, .crumbs a, .player-options summary { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* Playback controls stay inside their original cards. */
.creator-back { display:inline-flex;align-items:center;justify-content:center;width:18px;height:20px;margin-left:4px;color:#b5577a;font-size:16px;line-height:1;text-decoration:none;vertical-align:middle; }
.creator-back:hover { color:#813753; }
.creator-back:focus-visible { outline:2px solid #b5577a;outline-offset:2px; }
.card-creator { display:flex;align-items:center;gap:0; }
.creator-name { min-width:0;overflow-wrap:anywhere; }
.card-actions { align-items:center;gap:10px; }
.card-next[hidden] { display:none; }
.sequence-start { margin-bottom:18px; }
.playback-engine,.retained-player { display:none !important; }
.queue-failures { font-size:12px;margin-bottom:14px; }
.queue-failures[hidden] { display:none; }
.queue-failure { display:flex;align-items:center;gap:8px;margin:6px 0; }
.queue-failure span { flex:1;overflow-wrap:anywhere; }
.queue-failure .button { flex-shrink:0; }
.track-card .meta { overflow-wrap:anywhere; }
.back-to-results { margin-bottom:14px; }

/* The current session remains reachable beside the category navigation. */
.topbar { overflow-y:auto; }
.sidebar-player { flex-shrink:0;min-width:0;margin:22px 0 18px;padding:12px 10px;border:1px solid #e8d9df;border-radius:12px;background:#fbf5f7; }
.sidebar-player-head { display:flex;align-items:center;justify-content:space-between;gap:4px;margin-bottom:8px; }
.sidebar-play-state { display:flex;align-items:center;gap:5px;color:var(--muted);font-size:11px; }
.sidebar-play-state::before { content:'';width:6px;height:6px;border-radius:50%;background:#aaa19c;flex-shrink:0; }
.sidebar-player[data-state="playing"] .sidebar-play-state { color:#a34f6d; }
.sidebar-player[data-state="playing"] .sidebar-play-state::before { background:#b5577a;box-shadow:0 0 0 3px #f1dfe6; }
.sidebar-close { display:grid;place-items:center;flex-shrink:0;width:26px;height:26px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:20px;cursor:pointer; }
.sidebar-close:hover { background:#efdee5;color:var(--text); }
.sidebar-creator { overflow-wrap:anywhere;font-size:13px;font-weight:600; }
.sidebar-track { display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;margin-top:4px;color:var(--muted);font-size:11px;line-height:1.6; }
.sidebar-seek { display:block;width:100%;min-width:0;height:26px;margin:5px 0 0;padding:0;accent-color:#b5577a;cursor:pointer; }
.sidebar-seek:disabled { opacity:.45;cursor:default; }
.sidebar-seek:focus-visible { outline:2px solid #b5577a;outline-offset:2px;border-radius:4px; }
.sidebar-time { margin:0 0 8px;color:var(--muted);font-size:10px;font-variant-numeric:tabular-nums; }
.sidebar-player-actions { display:grid;gap:7px; }
.sidebar-toggle { min-height:32px;padding:5px 7px;border-color:#dbc6cf;background:#fff;font-size:12px; }
.sidebar-return { padding:3px 0;color:#a34f6d;font-size:11px;text-align:center; }
.sidebar-return:hover { text-decoration:underline; }
@media (max-width:760px) {
  .topbar { max-height:100dvh; }
  .sidebar-player { display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;width:100%;margin:8px 0 0;padding:8px 10px; }
  .sidebar-player-head { grid-column:1 / -1;margin-bottom:2px; }
  .sidebar-creator,.sidebar-track { grid-column:1; }
  .sidebar-track { -webkit-line-clamp:1;margin:0; }
  .sidebar-time { grid-column:1;margin:3px 0 0; }
  .sidebar-seek { grid-column:1 / -1;grid-row:5;margin:3px 0 0; }
  .sidebar-player-actions { grid-column:2;grid-row:2 / span 3;align-self:center;gap:2px; }
}
