:root {
  --bg: #0c0c0c;
  --card: #1a1a1a;
  --ink: #f4f4f4;
  --muted: #b0b0b0;
  --orange: #ff6a00;
  --orange-2: #ff8a33;
  --line: #2a2a2a;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Ember", "Amazon Ember", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body { padding: 0 0 96px; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 16px 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}
.logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--orange);
  color: #111;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
}
.count { color: var(--muted); font-size: 0.85rem; }

.search-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px 16px 16px;
}
input, select, button {
  font: inherit;
  color: var(--ink);
}
input, select {
  background: var(--card);
  border: 0;
  border-radius: 24px;
  padding: 12px 16px;
}
select { appearance: none; padding-right: 28px; }

h2 {
  margin: 0 16px 10px;
  font-size: 1.05rem;
  font-weight: 700;
}

.continue-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 16px 18px;
  scrollbar-width: none;
}
.continue-row::-webkit-scrollbar { display: none; }
.cont-card {
  flex: 0 0 148px;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
}
.cont-card .t { display: block; margin-top: 8px; font-size: 0.85rem; font-weight: 600; }
.cont-card .s { display: block; color: var(--muted); font-size: 0.75rem; }

.library { display: grid; }
.lib-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: inherit;
}
.lib-row.active { background: #20150e; }
.lib-row b { display: block; font-size: 0.98rem; }
.lib-row span { color: var(--muted); font-size: 0.8rem; }

.cover {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.08), transparent 40%),
    linear-gradient(180deg, var(--c1, #5c2410), var(--c2, #1a0d08));
  color: #f7e6c8;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}
.cover.sm { width: 44px; height: 44px; border-radius: 4px; }
.cover.md { width: 72px; height: 72px; border-radius: 4px; }
.cover.lg {
  width: min(72vw, 340px);
  aspect-ratio: 1;
  border-radius: 8px;
  margin: 8px auto 18px;
}
.cover.hero { width: 148px; height: 148px; border-radius: 6px; }
.cover .brand-line,
.cover .yr,
.cover .mo {
  position: absolute;
  left: 8%;
  right: 8%;
  font-weight: 800;
}
.cover .brand-line { top: 10%; font-size: 0.55em; letter-spacing: 0.18em; }
.cover .yr { bottom: 22%; font-size: 1.55em; letter-spacing: -0.04em; }
.cover .mo { bottom: 8%; font-size: 0.7em; opacity: 0.85; }
.cover.md .yr { font-size: 1.05rem; }
.cover.sm .brand-line, .cover.sm .mo { display: none; }
.cover.sm .yr { bottom: 12%; font-size: 0.7rem; }
.bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: #0006;
}
.bar > i { display: block; height: 100%; background: var(--orange); width: 0; }

.mini {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  background: #2a2a2a;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 8px 30px #000a;
  z-index: 5;
}
.mini-main {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  min-width: 0;
}
.mini-meta { min-width: 0; }
.mini-meta b, .mini-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-meta span { color: var(--muted); font-size: 0.78rem; }
.icon-btn, .ghost, .skip, .play-circle {
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.icon-btn {
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
}

.player-full {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: linear-gradient(180deg, #2a1a12 0%, #0c0c0c 42%);
  padding: 8px 22px calc(24px + env(safe-area-inset-bottom));
  overflow: auto;
  text-align: center;
}
.ghost {
  font-size: 1.8rem;
  width: 48px;
  height: 40px;
}
.player-full h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}
.by { color: var(--muted); margin: 6px 0 8px; }
.status {
  min-height: 1.2em;
  margin: 0 0 14px;
  color: var(--orange-2);
  font-size: 0.85rem;
}
#scrub {
  width: 100%;
  accent-color: var(--orange);
}
.times {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 10px;
}
.transport {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin: 8px 0 16px;
}
.skip { font-size: 1.15rem; font-weight: 700; width: 64px; }
.play-circle {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--ink);
  color: #111;
  font-size: 1.6rem;
}
.player-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.script {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: left;
  max-height: 22dvh;
  overflow: auto;
}

button { cursor: pointer; }
