/* ============ CineQissa — "Premiere Noir": noir + champagne + crimson ============ */
:root {
  --bg: #0a090c;
  --bg-raised: #14111a;
  --bg-hover: #1c1824;
  --line: #272231;
  --ink: #f4efe3;
  --ink-dim: #aaa295;
  --ink-faint: #6e6880;
  --accent: #d9b26a;
  --accent-soft: rgba(217, 178, 106, 0.14);
  --accent-ink: #1c1305;
  --wine: #a02840;
  --crimson: #a02840;
  --crimson-hi: #c43a55;
  --good: #4cc38a;
  --live: #c43a55;
  --radius: 12px;
  --shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  --glow: 0 0 0 1px rgba(217, 178, 106, 0.2), 0 8px 30px rgba(217, 178, 106, 0.07);
}
:root[data-theme="light"] {
  --bg: #f5f1e8;
  --bg-raised: #fffdf8;
  --bg-hover: #efe9dc;
  --line: #e3dccb;
  --ink: #241d13;
  --ink-dim: #6b6152;
  --ink-faint: #97907f;
  --accent: #a3771c;
  --accent-soft: rgba(163, 119, 28, 0.1);
  --accent-ink: #fffdf8;
  --wine: #96253c;
  --crimson: #96253c;
  --crimson-hi: #b3404b;
  --live: #b3404b;
  --shadow: 0 8px 24px rgba(80, 60, 20, 0.1);
  --glow: 0 0 0 1px rgba(163, 119, 28, 0.2), 0 8px 24px rgba(163, 119, 28, 0.06);
}

