:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  background: #121316;
  color: #f7f4ec;
  --accent: #f6cd70;
  --muted: #b9b7bf;
  --border: #3b3b44;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.top, main, footer { width: min(100% - 2rem, 68rem); margin-inline: auto; }
.top { padding-block: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; font-size: 1.25rem; font-weight: 750; color: inherit; text-decoration: none; }
.mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .6rem; background: var(--accent); color: #211909; font-size: .85rem; }
.intro { padding: clamp(1.5rem, 6vw, 5rem); border: 1px solid #494134; border-radius: 1.5rem; background: linear-gradient(125deg, #382820, #242027 63%, #19191e); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.65rem, 8vw, 6rem); line-height: .99; letter-spacing: -.065em; }
.intro p { margin-block: 1rem 1.6rem; color: #e2d8cf; }
#search { display: flex; gap: .5rem; max-width: 32rem; }
#query { flex: 1; min-width: 0; }
input, button, select { font: inherit; }
input[type="search"], button, select { color: inherit; background: #202127; border: 1px solid var(--border); border-radius: .65rem; padding: .6rem .7rem; }
button, select, input[type="checkbox"] { cursor: pointer; }
button:hover, select:hover { border-color: var(--accent); }
.primary { background: var(--accent); color: #231b0b; border-color: var(--accent); font-weight: 700; }
.primary:hover { background: #ffe2a0; }
:focus-visible { outline: .16rem solid #ffd67c; outline-offset: .2rem; }
main > section + section { margin-top: 2rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: .9rem; }
.card { display: flex; align-items: flex-start; gap: 1rem; min-width: 0; padding: 1rem; border: 1px solid var(--border); background: #1b1c21; border-radius: 1rem; }
.poster { flex: 0 0 4.3rem; width: 4.3rem; aspect-ratio: 2 / 3; border-radius: .4rem; object-fit: cover; background: #342c2d; display: grid; place-items: center; color: var(--accent); }
.card-body { min-width: 0; display: grid; gap: .4rem; }
.card h3 { overflow-wrap: anywhere; }
.card a, footer a { color: inherit; }
.meta, .empty, footer, #feedback { color: var(--muted); }
.meta { font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .35rem; }
.actions button, .actions select { font-size: .875rem; }
.empty { grid-column: 1 / -1; padding: 1.25rem; border: 1px dashed var(--border); border-radius: 1rem; }
#feedback { margin-top: .9rem; }
#feedback:empty { display: none; }
footer { padding-block: 2rem; font-size: .875rem; }
dialog { width: min(35rem, calc(100% - 2rem)); max-height: 80vh; color: inherit; background: #1b1c21; border: 1px solid var(--border); border-radius: 1rem; padding: 1.25rem; }
dialog::backdrop { background: #000b; }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
legend { color: var(--accent); margin-bottom: .35rem; font-weight: 700; }
.episode { display: flex; gap: .7rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.episode input { accent-color: var(--accent); flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.top { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
#open-account { max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-fields { display: grid; gap: .65rem; }
#account-create { margin-top: .9rem; }
#display-name { color: inherit; background: #202127; border: 1px solid var(--border); border-radius: .65rem; padding: .6rem .7rem; }
#account-name { overflow-wrap: anywhere; }
#account-message:not(:empty) { margin-block: .75rem; color: var(--muted); }
