/* ============================================================
   aiStream
   ============================================================ */

:root {
  --ink: #08080a;
  --ink-1: #0c0c0f;
  --ink-2: #121217;
  --ink-3: #1a1a21;
  --paper: #f3efe6;
  --paper-2: #d9d4c9;
  --dim: rgba(243, 239, 230, 0.6);
  --muted: #8d8a84;
  --line: rgba(243, 239, 230, 0.1);
  --line-strong: rgba(243, 239, 230, 0.2);
  --accent: #ff4a1c;
  --accent-soft: rgba(255, 74, 28, 0.13);
  --ok: #b6e34a;
  --radius: 10px;
  --pad: clamp(18px, 4.4vw, 64px);
  --header: 74px;
  --serif: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
  /* height of the admin announcement banner, kept in sync by js/app.js */
  --bc-h: 0px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  background: var(--ink);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-watching { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
svg { width: 100%; height: 100%; display: block; }

::selection { background: var(--accent); color: #0a0a0b; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #26262e; border: 3px solid var(--ink); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #34343e; }

.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------- top bar ---------------- */

.topbar {
  position: fixed;
  z-index: 90;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header);
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 46px);
  padding: 0 var(--pad);
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(8, 8, 10, 0.72), rgba(8, 8, 10, 0) 100%);
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}

.topbar.is-stuck {
  background: rgba(8, 8, 10, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}

body.is-watching .topbar,
body.is-watching .footer { display: none; }

.brand { display: flex; align-items: center; gap: 10px; }

.brand__mark {
  width: 0;
  height: 0;
  border-left: 13px solid var(--accent);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  filter: drop-shadow(0 0 12px rgba(255, 74, 28, 0.35));
  transition: transform 0.25s ease;
}
.brand:hover .brand__mark { transform: translateX(2px); }
.brand__mark--sm { border-left-width: 10px; border-top-width: 6px; border-bottom-width: 6px; }

.brand__word {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}
.brand__word span { font-weight: 500; color: var(--paper-2); }

.brand__tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(255, 74, 28, 0.4);
  border-radius: 3px;
  padding: 2px 5px;
  margin-left: 2px;
  transform: translateY(-1px);
}

.nav { display: flex; align-items: center; gap: 26px; margin-left: 8px; }

.nav a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--dim);
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav a:hover, .nav a.is-active { color: var(--paper); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transition: right 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav a.is-active::after, .nav a:hover::after { right: 0; }

.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

/* hamburger — hidden on desktop, the nav drops down as a panel on phones */
.navtoggle {
  display: none;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 8, 10, 0.32);
  color: var(--paper);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.navtoggle:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.navtoggle svg { width: 16px; height: 16px; }

.searchbtn {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(8, 8, 10, 0.32);
  backdrop-filter: blur(6px);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.searchbtn svg { width: 15px; height: 15px; }
.searchbtn span { font-size: 13px; }
.searchbtn kbd {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
}
.searchbtn:hover { color: var(--paper); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.03); }

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink-3);
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--paper);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.avatar:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 22px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.16s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:active { transform: translateY(1px); }

.btn--solid { background: var(--accent); color: #0a0a0b; }
.btn--solid:hover { background: #ff5c33; }

.btn--ghost { border: 1px solid var(--line-strong); color: var(--paper); background: rgba(255, 255, 255, 0.02); }
.btn--ghost:hover { border-color: var(--paper); background: rgba(255, 255, 255, 0.06); }

.btn--icon { width: 44px; padding: 0; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--solid .spinner-inline { width: 14px; height: 14px; border-color: rgba(10, 10, 11, 0.25); border-top-color: #0a0a0b; }

.iconbtn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--paper);
  opacity: 0.85;
  transition: background 0.18s ease, opacity 0.18s ease;
}
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn:hover { background: rgba(255, 255, 255, 0.1); opacity: 1; }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  min-height: min(80vh, 760px);
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header) + 40px) var(--pad) clamp(40px, 7vh, 78px);
  isolation: isolate;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-size: cover;
  background-position: center 28%;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 9s ease;
}
.hero.is-swapping .hero__bg { opacity: 0; }

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(8, 8, 10, 0.97) 0%, rgba(8, 8, 10, 0.78) 34%, rgba(8, 8, 10, 0.16) 68%, rgba(8, 8, 10, 0.45) 100%),
    linear-gradient(0deg, var(--ink) 2%, rgba(8, 8, 10, 0.25) 46%, rgba(8, 8, 10, 0.55) 100%);
}

.hero__inner { max-width: 720px; animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-2);
  margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.eyebrow b { color: var(--accent); font-weight: 500; }

.hero__title {
  font-family: var(--serif);
  font-size: clamp(42px, 6.4vw, 86px);
  font-weight: 800;
  line-height: 0.93;
  letter-spacing: -0.045em;
  margin: 0 0 20px;
  max-width: 16ch;
  text-wrap: balance;
}

.hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}
.hero__meta .score { color: var(--ok); }
.hero__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

.hero__synopsis {
  max-width: 55ch;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 30px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__index {
  position: absolute;
  right: var(--pad);
  bottom: clamp(40px, 7vh, 78px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-2);
}
.hero__index b { color: var(--accent); font-weight: 500; }
.hero__ticks { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.hero__tick {
  width: 22px;
  height: 2px;
  background: rgba(243, 239, 230, 0.22);
  transition: width 0.3s ease, background 0.3s ease;
}
.hero__tick.is-on { width: 46px; background: var(--accent); }

/* ---------------- rows ---------------- */

.rows { padding: 0 var(--pad) 40px; margin-top: -10px; }

.row { margin-bottom: clamp(34px, 5vw, 58px); }

.row__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}

.row__idx {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--accent);
  transform: translateY(-2px);
}