:root {
  --page-bg:
    radial-gradient(1200px 620px at 82% -8%, rgba(217, 178, 106, 0.14), transparent 55%),
    radial-gradient(900px 520px at -12% 104%, rgba(160, 40, 64, 0.13), transparent 55%),
    linear-gradient(178deg, #120e17 0%, #0a090c 40%, #070609 100%);
  --gold-hi: #f2dfae;
  --gold-mid: #d9b26a;
  --gold-lo: #a97e22;
}
:root[data-theme="light"] {
  --page-bg:
    radial-gradient(1200px 620px at 82% -8%, rgba(163, 119, 28, 0.13), transparent 55%),
    radial-gradient(900px 520px at -12% 104%, rgba(142, 47, 60, 0.07), transparent 55%),
    linear-gradient(175deg, #faf6ed 0%, #f5f1e8 45%, #eee7d7 100%);
  --gold-hi: #a3771c;
  --gold-mid: #8a6414;
  --gold-lo: #5f430c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page-bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
/* cinematic film grain over everything */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 200;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* refined scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line); border-radius: 6px;
  border: 3px solid transparent; background-clip: content-box;
}
.serif { font-family: Georgia, "Palatino Linotype", "Times New Roman", serif; }
a { color: var(--accent); }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app {
  display: grid;
  grid-template-columns: 224px 1fr 340px;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

/* ---------- top bar ---------- */
.topbar {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 22px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  background: color-mix(in srgb, var(--bg-raised) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  position: sticky; top: 0; z-index: 20;
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo-img { height: 46px; width: auto; display: block; }
/* theme-matched logo art: gold-on-noir in dark, maroon-and-black in light */
.logo-dark { filter: drop-shadow(0 2px 10px rgba(217, 178, 106, 0.18)); }
.logo-light { display: none; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }
@media (max-width: 720px) {
  .logo-img { height: 38px; }
}
.search {
  flex: 1; max-width: 500px;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 8px 4px 16px; color: var(--ink-faint);
}
.search input {
  flex: 1; border: none; background: transparent; color: var(--ink);
  font: inherit; padding: 5px 0; min-width: 0;
}
.search input:focus { outline: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.btn {
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: 13px; cursor: pointer;
}
.btn:hover { background: var(--bg-hover); }
.btn.primary {
  background: linear-gradient(135deg, var(--gold-hi), var(--accent) 55%, var(--gold-lo));
  border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 2px 12px rgba(217, 178, 106, 0.28);
}
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { padding: 8px 12px; font-size: 15px; }

/* ---------- sidebar ---------- */
.side {
  border-right: 1px solid var(--line);
  padding: 22px 12px;
  display: flex; flex-direction: column; gap: 26px;
}
.side h3 {
  margin: 0 0 6px 12px; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint);
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  color: var(--ink-dim); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--bg-hover); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--ink); font-weight: 700; box-shadow: inset 2px 0 0 var(--accent); }
.ico { width: 18px; text-align: center; }
.nav .count {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: var(--bg-hover); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 7px; color: var(--ink-dim);
}
.sources { display: flex; flex-direction: column; gap: 8px; padding: 0 12px; }
.source { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-dim); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex: none; }
.source b { color: var(--ink); font-weight: 600; }
.source span { margin-left: auto; font-size: 11px; color: var(--ink-faint); }
.attribution { margin-top: auto; padding: 0 12px; font-size: 11px; color: var(--ink-faint); }

/* ---------- main ---------- */
.main { padding: 26px 30px; min-width: 0; }
.greet h1 { margin: 0; font-size: 30px; font-weight: 700; text-wrap: balance; }
.greet p { margin: 5px 0 24px; color: var(--ink-dim); font-style: italic; }
/* champagne gradient on display headings */
.greet h1, .section-head h2 {
  background: linear-gradient(120deg, var(--gold-hi), var(--gold-mid) 55%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.section-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 19px; font-weight: 700; }
.section-head .sub { color: var(--ink-faint); font-size: 12.5px; }
.sync-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px; padding: 3px 11px;
}
.sync-badge .dot { background: var(--accent); animation: blink 2.4s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

/* weekly spotlight */
.spotlight { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 30px; }
.spot {
  position: relative; min-height: 220px;
  display: flex; align-items: flex-end;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background-color: var(--bg-raised); background-size: cover; background-position: center;
  cursor: pointer; text-align: left; padding: 0;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.spot:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.spot::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7, 6, 9, 0.93) 0%, rgba(7, 6, 9, 0.4) 55%, rgba(7, 6, 9, 0.12) 100%);
}
.spot .sbody { position: relative; padding: 16px 18px; width: 100%; color: #f4efe3; }
.spot .slabel {
  display: inline-block; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--crimson-hi), var(--crimson));
  color: #f4efe3; padding: 3px 11px; border-radius: 4px;
}
.spot .slabel.gold {
  background: linear-gradient(135deg, var(--gold-hi), var(--accent));
  color: #1c1305;
}
.spot h3 {
  margin: 9px 0 4px; font-size: 23px; font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); text-wrap: balance;
}
.spot .sover {
  color: rgba(244, 239, 227, 0.78); font-size: 12.5px; max-width: 56ch;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.spot .schips { margin-top: 10px; }
.spot .chip {
  background: rgba(7, 6, 9, 0.55); border-color: rgba(255, 255, 255, 0.2);
  color: #f4efe3; backdrop-filter: blur(4px);
}
.spot-skel { height: 220px; }
@media (max-width: 860px) { .spotlight { grid-template-columns: 1fr; } }

/* trailers row */
.hscroll {
  display: flex; gap: 14px; overflow-x: auto;
  padding-bottom: 10px; margin-bottom: 26px;
  scroll-snap-type: x proximity;
}
.trailer {
  flex: none; width: 280px; scroll-snap-align: start;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-raised);
  box-shadow: var(--shadow);
  text-align: left; padding: 0; position: relative;
}
.trailer:hover { box-shadow: var(--glow); }
/* the play surface — everything except the share controls */
.trailer .t-open {
  display: block; width: 100%; padding: 0; border: 0;
  background: none; text-align: left; cursor: pointer; color: inherit; font: inherit;
}
.thumb {
  height: 157px; position: relative;
  display: grid; place-items: center;
  background-size: cover; background-position: center;
  background-color: var(--bg-hover);
}
.thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%);
}
.play {
  width: 46px; height: 46px; border-radius: 50%; z-index: 1;
  background: linear-gradient(135deg, var(--crimson-hi), var(--crimson));
  color: #f4efe3; display: grid; place-items: center; font-size: 16px;
  box-shadow: 0 4px 20px rgba(160, 40, 64, 0.5);
}
.thumb .kind {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--wine); color: #f3eee4; border-radius: 4px; padding: 2px 8px;
}
.thumb .bucket {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(0, 0, 0, 0.55); color: #fff; border-radius: 4px; padding: 2px 8px;
}
.trailer .tbody { display: block; padding: 11px 13px 40px; }
.trailer .th4 { display: block; font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trailer .tmeta { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.trailer .tmeta b { color: var(--accent); font-weight: 600; }

/* Share this one trailer — sits in the space reserved by .tbody's bottom
   padding, so it never covers the title and never changes the card height. */
.trailer .tshare {
  position: absolute; left: 9px; right: 9px; bottom: 8px;
  display: flex; gap: 4px; align-items: center;
  opacity: 0; transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease;
}
.trailer:hover .tshare,
.trailer:focus-within .tshare { opacity: 1; transform: none; }
.trailer .tshare button {
  flex: 1 1 0; min-width: 0; height: 26px; padding: 0;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg-hover); color: var(--ink-dim);
  font-size: 12px; line-height: 1; cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.trailer .tshare button:hover {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
/* touch devices have no hover — the controls must simply be there */
@media (hover: none) {
  .trailer .tshare { opacity: 1; transform: none; }
}

/* trending grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-hover) 55%, var(--bg-raised)), var(--bg-raised) 40%);
  border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer; text-align: left; padding: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--glow);
}
.card .poster {
  aspect-ratio: 2 / 3; width: 100%;
  background-size: cover; background-position: center;
  background-color: var(--bg-hover);
  display: grid; place-items: center;
  color: var(--ink-faint); font-size: 32px;
}
.card .cbody { padding: 10px 12px 12px; }
.card h4 {
  margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .cmeta { font-size: 11.5px; color: var(--ink-faint); margin: 2px 0 8px; }
.scores { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; color: var(--ink);
}
.chip i {
  font-style: normal; font-size: 8.5px; font-weight: 800;
  letter-spacing: 0.04em; padding: 1px 4px; border-radius: 3px;
}
.chip .s-tmdb { background: #01b4e4; color: #fff; }
.chip .s-imdb { background: #f5c518; color: #1a1408; }
.chip .s-rt   { background: #fa320a; color: #fff; }
.chip .s-mc   { background: #66cc33; color: #1a1408; }
.chip.cq { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.chip .s-cq { background: var(--accent); color: var(--accent-ink); }

/* skeletons */
.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--bg-raised) 40%, var(--bg-hover) 50%, var(--bg-raised) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.trailer-skel { flex: none; width: 280px; height: 216px; }
.card-skel { aspect-ratio: 2 / 3.4; }
@media (prefers-reduced-motion: reduce) {
  .skeleton, .sync-badge .dot { animation: none; }
  .card, .card:hover { transition: none; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- chat ---------- */
/* right rail: top lists above chat */
.rail {
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 61px;
  max-height: calc(100vh - 61px);
  overflow: hidden;
}
.rail-lists {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px 10px;
  flex: none;
}
.rail-head { display: flex; align-items: baseline; gap: 10px; }
.rail-head h2 { margin: 0 0 8px; font-size: 15px; font-weight: 800; }
.rail-head a { margin-left: auto; font-size: 12px; font-weight: 600; text-decoration: none; }
.rail-list-item {
  display: block; width: 100%; text-align: left;
  border: none; background: transparent; cursor: pointer;
  padding: 7px 10px; border-radius: 8px;
}
.rail-list-item:hover { background: var(--bg-hover); }
.rli-title {
  display: block; font-size: 12.5px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rli-meta { display: block; font-size: 11px; color: var(--ink-faint); }

.chat {
  background: var(--bg-raised);
  display: flex; flex-direction: column;
  flex: 1; min-height: 0;
}
.chat-head { padding: 14px 16px 0; }
.chat-head .row1 { display: flex; align-items: center; gap: 8px; }
.chat-head h2 { margin: 0; font-size: 15px; font-weight: 800; }
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--live);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 25%, transparent);
}
.chat-head .online { margin-left: auto; font-size: 12px; color: var(--ink-dim); }
.rooms { display: flex; gap: 6px; margin: 12px 0; overflow-x: auto; padding-bottom: 2px; }
.room-tab {
  flex: none; font-size: 12px; font-weight: 600; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
  background: transparent; cursor: pointer;
}
.room-tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.msgs {
  flex: 1; overflow-y: auto; padding: 6px 16px 12px;
  display: flex; flex-direction: column; gap: 14px; min-height: 200px;
}
.msg { display: flex; gap: 10px; }
.msg .av {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff;
}
.msg .who { font-size: 12px; font-weight: 700; }
.msg .who span { color: var(--ink-faint); font-weight: 500; margin-left: 6px; font-size: 11px; }
.msg .bubble { color: var(--ink-dim); margin-top: 1px; overflow-wrap: anywhere; }
.msg { position: relative; }
.msg .mod-del {
  position: absolute; top: 0; right: 0;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-faint);
  border-radius: 6px; font-size: 11px; padding: 2px 7px; cursor: pointer;
  opacity: 0; transition: opacity 0.12s ease;
}
.msg:hover .mod-del, .msg .mod-del:focus-visible { opacity: 1; }
.msg .mod-del:hover { color: var(--live); border-color: var(--live); }
.demo-note {
  font-size: 11.5px; color: var(--ink-faint); text-align: center;
  border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; margin: 4px 0;
}
.emoji-strip {
  display: flex; gap: 2px; padding: 6px 12px; border-top: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.emoji-strip button, .emoji-picker button {
  border: none; background: transparent; font-size: 19px; cursor: pointer;
  border-radius: 6px; padding: 3px 5px; flex: none; line-height: 1;
}
.emoji-strip button:hover, .emoji-picker button:hover { background: var(--bg-hover); }
.composer { display: flex; gap: 8px; padding: 10px 12px 14px; align-items: center; }
.emoji-toggle { border: none; background: transparent; font-size: 20px; cursor: pointer; padding: 4px; border-radius: 8px; }
.emoji-toggle:hover { background: var(--bg-hover); }
.composer input {
  flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; color: var(--ink); font: inherit; min-width: 0;
}
.composer input::placeholder { color: var(--ink-faint); }
.composer .send {
  background: var(--accent); color: var(--accent-ink); border: none;
  border-radius: 999px; width: 40px; height: 36px; font-size: 15px; cursor: pointer; font-weight: 700;
}
.emoji-picker {
  position: absolute; bottom: 64px; left: 8px; right: 8px; z-index: 10;
  max-height: 240px; overflow-y: auto;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
}
.emoji-picker h5 {
  grid-column: 1 / -1; margin: 6px 2px 2px; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
}

/* ---------- modal ---------- */
/* the hidden attribute must win over the display rules below */
.modal-backdrop[hidden],
.emoji-picker[hidden] { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(8, 6, 12, 0.72); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
}
.modal {
  position: relative; width: min(760px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow);
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.modal .video-wrap { aspect-ratio: 16 / 9; background: #000; }
.modal .video-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal .mbody { padding: 20px 24px 24px; }
.modal h2 { margin: 0 0 2px; font-size: 24px; }
.modal .mmeta { color: var(--ink-faint); font-size: 13px; margin-bottom: 12px; }
.modal .overview { color: var(--ink-dim); max-width: 62ch; }
.modal .scores { margin: 14px 0; }
.rate-box {
  margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg);
}
.rate-box .rb-head { font-weight: 700; margin-bottom: 8px; }
.star-row { display: flex; gap: 2px; font-size: 24px; }
.star-row button { border: none; background: transparent; cursor: pointer; color: var(--ink-faint); padding: 0 2px; }
.star-row button.lit { color: var(--accent); }
.rate-box .rb-note { font-size: 11.5px; color: var(--ink-faint); margin-top: 8px; }
.watch-btn { margin-top: 12px; }

/* ---------- person modal & search toggle ---------- */
.search-toggle { display: none; }
@media (max-width: 720px) { .search-toggle { display: block; } }
.person-head { display: flex; gap: 16px; align-items: flex-start; }
.person-photo {
  width: 110px; aspect-ratio: 2 / 3; flex: none; border-radius: 10px;
  background: var(--bg-hover) center/cover; display: grid; place-items: center; font-size: 30px;
}
.person-works {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px;
}
.pwork {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--bg); cursor: pointer; padding: 0; text-align: left;
  display: flex; flex-direction: column;
}
.pwork:hover { border-color: var(--accent); }
.pwork-poster { aspect-ratio: 2 / 3; background: var(--bg-hover) center/cover; }
.pwork-t {
  font-size: 11.5px; font-weight: 700; color: var(--ink); padding: 6px 8px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pwork-r { font-size: 10.5px; color: var(--accent); padding: 1px 8px 7px; }

/* ---------- Qissa stories & lists ---------- */
.qhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qtabs { display: flex; gap: 8px; }
.qtab {
  font-size: 14px; font-weight: 700; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 20px;
  background: transparent; cursor: pointer;
}
.qtab.active {
  background: linear-gradient(135deg, var(--gold-hi), var(--accent) 60%, var(--gold-lo));
  border-color: transparent; color: var(--accent-ink);
}
#write-btn { margin-left: auto; }
.qsub { color: var(--ink-faint); font-size: 12.5px; margin: 8px 0 18px; font-style: italic; }

.qcard {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-hover) 55%, var(--bg-raised)), var(--bg-raised) 40%);
  margin-bottom: 14px; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.qcard:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.qcover { height: 150px; background-size: cover; background-position: center; position: relative; }
.qcat {
  position: absolute; top: 10px; left: 10px;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--crimson); color: #f4efe3; padding: 3px 10px; border-radius: 4px;
}
.qcat.inpost { position: static; display: inline-block; margin-bottom: 10px; }
.qbody { padding: 14px 16px; }
.qbody h3 { margin: 0 0 4px; font-size: 18px; }
.qby { font-size: 12px; color: var(--ink-faint); margin-bottom: 8px; }
.qby b { color: var(--ink); }
.qexcerpt { color: var(--ink-dim); font-size: 13px; }
.qmeta { display: flex; gap: 14px; margin-top: 12px; font-size: 12.5px; color: var(--ink-faint); }

