*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
}

/* No stored login yet: hide the app until auth.js redirects or reveals it (no empty-collection flash). */
html.auth-pending body { visibility: hidden; }

body {
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: #111;
  -webkit-font-smoothing: antialiased;
}

header {
  padding: 20px 48px 16px;
  display: flex;
  align-items: center;
  gap: 0;
}

.grid-nav-btn.compact {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 8px;
}

.grid-nav-btn.compact .grid-nav-icon {
  font-size: 16px;
}

.site-brand {
  position: relative;
  flex-shrink: 0;
}

/* Deployed commit under the title — absolutely positioned inside the header's bottom padding,
   so showing it never shifts the layout. Deliberately low contrast (informational only). */
.site-version {
  position: absolute;
  left: 1px;
  top: 100%;
  margin-top: 1px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: #c4c4c4;
  white-space: nowrap;
  user-select: all;
}
.site-version[hidden] { display: none; }

.site-heading {
  margin: 0;
  font: inherit;
  flex-shrink: 0;
}

.site-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #111;
  text-decoration: none;
  flex-shrink: 0;
}

.site-title:hover {
  color: #555;
}

nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.nav-link-settings {
  margin-left: auto;
}

/* AI toggle pill in nav */
.nav-ai-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.nav-ai-toggle input { display: none; }
.nav-ai-label {
  font-size: 13px;
  font-weight: 500;
  color: #bbb;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.nav-ai-toggle:has(input:checked) .nav-ai-label { color: #111; }
.nav-ai-switch {
  width: 28px;
  height: 16px;
  border-radius: 8px;
  background: #e0e0e0;
  border: 1px solid #ccc;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.nav-ai-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #aaa;
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), background 0.2s;
}
.nav-ai-toggle:has(input:checked) .nav-ai-switch {
  background: #111;
  border-color: #111;
}
.nav-ai-toggle:has(input:checked) .nav-ai-switch::after {
  transform: translateX(12px);
  background: #fff;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: #bbb;
  text-decoration: none;
  letter-spacing: -0.01em;
}

button.nav-link {
  background: transparent;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

.nav-link.active {
  color: #111;
}

.nav-link:hover {
  color: #111;
}

/* Account housekeeping, not navigation: last in the nav, set apart by a hairline. */
.nav-link-signout {
  position: relative;
  padding-left: 24px;
  white-space: nowrap;
}
button.nav-link-signout { padding-left: 24px; }
.nav-link-signout::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  background: #e2e2e2;
  transform: translateY(-50%);
}
.nav-link-signout[hidden] { display: none; }
.nav-link-signout:disabled { color: #bbb; cursor: default; }
.nav-link:focus-visible { outline: 2px solid #111; outline-offset: 3px; border-radius: 2px; }

main {
  --watch-diary-width: min(420px, 34vw);
  --watch-diary-right-inset: 24px;
  --watch-diary-top-inset: 24px;
  padding: 0 48px 80px;
  min-height: 100vh;
}

.movies-layout {
  --movies-layout-gap: 36px;
  display: flex;
  align-items: flex-start;
  gap: var(--movies-layout-gap);
  padding-right: 0;
  overflow: visible;
  transition: gap 0.32s cubic-bezier(0.23, 1, 0.32, 1), padding-right 0.34s cubic-bezier(0.23, 1, 0.32, 1);
}

.watch-diary-open .movies-layout {
  padding-right: calc(var(--watch-diary-width) + var(--watch-diary-right-inset) + 36px);
}

.movies-content {
  flex: 1;
  min-width: 0;
  transition: transform 0.32s cubic-bezier(0.23, 1, 0.32, 1);
}

.watch-diary-panel {
  position: fixed;
  top: var(--watch-diary-top-inset);
  bottom: var(--watch-diary-top-inset);
  right: var(--watch-diary-right-inset);
  z-index: 40;
  display: flex;
  flex-direction: column;
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  height: auto;
  max-height: none;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition: width 0.34s cubic-bezier(0.23, 1, 0.32, 1), flex-basis 0.34s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.22s ease, transform 0.34s cubic-bezier(0.23, 1, 0.32, 1);
  border-left: 1px solid rgba(17,17,17,0.08);
}

.watch-diary-shell-head {
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 20px 20px 14px 24px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(circle at top right, rgba(214, 184, 116, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(244, 240, 232, 0.98), rgba(248, 244, 236, 0.94));
  border-bottom: 1px solid rgba(24,21,17,0.07);
}

.watch-diary-open .watch-diary-panel {
  flex-basis: var(--watch-diary-width);
  width: var(--watch-diary-width);
  padding: 0;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.watch-diary-open .movies-content {
  transform: translateX(-4px);
}

.recommendation {
  margin-top: 40px;
  margin-bottom: 64px;
}

.rec-banner {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.rec-bg {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center;
  filter: blur(32px);
  opacity: 0.55;
}

.rec-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 100%);
}

.rec-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  gap: 48px;
  padding: 32px;
}

.rec-poster-wrap {
  position: relative;
  flex-shrink: 0;
  width: 180px;
  aspect-ratio: 2 / 3;
  isolation: isolate;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  border-radius: 4px;
  overflow: hidden;
}

.rec-poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rec-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rec-heading-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.rec-banner-disabled {
  opacity: 0.25;
  pointer-events: none;
  user-select: none;
}

/* Rec heading controls dimmed when AI master toggle is off */
.rec-heading-row--ai-off .rec-enable-label,
.rec-heading-row--ai-off .rec-right-group {
  opacity: 0.3;
  pointer-events: none;
  user-select: none;
}


.rec-right-group {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.rec-cost-hint {
  font-size: 11px;
  color: #555;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.rec-cost-session {
  color: #444;
}

.rec-cost-total {
  color: #3a3a3a;
}

.rec-cost-remaining {
  color: #4a7;
}

.rec-cost-remaining.rec-cost-low {
  color: #c55;
}

.rec-model-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.rec-model-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ccc;
  transition: color 0.2s;
}

.rec-model-label.active {
  color: #444;
}

.rec-model-switch {
  width: 36px;
  height: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
}

.rec-model-switch.on {
  background: #4a9;
}

.rec-model-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.rec-model-switch.on .rec-model-knob {
  transform: translateX(16px);
}

.rec-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #999;
  line-height: 1;
}

.rec-type-toggles {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}

.rec-type-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(20, 20, 20, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: #625c54;
  font-size: 12px;
  font-weight: 600;
}

.rec-type-toggle input {
  accent-color: #9b7a2a;
}

.rec-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 42px;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.rec-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: 8px;
}

.rec-type-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 5px 10px 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(20, 20, 20, 0.18);
  color: rgba(255, 248, 229, 0.92);
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rec-reason {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  width: 360px;
}

.rec-writers {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.rec-ratings {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.rec-rating-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.rec-rating-link:hover {
  opacity: 1;
}

.rec-rating-logo {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 5px;
  border-radius: 3px;
}

.rec-rating-logo-imdb {
  background: #f5c518;
  color: #000;
}

.rec-rating-rt-icon {
  display: flex;
  align-items: center;
  line-height: 0;
}

.rec-rating-score {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}

.rec-poster-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.rec-poster-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 180px;
}

.rec-poster-buttons .rec-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  height: 36px;
  padding: 0 12px;
  flex: none;
}

.rec-btn {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
  flex: 1;
  text-align: center;
}

.rec-btn:hover {
  opacity: 0.8;
}

.rec-info-buttons {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}

.rec-info-buttons .rec-btn {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  height: 36px;
  padding: 0 14px;
  white-space: nowrap;
}

.rec-btn-primary {
  background: #fff;
  color: #111;
}

.rec-btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.rec-btn-ban {
  background: rgba(255,60,60,0.18);
  color: rgba(255,120,120,0.9);
}

.rec-btn-watchlist {
  background: rgba(80,200,140,0.18);
  color: rgba(80,200,140,0.95);
}

.rec-btn-maybe {
  background: rgba(160,120,255,0.18);
  color: rgba(180,140,255,0.95);
}

.rec-btn-meh {
  background: rgba(180,180,180,0.18);
  color: rgba(200,200,200,0.95);
}

.rec-banner-loading {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
}

.rec-skel-content {
  display: flex;
  align-items: stretch;
  gap: 48px;
  padding: 32px;
  box-sizing: border-box;
}

.rec-skel-poster {
  flex-shrink: 0;
  width: 180px;
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  background: #2e2e2e;
}

.rec-skel-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rec-skel-stills {
  display: flex;
  gap: 6px;
  height: 380px;
  flex-shrink: 0;
  max-width: 55%;
  margin-left: auto;
  overflow: hidden;
  align-self: center;
}

.rec-skel-bar {
  border-radius: 4px;
  background: #2e2e2e;
}

.rec-skel-poster,
.rec-skel-bar {
  position: relative;
  overflow: hidden;
}

.rec-skel-poster::after,
.rec-skel-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.07) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.8s ease-in-out infinite;
}

@keyframes skel-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.rec-banner-error {
  min-height: 80px;
  border-radius: 12px;
  background: rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  font-size: 13px;
  color: #bbb;
}

.rec-stills {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  align-self: center;
  flex-shrink: 0;
  height: 380px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  mask-image: linear-gradient(to left, transparent 0%, black 8%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, transparent 0%, black 8%, black 80%, transparent 100%);
  padding-right: 60px;
  max-width: 55%;
}

.rec-stills::-webkit-scrollbar {
  display: none;
}

.rec-still {
  height: 380px;
  width: auto;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  cursor: default;
  user-select: none;
  -webkit-user-drag: none;
}

.grid-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  /* Bleed to both window edges. Left is main's 48px gutter; on the right, .movies-layout
     has no padding — the content is followed by the layout gap and the closed diary
     panel's 1px border, so a 48px bleed made the page 11px too wide. */
  padding: 12px calc(var(--movies-layout-gap) + 1px) 12px 48px;
  margin-left: -48px;
  margin-right: calc(-1 * (var(--movies-layout-gap) + 1px));
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.grid-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.grid-nav-tab-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.grid-nav-tabs {
  display: flex;
  justify-content: flex-start;   /* centred overflow would push the first tabs out of reach */
  gap: 0;
  background: rgba(0,0,0,0.04);
  border-radius: 16px;
  padding: 5px;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  /* Narrower than the tabs (tablet widths): scroll sideways instead of widening the page. */
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.grid-nav-tabs::-webkit-scrollbar { display: none; }

.grid-nav-media-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(0,0,0,0.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}

.grid-nav-media-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: #918a80;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.grid-nav-media-btn:hover {
  color: #3a3328;
}

.grid-nav-media-btn.active {
  background: rgba(255,255,255,0.88);
  color: #8f6a18;
  box-shadow: 0 1px 5px rgba(0,0,0,0.08);
}

.grid-nav-slider {
  position: absolute;
  top: 5px;
  height: calc(100% - 10px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
  z-index: 0;
}

.grid-sort-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.grid-sort-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,0.04);
  border-radius: 10px;
  padding: 3px;
}

.grid-add-btn {
  padding: 5px 18px;
  border-radius: 8px;
  border: none;
  background: rgba(0,0,0,0.04);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.grid-add-btn:hover {
  background: rgba(0,0,0,0.08);
  color: #333;
}

.grid-sort-btn {
  padding: 5px 14px;
  border-radius: 7px;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.grid-sort-btn.active {
  background: #fff;
  color: #111;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.grid-nav-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  border-radius: 12px;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #999;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.grid-nav-icon {
  font-size: 24px;
  line-height: 1;
}

.grid-nav-btn:hover {
  color: #333;
}

.grid-nav-btn {
  position: relative;
  z-index: 1;
}

.grid-nav-btn.active {
  color: #111;
}

.grid-nav-btn.drop-target {
  outline: 2px dashed rgba(0,0,0,0.15);
  outline-offset: -3px;
  transition: outline-color 0.15s, background 0.15s, transform 0.15s;
}

.grid-nav-btn.drop-hover {
  outline-color: rgba(0,0,0,0.5);
  background: rgba(0,0,0,0.06);
  transform: scale(1.06);
  color: #111;
}

.grid-nav-count {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(0,0,0,0.07);
  color: #777;
  transition: background 0.2s, color 0.2s;
}

.grid-nav-btn.active .grid-nav-count {
  background: rgba(0,0,0,0.08);
  color: #333;
}

/* ── Anticipated nav separator + button ─────────────────────────────────── */
.grid-nav-sep {
  width: 1px;
  background: rgba(0,0,0,0.1);
  margin: 6px 8px;
  flex-shrink: 0;
}

.grid-nav-btn--anticipated {
  margin-left: 4px;
}

/* Alert state: dot + border when released films exist */
.grid-nav-btn--alert {
  border: 1.5px solid rgba(255, 160, 0, 0.55) !important;
  position: relative;
}

.grid-nav-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 2px #fff;
}

/* ── Anticipated grid ───────────────────────────────────────────────────── */
.anticipated-countdown {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(15, 15, 15, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 5px 8px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.anticipated-countdown--released {
  background: rgba(245, 158, 11, 0.9);
  color: #1a1000;
}

/* Premiere day: the band becomes a cinema marquee — gold caps between two rows of
   bulbs, a slow chase running through them and warm light spilling onto the poster. */
.anticipated-countdown--premiere {
  --bulb-gap: 9px;
  padding: 11px 8px;
  background: #161616;
  color: #ffd700;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: none;
  box-shadow: 0 10px 22px -10px rgba(255, 215, 0, 0.55);
}

.anticipated-countdown--premiere::before,
.anticipated-countdown--premiere::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  /* Lit bulb every third position over a row of dim ones; the chase slides the lit layer. */
  background:
    radial-gradient(circle, #fff3b0 0 1.4px, rgba(255, 215, 0, 0.55) 2px, transparent 3px) 0 50% / calc(var(--bulb-gap) * 3) 6px repeat-x,
    radial-gradient(circle, rgba(255, 215, 0, 0.32) 0 1.3px, transparent 1.8px) 0 50% / var(--bulb-gap) 6px repeat-x;
  animation: marquee-chase 1.5s steps(3) infinite;
}

.anticipated-countdown--premiere::before { top: 2px; }
.anticipated-countdown--premiere::after  { bottom: 2px; animation-direction: reverse; }

@keyframes marquee-chase {
  from { background-position: 0 50%, 0 50%; }
  to   { background-position: calc(var(--bulb-gap) * 3) 50%, 0 50%; }
}

.anticipated-countdown--premiere .anticipated-countdown-detail {
  color: rgba(255, 243, 176, 0.75);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
}

@media (prefers-reduced-motion: reduce) {
  .anticipated-countdown--premiere::before,
  .anticipated-countdown--premiere::after { animation: none; }
}

.anticipated-countdown-detail {
  display: block;
  margin-top: 4px;
  opacity: 0.72;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.anticipated-card--released .card-poster-wrap {
  opacity: 0.75;
}

/* ── Anticipated empty state ────────────────────────────────────────────── */
.anticipated-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0 24px;
}

.anticipated-empty-msg {
  font-size: 15px;
  color: #888;
  margin: 0;
}

.anticipated-suggestions-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 24px;
}

.anticipated-suggestions-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  margin: 0;
  padding-top: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.anticipated-suggestions-grid {
  display: flex;
  flex-direction: row;
  gap: 12px;
  overflow-x: auto;
  flex: 1;
  opacity: 0.7;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.anticipated-suggestions-grid::-webkit-scrollbar {
  display: none;
}

.anticipated-suggestion-card {
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.anticipated-suggestion-add-btn {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  pointer-events: none;
}

.anticipated-suggestion-card:hover .anticipated-suggestion-add-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.anticipated-suggestions-grid .anticipated-suggestion-card:hover {
  opacity: 1;
}

.anticipated-suggestion-slot {
  flex-shrink: 0;
  width: 133px;
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  background: rgba(0,0,0,0.07);
}

.anticipated-suggestion-slot--loading {
  animation: skel-pulse 1.6s ease-in-out infinite;
}

@keyframes skel-pulse {
  0%, 100% { background: rgba(0,0,0,0.07); }
  50%       { background: rgba(0,0,0,0.13); }
}

@media (prefers-reduced-motion: reduce) {
  .anticipated-suggestion-slot--loading { animation: none; }
}

.anticipated-suggestions-sentinel {
  flex-shrink: 0;
  width: 40px;
  height: 1px;
  pointer-events: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 40px 32px;
}

.grid-release-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 -8px;
  color: rgba(255,255,255,0.28);
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}

.grid-release-divider::before,
.grid-release-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.07);
}

.grid-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  gap: 20px;
  user-select: none;
}