.row__title {
  font-family: var(--serif);
  font-size: clamp(19px, 1.7vw, 23px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
}

.row__more {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color 0.2s ease;
}
.row__more:hover { color: var(--accent); }

.row__wrap { position: relative; }

.row__track {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 4px 0 12px;
  margin: -4px 0 -12px;
}
.row__track::-webkit-scrollbar { display: none; }

.row__arrow {
  position: absolute;
  top: 34%;
  z-index: 4;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(12, 12, 15, 0.9);
  border: 1px solid var(--line-strong);
  color: var(--paper);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(8px);
}
.row__arrow svg { width: 16px; height: 16px; }
.row__arrow--l { left: -14px; }
.row__arrow--r { right: -14px; }
.row__wrap:hover .row__arrow { opacity: 1; }
.row__arrow:hover { background: var(--accent); color: #0a0a0b; border-color: var(--accent); }

/* ---------------- card ---------------- */

.card {
  position: relative;
  flex: 0 0 auto;
  width: 166px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.grid .card { width: auto; }

.card:hover { transform: translateY(-6px); }

.card__art {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
}
.card:hover .card__art img { transform: scale(1.05); filter: brightness(0.78); }

.card__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 8, 10, 0.7) 0%, transparent 38%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card:hover .card__art::after { opacity: 1; }

.card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 3px;
  background: rgba(8, 8, 10, 0.82);
  color: var(--paper);
  backdrop-filter: blur(4px);
}
.card__badge--score { color: var(--ok); }

.card__play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 50%;
  background: var(--accent);
  color: #0a0a0b;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card__play svg { width: 16px; height: 16px; margin-left: 2px; }
.card:hover .card__play { opacity: 1; transform: scale(1); }

.card__title {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}
.card:hover .card__title { color: var(--accent); }

.card__meta {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
}

.card--wide { width: 264px; }
.card--wide .card__art { aspect-ratio: 16 / 9; }

/* progress stripe on continue-watching cards */
.card__progress {
  position: absolute;
  z-index: 3;
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 2px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  overflow: hidden;
}
.card__progress i { display: block; height: 100%; background: var(--accent); }

/* ---------------- browse ---------------- */

.pagehead {
  padding: calc(var(--header) + 46px) var(--pad) 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.pagehead h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 10px 0 0;
}

.pagehead p { margin: 8px 0 0; color: var(--muted); font-size: 14px; max-width: 46ch; }

.filters {
  position: sticky;
  top: var(--header);
  z-index: 40;
  padding: 14px var(--pad);
  background: rgba(8, 8, 10, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.filters__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease;
}
.field:focus-within { border-color: var(--accent); }
.field svg { width: 14px; height: 14px; color: var(--muted); flex: 0 0 auto; }

.field input {
  background: none;
  border: 0;
  color: var(--paper);
  font-size: 13.5px;
  outline: none;
  width: 200px;
}
.field input::placeholder { color: var(--muted); }

.select {
  position: relative;
  display: flex;
  align-items: center;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0 30px 0 12px;
  transition: border-color 0.2s ease;
}
.select:hover { border-color: var(--line-strong); }
.select select {
  appearance: none;
  background: none;
  border: 0;
  color: var(--paper);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  min-width: 92px;
}
.select select option { background: var(--ink-2); color: var(--paper); }
.select::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }

.chip {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 12px;
  color: var(--dim);
  transition: all 0.18s ease;
}
.chip:hover { border-color: var(--line-strong); color: var(--paper); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #0a0a0b; font-weight: 600; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: clamp(16px, 2.4vw, 26px) clamp(12px, 1.6vw, 20px);
  padding: 30px var(--pad) 10px;
}

.resultcount {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 22px var(--pad) 0;
}

.loadmore { display: flex; justify-content: center; padding: 40px 0 70px; }

.empty {
  padding: 90px var(--pad);
  text-align: center;
  color: var(--muted);
}
.empty h2 { font-family: var(--serif); color: var(--paper); font-size: 26px; letter-spacing: -0.03em; margin: 0 0 8px; }

/* ---------------- detail ---------------- */

.detail__banner {
  position: relative;
  height: min(46vh, 430px);
  background-size: cover;
  background-position: center 30%;
}
.detail__banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--ink) 2%, rgba(8, 8, 10, 0.45) 60%, rgba(8, 8, 10, 0.65) 100%);
}

.detail {
  position: relative;
  z-index: 2;
  margin-top: clamp(-190px, -18vh, -120px);
  padding: 0 var(--pad) 30px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(22px, 3.4vw, 46px);
}

.detail__poster {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  background: var(--ink-2);
  aspect-ratio: 2 / 3;
}
.detail__poster img { width: 100%; height: 100%; object-fit: cover; }

.detail__info { padding-top: clamp(10px, 5vh, 56px); min-width: 0; }