.qrank-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.qrank { font-family: Georgia, serif; font-size: 19px; width: 26px; text-align: center; flex: none; color: var(--ink-dim); }
.qrank.top { color: var(--accent); }
.qmini { width: 34px; height: 48px; border-radius: 6px; flex: none; background: var(--bg-hover) center/cover; }
.qmini.lg { width: 44px; height: 62px; }
.qrt { font-weight: 700; font-size: 13.5px; }
.qry { font-size: 11.5px; color: var(--ink-faint); }
.qnote { font-size: 12.5px; color: var(--ink-dim); font-style: italic; margin-top: 2px; }
.qmore { text-align: center; color: var(--accent); font-size: 12px; font-weight: 600; padding-top: 10px; }

/* open post — a centered, readable article column (no stray blank half) */
.qback { display: block; max-width: 820px; margin: 0 auto 14px; }
.qpost {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-raised); padding: 24px 30px;
  max-width: 820px; margin: 0 auto;
}
@media (max-width: 900px) { .qpost { padding: 20px 18px; } }
.qpost h2 { margin: 0 0 4px; font-size: 26px; text-wrap: balance; }
.qcontent { margin-top: 14px; }
.qcontent p { color: var(--ink-dim); line-height: 1.75; font-size: 14.5px; margin: 0 0 14px; }
.qcontent a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.qcontent a:hover { color: var(--gold-hi); }
.qh2 { font-size: 19px; margin: 20px 0 6px; }
.qquote {
  margin: 16px 0; padding: 10px 18px; font-family: Georgia, serif; font-style: italic;
  color: var(--ink); border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
}
/* WordPress-style: text flows AROUND images, alternating sides */
.qcontent { display: flow-root; }
.qcontent .qfig {
  float: right; width: min(44%, 300px);
  margin: 6px 0 14px 20px;
}
.qcontent .qfig:nth-of-type(even) {
  float: left; margin: 6px 20px 14px 0;
}
.qcontent .qh2, .qcontent .qyt, .qcontent .qquote, .qcontent .qlist-full { clear: both; }
.qfig img { max-width: 100%; border-radius: 10px; display: block; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
.qfig figcaption { font-size: 11.5px; color: var(--ink-faint); margin-top: 5px; }
/* author-chosen placement beats the automatic alternation */
.qcontent .qfig.al-left, .qcontent .qfig.al-left:nth-of-type(even) { float: left; margin: 6px 20px 14px 0; }
.qcontent .qfig.al-right, .qcontent .qfig.al-right:nth-of-type(even) { float: right; margin: 6px 0 14px 20px; }
.qcontent .qfig.al-center, .qcontent .qfig.al-center:nth-of-type(even) { float: none; clear: both; margin: 16px auto; }
.qcontent .qfig.al-full, .qcontent .qfig.al-full:nth-of-type(even) { float: none; clear: both; width: 100%; margin: 16px 0; }
.qcontent .qfig.sz-s { width: min(30%, 190px); }
.qcontent .qfig.sz-m { width: min(44%, 300px); }
.qcontent .qfig.sz-l { width: min(62%, 430px); }
.qcontent .qfig.al-center.sz-s { width: min(50%, 260px); }
.qcontent .qfig.al-center.sz-m { width: min(70%, 380px); }
.qcontent .qfig.al-center.sz-l { width: min(88%, 520px); }
.qcontent .qfig.al-full { width: 100% !important; }
@media (max-width: 480px) {
  .qcontent .qfig, .qcontent .qfig:nth-of-type(even) { width: 48%; }
  .qcontent .qfig.sz-l { width: 58%; }
}

/* ---------- inline photos: [img:url|align|size] inside a paragraph ---------- */
.qcontent .qinline {
  border-radius: 10px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  max-width: 100%; height: auto;
}
.qcontent .qinline.al-left { float: left; margin: 4px 18px 10px 0; }
.qcontent .qinline.al-right { float: right; margin: 4px 0 10px 18px; }
.qcontent .qinline.al-center { display: block; float: none; clear: both; margin: 16px auto; }
.qcontent .qinline.al-full { display: block; float: none; clear: both; width: 100%; margin: 18px 0; }
.qcontent .qinline.sz-s { width: min(30%, 190px); }
.qcontent .qinline.sz-m { width: min(44%, 300px); }
.qcontent .qinline.sz-l { width: min(62%, 430px); }
.qcontent .qinline.al-center.sz-s { width: min(50%, 260px); }
.qcontent .qinline.al-center.sz-m { width: min(70%, 380px); }
.qcontent .qinline.al-center.sz-l { width: min(88%, 520px); }
@media (max-width: 480px) {
  .qcontent .qinline { width: 48%; }
  .qcontent .qinline.sz-l { width: 58%; }
  .qcontent .qinline.al-center { width: 80%; }
}

/* ---------- full-screen writing pane ----------
   Writing a long post in a 640px box was the worst part of the site.
   The editor now takes the whole window: wide, scrollable, with the
   publish bar always in reach. */
.ed-backdrop { padding: 0; display: block; background: rgba(8, 6, 12, 0.92); }
.modal.qeditor {
  width: 100%; max-width: none; max-height: none;
  height: 100vh; height: 100dvh;
  border: 0; border-radius: 0; overflow: hidden;
  display: flex; flex-direction: column;
}
.modal.qeditor .mbody {
  flex: 1 1 auto; overflow-y: auto; width: 100%;
  max-width: 1060px; margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 44px) 16px;
}
/* keep the writing column clear of the tool palette's default parking spot */
@media (min-width: 721px) {
  .modal.qeditor .mbody { padding-right: 272px; }
}
.modal.qeditor h2 { font-size: clamp(20px, 2.4vw, 26px); }
.modal.qeditor .ed-title { font-size: 21px; padding: 14px 16px; }
/* room to write: tall, comfortable, and it grows as you type or paste */
.modal.qeditor .ed-block textarea {
  min-height: 150px; font-size: 16px; line-height: 1.8; resize: vertical;
}
.modal.qeditor .ed-block textarea.ed-h2,
.modal.qeditor .ed-block textarea.ed-quote { min-height: 56px; }
/* publish bar pinned to the bottom of the window, never scrolled away */
.modal.qeditor .ed-publish {
  position: sticky; bottom: 0; z-index: 6; flex-wrap: wrap; row-gap: 8px;
  margin: 14px -8px 0; padding: 12px 8px 14px;
  background: linear-gradient(to top, var(--bg-raised) 72%, rgba(0, 0, 0, 0));
  border-top: 1px solid var(--line);
}
.modal.qeditor .ed-hint { flex-basis: 100%; }
@media (max-width: 620px) {
  .modal.qeditor .mbody { padding: 20px 14px 12px; }
  .modal.qeditor .ed-block textarea { min-height: 180px; }
}

