:root {
  --paper: #f3f0e8;
  --paper-2: #ece7db;
  --paper-3: #e4ddcf;
  --card: #fbf9f3;
  --ink: #171512;
  --ink-soft: #3c3831;
  --muted: #827a6c;
  --line: #d8d1c3;
  --line-strong: #b6ac9a;
  --accent: #d9441c;
  --accent-soft: #f0d9cf;
  --radius: 3px;
  --serif: "Iowan Old Style", "Baskerville", "Palatino Linotype", "Songti SC", "Noto Serif SC", "LXGW WenKai", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "WenQuanYi Zen Hei", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --shadow: 0 12px 32px -18px rgba(23, 21, 18, .45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--ink); color: var(--paper); }
img, video { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.grain {
  position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ---------------------------------------------------------------- chrome */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  height: 72px; padding: 0 clamp(18px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.brand-mark {
  font-family: var(--serif); font-size: 26px; line-height: 1; letter-spacing: -.06em;
  font-weight: 600;
}
.brand-text {
  display: flex; flex-direction: column; gap: 3px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em; line-height: 1;
}
.brand-text em {
  font-style: normal; font-family: var(--sans); font-size: 9px;
  letter-spacing: .28em; color: var(--muted);
}
.search-wrap {
  position: relative; display: flex; align-items: center; gap: 8px;
  flex: 1; max-width: 340px; height: 38px; padding: 0 10px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color .2s;
}
.search-wrap:focus-within { border-color: var(--ink); }
.search-wrap input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-size: 13px; letter-spacing: .01em;
}
.search-wrap input::placeholder { color: var(--muted); }
.search-wrap kbd {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px;
}
.icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 17px; border: 1px solid var(--ink); border-radius: 999px;
  background: transparent; font-size: 12px; font-weight: 600; letter-spacing: .06em;
  transition: background .18s, color .18s, border-color .18s, transform .12s;
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.icon-btn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 50%; background: transparent;
  transition: background .18s, border-color .18s, color .18s;
}
.icon-btn:hover { background: var(--paper-2); border-color: var(--line); }
.icon-btn[aria-pressed="true"] { color: var(--accent); }
.icon-btn[aria-pressed="true"] .icon { fill: currentColor; }

main { max-width: 1780px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 52px); }

/* ---------------------------------------------------------------- hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
  align-items: end; gap: clamp(24px, 5vw, 80px);
  padding: clamp(40px, 6vw, 82px) 0 clamp(30px, 4vw, 48px);
}
.eyebrow {
  margin: 0 0 21px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .2em; color: var(--muted);
}
.eyebrow .dot { color: var(--accent); font-size: 8px; vertical-align: 1px; }
.hero h1 {
  margin: 0; font-family: var(--serif); font-weight: 500;
  font-size: clamp(46px, 6.6vw, 96px); line-height: .98; letter-spacing: -.045em;
}
.hero h1 em {
  font-style: italic; color: var(--accent);
  padding-right: .06em;
}
.lede {
  max-width: 480px; margin: 26px 0 0; color: var(--ink-soft);
  font-size: 14px; line-height: 1.75;
}
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin: 0; border-top: 1px solid var(--line-strong); padding-top: 14px;
}
.stats div { padding-right: 10px; }
.stats dt {
  font-family: var(--mono); font-size: 9px; letter-spacing: .18em;
  color: var(--muted); text-transform: uppercase;
}
.stats dd {
  margin: 6px 0 0; font-family: var(--serif); font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- filters */
