:root {
  color-scheme: dark;
  --ink: #181310;
  --paper: #f4eee2;
  --paper-muted: #cfc4b4;
  --copper: #bc8a54;
  --line: rgba(255, 255, 255, 0.22);
  --custom-background: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background-color: #211a16;
  background-image:
    var(--custom-background),
    radial-gradient(circle at 18% 12%, rgba(188, 138, 84, 0.23), transparent 29%),
    radial-gradient(circle at 78% 82%, rgba(82, 107, 102, 0.2), transparent 34%),
    repeating-linear-gradient(118deg, rgba(255,255,255,.025) 0 1px, transparent 1px 7px),
    linear-gradient(145deg, #2d241e, #151311 70%);
  background-size: cover, auto, auto, auto, auto;
  background-position: center;
  background-attachment: fixed;
  font-family: Georgia, "Times New Roman", serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.23), transparent 35%, rgba(0,0,0,.25)),
    repeating-radial-gradient(circle at 20% 30%, transparent 0 3px, rgba(255,255,255,.012) 4px 5px);
  mix-blend-mode: soft-light;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 7vh 0;
  display: grid;
  grid-template-columns: minmax(280px, 46%) minmax(360px, 1fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}

.cover-area {
  min-width: 0;
  display: grid;
  place-items: center;
  perspective: 900px;
}

.cover {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 34px 35px -24px rgba(0, 0, 0, .92), 0 8px 18px rgba(0,0,0,.38);
}

.player-panel {
  min-width: 0;
  padding: clamp(22px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(21, 18, 16, .74);
  box-shadow: 0 28px 70px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(13px);
}

.work-heading { text-align: center; }
.eyebrow {
  margin: 0 0 9px;
  color: var(--copper);
  font: 600 11px/1.2 system-ui, sans-serif;
  letter-spacing: .24em;
}

h1, h2 { margin: 0; font-weight: 400; text-wrap: balance; }
h1 { font-size: clamp(28px, 4vw, 50px); line-height: 1.03; }
h2 { font-size: clamp(24px, 3vw, 36px); }
.author { margin: 12px 0 0; color: var(--paper-muted); font-size: clamp(17px, 2vw, 22px); font-style: italic; }

.main-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: clamp(28px, 5vh, 48px) 0 26px;
}