.grid-empty img {
  width: 660px;
  opacity: 0.85;
}

.grid-empty-label {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #bbb;
  letter-spacing: 0.01em;
}

/* ── Collection empty state: blank posters on a shelf, the middle one waiting ── */
.collection-empty {
  grid-column: 1 / -1;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 16px 96px;
  text-align: center;
}

body.collection-is-empty #standards-wrap,
body.collection-is-empty #standards-tv-wrap { display: none !important; }

/* Projector spill on the shelf */
.collection-empty::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  left: 50%;
  width: min(760px, 100%);
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 60% at 50% 55%, rgba(255, 236, 200, 0.55), transparent 70%);
  pointer-events: none;
}

.collection-empty-shelf {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(8px, 2vw, 18px);
  width: min(640px, 100%);
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.collection-empty-slot {
  flex: 0 0 auto;
  width: clamp(52px, 14vw, 104px);
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  background: linear-gradient(160deg, rgba(255,255,255,0.55), transparent 45%), var(--slot-bg, #ecebe7);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 10px 24px -14px rgba(0,0,0,0.25);
  opacity: 0;
  animation: collection-empty-settle 0.9s cubic-bezier(0.23, 1, 0.32, 1) var(--d, 0ms) forwards;
}
.collection-empty-slot:nth-child(1) { --slot-bg: #e4e2dd; --r: -4deg;   --y: 6px; --d: 0ms;   width: clamp(44px, 11vw, 84px); }
.collection-empty-slot:nth-child(2) { --slot-bg: #f1efea; --r: -1.5deg; --y: 2px; --d: 70ms; }
.collection-empty-slot:nth-child(4) { --slot-bg: #ecebe7; --r: 2deg;    --y: 3px; --d: 140ms; }
.collection-empty-slot:nth-child(5) { --slot-bg: #e4e2dd; --r: 5deg;    --y: 8px; --d: 210ms; width: clamp(44px, 11vw, 84px); }

/* The waiting slot — a mouse shortcut for the "Add your first title" button below */
.collection-empty-slot--first {
  --y: -6px;
  --d: 280ms;
  width: clamp(68px, 18vw, 132px);
  display: grid;
  place-items: center;
  border: 1.5px dashed rgba(0,0,0,0.22);
  background: rgba(255,255,255,0.7);
  box-shadow: none;
  color: #555;
  cursor: pointer;
  transition: translate 0.16s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.16s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.16s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.16s cubic-bezier(0.23, 1, 0.32, 1), color 0.16s cubic-bezier(0.23, 1, 0.32, 1);
}
.collection-empty-slot--first svg {
  width: 28%;
  transition: transform 0.16s cubic-bezier(0.23, 1, 0.32, 1);
}
.collection-empty-slot--first:hover {
  translate: 0 -6px;
  border-color: #1a1a1a;
  background: #fff;
  box-shadow: 0 22px 36px -18px rgba(0,0,0,0.35);
  color: #1a1a1a;
}
.collection-empty-slot--first:hover svg { transform: rotate(90deg); }
.collection-empty-slot--first:active { translate: 0 -2px; }

.collection-empty-title {
  margin: 40px 0 0;
  min-width: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #1a1a1a;
  overflow-wrap: anywhere;
  text-wrap: balance;
  opacity: 0;
  animation: collection-empty-rise 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.36s forwards;
}
.collection-empty-copy {
  max-width: 40ch;
  margin: 14px 0 0;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  opacity: 0;
  animation: collection-empty-rise 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.43s forwards;
}
.collection-empty-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  margin-top: 28px;
  opacity: 0;
  animation: collection-empty-rise 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.5s forwards;
}

.collection-empty-btn {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fff;
  font: 500 14px/1 'Inter', sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.16s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.16s cubic-bezier(0.23, 1, 0.32, 1);
}
.collection-empty-btn:hover { background: #000; box-shadow: 0 10px 22px -12px rgba(0,0,0,0.5); transform: translateY(-1px); }
.collection-empty-btn:active { transform: scale(0.97); box-shadow: none; }
.collection-empty-btn:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 3px; }

.collection-empty-link {
  padding: 12px 2px;
  border: 0;
  background: none;
  color: #555;
  font: 500 14px/1 'Inter', sans-serif;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,0.2);
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color 0.16s cubic-bezier(0.23, 1, 0.32, 1), text-decoration-color 0.16s cubic-bezier(0.23, 1, 0.32, 1);
}
.collection-empty-link:hover { color: #1a1a1a; text-decoration-color: currentColor; }
.collection-empty-link:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 2px; border-radius: 4px; }
.collection-empty-count { color: #767676; font-variant-numeric: tabular-nums; }

@keyframes collection-empty-settle {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: rotate(var(--r, 0deg)) translateY(var(--y, 0)); }
}
@keyframes collection-empty-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes collection-empty-fade { to { opacity: 1; } }

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  display: block;
  background: #f0f0f0;
}

.movie-poster {
  aspect-ratio: 2 / 3;
  display: block;
  width: 100%;
}

.poster-wrap {
  position: relative;
  display: block;
}

.card-media-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 8px 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(14, 14, 14, 0.7);
  color: rgba(255, 248, 229, 0.94);
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@property --card-border-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@property --card-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes card-border-rotate {
  to { --card-angle: 1turn; }
}

/* Live card: rotating glow border — comet head + bloom drop-shadow */
.movie-card.movie-card--live {
  border: 3px solid transparent;
  border-radius: 6px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(
      from var(--card-angle),
      rgba(200, 134, 10, 0) 0deg,
      rgba(200, 134, 10, 0) 140deg,
      #fff5b0 155deg,
      #ffd700 168deg,
      #e8c060 180deg,
      #ffd700 192deg,
      #fff5b0 205deg,
      rgba(200, 134, 10, 0) 220deg,
      rgba(200, 134, 10, 0) 360deg
    ) border-box;
  animation: card-border-rotate 6s linear infinite;
  filter:
    drop-shadow(0 0 3px rgba(255, 215, 0, 0.95))
    drop-shadow(0 0 8px rgba(220, 160, 20, 0.75))
    drop-shadow(0 0 18px rgba(200, 120, 10, 0.45));
}

@media (prefers-reduced-motion: reduce) {
  .movie-card.movie-card--live { animation: none; }
}

/* Session indicator — small dot on bottom-left of poster for films with companion history */
.movie-card--sessioned .poster-wrap::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 3;
}

.card-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.movie-card:hover .card-remove-btn {
  opacity: 1;
}

.card-remove-btn:hover {
  background: rgba(220,50,50,0.75);
  color: #fff;
}

/* Standards shelf */
#standards-wrap, #standards-tv-wrap {
  margin-bottom: 40px;
}

.standards-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.standards-title {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
}

.standards-count {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #bbb;
}

.standards-slots {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
}

.standards-slot {
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.standards-slot.empty {
  background: rgba(0,0,0,0.04);
  border: 1.5px dashed rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}

#standards-wrap.drag-active .standards-slot.empty,
#standards-tv-wrap.drag-active .standards-slot.empty {
  border-color: rgba(0,0,0,0.25);
  background: rgba(0,0,0,0.06);
}

#standards-wrap.drag-active .standards-slot.empty.drop-hover,
#standards-tv-wrap.drag-active .standards-slot.empty.drop-hover {
  border-color: #ffd700;
  background: rgba(255,215,0,0.1);
}

#standards-wrap.drag-active .standards-slot.empty.drop-hover .standards-slot-plus,
#standards-tv-wrap.drag-active .standards-slot.empty.drop-hover .standards-slot-plus {
  color: #ffd700;
}

.standards-slot-plus {
  font-size: 18px;
  color: rgba(0,0,0,0.15);
  line-height: 1;
  pointer-events: none;
}

.standards-slot.filled {
  cursor: grab;
}

.standards-slot.filled:active {
  cursor: grabbing;
}

.standards-slot.filled img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.standards-slot-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: rgba(255,255,255,0.9);
  font-size: 9px;
  cursor: pointer;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
  z-index: 2;
}

.standards-slot.filled:hover .standards-slot-remove {
  opacity: 1;
}

/* Reference Series: films arrive by drag from the grid; series can also be searched for. */
.standards-add-btn {
  margin-left: auto;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(0,0,0,0.35);
  cursor: pointer;
  padding: 0 4px;
  line-height: inherit; /* keep the header height the same whether or not the button shows */
  border-radius: 4px;
  transition: color 0.15s;
}
.standards-add-btn:hover { color: rgba(0,0,0,0.7); }

#standards-tv-wrap .standards-slot.empty { cursor: pointer; }
#standards-tv-wrap .standards-slot.empty:hover { border-color: rgba(0,0,0,0.25); }
#standards-tv-wrap .standards-slot.empty:hover .standards-slot-plus { color: rgba(0,0,0,0.3); }

/* Star button on collection cards */
.card-star-btn {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: rgba(255,220,50,0.5);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.movie-card:hover .card-star-btn {
  opacity: 1;
}

.card-star-btn.active {
  opacity: 1;
  color: #ffd700;
}

.card-star-btn:hover {
  color: #ffd700;
}

.poster-texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-size: 100% 100%;
  transition: opacity 0.4s ease;
}

.poster-texture-hl {
  mix-blend-mode: screen;
  opacity: var(--grain-hl, 0.08);
}

.poster-texture-sh {
  mix-blend-mode: multiply;
  opacity: var(--grain-sh, 0.04);
}

#undo-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.1);
  color: #eee;
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
  white-space: nowrap;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

#undo-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

#undo-toast button {
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  letter-spacing: 0.02em;
}

#undo-toast button:hover {
  background: rgba(255,255,255,0.22);
}

/* Settings */
.settings-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.settings-title {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111;
  margin-bottom: 40px;
}

.settings-section {
  margin-bottom: 56px;
}

.cost-tracking-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.cost-stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 16px;
}

.cost-stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 8px;
}

.cost-stat-value {
  font-size: 22px;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.cost-stat-sub {
  font-size: 11px;
  color: #555;
}

.cost-balance-row {
  margin-top: 4px;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.settings-toggle-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.settings-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  margin-bottom: 8px;
}

.cost-balance-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cost-balance-input {
  width: 140px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #ccc;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.cost-balance-input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.2);
}

.cost-balance-clear-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #666;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
}

.cost-balance-clear-btn:hover {
  color: #aaa;
  border-color: rgba(255,255,255,0.2);
}

.settings-link {
  color: #888;
  text-decoration: underline;
}

.settings-section-title {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 12px;
}

.settings-section-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.dashboard-main {
  padding-bottom: 96px;
}

.dashboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
  gap: 24px;
  padding: 36px;
  border: 1px solid rgba(17,17,17,0.08);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(255,215,0,0.18), transparent 36%),
    linear-gradient(135deg, #191713 0%, #24201a 52%, #151310 100%);
  color: #f3efe6;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(17,17,17,0.12);
}

.dashboard-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.06), transparent 40%),
    radial-gradient(circle at bottom right, rgba(255,255,255,0.08), transparent 34%);
  pointer-events: none;
}

.dashboard-hero-copy,
.dashboard-hero-meta {
  position: relative;
  z-index: 1;
}

.dashboard-kicker,
.dashboard-panel-kicker {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.64);
}

.dashboard-title {
  margin-top: 10px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.dashboard-subtitle {
  max-width: 58ch;
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(243,239,230,0.72);
}

.dashboard-hero-meta {
  display: grid;
  gap: 16px;
  align-content: start;
}

.dashboard-meta-card,
.dashboard-stat-card,
.dashboard-panel {
  border: 1px solid rgba(17,17,17,0.08);
  border-radius: 24px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(18px);
}

.dashboard-meta-card {
  padding: 18px 20px;
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
}

.dashboard-meta-label {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243,239,230,0.58);
}

.dashboard-meta-value {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: #fff6da;
}

