:root {
  --ink: #100e0b;
  --paper: #f3ead8;
  --brass: #c9a227;
  --red: #9c1c1c;
  --mute: #8a8172;
  --card: #1a1713;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--paper); }
body {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  letter-spacing: 0.01em;
}
#app { display: grid; grid-template-columns: 92px 1fr; height: 100%; }
.rail {
  border-right: 1px solid #2a241c;
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 8px; gap: 18px;
  background: linear-gradient(180deg, #16130f, #0c0a08);
}
.mark {
  width: 52px; height: 52px; border: 1px solid var(--brass);
  display: grid; place-items: center;
  font-family: Georgia, serif; font-size: 28px; color: var(--brass);
}
.rail nav { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.rail button {
  background: transparent; color: var(--paper); border: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 10px 4px; cursor: pointer;
}
.rail button.on { color: var(--brass); }
.rail-foot { margin-top: auto; font-size: 10px; color: var(--mute); text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; }
main { display: flex; flex-direction: column; min-width: 0; }
.top {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 22px; border-bottom: 1px solid #2a241c;
}
h1 { font-family: Georgia, serif; font-weight: 500; font-size: 22px; margin: 0; }
#search-form { flex: 1; }
#search {
  width: 100%; max-width: 420px; background: #18150f; color: var(--paper);
  border: 1px solid #3a3226; padding: 8px 10px; font-family: inherit;
}
.who { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: var(--mute); }
.stage { flex: 1; overflow: auto; scroll-snap-type: y mandatory; }
.clip {
  min-height: 100%; scroll-snap-align: start;
  display: grid; grid-template-columns: minmax(240px, 420px) 1fr;
  gap: 24px; padding: 24px;
}
video {
  width: 100%; height: min(78vh, 820px); object-fit: cover;
  background: #000; border: 1px solid #2a241c;
}
.meta h2 { font-family: Georgia, serif; font-size: 28px; margin: 0 0 8px; }
.handle, .handle a { color: var(--brass); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; text-decoration: none; }
.why { color: var(--mute); font-size: 14px; max-width: 36ch; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.actions button, .panel button, .panel input[type=submit] {
  background: var(--brass); color: var(--ink); border: 0;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  padding: 8px 12px; cursor: pointer;
}
.comments { list-style: none; padding: 0; }
.comments li { border-top: 1px solid #2a241c; padding: 8px 0; }
.panel { max-width: 480px; padding: 28px; }
.panel label { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--mute); }
.panel input, .panel textarea {
  width: 100%; background: #18150f; color: var(--paper);
  border: 1px solid #3a3226; padding: 8px; font-family: inherit;
}
.empty { padding: 48px; color: var(--mute); }
@media (max-width: 800px) {
  #app { grid-template-columns: 1fr; }
  .rail { flex-direction: row; border-right: 0; border-bottom: 1px solid #2a241c; }
  .rail-foot { display: none; }
  .rail nav { flex-direction: row; }
  .clip { grid-template-columns: 1fr; min-height: 100svh; }
}
