/* ============================================================
   RT Watchlist — shared design system
   ============================================================ */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #eef0f4;
  --border: rgba(15, 23, 42, .08);
  --border-strong: rgba(15, 23, 42, .16);
  --text: #101828;
  --text-2: #667085;
  --text-3: #98a2b3;
  --accent: #0284c7;
  --accent-strong: #0369a1;
  --accent-weak: rgba(2, 132, 199, .10);
  --brand: #dc2626;
  --danger: #dc2626;
  --good: #16a34a;
  --mid: #d97706;
  --bad: #dc2626;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-2: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-3: 0 12px 32px rgba(15, 23, 42, .14);
  --radius: 14px;
  --radius-lg: 18px;
  --topbar-h: 60px;
}

html[data-theme="dark"] {
  --bg: #0b0e14;
  --surface: #141922;
  --surface-2: #1a2130;
  --surface-3: #212a3b;
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .18);
  --text: #e6eaf2;
  --text-2: #98a2b3;
  --text-3: #667085;
  --accent: #38bdf8;
  --accent-strong: #7dd3fc;
  --accent-weak: rgba(56, 189, 248, .13);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, .35);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  transition: background .2s ease, color .2s ease;
  padding-bottom: 84px; /* room for mobile tab bar */
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; letter-spacing: -.02em; }

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: var(--text);
  min-width: 0;
}
.brand-logo { width: 30px; height: 30px; flex-shrink: 0; filter: drop-shadow(0 2px 5px rgba(220, 38, 38, .3)); }
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand-sub { font-size: 10.5px; font-weight: 500; color: var(--text-3); margin-top: -2px; white-space: nowrap; }

.top-nav {
  position: relative;
  display: flex;
  gap: 2px;
  margin-left: 8px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.top-nav a { position: relative; z-index: 1; }
.top-nav .pill-thumb { background: var(--surface); box-shadow: var(--shadow-1); border: 1px solid var(--border); }
.top-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none !important;
  transition: color .15s ease, background .15s ease;
  white-space: nowrap;
}
.top-nav a svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.top-nav a:hover { color: var(--text); }
.top-nav a.active { background: transparent; color: var(--text); box-shadow: none; border-color: transparent; }

.topbar-spacer { flex: 1; }

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  padding: 0;
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
  box-shadow: var(--shadow-1);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Bottom nav (mobile) ---------- */

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 950;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-top: 1px solid var(--border);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-3);
  text-decoration: none !important;
  transition: color .15s ease;
}
.bottom-nav a svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav a.active { color: var(--accent); }

@media (min-width: 768px) {
  .bottom-nav { display: none; }
  body { padding-bottom: 0; }
}
@media (max-width: 767px) {
  .top-nav { display: none; }
}

/* ---------- Buttons, inputs ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
  box-shadow: var(--shadow-1);
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0); }
html[data-theme="dark"] .btn { color: #06222e; }

.btn.ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn.ghost:hover { border-color: var(--border-strong); filter: none; }
.btn.danger-ghost { background: transparent; color: var(--danger); border-color: transparent; box-shadow: none; opacity: .75; }
.btn.danger-ghost:hover { opacity: 1; background: rgba(220, 38, 38, .08); filter: none; }
.btn.sm { padding: 6px 12px; font-size: 12px; border-radius: 9px; }

input, select, textarea {
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 12px;
  max-width: 100%;
  min-width: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-weak);
}
select { cursor: pointer; }
textarea { resize: vertical; }

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.small { font-size: 12px; color: var(--text-2); }

/* Segmented control */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.seg button {
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.seg button.active { background: transparent; color: var(--text); box-shadow: none; }

/* ---------- Sliding pill indicator (segmented menus) ---------- */
.seg, .wl-tabs, .wl-filters { position: relative; }
.pill-thumb {
  position: absolute;
  top: 0; left: 0;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  transition: left .28s cubic-bezier(.4, 0, .2, 1), width .28s cubic-bezier(.4, 0, .2, 1),
              top .28s cubic-bezier(.4, 0, .2, 1), height .28s cubic-bezier(.4, 0, .2, 1);
}
.seg button, .wl-tab, .wl-filter { position: relative; z-index: 1; }
.seg .pill-thumb { background: var(--surface); box-shadow: var(--shadow-1); }
.wl-tabs .pill-thumb { background: var(--accent); }
.wl-filters .pill-thumb { background: var(--text); }

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-1);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: .01em;
  margin: 0 0 10px;
}