.dashboard-notice {
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.dashboard-notice-info {
  background: rgba(17,17,17,0.05);
  color: #444;
}

.dashboard-notice-error {
  background: rgba(160,42,42,0.08);
  color: #8a3838;
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.dashboard-stat-card,
.dashboard-skeleton-card {
  min-height: 164px;
  padding: 22px;
}

.dashboard-stat-label {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #767067;
}

.dashboard-stat-value {
  margin-top: 20px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 42px;
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: #171411;
}

.dashboard-stat-sub {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.65;
  color: #6f685f;
}

.dashboard-skeleton-card {
  border-radius: 24px;
  background: linear-gradient(90deg, rgba(17,17,17,0.04), rgba(17,17,17,0.08), rgba(17,17,17,0.04));
  background-size: 200% 100%;
  animation: dashboardPulse 1.8s ease-in-out infinite;
}

.dashboard-detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.6fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.dashboard-panel {
  padding: 24px;
}

.dashboard-panel-title {
  margin-top: 8px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  letter-spacing: -0.03em;
  color: #181512;
}

.dashboard-note-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.dashboard-note-item,
.dashboard-empty {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f3f0e8;
  font-size: 14px;
  line-height: 1.7;
  color: #534a42;
}

.dashboard-table-wrap {
  margin-top: 22px;
  overflow-x: auto;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(17,17,17,0.08);
  text-align: left;
  vertical-align: top;
}

.dashboard-table th {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7d756c;
}

.dashboard-table td {
  font-size: 14px;
  color: #302a25;
}

.dashboard-empty-cell {
  color: #756e66;
  font-style: italic;
}

.dashboard-user-cell {
  min-width: 220px;
}

.dashboard-user-email {
  font-weight: 600;
  color: #171411;
}

.dashboard-user-meta {
  margin-top: 6px;
  font-size: 12px;
  color: #7a7269;
}

@keyframes dashboardPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 1100px) {
  .dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-detail-grid,
  .dashboard-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard-main {
    padding-bottom: 72px;
  }

  .dashboard-hero {
    padding: 24px;
    border-radius: 24px;
  }

  .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panel,
  .dashboard-stat-card,
  .dashboard-skeleton-card {
    padding: 18px;
  }

  .dashboard-table th,
  .dashboard-table td {
    padding: 12px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-skeleton-card {
    animation: none;
    background: rgba(17,17,17,0.06);
  }
}

.snapshot-drop-zone {
  border: 1.5px dashed rgba(0,0,0,0.15);
  border-radius: 12px;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.snapshot-drop-zone.drag-over {
  border-color: #666;
  background: rgba(0,0,0,0.03);
}

.snapshot-drop-icon {
  font-size: 28px;
  line-height: 1;
}

.snapshot-drop-label {
  font-size: 14px;
  color: #444;
}

.snapshot-browse-btn {
  background: none;
  border: none;
  color: #111;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.snapshot-drop-hint {
  font-size: 12px;
  color: #aaa;
}

.snapshot-preview {
  margin-top: 16px;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 20px;
}

.snap-preview-header {
  margin-bottom: 16px;
}

.snap-preview-label {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin-bottom: 6px;
}

.snap-preview-counts {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #555;
  flex-wrap: wrap;
}

.snap-restore-btn {
  margin-top: 4px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.snap-restore-btn:hover {
  background: #333;
}

.snap-restore-btn:disabled {
  background: #4caf50;
  cursor: default;
}

.snap-error {
  font-size: 13px;
  color: #c00;
}

.snapshot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.snapshot-list-empty {
  font-size: 13px;
  color: #aaa;
}

.snap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #f5f5f5;
  border-radius: 10px;
}

.snap-row-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.snap-row-label {
  font-size: 13px;
  font-weight: 500;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snap-row-counts {
  font-size: 12px;
  color: #888;
}

.snap-row-btn {
  flex-shrink: 0;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 7px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.snap-row-btn:hover {
  background: #333;
}

.snap-row-btn:disabled {
  background: #4caf50;
  cursor: default;
}

.movie-card {
  position: relative;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  overflow: hidden;
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}

.movie-card {
  gap: 8px;
}

.movie-card--interactive:hover,
.movie-card--interactive:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.16);
}

.movie-card .card-info {
  padding: 0 4px 8px 4px;
  margin-top: 0;
  background: #fff;
  flex-direction: row;
  align-items: flex-start;
}

.movie-card .card-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 4px;
}

.movie-card .card-trade {
  font-size: 12px;
  margin: 0 4px;
  display: flex;
  gap: 4px;
  min-width: 0;
}

.movie-card .card-director {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

.movie-card .card-year {
  flex-shrink: 0;
  color: #888;
}

.card-info-left {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.card-ratings {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-left: auto;
  padding-left: 6px;
  align-items: flex-end;
  flex-shrink: 0;
}

.card-rating {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.card-rating-imdb {
  background: #f5c518;
  color: #000;
}

.card-rating-rt {
  background: #fa320a;
  color: #fff;
}

.card-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 42%, rgba(255,255,255,0.08) 72%, transparent);
}

.movie-card--interactive:hover .card-sheen,
.movie-card--interactive:focus-within .card-sheen {
  opacity: 1;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.card-name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #111;
}

.card-trade {
  font-size: 13px;
  font-weight: 400;
  color: #888;
}


.card {
  cursor: pointer;
}

.sortable-ghost {
  opacity: 0;
}

.standards-slot-ghost {
  opacity: 0.3;
}

.ctx-menu {
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
  position: fixed;
  z-index: 9999;
  background: #1c1c1e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  min-width: 160px;
}

.ctx-item {
  display: block;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  border-radius: 7px;
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.ctx-item:hover {
  background: rgba(255,255,255,0.1);
}

.ctx-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 4px 0;
}

/* ── Film search modal ─────────────────────────────────────────────────────── */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  backdrop-filter: blur(6px);
}

.search-modal {
  background: #1c1c1e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  width: 560px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
  overflow: hidden;
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  caret-color: #fff;
}

.search-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.search-modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.search-modal-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.search-results {
  max-height: 440px;
  overflow-y: auto;
  padding: 6px 0;
}

.search-empty {
  padding: 24px;
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-size: 14px;
}

.search-result-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.12s;
}

.search-result-row:hover {
  background: rgba(255,255,255,0.07);
}

.search-result-poster {
  flex-shrink: 0;
  width: 40px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  background: #2e2e2e;
}

.search-result-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-result-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.search-result-title {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-year {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

.search-result-type {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 3px 7px 2px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.58);
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.search-result-ratings {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.search-add-btn {
  flex-shrink: 0;
  margin-left: 12px;
  padding: 6px 16px;
  background: #2d6a3f;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  align-self: center;
}

.search-add-btn:hover {
  background: #38854f;
}

.search-add-btn.search-add-btn-exists {
  background: rgba(255,255,255,0.06);
  color: #666;
  cursor: default;
  font-size: 11px;
}

.search-rating-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.search-rating-imdb {
  background: #f5c518;
  color: #000;
}

.search-rating-tmdb {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8);
}

.search-rating-rt {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
}

.sort-locked .movie-card,
.sort-locked .movie-card * {
  cursor: default !important;
}

.grid:not(.sort-locked) .movie-card {
  cursor: grab;
}

.grid:not(.sort-locked) .movie-card:active {
  cursor: grabbing;
}

@media (max-width: 640px) {
  header {
    padding: 32px 24px 24px;
  }

  main {
    padding: 0 24px 60px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 20px;
  }

}

/* ── Movie Modal ──────────────────────────────────────────────────────────── */

.movie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  box-sizing: border-box;
}

.mm-nav-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.mm-nav-btn:hover { background: rgba(255,255,255,0.2); }

.mm-nav-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  pointer-events: none;
}

.movie-modal {
  position: relative;
  background: #161616;
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  scrollbar-width: none;
}

.movie-modal::-webkit-scrollbar { display: none; }

.movie-modal--live {
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.0),
    0 0 0 1.5px rgba(255, 215, 0, 0.55),
    0 0 32px 4px rgba(255, 215, 0, 0.18),
    0 24px 64px rgba(0,0,0,0.6);
  animation: mm-live-pulse 2.8s ease-in-out infinite;
}

.movie-modal--live::before {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1.5px;
  background: linear-gradient(
    135deg,
    rgba(255,215,0,0.75) 0%,
    rgba(255,215,0,0.15) 30%,
    rgba(255,215,0,0.0) 50%,
    rgba(255,215,0,0.15) 70%,
    rgba(255,215,0,0.75) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 0;
}

@keyframes mm-live-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1.5px rgba(255,215,0,0.45),
      0 0 28px 2px rgba(255,215,0,0.12),
      0 24px 64px rgba(0,0,0,0.6);
  }
  50% {
    box-shadow:
      0 0 0 1.5px rgba(255,215,0,0.7),
      0 0 48px 10px rgba(255,215,0,0.25),
      0 24px 64px rgba(0,0,0,0.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .movie-modal--live { animation: none; }
}

.movie-modal-close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s;
}
.movie-modal-close:hover { background: rgba(255,255,255,0.15); }

/* Not-found bar — shown when deep-linking to a film not in any list */
.mm-not-found-bar[hidden] { display: none; }
.mm-not-found-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-wrap: wrap;
}

.mm-not-found-msg {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mm-not-found-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mm-add-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.mm-add-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.mm-add-btn:active {
  background: rgba(255, 255, 255, 0.18);
}

.movie-modal-body {
  display: flex;
  gap: 36px;
  padding: 32px;
  padding-top: 8px;
  clear: both;
}

.mm-poster-col {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 24px;
  align-self: flex-start;
}

.mm-watch-btn {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 0;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: border-color 0.2s cubic-bezier(0.23, 1, 0.32, 1),
              color 0.2s cubic-bezier(0.23, 1, 0.32, 1),
              background 0.2s cubic-bezier(0.23, 1, 0.32, 1);
  text-align: center;
}

.mm-watch-btn:hover {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}

.mm-watch-btn:active {
  transform: scale(0.97);
  opacity: 0.75;
  transition-duration: 0.08s;
}

.mm-watch-btn:focus-visible {
  outline: 2px solid rgba(255,215,0,0.6);
  outline-offset: 2px;
}

.mm-anticipate-btn {
  margin-bottom: 6px;
}

.mm-action-btn {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  width: 100%;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-align: center;
  margin-top: 6px;
}

.mm-action-btn:hover {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.04);
}

.mm-action-btn:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

.mm-ratings {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.mm-ratings .mm-rating-badge {
  flex: 1;
  justify-content: center;
}

.mm-rating-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.mm-rating-badge:active { opacity: 0.75; }

.mm-rating-badge:focus-visible {
  outline: 2px solid rgba(255,215,0,0.6);
  outline-offset: 2px;
}

.mm-rating-imdb { background: rgba(245,197,24,0.15); color: #f5c518; }
.mm-rating-imdb:hover { background: rgba(245,197,24,0.25); }

.mm-rating-logo {
  background: #f5c518;
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.mm-rating-rt { background: rgba(255,255,255,0.06); }
.mm-rating-rt:hover { background: rgba(255,255,255,0.12); }
.mm-rating-rt--fresh { background: rgba(210,60,60,0.12); color: #d9918e; }
.mm-rating-rt--fresh:hover { background: rgba(210,60,60,0.2); }
.mm-rating-rt--rotten { background: rgba(80,180,80,0.12); color: #8ecf8e; }
.mm-rating-rt--rotten:hover { background: rgba(80,180,80,0.2); }

.mm-poster {
  width: 200px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  box-shadow: 0 8px 32px rgba(0,0,0,0.65), 0 2px 8px rgba(0,0,0,0.4);
}

.mm-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mm-info-header {
  position: sticky;
  top: 24px;
  z-index: 2;
  background: #161616;
  padding-bottom: 12px;
  margin-bottom: -12px;
  box-shadow: 0 12px 16px 8px #161616;
}

.mm-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.mm-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-top: 4px;
}
.mm-live-badge {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 215, 0, 0.8);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  top: -2px;
}

.mm-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin-top: 6px;
}

.mm-director-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  transition: border-color 0.15s, color 0.15s;
}

.mm-director-link:hover {
  color: rgba(255,255,255,0.75);
  border-bottom-color: rgba(255,255,255,0.5);
}

.mm-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.mm-genre-tag {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  padding: 3px 8px;
}

.mm-tagline {
  font-size: 14px;
  font-style: italic;
  color: rgba(255,255,255,0.55);
  margin-top: 14px;
  line-height: 1.5;
}

.mm-overview {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin-top: 12px;
}

.mm-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-top: 28px;
  margin-bottom: 12px;
}

.mm-tv-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.mm-tv-fact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: inherit;
  text-decoration: none;
}

.mm-tv-fact-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.34);
}

.mm-tv-fact-value {
  font-size: 14px;
  color: rgba(255,255,255,0.88);
}

.mm-tv-seasons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mm-tv-season-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
}

.mm-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 12px;
}

.mm-section-toggle:hover {
  color: rgba(255,255,255,0.55);
}

.mm-section-chevron {
  width: 10px;
  height: 6px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.mm-section--collapsed .mm-section-chevron {
  transform: rotate(-90deg);
}

.mm-section-body {
  margin-top: 0;
}

.mm-cast {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 3px 0 4px 3px;
}
.mm-cast::-webkit-scrollbar { display: none; }

.mm-cast-item { flex-shrink: 0; width: 72px; text-align: center; text-decoration: none; color: inherit; cursor: pointer; }
.mm-cast-item:hover .mm-cast-photo { outline: 2px solid rgba(255,255,255,0.4); }
.mm-cast-item:hover .mm-cast-name  { color: rgba(255,255,255,0.95); }

.mm-cast-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  margin-bottom: 6px;
}
.mm-cast-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.mm-cast-photo-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: rgba(255,255,255,0.25);
}

.mm-cast-name { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.7); line-height: 1.3; }
.mm-cast-character { font-size: 10px; color: rgba(255,255,255,0.35); margin-top: 2px; line-height: 1.3; }

.mm-crew {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin-bottom: 8px;
}

.mm-crew-row { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; cursor: pointer; }
.mm-crew-row:hover .mm-crew-name { color: rgba(255,255,255,0.95); }
.mm-crew-role { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.3); }
.mm-crew-name { font-size: 13px; color: rgba(255,255,255,0.7); }