.round-button,
.skip-button {
  position: relative;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(255,255,255,.075);
  border: 1.5px solid rgba(255,255,255,.82);
  border-radius: 50%;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.round-button { width: 60px; height: 60px; }
.round-button.primary { background: rgba(188,138,84,.3); border-color: #e2bd91; }
.round-button:hover:not(:disabled), .skip-button:hover:not(:disabled) { transform: translateY(-2px); background: rgba(188,138,84,.28); }
.round-button:active:not(:disabled), .skip-button:active:not(:disabled) { transform: translateY(0) scale(.96); }
.round-button:focus-visible, .skip-button:focus-visible, .close-button:focus-visible, .work-item:focus-visible, .seek:focus-visible { outline: 3px solid #f0c792; outline-offset: 3px; }
button:disabled { opacity: .34; cursor: not-allowed; }

.info-icon { font: 700 28px/1 Georgia, serif; }
.play-icon { margin-left: 4px; font: 25px/1 system-ui, sans-serif; }
.double-icon { font: 18px/1 system-ui, sans-serif; letter-spacing: -5px; margin-left: -4px; }
.stop-icon { width: 19px; height: 19px; background: currentColor; }
.folder-icon { position: relative; width: 27px; height: 19px; border: 2px solid currentColor; border-radius: 2px; }
.folder-icon::before { content: ""; position: absolute; left: -2px; top: -8px; width: 12px; height: 6px; border: 2px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; }

.timeline-card {
  padding: 18px 20px 16px;
  color: var(--ink);
  border-radius: 18px;
  background: rgba(244, 238, 226, .9);
  box-shadow: inset 0 1px white, 0 12px 30px rgba(0,0,0,.25);
}

.track-name {
  min-height: 2.5em;
  margin: 0 12px 5px;
  display: grid;
  place-items: end center;
  font: 600 12px/1.25 system-ui, sans-serif;
  text-align: center;
  overflow-wrap: anywhere;
}

.seek {
  --progress: 0%;
  width: 100%;
  height: 22px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.seek::-webkit-slider-runnable-track { height: 5px; border-radius: 4px; background: linear-gradient(to right, #090909 0 var(--progress), #b9b8b4 var(--progress) 100%); }
.seek::-moz-range-track { height: 5px; border-radius: 4px; background: linear-gradient(to right, #090909 0 var(--progress), #b9b8b4 var(--progress) 100%); }
.seek::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -6.5px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 50%; background: #090909; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.seek::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #090909; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.seek:disabled { opacity: .45; cursor: default; }

.time-row { display: flex; justify-content: space-between; font: 600 13px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.short-controls { display: flex; justify-content: center; gap: 34px; margin-top: 11px; }
.skip-button { width: 48px; height: 48px; color: var(--ink); border-color: rgba(24,19,16,.62); background: rgba(255,255,255,.25); }
.skip-arrow { position: absolute; font: 45px/1 system-ui, sans-serif; margin-top: -6px; }
.skip-number { z-index: 1; padding-top: 7px; font: 700 11px/1 system-ui, sans-serif; }

.status { min-height: 1.2em; margin: 14px 0 -6px; color: var(--paper-muted); font: 12px/1.4 system-ui, sans-serif; text-align: center; }

.dialog {
  width: min(600px, calc(100% - 28px));
  max-height: min(78vh, 760px);
  padding: 0;
  color: var(--ink);
  border: 0;
  border-radius: 22px;
  background: #f5efe4;
  box-shadow: 0 28px 90px rgba(0,0,0,.65);
}
.dialog::backdrop { background: rgba(10,8,7,.72); backdrop-filter: blur(5px); }
.dialog-heading { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 20px; padding: 25px 26px 18px; background: linear-gradient(#f5efe4 84%, rgba(245,239,228,0)); }
.close-button { align-self: start; width: 38px; height: 38px; color: var(--ink); border: 1px solid rgba(24,19,16,.24); border-radius: 50%; background: transparent; font: 30px/30px system-ui, sans-serif; cursor: pointer; }
.works-list { padding: 2px 14px 24px; overflow-y: auto; }
.work-item { width: 100%; padding: 16px 14px; display: flex; justify-content: space-between; align-items: center; gap: 18px; color: var(--ink); border: 0; border-bottom: 1px solid rgba(24,19,16,.13); background: transparent; text-align: left; cursor: pointer; }
.work-item:hover { background: rgba(188,138,84,.12); }
.work-item strong, .work-item em { display: block; }
.work-item strong { font-size: 18px; }
.work-item em { margin-top: 4px; color: #6d6258; }
.work-item .chevron { font: 24px/1 system-ui, sans-serif; }
.empty-message { padding: 30px 18px; color: #6d6258; text-align: center; }
.text-button { margin: 0 28px 28px; padding: 11px 18px; color: white; border: 0; border-radius: 999px; background: var(--ink); cursor: pointer; }
.info-content { margin: 0; padding: 4px 28px 30px; }
.info-content div { padding: 13px 0; border-bottom: 1px solid rgba(24,19,16,.12); }
.info-content dt { color: #76685b; font: 700 10px/1.2 system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.info-content dd { margin: 5px 0 0; white-space: pre-line; font-size: 18px; line-height: 1.45; }

@media (max-width: 820px) {
  .app-shell { width: min(660px, calc(100% - 28px)); padding: 28px 0 42px; grid-template-columns: 1fr; gap: 34px; }
  .cover { max-height: 62vh; }
  .player-panel { padding: 25px 18px; }
  .main-controls { margin: 28px 0 22px; }
}

@media (max-width: 430px) {
  .app-shell { width: calc(100% - 20px); }
  .cover { max-height: 56vh; }
  .round-button { width: 52px; height: 52px; }
  .main-controls { gap: 8px; }
  .timeline-card { padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