.detail__title {
  font-family: var(--serif);
  font-size: clamp(30px, 4.4vw, 56px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 0 0 8px;
  text-wrap: balance;
}

.detail__alt { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }

.detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 20px;
}
.detail__meta .pill {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.detail__meta .score { color: var(--ok); border-color: rgba(182, 227, 74, 0.35); }

.genres { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.genre {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--paper-2);
  transition: all 0.18s ease;
}
a.genre:hover { border-color: var(--accent); color: var(--accent); }

.synopsis {
  color: var(--dim);
  font-size: 15px;
  line-height: 1.68;
  max-width: 72ch;
  margin: 0 0 14px;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.synopsis.is-open { -webkit-line-clamp: unset; display: block; }
.morelink {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.detail__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }

/* rating — feeds the profile "avg score" stat */
.ratebar { display: flex; align-items: center; gap: 12px; margin: -6px 0 22px; flex-wrap: wrap; }
.ratebar[hidden] { display: none; }
.ratebar__t { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ratebar__stars { display: flex; gap: 3px; }
.ratestar {
  background: none;
  border: 0;
  padding: 1px 2px;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  color: #3d4149;
  transition: color .15s ease, transform .15s ease;
}
.ratestar:hover { transform: translateY(-2px) scale(1.08); color: #6b7080; }
.ratestar.is-on { color: var(--ok); }
.ratestar.is-on:hover { color: var(--ok); }
.ratestar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ratebar__clr {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 7px;
  transition: color .15s ease, background .15s ease;
}
.ratebar__clr:hover { color: var(--accent); background: rgba(255, 255, 255, .06); }
.ratebar__clr[hidden] { display: none; }

.detail__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px 26px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  max-width: 720px;
}
.fact span { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.fact b { font-weight: 500; font-size: 13.5px; color: var(--paper-2); }

/* episodes */

.episodes { padding: 30px var(--pad) 20px; }

.ep-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.ep-head h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0;
}
.ep-count { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

.seg {
  margin-left: auto;
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.seg button {
  height: 30px;
  padding: 0 13px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--muted);
  transition: all 0.18s ease;
}
.seg button.is-on { background: var(--paper); color: var(--ink); font-weight: 600; }
.seg button:disabled { opacity: 0.35; cursor: not-allowed; }

.providers {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 94%, transparent);
}
.providers::-webkit-scrollbar { display: none; }

.provider {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--dim);
  transition: all 0.18s ease;
}
.provider small { font-family: var(--mono); font-size: 9.5px; color: var(--muted); letter-spacing: 0.06em; }
.provider:hover { border-color: var(--line-strong); color: var(--paper); }
.provider.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--paper); }
.provider.is-on small { color: var(--accent); }
.provider.is-dead { opacity: 0.45; }

.eplist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.ep {
  position: relative;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--paper-2);
  transition: all 0.16s ease;
  background: rgba(255, 255, 255, 0.015);
}
.ep:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.ep.is-watched { color: var(--muted); border-color: rgba(243, 239, 230, 0.06); }
.ep.is-watched::after {
  content: "";
  position: absolute;
  bottom: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ok);
}
.ep.is-current { border-color: var(--accent); background: var(--accent); color: #0a0a0b; font-weight: 600; }
.ep.is-current::after { background: #0a0a0b; }

.ep-empty {
  padding: 34px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.ep-loading { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }

/* ---------------- watch / player ---------------- */

.player {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
  background: #000;
}

.player__stage {
  position: relative;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player video::cue {
  font-family: var(--sans);
  font-size: 1.35rem;
  line-height: 1.35;
  color: #fff;
  background: rgba(6, 6, 8, 0.72);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.player__spinner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.player__spinner span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.player__bigplay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.18);
  transition: opacity 0.2s ease;
}
.player__bigplay svg { width: 74px; height: 74px; color: var(--paper); filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.6)); }

.player__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  padding-top: calc(18px + env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent);
  z-index: 5;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.player.is-active .player__top { opacity: 1; transform: none; }

.player__title { min-width: 0; }
.player__title b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__title span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }

.player__topright { margin-left: auto; display: flex; gap: 4px; }

.player__chrome {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 60px 20px 14px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 10%, rgba(0, 0, 0, 0.45) 62%, transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.player.is-active .player__chrome { opacity: 1; transform: none; pointer-events: auto; }

.skip {
  position: absolute;
  right: 22px;
  bottom: 118px;
  height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.skip:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.seek { position: relative; height: 28px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek:focus-visible { outline: none; }
.seek:focus-visible .seek__track { box-shadow: 0 0 0 2px rgba(255, 74, 28, 0.55); }
.seek__track { position: relative; width: 100%; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.22); overflow: hidden; transition: height 0.12s ease; }
.seek__buffer { position: absolute; inset: 0 auto 0 0; width: 0%; background: rgba(255, 255, 255, 0.3); }
.seek__played { position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--accent); will-change: width; }
.seek__thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 74, 28, 0.18);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.15s ease, transform 0.12s ease;
  pointer-events: none;
  will-change: left, transform;
}
.seek:hover .seek__thumb, .seek.is-drag .seek__thumb, .seek:focus-visible .seek__thumb { opacity: 1; transform: scale(1); }
.seek.is-drag .seek__thumb { transform: scale(1.22); }
.seek.is-drag .seek__track { height: 6px; }
.seek__tip {
  position: absolute;
  bottom: 30px;
  transform: translateX(-50%);
  background: var(--ink-3);
  border: 1px solid var(--line);
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
  color: var(--paper);
  pointer-events: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.seek__tip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  background: var(--ink-3);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}