.toolbar {
  position: sticky; top: 72px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.chips { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: transparent;
  font-size: 11px; letter-spacing: .04em; white-space: nowrap; color: var(--ink-soft);
  transition: .16s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .n { font-family: var(--mono); font-size: 9px; opacity: .55; }
.chip .swatch { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.chip[data-platform="youtube"] .swatch { background: #e02b20; }
.chip[data-platform="instagram"] .swatch { background: #c13584; }
.chip[data-platform="tiktok"] .swatch { background: #111; }
.chip[data-platform="lemon8"] .swatch { background: #f5b800; }
.chip[data-platform="web"] .swatch { background: #777; }
.chip.on .swatch { background: currentColor; }

.toolbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.segmented {
  display: inline-flex; padding: 2px; border: 1px solid var(--line-strong); border-radius: 999px;
}
.segmented button {
  border: 0; background: transparent; padding: 5px 11px; border-radius: 999px;
  font-size: 10px; letter-spacing: .08em; color: var(--muted); transition: .16s;
}
.segmented button.on { background: var(--ink); color: var(--paper); }
.starred-toggle { width: 34px; height: 34px; border-color: var(--line-strong); }

.tagbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 0;
  overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line);
  animation: fade .3s both;
}
.tagbar::-webkit-scrollbar { display: none; }
.tagbar .label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: var(--muted);
  margin-right: 2px; flex-shrink: 0;
}
.tag {
  flex-shrink: 0; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 10px; background: transparent; font-size: 10px; color: var(--muted);
  transition: .16s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------------------------------------------------------------- grid */
.grid {
  columns: 4; column-gap: clamp(14px, 1.6vw, 24px);
  padding: 26px 0 10px;
}
.card {
  break-inside: avoid; margin-bottom: clamp(20px, 2.2vw, 32px);
  animation: rise .55s cubic-bezier(.22, .8, .22, 1) both;
  cursor: pointer; position: relative;
}
.frame {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--paper-3); aspect-ratio: var(--ar, .75);
  border: 1px solid rgba(23, 21, 18, .12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset;
}
.frame img, .frame video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .4s;
}
.frame video { opacity: 0; transition: opacity .25s; }
.card.previewing .frame video { opacity: 1; }
.card.previewing .frame img { transform: scale(1.02); }
.frame:hover img { transform: scale(1.035); }

.frame-top {
  position: absolute; top: 9px; left: 9px; right: 9px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; z-index: 2;
}
.platform-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; border-radius: 2px;
  background: rgba(247, 244, 236, .92); color: var(--ink);
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em;
  backdrop-filter: blur(6px);
}
.platform-tag::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: #777;
}
.platform-tag[data-platform="youtube"]::before { background: #e02b20; }
.platform-tag[data-platform="instagram"]::before { background: #c13584; }
.platform-tag[data-platform="tiktok"]::before { background: #111; }
.platform-tag[data-platform="lemon8"]::before { background: #f5b800; }

.star {
  width: 30px; height: 30px; display: grid; place-items: center; border: 0;
  border-radius: 50%; background: rgba(247, 244, 236, .82); color: var(--ink);
  backdrop-filter: blur(6px); opacity: 0; transform: translateY(-3px);
  transition: opacity .18s, transform .18s, color .18s, background .18s;
}
.star .icon { width: 14px; height: 14px; }
.card:hover .star, .star[aria-pressed="true"] { opacity: 1; transform: none; }
.star[aria-pressed="true"] { color: var(--accent); }
.star[aria-pressed="true"] .icon { fill: currentColor; }

.duration {
  position: absolute; right: 9px; bottom: 9px; z-index: 2;
  padding: 3px 6px; border-radius: 2px; background: rgba(23, 21, 18, .82);
  color: #f7f4ec; font-family: var(--mono); font-size: 9px; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.play-glyph {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink);
  background: rgba(247, 244, 236, .92); backdrop-filter: blur(4px);
  opacity: 0; transform: scale(.86); transition: .22s;
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .5);
}
.play-glyph svg { width: 22px; height: 22px; margin-left: 2px; }
.card:hover .play-glyph { opacity: 1; transform: scale(1); }
.card.previewing .play-glyph { opacity: 0; }

.state { position: absolute; inset: 0; z-index: 3; display: none; }
.card[data-status="pending"] .state,
.card[data-status="processing"] .state,
.card[data-status="error"] .state { display: flex; }
.card[data-status="pending"] .state,
.card[data-status="processing"] .state {
  align-items: center; justify-content: center; flex-direction: column; gap: 10px;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(3px);
}
.spinner {
  width: 22px; height: 22px; border: 1.5px solid var(--line-strong);
  border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite;
}
.state-label { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: var(--ink-soft); }
.card[data-status="error"] .state {
  align-items: flex-end; padding: 12px;
  background: linear-gradient(to top, rgba(23, 21, 18, .82), rgba(23, 21, 18, .1));
}
.state-error { color: #f7f4ec; font-size: 11px; line-height: 1.45; text-align: left; }
.state-error strong { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .14em; margin-bottom: 4px; color: #f0a58f; }
.state .retry {
  height: 28px; margin-top: 8px; padding: 0 12px; font-size: 10px;
  border-color: rgba(247, 244, 236, .7); color: #f7f4ec;
}
.state .retry:hover { background: #f7f4ec; color: var(--ink); }

.card-meta { padding: 10px 1px 0; }
.card-title {
  margin: 0; font-family: var(--serif); font-weight: 500;
  font-size: clamp(15px, 1.15vw, 17px); line-height: 1.32; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.byline {
  margin: 6px 0 0; font-family: var(--mono); font-size: 9px; letter-spacing: .04em;
  color: var(--muted); display: flex; align-items: center; gap: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.byline .sep { opacity: .5; }
.byline .views { color: var(--ink-soft); }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.card-tags .t {
  font-family: var(--mono); font-size: 9px; color: var(--muted);
  border-bottom: 1px solid transparent;
}
.card:hover .card-tags .t { color: var(--ink-soft); }

/* ---------------------------------------------------------------- empty */
.empty {
  margin: 40px 0 20px; padding: clamp(50px, 9vw, 110px) 24px;
  border: 1px dashed var(--line-strong); border-radius: 6px; text-align: center;
  background: radial-gradient(120% 120% at 50% 0%, #f9f6ee 0%, var(--paper) 70%);
}
.empty-mark { font-family: var(--serif); font-size: 64px; color: var(--accent); line-height: 1; letter-spacing: -.06em; }
.empty h2 { font-family: var(--serif); font-weight: 500; font-size: 30px; margin: 18px 0 8px; }
.empty p { color: var(--muted); font-size: 13px; margin: 0 auto 24px; max-width: 380px; }

.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: clamp(40px, 6vw, 80px); padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 9px; letter-spacing: .14em; color: var(--muted);
}
.foot a { text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }
.foot a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------------------------------------------------------------- modal */
.modal {
  width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 48px);
  padding: 0; border: 1px solid var(--ink); border-radius: 5px;
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow);
  overflow: auto;
}
.modal::backdrop { background: rgba(23, 21, 18, .55); backdrop-filter: blur(4px); }
.modal form { padding: 26px clamp(20px, 4vw, 32px) 24px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.modal-head .eyebrow { margin: 0 0 7px; }
.modal-head h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 30px; letter-spacing: -.02em; }
.modal-head .close { margin: -6px -8px 0 0; }

.field { display: block; }
.field > span {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: var(--muted);
  margin-bottom: 8px; text-transform: uppercase;
}
.field small { font-family: var(--sans); font-size: 10px; letter-spacing: 0; text-transform: none; }
.field textarea {
  width: 100%; resize: vertical; min-height: 118px; padding: 13px 14px;
  border: 1px solid var(--line-strong); border-radius: 3px; background: var(--card);
  font-family: var(--mono); font-size: 12px; line-height: 1.7; outline: none;
  transition: border-color .18s;
}
.field textarea:focus { border-color: var(--ink); }
.field textarea::placeholder { color: #a59c8c; }
.quick { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; flex-wrap: wrap; }
.paste-btn {
  border: 0; background: transparent; padding: 0; color: var(--accent);
  font-size: 11px; border-bottom: 1px solid var(--accent-soft);
}
.hint { color: var(--muted); font-size: 10px; }

.switch { display: flex; align-items: center; gap: 11px; margin: 22px 0 0; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  width: 38px; height: 22px; border-radius: 999px; background: var(--paper-3);
  border: 1px solid var(--line-strong); padding: 2px; transition: .2s; flex-shrink: 0;
}
.switch .knob {
  display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--muted);
  transition: transform .2s, background .2s;
}
.switch input:checked + .track { background: var(--ink); border-color: var(--ink); }
.switch input:checked + .track .knob { transform: translateX(16px); background: var(--paper); }
.switch-label { display: flex; flex-direction: column; font-size: 12px; line-height: 1.35; }
.switch-label small { color: var(--muted); font-size: 10px; }

.form-error { min-height: 18px; margin: 12px 0 0; color: var(--accent); font-size: 11px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 8px; }

/* ---------------------------------------------------------------- drawer */
.scrim {
  position: fixed; inset: 0; z-index: 50; background: rgba(23, 21, 18, .5);
  backdrop-filter: blur(2px); opacity: 0; transition: opacity .28s;
}
.scrim.show { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; z-index: 60; width: min(560px, 100vw); height: 100dvh;
  display: flex; flex-direction: column; background: var(--paper);
  border-left: 1px solid var(--ink); box-shadow: -20px 0 60px -40px rgba(0, 0, 0, .6);
  transform: translateX(102%); transition: transform .38s cubic-bezier(.22, .8, .22, 1);
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.drawer-body { overflow: auto; padding: 22px 24px 60px; overscroll-behavior: contain; }
.player { position: relative; background: #0e0d0b; border-radius: 3px; overflow: hidden; margin-bottom: 20px; }
.player video { width: 100%; max-height: 60vh; background: #0e0d0b; }
.player img { width: 100%; max-height: 60vh; object-fit: contain; margin: 0 auto; }
.player .no-media {
  display: flex; align-items: center; justify-content: center; min-height: 220px;
  color: #cfc7b8; font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
}
.d-title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.18; letter-spacing: -.025em; }
.d-author { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--ink-soft); font-size: 12px; }
.d-author img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.d-author .handle { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.d-actions { display: flex; gap: 8px; margin: 18px 0 4px; flex-wrap: wrap; }
.d-actions .btn { height: 36px; padding: 0 14px; font-size: 11px; }
.d-actions .danger { border-color: var(--line-strong); color: var(--muted); }
.d-actions .danger:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 22px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.metrics div { background: var(--card); padding: 10px 11px; }
.metrics dt { font-family: var(--mono); font-size: 8px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.metrics dd { margin: 5px 0 0; font-family: var(--serif); font-size: 19px; line-height: 1; font-variant-numeric: tabular-nums; }

.d-section { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.d-section > h4 {
  margin: 0 0 10px; font-family: var(--mono); font-size: 9px; font-weight: 500;
  letter-spacing: .18em; color: var(--muted); text-transform: uppercase;
}
.d-desc { margin: 0; font-size: 13px; line-height: 1.8; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }
.d-desc.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.more-link { border: 0; background: none; padding: 4px 0 0; color: var(--accent); font-size: 11px; }

.tag-edit { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-edit .tag { font-size: 10px; display: inline-flex; align-items: center; gap: 5px; }
.tag-edit .tag button { border: 0; background: none; padding: 0; color: inherit; opacity: .55; font-size: 12px; line-height: 1; }
.tag-edit .tag button:hover { opacity: 1; }
.tag-add {
  height: 24px; min-width: 90px; border: 1px dashed var(--line-strong); border-radius: 999px;
  background: transparent; padding: 0 9px; font-size: 10px; outline: none;
}
.tag-add:focus { border-color: var(--ink); }

.notes {
  width: 100%; min-height: 84px; resize: vertical; padding: 10px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 3px;
  font-size: 12px; line-height: 1.65; outline: none;
}
.notes:focus { border-color: var(--ink); }
.save-note { font-family: var(--mono); font-size: 8px; color: var(--muted); letter-spacing: .1em; margin-left: 8px; }

.raw summary {
  cursor: pointer; font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  color: var(--muted); list-style: none;
}
.raw summary::-webkit-details-marker { display: none; }
.raw summary::before { content: "＋ "; }
.raw[open] summary::before { content: "－ "; }
.raw pre {
  margin: 10px 0 0; padding: 12px; background: #1b1916; color: #d8d1c3;
  border-radius: 3px; font-size: 10px; line-height: 1.55; max-height: 340px; overflow: auto;
}

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 90;
  padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-size: 12px; letter-spacing: .02em; box-shadow: var(--shadow);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: .25s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1360px) { .grid { columns: 3; } }
@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1.3fr) minmax(220px, .7fr); }
  .grid { columns: 3; }
}
@media (max-width: 820px) {
  .grid { columns: 2; }
  .hero { grid-template-columns: 1fr; align-items: start; padding-top: 36px; }
  .stats { max-width: 420px; margin-top: 10px; }
  .hero h1 { font-size: clamp(42px, 11vw, 64px); }
  .lede { margin-top: 18px; }
  .search-wrap { max-width: 200px; }
}
@media (max-width: 680px) {
  .topbar { height: auto; padding: 11px 16px 12px; flex-wrap: wrap; gap: 10px 12px; }
  .brand-text { font-size: 10px; }
  .search-wrap { order: 3; flex: 1 0 100%; max-width: none; height: 34px; border: 1px solid var(--line); border-radius: 999px; padding: 0 13px; }
  .search-wrap kbd { display: none; }
  .topbar .btn { margin-left: auto; height: 36px; }
  .toolbar { top: 0; padding: 10px 0; }
  .toolbar { position: static; }
  .segmented button { padding: 5px 9px; }
  .grid { padding-top: 16px; }
  .hero h1 { font-size: clamp(38px, 12.5vw, 54px); }
  .eyebrow { font-size: 8px; letter-spacing: .14em; }
  .stats dd { font-size: 22px; }
  .card-meta { padding-top: 8px; }
  .card-title { font-size: 14px; }
  .byline { font-size: 8px; }
  .play-glyph { display: none; }
  .star { opacity: 1; transform: none; }
  .drawer-body { padding: 18px 16px 50px; }
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .foot { flex-wrap: wrap; gap: 8px; }
  .modal form { padding: 22px 18px 20px; }
  .modal-head h2 { font-size: 26px; }
}

@media (hover: none) {
  .card:hover img { transform: none; }
  .star { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
