/* RateItDude. Dark, quiet UI: the red-to-gold score colours are the only loud thing on the page. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dmsans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --bg: #0e0f13;
  --surface: #15171e;
  --raise: #1b1e27;
  --line: #262a36;
  --border: #353a4a;
  --border-strong: #444a5c;
  --text: #f0efec;
  --muted: #a3a6b5;
  --star-off: #2c3040;
  --pending: #565c70;
  --noposter: #4a5064;
  --focus: #8ab4ff;
  --glass: rgba(255, 255, 255, 0.065);
  --glass-strong: rgba(24, 26, 34, 0.78);
  --glass-line: rgba(255, 255, 255, 0.13);
  --glass-blur: blur(16px) saturate(1.5);
  --inset: rgba(255, 255, 255, 0.05);
  --tint: rgba(255, 255, 255, 0.05);
  --tint-hover: rgba(255, 255, 255, 0.09);
  --tint-strong: rgba(255, 255, 255, 0.13);
  --head-bg: rgba(14, 15, 19, 0.42);
  --head-solid: rgba(14, 15, 19, 0.97);
  --badge-bg: rgba(14, 15, 19, 0.88);
  --btn-hover: #fff;
  --cta-bg: rgba(240, 239, 236, 0.94);
  --ok: #5ec48a;
  --bad: #ff8a80;
  --warn: #f0a020;
  --ok-line: #245c3d;
  --err-line: #6b2f33;
  --warn-line: #6b5a22;
  --danger-line: #5a3a3d;
  --glow-red: 0.34;
  --glow-green: 0.26;
  --glow-gold-a: 0.17;
  --glow-gold-b: 0.2;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "DM Sans", "Segoe UI", system-ui, -apple-system, "Noto Sans Telugu", sans-serif;
  color-scheme: dark;
}

/* Light theme: same red, green and gold on a cool white page. assets/theme.js sets data-theme from the visitor's choice. */
:root[data-theme="light"] {
  --bg: #f3f4f7;
  --surface: #ffffff;
  --raise: #e8eaf0;
  --line: #dcdfe8;
  --border: #c8ccd9;
  --border-strong: #a9aebf;
  --text: #14161d;
  --muted: #565b6c;
  --star-off: #d3d6e0;
  --pending: #8f95a8;
  --noposter: #a6acbf;
  --focus: #1d4ed8;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.92);
  --glass-line: rgba(20, 24, 40, 0.12);
  --inset: rgba(255, 255, 255, 0.7);
  --tint: rgba(20, 24, 40, 0.045);
  --tint-hover: rgba(20, 24, 40, 0.08);
  --tint-strong: rgba(20, 24, 40, 0.12);
  --head-bg: rgba(255, 255, 255, 0.6);
  --head-solid: rgba(255, 255, 255, 0.97);
  --badge-bg: rgba(255, 255, 255, 0.95);
  --btn-hover: #000;
  --cta-bg: rgba(20, 22, 30, 0.94);
  --ok: #1b7a43;
  --bad: #c0281c;
  --warn: #8f5b00;
  --ok-line: #9bd1b1;
  --err-line: #e6a7a1;
  --warn-line: #dcb76f;
  --danger-line: #e6a7a1;
  --glow-red: 0.15;
  --glow-green: 0.15;
  --glow-gold-a: 0.2;
  --glow-gold-b: 0.22;
  color-scheme: light;
}