/* ---------- always-visible "write" button ---------- */
.write-fab {
  position: fixed; right: 22px; bottom: 26px; z-index: 40;
  display: flex; align-items: center; gap: 0;
  height: 56px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(217, 178, 106, 0.5);
  background: linear-gradient(135deg, var(--gold-hi), var(--accent) 55%, var(--gold-lo));
  color: var(--accent-ink); font: 700 14px/1 inherit;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(217, 178, 106, 0.08);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, gap .25s;
}
.write-fab[hidden] { display: none; }
.write-fab .wf-ico { font-size: 21px; line-height: 1; }
.write-fab .wf-label {
  max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0;
  transition: max-width .3s cubic-bezier(.2,.8,.2,1), opacity .25s;
}
.write-fab:hover, .write-fab:focus-visible {
  transform: translateY(-3px); gap: 9px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 8px rgba(217, 178, 106, 0.14);
}
.write-fab:hover .wf-label, .write-fab:focus-visible .wf-label { max-width: 190px; opacity: 1; }
/* clear of the chat panel on wide screens, and of the mobile nav on phones */
@media (max-width: 1100px) { .write-fab { bottom: 22px; right: 18px; } }
@media (max-width: 720px) {
  .write-fab { height: 52px; padding: 0 15px; bottom: 18px; right: 16px; }
  .write-fab .wf-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .write-fab, .write-fab .wf-label { transition: none; }
}