/* ── Modal tabs ──────────────────────────────────────────────────────────── */
.mm-tabs {
  display: flex;
  gap: 0;
  margin-top: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mm-tab {
  padding: 8px 16px 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,0.35);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mm-tab:hover { color: rgba(255,255,255,0.6); }
.mm-tab-active {
  color: #fff;
  border-bottom-color: rgba(255,215,0,0.7);
}
.mm-tab-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,215,0,0.7);
  flex-shrink: 0;
}
.mm-tab-content {
  padding-top: 4px;
}

.mm-info-header--no-shadow {
  box-shadow: none;
}

/* ── Session tab content ─────────────────────────────────────────────────── */
.mm-session-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-top: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,215,0,0.2);
  background: rgba(255,215,0,0.05);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255,215,0,0.8);
}
.mm-session-resume-btn {
  background: transparent;
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 6px;
  color: rgba(255,215,0,0.9);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.mm-session-resume-btn:hover { background: rgba(255,215,0,0.1); border-color: rgba(255,215,0,0.5); }
.mm-session-resume-btn:active { transform: scale(0.97); }

.mm-session-empty {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.25);
  font-style: italic;
  margin-top: 24px;
  line-height: 1.5;
}

/* ── Empty session interactive state ───────────────────────────────────────── */

.mm-es-facts { margin-bottom: 4px; }
.mm-es-facts-loading {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  font-style: italic;
  padding: 8px 0;
}

.mm-es-toolbar {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 12px;
}

.mm-es-fact-btn {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.mm-es-fact-btn:hover {
  border-color: rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.04);
}
.mm-es-fact-btn:disabled { opacity: 0.4; cursor: default; }

.mm-es-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: none;
  margin-bottom: 10px;
}
.mm-es-thread:empty { display: none; }
.mm-es-thread::-webkit-scrollbar { display: none; }

.mm-es-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
}
.mm-es-typing span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,215,0,0.5);
  animation: mm-es-dot 1.2s ease-in-out infinite;
}
.mm-es-typing span:nth-child(2) { animation-delay: 0.2s; }
.mm-es-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes mm-es-dot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.mm-es-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.mm-es-input {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.85);
  resize: none;
  outline: none;
  overflow-y: hidden;
  transition: border-color 0.2s;
}
.mm-es-input::placeholder { color: rgba(255,255,255,0.25); }
.mm-es-input:focus { border-color: rgba(255,255,255,0.22); }

.mm-es-send-btn {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.mm-es-send-btn svg { width: 14px; height: 14px; }
.mm-es-send-btn:hover {
  border-color: rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.06);
}
.mm-es-send-btn:disabled { opacity: 0.3; cursor: default; }

.mm-session-fact {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
  margin-bottom: 8px;
}
.mm-session-fact-pct {
  font-family: 'Oswald', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,215,0,0.6);
  margin-bottom: 5px;
}
.mm-session-fact-text {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.75);
}

.mm-session-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.mm-session-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
.mm-session-msg-user {
  align-self: flex-end;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 10px 10px 3px 10px;
}
.mm-session-msg-assistant {
  align-self: flex-start;
  background: rgba(255,215,0,0.04);
  border: 1px solid rgba(255,215,0,0.1);
  color: rgba(255,255,255,0.8);
  border-radius: 10px 10px 10px 3px;
}

.mm-loading-bar {
  height: 12px;
  border-radius: 4px;
  background: rgba(255,255,255,0.07);
  margin-top: 12px;
  width: 100%;
}
/* Skeleton sizes matched to real rendered dimensions to minimise layout shift */
/* rating badge: flex:1 matches real mm-rating-badge flex:1; height 34px = 7px padding×2 + 20px content */
.mm-skel-rating  { flex: 1; height: 34px; border-radius: 8px; margin-top: 0; }
/* genre tag: 19px measured from real rendered tag (4px padding×2 + 11px font = 19px); radius matches .mm-genre-tag */
.mm-skel-tag     { width: 72px; height: 19px; border-radius: 4px; margin-top: 0; flex-shrink: 0; }
/* watch btn: 9px padding×2 + 11px font × 1.4 lh = 33px, border 1px = 35px */
.mm-skel-watch-btn { height: 35px; border-radius: 6px; margin-top: 0; }
/* tagline: 14px font × 1.5 lh = 21px */
.mm-skel-tagline { width: 70%; height: 21px; margin-top: 12px; border-radius: 4px; }
/* overview lines: 14px font × 1.7 lh = 24px; gap between lines matches 1.7 line-height */
.mm-skel-overview { height: 14px; margin-top: 10px; }
/* section label: 10px font × 1.4 lh = 14px */
.mm-skel-label   { width: 60px; height: 12px; margin-top: 24px; margin-bottom: 12px; }
.mm-skel-circle  { border-radius: 50% !important; width: 72px; height: 72px; margin-top: 0; flex-shrink: 0; }
/* cast name: 11px font × 1.3 lh = 14px */
.mm-skel-cast-name { width: 80%; height: 14px; margin-top: 6px; }
/* cast character: 10px font × 1.3 lh = 13px; second bar shorter to simulate wrap */
.mm-skel-cast-char { width: 60%; height: 13px; margin-top: 2px; }
.mm-skel-cast-char--2 { width: 40%; margin-top: 2px; }
/* crew role: 10px font × 1.4 lh = 14px */
.mm-skel-crew-role { width: 40%; height: 14px; margin-top: 0; }
/* crew name: 13px font × 1.4 lh = 18px */
.mm-skel-crew-name { width: 55%; height: 18px; margin-top: 0; }

/* ── Cinema Persona ───────────────────────────────────────────────────────── */

#persona-wrap {
  margin: 40px 0 32px;
}

.persona-card {
  border-radius: 16px;
  overflow: hidden;
  background: #0d0d0d;
  position: relative;
}

.persona-room-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  background: #111;
  overflow: hidden;
}

.persona-room-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
  display: block;
}

.persona-room-img.loaded {
  opacity: 1;
}

/* Gradient vignette — always present so text stays readable */
.persona-room-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,  rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.4) 45%, rgba(0,0,0,0.0) 70%),
    linear-gradient(to right, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 40%);
  pointer-events: none;
  z-index: 1;
}

.persona-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 40px 36px;
  z-index: 2;
}

.persona-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
}

.persona-type {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 10px;
}

.persona-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  color: rgba(255,255,255,0.7);
  margin-bottom: 10px;
  line-height: 1.5;
}

.persona-description {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  max-width: 560px;
}

/* Loading shimmer */
.persona-room-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: persona-shimmer 1.6s infinite;
}

@keyframes persona-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.persona-skel {
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  display: block;
}

/* Stats bar */
.persona-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
  background: rgba(0,0,0,0.35);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.persona-stats-loading {
  gap: 10px;
}

.persona-stat-skel {
  height: 36px;
  width: 130px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  animation: persona-shimmer 1.6s infinite;
  background-size: 200% 100%;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 75%);
}

.persona-stat-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}

.persona-stat-icon {
  font-size: 14px;
  line-height: 1;
}

.persona-stat-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}

.persona-stat-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-left: 2px;
}

/* Navigation arrows */
.persona-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.15s;
  backdrop-filter: blur(8px);
}

.persona-room-wrap:hover .persona-nav {
  opacity: 1;
}

.persona-nav:hover {
  background: rgba(0,0,0,0.6);
}

.persona-nav-prev { left: 16px; }
.persona-nav-next { right: 16px; }

.persona-refresh-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0,0,0,0.45);
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, color 0.15s;
  z-index: 4;
}
.persona-room-wrap:hover .persona-refresh-btn { opacity: 1; }
.persona-refresh-btn:hover { color: #fff; }

.persona-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: rgba(0,0,0,0.04);
  border-radius: 12px;
}
.persona-generate-btn {
  background: none;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: rgba(0,0,0,0.5);
  transition: background 0.15s, color 0.15s;
}
.persona-generate-btn:hover { background: rgba(0,0,0,0.06); color: rgba(0,0,0,0.8); }

.persona-hide-btn {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 11px;
  color: rgba(0,0,0,0.3);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
}
.persona-hide-btn:hover { color: rgba(0,0,0,0.6); }

/* Dots */
.persona-dots {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}

.persona-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.persona-dot.active {
  background: #fff;
  transform: scale(1.3);
}

.persona-dot:hover {
  background: rgba(255,255,255,0.6);
}

/* ── Now Watching Widget ──────────────────────────────────────────────────── */

.nww {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 8000;
  font-family: 'Inter', sans-serif;
}

/* Idle button */
.nww-idle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  background: #1a1a1a;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.3s, transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  animation: nww-breathe 4s ease-in-out infinite;
}
.nww-idle-btn:hover {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  animation: none;
}
.nww-idle-btn:active {
  transform: scale(0.92);
}
@keyframes nww-breathe {
  0%, 100% { box-shadow: 0 4px 16px rgba(0,0,0,0.4); border-color: rgba(255,255,255,0.08); }
  50% { box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 20px rgba(255,215,0,0.18); border-color: rgba(255,215,0,0.15); }
}

/* Collapsed pill */
.nww-pill {
  display: none;
  align-items: center;
  gap: 10px;
  width: 280px;
  height: 48px;
  padding: 0 14px;
  border-radius: 24px;
  background: #1a1a1a;
  border: 2px solid transparent;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transform: translateY(0) scale(1);
  transform-origin: center;
  transition: transform 0.18s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.18s ease-out;
}
.nww--playing .nww-pill {
  background:
    linear-gradient(#1a1a1a, #1a1a1a) padding-box,
    conic-gradient(
      from var(--card-angle),
      rgba(200, 134, 10, 0) 0deg,
      rgba(200, 134, 10, 0) 140deg,
      #fff5b0 155deg,
      #ffd700 168deg,
      #e8c060 180deg,
      #ffd700 192deg,
      #fff5b0 205deg,
      rgba(200, 134, 10, 0) 220deg,
      rgba(200, 134, 10, 0) 360deg
    ) border-box;
  animation: card-border-rotate 6s linear infinite;
  filter:
    drop-shadow(0 0 3px rgba(255, 215, 0, 0.95))
    drop-shadow(0 0 8px rgba(220, 160, 20, 0.75))
    drop-shadow(0 0 18px rgba(200, 120, 10, 0.45));
}
.nww.nww--playing.nww--pill-enter .nww-pill {
  animation:
    nww-pill-in 0.22s cubic-bezier(0.23, 1, 0.32, 1) both,
    card-border-rotate 6s linear infinite;
}
@media (hover: hover) and (pointer: fine) {
  .nww--playing .nww-pill:hover {
    transform: translateY(-1px) scale(1.02);
  }
}
.nww--playing .nww-pill:active {
  transform: scale(0.98);
}
/* Panel-in timing defined here; state visibility rules must NOT re-declare animation */
.nww--expanded .nww-panel,
.nww--deciding .nww-panel {
  animation: nww-panel-in 0.25s cubic-bezier(0.23, 1, 0.32, 1) both;
}
.nww.nww--suppress-enter .nww-panel,
.nww.nww--suppress-enter .nww-playing > * {
  animation: none !important;
}
.nww-pill-poster {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #333;
  box-shadow: 0 0 0 0 rgba(255,255,255,0);
  transition: box-shadow 0.6s;
}
.nww--playing .nww-pill-poster {
  animation: nww-poster-glow 3s ease-in-out infinite;
}
.nww--paused .nww-pill-poster {
  animation: none;
  opacity: 0.6;
}
@keyframes nww-poster-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(255,255,255,0.08); }
  50% { box-shadow: 0 0 12px rgba(255,255,255,0.25); }
}
.nww-pill-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nww-pill-title {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.nww-pill-time {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.nww-pill-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.06);
}
.nww-pill-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(255,255,255,0.25), rgba(255,215,0,0.5));
  transition: none;
}

/* Expanded panel */
.nww-panel {
  display: none;
  width: 320px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  padding: 20px;
  flex-direction: column;
  gap: 12px;
  transform-origin: bottom right;
  transition: border-radius 0.32s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.32s ease-out;
}
@keyframes nww-panel-in {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
@keyframes nww-panel-out {
  from { opacity: 1; transform: scale(1)    translateY(0); }
  to   { opacity: 0; transform: scale(0.94) translateY(8px); }
}
@keyframes nww-pill-in {
  from { opacity: 0; transform: scale(0.94) translateY(4px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
/* Staggered content reveals inside the expanded panel */
.nww--expanded .nww-playing > *,
.nww--deciding .nww-playing > * {
  animation: nww-content-in 0.25s cubic-bezier(0.23, 1, 0.32, 1) both;
}
.nww--expanded .nww-playing > *:nth-child(1),
.nww--deciding .nww-playing > *:nth-child(1) { animation-delay: 0ms; }
.nww--expanded .nww-playing > *:nth-child(2),
.nww--deciding .nww-playing > *:nth-child(2) { animation-delay: 30ms; }
.nww--expanded .nww-playing > *:nth-child(3),
.nww--deciding .nww-playing > *:nth-child(3) { animation-delay: 60ms; }
.nww--expanded .nww-playing > *:nth-child(4),
.nww--deciding .nww-playing > *:nth-child(4) { animation-delay: 90ms; }
.nww--expanded .nww-playing > *:nth-child(5),
.nww--deciding .nww-playing > *:nth-child(5) { animation-delay: 120ms; }
.nww--expanded .nww-playing > *:nth-child(6),
.nww--deciding .nww-playing > *:nth-child(6) { animation-delay: 150ms; }
@keyframes nww-content-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Search sub-panel */
.nww-search { display: none; flex-direction: column; gap: 10px; }
.nww-search-header {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #555;
}
.nww-search-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  box-sizing: border-box;
}
.nww-search-input:focus { border-color: rgba(255,255,255,0.2); }
.nww-quick-picks { display: flex; flex-direction: column; gap: 4px; }
.nww-quick-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nww-quick-pick:hover { background: rgba(255,255,255,0.06); }
.nww-quick-pick-poster {
  width: 28px;
  height: 42px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  background: #333;
}
.nww-quick-pick-poster img { width: 100%; height: 100%; object-fit: cover; }
.nww-quick-pick-info { flex: 1; min-width: 0; }
.nww-quick-pick-title {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.nww-quick-pick-year { font-size: 11px; color: rgba(255,255,255,0.35); }
.nww-search-results { display: flex; flex-direction: column; gap: 2px; max-height: 200px; overflow-y: auto; }
.nww-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}
.nww-search-row:hover { background: rgba(255,255,255,0.06); }
.nww-search-empty { font-size: 12px; color: rgba(255,255,255,0.3); padding: 8px; }

/* Playing sub-panel */
.nww-playing { display: none; flex-direction: column; align-items: center; gap: 10px; overflow: visible; }
.nww-poster-wrap {
  position: relative;
  width: 120px;
  height: 180px;
  flex-shrink: 0;
  overflow: visible;
  margin-bottom: 8px;
}
.nww-poster {
  width: 120px;
  height: 180px;
  border-radius: 6px;
  object-fit: cover;
  position: relative;
  z-index: 1;
  transform: translateY(-4px);
  box-shadow:
    0 12px 32px rgba(0,0,0,0.5),
    0 4px 12px rgba(0,0,0,0.3);
}
.nww-poster-wrap .poster-texture {
  z-index: 2;
  border-radius: 6px;
  transform: translateY(-4px);
}
.nww-poster-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, rgba(255,215,0,0.5) 0%, rgba(255,165,0,0.3) 40%, transparent 70%);
  filter: blur(8px);
  z-index: 0;
  opacity: 0.72;
}
.nww-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  text-align: center;
  line-height: 1.2;
}
.nww-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-align: center;
}
.nww-progress-wrap { width: 100%; position: relative; }
.nww-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.nww-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(255,255,255,0.3), rgba(255,215,0,0.55));
  border-radius: 3px;
  transition: none;
}
/* Fact position dots on progress bar */
.nww-fact-dot {
  position: absolute;
  top: 0;
  width: 2px;
  height: 6px;
  border-radius: 1px;
  transform: translateX(-50%);
  background: rgba(255,215,0,0.25);
  pointer-events: none;
  transition: background 0.4s, box-shadow 0.4s;
  z-index: 2;
}
.nww-fact-dot.nww-fact-dot-delivered {
  background: rgba(255,215,0,0.85);
  box-shadow: 0 0 4px rgba(255,215,0,0.5);
}

