:root {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #161b22;
  --line: #272e38;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #1db954;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 16px 64px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

main { max-width: 820px; margin: 0 auto; }

header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-block: 28px 20px;
  border-bottom: 1px solid var(--line);
}

h1 { font-size: 22px; margin: 0; letter-spacing: -0.01em; }
h1 span { color: var(--accent); }
h2 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 32px 0 12px; }
p { color: var(--muted); }

button {
  font: inherit;
  font-weight: 600;
  color: #06170d;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }

input {
  font: inherit;
  flex: 1;
  min-width: 0;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

form { display: flex; gap: 8px; margin-top: 24px; }

.identity { display: flex; align-items: center; gap: 10px; }
.identity img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

.tabs { display: flex; gap: 8px; margin-top: 20px; }

.meta { min-width: 0; flex: 1; }
.meta .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .artist { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.notice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-top: 24px;
}
.notice.error { border-color: #6b2230; }
.notice code { background: #0b0f14; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.notice form { margin-top: 12px; }

.status {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}
.status.ready { color: var(--accent); border-color: var(--accent); }

#nowplaying {
  position: fixed;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
#nowplaying[hidden] { display: none; }

#nowplaying img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; }
#nowplaying .meta { flex: none; width: 190px; }
#nowplaying .controls { display: flex; gap: 6px; flex: none; }
#nowplaying .controls button { padding: 6px 12px; font-size: 13px; }
#nowplaying .time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; flex: none; }

#nowplaying .progress {
  flex: 1;
  min-width: 140px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
}
#nowplaying .progress .fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--accent);
}

@media (max-width: 560px) {
  #nowplaying .meta { width: 100%; order: -1; }
}

/* The two default actions. */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 48px;
}
button.big { font-size: 16px; padding: 14px 28px; }

/* Revealed metadata. */
.card {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 28px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.card > img { width: 200px; height: 200px; border-radius: 10px; object-fit: cover; }
.card-body { flex: 1; min-width: 260px; }

.card-title {
  display: block;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 14px;
}
.card-title:hover { color: var(--accent); }

.card dl {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 14px;
}
.card dt { color: var(--muted); }
.card dd { margin: 0; overflow-wrap: anywhere; }

.card details { margin-top: 18px; font-size: 13px; }
.card summary { color: var(--muted); cursor: pointer; }
.card pre {
  max-height: 320px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}

#nowplaying { position: fixed; padding-right: 48px; }
#nowplaying .close {
  position: absolute;
  top: 6px;
  right: 10px;
  padding: 2px 8px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
  background: transparent;
  border: 0;
}
#nowplaying .close:hover { color: var(--text); filter: none; }

.notice a { color: var(--accent); }
.cardlist { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cardlist a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
}

/* The embed, hidden behind a blur until the listener pauses. */
.stage { position: relative; margin-top: 28px; border-radius: 12px; overflow: hidden; }
.stage iframe { display: block; width: 100%; border: 0; }

.stage .frame { transition: filter 0.45s ease, transform 0.45s ease; }
.stage[data-revealed="false"] .frame {
  /* Scaled up so the blur has pixels to sample at the edges. */
  filter: blur(22px);
  transform: scale(1.1);
}

.stage .veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(13, 17, 23, 0.35);
}
.stage[data-revealed="true"] .veil { display: none; }
.stage .veil button:disabled { opacity: 0.6; cursor: progress; }

.signin {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}
.signin:hover { border-color: var(--accent); color: var(--accent); }

/* Brand mark, linking back to the version index. */
.brand {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand span { color: var(--muted); font-weight: 400; font-size: 0.62em; letter-spacing: 0; }
.brand:hover { opacity: 0.8; }

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

/* Version index. */
.version {
  display: block;
  margin-top: 12px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}
.version:hover { border-color: var(--accent); }
.version-head { display: flex; align-items: center; gap: 10px; }
.version-title { font-size: 16px; font-weight: 600; }
.version p { margin: 6px 0 0; font-size: 14px; }

.rule { border: 0; border-top: 2px solid var(--line); margin: 48px 0 0; }

/* Pros and cons under each version. */
.points { list-style: none; margin: 12px 0 0; padding: 0; font-size: 13.5px; }
.points li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 2px 0;
  color: var(--muted);
}
.points li::before { flex: none; font-weight: 700; }
.points .pro::before { content: "✓"; color: var(--accent); }
.points .con::before { content: "✕"; color: #e5657f; }

/* Prose pages. */
.lede { font-size: 15px; max-width: 60ch; }
.doc { margin-top: 32px; max-width: 68ch; }
.doc h3 { font-size: 15px; margin: 32px 0 8px; }
.doc p { color: var(--muted); }
.doc strong { color: var(--text); }
.doc code { background: var(--panel); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }
.doc a { color: var(--accent); }

.doc blockquote {
  margin: 12px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--accent);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
}

.table-wrap { overflow-x: auto; margin-top: 12px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.doc th, .doc td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 600; }
.doc td.ok { color: var(--accent); }
.doc td.bad { color: #e5657f; }

/* Standing conclusion callout. */
.info {
  margin-top: 28px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
}
.info-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.info-head span { color: var(--accent); font-size: 16px; }
.info p { margin: 8px 0 0; color: var(--muted); font-size: 14px; max-width: 70ch; }