/* Score colours as text: on the light page they are darkened so they stay readable (use .sc, or .sc.lg for big numbers). */
.sc { color: var(--c, var(--pending)); }
:root[data-theme="light"] .sc { color: color-mix(in srgb, var(--c, #8f95a8) 48%, #000); }
:root[data-theme="light"] .sc.lg { color: color-mix(in srgb, var(--c, #8f95a8) 66%, #000); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Soft colour behind everything, so the glass panels have something to blur. Same red, green and gold as the scores. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(34rem 26rem at 8% 6%, rgba(215, 38, 61, var(--glow-red)), transparent 70%),
    radial-gradient(32rem 26rem at 94% 14%, rgba(47, 179, 68, var(--glow-green)), transparent 70%),
    radial-gradient(36rem 28rem at 70% 62%, rgba(255, 195, 0, var(--glow-gold-a)), transparent 70%),
    radial-gradient(40rem 26rem at 20% 96%, rgba(255, 195, 0, var(--glow-gold-b)), transparent 70%);
}
main.wrap { flex: 1; padding-top: 3.5rem; padding-bottom: 4rem; }
.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.6vw, 3.6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-bottom: 0.6rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 0.8rem; }
a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 20; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* header and footer */
.site-head { border-bottom: 1px solid var(--glass-line); position: sticky; top: 0; z-index: 15; background: var(--head-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 800 1.3rem var(--display); letter-spacing: -0.02em; text-decoration: none; }
.site-head nav { display: flex; gap: 20px; align-items: center; font-size: 0.97rem; }
.site-head nav a { text-decoration: none; color: var(--muted); }
.site-head nav a:hover { color: var(--text); }
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 0.93rem; }
.site-foot p { margin: 0 0 8px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--muted); }
.cookie-note { position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 560px; margin: 0 auto; background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); border-radius: 12px; padding: 12px 14px; display: flex; gap: 14px; align-items: center; font-size: 0.9rem; z-index: 10; }
.cookie-note[hidden] { display: none; }
.cookie-note p { margin: 0; }
.cookie-note button { flex: none; }

/* buttons and forms */
.btn, button.btn { font: 600 1rem var(--body); background: var(--text); color: var(--bg); border: 1px solid var(--text); border-radius: 8px; padding: 11px 20px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--btn-hover); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn.ghost:hover { border-color: var(--text); background: transparent; }
.btn[disabled] { opacity: 0.55; cursor: wait; }
.btn.small { padding: 6px 12px; font-size: 0.9rem; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--danger-line); }
.linklike { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linklike:hover { color: var(--text); }
.inline-form { display: inline; margin: 0; }
.cookie-note button, .cookie-note #cookie-ok { background: transparent; color: var(--text); border: 1px solid var(--border-strong); border-radius: 6px; padding: 6px 12px; font: inherit; cursor: pointer; }

input[type=text], input[type=search], input[type=email], input[type=url], input[type=date], input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
}
select { appearance: auto; }
label { display: block; font-weight: 500; margin-bottom: 6px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 500; padding: 0; margin-bottom: 8px; }
.field { margin: 0 0 1.25rem; }
.hint { font-size: 0.88rem; color: var(--muted); margin: 6px 0 0; }
.chip { display: inline-block; margin: 0 8px 8px 0; font-weight: 400; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; padding: 9px 16px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; background: var(--surface); }
.chip input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); margin: 0 0 1.25rem; }
.notice.warn { border-color: var(--warn-line); }
.notice.err { border-color: var(--err-line); color: var(--bad); }
.notice.ok { border-color: var(--ok-line); color: var(--ok); }