.nww-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.nww-controls {
  display: none;
  gap: 8px;
  width: 100%;
}
.nww-btn {
  flex: 1;
  padding: 8px 0;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, transform 0.1s;
}
.nww-btn:hover {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
}
.nww-btn:active { transform: scale(0.96); }
.nww-btn-done { border-color: rgba(255,255,255,0.15); }
.nww-btn-abandon { color: rgba(204,85,85,0.7); border-color: rgba(204,85,85,0.2); }
.nww-btn-abandon:hover { color: rgba(204,85,85,1); border-color: rgba(204,85,85,0.4); background: rgba(204,85,85,0.06); }

/* Decisions */
.nww-decisions {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.nww-decisions-label {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #555;
  text-align: center;
  margin-bottom: 4px;
}
.nww-dec-btn {
  width: 100%;
  padding: 10px 0;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.2s, background 0.2s, transform 0.1s;
}
.nww-dec-btn:active { transform: scale(0.97); }
.nww-dec-collection:hover {
  border-color: rgba(255,215,0,0.4);
  color: #fff;
  background: rgba(255,215,0,0.06);
}
.nww-dec-meh:hover {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}
.nww-dec-ban:hover {
  border-color: rgba(204,85,85,0.35);
  color: rgba(255,255,255,0.85);
  background: rgba(204,85,85,0.06);
}
.nww-confirmation {
  display: none;
  font-size: 13px;
  color: rgba(255,215,0,0.8);
  text-align: center;
  padding: 8px 0;
  animation: nww-confirm-in 0.3s cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes nww-confirm-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* State visibility */
.nww--idle .nww-idle-btn { display: flex; }
.nww--idle .nww-pill { display: none; }
.nww--idle .nww-panel { display: none; }

.nww--searching .nww-idle-btn { display: none; }
.nww--searching .nww-pill { display: none; }
.nww--searching .nww-panel { display: flex; }
.nww--searching .nww-search { display: flex; }
.nww--searching .nww-playing { display: none; }

.nww--playing .nww-idle-btn { display: none; }
.nww--playing .nww-pill { display: flex; }
.nww--playing .nww-panel { display: none; }
.nww--playing .nww-playing { display: flex; }

.nww--expanded .nww-idle-btn { display: none; }
.nww--expanded .nww-pill { display: none; }
.nww--expanded .nww-panel { display: flex; }
.nww--expanded .nww-search { display: none; }
.nww--expanded .nww-playing { display: flex; }

.nww--deciding .nww-idle-btn { display: none; }
.nww--deciding .nww-pill { display: none; }
.nww--deciding .nww-panel { display: flex; }
.nww--deciding .nww-search { display: none; }
.nww--deciding .nww-playing { display: flex; }

.nww[data-playing-view="controls"] .nww-controls { display: flex; }
.nww[data-playing-view="decisions"] .nww-decisions { display: flex; }
.nww[data-playing-view="confirmation"] .nww-confirmation { display: block; }

/* Pulse animation for completion */
@keyframes nww-pulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 0 rgba(255,215,0,0); }
  50% { box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 24px rgba(255,215,0,0.3); }
}
.nww--complete .nww-pill {
  animation: nww-pulse 2.5s ease-in-out infinite;
  border-color: rgba(255,215,0,0.2);
}
.nww--complete .nww-pill-bar-fill {
  background: linear-gradient(90deg, rgba(255,215,0,0.5), rgba(255,215,0,0.7));
}

/* Paused state — dimmed pill */
.nww--paused .nww-pill {
  opacity: 0.7;
  transition: opacity 0.4s;
}
.nww--paused .nww-pill-time {
  color: rgba(255,255,255,0.25);
}

/* Poster entrance handled by nww-content-in stagger (nth-child 1) */

/* Quick pick stagger entrance */
.nww-quick-pick {
  animation: nww-pick-in 0.2s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes nww-pick-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .watch-diary-panel,
  .movies-content { transition: none !important; }
  .nww-idle-btn { animation: none !important; }
  .nww--searching .nww-panel,
  .nww--expanded .nww-panel,
  .nww--deciding .nww-panel { animation: none !important; }
  .nww--expanded .nww-playing > *,
  .nww--deciding .nww-playing > * { animation: none !important; }
  .nww-poster { animation: none !important; }
  .nww-poster-glow { animation: none !important; }
  .nww-confirmation { animation: none !important; }
  .nww-quick-pick { animation: none !important; }
  .nww--playing .nww-pill { animation: none !important; }
  .nww--complete .nww-pill { animation: none !important; }
  .nww--playing .nww-pill-poster { animation: none !important; }
  .nww-pill { transition: none !important; }
  .nww--playing .nww-pill:hover,
  .nww--playing .nww-pill:active { transform: none !important; }
  .nww-btn:active, .nww-dec-btn:active { transform: none !important; }
  .nww-idle-btn:active { transform: none !important; }
  .nww--diary-open .nww-diary { animation: none !important; }
  .nww--diary-open .nww-panel { animation: none !important; }
  .nww-diary-entry,
  .nww-diary-entries .nww-diary-empty { animation: none !important; }
}

/* Mobile */
@media (max-width: 600px) {
  /* Column + the desktop's align-items:flex-start sized the content to its widest child
     (tab row, rec toggles) — 900+px on a phone. Stretch to the screen instead. */
  .movies-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding-right: 0;
  }
  .watch-diary-panel {
    position: static;
    bottom: auto;
    right: auto;
    top: auto;
    z-index: auto;
    width: 100%;
    height: auto;
    max-height: none;
    border-left: none;
  }
  .watch-diary-panel::after {
    display: none;
  }
  .watch-diary-open .watch-diary-panel {
    width: 100%;
    flex-basis: auto;
  }
  .watch-diary-open .movies-content {
    transform: none;
  }
  .nww { right: 0; bottom: 0; left: 0; }
  .nww-pill { width: 100%; border-radius: 0; height: 44px; }
  .nww-panel { width: 100%; border-radius: 16px 16px 0 0; }
  .nww-idle-btn { position: fixed; right: 16px; bottom: 16px; }
  .nww-companion-open-btn { display: none !important; }
  .nww--companion-open { width: 100% !important; flex-direction: column !important; border-radius: 16px 16px 0 0 !important; }
  .nww--companion-open .nww-panel { flex: 0 0 auto !important; border-right: none !important; border-bottom: 1px solid rgba(255,255,255,0.07) !important; }
  .nww--companion-open .nww-companion { flex: 1 !important; }
  .nww--diary-open { width: 100% !important; flex-direction: column !important; border-radius: 16px 16px 0 0 !important; }
  .nww--diary-open .nww-panel {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-height: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  }
  .nww--diary-open .nww-poster-wrap,
  .nww--diary-open .nww-poster {
    width: 160px;
    height: 240px;
  }
  .nww--diary-open .nww-diary {
    flex: 1 !important;
    height: auto !important;
    max-height: none !important;
  }
  .nww-diary-form-grid {
    grid-template-columns: 1fr;
  }
  .nww-diary-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .nww-diary-flag {
    justify-content: flex-start;
  }
  .nww-diary-submit {
    width: 100%;
  }
}

/* ── Now Watching Companion ──────────────────────────────────────────────── */