/* ---------- floating tool palette ---------- */
.ed-palette {
  position: fixed; top: 96px; right: 26px; z-index: 20; width: 230px;
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  overflow: hidden; user-select: none;
}
.ed-palette.dragging { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65); border-color: var(--accent); }
.ed-pal-bar {
  display: flex; align-items: center; gap: 8px; cursor: grab;
  padding: 8px 10px; background: var(--bg); border-bottom: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-dim);
}
.ed-palette.dragging .ed-pal-bar { cursor: grabbing; }
.ed-pal-grip { color: var(--ink-faint); }
.ed-pal-name { font-weight: 700; letter-spacing: .04em; }
.ed-pal-min {
  margin-left: auto; width: 22px; height: 22px; line-height: 1; cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg-raised); color: var(--ink-dim); font-size: 14px;
}
.ed-pal-min:hover { color: var(--accent); border-color: var(--accent); }
.ed-pal-body { padding: 10px; }
.ed-palette.collapsed .ed-pal-body { display: none; }
.ed-palette .ed-tools { flex-direction: column; gap: 5px; margin: 0 0 8px; }
.ed-palette .ed-tools button { width: 100%; text-align: left; padding: 7px 11px; }
.ed-palette .ed-format {
  position: static; margin: 0; padding: 7px; gap: 4px; background: var(--bg);
}
.ed-pal-hint { font-size: 10px; color: var(--ink-faint); margin-top: 7px; line-height: 1.45; }

/* phones: dock it to the bottom as a scrollable strip — a floating box would
   cover the very words being written */
@media (max-width: 720px) {
  .ed-palette {
    top: auto !important; left: 0 !important; right: 0 !important; bottom: 0;
    width: 100%; border-radius: 14px 14px 0 0; border-left: 0; border-right: 0; border-bottom: 0;
  }
  .ed-pal-bar { cursor: default; }
  .ed-pal-grip { display: none; }
  .ed-pal-body { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
  .ed-palette .ed-tools { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 2px; }
  .ed-palette .ed-tools button { width: auto; white-space: nowrap; }
  .ed-palette .ed-format { flex-wrap: nowrap; overflow-x: auto; }
  .ed-pal-hint { display: none; }
  /* keep the last lines of text clear of the docked palette */
  .modal.qeditor .mbody { padding-bottom: 190px; }
}

/* ---------- drafts ---------- */
.qdraft-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px;
}
.qdraft-main { flex: 1; min-width: 0; cursor: pointer; background: none; border: 0; color: inherit; font: inherit; text-align: left; }
.qdraft-title { display: block; font-weight: 700; font-size: 15px; color: var(--ink); }
.qdraft-meta { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 3px; }
.qdraft-badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(217, 178, 106, 0.32); border-radius: 999px; padding: 2px 8px;
}
.qdraft-card .qd-del {
  border: 1px solid var(--line); background: transparent; color: var(--ink-faint);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.qdraft-card .qd-del:hover { color: var(--live); border-color: var(--live); }

/* ---------- editor draft banner ---------- */
.ed-draftnote {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 10px 0 2px; padding: 9px 13px; border-radius: 10px;
  background: var(--accent-soft); border: 1px solid rgba(217, 178, 106, 0.32);
  font-size: 12.5px; color: var(--ink-dim);
}
.ed-draftnote b { color: var(--accent); }
.ed-draftnote button {
  margin-left: auto; border: 1px solid var(--line); background: transparent;
  color: var(--ink-dim); border-radius: 999px; padding: 4px 12px; font-size: 11.5px; cursor: pointer;
}
.ed-draftnote button:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- editor photo tray ---------- */
.ed-traywrap { margin: 10px 0 4px; }
.ed-trayhint { font-size: 11.5px; color: var(--ink-dim); margin-bottom: 8px; line-height: 1.5; }
.ed-trayhint b { color: var(--accent); }
.ed-tray { display: flex; gap: 10px; flex-wrap: wrap; }
.ed-tri {
  position: relative; width: 74px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-raised);
}
.ed-tri.placed { border-color: rgba(217, 178, 106, 0.55); }
.ed-tri-in {
  position: absolute; top: 4px; left: 4px; z-index: 2;
  font-size: 8.5px; font-weight: 800; letter-spacing: .04em;
  background: rgba(10, 9, 12, 0.82); color: var(--accent);
  border: 1px solid rgba(217, 178, 106, 0.45); border-radius: 999px; padding: 1px 6px;
}
.ed-tri img { display: block; width: 100%; height: 74px; object-fit: cover; cursor: grab; }
.ed-tri img:active { cursor: grabbing; }
.ed-tri-ctl { display: flex; }
.ed-tri-ctl button {
  flex: 1; border: 0; border-top: 1px solid var(--line); background: transparent;
  color: var(--ink-dim); font-size: 12px; padding: 4px 0; cursor: pointer;
}
.ed-tri-ctl button:hover { color: var(--accent); background: var(--accent-soft); }
.ed-tri-ctl button + button { border-left: 1px solid var(--line); }

