/* SuprHit viewer styles: mobile-first, no JavaScript, no external fonts. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f3f6;
  --border: #e6e3eb;
  --text: #17141d;
  --muted: #6b6578;
  --accent: #ffb627;      /* fills: buttons, active chips, timeline dots */
  --accent-ink: #1b1300;  /* text on --accent */
  --accent-text: #b35900; /* amber dark enough to read on white */
  --pink: #d6336c;
  --radius: 14px;
  --wrap: 1120px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-text); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.section { padding: 32px 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.empty { color: var(--muted); padding: 24px; border: 1px dashed var(--border); border-radius: var(--radius); text-align: center; }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* header / footer */
.site-header { background: var(--bg); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.35rem; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.brand span { color: var(--accent-text); }
.brand-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-tag { color: var(--text); font-size: .95rem; font-weight: 600; padding-left: 10px; border-left: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav a:hover { color: var(--text); }
.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 24px 0; color: var(--muted); font-size: .875rem; background: var(--surface-2); }
.site-footer a { color: var(--muted); }

/* buttons, pills */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink) !important; font-weight: 700; text-decoration: none; padding: 10px 18px; border-radius: 999px; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text) !important; padding: 6px 14px; font-weight: 600; }
.pill { display: inline-block; font-size: .75rem; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.pill-accent { background: rgba(214, 51, 108, .08); color: var(--pink); border-color: rgba(214, 51, 108, .35); }
.badge { display: inline-block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-text); margin-bottom: 8px; }

/* home: filter row (toggle + biggest languages) and the search/filter panel */
.filter-bar { padding-top: 16px; }
.filter-row { display: flex; align-items: center; gap: 8px; }
.filter-toggle { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: .875rem; font-weight: 600; }
.filter-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.filter-toggle:hover { border-color: var(--text); }
.filter-toggle[aria-expanded="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.filter-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font-size: .7rem; background: var(--accent); color: var(--accent-ink); }
.quick-langs { display: flex; flex-wrap: nowrap; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.quick-langs::-webkit-scrollbar { display: none; }
.quick-langs .chip { flex: none; white-space: nowrap; }
.filter-panel { margin-top: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.filter-panel .search-form { margin: 0; max-width: none; }
.facet { margin-top: 12px; }
.facet-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facet .chips { margin: 4px 0 0; }
.clear-all { display: inline-block; margin-top: 12px; font-size: .875rem; font-weight: 600; }
h2 small { font-size: .875rem; font-weight: 500; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 60ch; }

/* movie grid */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; box-shadow: 0 1px 2px rgba(23, 20, 29, .05); }
.card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 18px rgba(23, 20, 29, .08); }
.card-body { padding: 12px; }
.card-body h3 { margin-bottom: 4px; }
.card-body p { margin: 0; font-size: .875rem; }
.tags { color: var(--muted); font-size: .8rem !important; margin-top: 4px !important; }

.poster { aspect-ratio: 2 / 3; background: var(--surface-2); }
.poster picture { display: block; width: 100%; height: 100%; }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster-ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; letter-spacing: .05em; color: rgba(255, 255, 255, .9); background: linear-gradient(150deg, #ff4f8b 0%, #7b2ff7 55%, #1e1b4b 100%); }

/* movie page */
.movie-hero { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--border); padding: 24px 0; }
.movie-head { display: grid; gap: 20px; grid-template-columns: 1fr; }
.poster-lg { width: 60%; max-width: 260px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
@media (min-width: 720px) {
  .movie-head { grid-template-columns: 260px 1fr; align-items: end; gap: 32px; }
  .poster-lg { width: 100%; }
}
.movie-info h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); letter-spacing: -.02em; }
.tagline { font-size: 1.15rem; color: var(--muted); font-style: italic; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.movie-body { display: grid; gap: 40px; padding-top: 32px; padding-bottom: 16px; max-width: 820px; }

.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; margin: 12px 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-link { font-weight: 600; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--border); }
.tl-item { position: relative; padding: 0 0 28px 16px; }
.tl-item::before { content: ""; position: absolute; left: -29px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }
.tl-item.is-upcoming::before { background: var(--bg); border-color: var(--pink); }
.tl-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; font-size: .875rem; color: var(--muted); }
.tl-item p { margin-bottom: .4em; }