/* home */
.hero { padding: 1rem 0 3rem; max-width: 760px; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 40ch; margin: 1.1rem 0 1.8rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.scale-demo p { margin: 8px 0 0; font-size: 0.93rem; }
.star-row { display: inline-flex; gap: 2px; vertical-align: middle; }
.star-row svg { display: block; }
.scale { gap: 4px; }
.film-list h2 { margin-bottom: 0.4rem; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: center; }
.row h3 a { text-decoration: none; }
.row h3 a:hover { text-decoration: underline; }
.row .muted { margin: 6px 0 0; font-size: 0.93rem; }
.row-score { text-align: right; }
.row-score .star-row { margin-top: 4px; }
.meta { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 18px; color: var(--muted); font-size: 0.95rem; }
.empty { border: 1px dashed var(--border-strong); border-radius: 14px; padding: 24px; margin: 1.5rem 0; background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.empty h2, .empty h3 { margin-bottom: 6px; }
.empty p { margin: 0; color: var(--muted); }

.score-num { font: 800 clamp(3.6rem, 12vw, 5.6rem)/1 var(--display); letter-spacing: -0.04em; margin: 0; font-variant-numeric: tabular-nums; }
.score-num .of { font-size: 0.3em; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.score-num.sm { font-size: 2.6rem; }
.score-num.pending { color: var(--pending); }

/* film page */
.film > section { margin-top: 1.1rem; }
.film-head { display: flex; gap: 22px; align-items: flex-start; }
.poster { width: 120px; height: 180px; object-fit: cover; border-radius: 6px; flex: none; background: var(--surface); }
.film-head h1 { margin-bottom: 0.2rem; }
.book { margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.score-block { display: flex; gap: 28px; align-items: center; padding: 1.75rem 1.75rem; background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); border-radius: 16px; box-shadow: 0 1px 0 var(--inset) inset; margin-top: 2rem !important; }
.score-block p { margin: 6px 0 0; }
.drift { font-size: 0.97rem; }
.platforms h2 { margin-bottom: 0.2rem; }
.plat-list { list-style: none; margin: 0.8rem 0 0; padding: 0; }
.plat-list li { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plat-score { font: 700 1.25rem var(--display); }

.rate { background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); border-radius: 16px; padding: 24px; box-shadow: 0 1px 0 var(--inset) inset; }
.stars-field { margin-bottom: 1.4rem; }
.stars-input { display: flex; gap: 4px; max-width: 520px; --c: var(--star-off); }
.star { flex: 1 1 0; max-width: 52px; aspect-ratio: 1; padding: 2px; background: none; border: 0; cursor: pointer; border-radius: 8px; }
.star svg { width: 100%; height: 100%; display: block; }
.star svg path { fill: var(--star-off); transition: fill 0.12s; }
.star.on svg path { fill: var(--c); }
.stars-out { margin: 8px 0 0; min-height: 1.6em; font-weight: 600; }
.optional { margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.optional summary { cursor: pointer; font-weight: 500; }
.optional[open] summary { margin-bottom: 14px; }
.submit-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 1rem; }
.form-msg { margin: 0; color: var(--bad); font-weight: 500; }
.cf-turnstile { margin-top: 0.5rem; }
.done { display: flex; align-items: center; gap: 20px; }
.done[hidden], #rate-form[hidden] { display: none; }
.done-score { font: 800 3.4rem/1 var(--display); margin: 0; }
.done p { margin: 0 0 4px; }

/* charts */
.chart-fig { margin: 1rem 0 0.5rem; overflow-x: auto; }
.chart { display: block; width: 100%; min-width: 560px; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 12px var(--body); }
.chart .axis.strong { fill: var(--text); font-weight: 600; }
.chart .end-label { fill: var(--text); font: 600 12px var(--body); }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
figcaption { font-size: 0.88rem; margin-top: 6px; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0; margin: 0 0 6px; font-size: 0.93rem; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.table-view { margin: 0.6rem 0 0; }
.table-view summary { cursor: pointer; color: var(--muted); font-size: 0.93rem; }
.table-wrap { overflow-x: auto; margin-top: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { color: var(--muted); font-weight: 500; }
tbody th { font-weight: 500; }
.hbars { list-style: none; margin: 1rem 0 0; padding: 0; }
.hbars li { display: grid; grid-template-columns: 11rem 1fr 11rem; gap: 14px; align-items: center; padding: 6px 0; }
.hb-track { height: 12px; background: var(--raise); border-radius: 6px; overflow: hidden; }
.hb-fill { display: block; height: 100%; border-radius: 6px; }
.hb-val { font-size: 0.93rem; }
.updated { margin-top: 3rem; font-size: 0.93rem; }

/* text pages */
.prose { max-width: 66ch; }
.prose h1 { margin-bottom: 0.8rem; }
.prose h2 { margin: 2.2rem 0 0.5rem; font-size: 1.45rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
code { background: var(--raise); padding: 1px 6px; border-radius: 4px; font-size: 0.92em; }
.plain { max-width: 50ch; }

/* admin */
body.admin main { max-width: 1040px; }
.admin h1 { font-size: 2rem; margin-bottom: 1rem; }
.admin h2 { font-size: 1.3rem; margin: 2rem 0 0.6rem; }
.admin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
.admin form.card { background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); border-radius: 14px; padding: 20px; max-width: 460px; }
.admin .badge { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); font-size: 0.82rem; color: var(--muted); }
.admin .badge.live { color: var(--ok); border-color: var(--ok-line); }
.admin .badge.flag { color: var(--warn); border-color: var(--warn-line); }
.admin td form { display: inline; }
.admin .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin tr.spike td, .admin tr.spike th { background: rgba(240, 160, 32, 0.12); }

@media (max-width: 720px) {
  .row { grid-template-columns: 1fr; gap: 8px; }
  .row-score { text-align: left; }
  .score-block { flex-direction: column; align-items: flex-start; gap: 12px; }
  .film-head { flex-direction: column; }
  .hbars li { grid-template-columns: 1fr; gap: 4px; }
  .admin-grid { grid-template-columns: 1fr; }
  .rate { padding: 18px 16px; }
  .site-head nav { gap: 14px; font-size: 0.92rem; }
}

/* film page: hero, score panel, glass panels */
.film-hero {
  position: relative; overflow: hidden; border-radius: 22px; isolation: isolate; background: #15171e;
  --bg: #0e0f13; --text: #f0efec; --muted: #c3c6d3; --glass-line: rgba(255, 255, 255, 0.13); --focus: #8ab4ff;
  border: 1px solid var(--glass-line); color: var(--text);
}
.hero-bg { position: absolute; left: -30px; top: -30px; width: calc(100% + 60px); height: calc(100% + 60px); object-fit: cover; filter: blur(26px) saturate(1.3) brightness(0.55); z-index: -2; }
.film-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 15, 19, 0.1), rgba(14, 15, 19, 0.72)); }
.hero-in { display: flex; gap: 20px; align-items: flex-end; padding: 64px 24px 22px; }
.hero-text { min-width: 0; }
.hero-text h1 { margin: 0.35rem 0 0.2rem; }
.hero-text .meta { margin: 0; }
.byline { margin: 0.2rem 0 0; color: var(--muted); }
.byline strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin: 1.1rem 0 0; }
.film-hero .btn.ghost { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.22); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.film-hero .btn.ghost:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.4); }