.player__seekflash {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.player__seekflash span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 8, 10, 0.68);
  backdrop-filter: blur(8px);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: scale(0.9);
}
.player__seekflash.is-back { justify-content: flex-start; padding-left: 13%; }
.player__seekflash.is-fwd { justify-content: flex-end; padding-right: 13%; }
.player__seekflash.is-on span { animation: seekflash 0.62s ease both; }
@keyframes seekflash {
  0% { opacity: 0; transform: scale(0.88); }
  16% { opacity: 1; transform: scale(1); }
  68% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.04); }
}

#vol-slash { opacity: 0; transition: opacity 0.15s ease; }
#vol-wave { transition: opacity 0.15s ease; }
#btn-mute.is-muted #vol-slash { opacity: 1; }
#btn-mute.is-muted #vol-wave { opacity: 0; }

.controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.controls__left, .controls__right { display: flex; align-items: center; gap: 2px; }
.controls .iconbtn { width: 36px; height: 36px; color: #f3efe6; }
.controls .iconbtn svg { width: 19px; height: 19px; }
.controls .iconbtn:hover { background: rgba(255, 255, 255, 0.12); }
.controls .iconbtn.is-on { color: var(--accent); }
.controls .iconbtn.is-on svg { filter: drop-shadow(0 0 8px rgba(255, 74, 28, 0.55)); }

.time { font-family: var(--mono); font-size: 11px; color: var(--paper-2); margin-left: 10px; letter-spacing: 0.04em; }
.time em { font-style: normal; color: rgba(243, 239, 230, 0.35); margin: 0 3px; }

.volume { display: flex; align-items: center; }
.volume__range {
  width: 0;
  opacity: 0;
  transition: width 0.25s ease, opacity 0.25s ease;
  appearance: none;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
  outline: none;
  cursor: pointer;
}
.volume:hover .volume__range, .volume__range:focus-visible { width: 74px; opacity: 1; margin: 0 6px; }
.volume__range::-webkit-slider-thumb { appearance: none; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); }
.volume__range::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--paper); }

.player__menus { position: absolute; inset: 0; z-index: 8; pointer-events: none; }

