:root {
  color-scheme: light;
  font: 16px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --text: #17271e;
  --muted: #4b6353;
  --paper: #f4f0df;
  --soft: #e9ead9;
  --line: #b7c6b4;
  --accent: #395742;
  --accent-dark: #244b32;
  --accent-wash: #e0ebcb;
  --danger: #882d25;
  --wide: 87rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  scroll-padding-top: 5rem;
  background: #0c1c17;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--text); }
a { color: var(--accent-dark); text-underline-offset: .19em; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button, input, select, textarea { border: 1px solid var(--line); border-radius: .2rem; }
button {
  min-height: 2.75rem;
  padding: .5rem .8rem;
  background: var(--paper);
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
}
button:hover { background: var(--accent-wash); }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover { background: var(--accent-dark); }
button:disabled { cursor: default; opacity: .7; }
input, textarea, select {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: .52rem .67rem;
  background-color: var(--paper);
  color: var(--text);
}
input[readonly] { background: var(--soft); }
select {
  appearance: none;
  padding-inline-end: 2rem;
  background-image: linear-gradient(45deg, transparent 45%, currentColor 47% 60%, transparent 62%),
    linear-gradient(135deg, transparent 42%, currentColor 44% 57%, transparent 59%);
  background-size: .36rem .36rem;
  background-position: right 1.02rem center, right .68rem center;
  background-repeat: no-repeat;
}
textarea { resize: vertical; min-height: 5rem; }
label { display: grid; gap: .35rem; min-width: 0; font-size: .92rem; font-weight: 650; }
.skip-link {
  position: fixed;
  top: .8rem;
  left: .8rem;
  z-index: 10;
  transform: translateY(-190%);
  padding: .6rem .85rem;
  background: var(--paper);
}
.skip-link:focus { transform: translateY(0); }
.masthead { position: sticky; top: 0; z-index: 3; background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  max-width: var(--wide);
  min-height: 4.2rem;
  padding: .55rem var(--gutter);
  margin-inline: auto;
}
.brand, .nav-link { display: inline-flex; gap: .65rem; min-height: 2.75rem; align-items: center; text-decoration: none; }
.brand { color: var(--text); font: 650 clamp(1rem, 3.5vw, 1.28rem)/1.12 Georgia, serif; }
.nav-link { flex: none; font-size: .875rem; font-weight: 650; padding: .3rem .68rem; }
.brand-mark { display: grid; flex: none; place-items: center; position: relative; width: 2rem; height: 1.55rem; }
.brand-mark::before {
  content: "";
  display: block;
  width: .56rem;
  height: .68rem;
  margin-left: .1rem;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
main { max-width: var(--wide); margin-inline: auto; padding: 1.25rem var(--gutter) 3.5rem; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0 0 .5rem; font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1.08; }
h2 { margin: 0 0 .6rem; font-size: clamp(1.25rem, 3vw, 1.55rem); line-height: 1.2; }
h3 { margin: 0; font-size: 1.04rem; }
p { margin: .35rem 0; }
summary { cursor: pointer; }
details { min-width: 0; }
details > summary + * { margin-top: .75rem; }
img { max-width: 100%; }
.muted, .hint, .history-meta { color: var(--muted); }
.hint, .history-meta { font-size: .875rem; }
.row { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }
.space { justify-content: space-between; }
.stack { display: grid; gap: .8rem; }
.columns { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); padding: clamp(.85rem, 2vw, 1.4rem); margin-top: .85rem; }
.narrow { max-width: 32rem; }
.entry { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.actions { margin-top: .75rem; }
.message:not(:empty) { padding: .6rem .85rem; border: 1px solid var(--line); background: var(--soft); }
.message.error { color: var(--danger); }
.message:empty { display: none; }
.check-option { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
input[type="checkbox"] { flex: none; height: 1.05rem; width: 1.05rem; min-height: 0; margin: 0; accent-color: var(--accent); }
.genre-choices { margin: 0; min-width: 0; padding: .65rem; border: 1px solid var(--line); }
.genre-choices legend { padding-inline: .25rem; }
.age-tag, .watched-tag { display: inline-flex; align-items: center; width: fit-content; font-size: .875rem; line-height: 1.28; }
.tile-art, .tile-cover { display: block; }
.tile-art img, .tile-cover { width: 100%; height: 100%; object-fit: cover; }
.tile-cover { display: grid; place-items: center; background: var(--soft); color: var(--muted); font-weight: 700; }
.player-host { position: relative; margin-top: .65rem; aspect-ratio: 16 / 9; min-height: 12rem; max-width: 69rem; background: #09150e; }
.player-host iframe { display: block; width: 100%; height: 100%; min-height: 12rem; border: 0; }
.player-host .waiting-for-player { visibility: hidden; }
.player-loading { position: absolute; z-index: 1; inset: 40% 1rem auto; color: #f6f1e5; text-align: center; }
.view-progress { width: min(100%, 17rem); height: .45rem; accent-color: var(--accent); }
.history-list { list-style: none; padding: 0; margin: 0; }
.history-entry { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.history-entry .tile-art { width: clamp(5rem, 17%, 8rem); aspect-ratio: 16/9; overflow: hidden; }
.history-entry .history-meta { flex: 1 1 12rem; min-width: 0; }