/* ---------- Movie grid & cards ---------- */

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 14px;
}
/* Phones: always two cards per row, compact card chrome */
@media (max-width: 700px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .movie-card { padding: 7px 7px 9px; gap: 6px; border-radius: var(--radius); }
  .movie-title { font-size: 12.5px; line-height: 1.25; min-height: 2.5em; }
  .movie-meta { font-size: 10.5px; }
  .ratings-box { padding: 6px 3px; gap: 2px; border-radius: 10px; }
  .metric-value { font-size: 17px; }
  .metric-label { font-size: 8.5px; letter-spacing: .03em; }
  .rt-logo, .rt-logo img, .rt-logo svg { width: 14px; height: 14px; }
  .badge { font-size: 9px; padding: 1px 5px; }
  .chip-btn { padding: 5px 8px; font-size: 10.5px; gap: 3px; }
  .card-actions { gap: 4px; }
  .poster-fab { width: 26px; height: 26px; font-size: 13px; right: 6px; bottom: 6px; }
  .entry-comments { font-size: 10px; }
  .inline-editor input[type="number"] { width: 64px; }
  .inline-editor .btn { padding: 5px 10px; font-size: 11px; }
  .inline-editor-row .small { min-width: 0; }
}

.movie-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .18s ease;
  animation: fadeIn .25s ease both;
  min-width: 0;
}
.movie-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.movie-card.focused { outline: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-weak); }

.poster-wrap { position: relative; border-radius: 12px; overflow: hidden; }
.poster {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--surface-3);
  transition: transform .3s ease;
}
.movie-card:hover .poster { transform: scale(1.025); }