.pop {
  position: absolute;
  right: 18px;
  bottom: 76px;
  min-width: 214px;
  max-width: min(360px, calc(100vw - 36px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px;
  border-radius: 10px;
  background: rgba(16, 16, 20, 0.96);
  border: 1px solid var(--line-strong);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  animation: pop 0.14s ease both;
  scrollbar-width: thin;
}
.pop__label { padding: 7px 10px 5px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pop__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--paper-2);
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.pop__item:hover { background: rgba(255, 255, 255, 0.07); color: var(--paper); }
.pop__item.is-on { color: var(--accent); }
.pop__item small { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.pop__sep { height: 1px; background: var(--line); margin: 5px 4px; }

.player__error {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 30px;
  background: rgba(8, 8, 10, 0.88);
  backdrop-filter: blur(6px);
}
.player__error p { color: var(--accent); margin: 0; }
.player__error h3 { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: -0.03em; margin: 6px 0 18px; max-width: 46ch; }
.player__error-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* watch sidebar */

.watchside {
  background: var(--ink-1);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.watchside__head { position: relative; padding: 20px 50px 16px 20px; border-bottom: 1px solid var(--line); }
.watchside__kicker { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.watchside__title { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; margin: 0 0 4px; }
.watchside__sub { font-size: 12.5px; color: var(--dim); }

.watchside__switches { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pillbtn {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease;
}
.pillbtn:hover { border-color: var(--line-strong); color: var(--paper); }
.pillbtn.is-on { border-color: var(--accent); color: var(--accent); }
.pillbtn svg { width: 12px; height: 12px; }

.watchside__scroll { overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; padding: 12px; }

.watchside__group { margin-bottom: 14px; }
.watchside__label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 8px; }

.sideep {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px;
  border-radius: 8px;
  text-align: left;
  transition: background 0.16s ease;
}
.sideep:hover { background: rgba(255, 255, 255, 0.05); }
.sideep.is-on { background: var(--accent-soft); }
.sideep__thumb {
  width: 74px;
  height: 42px;
  border-radius: 5px;
  background: var(--ink-3) center/cover;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
}
.sideep__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}
.sideep.is-on .sideep__thumb::after { background: rgba(255, 74, 28, 0.22); }
.sideep__num { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; color: var(--paper); }
.sideep__text { min-width: 0; }
.sideep__text b { display: block; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sideep__text span { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sideep.is-on .sideep__text b { color: var(--accent); }

.watchside__foot { padding: 12px 16px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.watchside__foot .btn { flex: 1; height: 38px; font-size: 12.5px; }

.watchside__close { display: grid; position: absolute; top: 12px; right: 12px; z-index: 2; }
#btn-sheet { display: grid; }

@media (min-width: 981px) {
  .player.side-collapsed { grid-template-columns: minmax(0, 1fr); }
  .player.side-collapsed .watchside { display: none; }
}

/* ---------------- search palette ---------------- */

.palette { position: fixed; inset: 0; z-index: 300; }
.palette__scrim { position: absolute; inset: 0; background: rgba(4, 4, 6, 0.72); backdrop-filter: blur(6px); }
.palette__box {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  margin: 12vh auto 0;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: rise 0.22s ease both;
}
.palette__input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.palette__input svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.palette__input input { flex: 1; background: none; border: 0; outline: none; color: var(--paper); font-size: 16px; }
.palette__input input::placeholder { color: var(--muted); }
.palette__input kbd { font-family: var(--mono); font-size: 9.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; }
.palette__body { max-height: 52vh; overflow-y: auto; padding: 8px; }
.palette__hint { color: var(--muted); font-size: 13px; padding: 18px 12px; margin: 0; }
.palette__hint .mono { color: var(--muted); display: block; margin-top: 6px; font-size: 9.5px; }

.presult {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  text-align: left;
}
.presult:hover, .presult.is-cursor { background: rgba(255, 255, 255, 0.06); }
.presult img { width: 42px; height: 60px; object-fit: cover; border-radius: 4px; background: var(--ink-3); }
.presult__t { min-width: 0; }
.presult__t b { display: block; font-size: 14px; font-weight: 600; }
.presult__t span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.presult__go { margin-left: auto; color: var(--muted); width: 16px; height: 16px; }

/* ---------------- misc ---------------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 34px var(--pad) 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.footer__left { display: flex; align-items: center; gap: 10px; }
.footer__right { display: flex; align-items: center; gap: 10px; }
.footer__dot { opacity: 0.5; }
.footer .mono { font-size: 9.5px; }

.toast {
  position: fixed;
  z-index: 500;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 18px);
  background: var(--paper);
  color: var(--ink);
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 90vw;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.skeleton {
  background: linear-gradient(100deg, var(--ink-2) 30%, var(--ink-3) 50%, var(--ink-2) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius);
}
.skcard { width: 166px; }
.skcard .card__art { border: 0; }
.grid .skcard { width: auto; }

.spinner-inline {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(243,239,230,0.2);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.notice {
  margin: 0 var(--pad);
  padding: 14px 16px;
  border: 1px solid rgba(255, 74, 28, 0.35);
  background: rgba(255, 74, 28, 0.07);
  border-radius: 8px;
  font-size: 13px;
  color: var(--paper-2);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------------- panel state: announcement + maintenance ---------------- */

/* The banner is fixed at the very top, so the fixed topbar and every piece of
   page flow shift down by exactly its height while it is up. Removing the class
   puts the layout back byte-for-byte as it was. */
body.has-bc { padding-top: var(--bc-h); }
body.has-bc .topbar { top: var(--bc-h); }
body.has-bc .filters { top: calc(var(--header) + var(--bc-h)); }
body.has-maint { overflow: hidden; }

.panelbc {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  padding: 11px clamp(16px, 3vw, 34px);
  background: rgba(8, 8, 10, 0.9);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  animation: bcdrop 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.panelbc__tag {
  flex: none;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 4px;
}
.panelbc__title { font-weight: 700; letter-spacing: -0.01em; }
.panelbc__msg { color: var(--paper-2); }
.panelbc__x {
  flex: none;
  margin-left: auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--dim);
  font-size: 15px;
  line-height: 1;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.panelbc__x:hover { color: var(--paper); border-color: var(--line-strong); }

.panelbc--info { border-left-color: #5ad1ff; }
.panelbc--info .panelbc__tag { color: #5ad1ff; }
.panelbc--warn { border-left-color: #ffb020; }
.panelbc--warn .panelbc__tag { color: #ffb020; }
.panelbc--urgent {
  border-left-color: var(--accent);
  animation: bcdrop 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both, bcpulse 1.9s ease-in-out 0.4s infinite;
}
.panelbc--urgent .panelbc__tag { color: var(--accent); }

.panelmaint {
  position: fixed;
  inset: 0;
  z-index: 340;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 6, 8, 0.88);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  animation: fadein 0.3s ease both;
}

.panelmaint__card {
  width: min(440px, 100%);
  padding: 34px 30px 30px;
  text-align: center;
  background: var(--ink-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.panelmaint__dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--accent);
  animation: bcdot 1.5s ease-in-out infinite;
}
.panelmaint__kicker {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.panelmaint__card h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.panelmaint__msg { margin: 0 0 14px; color: var(--paper-2); font-size: 14.5px; }
.panelmaint__note { margin: 0; color: var(--muted); font-size: 9.5px; }

/* ---------------- animation ---------------- */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 140% 0; } to { background-position: -80% 0; } }
@keyframes bcdrop { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes bcpulse {
  0%, 100% { border-left-color: var(--accent); box-shadow: 0 0 0 rgba(255, 74, 28, 0); }
  50% { border-left-color: rgba(255, 74, 28, 0.35); box-shadow: 0 6px 26px rgba(255, 74, 28, 0.18); }
}
@keyframes bcdot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.72); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------- responsive ---------------- */

@media (max-width: 1180px) {
  .player { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 980px) {
  .player video::cue { font-size: 1rem; }
  .navtoggle { display: grid; }
  .nav {
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 6px var(--pad) 14px;
    background: rgba(10, 10, 12, 0.97);
    backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 95;
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding: 13px 2px;
    font-size: 15px;
    border-bottom: 1px solid rgba(243, 239, 230, 0.06);
  }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
  .nav a.is-active { color: var(--accent); }
  .hero { min-height: 72vh; }
  .hero__index { display: none; }
  .detail { grid-template-columns: 150px minmax(0, 1fr); margin-top: -70px; gap: 20px; }
  .detail__info { padding-top: 16px; }
  .detail__banner { height: 34vh; }
  .player { grid-template-columns: 1fr; }
  .watchside {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 86vw);
    z-index: 20;
    transform: translateX(101%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: -30px 0 60px rgba(0, 0, 0, 0.5);
  }
  .watchside.is-open { transform: none; }
  #btn-sheet { display: grid; }
  .skip { bottom: 104px; right: 16px; }
}

@media (max-width: 720px) {
  :root { --header: 62px; }
  .brand__tag { display: none; }
  .searchbtn span, .searchbtn kbd { display: none; }
  .searchbtn { width: 36px; padding: 0; justify-content: center; }
  .hero { min-height: 78vh; padding-bottom: 42px; }
  .hero__synopsis { -webkit-line-clamp: 4; font-size: 14px; }
  .hero__actions .btn { height: 42px; padding: 0 18px; }
  .rows { margin-top: 26px; }
  .card { width: 138px; }
  .detail { grid-template-columns: 1fr; margin-top: -60px; }
  .detail__poster { width: 132px; }
  .detail__banner { height: 26vh; }
  .detail__title { font-size: 32px; }
  .detail__info { padding-top: 0; }
  .ep-head { gap: 10px; }
  .seg { margin-left: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .watchside { width: 100%; }
  .controls .iconbtn { width: 34px; }
  .volume { display: none; }
  .time { margin-left: 4px; font-size: 10px; }
  .seek { height: 32px; }
  .seek__track { height: 5px; }
  .seek__thumb { width: 14px; height: 14px; margin: -7px 0 0 -7px; opacity: 1; transform: scale(1); }
  .player__chrome { padding: 60px 12px calc(10px + env(safe-area-inset-bottom)); }
  .pop { right: 10px; bottom: 70px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ============================================================
   auth · account menu · profiles
   ============================================================ */

.avatar--guest {
  width: auto;
  height: 34px;
  padding: 0 14px;
  border-radius: 17px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.avatar--id {
  background: var(--accent-soft);
  border-color: rgba(255, 74, 28, 0.45);
  color: var(--paper);
}

/* auth modal */
.auth { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; }
.auth__scrim { position: absolute; inset: 0; background: rgba(4, 4, 6, 0.74); backdrop-filter: blur(6px); }
.auth__box {
  position: relative;
  width: min(400px, calc(100vw - 32px));
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  padding: 30px 28px 22px;
  animation: rise 0.22s ease both;
}
.auth__mark {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  position: relative;
  margin-bottom: 16px;
}
.auth__mark::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 9px;
  border-left: 13px solid var(--ink);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.auth__box h2 { font-family: var(--serif); font-size: 24px; margin: 0 0 6px; letter-spacing: -0.01em; }
.auth__sub { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 0 18px; }
.auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 4px;
  margin-bottom: 18px;
}
.auth__tab {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}
.auth__tab.is-on { background: var(--ink-3); color: var(--paper); }
.auth__field { display: block; margin-bottom: 14px; }
.auth__field span {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.auth__field input {
  width: 100%;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--paper);
  font: inherit;
  font-size: 14px;
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.15s ease;
}
.auth__field input:focus { border-color: var(--accent); }
.auth__error { color: #ff8a7a; font-size: 12.5px; margin: -4px 0 12px; }
.auth__submit { width: 100%; justify-content: center; margin-top: 4px; }
.auth__submit:disabled { opacity: 0.6; }
.auth__foot { text-align: center; font-size: 9.5px; color: var(--muted); margin: 16px 0 0; opacity: 0.85; }

/* account menu */
.pmenu {
  position: fixed;
  z-index: 330;
  min-width: 190px;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: rise 0.16s ease both;
}
.pmenu__item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  color: var(--paper-2);
  font: inherit;
  font-size: 13.5px;
  padding: 9px 10px;
  border-radius: 7px;
  cursor: pointer;
}
.pmenu__item:hover { background: rgba(255, 255, 255, 0.06); color: var(--paper); }
.pmenu__item--out { color: #ff8a7a; }
.pmenu__sep { display: block; height: 1px; background: var(--line); margin: 5px 6px; border: 0; }

/* profile page */
.profile {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--header) + 34px) var(--pad) 76px;
  box-sizing: border-box;
}
#ptab-body .grid { padding-left: 0; padding-right: 0; padding-top: 12px; }
.profile__banner {
  position: relative;
  height: clamp(140px, 22vw, 220px);
  border-radius: 14px;
  overflow: hidden;
  background: var(--ink-3);
}
.profile__banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile__banner.t-aurora { background: linear-gradient(115deg, #05070f 0%, #123c7a 48%, #1fd1a5 100%); }
.profile__banner.t-sunset { background: linear-gradient(115deg, #150a1e 0%, #a83232 55%, #ff9a3c 100%); }
.profile__banner.t-ocean { background: linear-gradient(115deg, #04121f 0%, #0b4f7a 55%, #2fb5d9 100%); }
.profile__banner.t-crimson { background: linear-gradient(115deg, #12050a 0%, #6b0f24 55%, #e0455a 100%); }
.profile__banner.t-midnight { background: linear-gradient(115deg, #05060f 0%, #141b34 55%, #3b4a7a 100%); }
.profile__banner.t-forest { background: linear-gradient(115deg, #06120a 0%, #124023 55%, #6bbf59 100%); }
.profile__banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(8, 8, 10, 0.55) 100%);
}
.profile__head {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  margin-top: -44px;
  padding: 0 6px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.profile__av {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: var(--ink-3);
  border: 3px solid var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 700;
  overflow: hidden;
  flex: 0 0 auto;
  color: var(--paper);
}
.profile__av img { width: 100%; height: 100%; object-fit: cover; }
.profile__id { padding-bottom: 8px; min-width: 0; flex: 1; }
.profile__id h1 { font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); margin: 0; letter-spacing: -0.01em; }
.profile__handle { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }
.profile__actions { padding-bottom: 10px; display: flex; gap: 8px; }
.profile__bio { color: var(--dim); font-size: 14px; line-height: 1.6; max-width: 660px; margin: 16px 0 0; white-space: pre-wrap; }
.profile__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
  margin: 22px 0 6px;
}
.pstat { background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.pstat b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 700; }
.pstat span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ptabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 26px 0 20px; flex-wrap: wrap; }
.ptab {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.ptab.is-on { color: var(--paper); border-bottom-color: var(--accent); }
.statuschip {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
  background: var(--ink-1);
}
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.pcell { position: relative; }
.pcell .statuschip { position: absolute; top: 6px; left: 6px; z-index: 1; color: var(--paper); border-color: rgba(0, 0, 0, 0.4); background: rgba(8, 8, 10, 0.72); }
.pcell .pcell__prog { font-family: var(--mono); font-size: 9px; color: var(--muted); margin-top: 5px; letter-spacing: 0.05em; }
.favstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }

/* premium profile polish */
.profile__banner { box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38); }
.profile__banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.07) 47%, transparent 62%);
  transform: translateX(-70%);
  animation: bannerSheen 8s ease-in-out infinite;
}
@keyframes bannerSheen {
  0%, 55% { transform: translateX(-70%); }
  100% { transform: translateX(70%); }
}
@media (prefers-reduced-motion: reduce) {
  .profile__banner::before { animation: none; }
}
.profile__av {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.profile__av:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55); }
.profile__id h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.badge-owner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1a1204;
  background: linear-gradient(135deg, #ffdd85, #f5a623 70%);
  border-radius: 999px;
  padding: 5px 11px 5px 9px;
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.4);
  position: relative;
  top: -2px;
}
.badge-owner svg { display: block; }
.profile--owner .profile__av { border-color: #f5c451; box-shadow: 0 0 0 3px rgba(245, 196, 81, 0.22), 0 12px 34px rgba(0, 0, 0, 0.5); }
.profile--owner .profile__banner::after {
  background:
    linear-gradient(180deg, rgba(245, 196, 81, 0.16), transparent 42%),
    radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(8, 8, 10, 0.55) 100%);
}
.profile__bio {
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  color: var(--dim);
}
.pstat {
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.pstat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 78%);
  opacity: 0.75;
}
.pstat:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}
.pstat b { transition: color 0.18s ease; }
.pstat:hover b { color: var(--accent); }
.ptab {
  border-radius: 9px 9px 0 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.ptab:hover { color: var(--paper-2); background: rgba(255, 255, 255, 0.04); }
.ptab.is-on { background: var(--ink-2); }
.profile__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.pcell .pcell__prog { transition: color 0.15s ease; }
.pcell:hover .pcell__prog { color: var(--paper-2); }

/* profile edit panel */
.pedit {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 26px;
  animation: rise 0.2s ease both;
}
.pedit h3 { margin: 0 0 16px; font-family: var(--serif); font-size: 17px; }
.pedit label { display: block; margin-bottom: 14px; }
.pedit label > span {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.pedit input[type="text"],
.pedit input[type="url"],
.pedit textarea {
  width: 100%;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--paper);
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
}
.pedit textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.pedit input:focus, .pedit textarea:focus { border-color: var(--accent); }
.pedit .hint { font-size: 11.5px; color: var(--muted); margin: 6px 0 0; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  outline: 1px solid var(--line);
}
.swatch.is-on { border-color: var(--paper); outline-color: transparent; }
.pedit__actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.favgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.favpick { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 8px; overflow: hidden; outline: 2px solid transparent; transition: outline-color 0.15s ease; }
.favpick img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; background: var(--ink-3); }
.favpick.is-on { outline-color: var(--accent); }
.favpick.is-on::after {
  content: "✓";
  position: absolute;
  top: 3px;
  right: 6px;
  color: var(--paper);
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 1px 4px #000;
}

/* palette extras: recents + see-all row */
.palette__label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 18px 6px;
}
.presult__ic { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); }
.presult--all { border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.presult--all b { color: var(--paper-2); font-weight: 600; }
.presult--user img.presult__avimg { width: 40px; height: 40px; border-radius: 50%; }
.presult__av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-weight: 700;
  font-size: 15px;
}
.presult__owner { color: var(--accent); font-style: normal; }

/* profile section labels */
.profile__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================================
   community — discussions, replies, likes, @mentions
   ============================================================ */

/* centred column, same treatment as .profile */
.commwrap {
  max-width: calc(880px + var(--pad) * 2);
  margin: 0 auto;
  padding: 0 var(--pad);
  overflow-x: clip; /* keeps the header glow from scrolling the page sideways */
}

/* centred hero header with a soft accent glow */
.cmhead {
  position: relative;
  padding: calc(var(--header) + 54px) 0 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cmhead::before {
  content: "";
  position: absolute;
  top: calc(var(--header) - 40px);
  left: -14vw;
  right: -14vw;
  height: 360px;
  pointer-events: none;
  background: radial-gradient(48% 58% at 50% 32%, rgba(255, 74, 28, 0.16), transparent 70%);
}
.cmhead > * { position: relative; }
.cmhead__eye {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}
.cmhead h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 14px 0 0;
}
.cmhead p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 52ch;
}
.cmstats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.cmstat {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 16px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 500 12.5px/1 var(--sans);
}
.cmstat b {
  font: 800 15.5px/1 var(--serif);
  letter-spacing: -0.02em;
  color: var(--paper);
}

/* composer + guest banner */
.cm-card,
.cm-guest {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  position: relative;
  margin-bottom: 18px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.cm-card:focus-within {
  border-color: rgba(255, 74, 28, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 74, 28, 0.1), 0 18px 44px rgba(0, 0, 0, 0.35);
}
.cm-card__row { display: flex; gap: 13px; align-items: flex-start; }
.cm-card__av { width: 40px; height: 40px; flex: none; }

.cm-guest {
  display: flex;
  align-items: center;
  gap: 16px;
  background:
    linear-gradient(180deg, rgba(255, 74, 28, 0.08), rgba(255, 74, 28, 0) 60%),
    var(--ink-2);
}
.cm-guest__ic {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
}
.cm-guest__ic svg { width: 22px; height: 22px; }
.cm-guest__txt { flex: 1; min-width: 0; }
.cm-guest .btn { flex: none; }
.cm-guest b { font-size: 15px; color: var(--paper); }
.cm-guest p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; max-width: 54ch; }

.cm-card textarea {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 74px;
  background: transparent;
  border: 0;
  outline: none;
  resize: vertical;
  color: var(--paper);
  font: 400 15px/1.6 var(--sans);
}
.cm-card textarea::placeholder { color: var(--muted); }
.cm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.cm-hint { color: var(--muted); font-size: 12.5px; }
.cm-hint code {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(243, 239, 230, 0.07);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--paper-2);
}
.cm-bar__right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.cm-count { color: var(--muted); font-size: 12px; }

.comm {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.comm__more {
  display: flex;
  justify-content: center;
  padding: 10px 0 52px;
}

/* empty state — one friendly card with a call to action */
.cmempty {
  background:
    linear-gradient(180deg, rgba(243, 239, 230, 0.025), transparent 60%),
    var(--ink-2);
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  padding: 56px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cmempty__ic {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}
.cmempty__ic svg { width: 28px; height: 28px; }
.cmempty h2 {
  font-family: var(--serif);
  color: var(--paper);
  font-size: 28px;
  letter-spacing: -0.03em;
  margin: 0;
}
.cmempty p {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 44ch;
}

.cpost {
  display: flex;
  gap: 14px;
  padding: 17px 18px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.cpost:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}
.cpost--reply { background: var(--ink-1); padding: 13px 15px; }
.cpost__av { flex: none; line-height: 0; }
.cav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft), rgba(243, 239, 230, 0.1));
  color: var(--paper);
  font: 700 16px/1 var(--sans);
  user-select: none;
}
.cav img { width: 100%; height: 100%; object-fit: cover; }
.cav--sm { width: 26px; height: 26px; font-size: 12px; }
.cpost__main { flex: 1; min-width: 0; }
.cpost__head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.cpost__name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--paper);
  font-weight: 650;
  font-size: 15px;
  text-decoration: none;
}
.cpost__name:hover { color: var(--accent); }
.cpost__handle { color: var(--muted); font: 500 12px/1 var(--mono); }
.cpost__time { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.cpost__body {
  margin-top: 8px;
  color: var(--paper-2);
  font-size: 14.5px;
  line-height: 1.62;
  overflow-wrap: anywhere;
}
.cpost__body .mention { color: var(--accent); font-weight: 600; text-decoration: none; }
.cpost__body .mention:hover { text-decoration: underline; }
.cpost__body .ctag { color: var(--ok); font-weight: 600; }

.cpost__acts { display: flex; align-items: center; gap: 4px; margin-top: 11px; flex-wrap: wrap; }
.cact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 12.5px/1 var(--sans);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.cact:hover { background: rgba(243, 239, 230, 0.07); color: var(--paper); }
.cact.is-on { background: var(--accent-soft); color: var(--accent); }
.cact--danger:hover { background: rgba(255, 90, 70, 0.12); color: #ff7a6a; }
.cact svg { display: block; }

.cthread {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cthread__list { display: flex; flex-direction: column; gap: 10px; }
.cthread__none,
.cthread__load { color: var(--muted); font-size: 13.5px; }

.creply { display: flex; gap: 10px; align-items: flex-end; }
.creply__wrap { position: relative; flex: 1; }
.creply__box {
  width: 100%;
  min-height: 58px;
  padding: 11px 13px;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  resize: vertical;
  color: var(--paper);
  font: 400 14px/1.55 var(--sans);
}
.creply__box:focus { border-color: var(--line-strong); }
.creply__box::placeholder { color: var(--muted); }

.mdrop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--ink-3);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}
.mdrop__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  color: var(--paper-2);
  font-size: 13.5px;
}
.mdrop__item:hover,
.mdrop__item.is-on { background: var(--accent-soft); color: var(--paper); }
.mdrop__name { font-weight: 650; }
.mdrop__handle { margin-left: auto; color: var(--muted); font: 500 12px/1 var(--mono); }