/* inline text styling */
.qcontent strong { color: var(--ink); font-weight: 700; }
.qcontent em { color: color-mix(in srgb, var(--ink) 82%, var(--accent)); }
.tc-gold { color: var(--accent); }
.tc-red { color: var(--crimson-hi); }
.tc-blue { color: #5aa0e6; }
.tc-green { color: #4cc38a; }
.tc-purple { color: #a98be8; }
.tc-orange { color: #ff9a4d; }
.qyt { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; margin: 16px 0; background: #000; }
.qyt iframe { width: 100%; height: 100%; border: 0; display: block; }
.qactions { margin-top: 18px; }
.qreact {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 999px; padding: 8px 18px; font-size: 14px; cursor: pointer; font-weight: 600;
}
.qreact.on { border-color: var(--crimson-hi); background: color-mix(in srgb, var(--crimson) 14%, transparent); }
.qshare { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.qshare button {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 999px; padding: 7px 14px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.qshare button:hover { border-color: var(--accent); }
.qmod { display: flex; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* editor */
/* (the editor is full-screen — see "full-screen writing pane" above) */
.ed-title {
  width: 100%; font-family: Georgia, serif; font-size: 20px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; color: var(--ink); margin: 12px 0 10px;
}
.ed-cat {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; color: var(--ink); font: inherit; margin-bottom: 12px;
}
.ed-block { position: relative; margin-bottom: 10px; }
.ed-block textarea, .ed-block input[type="text"] {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 86px 10px 12px; color: var(--ink); font: inherit; resize: vertical;
}
.ed-block img { max-width: 100%; border-radius: 10px; display: block; margin-bottom: 6px; }
.ed-yt { border: 1px solid var(--line); border-radius: 10px; padding: 12px; color: var(--ink-dim); font-size: 13px; background: var(--bg); }
.ed-x {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--bg-raised);
  color: var(--ink-faint); cursor: pointer; font-size: 11px;
}
.ed-format {
  display: flex; gap: 5px; align-items: center; flex-wrap: wrap;
  padding: 8px 10px; margin-bottom: 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  position: sticky; top: 0; z-index: 3;
}
.ed-format button {
  min-width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg-raised); color: var(--ink); cursor: pointer; font-size: 13px;
}
.ed-format button:hover { border-color: var(--accent); }
.ed-color { background: var(--c) !important; }
.ed-fmt-hint { margin-left: auto; font-size: 10.5px; color: var(--ink-faint); }
.ed-imgbar { display: flex; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.ed-ctl { display: inline-flex; gap: 3px; border: 1px solid var(--line); border-radius: 8px; padding: 3px; background: var(--bg); }
.ed-ctl button {
  min-width: 28px; height: 26px; border: none; border-radius: 6px;
  background: transparent; color: var(--ink-dim); cursor: pointer; font-size: 12px;
}
.ed-ctl button.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.ed-rowctl {
  position: absolute; top: 4px; right: 4px; display: flex; gap: 3px;
  background: color-mix(in srgb, var(--bg-raised) 88%, transparent);
  border: 1px solid var(--line); border-radius: 8px; padding: 2px;
}
.ed-rowctl button {
  width: 24px; height: 24px; border: none; border-radius: 6px;
  background: transparent; color: var(--ink-faint); cursor: pointer; font-size: 12px;
}
.ed-rowctl button:hover { background: var(--bg-hover); color: var(--ink); }
.ed-rowctl .ed-x2:hover { color: var(--live); }
.ed-block.ed-focused { outline: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 10px; }
.ed-block img { max-width: 55%; }
.ed-imghint {
  font-size: 11px; color: var(--accent); background: var(--accent-soft);
  border-radius: 7px; padding: 5px 10px; margin-bottom: 8px;
}
.ed-previewbox { margin: 4px 0 12px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); }
.ed-pvnote {
  text-align: center; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.ed-drag { cursor: grab; }
.ed-block.dragging { opacity: 0.4; }
.ed-tools { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.ed-tools button {
  border: 1px dashed var(--line); background: transparent; color: var(--ink-dim);
  border-radius: 999px; padding: 6px 13px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.ed-tools button:hover { color: var(--accent); border-color: var(--accent); }
.ed-search { position: relative; margin-bottom: 12px; }
.ed-search input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; color: var(--ink); font: inherit;
}
#ed-results { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
#ed-results button {
  text-align: left; border: 1px solid var(--line); background: var(--bg);
  color: var(--ink); border-radius: 8px; padding: 8px 12px; cursor: pointer; font: inherit;
}
#ed-results button:hover { border-color: var(--accent); }
.ed-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ed-item-main { flex: 1; }
.ed-item-main small { color: var(--ink-faint); }
.ed-item-main input {
  width: 100%; margin-top: 6px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; color: var(--ink); font-size: 12.5px;
}
.ed-item-btns { display: flex; gap: 4px; }
.ed-item-btns button {
  width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--ink-dim); cursor: pointer;
}
.ed-publish { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.ed-hint { font-size: 11px; color: var(--ink-faint); }

/* ---------- modal loading & error states ---------- */
.mload { text-align: center; padding: 46px 24px 40px; color: var(--ink-faint); }
.mload p { margin-top: 14px; }
.mspin {
  width: 42px; height: 42px; margin: 0 auto;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: mspin 0.9s linear infinite;
}
@keyframes mspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mspin { animation: none; border-top-color: var(--line); } }
#modal-retry { margin-top: 14px; }

/* ---------- Discover: hot member takes ---------- */
.hq-card {
  flex: none; width: 260px; display: flex; gap: 12px; align-items: stretch;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-hover) 55%, var(--bg-raised)), var(--bg-raised) 45%);
  cursor: pointer; text-align: left; padding: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 14px rgba(0, 0, 0, 0.2);
}
.hq-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.hq-thumb { flex: none; width: 64px; background: var(--bg-hover) center/cover; display: grid; place-items: center; font-size: 20px; }
.hq-body { flex: 1; min-width: 0; padding: 10px 12px 10px 0; display: flex; flex-direction: column; gap: 3px; }
.hq-card .hq-body { padding-left: 12px; }
.hq-thumb + .hq-body { padding-left: 0; }
.hq-flair {
  font-size: 9px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--crimson-hi);
}
.hq-title {
  font-family: Georgia, serif; font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hq-by { font-size: 11px; color: var(--ink-faint); }
.celeb-card { width: 92px; }

/* Discover: celeb & entertainment news cards */
.news-card {
  flex: none; width: 252px; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--bg-raised); text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.news-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.news-img {
  height: 118px; background: var(--bg-hover) center/cover;
  display: grid; place-items: center; font-size: 26px;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.news-card:hover .news-img { transform: scale(1.05); }
.news-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.news-src {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--crimson-hi);
}
.news-title {
  font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-time { font-size: 11px; color: var(--ink-faint); margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .news-card, .news-img { transition: none; } }

/* ---------- motion layer: 2026 polish (fully disabled for reduced-motion) ---------- */
.reveal { opacity: 0; transform: translateY(16px) scale(0.985); transition: opacity 0.55s ease-out, transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }
/* gold shimmer sweep on interactive pills & primary buttons */
.btn.primary, .mobile-nav button, .qtab, .room-tab, .qsort {
  position: relative; overflow: hidden;
}
.btn.primary::after, .mobile-nav button.active::after, .qtab.active::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
.btn.primary:hover::after, .mobile-nav button.active:hover::after, .qtab.active:hover::after {
  transition: transform 0.7s ease;
  transform: translateX(120%);
}
/* living gold headings */
.greet h1, .section-head h2 {
  background-size: 200% 100%;
  animation: goldflow 7s ease-in-out infinite alternate;
}
@keyframes goldflow { from { background-position: 0% 0; } to { background-position: 100% 0; } }
/* poster breathe on hover */
.card .poster, .spot, .thumb, .hq-thumb, .cast-photo, .pwork-poster, .qthumb {
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.card:hover .poster { transform: scale(1.05); }
.pwork:hover .pwork-poster, .cast-card:hover .cast-photo { transform: scale(1.06); }
.qcard:hover .qthumb { transform: scale(1.04) rotate(0.5deg); }
.card, .trailer, .spot, .qcard { will-change: transform; }
.card .poster, .thumb, .hq-thumb { transform-origin: center; }
.card, .trailer { overflow: hidden; }
/* nav hover glide */
.nav a, .rail-list-item, .member-post { transition: background 0.2s ease, transform 0.2s ease; }
.nav a:hover, .rail-list-item:hover { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .greet h1, .section-head h2 { animation: none; }
  .btn.primary::after, .mobile-nav button.active::after, .qtab.active::after { display: none; }
  .card .poster, .spot, .thumb, .hq-thumb, .cast-photo, .pwork-poster, .qthumb,
  .nav a, .rail-list-item, .member-post { transition: none; transform: none !important; }
}

/* ---------- movie page extras: cast, providers, trivia, charts ---------- */
.msect { font-size: 16px; margin: 20px 0 10px; }
.msub { font-size: 11px; color: var(--ink-faint); font-family: "Segoe UI", sans-serif; font-weight: 400; }
.cast-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.cast-card {
  flex: none; width: 86px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); cursor: pointer; padding: 0 0 8px; text-align: center; overflow: hidden;
}
.cast-card:hover { border-color: var(--accent); }
.cast-photo { display: block; aspect-ratio: 2 / 3; background: var(--bg-hover) center/cover; margin-bottom: 6px; font-size: 22px; line-height: 3.2; }
.cast-n { display: block; font-size: 11px; font-weight: 700; color: var(--ink); padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cast-c { display: block; font-size: 10px; color: var(--ink-faint); padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prov-rows { display: flex; flex-direction: column; gap: 8px; }
.prov-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prov-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); width: 52px; }
.prov-logo { width: 34px; height: 34px; border-radius: 8px; }
.tr-form { display: flex; gap: 8px; margin-top: 12px; }
.tr-form select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 6px 8px; font: inherit; }
.tr-form input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; color: var(--ink); font: inherit; }
.tr-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.tr-row:last-child { border-bottom: none; }
.tr-ic { flex: none; }
.tr-body { flex: 1; color: var(--ink-dim); font-size: 13px; }
.tr-by { font-size: 11px; color: var(--ink-faint); margin-left: 6px; }
.tr-by a { color: var(--ink-faint); }
.chart-rank {
  position: absolute; top: 8px; left: 8px;
  font-family: Georgia, serif; font-weight: 700; font-size: 15px;
  background: linear-gradient(135deg, var(--gold-hi), var(--accent)); color: var(--accent-ink);
  border-radius: 8px; padding: 2px 9px;
}
.card .poster { position: relative; }
.member-av { width: 74px; height: 74px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 30px; font-weight: 700; color: #fff; }
.role-badge { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); border-radius: 999px; padding: 3px 10px; vertical-align: middle; font-family: "Segoe UI", sans-serif; }
.member-posts { display: flex; flex-direction: column; gap: 4px; }
.member-post { display: flex; gap: 6px; align-items: baseline; color: var(--ink); text-decoration: none; padding: 7px 10px; border-radius: 8px; font-weight: 600; font-size: 13.5px; }
.member-post:hover { background: var(--bg-hover); }
.member-post span { margin-left: auto; color: var(--ink-faint); font-size: 11.5px; font-weight: 400; }
.qby a, .qc-who a { color: inherit; text-decoration: none; }
.qby a:hover, .qc-who a:hover { color: var(--accent); }

/* ---------- browse filters ---------- */
.filters { display: none; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.filters select {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); padding: 7px 12px; font: inherit; font-size: 12.5px;
}
#filter-toggle { margin-left: auto; font-size: 12px; padding: 6px 14px; }
#filter-toggle.f-on { border-color: var(--accent); color: var(--accent); }

/* ---------- votes, sorting, flairs ---------- */
.q-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.qsorts { display: flex; gap: 6px; }
.qsort {
  font-size: 12px; font-weight: 600; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px;
  background: transparent; cursor: pointer;
}
.qsort.active { border-color: var(--crimson-hi); color: var(--crimson-hi); background: color-mix(in srgb, var(--crimson) 10%, transparent); font-weight: 700; }
#q-industry {
  margin-left: auto; background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: 999px; color: var(--ink); padding: 6px 12px; font: inherit; font-size: 12px;
}
.qcard.has-votes { display: flex; overflow: visible; }
.qcard.has-votes .qmain { flex: 1; min-width: 0; overflow: hidden; border-radius: 0 var(--radius) var(--radius) 0; }
.qcard.has-votes .qcover { border-radius: 0 var(--radius) 0 0; }
.vote-rail {
  flex: none; width: 44px; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start; gap: 2px;
  padding: 12px 0; background: color-mix(in srgb, var(--bg) 60%, var(--bg-raised));
  border-right: 1px solid var(--line); border-radius: var(--radius) 0 0 var(--radius);
}
.vote-rail button {
  border: none; background: transparent; color: var(--ink-faint);
  font-size: 15px; cursor: pointer; padding: 2px 8px; border-radius: 6px; line-height: 1;
}
.vote-rail button:hover { color: var(--ink); background: var(--bg-hover); }
.vote-rail .v-up.on { color: var(--accent); }
.vote-rail .v-down.on { color: var(--crimson-hi); }
.vote-rail .v-score { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vote-rail.big { border: 1px solid var(--line); border-radius: 10px; padding: 8px 0; width: 46px; }
.qpost-head { display: flex; gap: 14px; align-items: flex-start; }
.qcat.f-hot { background: linear-gradient(135deg, #e05a2b, var(--crimson)); }
.qcat.f-spoiler { background: #6b21a8; }
.qcat.f-disc { background: #2563a8; }
.qcat.f-news { background: #3f6212; }
.qind {
  display: inline-block; font-size: 10px; font-weight: 700;
  border: 1px solid var(--line); color: var(--ink-faint);
  border-radius: 999px; padding: 1px 9px; margin-left: 6px;
}

/* magazine-style feed rows */
.qrow { display: flex; gap: 16px; padding: 14px 16px; align-items: stretch; }
.qrow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qrow-body h3 { margin: 6px 0 3px; font-size: 17.5px; }
.qrow-body .qexcerpt { flex: 1; }
.qrow-body .qmeta { margin-top: 10px; }
.qtags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.qtags .qcat { position: static; }
.qtags .qind { margin-left: 0; }
.qthumb {
  flex: none; width: 96px; border-radius: 8px; align-self: center;
  aspect-ratio: 2 / 2.7;
  background: var(--bg-hover) center/cover;
  border: 1px solid var(--line);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}
@media (max-width: 480px) { .qthumb { width: 78px; } }
.room-add { color: var(--accent) !important; border-style: dashed !important; }
.qc-edit {
  border: none; background: transparent; color: var(--ink-faint);
  font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 2px 6px; border-radius: 5px;
}
.qc-edit:hover { color: var(--accent); background: var(--bg-hover); }
.qc-editbox { margin-top: 4px; }

/* threaded replies */
.qc-nest { margin-left: 20px; padding-left: 12px; border-left: 2px solid color-mix(in srgb, var(--accent) 25%, var(--line)); }
.qc-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.qc-voter { display: inline-flex; align-items: center; gap: 4px; }
.qcv {
  border: none; background: transparent; color: var(--ink-faint);
  font-size: 12px; cursor: pointer; padding: 2px 5px; border-radius: 5px; line-height: 1;
}
.qcv:hover { background: var(--bg-hover); color: var(--ink); }
.qcv.on[data-v="1"] { color: var(--accent); }
.qcv.on[data-v="-1"] { color: var(--crimson-hi); }
.qc-score { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.qc-reply, .qc-del2 {
  border: none; background: transparent; color: var(--ink-faint);
  font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 2px 6px; border-radius: 5px;
}
.qc-reply:hover { color: var(--accent); background: var(--bg-hover); }
.qc-del2:hover { color: var(--live); }
.qc-replybox { margin-top: 8px; }
.qc-replybox .qc-form { margin-top: 0; }
.ed-selects { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------- post discussion ---------- */
.qcomments { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.qcomments h3 { margin: 0 0 12px; font-size: 17px; }
.qc-count { color: var(--ink-faint); font-size: 13px; font-family: "Segoe UI", sans-serif; }
.qc-empty { color: var(--ink-faint); font-size: 13px; font-style: italic; }
.qc-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.qc-row:last-child { border-bottom: none; }
.qc-body { flex: 1; min-width: 0; }
.qc-who { font-size: 12px; font-weight: 700; }
.qc-who span { color: var(--ink-faint); font-weight: 400; margin-left: 6px; font-size: 11px; }
.qc-text { color: var(--ink-dim); overflow-wrap: anywhere; }
.qc-del {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-faint);
  border-radius: 50%; width: 24px; height: 24px; font-size: 10px; cursor: pointer; flex: none;
}
.qc-del:hover { color: var(--live); border-color: var(--live); }
.qc-form { display: flex; gap: 8px; margin-top: 14px; }
.qc-form input {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 16px; color: var(--ink); font: inherit;
}

/* ---------- auth modal ---------- */
.modal.auth { width: min(420px, 100%); }
.auth-sub { color: var(--ink-dim); margin: 2px 0 16px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
#auth-form { display: flex; flex-direction: column; gap: 14px; }
#auth-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-dim); }
#auth-form input {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; color: var(--ink); font: inherit;
}
#auth-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-error {
  font-size: 13px; color: var(--live);
  border: 1px solid color-mix(in srgb, var(--live) 40%, transparent);
  background: color-mix(in srgb, var(--live) 10%, transparent);
  border-radius: 8px; padding: 9px 12px;
}
#auth-form .btn { align-self: stretch; padding: 11px; }

/* ---------- footer ---------- */
.foot {
  grid-column: 1 / -1; text-align: center; font-size: 12px; color: var(--ink-faint);
  padding: 14px; border-top: 1px solid var(--line);
}

/* ---------- grouped industry nav (sidebar) ---------- */
.nav-group .nav-sub { display: none; flex-direction: column; padding-left: 16px; }
.nav-group:hover .nav-sub, .nav-group.open .nav-sub, .nav-group.has-active .nav-sub { display: flex; }
.nav-glabel .chev { margin-left: auto; font-size: 10px; color: var(--ink-faint); transition: transform 0.15s ease; }
.nav-group:hover .chev, .nav-group.open .chev, .nav-group.has-active .chev { transform: rotate(90deg); color: var(--accent); }
.nav-group.has-active .nav-glabel { color: var(--ink); font-weight: 700; }
.nav-sub a { font-size: 13px; padding: 6px 12px; }

/* ---------- mobile navigation ---------- */
.mobile-nav {
  grid-column: 1 / -1;
  display: none; gap: 8px; overflow-x: auto;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-raised) 82%, transparent);
  backdrop-filter: blur(12px);
  position: sticky; top: 59px; z-index: 19;
  scrollbar-width: none;
}
.mobile-nav::-webkit-scrollbar { display: none; }
.mobile-nav button {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  background: transparent; cursor: pointer; white-space: nowrap;
}
.mobile-nav button.active {
  background: linear-gradient(135deg, var(--gold-hi), var(--accent) 60%, var(--gold-lo));
  border-color: transparent; color: var(--accent-ink); font-weight: 700;
}
.mobile-subnav {
  grid-column: 1 / -1;
  display: none; gap: 8px; overflow-x: auto;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-hover) 70%, var(--bg-raised));
  position: sticky; top: 103px; z-index: 18;
  scrollbar-width: none;
}
.mobile-subnav::-webkit-scrollbar { display: none; }
.mobile-subnav button {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px;
  background: var(--bg); cursor: pointer; white-space: nowrap;
}
.mobile-subnav button.active {
  background: linear-gradient(135deg, var(--gold-hi), var(--accent) 60%, var(--gold-lo));
  border-color: transparent; color: var(--accent-ink); font-weight: 700;
}
@media (min-width: 721px) { .mobile-subnav { display: none !important; } }

/* chat close button (stacked layouts only) */
.chat-close { display: none; margin-left: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-faint); border-radius: 50%; width: 26px; height: 26px; cursor: pointer; font-size: 11px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .app { grid-template-columns: 200px 1fr; }
  .rail { grid-column: 1 / -1; border-left: none; border-top: 1px solid var(--line); position: static; max-height: none; overflow: visible; }
  .rail-lists { border-bottom: 1px solid var(--line); }
  /* chat hidden until the Chat tab is tapped */
  .chat { display: none; max-height: 500px; }
  body.chat-open .chat { display: flex; }
  body.chat-open .chat-close { display: block; }
}
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobile-nav { display: flex; }
  .search { display: none; }
  .topbar.search-open .search {
    display: flex;
    position: fixed; top: 57px; left: 0; right: 0; z-index: 21;
    max-width: none; margin: 0; border-radius: 0;
    padding: 12px 16px;
    background: var(--bg-raised);
    border: none; border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
  .main { padding: 20px 16px; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .btn { padding: 7px 13px; font-size: 12px; }
}