.poster-fab {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(10, 14, 22, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
  padding: 0;
}
.poster-fab:hover { transform: scale(1.1); background: rgba(10, 14, 22, .8); }
.poster-fab.active { background: var(--accent); border-color: transparent; }

/* Title always occupies exactly two lines and meta exactly one, so the
   ratings row lines up across cards in the same grid row */
.movie-title {
  font-size: 14px; font-weight: 700; line-height: 1.3; letter-spacing: -.015em;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.movie-meta {
  font-size: 11.5px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Ratings row */
.ratings-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.metric { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.metric-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
  display: flex;
  align-items: center;
  min-height: 17px;
}
.metric-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.metric-value .dash { opacity: .25; }
.rating-btn { all: unset; cursor: pointer; display: block; border-radius: 8px; padding: 1px 6px; }
.rating-btn:hover { background: var(--accent-weak); }

/* "No peeking": Andrei's score/review is blurred for Enis until he rates the
   card himself, so it can't bias him. Purely visual — the click nudges him to
   rate. Not selectable, so the value can't be trivially read while blurred. */
.blurred-rating { filter: blur(6px); user-select: none; -webkit-user-select: none; }
.blurred-rating:hover { background: transparent; }

/* Lock affordance centered over a blurred score: request to unlock it. Sits
   outside the blurred element (in .metric-cell) so it stays crisp. */
.metric-cell { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.reveal-lock {
  all: unset;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  cursor: pointer;
  color: var(--text-2);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4));
  transition: color .12s ease, transform .12s ease;
}
.reveal-lock svg { width: 22px; height: 22px; display: block; }
.reveal-lock .lk-body { fill: currentColor; }
.reveal-lock .lk-shackle,
.reveal-lock .lk-o { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reveal-lock:hover { color: var(--accent); transform: translate(-50%, -50%) scale(1.14); }
.reveal-lock.pending { cursor: default; color: var(--text-2); }
.reveal-lock.pending:hover { transform: translate(-50%, -50%); color: var(--text-2); }
.reveal-lock.denied { color: #ef4444; }
.rt-logo { display: inline-flex; width: 17px; height: 17px; }
.rt-logo img, .rt-logo svg { width: 17px; height: 17px; object-fit: contain; display: block; }

.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge.good { background: rgba(22, 163, 74, .1); color: var(--good); }
.badge.mid { background: rgba(217, 119, 6, .12); color: var(--mid); }
.badge.bad { background: rgba(220, 38, 38, .1); color: var(--bad); }

/* Card actions — anchored to the card bottom; variable-height extras
   (comments, editors) live between the ratings row and this bar */
.card-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.card-actions .spacer { flex: 1; }

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: color .15s ease, border-color .15s ease;
  line-height: 1.2;
}
.chip-btn:hover { color: var(--text); border-color: var(--border-strong); }
.chip-btn.accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-weak); }

/* More menu */
.more-menu-wrap { position: relative; margin-left: auto; }
.more-menu-btn {
  width: 28px; height: 28px;
  border: 0; border-radius: 999px;
  background: transparent;
  color: var(--text-3);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  line-height: 1;
  padding: 0 0 6px;
}
.more-menu-btn:hover { background: var(--surface-2); color: var(--text); }
.more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 170px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-3);
  z-index: 60;
}
.more-menu button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.more-menu button:hover { background: var(--surface-2); }
.more-menu button.dangerish { color: var(--danger); }

/* Inline rating editors */
.inline-editor { display: none; flex-direction: column; gap: 6px; padding: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; }
.inline-editor.show { display: flex; }
.inline-editor-row { display: flex; gap: 6px; align-items: center; }
.inline-editor-row .small { min-width: 68px; font-weight: 600; }
.inline-editor input[type="number"] { width: 84px; padding: 6px 8px; border-radius: 8px; }
.inline-editor .btn { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.inline-editor textarea { font-size: 12px; min-height: 32px; max-height: 76px; padding: 6px 8px; border-radius: 8px; }

.release-info {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.6;
  padding: 7px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.release-info b { color: var(--text); font-weight: 700; }

.entry-comments { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--text-2); font-style: italic; }
.entry-comment { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }

/* Cast strip */
.cast-panel { grid-column: 1 / -1; padding: 10px 4px 2px; }
.cast-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.cast-card { min-width: 88px; max-width: 88px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.cast-photo { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; background: var(--surface-3); }
.cast-name { text-align: center; font-size: 11px; font-weight: 700; line-height: 1.2; }
.cast-role { text-align: center; font-size: 10px; line-height: 1.2; color: var(--text-3); }

/* ---------- Filter/tool bar ---------- */

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar .search { flex: 1; min-width: 170px; }

/* ---------- Chart carousels ---------- */

.chart-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
@media (max-width: 920px) { .chart-strip { grid-template-columns: 1fr; } }

.chart-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 12px 6px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.chart-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: thin; }
.chart-list { list-style: none; margin: 0; padding: 2px 2px 8px; display: inline-flex; min-width: max-content; gap: 9px; scroll-snap-type: x proximity; }
.chart-item { flex: 0 0 clamp(100px, 20vw, 128px); min-width: 0; scroll-snap-align: start; }
.chart-item img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  transition: transform .2s ease;
}
.chart-item:hover img { transform: translateY(-2px); }
.chart-poster-wrap { position: relative; }
.chart-add-fab {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 24px; height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(10, 14, 22, .55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: .85;
  transition: opacity .15s ease, transform .15s ease;
  padding: 0;
}
.chart-add-fab:hover { opacity: 1; transform: scale(1.08); }
.chart-add-fab.active { background: var(--accent); border-color: transparent; opacity: 1; }
.chart-rank { font-size: 10.5px; color: var(--text-3); margin-top: 5px; }
.chart-title {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- FAB / modal / toast ---------- */

.fab {
  position: fixed;
  right: 16px;
  bottom: 84px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-3);
  z-index: 940;
  cursor: pointer;
  transition: transform .18s ease;
  padding: 0;
}
.fab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; display: block; }
html[data-theme="dark"] .fab { color: #06222e; }
.fab:hover { transform: scale(1.08); }
@media (min-width: 768px) { .fab { bottom: 24px; } }

.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, .5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 960;
}
.scrim.show { display: block; }