/* Companion open button (shown inside controls panel) */
.nww-companion-open-btn {
  display: none;
  width: 100%;
  margin-top: 6px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.nww-companion-open-btn:hover {
  border-color: rgba(255,215,0,0.35);
  color: rgba(255,255,255,0.85);
  background: rgba(255,215,0,0.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.nww-companion-open-btn:active { transform: scale(0.97) translateY(0); }

/* Diary open button */
.nww-diary-open-btn {
  display: none;
  width: 100%;
  margin-top: 6px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.nww-diary-open-btn:hover {
  border-color: rgba(255,215,0,0.35);
  color: rgba(255,255,255,0.85);
  background: rgba(255,215,0,0.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.nww-diary-open-btn:active { transform: scale(0.97) translateY(0); }

/* Show button only when expanded or deciding */
.nww--expanded .nww-companion-open-btn,
.nww--deciding .nww-companion-open-btn { display: block; }
.nww--expanded .nww-diary-open-btn,
.nww--deciding .nww-diary-open-btn { display: block; }

/* Hide when companion is already open */
.nww--companion-open .nww-companion-open-btn { display: none !important; }
.nww--diary-open .nww-diary-open-btn { display: none !important; }

/* ── Layout: companion open — single unified card ────────────────────────── */

/* Container becomes one seamless 700px card */
.nww--companion-open {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch;
  width: 700px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

/* Container becomes one seamless diary card */
.nww--diary-open {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch;
  width: min(760px, calc(100vw - 32px));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

/* Main panel: left side, loses own border/shadow/radius */
.nww--companion-open .nww-panel {
  order: 1;
  flex: 0 0 320px;
  max-height: 620px;
  border: none !important;
  border-right: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  animation: none !important;
  overflow-y: auto;
  justify-content: center;
}

.nww--diary-open .nww-panel {
  order: 1;
  flex: 0 0 320px;
  max-height: 640px;
  border: none !important;
  border-right: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  animation: none !important;
  overflow-y: auto;
  justify-content: center;
}

.nww--companion-open .nww-poster-wrap {
  width: 200px;
  height: 300px;
}
.nww--companion-open .nww-poster {
  width: 200px;
  height: 300px;
  border-radius: 8px;
}

.nww--diary-open .nww-poster-wrap {
  width: 200px;
  height: 300px;
}
.nww--diary-open .nww-poster {
  width: 200px;
  height: 300px;
  border-radius: 8px;
}

/* Companion panel */
.nww-companion {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
}

.watch-diary-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(214, 184, 116, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(244, 240, 232, 0.92), rgba(255, 255, 255, 0.98));
  color: #181511;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(17,17,17,0.08);
}
.watch-diary-panel::after {
  content: "";
  position: sticky;
  display: block;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  margin-top: -72px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.9) 65%, rgba(255,255,255,0.98));
  border-radius: 0 0 20px 20px;
  z-index: 4;
}

/* Companion panel: right side, loses own border/shadow/radius, slides in */
.nww--companion-open .nww-companion {
  display: flex;
  order: 2;
  flex: 1;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #1a1a1a;
  max-height: 620px;
  height: 620px;
  transform-origin: bottom center;
  animation: nww-companion-rise-in 0.34s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.watch-diary-open .watch-diary-panel {
  animation: nww-diary-rise-in 0.34s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes nww-companion-rise-in {
  from { opacity: 0; transform: translateY(42px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes nww-companion-drop-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(42px) scale(0.96); }
}

/* Playing panel physics: slides toward center when companion takes its original slot */
@keyframes nww-panel-companion-shift-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-26px); }
}
@keyframes nww-panel-companion-shift-right {
  0%   { transform: translateX(-26px); }
  100% { transform: translateX(0); }
}

@keyframes nww-diary-rise-in {
  from { opacity: 0; transform: translateY(42px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes nww-diary-drop-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(42px) scale(0.96); }
}
@keyframes nww-panel-diary-shift-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-26px); }
}
@keyframes nww-panel-diary-shift-right {
  0%   { transform: translateX(-26px); }
  100% { transform: translateX(0); }
}

/* ── Companion header ────────────────────────────────────────────────────── */
.nww-companion-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nww-diary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.nww-diary-header-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nww-diary-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.nww-diary-entry-count {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: rgba(24,21,17,0.35);
  letter-spacing: 0.01em;
}
.nww-diary-kicker,
.nww-diary-entries-title {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,215,0,0.58);
}
.nww-diary-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 16px;
  color: #181511;
  line-height: 1.2;
}
.nww-diary-subtitle,
.nww-diary-empty-copy,
.nww-diary-entries-subtitle {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(24,21,17,0.55);
}
.nww-diary-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(24,21,17,0.08);
  border-radius: 50%;
  color: rgba(24,21,17,0.45);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.nww-diary-close:hover { color: rgba(24,21,17,0.85); border-color: rgba(24,21,17,0.2); }
.nww-diary-close:active { transform: scale(0.92); }

.watch-diary-tabs {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin-bottom: -4px;
}
.watch-diary-toolbar {
  min-height: 32px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}
.watch-diary-toolbar[hidden] {
  display: none;
}
.watch-diary-toolbar-btn {
  border: 1px solid rgba(181,137,42,0.18);
  background: rgba(181,137,42,0.08);
  color: rgba(130,94,18,0.95);
  border-radius: 999px;
  padding: 7px 11px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, opacity 0.2s;
}
.watch-diary-toolbar-btn:hover {
  background: rgba(181,137,42,0.14);
  border-color: rgba(181,137,42,0.3);
  color: #181511;
}
.watch-diary-toolbar-btn:active {
  transform: scale(0.98);
}
.watch-diary-toolbar-btn:disabled {
  opacity: 0.68;
  cursor: wait;
}
.watch-diary-tab {
  border: 1px solid rgba(24,21,17,0.08);
  background: rgba(255,255,255,0.56);
  color: rgba(24,21,17,0.58);
  border-radius: 999px;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.watch-diary-tab.is-active {
  background: rgba(181,137,42,0.12);
  border-color: rgba(181,137,42,0.24);
  color: #181511;
}
.watch-diary-panel-view {
  display: none;
  min-height: 0;
}
.watch-diary-panel-view.is-active {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 18px 88px 24px;
  --timeline-rail-center: 8px;
  --timeline-list-padding-left: 18px;
  --timeline-card-start: 26px;
  --timeline-date-start: 18px;
  --timeline-dot-size: 12px;
  --timeline-card-dot-center-y: 20px;
  --timeline-card-dot-center-x: var(--timeline-rail-center);
  --timeline-date-dot-center-x: var(--timeline-rail-center);
}

/* Diary form */
.nww-diary-composer {
  margin: -6px 0 18px 26px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(24,21,17,0.08);
  background: rgba(255,255,255,0.72);
  box-shadow: 0 10px 24px rgba(17,17,17,0.04);
}
.nww-diary-composer[hidden] {
  display: none;
}
.diary-placement-prompt {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: -2px 0 18px 26px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(24,21,17,0.08);
  background:
    radial-gradient(circle at top right, rgba(214, 184, 116, 0.08), transparent 34%),
    rgba(255,255,255,0.74);
  box-shadow: 0 10px 24px rgba(17,17,17,0.04);
}
.diary-placement-prompt[hidden] {
  display: none;
}
.diary-placement-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.diary-placement-msg strong {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  line-height: 1.2;
  color: #181511;
}
.diary-placement-msg span {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(24,21,17,0.62);
}
.diary-placement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.diary-placement-btn,
.diary-placement-dismiss {
  border-radius: 999px;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, color 0.2s;
}
.diary-placement-btn {
  border: 1px solid rgba(181,137,42,0.22);
  background: rgba(255,215,0,0.08);
  color: #181511;
}
.diary-placement-btn:hover {
  background: rgba(255,215,0,0.14);
  border-color: rgba(181,137,42,0.34);
}
.diary-placement-btn:active,
.diary-placement-dismiss:active {
  transform: scale(0.97);
}
.diary-placement-dismiss {
  border: 1px solid rgba(24,21,17,0.12);
  background: rgba(255,255,255,0.72);
  color: rgba(24,21,17,0.72);
}
.diary-placement-dismiss:hover {
  background: rgba(255,255,255,0.92);
  border-color: rgba(24,21,17,0.18);
  color: #181511;
}
.nww-diary-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nww-diary-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.nww-diary-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nww-diary-field-note {
  grid-column: 1 / -1;
}
.nww-diary-field-series {
  display: none;
}
.nww-diary-form-grid.is-tv .nww-diary-field-series {
  display: flex;
}
.nww-diary-field-series-toggle {
  justify-content: flex-end;
}
.nww-diary-field.is-hidden {
  display: none;
}
.nww-diary-form-grid.is-tv .nww-diary-field-note {
  grid-column: 1 / -1;
}
.nww-diary-label {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(24,21,17,0.46);
}
.nww-diary-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 2px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(24,21,17,0.7);
}
.nww-diary-inline-check input {
  width: 16px;
  height: 16px;
}
.nww-diary-input,
.nww-diary-textarea {
  width: 100%;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(24,21,17,0.1);
  border-radius: 8px;
  padding: 10px 11px;
  color: #181511;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.45;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.nww-diary-input:focus,
.nww-diary-textarea:focus {
  border-color: rgba(181,137,42,0.32);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 0 0 2px rgba(181,137,42,0.08);
}
select.nww-diary-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23181511' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
.nww-diary-textarea {
  resize: vertical;
  min-height: 92px;
}
.nww-diary-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 290px;
  z-index: 6;
  display: none;
  flex-direction: column;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(24,21,17,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 18px 36px rgba(17,17,17,0.12);
  backdrop-filter: blur(12px);
}
.nww-diary-search-results.is-open {
  display: flex;
}
.nww-diary-search-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.nww-diary-search-row:hover,
.nww-diary-search-row.is-active {
  background: rgba(181,137,42,0.08);
}
.nww-diary-search-row:active {
  transform: scale(0.99);
}
.nww-diary-search-poster {
  width: 42px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(24,21,17,0.06);
}
.nww-diary-search-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nww-diary-search-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nww-diary-search-title {
  font-size: 13px;
  font-weight: 600;
  color: #181511;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nww-diary-search-meta {
  font-size: 11px;
  color: rgba(24,21,17,0.5);
}
.nww-diary-search-type {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(181,137,42,0.9);
}
.nww-diary-search-empty {
  padding: 10px 8px;
  font-size: 12px;
  color: rgba(24,21,17,0.48);
}
.nww-diary-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.nww-diary-form-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nww-diary-flag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(24,21,17,0.62);
}
.nww-diary-flag input {
  width: 16px;
  height: 16px;
}
.nww-diary-cancel,
.nww-diary-submit {
  padding: 8px 12px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, color 0.2s;
}
.nww-diary-cancel {
  border: 1px solid rgba(24,21,17,0.12);
  background: rgba(255,255,255,0.72);
  color: rgba(24,21,17,0.72);
}
.nww-diary-cancel:hover {
  background: rgba(255,255,255,0.92);
  border-color: rgba(24,21,17,0.18);
  color: #181511;
}
.nww-diary-cancel:active {
  transform: scale(0.97);
}
.nww-diary-submit {
  border: 1px solid rgba(255,215,0,0.25);
  background: rgba(255,215,0,0.08);
  color: #181511;
}
.nww-diary-submit:hover {
  background: rgba(255,215,0,0.14);
  border-color: rgba(255,215,0,0.4);
}
.nww-diary-submit:active { transform: scale(0.97); }

.nww-diary-entries-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
}
.nww-diary-entries {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: visible;
  max-height: none;
  padding: 4px 2px 16px var(--timeline-list-padding-left);
}
.nww-diary-entries::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 8px;
  left: calc(var(--timeline-rail-center) - 0.5px);
  width: 1px;
  background: linear-gradient(180deg, rgba(181,137,42,0.36), rgba(24,21,17,0.08));
}
.nww-diary-timeline-footer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-left: var(--timeline-list-padding-left);
  margin-top: -2px;
}
.nww-diary-day-divider--manual {
  cursor: grab;
  user-select: none;
}
.nww-diary-day-divider--manual:active {
  cursor: grabbing;
}
.nww-diary-day-gap {
  position: relative;
  display: flex;
  align-items: center;
  margin: -6px 0 2px var(--timeline-card-start);
  padding: 14px 16px;
  min-height: 52px;
  border: 1px dashed rgba(181,137,42,0.28);
  border-radius: 14px;
  background: rgba(255,252,244,0.64);
  color: rgba(130,94,18,0.88);
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.nww-diary-day-gap::before {
  content: "";
  position: absolute;
  left: calc(var(--timeline-card-dot-center-x) - var(--timeline-list-padding-left) - var(--timeline-card-start));
  top: var(--timeline-card-dot-center-y);
  width: var(--timeline-dot-size);
  height: var(--timeline-dot-size);
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 999px;
  background: rgba(255,249,232,0.98);
  border: 3px solid rgba(181,137,42,0.86);
  box-shadow: 0 0 0 4px rgba(181,137,42,0.1);
}
.nww-diary-day-gap:hover {
  background: rgba(255,252,244,0.9);
  border-color: rgba(181,137,42,0.46);
  color: rgba(96,68,12,0.96);
}
.nww-diary-day-gap:active {
  transform: scale(0.99);
}
.nww-diary-today-add {
  position: relative;
  display: flex;
  align-items: center;
  margin: -6px 0 2px var(--timeline-card-start);
  padding: 14px 16px;
  min-height: 52px;
  border: 1px dashed rgba(181,137,42,0.28);
  border-radius: 14px;
  background: rgba(255,252,244,0.72);
  color: rgba(130,94,18,0.92);
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.nww-diary-today-add::before {
  content: "";
  position: absolute;
  left: calc(var(--timeline-card-dot-center-x) - var(--timeline-list-padding-left) - var(--timeline-card-start));
  top: var(--timeline-card-dot-center-y);
  width: var(--timeline-dot-size);
  height: var(--timeline-dot-size);
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 999px;
  background: rgba(255,249,232,0.98);
  border: 3px solid rgba(181,137,42,0.86);
  box-shadow: 0 0 0 4px rgba(181,137,42,0.1);
}
.nww-diary-today-add:hover {
  background: rgba(255,252,244,0.94);
  border-color: rgba(181,137,42,0.46);
  color: rgba(96,68,12,0.96);
}
.nww-diary-today-add:active {
  transform: scale(0.99);
}
.nww-diary-add-date-btn {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 0 2px var(--timeline-card-start);
  padding: 14px 16px;
  min-height: 52px;
  border: 1px dashed rgba(181,137,42,0.28);
  border-radius: 14px;
  background: rgba(255,252,244,0.72);
  color: rgba(130,94,18,0.92);
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.nww-diary-add-date-btn::before {
  content: "";
  position: absolute;
  left: calc(var(--timeline-card-dot-center-x) - var(--timeline-list-padding-left) - var(--timeline-card-start));
  top: var(--timeline-card-dot-center-y);
  width: var(--timeline-dot-size);
  height: var(--timeline-dot-size);
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 999px;
  background: rgba(255,249,232,0.98);
  border: 3px solid rgba(181,137,42,0.86);
  box-shadow: 0 0 0 4px rgba(181,137,42,0.1);
}
.nww-diary-add-date-btn:hover {
  background: rgba(255,252,244,0.94);
  border-color: rgba(181,137,42,0.46);
  color: rgba(96,68,12,0.96);
}
.nww-diary-add-date-btn:active {
  transform: scale(0.99);
}
.nww-diary-add-date-confirm {
  border: 1px solid rgba(24,21,17,0.08);
  background: rgba(255,255,255,0.82);
  color: rgba(24,21,17,0.44);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(17,17,17,0.04);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.nww-diary-add-date-confirm:hover {
  background: rgba(255,255,255,0.92);
  border-color: rgba(24,21,17,0.18);
  color: #181511;
}
.nww-diary-add-date-confirm:active {
  transform: scale(0.98);
}
.nww-diary-add-date-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nww-diary-add-date-inline[hidden] {
  display: none;
}
.nww-diary-add-date-inline .nww-diary-input {
  min-width: 180px;
}
.nww-diary-day-divider {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 0 2px var(--timeline-date-start);
  margin-top: 4px;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(24,21,17,0.44);
}
.nww-diary-day-divider::before {
  content: "";
  position: absolute;
  left: calc(var(--timeline-date-dot-center-x) - var(--timeline-date-start));
  top: 50%;
  width: var(--timeline-dot-size);
  height: var(--timeline-dot-size);
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 999px;
  background: rgba(255,249,232,0.98);
  border: 3px solid rgba(181,137,42,0.86);
  box-shadow: 0 0 0 4px rgba(181,137,42,0.1);
}
.nww-diary-day-divider span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(24,21,17,0.08);
  box-shadow: 0 6px 16px rgba(17,17,17,0.04);
}
.nww-diary-empty {
  padding: 14px 16px;
  border: 1px dashed rgba(24,21,17,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.48);
}
.nww-diary-empty-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  color: #181511;
  margin-bottom: 4px;
}

.nww-diary-entry {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  grid-template-areas:
    "poster main actions"
    "poster note note";
  gap: 12px;
  align-items: flex-start;
  margin-left: var(--timeline-card-start);
  padding: 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid rgba(24,21,17,0.08);
  background: rgba(255,255,255,0.7);
  cursor: grab;
  user-select: none;
}
.nww-diary-entry::before {
  content: "";
  position: absolute;
  top: var(--timeline-card-dot-center-y);
  left: calc(var(--timeline-card-dot-center-x) - var(--timeline-list-padding-left) - var(--timeline-card-start));
  width: var(--timeline-dot-size);
  height: var(--timeline-dot-size);
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 999px;
  background: #b5892a;
  box-shadow: 0 0 0 4px rgba(181,137,42,0.12);
}
.nww-diary-entry.is-editing {
  cursor: default;
  user-select: auto;
}
.nww-diary-entry-main {
  grid-area: main;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nww-diary-entry-poster {
  grid-area: poster;
  width: 56px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(24,21,17,0.06), rgba(24,21,17,0.12));
  box-shadow: 0 8px 18px rgba(17,17,17,0.08);
  flex-shrink: 0;
}
.nww-diary-entry-poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.nww-diary-entry-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nww-diary-entry-film {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  color: #181511;
  line-height: 1.25;
}
.nww-diary-entry-time,
.nww-diary-entry-status {
  font-size: 12px;
  color: rgba(24,21,17,0.52);
}
.nww-diary-entry-status {
  color: rgba(255,215,0,0.62);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}
.nww-diary-entry-note {
  grid-area: note;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(24,21,17,0.8);
}
.nww-diary-entry-actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.nww-diary-entry.is-editing .nww-diary-entry-note {
  display: none;
}
.nww-diary-inline-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.nww-diary-inline-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nww-diary-inline-field-note {
  grid-column: 1 / -1;
}
.nww-diary-entry.is-editing .nww-diary-input,
.nww-diary-entry.is-editing .nww-diary-textarea {
  user-select: text;
}
.nww-diary-entry-edit,
.nww-diary-entry-save,
.nww-diary-entry-cancel,
.nww-diary-entry-delete {
  background: transparent;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.nww-diary-entry-edit {
  border: 1px solid rgba(24,21,17,0.12);
  color: rgba(24,21,17,0.78);
}
.nww-diary-entry-edit:hover,
.nww-diary-entry-cancel:hover {
  border-color: rgba(24,21,17,0.22);
  background: rgba(24,21,17,0.05);
  color: #181511;
}
.nww-diary-entry-edit:active,
.nww-diary-entry-cancel:active,
.nww-diary-entry-save:active {
  transform: scale(0.97);
}
.nww-diary-entry-save {
  border: 1px solid rgba(255,215,0,0.25);
  background: rgba(255,215,0,0.08);
  color: #181511;
}
.nww-diary-entry-save:hover {
  border-color: rgba(255,215,0,0.4);
  background: rgba(255,215,0,0.14);
}
.nww-diary-entry-cancel {
  border: 1px solid rgba(24,21,17,0.12);
  color: rgba(24,21,17,0.78);
}
.nww-diary-entry-delete {
  border: 1px solid rgba(204,85,85,0.22);
  border-radius: 8px;
  color: rgba(204,85,85,0.9);
}
.nww-diary-entry-delete:hover {
  border-color: rgba(204,85,85,0.4);
  color: rgba(255,255,255,0.92);
  background: rgba(204,85,85,0.08);
}
.nww-diary-entry-delete:active { transform: scale(0.97); }

.watch-diary-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 17, 17, 0.22);
  backdrop-filter: blur(8px);
}
.watch-diary-confirm-backdrop[hidden] {
  display: none;
}
.watch-diary-confirm {
  width: min(100%, 360px);
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(24,21,17,0.08);
  background:
    radial-gradient(circle at top left, rgba(255, 230, 170, 0.18), transparent 46%),
    rgba(255,255,255,0.94);
  box-shadow: 0 24px 48px rgba(17,17,17,0.16);
}
.watch-diary-confirm-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  line-height: 1.1;
  color: #181511;
}
.watch-diary-confirm-copy {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(24,21,17,0.64);
}
.watch-diary-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.watch-diary-confirm-cancel,
.watch-diary-confirm-delete {
  border-radius: 999px;
  padding: 9px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.watch-diary-confirm-cancel {
  border: 1px solid rgba(24,21,17,0.1);
  background: rgba(255,255,255,0.76);
  color: rgba(24,21,17,0.72);
}
.watch-diary-confirm-delete {
  border: 1px solid rgba(204,85,85,0.22);
  background: rgba(204,85,85,0.08);
  color: rgba(170,73,73,0.96);
}
.watch-diary-confirm-cancel:hover {
  background: rgba(255,255,255,0.96);
  color: #181511;
}
.watch-diary-confirm-delete:hover {
  border-color: rgba(204,85,85,0.36);
  background: rgba(204,85,85,0.14);
}
.watch-diary-confirm-cancel:active,
.watch-diary-confirm-delete:active {
  transform: scale(0.98);
}

.watch-journal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.watch-journal-entry {
  border: 1px solid rgba(24,21,17,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  overflow: hidden;
}
.watch-journal-entry[open] {
  box-shadow: 0 14px 32px rgba(17,17,17,0.06);
}
.watch-journal-summary {
  list-style: none;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  cursor: pointer;
}
.watch-journal-summary::-webkit-details-marker {
  display: none;
}
.watch-journal-poster {
  width: 52px;
  aspect-ratio: 2 / 3;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(24,21,17,0.06), rgba(24,21,17,0.12));
}
.watch-journal-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.watch-journal-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.watch-journal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  line-height: 1.25;
  color: #181511;
}
.watch-journal-time {
  font-size: 12px;
  color: rgba(24,21,17,0.48);
}
.watch-journal-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.watch-journal-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(24,21,17,0.05);
  font-size: 11px;
  color: rgba(24,21,17,0.7);
}
.watch-journal-pill--decision {
  background: rgba(181,137,42,0.1);
  color: rgba(130,94,18,0.95);
}
.watch-journal-caret {
  align-self: center;
  color: rgba(24,21,17,0.42);
  font-size: 14px;
  transition: transform 0.2s ease;
}
.watch-journal-entry[open] .watch-journal-caret {
  transform: rotate(180deg);
}
.watch-journal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 14px 14px 78px;
  border-top: 1px solid rgba(24,21,17,0.06);
}
.watch-journal-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.watch-journal-actions {
  display: flex;
  justify-content: flex-end;
}
.watch-journal-label {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(24,21,17,0.44);
}
.watch-journal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.watch-journal-kv {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(24,21,17,0.04);
}
.watch-journal-k {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(24,21,17,0.42);
}
.watch-journal-v {
  font-size: 13px;
  color: #181511;
}
.watch-journal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.watch-journal-tag {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(181,137,42,0.08);
  color: rgba(130,94,18,0.95);
  font-size: 11px;
}
.watch-journal-note {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(24,21,17,0.72);
}
.watch-journal-delete {
  background: transparent;
  border: 1px solid rgba(204,85,85,0.22);
  border-radius: 8px;
  color: rgba(204,85,85,0.9);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.watch-journal-delete:hover {
  border-color: rgba(204,85,85,0.4);
  color: rgba(24,21,17,0.92);
  background: rgba(204,85,85,0.08);
}
.watch-journal-delete:active {
  transform: scale(0.97);
}

.nww-companion-title-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nww-companion-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nww-companion-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  flex: 1;
}
.nww-companion-toggle-wrap input[type="checkbox"] { display: none; }
.nww-companion-toggle-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
  white-space: nowrap;
  user-select: none;
}
.nww-companion-toggle-wrap input:checked ~ .nww-companion-toggle-label {
  color: rgba(255,255,255,0.75);
}