.score-panel { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ring head" "pool pool" "tiles tiles"; gap: 14px 22px; align-items: center; padding: 20px; background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); border-radius: 18px; box-shadow: 0 1px 0 var(--inset) inset; }
.ring-wrap { grid-area: ring; position: relative; width: 112px; height: 112px; }
.ring { width: 100%; height: 100%; display: block; }
.ring-track { stroke: var(--tint-strong); }
.ring-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; margin: 0; font: 800 2.1rem/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring-num.pending { color: var(--pending); }
.ring-num .of { display: block; font: 500 0.95rem/1.2 var(--body); color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.score-head { grid-area: head; }
.score-title { font: 700 1.2rem/1.15 var(--display); letter-spacing: -0.02em; margin: 0 0 4px; }
.score-head p { margin: 0 0 6px; }
.tiles { grid-area: tiles; list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.tile { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 12px; background: var(--tint); border: 1px solid var(--glass-line); }
.tile-label { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.tile-val { font: 700 1.4rem/1.15 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile-val small { font: 500 0.9rem var(--body); color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.tile-val.pending { color: var(--pending); }
.tile-sub { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }

.film > section:not(.score-panel):not(.rate) { background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); border-radius: 18px; padding: 18px 20px; }
.film > section > h2:first-child { margin-top: 0; }
.critic-list { list-style: none; margin: 0.8rem 0 0; padding: 0; }
.critic-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--glass-line); }
.critic-list li:last-child { border-bottom: 0; }
.critic-list .who { display: flex; flex-direction: column; line-height: 1.3; }
.critic-list small { font-size: 0.85rem; }
.cscore { font: 700 1.4rem var(--display); }
.cscore small { font: 500 0.85rem var(--body); color: var(--muted); margin-left: 2px; }
.people { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px 18px; }
.person { width: 104px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); background: var(--tint); margin-bottom: 6px; }
.avatar.initials { display: grid; place-items: center; font: 700 1.5rem var(--display); color: var(--muted); }
.pname { font-weight: 600; font-size: 0.93rem; line-height: 1.25; }
.prole { font-size: 0.82rem; color: var(--muted); line-height: 1.25; }
.plat-list li:last-child { border-bottom: 0; }

@media (max-width: 720px) {
  .hero-in { flex-direction: column; align-items: flex-start; padding: 70px 18px 20px; gap: 14px; }
  .score-panel { padding: 18px 16px; gap: 14px 16px; }
  .ring-wrap { width: 118px; height: 118px; }
  .ring-num { font-size: 2.1rem; }
  .score-title { font-size: 1.25rem; }
  .film > section:not(.score-panel):not(.rate) { padding: 18px 16px; }
}

/* home page */
.home-hero { position: relative; padding: 0.4rem 0 1.1rem; isolation: isolate; }
.hero-posters { position: absolute; right: -14px; top: -14px; bottom: 0; width: 58%; display: flex; gap: 6px; z-index: -1; opacity: 0.42; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 50%, transparent); mask-image: linear-gradient(90deg, transparent, #000 50%, transparent); }
.hero-posters img { flex: 1 1 0; min-width: 0; height: 100%; object-fit: cover; border-radius: 8px; filter: saturate(0.8) brightness(0.75); }
.home-hero h1 { font-size: clamp(1.7rem, 5.4vw, 2.5rem); line-height: 1.1; max-width: 17ch; }
.home-hero .lead { font-size: 0.97rem; max-width: 36ch; margin: 0.7rem 0 1rem; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.hero-btns .btn { padding: 8px 16px; font-size: 0.92rem; border-radius: 9px; }
.chips-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.lchip { flex: none; padding: 6px 15px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: var(--text); text-decoration: none; font-size: 0.9rem; }
.lchip:hover { background: var(--tint-strong); }
.lchip[aria-current] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.home-sec { margin-top: 1.4rem; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 0.65rem; }
.sec-head h2 { margin: 0; font-size: 1.2rem; }

.trend-btns { display: flex; gap: 8px; }
.trend-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: var(--text); cursor: pointer; padding: 0; }
.trend-btn:hover:not(:disabled) { background: var(--tint-strong); }
.trend-btn:disabled { opacity: 0.35; cursor: default; }
.trend-track { list-style: none; margin: 0; padding: 2px 2px 8px; display: flex; align-items: stretch; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.tcard { flex: none; width: 148px; scroll-snap-align: start; }
.tcard a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; padding: 8px; height: 100%; background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); border-radius: 14px; transition: border-color 0.15s, background 0.15s; }
.tcard a:hover { border-color: var(--border-strong); background: var(--tint-hover); }
.tposter { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--tint); margin-bottom: 6px; }
.timg { width: 100%; height: 100%; object-fit: cover; display: block; }
.timg.noposter { display: grid; place-items: center; font: 700 3rem/1 var(--display); color: var(--noposter); }
.ttitle { font: 700 0.95rem/1.25 var(--display); letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tmeta { font-size: 0.78rem; color: var(--muted); }
.tsub { font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.tsub strong { color: var(--text); font-weight: 600; }
.tline { display: block; }

.sbadge { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--badge-bg); border: 2px solid var(--c, var(--pending)); color: var(--c, var(--pending)); font: 700 0.88rem/1 var(--display); font-variant-numeric: tabular-nums; }
.sbadge.on-poster { position: absolute; right: 6px; bottom: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }

.flist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.frow { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); border-radius: 14px; text-decoration: none; color: inherit; transition: background 0.15s; }
.frow:hover { background: var(--tint-hover); }
.fthumb { width: 46px; height: 69px; border-radius: 8px; object-fit: cover; flex: none; background: var(--tint); }
.fthumb.noposter { display: grid; place-items: center; font: 700 1.3rem/1 var(--display); color: var(--noposter); }
.fmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ftitle { font: 700 1rem/1.25 var(--display); letter-spacing: -0.01em; }
.fmeta, .fdrift { font-size: 0.8rem; color: var(--muted); line-height: 1.35; }
.fdrift strong { color: var(--text); font-weight: 600; }
.frow .sbadge { width: 44px; height: 44px; font-size: 0.95rem; }
.cta-bar { display: none; }
body.has-cta main.wrap { padding-bottom: 5.5rem; }
@media (min-width: 721px) { body.has-cta main.wrap { padding-bottom: 4rem; } }

/* trailer */
.btn.trailer-btn { display: inline-flex; align-items: center; gap: 8px; }
.btn.trailer-btn svg { display: block; }
dialog.trailer { padding: 0; border: 1px solid var(--glass-line); border-radius: 16px; background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: var(--text); width: min(960px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: visible; }
dialog.trailer::backdrop { background: rgba(6, 7, 10, 0.66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.trailer-box { padding: 12px 12px 4px; position: relative; }
.trailer-frame { aspect-ratio: 16 / 9; width: 100%; border-radius: 10px; overflow: hidden; background: #000; }
.trailer-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.trailer-box .hint { margin: 8px 4px 8px; }
.trailer-close { position: absolute; top: -14px; right: -10px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: var(--text); font: 400 1.5rem/1 var(--body); cursor: pointer; padding: 0; z-index: 2; }
.trailer-close:hover { background: rgba(255, 255, 255, 0.16); }

/* No blur support, or the visitor asked for less transparency: use solid panels so text stays easy to read. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(33, 36, 46, 0.96); --glass-strong: rgba(24, 26, 34, 0.98); }
  :root[data-theme="light"] { --glass: rgba(255, 255, 255, 0.97); --glass-strong: #fff; }
  .site-head { background: var(--head-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: #1b1e27; --glass-strong: #15171e; --glass-blur: none; }
  :root[data-theme="light"] { --glass: #fff; --glass-strong: #fff; }
  .site-head { background: var(--bg); }
  body::before { display: none; }
}

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

/* critic page */
.critic-form { display: flex; gap: 8px; align-items: center; }
.critic-form select { width: auto; min-width: 9.5rem; font-weight: 600; }
.critic-page .notice { margin: 8px 0 0; padding: 4px 10px; display: inline-block; }

/* Compact phone layout: one step smaller across the whole site, like a native app */
@media (max-width: 720px) {
  html { font-size: 14px; }
  body { font-size: 0.92rem; line-height: 1.5; }
  .wrap { padding: 0 14px; }
  .head-row { min-height: 50px; }
  main.wrap { padding-top: 0.9rem; padding-bottom: 2.5rem; }
  .brand { font-size: 1.15rem; }
  .hero { padding: 0.25rem 0 1.4rem; }
  .hero .lead { font-size: 1rem; margin: 0.8rem 0 1.1rem; }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.15rem; margin-bottom: 0.4rem; }
  .row { padding: 14px 0; }
  .score-num.sm { font-size: 2rem; }

  .film > section, .film > .notice { margin-top: 0.7rem; }
  .film-hero { border-radius: 16px; }
  .hero-in { flex-direction: row; align-items: flex-end; padding: 40px 14px 14px; gap: 12px; }
  .film-hero .poster { width: 76px; height: 114px; border-radius: 6px; }
  .hero-text h1 { font-size: 1.5rem; margin: 0.2rem 0 0.1rem; }
  .hero-text .meta { font-size: 0.82rem; }
  .byline { font-size: 0.85rem; margin: 0; }
  .hero-actions { gap: 6px; margin-top: 0.7rem; }
  .hero-actions .btn { padding: 7px 11px; font-size: 0.86rem; border-radius: 7px; }

  .score-panel { padding: 14px; gap: 10px 14px; border-radius: 16px; }
  .ring-wrap { width: 82px; height: 82px; }
  .ring-num { font-size: 1.55rem; }
  .ring-num .of { font-size: 0.68rem; margin-top: 0; }
  .score-title { font-size: 1.05rem; margin-bottom: 2px; }
  .score-head p { font-size: 0.86rem; line-height: 1.4; margin: 0 0 3px; }
  .tiles { gap: 6px; }
  .tile { padding: 7px 8px; border-radius: 10px; }
  .tile-label { font-size: 0.72rem; }
  .tile-val { font-size: 1.15rem; }
  .tile-val small { font-size: 0.62rem; margin-left: 1px; }
  .tile-sub { font-size: 0.66rem; }

  .film > section:not(.score-panel):not(.rate) { padding: 14px; border-radius: 16px; }
  .critic-list { margin-top: 0.5rem; }
  .critic-list li { padding: 7px 0; }
  .cscore { font-size: 1.1rem; }
  .people { gap: 12px 8px; margin-top: 0.7rem; }
  .person { width: 72px; }
  .avatar { width: 52px; height: 52px; margin-bottom: 4px; }
  .avatar.initials { font-size: 1rem; }
  .pname { font-size: 0.78rem; }
  .prole { font-size: 0.7rem; }
  .plat-list li { padding: 8px 0; }
  .plat-score { font-size: 1.05rem; }

  .rate { padding: 14px; border-radius: 16px; }
  .star { max-width: 32px; }
  .done-score { font-size: 2.1rem; }
  .done { gap: 14px; }
  .chip span { padding: 7px 13px; }
  .updated { margin-top: 1.5rem; }

  .home-hero { padding-bottom: 0.8rem; }
  .tcard { width: 132px; }
  .frow .sbadge { width: 40px; height: 40px; font-size: 0.88rem; }
  .cta-bar { display: block; position: fixed; left: 14px; right: 14px; bottom: 12px; z-index: 12; text-align: center; padding: 12px; border-radius: 14px; background: var(--cta-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: var(--bg); font-weight: 700; text-decoration: none; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45); }
  body.has-cta .cookie-note { bottom: 70px; }
  .cookie-note { padding: 9px 11px; font-size: 0.8rem; gap: 10px; }
}

/* sign-up */
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; cursor: pointer; margin: 0; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--text); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: 0.5rem; }
.join .card { margin-top: 1.25rem; }
.join form.card { background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); border-radius: 14px; padding: 20px; }
.join .cf-turnstile { margin: 0 0 1rem; min-height: 65px; }

/* theme toggle */
.theme-toggle { --w: 58px; --h: 30px; --k: 24px; position: relative; flex: none; width: var(--w); height: var(--h); padding: 0; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--raise); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.28); color: var(--muted); cursor: pointer; }
.theme-toggle svg { width: 15px; height: 15px; display: block; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tt-bg { position: absolute; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; opacity: 0.55; }
.tt-bg-sun { left: 8px; }
.tt-bg-moon { right: 8px; }
.tt-knob { position: absolute; top: 2px; left: 2px; width: var(--k); height: var(--k); border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); transform: translateX(calc(var(--w) - var(--k) - 6px)); transition: transform 0.22s ease; }
.tt-ico { grid-area: 1 / 1; display: grid; place-items: center; }
.tt-sun { color: #f59e0b; display: none; }
.tt-moon { color: #4f63d8; }
:root[data-theme="light"] .theme-toggle { box-shadow: inset 0 1px 3px rgba(20, 24, 40, 0.18); background: #e1e4ec; }
:root[data-theme="light"] .tt-knob { transform: none; }
:root[data-theme="light"] .tt-sun { display: grid; }
:root[data-theme="light"] .tt-moon { display: none; }
.theme-toggle:hover .tt-knob { box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45); }
@media (prefers-reduced-motion: reduce) { .tt-knob { transition: none; } }
html:not(.js) .theme-toggle { display: none; }

@media (max-width: 420px) {
  .head-row { gap: 8px; }
  .brand { font-size: 1.02rem; gap: 6px; }
  .site-head nav { gap: 10px; font-size: 0.86rem; }
  .site-head nav a { white-space: nowrap; }
  .theme-toggle { --w: 52px; --h: 28px; --k: 22px; }
}

/* Theme change effect. Browsers with View Transitions get a circle that grows from the switch (see theme.js). Others get a plain 1 second fade, using .theme-fade, which theme.js adds only while the visitor flips the switch. */
@property --glow-red { syntax: "<number>"; inherits: true; initial-value: 0.34; }
@property --glow-green { syntax: "<number>"; inherits: true; initial-value: 0.26; }
@property --glow-gold-a { syntax: "<number>"; inherits: true; initial-value: 0.17; }
@property --glow-gold-b { syntax: "<number>"; inherits: true; initial-value: 0.2; }
:root.theme-fade { transition: --glow-red 1s ease, --glow-green 1s ease, --glow-gold-a 1s ease, --glow-gold-b 1s ease; }
.theme-fade *, .theme-fade *::before, .theme-fade *::after {
  transition: background-color 1s ease, color 1s ease, border-color 1s ease, fill 1s ease, stroke 1s ease, box-shadow 1s ease !important;
}
.theme-fade .tt-knob { transition: transform 0.22s ease, background-color 1s ease, box-shadow 1s ease !important; }
@media (prefers-reduced-motion: reduce) {
  :root.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after { transition: none !important; }
}

/* The new theme is revealed by a growing circle, so both snapshots are shown as they are. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) {
  z-index: 2;
  /* soft edge: the new theme fades in across --feather instead of stopping at a hard circle */
  -webkit-mask-image: radial-gradient(circle at var(--tx, 50%) var(--ty, 50%), #000 calc(var(--reveal) - var(--feather, 300px)), transparent var(--reveal));
  mask-image: radial-gradient(circle at var(--tx, 50%) var(--ty, 50%), #000 calc(var(--reveal) - var(--feather, 300px)), transparent var(--reveal));
}
@property --reveal { syntax: "<length>"; inherits: true; initial-value: 0px; }

/* verified (shield) and unverified scores */
.sbadges { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.sbadges.on-poster { position: absolute; right: 5px; bottom: 5px; }
.sbadges.on-poster .sbadge { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.sbadges .sbadge { width: 34px; height: 34px; font-size: 0.8rem; }
.frow .sbadges .sbadge { width: 40px; height: 40px; font-size: 0.88rem; }
.sbadge.vf { position: relative; border: 0; background: none; border-radius: 0; width: 34px; height: 38px; }
.frow .sbadges .sbadge.vf { width: 40px; height: 45px; }
.sbadge.vf .shield { position: absolute; inset: 0; width: 100%; height: 100%; }
.sbadge.vf .shield path { fill: var(--badge-bg); stroke: var(--c, var(--pending)); stroke-width: 3; stroke-linejoin: round; }
.sbadge.vf .sb-num { position: relative; top: -1px; }
.sbadge.vf.pending { color: var(--pending); }
.pool-tiles { grid-area: pool; }
.tile-vf .tile-label { display: flex; align-items: center; gap: 5px; }
.mini-shield { width: 12px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linejoin: round; }

/* login-aware bits: the page is the same for everyone; me.js adds .member when someone is logged in */
.only-member { display: none; }
html.member .only-member { display: block; }
html.member .only-anon { display: none; }
html.member .cf-turnstile { display: none; }
.sub-h { margin-top: 2rem; font-size: 1.25rem; }
.account .card { margin-bottom: 0.5rem; }

/* diary, watchlist and profile */
.marks.only-member { display: none; }
html.member .marks.only-member { display: inline-flex; flex-wrap: wrap; gap: 10px; }
.mark-btn { display: inline-flex; align-items: center; gap: 7px; }
.mark-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.film-hero .mark-btn.on { background: #f0efec; color: #0e0f13; border-color: #f0efec; }
.subtabs { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 1rem 0 0.4rem; }
.subtabs a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.subtabs a:hover { color: var(--text); }
.subtabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.month-h { margin: 1.8rem 0 0.6rem; font-size: 1.15rem; }
.mlist { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 8px; }
.mrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px 8px 8px; background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); border-radius: 14px; }
.mrow-main { display: flex; align-items: center; gap: 12px; flex: 1 1 220px; min-width: 0; text-decoration: none; color: inherit; }
.mrow-right { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.mrow-extra { flex: 1 0 100%; padding-left: 58px; }
.mini-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mini-form input[type=date] { width: auto; padding: 5px 8px; font-size: 0.9rem; }
.btn.small { padding: 5px 12px; font-size: 0.88rem; }
.pstats { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; gap: 8px 24px; flex-wrap: wrap; color: var(--muted); }
.pstats strong { color: var(--text); font-size: 1.2rem; font-family: var(--display); }
.badge-vf { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
@media (max-width: 420px) { .mrow-extra { padding-left: 0; } }
.tmdb-note { font-size: 0.82rem; }

/* home page rows, spotlight, genres */
.sec-sub { margin: 2px 0 0; font-size: 0.82rem; color: var(--muted); }
.gchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0.45rem 0 0; }
.gchip { padding: 3px 11px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--text); font-size: 0.8rem; text-decoration: none; }
.gchip:hover { background: var(--tint-strong); }
.gchips.on-dark .gchip { color: #f0efec; border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.1); }
.gchips.on-dark .gchip:hover { background: rgba(255, 255, 255, 0.2); }

.spot { position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; display: flex; gap: 22px; align-items: center; padding: 22px;
  background: #15171e; color: #f0efec; border: 1px solid rgba(255, 255, 255, 0.13);
  --bg: #0e0f13; --text: #f0efec; --muted: #c3c6d3; --glass-line: rgba(255, 255, 255, 0.13); --focus: #8ab4ff; }
.spot-bg { position: absolute; left: -30px; top: -30px; width: calc(100% + 60px); height: calc(100% + 60px); object-fit: cover; filter: blur(28px) saturate(1.3) brightness(0.5); z-index: -2; }
.spot::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 15, 19, 0.35), rgba(14, 15, 19, 0.75)); }
.spot-poster { flex: none; display: block; width: 170px; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); background: var(--tint); }
.spot-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot-img.noposter { display: grid; place-items: center; font: 700 3.5rem/1 var(--display); color: var(--noposter); }
.spot-body { min-width: 0; }
.spot-meta { margin: 0; font-size: 0.88rem; color: #c3c6d3; }
.spot-body h3 { margin: 0.2rem 0 0; font-size: clamp(1.5rem, 4.4vw, 2.1rem); line-height: 1.1; }
.spot-body h3 a { color: inherit; text-decoration: none; }
.spot-note { margin: 0.8rem 0 0; max-width: 52ch; color: #e4e5ec; font-size: 1rem; line-height: 1.5; }
.spot-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 1rem; }
.spot-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.spot .btn { background: #f0efec; color: #0e0f13; border-color: #f0efec; }
.spot .btn.ghost { background: transparent; color: #f0efec; border-color: rgba(255, 255, 255, 0.4); }
@media (max-width: 560px) {
  .spot { flex-direction: column; align-items: flex-start; padding: 16px; gap: 14px; }
  .spot-poster { width: 120px; }
  .spot::after { background: linear-gradient(180deg, rgba(14, 15, 19, 0.35), rgba(14, 15, 19, 0.8)); }
}

.ranked { counter-reset: none; }
.ranked > li { display: flex; align-items: center; gap: 10px; }
.ranked > li::before { content: attr(data-rank); flex: none; width: 1.5rem; text-align: right; font: 800 1.5rem/1 var(--display); color: var(--muted); }
.ranked .frow { flex: 1; min-width: 0; }

.gtiles { --gw: 120px; display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto); grid-auto-columns: var(--gw); gap: 10px; justify-content: start; }
.gtiles > li { scroll-snap-align: start; }
@media (max-width: 680px) { .gtiles { --gw: calc((100vw - 32px - 24px) / 4); gap: 8px; } .gname { font-size: 0.8rem; } .gcount { font-size: 0.66rem; } .gtile { padding: 8px 8px; } }
.gtile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 2 / 3; padding: 12px 14px; border-radius: 14px; overflow: hidden; isolation: isolate; text-decoration: none; background: #1b1e27; color: #f0efec; border: 1px solid rgba(255, 255, 255, 0.13); }
.gtile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; filter: saturate(0.9) brightness(0.62); transition: transform 0.25s, filter 0.25s; }
.gtile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 15, 19, 0) 20%, rgba(14, 15, 19, 0.82)); }
.gtile:hover img { transform: scale(1.05); filter: saturate(1) brightness(0.75); }
.gname { font: 700 1rem/1.2 var(--display); letter-spacing: -0.01em; }
.gcount { font-size: 0.78rem; color: #c3c6d3; }
@media (prefers-reduced-motion: reduce) { .gtile img { transition: none; } .gtile:hover img { transform: none; } }

.crumb { margin: 0 0 0.3rem; font-size: 0.88rem; color: var(--muted); }
.crumb a { color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 1.4rem 0 0; }
.see-all { margin: 0.9rem 0 0; text-align: center; }

/* ---- search ---- */
.head-search { margin: 0; }
.head-search input { width: 190px; padding: 7px 12px; font-size: 0.92rem; border-radius: 999px; }
.search-ico { display: none; color: var(--muted); line-height: 0; }
.search-form { display: flex; gap: 8px; margin: 0.4rem 0 0.8rem; max-width: 560px; position: relative; }
.search-form input { flex: 1; min-width: 0; }
.suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; min-width: 240px; z-index: 30; list-style: none; margin: 0; padding: 4px; background: var(--surface, #15171d); border: 1px solid var(--border-strong, rgba(255,255,255,0.2)); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; text-decoration: none; color: var(--text); }
.suggest li.on a, .suggest a:hover { background: var(--tint-strong); }
.suggest img { border-radius: 4px; object-fit: cover; flex: none; }
.suggest span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest small { color: var(--muted); flex: none; }
.head-search .suggest { right: 0; left: auto; width: 300px; }
.admin-find { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0.6rem 0 1rem; }
.admin-find input[type=search] { flex: 1 1 260px; min-width: 0; max-width: 420px; }
@media (max-width: 680px) { .head-search { display: none; } .search-ico { display: inline-block; } }
.admin-find select { width: auto; }

/* ---- share ---- */
.share { display: inline-block; vertical-align: top; }
.share-d { display: inline-block; }
.share-btn { list-style: none; display: inline-flex; align-items: center; gap: 7px; }
.share-btn::-webkit-details-marker { display: none; }
.share-menu { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 8px 0 0; padding: 0; }
.share-menu a, .share-menu button { display: inline-block; padding: 7px 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 0.9rem; text-decoration: none; cursor: pointer; }
.share-menu a:hover, .share-menu button:hover { background: var(--tint-strong); }