.modal {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 520px);
  max-height: 82vh;
  overflow: auto;
  z-index: 970;
  box-shadow: var(--shadow-3);
}
.modal.show { display: block; }
.modal h3 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 96px;
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 12px;
  display: none;
  gap: 12px;
  align-items: center;
  z-index: 990;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-3);
}
.toast.show { display: flex; }
.toast button {
  all: unset;
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 13px;
}
html[data-theme="dark"] .toast button { color: #0369a1; }

/* Trailer modal */
.trailer-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, .65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 980;
  padding: 14px;
}
.trailer-modal.show { display: flex; }
.trailer-box {
  width: min(92vw, 780px);
  background: #0b1220;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .25);
  overflow: hidden;
  box-shadow: var(--shadow-3);
}
.trailer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
}
.trailer-close { background: transparent; border: 0; color: #94a3b8; font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.trailer-close:hover { color: #fff; }
.trailer-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; display: block; }
.trailer-yt-link {
  font-size: 12px; font-weight: 700; color: #f87171; text-decoration: none !important;
  padding: 4px 10px; border-radius: 8px; background: rgba(248, 113, 113, .12);
  border: 1px solid rgba(248, 113, 113, .28); white-space: nowrap;
}

/* Back to top */
.back-top {
  position: fixed;
  right: 21px; /* centers under the 52px-wide .fab (which sits at right:16px) */
  bottom: 148px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-2);
  cursor: pointer;
  z-index: 930;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.back-top svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; display: block; }
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 768px) { .back-top { bottom: 88px; } }

/* ---------- Skeletons ---------- */

.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: 10px; min-height: 14px; }
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skeleton-card { display: grid; gap: 8px; padding: 10px; border-radius: var(--radius); border: 1px solid var(--border); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Stats tiles ---------- */

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-1);
}
.stat-tile .k { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.stat-tile .v { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-tile .v small { font-size: 14px; color: var(--text-3); font-weight: 600; }

/* ---------- Award tables (festivals) ---------- */

.award-wrap { overflow: auto; margin-top: 12px; border-radius: 11px; border: 1px solid var(--border); }
.award-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.award-table thead th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.award-table td { padding: 7px 12px; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.45; }
.award-table td:first-child { color: var(--text-2); width: 42%; }
.award-table tbody tr:last-child td { border-bottom: none; }
.award-table tbody tr:hover { background: var(--accent-weak); }
.winner-work { color: var(--text-3); font-size: 11.5px; }

.event-card { display: flex; flex-direction: column; }
.event-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.event-logo { width: 84px; height: 84px; object-fit: contain; flex-shrink: 0; }
.event-name { font-weight: 800; font-size: 15px; line-height: 1.3; }
.event-type {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(217, 119, 6, .12);
  color: var(--mid);
}
.no-data { padding: 12px 0; color: var(--text-3); font-size: 13px; font-style: italic; }

/* Nominations (winner TBD) */
.noms-note { margin-top: 6px; font-size: 11px; color: var(--mid); font-weight: 600; }
.winner-tbd { color: var(--text-3); font-style: italic; }
details.nominees { margin-top: 3px; }
details.nominees summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-weak);
  user-select: none;
}
details.nominees summary::-webkit-details-marker { display: none; }
details.nominees summary::after { content: '▾'; font-size: 9px; opacity: .7; }
details.nominees[open] summary::after { content: '▴'; }
details.nominees ul { margin: 6px 0 2px; padding-left: 16px; display: flex; flex-direction: column; gap: 2px; }
details.nominees li { font-size: 12px; line-height: 1.4; }