/* Pill switch */
.nww-companion-toggle-wrap .nww-pill-switch {
  width: 30px;
  height: 17px;
  border-radius: 9px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.nww-companion-toggle-wrap .nww-pill-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), background 0.2s;
}
.nww-companion-toggle-wrap input:checked ~ .nww-pill-switch {
  background: rgba(255,215,0,0.25);
  border-color: rgba(255,215,0,0.4);
  animation: nww-toggle-pop 0.28s cubic-bezier(0.23, 1, 0.32, 1) both;
}
.nww-companion-toggle-wrap input:checked ~ .nww-pill-switch::after {
  transform: translateX(13px);
  background: rgba(255,215,0,0.9);
}
@keyframes nww-toggle-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Model toggle */
.nww-model-toggle {
  display: flex;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  overflow: hidden;
}
.nww-model-btn {
  padding: 4px 8px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.35);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}
.nww-model-btn.active {
  background: rgba(255,215,0,0.1);
  color: rgba(255,255,255,0.9);
}
.nww-model-btn:hover:not(.active) { color: rgba(255,255,255,0.6); }

/* Close button */
.nww-companion-close {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  color: rgba(255,255,255,0.3);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.nww-companion-close:hover { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.2); }
.nww-companion-close:active { transform: scale(0.92); }

/* ── Facts section ───────────────────────────────────────────────────────── */
.nww-facts-section { display: flex; flex-direction: column; gap: 6px; }
.nww-facts-label {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.25);
}
.nww-facts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.nww-facts-list::-webkit-scrollbar { width: 4px; }
.nww-facts-list::-webkit-scrollbar-track { background: transparent; }
.nww-facts-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.nww-facts-loading { display: flex; flex-direction: column; gap: 6px; }
.nww-facts-skeleton {
  height: 52px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: nww-skeleton-shimmer 1.6s ease-in-out infinite;
}
@keyframes nww-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Fact card */
.nww-fact-card {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.2s, background 0.2s;
  animation: nww-fact-in 0.3s cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes nww-fact-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nww-fact-card:hover {
  border-color: rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.04);
}
.nww-fact-card.nww-fact-upcoming {
  opacity: 0.4;
}
.nww-fact-card.nww-fact-upcoming .nww-fact-pct {
  color: rgba(255,255,255,0.25);
}
.nww-fact-card.nww-fact-new {
  border-color: rgba(255,215,0,0.3);
  background: rgba(255,215,0,0.06);
  animation: nww-fact-highlight 0.7s cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes nww-fact-highlight {
  0%  { border-color: rgba(255,215,0,0.5); background: rgba(255,215,0,0.12); box-shadow: 0 0 16px rgba(255,215,0,0.2); }
  60% { border-color: rgba(255,215,0,0.3); background: rgba(255,215,0,0.06); }
  100%{ border-color: rgba(255,215,0,0.3); background: rgba(255,215,0,0.06); }
}
.nww-fact-pct {
  font-family: 'Oswald', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255,215,0,0.65);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.nww-fact-pct::before {
  content: '◼ ';
  font-size: 6px;
  vertical-align: middle;
  opacity: 0.7;
}
.nww-fact-text {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255,255,255,0.75);
}
.nww-facts-error {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  padding: 8px 0;
}
.nww-facts-retry {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  padding: 5px 10px;
  cursor: pointer;
  margin-top: 4px;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.nww-facts-retry:hover { border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); }

/* Pill pulse when new fact arrives */
@keyframes nww-pill-fact-pulse {
  0%   { box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 0 rgba(255,215,0,0); }
  40%  { box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 28px rgba(255,215,0,0.35); }
  100% { box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 0 rgba(255,215,0,0); }
}
.nww-pill.nww-pill-fact-pulse {
  animation: nww-pill-fact-pulse 0.8s cubic-bezier(0.23, 1, 0.32, 1) both;
}

/* ── Companion divider ────────────────────────────────────────────────────── */
.nww-companion-divider {
  height: 1px;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
}

/* ── Chat thread ─────────────────────────────────────────────────────────── */
.nww-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 60px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.nww-chat-thread::-webkit-scrollbar { width: 4px; }
.nww-chat-thread::-webkit-scrollbar-track { background: transparent; }
.nww-chat-thread::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.nww-chat-thread:empty::after {
  content: 'Ask anything about this film';
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  font-style: italic;
}

.nww-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: nww-msg-in 0.25s cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes nww-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes nww-bubble-shimmer {
  0%   { border-color: rgba(255,215,0,0.45); box-shadow: 0 0 10px rgba(255,215,0,0.12); }
  60%  { border-color: rgba(255,215,0,0.2); box-shadow: none; }
  100% { border-color: rgba(255,215,0,0.12); }
}
.nww-msg-assistant-new .nww-msg-bubble {
  animation: nww-bubble-shimmer 0.7s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.nww-msg-user { align-items: flex-end; }
.nww-msg-assistant { align-items: flex-start; }

.nww-msg-bubble {
  max-width: 90%;
  padding: 8px 10px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}
.nww-msg-user .nww-msg-bubble {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 10px 10px 3px 10px;
}
.nww-msg-assistant .nww-msg-bubble {
  background: rgba(255,215,0,0.05);
  border: 1px solid rgba(255,215,0,0.12);
  color: rgba(255,255,255,0.85);
  border-radius: 10px 10px 10px 3px;
}
.nww-msg-loading .nww-msg-bubble {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

/* Typing dots */
.nww-typing {
  display: flex;
  gap: 3px;
  align-items: center;
  padding: 4px 2px;
}
.nww-typing-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,215,0,0.5);
  animation: nww-typing-bounce 1.2s ease-in-out infinite;
}
.nww-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.nww-typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes nww-typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

.nww-msg-error .nww-msg-bubble {
  background: rgba(204,85,85,0.06);
  border-color: rgba(204,85,85,0.2);
  color: rgba(204,85,85,0.8);
}

/* ── Chat input area ─────────────────────────────────────────────────────── */
.nww-chat-input-area {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.nww-chat-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
}
.nww-chat-input::placeholder { color: rgba(255,255,255,0.25); }
.nww-chat-input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.nww-chat-input:focus {
  border-color: rgba(255,215,0,0.25);
  box-shadow: 0 0 0 2px rgba(255,215,0,0.07);
}
.nww-chat-input-area.has-content .nww-chat-send {
  background: rgba(255,215,0,0.22);
  border-color: rgba(255,215,0,0.5);
  color: rgba(255,215,0,1);
  transform: scale(1.05);
}
.nww-chat-send {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 8px;
  color: rgba(255,215,0,0.9);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.nww-chat-send:hover { background: rgba(255,215,0,0.2); border-color: rgba(255,215,0,0.4); }
.nww-chat-send:active { transform: scale(0.92); }
.nww-chat-send:disabled { opacity: 0.35; cursor: default; transform: none; }

/* ── Companion footer (session cost) ─────────────────────────────────────── */
.nww-companion-footer {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  min-height: 14px;
}

/* ── Reduced motion additions ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .movie-card {
    transition: none !important;
  }
  .movie-card--interactive:hover,
  .movie-card--interactive:focus-within {
    transform: none !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1) !important;
  }
  .card-sheen {
    transition: none !important;
  }
  .nww--companion-open .nww-companion { animation: none !important; }
  .nww-fact-card { animation: none !important; }
  .nww-fact-card.nww-fact-new { animation: none !important; }
  .nww-facts-skeleton { animation: none !important; background: rgba(255,255,255,0.05); }
  .nww-msg { animation: none !important; }
  .nww-typing-dot { animation: none !important; }
  .nww-poster-glow { filter: none !important; }
  .nww-pill.nww-pill-fact-pulse { animation: none !important; }
  .nww-msg-assistant-new .nww-msg-bubble { animation: none !important; }
  .nww-companion-toggle-wrap input:checked ~ .nww-pill-switch { animation: none !important; }
  .nww--diary-open .nww-diary { animation: none !important; }
  .nww--diary-open .nww-panel { animation: none !important; }
  .nww-diary-entry { animation: none !important; }
  .nww-diary-entries .nww-diary-empty { animation: none !important; }
  .nww-chat-input-area.has-content .nww-chat-send { transform: none; }
  .nav-ai-switch, .nav-ai-switch::after, .nav-ai-label { transition: none !important; }
  .mm-add-btn { transition: none !important; }
}

/* ── Where to Watch — popover ───────────────────────────────────────────────── */


/* ── Where to Watch tab ─────────────────────────────────────────────────────── */

.mm-wtw-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 12px;
}