/* creator content: picks, kind chips, spoilers, replies */
.pill-pick { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.picks { margin-bottom: 24px; }
.picks-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-text); margin: 0 0 8px; }
.review-sort { display: flex; gap: 6px; flex-wrap: wrap; }
.review-sort a { font-size: .85rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); text-decoration: none; }
.review-sort a[aria-current="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.spoiler summary { cursor: pointer; color: var(--accent-text); font-weight: 600; padding: 8px 0; }
.reply { margin-top: 12px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.reply p { margin: 4px 0; }
/* creator posts */
.post-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-bottom: 16px; }
.shorts-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px; scroll-snap-type: x mandatory; }
.shorts-row .post-card { flex: 0 0 min(260px, 80%); scroll-snap-align: start; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; min-width: 0; }
.post-card.is-pinned { border-color: var(--accent); }
.post-card h3 { font-size: 1rem; margin: 8px 0 4px; }
.post-card .video { margin: 6px 0; }
.post-kind { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.post-by { margin: 8px 0 0; }
.kind-chips { margin-bottom: 12px; }
.notice { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.tl-creator { margin: 2px 0; }
.tl-all summary { cursor: pointer; color: var(--accent-text); font-weight: 600; padding: 8px 0; }
.reply-by { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-text); }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.cta p { margin: 0; }
/* "Add a link": a <details>, so it works without JavaScript */
.add-link { display: block; }
.add-link summary { list-style: none; }
.add-link summary::-webkit-details-marker { display: none; }
.add-link details[open] summary { margin-bottom: 12px; }
.link-form { display: grid; gap: 12px; margin-bottom: 12px; }
.link-form label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.link-form input, .link-form select, .link-form textarea { font: inherit; font-weight: 400; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; width: 100%; box-sizing: border-box; }
.link-form button { justify-self: start; }
.link-done { max-width: 620px; padding-top: 40px; padding-bottom: 40px; }

/* search */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search-form { display: flex; gap: 8px; max-width: 560px; margin: 16px 0; }
.search-form input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.search-form input:focus { outline: none; border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); text-decoration: none; font-size: .875rem; }
.chip span { opacity: .7; margin-left: 4px; }
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }

.notfound { text-align: center; padding: 80px 16px; }
.notfound .lead { margin: 0 auto 24px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* hashtags and official accounts */
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0; }
.tag-list, .accounts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.tag:hover { border-color: var(--accent); }
.tag-official { border-color: var(--accent); color: var(--accent-text); }
.tags-lang { min-width: 6.5em; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.share-box { margin: 16px 0; }
.share-switch { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--muted); margin-bottom: 8px; }
.share-switch select { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; font: inherit; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.accounts a { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.accounts a:hover { border-color: var(--accent); }
[hidden] { display: none !important; }

/* creator pages */
.creator-page { display: grid; gap: 28px; padding-top: 24px; padding-bottom: 32px; max-width: 980px; }
.creator-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.creator-head h1 { margin: 0 0 6px; }
.avatar { width: 84px; height: 84px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; color: var(--muted); flex: none; }
.badge-unclaimed { color: var(--muted); }
.claim-box p { margin: 0 0 10px; }
.claim-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.creator-post > p { margin: 0 0 4px; }
.pager { display: flex; gap: 8px; justify-content: space-between; margin-top: 16px; }
.notice-error { border-color: var(--pink); }
.steps { display: grid; gap: 10px; padding-left: 20px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 2px 8px; user-select: all; }
.post-report { margin: 6px 0 0; text-align: right; font-size: .75rem; }
.post-report a { color: var(--muted); }
.see-all { margin-top: 16px; text-align: center; }
.sort-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 16px; }

/* guides (/for-creators, /for-studios) and the directory */
.guide { display: grid; gap: 28px; padding-top: 24px; padding-bottom: 32px; max-width: 980px; }
.guide h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); letter-spacing: -.02em; margin: 0 0 8px; }
.guide-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.guide-grid h3 { margin: 0 0 6px; }
.guide-grid p { margin: 0; color: var(--muted); }
.dir-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.dir-item { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; min-width: 0; }
.dir-item h3 { margin: 0 0 6px; font-size: 1rem; }
.dir-item h3 a { color: var(--text); }
.avatar-sm { width: 44px; height: 44px; font-size: .95rem; }
.dir-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.dir-head .lead { margin: 0; }
.dir-tools { display: grid; gap: 12px; }
.dir-item h2 { margin: 0 0 6px; font-size: 1rem; }
.dir-item h2 a { color: var(--text); }
.pager { align-items: center; }
.dir-tools .search-form, .dir-tools .facet, .dir-tools .clear-all { margin: 0; }
