/* Old School News: newsprint look. Paper with a light yellow tint at the top that fades to
   white by the story list (fade positions set by news.js), black ink, gothic masthead. */
:root {
  --paper: #fbf6e6;
  --paper-2: #f4f1e8;
  --ink: #1d1a14;
  --muted: #5e5546;
  --rule: #2b261d;
  --head: "Old Standard TT", "Times New Roman", Georgia, serif;
  --body: "Old Standard TT", "Times New Roman", Georgia, serif;
  --fell: "IM Fell English", "Times New Roman", Georgia, serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  --fade-a: 120px;
  --fade-b: 620px;
  background: #fff linear-gradient(to bottom, var(--paper) 0, var(--paper) var(--fade-a), #fff var(--fade-b)) no-repeat;
  background-size: 100% var(--fade-b);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

.app {
  max-width: 620px;
  margin: 0 auto;
  padding: 14px 20px calc(36px + env(safe-area-inset-bottom));
}

/* Language toggle, at the very top of the page */
.lang-bar { display: flex; justify-content: flex-end; gap: 0; max-width: 620px; margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 20px 0; }
.lang-bar button { font-family: var(--body); font-size: .85rem; cursor: pointer; padding: 4px 12px;
  color: var(--ink); background: transparent; border: 1px solid var(--rule); }
.lang-bar button + button { border-left: none; }
.lang-bar button[aria-pressed="true"] { background: var(--ink); color: var(--paper); font-weight: 700; }

/* Masthead */
.masthead { text-align: center; margin-bottom: 22px; }
.masthead h1 {
  font-family: "Grenze Gotisch", "Old English Text MT", var(--head);
  font-weight: 600; font-size: clamp(2.6rem, 11vw, 4.2rem); line-height: 1.05; letter-spacing: .01em;
  margin: 0; padding-bottom: 10px; border-bottom: 3px double var(--rule);
}
.motto { font-family: var(--fell); font-style: italic; font-size: 1.02rem; margin: 8px 0 8px; }
.edition {
  margin: 0; padding: 5px 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em;
  border-top: 1px solid var(--rule); border-bottom: 3px double var(--rule);
}
.edition:empty { padding: 0; border-top: none; }

h3 {
  font-family: var(--head); font-size: .85rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink); margin: 0 0 10px; padding-bottom: 5px; border-bottom: 1px solid var(--rule);
}

/* Player */
.player { border: 1px solid var(--rule); outline: 1px solid var(--rule); outline-offset: 3px; padding: 20px 20px 22px; }
.now-label { margin: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .16em; text-align: center; color: var(--muted); }
.now-title { font-family: var(--head); margin: 8px 0 10px; font-size: 1.45rem; line-height: 1.25; font-weight: 700; text-align: center; min-height: 1.8rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 12px; }
.tag { font-size: .72rem; padding: 2px 8px; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--rule); }
.tag.diff { border-style: dotted; color: var(--muted); }
.now-summary { margin: 0 0 8px; line-height: 1.55; font-size: 1.02rem; }
.now-link { margin: 0 0 14px; font-size: .85rem; font-style: italic; color: var(--muted); }

.progress input[type=range] { width: 100%; accent-color: var(--ink); height: 24px; }
.times { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }

.controls { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 12px; }
.controls button { border: none; cursor: pointer; display: grid; place-items: center; border-radius: 50%; padding: 0; }
.controls svg { fill: currentColor; }
.controls .big { width: 76px; height: 76px; background: var(--ink); color: var(--paper); }
.controls .big svg { width: 40px; height: 40px; }
.controls .big:active { background: #3a3428; }
.controls .small { width: 50px; height: 50px; background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.controls .small svg { width: 24px; height: 24px; }

/* Playlist */
.playlist { margin-top: 28px; }
.count { color: var(--muted); letter-spacing: 0; text-transform: none; font-size: .85rem; }
.playlist ol { list-style: none; margin: 0; padding: 0; }
.playlist li button {
  width: 100%; text-align: left; font: inherit; color: var(--ink); background: transparent;
  border: none; border-bottom: 1px solid rgba(43,38,29,.35); padding: 11px 6px; cursor: pointer;
  display: flex; gap: 12px; align-items: baseline;
}
.playlist li button .num { font-weight: 700; width: 1.6em; flex: none; text-align: right; }
.playlist li button .t { flex: 1; font-family: var(--head); line-height: 1.35; }
.playlist li button .t small { display: block; color: var(--muted); font-size: .72rem; margin-top: 3px; text-transform: uppercase; letter-spacing: .08em; }
.playlist li button .d { color: var(--muted); font-size: .75rem; flex: none; font-style: italic; }
.playlist li button.playing { background: var(--paper-2); box-shadow: inset 3px 0 0 var(--ink); }
.empty { color: var(--muted); font-style: italic; }
.hint { font-size: .85rem; color: var(--muted); font-style: italic; margin: 8px 2px 0; }

/* Filters */
.filters { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--rule); background: #fff; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; padding: 6px 2px; font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; cursor: pointer; flex: none; }
.check .n { color: var(--muted); font-size: .8rem; margin-left: auto; }
.check.all { border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 4px; font-weight: 700; }
.cats { display: grid; grid-template-columns: 1fr; }
@media (min-width: 540px) { .cats { grid-template-columns: 1fr 1fr; column-gap: 18px; } }

/* Disclaimer */
.disclaimer { margin-top: 28px; padding-top: 14px; border-top: 3px double var(--rule); font-size: .8rem; line-height: 1.55; color: var(--muted); }
.disclaimer p { margin: 0 0 10px; }
.disclaimer strong { color: var(--ink); }