.mm-wtw-stream-label {
  margin-bottom: 12px;
}

.mm-wtw-country-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #888;
  font-family: Inter, sans-serif;
}

.mm-wtw-country-select {
  background: #2a2a2a;
  border: 1px solid #333;
  color: #ccc;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  font-family: Inter, sans-serif;
  cursor: pointer;
  outline: none;
}

.mm-wtw-country-select:focus {
  border-color: #555;
}

.mm-wtw-loading,
.mm-wtw-empty {
  color: #666;
  font-size: 14px;
  padding: 16px 0;
  font-family: Inter, sans-serif;
}

.mm-wtw-fallback-notice {
  font-size: 12px;
  color: #888;
  margin-bottom: 12px;
  font-style: italic;
  font-family: Inter, sans-serif;
}

.mm-wtw-section {
  margin-bottom: 20px;
}

.mm-wtw-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-top: 0;
  margin-bottom: 12px;
}

.mm-wtw-section + .mm-wtw-section,
.mm-wtw-section + .mm-wtw-disclosure {
  margin-top: 28px;
}

.mm-wtw-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mm-wtw-provider img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  transition: opacity 0.15s;
  display: block;
}

.mm-wtw-provider:hover img {
  opacity: 0.8;
}

.mm-wtw-disclosure {
  background: none;
  border: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin-top: 0;
  margin-bottom: 12px;
}

.mm-wtw-disclosure:hover {
  color: rgba(255,255,255,0.5);
}

.mm-wtw-chevron {
  display: inline-block;
  transition: transform 0.2s;
}

.mm-wtw-disclosure.open .mm-wtw-chevron {
  transform: rotate(180deg);
}

.mm-wtw-disclosure-body {
  margin-top: 10px;
}

/* ── Sync status chip (nav) — only visible when a push has failed ─────────── */
.sync-status[hidden] { display: none; }
.sync-status {
  display: inline-flex;
  animation: sync-status-in 420ms cubic-bezier(0.23, 1, 0.32, 1);
}
.sync-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border: 0;
  border-radius: 999px;
  background: #1a1a1a;
  color: #f2f2f2;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1), background 180ms ease;
}
.sync-status-btn:hover:not(:disabled) { background: #232323; transform: translateY(-1px); }
.sync-status-btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.sync-status-btn:focus-visible { outline: 2px solid #f2f2f2; outline-offset: 2px; }
.sync-status-btn:disabled { cursor: progress; opacity: 0.85; }
.sync-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d98b3a;
  box-shadow: 0 0 0 3px rgba(217, 139, 58, 0.22);
}
.sync-status-action {
  color: #bdbdbd;
  padding-left: 7px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}
.sync-status-btn:disabled .sync-status-action { display: none; }
.storage-status .sync-status-btn { cursor: default; }

@keyframes sync-status-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sync-status, .sync-status-btn { animation: none; transition: none; }
}

/* ── Snapshot browser (Settings) ──────────────────────────────────────────── */
.snapshot-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.snapshot-count {
  flex: 1;
  font-size: 12px;
  color: #6b6b6b;
}
.snapshot-jump-label {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6b6b;
}
.snapshot-jump {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #111;
  background: #f5f5f5;
  border: 1px solid #e2e2e2;
  border-radius: 7px;
  padding: 6px 10px;
  cursor: pointer;
}
.snapshot-jump:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.snap-month {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 14px 0 2px;
  padding: 6px 2px;
  background: linear-gradient(#fff 70%, rgba(255, 255, 255, 0));
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #111;
}
.snap-month:first-child { margin-top: 0; }
.snapshot-more {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px 16px;
  background: transparent;
  border: 1px dashed #cfcfcf;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
}
.snapshot-more[hidden] { display: none; }
.snapshot-more:hover:not(:disabled) { border-color: #999; background: #fafafa; }
.snapshot-more:active:not(:disabled) { transform: scale(0.99); }
.snapshot-more:disabled { cursor: progress; color: #999; }
.snapshot-more:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .snapshot-more { transition: none; }
}

/* ── Restore preview: what restores, what stays, the undo copy ─────────────── */
.snapshot-subtitle { margin-top: 40px; }
.snap-preview-label { margin: 0 0 4px; }
.snap-preview-label:focus { outline: none; }
.snap-preview-when { font-size: 12px; color: #6b6b6b; }
.snap-plan {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  animation: snap-plan-in 320ms cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes snap-plan-in {
  from { opacity: 0; transform: translateY(4px); }
}
.snap-plan-group {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
}
/* Untouched fields: same shape, quieter — nothing here will change. */
.snap-plan-group:has([data-plan="keep"]) {
  background: transparent;
  border-style: dashed;
  border-color: #cfcfcf;
}
.snap-plan-title {
  margin: 0 0 8px;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #444;
}
.snap-plan-hint { margin: -2px 0 8px; font-size: 12px; line-height: 1.5; color: #6b6b6b; }
.snap-plan-list { list-style: none; margin: 0; padding: 0; }
.snap-plan-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 13px;
  color: #111;
  border-top: 1px solid #f0f0f0;
}
.snap-plan-list li:first-child { border-top: 0; }
.snap-plan-list[data-plan="keep"] li { color: #444; border-top-color: #e6e6e6; }
.snap-plan-value { color: #6b6b6b; font-variant-numeric: tabular-nums; white-space: nowrap; }
.snap-preview-note { margin: 0 0 14px; font-size: 12.5px; line-height: 1.55; color: #555; }
.snap-preview-status { margin: 10px 0 0; font-size: 13px; line-height: 1.55; color: #444; }
.snap-preview-status:empty { display: none; }
.snap-preview-status[data-tone="done"] { color: #1b5e20; }
.snap-preview-status[data-tone="error"] { color: #a00; }
.snap-preview-status .settings-link { color: inherit; font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .snap-plan { animation: none; }
  .collection-empty-slot, .collection-empty-title, .collection-empty-copy, .collection-empty-actions {
    animation: collection-empty-fade 150ms linear forwards;
  }
  .collection-empty-slot { transform: rotate(var(--r, 0deg)) translateY(var(--y, 0)); }
  .collection-empty-slot--first, .collection-empty-slot--first svg, .collection-empty-btn { transition: none; }
  .collection-empty-slot--first:hover, .collection-empty-slot--first:active { translate: none; }
  .collection-empty-slot--first:hover svg { transform: none; }
  .collection-empty-btn:hover, .collection-empty-btn:active { transform: none; }
}

/* ── Phone layout (≤ 640px) ──────────────────────────────────────────────────
   Desktop rules above are untouched; everything phone-specific lives here so it wins the cascade.
   Three-column poster grid (≈110px cards at 390px), tabs scroll inside their row, the diary is a
   full-screen sheet. Nothing here may widen the page: the e2e "Phone layout" tests check
   scrollWidth ≤ innerWidth at iPhone 13 size. */
@media (max-width: 640px) {
  .collection-empty { padding: 48px 0 72px; }
  .collection-empty-slot:nth-child(1), .collection-empty-slot:nth-child(5) { display: none; }
  .collection-empty-title { margin-top: 32px; }
  header { padding: 18px 16px 14px; gap: 12px; }
  nav { gap: 14px; align-items: center; }
  .nav-link-signout, button.nav-link-signout { padding-left: 14px; }
  main { padding: 0 16px 72px; }

  /* Column children must stretch to the screen, not size to their widest content. */
  /* .movies-layout also resets main's right padding to 0 — restore the gutter. */
  .movies-layout { flex-direction: column; align-items: stretch; gap: 18px; padding-right: 16px; }

  /* Recommendation: controls wrap; banner stacks poster over text. */
  .recommendation { margin-top: 20px; margin-bottom: 36px; }
  .rec-heading-row { flex-wrap: wrap; row-gap: 10px; }
  .rec-heading { font-size: 19px; }
  .rec-right-group { margin-left: 0; flex-wrap: wrap; gap: 10px 14px; width: 100%; }
  .rec-cost-hint { white-space: normal; }
  .rec-type-toggles { gap: 8px; margin: 6px 0 14px; }
  .rec-content { flex-direction: column; gap: 20px; padding: 20px; }
  .rec-poster-col { flex-direction: row; align-items: flex-end; gap: 14px; }
  .rec-poster-wrap { width: 112px; }
  .rec-poster-buttons { width: auto; flex: 1; }
  .rec-poster-buttons .rec-btn { height: 40px; }
  .rec-title { font-size: 28px; }

  /* List nav: full-bleed sticky bar; the tabs scroll sideways inside it. */
  .grid-nav { margin: 0 -16px 28px; padding: 10px 16px; gap: 10px; align-items: stretch; }
  .grid-nav-tab-row { flex-direction: column; flex-wrap: nowrap; gap: 8px; }
  .grid-nav-tabs {
    justify-content: flex-start;   /* centred overflow would push the first tabs out of reach */
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .grid-nav-tabs::-webkit-scrollbar { display: none; }
  .grid-nav-btn { padding: 9px 13px; gap: 7px; font-size: 12.5px; scroll-snap-align: start; min-height: 40px; }
  .grid-nav-icon { font-size: 19px; }
  .grid-nav-count { padding: 1px 6px; font-size: 10.5px; }
  .grid-nav-media-btn { padding: 7px 12px; min-height: 32px; }
  /* "+ Add" and the sort pills share one row; the pills scroll if they don't fit. */
  .grid-sort-row { flex-wrap: nowrap; gap: 8px; }
  .grid-add-btn { flex-shrink: 0; padding: 5px 12px; }
  .grid-sort-pills { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .grid-sort-pills::-webkit-scrollbar { display: none; }
  .grid-sort-btn, .grid-add-btn { min-height: 32px; white-space: nowrap; }
  .grid-sort-btn { padding: 5px 10px; }

  /* Reference films: a 6 × 2 contact sheet — all twelve visible at once. */
  .standards-slots { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .standards-slot { border-radius: 4px; }
  /* Bigger tap target without changing the header height (negative margin cancels the padding). */
  .standards-add-btn { padding: 12px 8px; margin: -12px -8px -12px auto; }

  /* Poster grid: three columns of small, still-tactile cards. */
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; }
  .movie-card { border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; box-shadow: 0 1px 8px rgba(0,0,0,0.1); }
  .movie-card .card-info { padding: 0 2px 6px; }
  .movie-card .card-name { font-size: 11.5px; line-height: 1.25; margin: 0 3px; }
  .movie-card .card-trade { font-size: 10px; margin: 0 3px; }
  .movie-card .card-director { display: none; }   /* ~110px wide: year only; the modal has the rest */
  .card-ratings { display: none; }
  .card-media-badge { left: 5px; bottom: 5px; padding: 3px 5px 2px; font-size: 8px; letter-spacing: 0.12em; }
  .movie-card--sessioned .poster-wrap::after { bottom: 4px; left: 4px; width: 5px; height: 5px; }

  /* Watching diary: a full-screen sheet over the app instead of a side column. */
  .watch-diary-panel {
    position: fixed;
    inset: 0;
    z-index: 8100;                  /* above the Now Watching button (8000) — it's a full sheet */
    width: 100%;
    height: 100%;
    max-height: none;
    border-left: none;
    background: linear-gradient(180deg, #f4f0e8, #fbf9f5 40%);   /* opaque: the grid mustn't show through */
    transform: translateY(24px);
  }
  .watch-diary-open .watch-diary-panel { width: 100%; flex-basis: auto; transform: translateY(0); }
  .watch-diary-open .movies-layout { padding-right: 16px; }
  .watch-diary-open .movies-content { transform: none; }
}

/* Phone: the film modal is a bottom sheet — poster beside its actions, details below,
   prev/next arrows float above the sheet instead of taking width beside it. */
@media (max-width: 640px) {
  .movie-modal-backdrop { padding: 64px 0 0; align-items: flex-end; gap: 0; }
  .mm-nav-btn { position: absolute; top: 12px; width: 40px; height: 40px; font-size: 18px; }
  #mm-nav-prev { left: 16px; }
  #mm-nav-next { right: 16px; }
  .movie-modal { max-height: 100%; border-radius: 18px 18px 0 0; }
  .movie-modal--live::before { border-radius: 18px 18px 0 0; }
  .movie-modal-body { flex-direction: column; gap: 22px; padding: 4px 20px 32px; }
  .mm-poster-col { position: static; width: 100%; flex-direction: row; align-items: flex-end; gap: 16px; }
  .mm-poster-col > :not(.mm-poster):not(img) { flex: 1 1 0; min-width: 0; }
  .mm-poster { width: 120px; flex-shrink: 0; }
  /* Three-across posters: keep the marquee to one line so it doesn't bury the poster. */
  .anticipated-countdown--premiere { --bulb-gap: 7px; padding: 9px 2px; font-size: 10px; letter-spacing: 0.05em; white-space: nowrap; }
  .anticipated-countdown--premiere .anticipated-countdown-detail { margin-top: 2px; font-size: 9px; letter-spacing: 0.08em; }
}
/* First account sync and upgrade recovery keep the archive visible but read-only. */
.archive-startup {
  position: fixed;
  z-index: 10000;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 32px));
  box-sizing: border-box;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 20px 24px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #f5f4f1;
  color: #1a1a1a;
  box-shadow: 0 8px 32px #0002;
  font: 14px/1.6 Inter, sans-serif;
}
.archive-startup p { margin: 0; }
.archive-startup .settings-section { margin: 20px 0 0; }
.archive-startup .settings-section-title { color: #555; }
.archive-startup .settings-section-desc + .settings-section-desc { margin-top: 12px; }
.archive-startup h1 { margin: 0 0 12px; font: 800 24px/1.2 'Playfair Display', serif; }
.archive-startup button {
  margin-top: 12px;
  padding: 8px 14px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.archive-startup button:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 3px; }


/* Touch holds use the same card actions as desktop right-click. */
@media (pointer: coarse) {
  .movie-card { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}
.ctx-item:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }

.anticipated-season-status { grid-column: 1 / -1; margin: 0; color: #555; font-size: 13px; }
.anticipated-season-source { position: absolute; bottom: 48px; right: 8px; z-index: 2; padding: 5px 7px; border-radius: 4px; background: #1c1c1e; color: #fff; font: 11px Inter, sans-serif; }