/* Unread activity badge on nav items */
.top-nav a, .bottom-nav a { position: relative; }
.nav-badge {
  position: absolute;
  top: -2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
  pointer-events: none;
}
.top-nav .nav-badge { top: -5px; right: -7px; }
.bottom-nav .nav-badge { top: 2px; right: calc(50% - 21px); }

/* ---------- Reveal-request bell + popover ---------- */
.bell-btn { position: relative; }
/* .icon-btn sets display:inline-flex, which beats the UA [hidden] rule — so the
   hidden attribute alone won't hide the bell. Re-assert it at higher specificity. */
.icon-btn[hidden] { display: none; }
.bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
  pointer-events: none;
}
.reveal-popover {
  position: fixed;
  top: 58px;
  right: 16px;
  width: min(320px, calc(100vw - 32px));
  max-height: 70vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  z-index: 1000;
  padding: 6px;
}
.reveal-pop-head { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 8px 8px 6px; }
.reveal-empty { padding: 16px; text-align: center; color: var(--text-3); font-size: 13px; }
.reveal-row { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; }
.reveal-row + .reveal-row { border-top: 1px solid var(--border); }
.reveal-row-text { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.reveal-title { color: var(--text); font-weight: 700; }
.reveal-row-actions { display: flex; gap: 8px; }
.reveal-row-actions button { flex: 1; border: none; border-radius: 8px; padding: 7px 0; font-size: 13px; font-weight: 700; cursor: pointer; }
.reveal-approve { background: var(--accent); color: #fff; }
.reveal-approve:hover { filter: brightness(1.05); }
.reveal-deny { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border) !important; }
.reveal-deny:hover { color: var(--text); }

/* ---------- Watchlist tabs (yours / shared) ---------- */
.wl-tabs { display: flex; gap: 6px; margin: 2px 0 12px; flex-wrap: wrap; }
.wl-tab {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.wl-tab:hover { color: var(--text); border-color: var(--border-strong); }
.wl-tab.active { background: transparent; border-color: transparent; color: #fff; }
.wl-tab-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.wl-tab-lock { font-size: 11px; opacity: .75; }

/* Availability filter pills */
.wl-filters { display: flex; gap: 6px; margin: 0 0 10px; flex-wrap: wrap; align-items: center; }
.wl-filter {
  background: transparent; border: 1px solid var(--border); color: var(--text-2);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.wl-filter:hover { color: var(--text); border-color: var(--border-strong); }
.wl-filter.active { background: transparent; border-color: transparent; color: var(--bg); }
.wl-filter.refresh { padding: 5px 9px; margin-left: auto; font-size: 14px; }
.wl-filter.refresh.spinning { animation: wl-spin .8s linear infinite; }
@keyframes wl-spin { to { transform: rotate(360deg); } }

/* Availability badge on watchlist posters */
.avail-badge {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 999px;
  backdrop-filter: blur(4px); box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.avail-badge.on { background: rgba(22,163,74,.92); color: #fff; }
.avail-badge.soon { background: rgba(0,0,0,.6); color: #fff; }

/* Locked view: a blurred wall of placeholder cards with a lock message over it,
   shown for the other user's list until they share it. */
.wl-locked { position: relative; min-height: 60vh; }
.wl-locked-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 14px;
  filter: blur(8px);
  opacity: .5;
  pointer-events: none;
  user-select: none;
}
.wl-fake-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 14px); padding: 10px; }
.wl-fake-poster { width: 100%; aspect-ratio: 2 / 3; border-radius: 12px; background: linear-gradient(135deg, var(--surface-2), var(--border)); }
.wl-fake-line { height: 12px; border-radius: 6px; background: var(--surface-2); margin-top: 10px; }
.wl-fake-line.short { width: 55%; }
.wl-locked-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; padding: 24px;
}
.wl-locked-overlay h3 { font-size: 18px; font-weight: 800; }
.wl-locked-lock { color: var(--text-2); filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.wl-lock-svg { width: 48px; height: 48px; }
.wl-lock-svg .lk-body { fill: currentColor; }
.wl-lock-svg .lk-shackle { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .wl-locked-cards { grid-template-columns: repeat(2, 1fr); gap: 9px; } }
/* Share button reflects active sharing */
#shareBtn.active { background: var(--good, #16a34a); border-color: var(--good, #16a34a); color: #fff; }

/* ---------- User chip + account menu ---------- */
.user-chip-wrap { position: relative; display: inline-flex; }
.user-chip {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 8px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-2);
  transition: border-color .12s ease, color .12s ease;
}
.user-chip:hover { color: var(--text); border-color: var(--border-strong); }
.user-chip-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 800;
}
.user-chip-name { font-size: 13px; font-weight: 700; }
.user-chip-caret { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.user-menu {
  position: absolute; top: 44px; right: 0; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.25); z-index: 1000; padding: 6px;
}
.user-menu-head { font-size: 12px; color: var(--text-3); padding: 8px 10px 6px; }
.user-menu-item { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 8px; padding: 9px 10px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.user-menu-item:hover { background: var(--surface-2); }
.user-menu-item.danger { color: #ef4444; }

/* ---------- Identity gate + PIN modal ---------- */
.auth-gate {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: color-mix(in srgb, var(--bg, #0b0d10) 68%, transparent);
  backdrop-filter: blur(6px);
}
.auth-card {
  position: relative;
  width: min(360px, 100%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.4);
  padding: 26px 22px 22px;
  text-align: center;
}
.auth-title { font-size: 19px; font-weight: 800; margin-top: 6px; }
.auth-sub { font-size: 13px; color: var(--text-2); margin: 6px 0 16px; line-height: 1.4; }
.auth-pick { display: flex; flex-direction: column; gap: 10px; }
.auth-pick-btn {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; cursor: pointer; text-align: left;
  transition: border-color .12s ease, transform .1s ease;
}
.auth-pick-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.auth-pick-name { font-size: 15px; font-weight: 700; color: var(--text); flex: 1; }
.auth-pick-hint { font-size: 12px; color: var(--text-3); }
.auth-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-size: 18px; font-weight: 800; flex: none;
}
.auth-avatar.big { width: 56px; height: 56px; font-size: 24px; margin: 4px auto 2px; }
.auth-pin {
  width: 100%; box-sizing: border-box; margin-top: 10px;
  padding: 12px 14px; font-size: 20px; letter-spacing: .3em; text-align: center;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface-2); color: var(--text);
}
.auth-pin:focus { outline: none; border-color: var(--accent); }
.auth-err { min-height: 18px; color: #ef4444; font-size: 12.5px; margin: 8px 0 0; }
.auth-submit {
  width: 100%; margin-top: 12px; padding: 12px; border: none; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}
.auth-submit:hover { filter: brightness(1.05); }
.auth-submit:disabled { opacity: .6; cursor: default; }
.auth-back { position: absolute; left: 12px; top: 12px; background: none; border: none; color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px; }
.auth-back:hover { color: var(--text); }
.auth-close { position: absolute; right: 12px; top: 10px; background: none; border: none; color: var(--text-3); font-size: 16px; cursor: pointer; padding: 4px 8px; }
.auth-close:hover { color: var(--text); }

/* ---------- Misc ---------- */

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 2000; }
.skip-link:focus { left: 12px; top: 12px; }
.msg { margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--mid); min-height: 1em; }
.empty-state { text-align: center; padding: 36px 16px; color: var(--text-3); }
.empty-state .icon { font-size: 34px; margin-bottom: 6px; }

/* ============ Stats page ============ */
.st-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 16px; }
.st-select {
  height: 34px; padding: 0 30px 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 14px;
}
.st-tip {
  position: fixed; z-index: 3000; pointer-events: none;
  background: var(--text); color: var(--bg);
  font-size: 12px; font-weight: 600; padding: 6px 9px; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.3); max-width: 260px;
}

/* Per-user KPI blocks */
.st-user-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 12px; }
.st-user-block { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.st-user-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin-bottom: 12px; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.st-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.st-tile { background: var(--surface-2); border-radius: 10px; padding: 10px 6px; text-align: center; }
.st-tile-k { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.st-tile-v { font-size: 22px; font-weight: 800; line-height: 1.1; margin-top: 3px; font-variant-numeric: tabular-nums; }

.st-card { margin-top: 12px; }
.st-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.st-card-head .section-title { margin: 0; }
.st-legend { display: flex; gap: 12px; }
.st-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }

/* Genre horizontal bars */
.st-genres { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.st-grow { display: grid; grid-template-columns: 108px 1fr; gap: 12px; align-items: center; }
.st-grow-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-grow-bars { display: flex; flex-direction: column; gap: 3px; }
.st-bar-line { display: flex; align-items: center; gap: 8px; }
.st-bar-track { flex: 1; height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.st-bar { height: 100%; border-radius: 999px; min-width: 3px; transition: width .5s cubic-bezier(.4,0,.2,1); }
.st-bar-num { width: 22px; text-align: right; font-size: 12px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* Distribution columns */
.st-dist { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }
.st-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.st-col-bars { display: flex; gap: 4px; align-items: flex-end; height: 150px; }
.st-col-bar { width: 16px; border-radius: 5px 5px 0 0; min-height: 2px; transition: height .5s cubic-bezier(.4,0,.2,1); }
.st-col-label { font-size: 11px; font-weight: 600; color: var(--text-3); white-space: nowrap; }

/* Top lists */
.st-cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.st-top-cols { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 10px; }
.st-top-cols:has(.st-top-col + .st-top-col) { grid-template-columns: 1fr 1fr; }
.st-top-user { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.st-top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.st-top-row { display: flex; align-items: center; gap: 9px; padding: 5px 4px; border-radius: 8px; }
.st-top-row:hover { background: var(--surface-2); }
.st-top-rank { width: 16px; text-align: center; font-size: 12px; font-weight: 800; color: var(--text-3); flex: none; }
.st-top-poster { width: 30px; height: 44px; object-fit: cover; border-radius: 5px; flex: none; background: var(--surface-2); }
.st-top-title { flex: 1; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-top-score { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; flex: none; }

@media (max-width: 720px) {
  .st-cards-2 { grid-template-columns: 1fr; }
  .st-tiles { gap: 6px; }
  .st-tile-v { font-size: 19px; }
  .st-grow { grid-template-columns: 84px 1fr; gap: 8px; }
}

/* ============ News page ============ */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 8px; }
.news-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; text-decoration: none !important; color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.news-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-thumb.noimg { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); }
.news-thumb-src { font-size: 18px; font-weight: 800; color: var(--text-3); letter-spacing: -.01em; padding: 0 12px; text-align: center; }
.news-topic {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 8px; border-radius: 999px; color: var(--text);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.news-topic:empty { display: none; }
.news-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.news-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.news-source { color: var(--accent); font-weight: 700; }
.news-dot { opacity: .6; }
.news-title { font-size: 15px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-summary { font-size: 13px; color: var(--text-2); line-height: 1.45; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
