/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #000000;
  --bg-raised: #141414;
  --bg-hover: #1c1c1c;
  --border: rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.14);
  --text: #f5f4f0;
  --text-muted: rgba(245,244,240,0.42);
  --text-subtle: rgba(245,244,240,0.2);
  --accent: #C9A84C;
  --accent-dim: rgba(201,168,76,0.12);
  --radius: 6px;
  --radius-lg: 10px;
  --font: 'DM Sans', system-ui, sans-serif;
  --max-width: 1100px;
  --t: 150ms ease;
}



html, body { overflow-x: hidden; max-width: 100%; }
html { font-size: 16px; }
@media (min-width: 701px) { html { zoom: 1.05; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea { font-family: var(--font); }
img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 32px; }

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}
main { animation: pageEnter 0.45s ease forwards; }

/* ============================================================
   WELCOME / ONBOARDING
   ============================================================ */
.welcome-topbar {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 10;
}
.welcome-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.welcome-inner {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.welcome-animate {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.welcome-animate.visible {
  opacity: 1;
  transform: none;
}
.welcome-header { text-align: center; }
.welcome-wordmark {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}
.welcome-sub { font-size: 14px; color: var(--text-muted); line-height: 1.6; max-width: 380px; margin: 0 auto; }
.welcome-search-wrap { position: relative; }
.welcome-search-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
}
.welcome-search-input:focus { border-color: var(--accent); }
.welcome-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-y: auto;
  max-height: 320px;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.welcome-results:empty { display: none; }
.welcome-result {
  display: flex;
  align-items: center;
  width: 100%;
  border-bottom: 1px solid var(--border);
  transition: background var(--t), opacity 0.25s ease, transform 0.25s ease;
  opacity: 0;
  transform: translateY(-6px);
}
.welcome-result.visible {
  opacity: 1;
  transform: none;
}
.welcome-result:last-child { border-bottom: none; }
.welcome-result:hover { background: var(--bg-hover); }
.welcome-result-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  color: var(--text);
}
.welcome-result-poster {
  width: 32px;
  height: 48px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--bg-hover);
}
.welcome-result-title { font-size: 14px; font-weight: 500; }
.welcome-result-year { font-size: 12px; color: var(--text-muted); }
.welcome-result-poster--empty { border-radius: 4px; }
.welcome-check {
  margin-left: auto;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t), color var(--t), background var(--t);
  -webkit-tap-highlight-color: transparent;
}
.welcome-check:hover { border-color: var(--accent); color: var(--accent); }
.welcome-check.done { border-color: var(--accent); background: var(--accent); color: #000; }
.welcome-empty { padding: 14px 16px; font-size: 13px; color: var(--text-muted); }
.welcome-added { text-align: center; font-size: 13px; color: var(--text-muted); }
.welcome-added span { color: var(--accent); font-weight: 600; }
.welcome-actions { display: flex; flex-direction: row; gap: 10px; justify-content: center; }
.welcome-actions .btn { width: auto; padding: 0 20px; height: 38px; font-size: 13px; }

/* ============================================================
   TOAST
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 100px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-family: var(--font);
}
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 700px) {
  #toast-container { bottom: 80px; }
  /* Prevent iOS Safari from zooming on input focus (requires >= 16px) */
  input, textarea, select { font-size: 16px !important; }
  /* Now playing — compact poster cards on mobile */
  .feed-now-card .feed-now-title { display: none; }
  .feed-now-card {
    min-width: 0;
    flex: 1 1 calc(50% - 6px);
    max-width: calc(50% - 6px);
    padding: 8px 10px;
    gap: 8px;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: var(--t);
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; border: none; }
.btn-primary:hover { opacity: 0.85; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border-strong); }
.btn-ghost:hover { color: var(--text); }
.btn-danger { background: transparent; color: var(--accent); border: 1px solid rgba(201,168,76,0.3); }
.btn-danger:hover { background: var(--accent-dim); }

/* ============================================================
   INPUTS
   ============================================================ */
.input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--t);
}
.input:focus { border-color: var(--border-strong); }
.input::placeholder { color: var(--text-subtle); }
textarea.input { resize: vertical; min-height: 120px; line-height: 1.65; }

.use-release-date-btn {
  font-size: 10px;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
.use-release-date-btn:hover { text-decoration: underline; }

.label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.error-msg {
  font-size: 13px;
  color: var(--accent);
  padding: 10px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000000;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  height: 56px;
  display: flex;
  align-items: center;
}
.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.nav-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f5f4f0;
  flex-shrink: 0;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
  margin-left: auto;
}

/* User dropdown */
.nav-user-wrap { position: relative; }
.nav-user-btn { display: flex; align-items: center; gap: 4px; }
.nav-user-caret { font-size: 9px; opacity: 0.6; }
.nav-user-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 140px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  overflow: hidden;
  display: none;
  z-index: 200;
}
.nav-user-panel.open { display: block; }
.nav-user-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  background: none;
  border: none;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t), color var(--t);
}
.nav-user-opt:hover { background: var(--bg-hover); color: var(--text); }
.nav-user-opt-danger:hover { color: var(--accent); }
.nav-link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.65);
  transition: color var(--t);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  padding: 0;
}
.nav-link:hover { color: #f5f4f0; }
.nav-link.active { color: var(--accent); }

/* Mobile-only user icon in top nav */
.nav-mobile-user-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: color var(--t);
}
.nav-mobile-user-btn:hover { color: var(--text); }
@media (max-width: 768px) {
  .nav-mobile-user-btn { display: flex; }
}

/* Nav search */
.nav-search-wrap {
  position: relative;
  flex: 1;
  max-width: 480px;
  margin: 0;
}
.nav-search-input {
  width: 100%;
  background: #141414;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  color: #f5f4f0;
  font-size: 13px;
  font-family: var(--font);
  padding: 7px 16px;
  outline: none;
  transition: border-color var(--t);
}
.nav-search-input:focus { border-color: rgba(255,255,255,0.14); }
.nav-search-input::placeholder { color: rgba(245,244,240,0.2); }
.nav-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-y: auto;
  max-height: 360px;
  z-index: 200;
  display: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.nav-search-results.open { display: block; }
.nav-search-result {
  display: flex;
  align-items: center;
  width: 100%;
  opacity: 0;
  transform: translateY(-4px);
  transition: background var(--t), opacity 0.2s ease, transform 0.2s ease;
}
.nav-search-result.visible { opacity: 1; transform: none; }
.nav-search-result:hover { background: var(--bg-hover); }
.nav-search-result-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  flex: 1;
  min-width: 0;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  background: none;
  border: none;
  font-family: var(--font);
}
.nav-quick-watch {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  margin-right: 10px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-subtle);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
}
.nav-quick-watch:hover { border-color: var(--accent); color: var(--accent); }
.nav-quick-watch.done { background: var(--accent); border-color: var(--accent); color: #fff; }
.nav-search-poster {
  width: 28px;
  height: 42px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  background: var(--bg-hover);
}
.nav-search-title { font-size: 13px; font-weight: 500; }
.nav-search-year  { font-size: 11px; color: var(--text-muted); }
.nav-search-empty { padding: 12px 14px; font-size: 13px; color: var(--text-muted); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash-page { padding: 32px 0 100px; }

.dash-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

/* Genre bars — left side */
.dash-genres { display: flex; flex-direction: column; gap: 12px; min-width: 220px; }
.dash-genres-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 4px;
}
.dash-genre-bars { display: flex; flex-direction: column; gap: 10px; }
.dash-genre-row { display: flex; align-items: center; gap: 10px; }
.dash-genre-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  width: 90px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-genre-track {
  flex: 1;
  height: 3px;
  background: var(--border-strong);
  border-radius: 2px;
  overflow: hidden;
}
.dash-genre-fill {
  height: 100%;
  background: var(--text-muted);
  border-radius: 2px;
  transition: width 600ms ease;
}
.dash-genre-count {
  font-size: 11px;
  color: var(--text-subtle);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

/* Numbers — right side */
.dash-nums { display: flex; align-items: center; gap: 0; }
.dash-stat { display: flex; flex-direction: column; gap: 8px; padding: 0 40px; }
.dash-stat:first-child { padding-left: 0; }
.dash-stat:last-child { padding-right: 0; }
.dash-stat-num { font-size: 40px; font-weight: 300; letter-spacing: -0.03em; color: var(--text); line-height: 1; }
.dash-stat-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.dash-stat-divider { width: 1px; height: 40px; background: var(--border); flex-shrink: 0; }

.dash-section { margin-bottom: 56px; }
.dash-section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.dash-section-title { font-size: 16px; font-weight: 500; letter-spacing: -0.02em; }
.dash-section-sub { font-size: 12px; color: var(--text-muted); }
.dash-section-link { font-size: 12px; color: var(--text-muted); text-decoration: none; transition: color var(--t); }
.dash-section-link:hover { color: var(--text); }

/* Trending — featured top 5 */
.trending-featured {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}
.trending-featured-item {
  display: block;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--bg-raised);
  text-decoration: none;
  transition: transform var(--t), opacity var(--t);
}
.trending-featured-item:hover { transform: scale(1.02); opacity: 0.88; }
.trending-featured-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.trending-featured-stub {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: var(--text-subtle);
}
.trending-featured-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.1) 45%, transparent 65%);
}
.trending-featured-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 10px 9px;
  display: flex; flex-direction: column; gap: 2px;
}
.trending-featured-rank {
  font-size: 9px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--accent); line-height: 1;
}
.trending-featured-title {
  font-size: 12px; font-weight: 600; line-height: 1.2;
  color: #fff; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.trending-featured-year {
  font-size: 10px; color: rgba(255,255,255,0.38);
}
/* Hover panel */
.trending-featured-hover {
  position: absolute; inset: 0;
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(2px);
  padding: 16px 14px;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.trending-featured-item:hover .trending-featured-hover { opacity: 1; }
.trending-featured-item:hover .trending-featured-info { opacity: 0; }
.trending-featured-info { transition: opacity 0.2s ease; }
.trending-featured-hover-top { display: flex; flex-direction: column; gap: 3px; }
.trending-featured-overview {
  font-size: 11px; line-height: 1.5; color: rgba(255,255,255,0.65);
  margin: 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* Trending — smaller grid (#4–16, desktop shows #6–16) */
.trending-grid {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 6px;
}
/* Desktop: films 4 & 5 are already in the featured row; films 17 & 18 are mobile-only */
.trending-item--in-featured { display: none; }
.trending-item { display: block; text-decoration: none; }
.trending-grid .trending-item--desktop-hidden { display: none; }
.trending-poster-wrap {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--bg-raised);
  transition: transform var(--t), opacity var(--t);
}
.trending-item:hover .trending-poster-wrap { transform: scale(1.04); opacity: 0.85; }
.trending-poster {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.trending-poster--stub {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--text-subtle);
}
.trending-rank {
  position: absolute; bottom: 5px; left: 6px;
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.5);
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
@media (max-width: 700px) {
  .trending-featured { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .trending-featured-item:nth-child(n+4) { display: none; }
  .trending-featured-info { padding: 8px 8px 7px; }
  .trending-featured-title { font-size: 10px; }
  .trending-featured-year { display: none; }
  .trending-grid { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .trending-grid .trending-item--in-featured { display: block; }
  .trending-grid .trending-item--desktop-hidden { display: block; }
}

/* Genre shelf */
.genre-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.genre-tab {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t);
}
.genre-tab:hover { border-color: var(--border-strong); color: var(--text); }
.genre-tab.active { border-color: var(--accent); color: var(--accent); background: rgba(201,168,76,0.08); }
.genre-shelf-wrap { position: relative; min-height: 80px; opacity: 0; transition: opacity 0.3s ease; }
.genre-shelf-wrap.shelf-ready { opacity: 1; }
.genre-shelf-wrap.loading { opacity: 0; pointer-events: none; }
.genre-section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
.genre-shelf-grid { grid-template-columns: repeat(9, 1fr); }
@media (max-width: 700px) {
  /* Header: title stacks above tabs */
  .genre-section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .genre-tabs {
    width: 100%;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .genre-tabs::-webkit-scrollbar { display: none; }
  .genre-tab { font-size: 10px; padding: 4px 10px; white-space: nowrap; flex-shrink: 0; }

  /* Grid: 2-row horizontal scroll, 4 columns visible */
  .genre-shelf-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
  }
  .genre-shelf-wrap::-webkit-scrollbar { display: none; }
  .genre-shelf-grid {
    grid-template-columns: unset;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: calc((100vw - 64px) / 4);
    width: max-content;
    gap: 5px;
  }
}

/* Up Next */
.upnext-list { display: flex; flex-direction: column; gap: 10px; }
.upnext-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 12px 14px;
  transition: border-color var(--t);
}
.upnext-card--watching { border-color: var(--accent); }
.upnext-card:hover { border-color: var(--border-strong); }
.upnext-poster-wrap { position: relative; flex-shrink: 0; width: 40px; }
.upnext-poster { width: 40px; height: 60px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.upnext-poster-stub { width: 40px; height: 60px; border-radius: 4px; flex-shrink: 0; background: var(--bg-hover); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; color: var(--text-muted); }
.upnext-seen-badge { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.72); color: #fff; font-size: 9px; font-weight: 600; letter-spacing: 0.02em; padding: 2px 5px; border-radius: 20px; white-space: nowrap; pointer-events: none; }
.upnext-info { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.upnext-title { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upnext-datetime { font-size: 12px; color: var(--accent); font-weight: 500; }
.upnext-theater { font-size: 12px; color: var(--text-muted); }
.upnext-notes { font-size: 12px; color: var(--text-subtle); font-style: italic; }
.upnext-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.upnext-remove { background: none; border: none; color: var(--text-subtle); cursor: pointer; font-size: 13px; padding: 4px; transition: color var(--t); }
.upnext-remove:hover { color: var(--text); }
.upnext-edit { background: none; border: none; color: var(--text-subtle); cursor: pointer; padding: 4px; transition: color var(--t); display: flex; align-items: center; }
.upnext-edit:hover { color: var(--text); }

/* ============================================================
   QUICK VIEW PANEL
   ============================================================ */
/* Quick View Modal */
.quickview-panel {
  position: fixed; inset: 0; z-index: 350;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.quickview-panel.open { pointer-events: auto; }
.quickview-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 300ms ease;
}
.quickview-panel.open .quickview-overlay { opacity: 1; }
.quickview-drawer {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px;
  margin: 0 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow-y: auto; overflow-x: hidden;
  max-height: 90vh;
  transform: scale(0.96); opacity: 0;
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), opacity 280ms ease;
}
.quickview-panel.open .quickview-drawer { transform: scale(1); opacity: 1; }
.quickview-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer; font-size: 13px;
  transition: background var(--t), color var(--t);
}
.quickview-close:hover { background: var(--bg-hover); color: var(--text); }
.quickview-body { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 20px; }
.quickview-header { display: flex; gap: 16px; align-items: flex-start; }
.quickview-poster {
  width: 90px; height: 135px; object-fit: cover;
  border-radius: 8px; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.quickview-poster-stub {
  width: 90px; height: 135px; border-radius: 8px; flex-shrink: 0;
  background: var(--bg-raised); display: flex; align-items: center;
  justify-content: center; font-size: 32px; color: var(--text-muted);
}
.quickview-meta { display: flex; flex-direction: column; gap: 5px; padding-top: 2px; flex: 1; min-width: 0; }
.quickview-title { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; color: var(--text); }
.quickview-year-dir { font-size: 13px; color: var(--text-muted); }
.quickview-genres { font-size: 12px; color: var(--text-subtle); }
.quickview-plan {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg-raised); border-radius: var(--radius-lg);
  padding: 12px 14px; border: 1px solid var(--border);
}
.quickview-plan-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.quickview-plan-row svg { flex-shrink: 0; opacity: 0.5; }
.quickview-plan-val { color: var(--text); }
.quickview-overview { font-size: 13px; line-height: 1.65; color: var(--text-muted); }
.quickview-section-label { font-size: 10px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-subtle); margin-bottom: 10px; }
.quickview-cast { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.quickview-cast::-webkit-scrollbar { display: none; }
.quickview-cast-member { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; width: 58px; }
.quickview-cast-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--bg-hover); }
.quickview-cast-photo-stub { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-raised); display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--text-muted); flex-shrink: 0; }
.quickview-cast-name { font-size: 10px; color: var(--text-muted); text-align: center; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%; }
.quickview-overview { font-size: 13px; line-height: 1.6; color: var(--text-muted); padding: 0 18px 16px; }
.quickview-footer { display: flex; justify-content: flex-end; padding-top: 4px; }
.quickview-skeleton { display: flex; flex-direction: column; gap: 8px; }
.quickview-skel-line {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-raised) 25%, var(--bg-hover) 50%, var(--bg-raised) 75%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.2s infinite;
}
@keyframes skel-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.upnext-empty { font-size: 13px; color: var(--text-muted); }
.upnext-empty-cta {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0; margin-bottom: 32px;
  color: var(--text-subtle);
}
.upnext-empty-cta svg { flex-shrink: 0; }
.upnext-empty-cta span { font-size: 13px; color: var(--text-muted); flex: 1; }

/* Custom date/time pickers */
.custom-picker-btn { text-align: left; cursor: pointer; color: var(--text-muted); font-size: 14px; }
.custom-picker-btn.has-value { color: var(--text); }

/* Calendar */
.cal-popup {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--bg-raised); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 14px 16px; z-index: 400;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3); width: 300px;
}
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-nav { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; padding: 4px 8px; border-radius: var(--radius); transition: color var(--t), background var(--t); }
.cal-nav:hover { color: var(--text); background: var(--bg-hover); }
.cal-month-label { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: 0.04em; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.cal-weekday { text-align: center; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-subtle); padding: 4px 0; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
@keyframes cal-slide-from-right { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes cal-slide-from-left  { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.cal-days.anim-next { animation: cal-slide-from-right 200ms cubic-bezier(0.25, 1, 0.5, 1) both; }
.cal-days.anim-prev { animation: cal-slide-from-left  200ms cubic-bezier(0.25, 1, 0.5, 1) both; }
.cal-day { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 13px; border-radius: 50%; cursor: pointer; color: var(--text-muted); transition: background var(--t), color var(--t); border: none; background: none; }
.cal-day:hover { background: var(--bg-hover); color: var(--text); }
.cal-day.today { color: var(--text); font-weight: 600; }
.cal-day.selected { background: var(--accent); color: #000; font-weight: 600; }
.cal-day.other-month { opacity: 0.3; }
.cal-day:disabled { opacity: 0.2; cursor: default; }

/* Time wheel */
.time-popup {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--bg-raised); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); z-index: 400; box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  width: 160px; height: 132px; overflow: hidden;
}
.time-wheels { display: flex; align-items: center; height: 100%; position: relative; z-index: 2; }
.time-wheel-col {
  flex: 1; height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
}
.time-wheel-col::-webkit-scrollbar { display: none; }
.time-wheel-item {
  height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 400; color: var(--text-muted);
  scroll-snap-align: center; cursor: pointer; transition: color var(--t);
  user-select: none;
}
.time-wheel-item.selected { color: var(--text); font-weight: 600; }
.time-wheel-ampm .time-wheel-item { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; }
.time-wheel-sep { font-size: 18px; font-weight: 300; color: var(--text-muted); padding: 0 2px; flex-shrink: 0; }
.time-wheel-highlight {
  position: absolute; top: 50%; left: 0; right: 0; height: 44px;
  transform: translateY(-50%); background: var(--bg-hover);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  pointer-events: none; z-index: 1;
}
.time-wheel-mask {
  position: absolute; left: 0; right: 0; height: 44px; z-index: 3; pointer-events: none;
}
.time-wheel-mask.top { top: 0; background: linear-gradient(to bottom, var(--bg-raised) 0%, transparent 100%); }
.time-wheel-mask.bottom { bottom: 0; background: linear-gradient(to top, var(--bg-raised) 0%, transparent 100%); }
.upnext-film-results { display: none; flex-direction: column; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow-y: auto; max-height: 290px; scrollbar-width: thin; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; background: var(--bg-raised); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.upnext-film-opt { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; transition: background var(--t), opacity 0.2s ease, transform 0.2s ease; border-bottom: 1px solid var(--border); opacity: 0; transform: translateY(-4px); }
.upnext-film-opt.visible { opacity: 1; transform: none; }
.upnext-film-opt:last-child { border-bottom: none; }
.upnext-film-opt:hover { background: var(--bg-hover); }
.upnext-film-opt-poster { width: 28px; height: 42px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.upnext-film-opt-title { font-size: 13px; color: var(--text); flex: 1; }
.upnext-film-opt-year { font-size: 12px; color: var(--text-muted); }
.upnext-film-pill { display: flex; align-items: center; gap: 10px; background: var(--bg-hover); border-radius: var(--radius); padding: 8px 12px; font-size: 13px; }
.upnext-film-pill img { width: 28px; height: 42px; object-fit: cover; border-radius: 3px; }
.upnext-film-pill-clear { background: none; border: none; color: var(--text-muted); cursor: pointer; margin-left: auto; }
.upnext-theater-list { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--radius); overflow-y: auto; max-height: calc(5 * 57px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); scrollbar-width: thin; }
.upnext-theater-opt { padding: 10px 14px; font-size: 13px; cursor: pointer; transition: background var(--t); border-bottom: 1px solid var(--border); }
.upnext-theater-opt:last-child { border-bottom: none; }
.upnext-theater-opt:hover { background: var(--bg-hover); }
.upnext-theater-opt strong { display: block; color: var(--text); }
.upnext-theater-opt span { color: var(--text-muted); font-size: 11px; }
.btn-sm { font-size: 11px; padding: 5px 10px; }

.dash-poster-row { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.dash-poster-row::-webkit-scrollbar { display: none; }
.dash-poster-item { flex-shrink: 0; width: 120px; text-decoration: none; color: inherit; }
.dash-poster-item--lg { width: 150px; }
.dash-poster {
  width: 120px;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin-bottom: 10px;
  transition: opacity var(--t);
}
.dash-poster-item--lg .dash-poster { width: 150px; height: 225px; }
.dash-poster-item:hover .dash-poster { opacity: 0.8; }
.dash-poster-stub {
  width: 120px;
  height: 180px;
  border-radius: 6px;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.dash-poster-info { display: flex; flex-direction: column; gap: 3px; }
.dash-poster-title { font-size: 12px; font-weight: 500; color: var(--text); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-poster-stars { font-size: 10px; color: var(--text-muted); }
.dash-poster-year { font-size: 11px; color: var(--text-subtle); }

/* ============================================================
   DASHBOARD HEADER
   ============================================================ */
/* Past showings prompt */
.past-showings { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.past-showing-banner { display: flex; align-items: center; gap: 12px; background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 12px 14px; }
.past-showing-poster { width: 32px; height: 48px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.past-showing-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.past-showing-q { font-size: 13px; font-weight: 500; color: var(--text); }
.past-showing-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.past-showing-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Inline rating widget inside past-showing banner */
.psr-inline { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.psr-stars { display: flex; }
.psr-review { font-size: 13px; padding: 7px 10px; resize: none; min-height: 52px; }
.psr-btns { display: flex; gap: 8px; }

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
.dash-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.dash-greeting {
  min-width: 0;
  flex-shrink: 1;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-greeting-word { display: contents; }
.dash-greeting-name { display: contents; }

@media (max-width: 700px) {
  .dash-greeting {
    display: flex;
    flex-direction: column;
    gap: 2px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: inherit;
    font-weight: inherit;
  }
  .dash-greeting-word {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
  }
  .dash-greeting-name {
    display: block;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.1;
    word-break: break-word;
  }
}

/* ============================================================
   NOW PLAYING BAR
   ============================================================ */
.now-playing-bar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 200;
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: npbSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes npbSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.npb-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
  border-radius: var(--radius);
  transition: opacity var(--t);
}
.npb-left:hover { opacity: 0.75; }
.npb-poster-wrap { flex-shrink: 0; }
.npb-poster {
  width: 36px;
  height: 54px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.npb-poster-stub {
  width: 36px;
  height: 54px;
  border-radius: 3px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-muted);
}
.npb-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.npb-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.npb-title-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.npb-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.npb-year {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.npb-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.npb-format {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
}
.npb-elapsed {
  font-size: 11px;
  color: var(--text-muted);
}
.npb-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.npb-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t), color var(--t);
  color: var(--text-muted);
}
.npb-btn:hover { background: var(--bg); color: var(--text); }
.npb-done { color: var(--text); }
.npb-done:hover { background: var(--accent); color: #fff; }

/* Push page content up when bar is visible */
body.has-now-playing { padding-bottom: 76px; }
@media (max-width: 700px) {
  .now-playing-bar { bottom: calc(57px + env(safe-area-inset-bottom)); padding: 8px 16px; }
  body.has-now-playing { padding-bottom: calc(133px + env(safe-area-inset-bottom)); }
}

/* ============================================================
   CHECK-IN STRIP
   ============================================================ */
.checkin-strip {
  flex-shrink: 0;
  flex-grow: 0;
}

/* Idle state */
.checkin-idle {
  display: flex;
}
.checkin-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color var(--t), border-color var(--t), background var(--t);
  letter-spacing: -0.01em;
}
.checkin-trigger:hover {
  color: var(--text);
  border-color: var(--text-subtle);
  background: var(--bg-hover);
}
.checkin-trigger svg { opacity: 0.6; flex-shrink: 0; }
.checkin-trigger:hover svg { opacity: 1; }

/* Active state */
.checkin-active {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  max-width: 520px;
}
.checkin-poster {
  width: 44px;
  height: 66px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.checkin-poster-stub {
  width: 44px;
  height: 66px;
  border-radius: 4px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.checkin-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 120px;
}
.checkin-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
}
.checkin-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.checkin-year {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}
.checkin-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.checkin-format {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.checkin-elapsed { font-size: 12px; }
.checkin-cancel-prompt {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.checkin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .dash-header { flex-direction: row; align-items: center; gap: 16px; }
  /* When check-in is active, stack greeting above the card */
  .dash-header:has(.checkin-active) {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .checkin-active { max-width: 100%; flex-wrap: wrap; width: 100%; }
  .checkin-actions { width: 100%; }
  .checkin-actions .btn { flex: 1; justify-content: center; }
}

/* Check-in modal */
.checkin-search-wrap { position: relative; margin-bottom: 20px; }
.checkin-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  scrollbar-width: none;
}
.checkin-search-results::-webkit-scrollbar { display: none; }
.checkin-search-results.open { display: block; }
.checkin-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--t);
  border-bottom: 1px solid var(--border);
}
.checkin-result-item:last-child { border-bottom: none; }
.checkin-result-item:hover { background: var(--bg); }
.checkin-result-thumb {
  width: 32px;
  height: 48px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.checkin-result-stub {
  width: 32px;
  height: 48px;
  border-radius: 3px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.checkin-result-name { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.checkin-result-year { font-size: 12px; color: var(--text-muted); }

/* Selected film pill */
.checkin-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 20px;
}
.checkin-sel-poster {
  width: 32px;
  height: 48px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.checkin-sel-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.checkin-sel-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.checkin-sel-year { font-size: 12px; color: var(--text-muted); }
.checkin-sel-clear {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 14px; padding: 4px;
  flex-shrink: 0; transition: color var(--t);
}
.checkin-sel-clear:hover { color: var(--text); }

/* Format picker */
.checkin-format-wrap { margin-bottom: 4px; }
.checkin-format-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.checkin-fmt {
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
  letter-spacing: -0.01em;
}
.checkin-fmt:hover { color: var(--text); border-color: var(--text-subtle); }
.checkin-fmt.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ============================================================
   LANDING PAGE
   ============================================================ */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0);   }
}
@media (prefers-reduced-motion: reduce) {
  [class^="lp-"] { animation: none !important; }
}

.home { display: flex; flex-direction: column; }

/* Hero */
.lp-hero {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 80px 0;
}
.lp-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.lp-headline {
  font-size: clamp(40px, 5.5vw, 80px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 24px;
  
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.lp-sub {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 440px;
  margin-bottom: 40px;
  animation: heroFadeUp 0.9s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.lp-actions {
  display: flex;
  gap: 12px;
  animation: heroFadeUp 0.9s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.lp-cta { padding: 12px 28px; font-size: 15px; }

/* Hero visual — stacked mock cards */
.lp-hero-visual {
  position: relative;
  height: 320px;
  animation: heroFadeUp 0.9s 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.lp-mock-card {
  position: absolute;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  width: 280px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.lp-mock-card--1 { top: 0; left: 20px; z-index: 3; }
.lp-mock-card--2 { top: 100px; left: 60px; z-index: 2; opacity: 0.85; }
.lp-mock-card--3 { top: 200px; left: 100px; z-index: 1; opacity: 0.6; }
.lp-mock-poster {
  width: 44px;
  height: 66px;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--border-strong);
  object-fit: cover;
}
.lp-mock-poster--img { width: 44px; height: 66px; border-radius: 4px; flex-shrink: 0; object-fit: cover; display: block; }
.lp-mock-poster--a { background: linear-gradient(135deg, #2a1a0e 0%, #8b3a1a 100%); }
.lp-mock-poster--b { background: linear-gradient(135deg, #0e1a2a 0%, #1a3a6b 100%); }
.lp-mock-poster--c { background: linear-gradient(135deg, #1a0e1a 0%, #4a1a5a 100%); }
.lp-mock-info { display: flex; flex-direction: column; gap: 4px; }
.lp-mock-title { font-size: 14px; font-weight: 600; color: var(--text); }
.lp-mock-meta { font-size: 11px; color: var(--text-muted); }
.lp-mock-stars { font-size: 13px; color: var(--accent); letter-spacing: 1px; }
.lp-mock-star-empty { color: var(--border-strong); }

/* Cascade feature sections */
.lp-cascade {
  padding: 80px 0 40px;
}
.lp-cascade-item {
  max-width: 1060px;
  margin: 0 auto 140px;
  padding: 0 32px;
  opacity: 0;
  transform: translateY(56px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.lp-cascade-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.lp-cascade-text {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 32px;
}
.lp-cascade-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}
.lp-cascade-heading {
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 14px;
}
.lp-cascade-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}
.lp-cascade-img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 32px 100px rgba(0,0,0,0.65);
  display: block;
}
.lp-cascade-item:nth-child(1) { transition-delay: 0s; }
.lp-cascade-item:nth-child(2) { transition-delay: 0.05s; }
.lp-cascade-item:nth-child(3) { transition-delay: 0.05s; }
.lp-cascade-item:nth-child(4) { transition-delay: 0.05s; }

@media (max-width: 600px) {
  .lp-cascade { padding-top: 48px; }
  .lp-cascade-item { margin-bottom: 80px; padding: 0 20px; }
  .lp-cascade-heading { font-size: 22px; }
}

/* ================================================================
   LANDING PAGE — UI MOCKUP FRAMES
   ================================================================ */
.lp-mock-frame {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  overflow: hidden;
  background: var(--bg);
}

/* --- Archive --- */
.lp-mock-archive { padding: 20px; display: flex; flex-direction: column; gap: 7px; }
.lp-ma-header { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; }
.lp-ma-sec { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--text-muted); }
.lp-ma-viewall { font-size: 12px; color: var(--text-muted); }
.lp-ma-viewall strong { color: var(--accent); font-weight: 600; }
.lp-ma-card { position: relative; height: 120px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.lp-ma-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.lp-ma-bg--1 {
  background:
    radial-gradient(ellipse at 68% 38%, rgba(70,110,200,0.55) 0%, transparent 48%),
    radial-gradient(ellipse at 85% 70%, rgba(30,60,120,0.4) 0%, transparent 35%),
    linear-gradient(135deg, #050c16 0%, #0b1a30 50%, #122540 100%);
}
.lp-ma-bg--2 {
  background:
    radial-gradient(ellipse at 55% 55%, rgba(120,70,15,0.7) 0%, transparent 48%),
    radial-gradient(ellipse at 80% 30%, rgba(60,30,5,0.5) 0%, transparent 35%),
    linear-gradient(135deg, #080500 0%, #160c03 50%, #0c0802 100%);
}
.lp-ma-bg--3 {
  background:
    radial-gradient(ellipse at 42% 50%, rgba(220,220,220,0.13) 0%, transparent 48%),
    radial-gradient(ellipse at 75% 30%, rgba(180,180,180,0.07) 0%, transparent 30%),
    linear-gradient(135deg, #080808 0%, #161616 50%, #202020 100%);
}
.lp-ma-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(4,4,4,0.92) 0%, rgba(4,4,4,0.62) 38%, rgba(4,4,4,0.15) 72%, transparent 100%);
}
.lp-ma-content { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; z-index: 2; }
.lp-ma-title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 7px; }
.lp-ma-sub { display: flex; align-items: center; gap: 8px; }
.lp-ma-fmt { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 3px; background: rgba(245,244,240,0.08); color: var(--text-muted); border: 1px solid rgba(245,244,240,0.14); }
.lp-ma-fmt--gold { background: rgba(201,168,76,0.14); color: var(--accent); border-color: rgba(201,168,76,0.3); }
.lp-ma-stars { font-size: 12px; color: var(--accent); letter-spacing: 1px; }
.lp-ma-day { font-size: 48px; font-weight: 200; color: rgba(245,244,240,0.1); line-height: 1; }

/* --- Screenings --- */
.lp-mock-screenings { padding: 28px; display: flex; flex-direction: column; gap: 0; }
.lp-ms-nowplaying { margin-bottom: 20px; }
.lp-ms-np-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.lp-ms-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; display: inline-block; flex-shrink: 0; box-shadow: 0 0 6px rgba(74,222,128,0.7); }
.lp-ms-np-row { display: flex; align-items: center; gap: 14px; }
.lp-ms-np-thumb { width: 48px; height: 72px; border-radius: 6px; flex-shrink: 0; background: var(--border-strong); }
.lp-ms-np-info { flex: 1; }
.lp-ms-np-title { font-size: 16px; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.lp-ms-np-meta { font-size: 12px; color: var(--text-muted); }
.lp-ms-np-progress { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; flex-shrink: 0; }
.lp-ms-np-bar { width: 80px; height: 3px; background: var(--border-strong); border-radius: 2px; overflow: hidden; }
.lp-ms-np-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.lp-ms-np-time { font-size: 10px; color: var(--text-muted); }
.lp-ms-divider { height: 1px; background: var(--border); margin-bottom: 20px; }
.lp-ms-upcoming-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 14px; }
.lp-ms-event { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.lp-ms-event:last-child { border-bottom: none; }
.lp-ms-event-date { text-align: center; flex-shrink: 0; width: 36px; }
.lp-ms-event-month { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-muted); text-transform: uppercase; }
.lp-ms-event-day { font-size: 22px; font-weight: 300; color: var(--text); line-height: 1; }
.lp-ms-event-info { flex: 1; }
.lp-ms-event-title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.lp-ms-event-detail { font-size: 11px; color: var(--text-muted); }
.lp-ms-event-fmt { font-size: 9px; font-weight: 700; letter-spacing: 0.06em; padding: 3px 7px; border-radius: 4px; background: rgba(245,244,240,0.06); color: var(--text-muted); border: 1px solid var(--border); flex-shrink: 0; }

/* --- Film page --- */
.lp-mf-backdrop {
  height: 300px; position: relative;
  background-color: #090806;
  overflow: hidden;
}
.lp-mf-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.lp-mf-fade { position: absolute; bottom: 0; left: 0; right: 0; height: 120px; background: linear-gradient(to bottom, transparent, var(--bg)); z-index: 1; }
.lp-mf-body { padding: 4px 28px 26px; position: relative; z-index: 1; }
.lp-mf-title { font-size: 30px; font-weight: 300; letter-spacing: 0.22em; color: var(--text); margin-bottom: 8px; }
.lp-mf-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.lp-mf-tags { display: flex; gap: 6px; margin-bottom: 16px; }
.lp-mf-tag { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; padding: 3px 8px; border-radius: 4px; background: rgba(245,244,240,0.07); color: var(--text-muted); border: 1px solid var(--border); }
.lp-mf-actions { display: flex; gap: 8px; margin-bottom: 22px; }
.lp-mf-btn { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; padding: 7px 14px; border-radius: 5px; border: 1px solid var(--border-strong); color: var(--text-muted); background: rgba(245,244,240,0.04); }
.lp-mf-btn--primary { background: var(--accent); color: #000; border-color: var(--accent); }
.lp-mf-ratings { display: flex; gap: 36px; }
.lp-mf-rating {}
.lp-mf-score { font-size: 24px; font-weight: 400; color: var(--text); line-height: 1; }
.lp-mf-score--slate { color: var(--accent); }
.lp-mf-denom { font-size: 13px; color: var(--text-muted); font-weight: 400; }
.lp-mf-rlabel { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; color: var(--text-muted); margin-top: 5px; }

/* --- Profile --- */
.lp-mock-profile { padding: 26px 28px 24px; }
.lp-mp-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.lp-mp-avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: #000; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; flex-shrink: 0; }
.lp-mp-name { font-size: 18px; font-weight: 500; margin-bottom: 5px; }
.lp-mp-handle { font-size: 13px; color: var(--text-muted); font-weight: 400; margin-left: 6px; }
.lp-mp-stats { font-size: 11px; color: var(--text-muted); line-height: 1.6; }
.lp-mp-stats strong { color: var(--text); font-weight: 500; }
.lp-mp-divider { height: 1px; background: var(--border); margin-bottom: 18px; }
.lp-mp-sec-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 10px; }
.lp-mp-sec-label--mt { margin-top: 20px; }
.lp-mp-event { display: flex; align-items: center; gap: 14px; padding: 13px 16px; background: var(--bg-raised); border-radius: 8px; border: 1px solid var(--border); }
.lp-mp-event-thumb { width: 46px; height: 46px; border-radius: 6px; flex-shrink: 0; background: radial-gradient(ellipse at 40% 40%, rgba(180,130,60,0.5) 0%, transparent 60%), linear-gradient(135deg, #1a1205, #2a1e0a); }
.lp-mp-event-title { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.lp-mp-event-date { font-size: 12px; color: var(--accent); font-weight: 500; }
.lp-mp-event-theater { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.lp-mp-posters { display: flex; gap: 10px; }
.lp-mp-poster { flex: 1; aspect-ratio: 2/3; border-radius: 7px; overflow: hidden; position: relative; border: 1px solid var(--border); }
.lp-mp-poster-label { position: absolute; bottom: 0; left: 0; right: 0; font-size: 9px; color: var(--text); padding: 18px 5px 6px; background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.85)); text-align: center; line-height: 1.3; }
.lp-mp-poster--1 { background: radial-gradient(ellipse at 40% 30%, rgba(80,40,130,0.6) 0%, transparent 52%), linear-gradient(160deg, #120820, #201040); }
.lp-mp-poster--2 { background: radial-gradient(ellipse at 50% 65%, rgba(200,140,20,0.6) 0%, transparent 52%), linear-gradient(160deg, #140b00, #2e1d00); }
.lp-mp-poster--3 { background: radial-gradient(ellipse at 50% 40%, rgba(40,110,160,0.5) 0%, transparent 52%), linear-gradient(160deg, #071018, #102030); }
.lp-mp-poster--4 { background: radial-gradient(ellipse at 50% 40%, rgba(180,25,25,0.5) 0%, transparent 52%), linear-gradient(160deg, #140000, #300404); }
.lp-mp-poster--5 { background: radial-gradient(ellipse at 50% 72%, rgba(220,55,10,0.7) 0%, transparent 50%), linear-gradient(160deg, #200404, #580808); }

/* --- Watchlist --- */
.lp-mock-watchlist { padding: 20px 22px 18px; }
.lp-mw-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.lp-mw-title { font-size: 20px; font-weight: 500; }
.lp-mw-header-right { display: flex; align-items: center; gap: 12px; }
.lp-mw-count { font-size: 12px; color: var(--text-muted); }
.lp-mw-addbtn { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; padding: 6px 12px; border-radius: 5px; background: var(--accent); color: #000; }
.lp-mw-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.lp-mw-tab { font-size: 13px; color: var(--text-muted); padding: 7px 16px 9px; }
.lp-mw-tab--active { color: var(--text); border-bottom: 2px solid var(--accent); margin-bottom: -1px; }
.lp-mw-tc { font-size: 11px; color: var(--text-muted); margin-left: 4px; }
.lp-mw-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.lp-mw-p { aspect-ratio: 2/3; border-radius: 6px; overflow: hidden; position: relative; border: 1px solid var(--border); }
.lp-mw-p span { position: absolute; bottom: 0; left: 0; right: 0; font-size: 8px; color: var(--text); padding: 14px 4px 5px; background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.88)); text-align: center; line-height: 1.3; }
.lp-mw-p--1  { background: radial-gradient(ellipse at 50% 40%, rgba(160,100,20,0.4) 0%, transparent 55%), linear-gradient(160deg, #120d04, #201808); }
.lp-mw-p--2  { background: radial-gradient(ellipse at 50% 50%, rgba(30,60,100,0.5) 0%, transparent 55%), linear-gradient(160deg, #060c18, #0f1828); }
.lp-mw-p--3  { background: radial-gradient(ellipse at 50% 45%, rgba(180,120,20,0.45) 0%, transparent 55%), linear-gradient(160deg, #141004, #241a08); }
.lp-mw-p--4  { background: radial-gradient(ellipse at 50% 35%, rgba(40,90,40,0.5) 0%, transparent 55%), linear-gradient(160deg, #081008, #0f1e10); }
.lp-mw-p--5  { background: radial-gradient(ellipse at 50% 45%, rgba(160,50,80,0.4) 0%, transparent 55%), linear-gradient(160deg, #180810, #28101c); }
.lp-mw-p--6  { background: radial-gradient(ellipse at 50% 35%, rgba(140,140,160,0.2) 0%, transparent 55%), linear-gradient(160deg, #101012, #1c1c20); }
.lp-mw-p--7  { background: radial-gradient(ellipse at 50% 55%, rgba(180,20,20,0.5) 0%, transparent 55%), linear-gradient(160deg, #140404, #240808); }
.lp-mw-p--8  { background: radial-gradient(ellipse at 50% 35%, rgba(80,120,180,0.4) 0%, transparent 55%), linear-gradient(160deg, #06101e, #0e1c30); }
.lp-mw-p--9  { background: radial-gradient(ellipse at 50% 45%, rgba(120,100,60,0.35) 0%, transparent 55%), linear-gradient(160deg, #0e0c08, #1c1810); }
.lp-mw-p--10 { background: radial-gradient(ellipse at 50% 40%, rgba(60,100,60,0.4) 0%, transparent 55%), linear-gradient(160deg, #081008, #121e12); }
.lp-mw-p--11 { background: radial-gradient(ellipse at 50% 50%, rgba(40,80,140,0.45) 0%, transparent 55%), linear-gradient(160deg, #060e18, #0c1828); }
.lp-mw-p--12 { background: radial-gradient(ellipse at 50% 60%, rgba(20,60,120,0.5) 0%, transparent 55%), linear-gradient(160deg, #040c18, #081428); }

@media (max-width: 640px) {
  .lp-mw-grid { grid-template-columns: repeat(4, 1fr); }
  .lp-mw-p--11, .lp-mw-p--12 { display: none; }
  .lp-mf-ratings { gap: 20px; }
  .lp-mf-score { font-size: 18px; }
}

/* Bottom CTA */
.lp-bottom-cta {
  padding: 120px 0 80px;
}
.lp-bottom-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.lp-bottom-headline {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.lp-bottom-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 36px;
}
.lp-invite-form { display: flex; gap: 10px; justify-content: center; margin-bottom: 36px; }
.lp-invite-input { background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text); font-size: 14px; padding: 10px 16px; width: 260px; outline: none; }
.lp-invite-input:focus { border-color: var(--accent); }
.lp-invite-btn { flex-shrink: 0; }
.lp-invite-thanks { font-size: 15px; color: var(--accent); text-align: center; margin-bottom: 36px; }
@media (max-width: 600px) {
  .lp-bottom-cta { padding: 60px 0; }
  .lp-invite-form { flex-direction: column; align-items: center; }
  .lp-invite-input { width: 100%; max-width: 320px; }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: backdrop-in 300ms ease forwards;
}
@keyframes backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: visible;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  margin: 0 16px;
  position: relative;
  animation: modal-in 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-title {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.modal-form { display: flex; flex-direction: column; gap: 16px; }
.form-error { font-size: 13px; color: var(--accent); margin: 0; }
.modal-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.modal-footer-right { display: flex; gap: 8px; }
.link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font);
  padding: 0;
}
.link-btn:hover { color: var(--text); }

/* Log modal film header */
.log-modal-film {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}
.log-modal-poster {
  width: 48px;
  height: 72px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}
.log-modal-poster-stub {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
}
.log-modal-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.log-modal-year {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Modal inline search */
.modal-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  position: relative;
}
.modal-search-input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  transition: border-color var(--t);
}
.modal-search-input:focus { border-color: var(--border-strong); }
.modal-search-input::placeholder { color: var(--text-subtle); }
.modal-search-list {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow-y: auto;
  max-height: 280px;
  background: var(--bg-raised);
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.modal-search-list.open { display: flex; }
.modal-search-result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  color: var(--text);
  transition: background var(--t);
  border-bottom: 1px solid var(--border);
}
.modal-search-result:last-child { border-bottom: none; }
.modal-search-result:hover { background: var(--bg-hover); }
.modal-search-result-poster {
  width: 36px;
  height: 54px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--bg-hover);
}
.modal-search-result-title { font-size: 14px; font-weight: 500; line-height: 1.3; }
.modal-search-result-year { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Edit modal toggles */
.modal-header-actions { display: flex; gap: 8px; margin-bottom: 20px; }
.edit-toggle-btn {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--t);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
.edit-toggle-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.edit-toggle-btn.liked.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   STAR RATING
   ============================================================ */
.stars { font-size: 13px; letter-spacing: 1px; display: inline-block; }
.star-full  { color: var(--accent); }
.star-empty { color: var(--text-subtle); }
.star-half  {
  background: linear-gradient(to right, var(--accent) 50%, var(--text-subtle) 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.star-picker { display: flex; align-items: center; gap: 1px; }
.star-btn {
  font-size: 20px;
  color: var(--text-subtle);
  padding: 2px 1px;
  transition: color var(--t);
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  -webkit-tap-highlight-color: transparent;
}
.star-btn:hover, .star-btn.active { color: var(--accent); }
.star-btn.half-active {
  background: linear-gradient(to right, var(--accent) 50%, var(--text-subtle) 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   DIARY
   ============================================================ */
.diary-page { min-height: 100vh; padding: 48px 0 100px; }
.diary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}
.diary-title { font-size: 28px; font-weight: 600; letter-spacing: -0.01em;  }
.diary-header-right { display: flex; align-items: center; gap: 16px; }
.diary-count { font-size: 13px; color: var(--text-muted); }

/* Layout toggle */
.layout-toggle { display: flex; gap: 2px; }
.layout-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: var(--text-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}
.layout-btn:hover { color: var(--text); }
.layout-btn.active { color: var(--text); background: var(--bg-hover); }

/* Grid layout */
/* Backdrop / cinematic grid layout */
.diary-layout-grid .diary-month-section { margin-bottom: 48px; }
.diary-layout-grid .diary-month-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.diary-layout-grid .diary-entries { display: flex; flex-direction: column; gap: 6px; }
.diary-layout-grid .entry {
  display: block;
  position: relative;
  border: none;
  background: none;
  padding: 0;
}
.diary-layout-grid .entry-day,
.diary-layout-grid .entry-body,
.diary-layout-grid .entry-poster-link,
.diary-layout-grid .grid-caption { display: none !important; }

/* Backdrop card */
.entry-backdrop-card { display: none; }
.diary-layout-grid .entry-backdrop-card {
  display: block;
  position: relative;
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}
.diary-layout-grid .entry-backdrop-card:hover { transform: scale(1.005); }
.diary-layout-grid .entry-backdrop-card:active { transform: scale(0.98); }

/* Grid action buttons — hover reveal */
.entry-grid-actions {
  display: none;
  position: absolute;
  top: 8px; right: 8px;
  z-index: 10;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.diary-layout-grid .entry { position: relative; }
.diary-layout-grid .entry-grid-actions { display: flex; }
.diary-layout-grid .entry:hover .entry-grid-actions { opacity: 1; }
.entry-grid-edit,
.entry-grid-share {
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  border-radius: 4px;
  width: 28px; height: 28px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
}
.entry-grid-edit:hover,
.entry-grid-share:hover { background: rgba(0,0,0,0.9); }
.entry-backdrop-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
}
.entry-backdrop-img--dark { background: var(--bg-raised); display: flex; align-items: center; }
.entry-backdrop-poster-fallback { height: 100%; width: auto; object-fit: cover; opacity: 0.35; }
.entry-backdrop-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0.1) 75%, transparent 100%);
}
.entry-backdrop-overlay--dark { background: linear-gradient(to right, rgba(0,0,0,0.85) 30%, transparent 100%); }
.entry-backdrop-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 100%;
  padding: 20px 24px;
  gap: 12px;
}
.entry-backdrop-poster-inset { height: 130px; width: auto; border-radius: 5px; flex-shrink: 0; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.entry-backdrop-info { display: flex; flex-direction: column; gap: 5px; }
.entry-backdrop-title { font-size: 18px; font-weight: 600; color: #fff; line-height: 1.2; }
.entry-backdrop-director { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 2px; display: block; }
.entry-backdrop-meta { display: flex; align-items: center; gap: 8px; }
.entry-backdrop-year { font-size: 12px; color: rgba(255,255,255,0.5); }
.entry-backdrop-rewatch { font-size: 12px; color: rgba(255,255,255,0.4); }
.entry-format--dark { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); border-color: transparent; font-size: 10px; }
.entry-backdrop-stars { display: flex; gap: 1px; }
.entry-backdrop-stars .star-full,
.entry-backdrop-stars .star-half { color: var(--accent); font-size: 12px; }
.entry-backdrop-stars .star-empty { color: rgba(255,255,255,0.2); font-size: 12px; }
.entry-backdrop-date { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex-shrink: 0; }
.entry-backdrop-day { font-size: 28px; font-weight: 700; color: rgba(255,255,255,0.18); line-height: 1; }
.entry-backdrop-month { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.18); }

/* Grid hover overlay — keep for list view compat */
.grid-overlay { display: none; }
.grid-overlay-title { font-size: 12px; font-weight: 500; color: #fff; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid-overlay-year { color: rgba(255,255,255,0.5); font-weight: 400; }
.grid-overlay-rating { display: flex; gap: 1px; margin-top: 1px; }
.grid-overlay-rating .star-full, .grid-overlay-rating .star-half { color: var(--accent); font-size: 11px; }
.grid-overlay-rating .star-empty { color: rgba(255,255,255,0.25); font-size: 11px; }

/* Grid caption — shown on mobile instead of hover overlay */
.grid-caption { display: none; }
@media (hover: none) {
  .diary-layout-grid .grid-caption {
    display: block;
    padding: 5px 2px 0;
  }
  .grid-caption-title {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .grid-caption-year {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
  }
}

/* Log Film morph */
.log-morph {
  position: relative;
  height: 34px;
  width: 110px;
  background: var(--accent);
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.25s ease,
              border-color 0.25s ease;
}
.log-morph-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.log-morph input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0 12px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease 0.1s;
}
.log-morph.open {
  width: 260px;
  background: var(--bg-raised);
  border-color: var(--border-strong);
  cursor: text;
}
.log-morph.open .log-morph-label { opacity: 0; }
.log-morph.open input { opacity: 1; pointer-events: auto; }
.log-morph-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: auto;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-y: auto;
  max-height: 320px;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.log-morph-results:empty { display: none; }
.log-morph-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t);
  opacity: 0;
  transform: translateY(-4px);
  transition: background var(--t), opacity 0.2s ease, transform 0.2s ease;
}
.log-morph-result:last-child { border-bottom: none; }
.log-morph-result:hover { background: var(--bg-hover); }
.log-morph-result.visible { opacity: 1; transform: none; }
.log-morph-result img { width: 28px; height: 42px; object-fit: cover; border-radius: 3px; flex-shrink: 0; background: var(--bg-hover); }
.log-morph-result-title { font-size: 13px; font-weight: 500; }
.log-morph-result-year { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Filters */
.diary-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 40px;
}
.diary-search-input {
  height: 32px;
  padding: 0 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  letter-spacing: 0.04em;
  width: 160px;
  outline: none;
  transition: border-color var(--t), width var(--t), color var(--t);
}
.diary-search-input:focus { border-color: var(--border-strong); width: 220px; }
.diary-search-input::placeholder { color: var(--text-muted); font-weight: 500; }
.wl-add-search { width: 100% !important; border-radius: 100px; }

/* Filter pill */
.fpill-wrap {
  position: relative;
}
.fpill {
  height: 32px;
  padding: 0 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.fpill:hover { border-color: var(--border-strong); color: var(--text); }
.fpill:active { transform: scale(0.96); }
.fpill.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Dropdown panel */
.fpill-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 140px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 150;
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
  /* closed state */
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top left;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.18s ease,
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0.2s;
}
.fpill-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  transition:
    opacity 0.18s ease,
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0s;
}
.fpill-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--t), color var(--t);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.fpill-opt:hover { background: var(--bg-hover); color: var(--text); }
.fpill-opt.selected { color: var(--text); font-weight: 500; }

.sort-panel { min-width: 180px; }
.sort-group-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 10px 14px 4px;
}
.sort-group-label:first-child { padding-top: 6px; }

.filter-clear {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  padding: 0 6px;
  transition: color var(--t);
  font-family: var(--font);
}
.filter-clear:hover { color: var(--text); }
.diary-no-results { padding: 48px 0; color: var(--text-muted); font-size: 14px; }

.diary-month-section { margin-bottom: 48px; }
.diary-month-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.diary-entries { display: flex; flex-direction: column; gap: 1px; }
.diary-empty { text-align: center; padding: 80px 0; color: var(--text-muted); font-size: 14px; }

/* Entry card */
.entry {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 20px 4px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  transition: background var(--t);
}
.entry:hover { background: transparent; }
.diary-entries .entry:first-child { border-top: 1px solid var(--border); }

/* Day number */
.entry-day {
  flex-shrink: 0;
  width: 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 2px;
  gap: 2px;
}
.entry-day-num {
  font-size: 28px;
  font-weight: 300;
  color: var(--text-subtle);
  line-height: 1;
}
.entry-day-month {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.entry-poster-link { flex-shrink: 0; }
.entry-poster {
  width: 96px;
  height: 144px;
  object-fit: cover;
  border-radius: 5px;
  display: block;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.entry-poster-stub {
  width: 96px;
  height: 144px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--text-muted);
}
.entry-body { flex: 1; min-width: 0; }
.entry-title-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 5px;
}
.entry-director { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}
.entry-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  transition: color var(--t);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  letter-spacing: -0.01em;
}
.entry-title:hover { color: var(--text-muted); }
.entry-year { font-size: 13px; color: var(--text-subtle); flex-shrink: 0; }
.entry-stars { font-size: 13px; color: var(--text-muted); }
.entry-inline-stars { display: inline-flex; align-items: center; gap: 0; }
.entry-inline-stars .star-btn { font-size: 16px; padding: 0 1px; }
.entry-actions { display: flex; gap: 5px; align-items: center; margin-top: 10px; }
.action-btn {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
}
.action-btn:hover { background: var(--bg-hover); color: var(--text); }
.action-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.action-btn.liked { background: var(--accent); color: #fff; border-color: var(--accent); }
.action-btn.rewatched.active { background: var(--text); color: var(--bg); border-color: var(--text); }
/* Entry format badge */
.entry-format {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
}
/* Format picker (modal) */
.format-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.format-opt {
  height: 30px;
  padding: 0 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
}
.format-opt:hover { color: var(--text); border-color: var(--border-strong); }
.format-opt.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Entry tags */
.entry-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.entry-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 100px;
  padding: 2px 8px;
}

/* Tag input */
.tag-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  cursor: text;
  min-height: 38px;
}
.tag-input-wrap:focus-within { border-color: var(--border-strong); }
.tag-pills { display: contents; }
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 2px 8px 2px 10px;
}
.tag-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.tag-pill-remove:hover { color: var(--text); }
.tag-input {
  flex: 1;
  min-width: 80px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  outline: none;
  font-family: var(--font);
  padding: 0;
}
.tag-input::placeholder { color: var(--text-subtle); }

/* Tag autocomplete dropdown */
.tag-autocomplete {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow-y: auto;
  max-height: 220px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.tag-autocomplete.open { display: block; }
.tag-autocomplete-item {
  display: block;
  width: 100%;
  padding: 9px 14px;
  text-align: left;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t), color var(--t);
}
.tag-autocomplete-item:last-child { border-bottom: none; }
.tag-autocomplete-item:hover { background: var(--bg-hover); color: var(--text); }

/* Admin table */
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th {
  text-align: left;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: var(--bg-hover); }

.entry-review-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: none;
}
.entry-review-text.open { display: block; }

/* ============================================================
   FILM PAGE
   ============================================================ */
.film-page { min-height: 100vh; padding: 48px 0 100px; position: relative; }
.film-backdrop {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: 448px;
  background-size: cover;
  background-position: center top;
  background-color: var(--bg);
  pointer-events: none;
  z-index: 0;
}
.film-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%),
    linear-gradient(to bottom, transparent 65%, var(--bg) 100%);
}
.film-page .container { position: relative; z-index: 1; }

.film-back { display: none; }
.film-back:hover { color: var(--text); }
.film-hero { display: flex; gap: 56px; align-items: flex-start; margin-bottom: 64px; padding-top: 360px; }
.film-meta { padding-top: 8px; }
.film-stat-denom { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.film-log-label.slate-label { color: var(--accent); }
.rt-fresh { color: #6bc26b; }
.rt-rotten { color: #e05c5c; }

.film-title {
  font-size: clamp(32px, 4.5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 20px;
  
}
.film-title-hidden { display: none; }
.film-logo {
  display: block;
  max-width: 340px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 20px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}
.film-attrs { display: flex; font-size: 13px; color: var(--text-muted); margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.film-attr::after { content: '·'; margin: 0 12px; opacity: 0.35; }
.film-attr:last-child::after { content: ''; margin: 0; }
.film-genres { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.film-genre {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 10px;
}
.film-overview { font-size: 14px; line-height: 1.85; color: var(--text-muted); max-width: 540px; }
.film-meta-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.film-upcoming-banner { display: flex; align-items: flex-start; gap: 10px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 32px; color: var(--text); }
.film-upcoming-banner svg { flex-shrink: 0; margin-top: 2px; color: var(--text-muted); }
.film-upcoming-details { display: flex; flex-direction: column; gap: 3px; }
.film-upcoming-label { font-size: 13px; font-weight: 600; }
.film-upcoming-meta { display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; color: var(--text-muted); }
.film-rule { height: 1px; background: var(--border); margin-bottom: 36px; }
.film-unseen-actions { display: flex; gap: 10px; margin-bottom: 40px; }
.film-log-row { display: flex; gap: 56px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 40px; }
.film-log-item { display: flex; flex-direction: column; }
.film-log-label { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); line-height: 1; margin-bottom: 14px; }
.film-log-value { font-size: 14px; line-height: 1; color: var(--text); }
.film-log-empty { font-size: 14px; line-height: 1; color: var(--text-muted); }
.film-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.film-liked { color: var(--accent); font-size: 14px; line-height: 1; }
.film-review { margin-bottom: 40px; }
.film-review { display: flex; flex-direction: column; gap: 12px; margin-bottom: 48px; }
.film-review-text { font-size: 15px; line-height: 1.9; color: var(--text-muted); white-space: pre-wrap; max-width: 620px; }
.film-cast { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 24px; }
.cast-member { width: 76px; text-align: center; }
.cast-photo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; display: block; background: var(--bg-hover); }
.cast-stub { display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--text-muted); border: 1px solid var(--border); }
.cast-name { font-size: 11px; font-weight: 500; color: var(--text); margin-bottom: 2px; line-height: 1.3; }
.cast-char { font-size: 10px; color: var(--text-muted); line-height: 1.3; }

/* Viewings history */
.film-viewings { display: flex; flex-direction: column; margin-top: 16px; }
.film-viewing-row { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }

/* Viewing picker */
/* ── Share card ── */
.share-modal-panel { max-width: 520px; }
.share-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; align-items: center; }
.share-modal-hint { font-size: 12px; color: var(--text-muted); flex: 1; display: none; }

/* Share card — cinematic portrait */
.share-card {
  display: flex;
  flex-direction: column;
  background: #080808;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  font-family: 'Geist', system-ui, sans-serif;
  color: #f0f0f0;
  width: 300px;
  max-width: 100%;
  margin: 0 auto;
}
.share-card-poster-col {
  width: 100%;
  height: 270px;
  flex-shrink: 0;
  position: relative;
  background: #111;
}
.share-card-poster-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
}
.share-card-poster-stub {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 700; color: rgba(255,255,255,0.12);
  background: #111;
}
/* Gold rule between poster and body */
.share-card-body {
  padding: 16px 18px 16px;
  display: flex; flex-direction: column; gap: 9px;
  border-top: 2px solid #C9A84C;
  position: relative;
}
.share-card-brand { font-size: 8px; font-weight: 700; letter-spacing: 0.22em; color: #C9A84C; }
.share-card-info { display: flex; flex-direction: column; gap: 3px; }
.share-card-title { font-size: 17px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: #fff; margin: 0; }
.share-card-sub { font-size: 11px; color: rgba(255,255,255,0.38); margin: 0; }
.share-card-stars { font-size: 15px; letter-spacing: 2px; color: #C9A84C; line-height: 1; }
.share-card-review { font-size: 12px; line-height: 1.6; color: rgba(255,255,255,0.55); margin: 0; font-style: italic; }
.share-card-footer { display: flex; align-items: center; gap: 10px; font-size: 10px; color: rgba(255,255,255,0.28); padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.06); margin-top: auto; }
.share-card-footer span + span::before { content: '·'; margin-right: 10px; }

.viewing-picker-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.viewing-picker-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 12px 14px;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  font-family: var(--font); font-size: 14px; color: var(--text);
  transition: background var(--t), border-color var(--t);
}
.viewing-picker-item:hover { background: var(--bg-hover); border-color: var(--accent); }
.viewing-picker-num { font-size: 12px; color: var(--text-muted); width: 24px; flex-shrink: 0; }
.viewing-picker-date { flex: 1; font-weight: 500; }
.viewing-picker-format { font-size: 11px; color: var(--text-muted); background: var(--bg-hover); padding: 2px 7px; border-radius: 4px; }
.viewing-picker-rating { font-size: 13px; color: var(--accent); flex-shrink: 0; letter-spacing: 1px; }
.film-viewing-row:last-child { border-bottom: none; }
.film-viewing-row--editable { cursor: pointer; border-radius: var(--radius); transition: background var(--t); }
.film-viewing-row--editable:hover { background: var(--bg-raised); padding-left: 10px; padding-right: 10px; margin: 0 -10px; }
.film-viewing-left { display: flex; align-items: flex-start; gap: 14px; width: 100%; }
.film-viewing-num { font-size: 11px; font-weight: 600; color: var(--text-subtle); min-width: 24px; padding-top: 2px; }
.film-viewing-info { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.film-viewing-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.film-viewing-date { font-size: 13px; font-weight: 500; color: var(--text); }
.film-viewing-badge { font-size: 11px; color: var(--text-muted); background: var(--bg-raised); border: 1px solid var(--border); padding: 1px 7px; border-radius: 20px; }
.film-viewing-liked { color: #e05; border-color: transparent; background: transparent; }
.film-viewing-stars { display: flex; }
.film-viewing-review { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin: 0; }

/* More Like This */
.slate-avg-val { color: var(--accent); }
.film-slate-reviews { display: flex; flex-direction: column; gap: 0; margin-top: 20px; }
.fsr-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.fsr-item:last-child { border-bottom: none; }
.fsr-user { display: flex; flex-direction: row; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; width: 120px; }
.fsr-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-raised); border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--text); flex-shrink: 0;
}
.fsr-avatar--photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.fsr-name { font-size: 12px; color: var(--text-muted); line-height: 1.2; white-space: normal; overflow: visible; word-break: break-word; }
.fsr-user:hover .fsr-name { color: var(--accent); }
.fsr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 0; }
.fsr-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fsr-stars { display: flex; gap: 1px; font-size: 12px; }
.fsr-stars .star-full, .fsr-stars .star-half { color: var(--accent); }
.fsr-stars .star-empty { color: var(--border-strong); }
.fsr-date { font-size: 12px; color: var(--text-muted); }
.fsr-review { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.fsr-review-more, .fsr-review-less { background: none; border: none; color: var(--accent); font-size: 12px; cursor: pointer; padding: 0; font-family: var(--font); }

.film-similar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 16px; }
.similar-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.similar-poster { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: var(--radius); transition: opacity var(--t); }
.similar-card:hover .similar-poster { opacity: 0.75; }
.similar-title { font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.similar-year { font-size: 11px; color: var(--text-muted); }

/* Film viewings timeline */
.film-viewings { margin-bottom: 0; }
.film-viewings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.btn-sm { font-size: 12px; padding: 5px 12px; }
.film-viewing-row {
  padding: 14px 0;
}
.film-viewing-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.film-viewing-date {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  min-width: 140px;
}
.film-viewing-no-date { color: var(--text-muted); font-weight: 400; }
.film-viewing-review {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-muted);
  white-space: pre-wrap;
  max-width: 560px;
  margin-top: 12px;
}
.film-rewatch-badge {
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 2px 8px;
}

/* ============================================================
   LOG FILM
   ============================================================ */
.log-page { min-height: 100vh; padding: 48px 0 100px; }
.log-header { margin-bottom: 40px; }
.log-header h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.01em;  }
.search-wrap { position: relative; margin-bottom: 32px; }
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  z-index: 50;
  display: none;
}
.search-results.open { display: block; }
.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--t);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  color: var(--text);
}
.search-result:hover { background: var(--bg-hover); }
.search-result-poster { width: 32px; height: 48px; object-fit: cover; border-radius: 2px; flex-shrink: 0; background: var(--bg-hover); }
.search-result-title { font-size: 14px; font-weight: 500; }
.search-result-year { font-size: 12px; color: var(--text-muted); }
.log-form { max-width: 480px; display: flex; flex-direction: column; gap: 20px; }
.log-selected-film {
  display: none;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.log-selected-film.visible { display: flex; }
.log-selected-poster { width: 40px; height: 60px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
.log-selected-title { font-size: 15px; font-weight: 500; }
.log-selected-year { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   IMPORT
   ============================================================ */
.import-page { min-height: 100vh; padding: 48px 0 100px; }
.import-header { margin-bottom: 32px; }
.import-header h1 { font-size: 28px; font-weight: 500; letter-spacing: -0.025em; margin-bottom: 8px; }
.import-header p { font-size: 14px; color: var(--text-muted); }
.import-tabs { display: flex; gap: 4px; margin-bottom: 28px; }
.import-tab { background: none; border: 1px solid transparent; border-radius: var(--radius); padding: 7px 18px; font-size: 13px; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.import-tab:hover { color: var(--text); }
.import-tab.active { color: var(--text); border-color: var(--border-strong); background: var(--bg-hover); }
.import-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.import-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.import-option { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.import-option input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
.import-option-note { font-size: 11px; color: var(--text-muted); margin-left: 2px; }
.drop-zone {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 64px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
  margin-bottom: 24px;
}
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--text-muted); background: var(--bg-hover); }
.drop-zone strong { font-size: 15px; font-weight: 500; color: var(--text); display: block; margin-bottom: 6px; }
.drop-zone p { font-size: 13px; color: var(--text-muted); }
.import-results { display: none; flex-direction: column; gap: 8px; margin-top: 24px; }
.import-results.visible { display: flex; }
.import-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}
.import-stat-count { font-weight: 600; }
.import-skipped { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.import-already-done { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.import-progress { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.import-progress-header { display: flex; justify-content: space-between; align-items: center; }
.import-progress-header span { font-size: 13px; color: var(--text-muted); }
.import-progress-track { height: 4px; background: var(--bg-raised); border-radius: 2px; overflow: hidden; }
.import-progress-bar { height: 100%; background: var(--accent); border-radius: 2px; width: 0%; transition: width 0.3s ease; }
.import-progress-detail { font-size: 12px; color: var(--text-subtle); margin: 0; }
.import-stat-label { color: var(--text-muted); }
.import-status { font-size: 13px; color: var(--text-muted); display: none; }
.import-status.visible { display: block; }

/* ============================================================
   WATCHLIST
   ============================================================ */
.watchlist-page { min-height: 100vh; padding: 48px 0 100px; }

/* ============================================================
   WATCHLIST TABS
   ============================================================ */
.wl-tab-bar {
  display: none;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.wl-tabbed .wl-tab-bar { display: flex; }

.wl-tab {
  position: relative;
  padding: 8px 16px 12px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
  bottom: -1px;
  border-bottom: 2px solid transparent;
}
.wl-tab:hover { color: var(--text); }
.wl-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}
.wl-tab-count {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 4px;
}
.wl-tab.active .wl-tab-count { color: var(--text-muted); }

/* In tab mode: hide all sections by default, show only active */
.wl-tabbed .wl-section[data-tab] { display: none; }
.wl-tabbed .wl-section[data-tab].wl-tab-active { display: block; }

/* In together mode: hide the section titles that duplicate tab labels */
.wl-tabbed .wl-together-only { display: none; }

.wl-section { margin-bottom: 48px; }
.wl-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 20px;
}
.wl-release-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 4px 6px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.wl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 24px 20px;
}

.wl-item { display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateY(24px); transition: opacity 0.4s ease, transform 0.4s ease; }
.wl-item.visible { opacity: 1; transform: translateY(0); }

.entry, .dash-poster-item, .cast-member, .similar-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.entry.visible, .dash-poster-item.visible, .cast-member.visible, .similar-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.wl-poster-wrap {
  position: relative;
}
.wl-poster-wrap:hover .wl-remove { opacity: 1; }
.wl-poster-link { display: block; }
.wl-poster-link:hover .wl-poster { opacity: 0.85; }
.wl-title-link { display: block; text-decoration: none; }
.wl-title-link:hover .wl-title { color: var(--text-muted); }

.wl-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.wl-poster-stub {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-muted);
}

.wl-remove-form { position: absolute; top: 8px; right: 8px; }
.wl-remove {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--t);
  border: none;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.wl-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.wl-year { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   TAGS PAGE
   ============================================================ */
.tags-page { min-height: 100vh; padding: 48px 0 100px; }
.tags-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
}
.tags-title { font-size: 28px; font-weight: 600; letter-spacing: -0.01em;  }
.tags-count { font-size: 13px; color: var(--text-muted); }
.tags-empty { color: var(--text-muted); font-size: 14px; }

.tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 100px;
  text-decoration: none;
  transition: border-color var(--t), background var(--t);
}
.tag-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
}
.tag-card.active {
  background: var(--text);
  border-color: var(--text);
}
.tag-card.active .tag-card-name,
.tag-card.active .tag-card-count { color: var(--bg); }
.tag-card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.tag-card-count {
  font-size: 11px;
  color: var(--text-muted);
}

/* Tag films panel */
.tag-films-panel {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.tag-films-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}
.tag-films-label {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}
.tag-films-meta {
  font-size: 13px;
  color: var(--text-muted);
}
.tag-films-loading,
.tag-films-empty {
  font-size: 14px;
  color: var(--text-muted);
  padding: 24px 0;
}
.tag-films-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px 16px;
}
.tag-film-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
}
.tag-film-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  transition: opacity 0.15s;
}
.tag-film-item:hover .tag-film-poster { opacity: 0.8; }
.tag-film-stub {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-muted);
}
.tag-film-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag-film-year {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   MOBILE BOTTOM TABS
   ============================================================ */
.mobile-tabs { display: none; }

@media (max-width: 768px) {
  /* Hide top nav links & search on mobile */
  .nav-actions .nav-link,
  .nav-actions .nav-user-wrap,
  .nav-search-wrap { display: none; }

  /* Lock viewport — no horizontal scroll */
  html, body { max-width: 100vw; overflow-x: hidden; }

  /* Modals — bottom sheet on mobile */
  .modal-backdrop {
    align-items: flex-end;
    justify-content: stretch;
  }
  .modal-panel {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    padding: 20px 20px calc(80px + env(safe-area-inset-bottom));
    max-height: 92vh;
    overflow-y: auto;
    animation: modal-sheet-in 250ms ease;
  }
  @keyframes modal-sheet-in {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  /* Drag handle */
  .modal-panel::before {
    content: '';
    display: block;
    width: 36px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 20px;
  }
  .modal-close { top: 20px; right: 20px; }

  /* Plan a film modal — mobile fixes */
  /* Stack date + time vertically */
  #upnext-modal .modal-form > div[style*="display:flex"][style*="gap:12px"] {
    flex-direction: column;
    gap: 12px;
  }
  /* Calendar: sit in document flow so content below isn't covered */
  .cal-popup {
    position: relative;
    top: 4px;
    left: 0;
    width: 100%;
    box-sizing: border-box;
  }
  /* Bigger tap targets for calendar days */
  .cal-day {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
  /* Time popup: sit in flow, full-width, no transform offset */
  .time-popup {
    position: relative;
    top: 4px;
    left: 0;
    transform: none;
    width: 100%;
    height: 140px;
    box-sizing: border-box;
  }
  /* Film search results: shorter on small screens */
  .upnext-film-results {
    max-height: 220px;
  }
  /* Theater results: shorter cap on mobile */
  .upnext-theater-list {
    max-height: calc(3 * 57px);
  }

  /* Tighten container padding */
  .container { padding: 0 16px; }

  /* Stats — stack genres and numbers vertically */
  .dash-stats { flex-direction: column; align-items: flex-start; gap: 24px; margin-bottom: 32px; padding-bottom: 32px; }
  .dash-genres { min-width: 0; width: 100%; }
  .dash-nums { gap: 0; width: 100%; justify-content: flex-start; }
  .dash-stat { padding: 0 20px; }
  .dash-stat:first-child { padding-left: 0; }
  .dash-stat-num { font-size: 32px; }

  /* Poster row — contain within viewport */
  .dash-poster-row { max-width: 100%; }
  .dash-poster-title { white-space: normal; }

  /* Pad page content so tabs don't overlap (+ safe area for gesture nav) */
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }

  /* Push nav below status bar in PWA standalone mode */
  .nav {
    padding-top: env(safe-area-inset-top);
    height: calc(56px + env(safe-area-inset-top));
  }

  /* Bottom tab bar */
  .mobile-tabs {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(60px + env(safe-area-inset-bottom));
    background: var(--bg);
    border-top: 1px solid var(--border);
    z-index: 300;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    letter-spacing: 0.02em;
    transition: color var(--t);
    padding: 0;
  }
  .mobile-tab.active,
  .mobile-tab:hover { color: var(--accent); }

  /* Mobile search overlay */
  .mobile-search-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 500;
    display: flex;
    flex-direction: column;
  }
  .mobile-search-suggestions {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    transition: opacity 0.2s ease;
  }
  .mobile-search-suggestions.hidden { display: none; }
  .mobile-suggest-section { display: flex; flex-direction: column; gap: 12px; }
  .mobile-suggest-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .mobile-suggest-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .mobile-suggest-row::-webkit-scrollbar { display: none; }
  .mobile-suggest-card {
    flex-shrink: 0;
    width: 120px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .mobile-suggest-card.visible { opacity: 1; transform: none; }
  .mobile-suggest-poster {
    width: 120px;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--bg-raised);
    display: block;
  }
  .mobile-suggest-title {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top));
    border-bottom: 1px solid var(--border);
  }
  .mobile-search-input {
    flex: 1;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 16px; /* 16px prevents iOS zoom */
    color: var(--text);
    font-family: var(--font);
    outline: none;
  }
  .mobile-search-input:focus { border-color: var(--border-strong); }
  .mobile-search-cancel {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    cursor: pointer;
    font-family: var(--font);
    flex-shrink: 0;
    padding: 0;
  }
  .mobile-search-results {
    flex: 1;
    overflow-y: auto;
  }
  .mobile-search-result {
    display: flex;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateY(-4px);
    transition: background var(--t), opacity 0.2s ease, transform 0.2s ease;
  }
  .mobile-search-result.visible {
    opacity: 1;
    transform: none;
    transition: background var(--t);
  }
  .mobile-search-result:hover { background: var(--bg-hover); }
  .mobile-search-result-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    text-align: left;
  }
  .mobile-search-result .nav-quick-watch { margin-right: 16px; }
  .mobile-search-poster {
    width: 36px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg-hover);
    flex-shrink: 0;
  }
  .mobile-search-title { font-size: 14px; font-weight: 500; color: var(--text); }
  .mobile-search-year  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
  .mobile-search-empty { padding: 24px 16px; font-size: 14px; color: var(--text-muted); }

  /* Mobile user dropdown (from top nav icon) */
  .mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 400;
  }
  .mobile-sheet {
    position: fixed;
    top: 52px; right: 12px;
    width: 180px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 12px;
    z-index: 401;
    padding: 6px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  .mobile-sheet-handle { display: none; }
  .mobile-sheet-opt {
    display: block;
    width: 100%;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    text-align: left;
    transition: background var(--t);
  }
  .mobile-sheet-opt:hover { background: var(--bg-hover); }
  .mobile-sheet-opt-danger { color: var(--accent); }
}

/* ============================================================
   WATCHLIST COLUMN PREFS  (mobile-only)
   ============================================================ */

/* Mobile-only pref rows: hidden by default, visible only on small screens */
.pref-row.pref-row-mobile-only { display: none; }

/* ============================================================
   HIDE DATE COLUMN
   ============================================================ */
.hide-date-col .entry-day { display: none !important; }

/* ============================================================
   VIEW PREFERENCE TOGGLES (settings page)
   ============================================================ */
.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.pref-row:last-child { border-bottom: none; }
.pref-row-text { flex: 1; min-width: 0; }
.pref-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 4px;
}
.pref-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.pref-toggle-group {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.pref-toggle-wrap {
  flex-wrap: wrap;
  flex-shrink: 1;
}
.pref-row-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.pref-row-stack .pref-toggle-wrap {
  width: 100%;
}
.pref-opt {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pref-opt:hover { background: var(--bg-hover); color: var(--text); }
.pref-opt.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
  .diary-header { position: relative; }
  .diary-header-right { min-width: 110px; gap: 10px; }
  .layout-toggle { display: none; }
  .wl-grid { gap: 16px 12px; }
  .wl-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .wl-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .pref-row.pref-row-mobile-only { display: flex; }
  .diary-search-input { width: 100px; }
  .diary-search-input:focus { width: 160px; }
  .diary-layout-grid .diary-entries { gap: 5px; }
  .diary-layout-grid .entry-backdrop-card { height: 110px; border-radius: 8px; }
  /* Always show action buttons on mobile (no hover available) */
  .diary-layout-grid .entry-grid-actions { opacity: 1; }
  .entry-backdrop-title { font-size: 13px; }
  .entry-backdrop-content { padding: 14px 16px; }
  .entry-backdrop-day { font-size: 20px; }
  .entry-backdrop-stars .star-full,
  .entry-backdrop-stars .star-half,
  .entry-backdrop-stars .star-empty { font-size: 10px; }
  .log-morph.open {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: calc(100vw - 32px);
    height: 34px;
    z-index: 5;
  }
  .lp-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .lp-hero-visual { display: block; height: 260px; }
  .lp-mock-card { width: 230px; }
  .lp-mock-card--1 { top: 0; left: 10px; }
  .lp-mock-card--2 { top: 86px; left: 44px; }
  .lp-mock-card--3 { top: 172px; left: 78px; }
  .lp-feat-row { grid-template-columns: 40px 1fr; grid-template-rows: auto auto; gap: 8px 16px; padding: 28px 0; }
  .lp-feat-desc { grid-column: 2; }
  .lp-hero { padding: 60px 0 48px; min-height: unset; }
  .film-page { padding-top: 20px; }
  .film-back { display: none; }
  .film-hero { flex-direction: column; gap: 24px; padding-top: 260px; }
  .film-backdrop { max-width: 100%; left: 0; transform: none; height: 360px;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .film-backdrop::after {
    background: linear-gradient(to bottom, transparent 65%, var(--bg) 100%);
  }
  .film-log-row { gap: 24px; margin-bottom: 24px; }
  .film-rule { margin-bottom: 20px; }
  .film-cast { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
  .film-similar { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .film-logo { max-width: 220px; max-height: 80px; }
  .cast-member { width: auto; }
  .cast-photo { width: 100%; height: auto; aspect-ratio: 1; }
  .btn-label { display: none; }
  .entry-actions .action-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
  }
  .entry { padding: 18px 16px; gap: 14px; }
  .entry-day-num { font-size: 32px; }
  .entry-poster { width: 68px; height: 102px; }
  .entry-poster-stub { width: 68px; height: 102px; }
  .entry-title { font-size: 17px; }
  .entry-year { font-size: 13px; }
  .entry-inline-stars .star-btn { font-size: 15px; }
  .entry-format { font-size: 10px; }
  .entry-tag { font-size: 11px; padding: 3px 10px; }
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-page { padding: 48px 0 80px; }

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 28px;
  margin-bottom: 0;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 28px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}
.profile-info { flex: 1; min-width: 0; }
.profile-name-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.profile-display-name {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.profile-handle { font-size: 14px; color: var(--text-muted); }
.profile-bio-wrap { margin-bottom: 12px; }
.profile-bio {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}
.profile-bio--editable {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 8px;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  resize: none;
  transition: border-color 0.2s, background 0.2s;
  margin-left: -8px;
}
.profile-bio--editable:hover,
.profile-bio--editable:focus {
  border-color: var(--border);
  background: var(--bg-raised);
  outline: none;
  color: var(--text);
}
.profile-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.profile-stat-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 20px;
}
.profile-stat-num {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.profile-stat-num--genres {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  padding-top: 4px;
}
.profile-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.profile-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border-strong);
  margin-right: 20px;
  flex-shrink: 0;
}
.profile-joined { font-size: 12px; color: var(--text-muted); opacity: 0.6; }

/* Spotlight */
.profile-spotlight {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.spotlight-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 14px;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.spotlight-poster {
  width: 48px;
  height: 72px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.spotlight-poster-stub {
  width: 48px;
  height: 72px;
  border-radius: 4px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.spotlight-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.spotlight-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.spotlight-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spotlight-year { font-size: 12px; color: var(--text-muted); }
.spotlight-format {
  font-size: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--text-muted);
  width: fit-content;
}
.spotlight-edit-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.spotlight-card:hover .spotlight-edit-btn { opacity: 1; }
.spotlight-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  flex: 1;
  min-width: 160px;
  max-width: 340px;
  transition: border-color 0.2s, color 0.2s;
}
.spotlight-add-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Profile sections */
.profile-section { margin-bottom: 48px; }
.profile-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.profile-section-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
}
.profile-section-count { font-size: 12px; color: var(--text-muted); }

/* Recently watched row */
.profile-recent-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.profile-recent-row::-webkit-scrollbar { display: none; }
.profile-recent-item {
  text-decoration: none;
  flex-shrink: 0;
}
.profile-recent-poster-wrap {
  position: relative;
  width: 140px;
  height: 210px;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s;
}
.profile-recent-item:hover .profile-recent-poster-wrap {
  transform: translateY(-3px);
}
.profile-recent-poster {
  width: 140px;
  height: 210px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
.profile-recent-poster--stub {
  width: 140px;
  height: 210px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-muted);
}
.profile-recent-date {
  position: absolute;
  top: 7px;
  right: 7px;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 3px 7px;
  border-radius: 20px;
  pointer-events: none;
}
.profile-recent-meta {
  display: flex;
  justify-content: center;
  margin-top: 7px;
}
.profile-recent-stars {
  display: flex;
  gap: 2px;
  font-size: 13px;
}
.profile-recent-stars .star-full,
.profile-recent-stars .star-half { color: var(--accent); }
.profile-recent-stars .star-empty { color: var(--border-strong); }
.profile-recent-unrated {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   ACTIVITY FEED
   ============================================================ */
/* Activity poster row — single row, 6 visible, horizontal scroll */
.activity-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: 1fr;
  grid-auto-columns: calc((100% - 30px) / 6);
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.activity-grid::-webkit-scrollbar { display: none; }
.activity-card {
  position: relative;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--bg-raised);
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--t), opacity var(--t);
}
.activity-card:hover { transform: scale(1.02); opacity: 0.88; }
.activity-card-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.activity-card-stub {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: var(--text-subtle);
}
.activity-card-review-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(201,168,76,0.85);
  color: #000;
  display: flex; align-items: center; justify-content: center;
}
.activity-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.3) 45%, transparent 70%);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  padding: 10px 8px 8px;
  gap: 4px;
}
.activity-card-user {
  font-size: 10px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.04em; line-height: 1; text-align: left;
}
.activity-card-meta { display: flex; flex-direction: column; gap: 3px; align-self: stretch; }
.activity-card-stars { font-size: 10px; color: var(--accent); line-height: 1; text-align: left; }
.activity-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%; }
.activity-card-format {
  font-size: 9px; font-weight: 600; color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.1); border-radius: 3px;
  padding: 1px 4px; line-height: 1.4;
}
.activity-card-date { font-size: 9px; color: rgba(255,255,255,0.38); line-height: 1; }

/* Activity quick modal */
.activity-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.activity-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(12px);
}
.activity-modal-panel {
  position: relative; z-index: 1;
  border-radius: 16px;
  width: 620px; max-width: calc(100vw - 24px);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}
/* Blurred poster as panel bg */
.activity-modal-bg {
  position: absolute; inset: -20px; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(24px) brightness(0.25) saturate(1.4);
  transform: scale(1.1);
}
.activity-modal-close {
  position: absolute; top: 14px; right: 16px;
  background: rgba(255,255,255,0.1); border: none;
  color: rgba(255,255,255,0.7);
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 13px; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t), color var(--t);
}
.activity-modal-close:hover { background: rgba(255,255,255,0.2); color: #fff; }
.activity-modal-body {
  position: relative; z-index: 1;
  display: flex; gap: 0; height: 300px;
}
.activity-modal-poster-col {
  flex-shrink: 0; width: 200px;
  position: relative;
}
.activity-modal-poster {
  width: 200px; height: 300px;
  object-fit: cover; display: block;
}
.activity-modal-stub {
  width: 200px; height: 300px;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; font-weight: 700; color: rgba(255,255,255,0.15);
}
.activity-modal-poster-fade {
  position: absolute; top: 0; right: 0; bottom: 0; width: 80px;
  background: linear-gradient(to right, transparent, rgba(10,10,10,0.95));
}
.activity-modal-info {
  flex: 1; padding: 24px 24px 24px 20px;
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto; justify-content: flex-start;
}
.activity-modal-meta { display: flex; align-items: center; gap: 8px; }
.activity-modal-user {
  font-size: 10px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.activity-modal-rewatch { font-size: 11px; color: rgba(255,255,255,0.4); }
.activity-modal-title {
  font-size: 22px; font-weight: 700; line-height: 1.15;
  color: #fff; margin: 0; letter-spacing: -0.02em;
}
.activity-modal-year { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: -4px; }
.activity-modal-details {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.activity-modal-stars { font-size: 15px; color: var(--accent); }
.activity-modal-format {
  font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 4px;
  padding: 2px 7px;
}
.activity-modal-date { font-size: 11px; color: rgba(255,255,255,0.3); }
.activity-modal-review {
  font-size: 12px; line-height: 1.7; color: rgba(255,255,255,0.55);
  font-style: italic; margin: 0;
  padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08);
}
.activity-modal-cta { margin-top: 4px; align-self: flex-start; }

@media (max-width: 700px) {
  .activity-grid { grid-auto-columns: calc((100% - 10px) / 3); gap: 5px; }
  .activity-card-user { font-size: 9px; }
  .activity-card-stars { font-size: 9px; }
  /* Portrait modal on mobile */
  .activity-modal-panel { width: calc(100vw - 32px); max-width: 360px; }
  .activity-modal-body { flex-direction: column; height: auto; }
  .activity-modal-poster-col { width: 100%; }
  .activity-modal-poster { width: 100%; height: 260px; object-fit: cover; display: block; }
  .activity-modal-stub { width: 100%; height: 200px; }
  .activity-modal-poster-fade {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(10,10,10,0.95));
  }
  .activity-modal-info { padding: 16px; justify-content: flex-start; }
  .activity-modal-title { font-size: 18px; }
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 680px;
}
.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.feed-item:last-child { border-bottom: none; }
.feed-poster-wrap {
  flex-shrink: 0;
  text-decoration: none;
}
.feed-poster {
  width: 60px;
  height: 90px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s;
}
.feed-poster-wrap:hover .feed-poster { opacity: 0.8; }
.feed-poster--stub {
  width: 60px;
  height: 90px;
  border-radius: 6px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
}
.feed-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}
.feed-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 4px;
}
.feed-byline-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.feed-byline-name:hover { color: var(--accent); }
.feed-action {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}
.feed-byline-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.feed-byline-title:hover { color: var(--accent); }
.feed-byline-year {
  font-size: 12px;
  color: var(--text-muted);
}
.feed-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.feed-film-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.feed-film-title:hover { color: var(--accent); }
.feed-year { font-size: 13px; color: var(--text-muted); }
.feed-rewatch { font-size: 12px; color: var(--text-muted); }
.feed-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.feed-stars { display: flex; gap: 1px; font-size: 12px; }
.feed-stars .star-full,
.feed-stars .star-half { color: var(--accent); }
.feed-stars .star-empty { color: var(--border-strong); }
.feed-format {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
}
.feed-date { font-size: 12px; color: var(--text-muted); }
.feed-review {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 4px 0 0;
}
.feed-review-more, .feed-review-less {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--text-subtle);
  cursor: pointer;
  font-family: inherit;
}
.feed-review-more:hover, .feed-review-less:hover { color: var(--text); }
.feed-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================================
   NOW WATCHING STRIP
   ============================================================ */
.feed-now-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.feed-now-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
  min-width: 200px;
}
.feed-now-card:hover { border-color: var(--accent); }
.feed-now-poster-wrap { position: relative; flex-shrink: 0; }
.feed-now-poster {
  width: 38px;
  height: 57px;
  border-radius: 5px;
  object-fit: cover;
  display: block;
}
.feed-now-poster--stub {
  width: 38px;
  height: 57px;
  border-radius: 5px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
}
.feed-now-pulse {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.5);
  animation: pulse-ring 1.8s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.feed-now-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.feed-now-name { font-size: 12px; font-weight: 600; color: var(--text); }
.feed-now-title {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.feed-now-format { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   PROFILE — NOTION DASHBOARD LAYOUT
   ============================================================ */

/* Header */
.pf-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.pf-header-body { flex: 1 1 0; min-width: 0; }
.pf-now-watching {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding: 10px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.pf-now-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #22c55e;
}
.pf-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.pf-avatar--photo { background: var(--bg-raised); }
.pf-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.pf-edit-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.pf-edit-btn:hover { color: var(--text); border-color: var(--text-muted); }
/* Edit Profile Modal */
.edit-profile-panel {
  width: 480px;
  max-width: 96vw;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.edit-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.ep-section {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.ep-section:first-of-type { border-top: none; }
.ep-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.ep-avatar-row { display: flex; align-items: center; gap: 16px; }
.ep-avatar-btns { display: flex; flex-direction: column; gap: 8px; }
.ep-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.ep-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ep-avatar-upload-btn {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.ep-avatar-upload-btn:hover { border-color: var(--text-muted); }
.ep-avatar-remove-btn {
  font-size: 12px;
  font-weight: 500;
  color: #ef4444;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  opacity: 0.8;
}
.ep-avatar-remove-btn:hover { opacity: 1; }
.ep-name-row { display: flex; gap: 10px; margin-bottom: 10px; }
.ep-input { flex: 1; }
.ep-save-btn {
  font-size: 13px;
  padding: 7px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #000;
  border: none;
  font-weight: 600;
}
.ep-save-btn:hover { opacity: 0.85; }
.ep-ant-list { display: flex; flex-direction: column; gap: 8px; }
.ep-ant-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--bg-hover);
}
.ep-ant-pos {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.ep-ant-poster {
  width: 30px;
  height: 45px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.ep-ant-poster--stub {
  width: 30px;
  height: 45px;
  border-radius: 4px;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.ep-ant-title { flex: 1; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-ant-btns { display: flex; gap: 4px; flex-shrink: 0; }
.ep-ant-up, .ep-ant-down, .ep-ant-change, .ep-ant-del, .ep-ant-add {
  background: none;
  border: none;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 5px;
  color: var(--text-muted);
  transition: background 0.1s, color 0.1s;
}
.ep-ant-up:hover, .ep-ant-down:hover, .ep-ant-change:hover { color: var(--text); background: var(--bg-raised); }
.ep-ant-del:hover { color: #ef4444; background: rgba(239,68,68,0.1); }
.ep-ant-add {
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  margin-left: 4px;
}
.ep-ant-add:hover { color: var(--accent); border-color: var(--accent); }
/* Crop Modal */
#crop-modal { z-index: 300; }
.crop-panel {
  width: 380px;
  max-width: 96vw;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.crop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.crop-canvas-wrap {
  display: flex;
  justify-content: center;
}
#crop-canvas {
  border-radius: 12px;
  cursor: grab;
  display: block;
  max-width: 100%;
  touch-action: none;
}
#crop-canvas:active { cursor: grabbing; }
.crop-zoom-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.crop-zoom-icon { font-size: 14px; opacity: 0.6; }
.crop-zoom-slider {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
}
.crop-actions { display: flex; justify-content: flex-end; }
.pf-header-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}
.pf-name-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.pf-name {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
  
}
.pf-handle {
  font-size: 13px;
  color: var(--text-muted);
}
.pf-props {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.pf-prop-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
}
.pf-prop-label { color: var(--text-muted); }
.pf-prop-val   { color: var(--text); font-weight: 500; }
.pf-prop-dot   { color: var(--text-muted); opacity: 0.35; font-size: 14px; }

/* Sections */
.pf-section { margin-bottom: 48px; }
.pf-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.pf-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}
.pf-section-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.pf-section-link:hover { color: var(--text); }
.pf-section-badge {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--text-muted);
}
.pf-section-badge--plain {
  background: none;
  border: none;
  padding: 0;
}
.pf-empty { color: var(--text-muted); font-size: 13px; padding: 20px 0; }

/* ── Archive film list ── */
.pf-film-list {
  display: flex;
  flex-direction: column;
}
.pf-film-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 10px;
  margin: 0 -10px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background 0.12s;
}
.pf-film-row:last-child { border-bottom: none; }
.pf-film-row:hover { background: var(--bg-raised); }
.pf-film-poster {
  width: 36px;
  height: 54px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.pf-film-poster--stub {
  width: 36px;
  height: 54px;
  border-radius: 4px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.pf-film-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pf-film-title-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.pf-film-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-film-year {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.pf-film-rewatch {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.pf-film-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pf-film-stars { display: flex; gap: 1px; font-size: 12px; }
.pf-film-stars .star-full,
.pf-film-stars .star-half { color: var(--accent); }
.pf-film-stars .star-empty { color: var(--border-strong); opacity: 0.5; }
.pf-film-fmt {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
}
.pf-film-date {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Activity section (calendar card + archive) ── */
.pf-activity-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* Anticipated — full width row */
.pf-anticipated-col {
  margin-bottom: 20px;
}
.pf-ant-header { margin-bottom: 14px; }
.pf-ant-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pf-ant-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.pf-ant-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pf-ant-item--empty {
  display: flex;
  flex-direction: column;
}
.pf-ant-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 10px;
  overflow: hidden;
}
.pf-ant-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
}
.pf-ant-poster-link { display: block; width: 100%; height: 100%; }
.pf-ant-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}
.pf-ant-poster--stub {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-muted);
}
.pf-ant-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 3;
}
.pf-ant-item:hover .pf-ant-actions { display: flex; }
.pf-ant-item { cursor: grab; user-select: none; -webkit-user-select: none; }
.pf-ant-dragging { opacity: 0.25; }
.pf-ant-dragging-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.85;
  transform: scale(1.05);
  border-radius: 10px;
  overflow: hidden;
}
.pf-ant-hold { transform: scale(0.96); transition: transform 0.15s ease; }
.pf-ant-edit, .pf-ant-remove {
  background: rgba(0,0,0,0.7);
  border: none;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  backdrop-filter: blur(4px);
}
.pf-ant-edit:hover { background: rgba(255,255,255,0.2); }
.pf-ant-remove:hover { background: rgba(239,68,68,0.8); }
.pf-ant-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 2px;
}
.pf-ant-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-ant-year { font-size: 11px; color: var(--text-muted); }
.pf-ant-release { font-size: 11px; color: var(--accent); }
.pf-ant-add-btn {
  background: none;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  border-radius: 10px;
  width: 100%;
  aspect-ratio: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}
.pf-ant-add-btn:hover { border-color: var(--accent); color: var(--accent); }
/* Search result rows in modal */
.ant-res-poster { width: 32px; height: 48px; border-radius: 3px; object-fit: cover; flex-shrink: 0; }
.ant-res-poster--stub { width: 32px; height: 48px; border-radius: 3px; background: var(--bg-hover); display:flex; align-items:center; justify-content:center; font-size:14px; color: var(--text-muted); }
.ant-res-info { display: flex; flex-direction: column; gap: 2px; }
.ant-res-title { font-size: 13px; font-weight: 500; color: var(--text); }
.ant-res-year { font-size: 11px; color: var(--text-muted); }
/* Genres panel (hidden — kept for future use) */
.pf-genres-panel {
  display: none;
  width: 190px;
  flex-shrink: 0;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}
/* Archive column */
.pf-archive-col { flex: 1 1 0; min-width: 0; }
.pf-archive-cards { display: flex; flex-direction: column; gap: 6px; }
.pf-arc-viewall {
  display: block;
  text-align: center;
  margin-top: 10px;
  padding: 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.15s ease;
}
.pf-arc-viewall:hover { color: var(--text-primary); }
/* Profile backdrop card — mirrors diary grid cards, sized for narrow column */
.pf-arc-card {
  position: relative;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s ease;
}
.pf-arc-card:hover { transform: scale(1.005); }
.pf-arc-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
}
.pf-arc-img--dark { background: var(--bg-raised); display: flex; align-items: center; justify-content: center; }
.pf-arc-poster-fallback { height: 100%; width: auto; object-fit: cover; opacity: 0.3; }
.pf-arc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.1) 80%, transparent 100%);
}
.pf-arc-overlay--dark { background: linear-gradient(to right, rgba(0,0,0,0.8) 30%, transparent 100%); }
.pf-arc-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 100%;
  padding: 10px 14px;
  gap: 8px;
}
.pf-arc-info { display: flex; flex-direction: column; gap: 3px; }
.pf-arc-title { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.pf-arc-meta { display: flex; align-items: center; gap: 6px; }
.pf-arc-year { font-size: 11px; color: rgba(255,255,255,0.5); }
.pf-arc-rewatch { font-size: 11px; color: rgba(255,255,255,0.4); }
.pf-arc-stars { display: flex; gap: 1px; }
.pf-arc-stars .star-full, .pf-arc-stars .star-half { color: var(--accent); font-size: 11px; }
.pf-arc-stars .star-empty { color: rgba(255,255,255,0.2); font-size: 11px; }
.pf-arc-date { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex-shrink: 0; }
.pf-arc-day { font-size: 20px; font-weight: 700; color: rgba(255,255,255,0.2); line-height: 1; }
.pf-arc-month { font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.2); }
.pf-genres-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pf-genre-bars  { display: flex; flex-direction: column; gap: 9px; }
.pf-genre-row   { display: flex; align-items: center; gap: 8px; }
.pf-genre-name  {
  font-size: 12px;
  color: var(--text);
  width: 68px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-genre-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.pf-genre-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.65;
}
.pf-genre-count {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 16px;
  text-align: right;
}

/* ============================================================
   PROFILE CALENDAR
   ============================================================ */
.cal-wrap {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 28px;
}
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.cal-nav {
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.cal-nav:hover { background: var(--bg-hover); }
.cal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.cal-grid-col {
  width: 100%;
}
.cal-month-films {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: none;
}
.cal-month-films::-webkit-scrollbar { display: none; }
.cal-month-empty {
  font-size: 12px;
  color: var(--text-muted);
}
.cal-mfilm {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  padding: 3px 4px;
  transition: background 0.15s;
  flex-shrink: 0;
}
.cal-mfilm:hover { background: var(--bg-hover); }
.cal-mfilm-poster {
  width: 26px;
  height: 39px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}
.cal-mfilm-poster--stub {
  width: 26px;
  height: 39px;
  border-radius: 3px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-muted);
}
.cal-mfilm-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-mfilm-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-mfilm-stars { display: flex; gap: 1px; font-size: 10px; }
.cal-mfilm-stars .star-full,
.cal-mfilm-stars .star-half { color: var(--accent); }
.cal-mfilm-stars .star-empty { color: var(--border-strong); }

.cal-day-names {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 12px;
  margin-bottom: 5px;
}
.cal-day-names span {
  text-align: center;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-cell {
  aspect-ratio: 1;
  width: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  position: relative;
}
.cal-cell--empty { pointer-events: none; }
.cal-cell--none::after {
  content: '';
  width: 25%;
  height: 25%;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.22;
}
.cal-cell--watched { cursor: pointer; }
.cal-cell--today {
  background: rgba(201,168,76,0.15);
}
.cal-cell--selected {
  background: rgba(201,168,76,0.25);
}
.cal-day-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  display: block;
}
.cal-dot {
  border-radius: 50%;
  background: var(--accent);
  display: block;
  pointer-events: none;
}
.cal-dot--one  { width: 40%; height: 40%; opacity: 0.5; }
.cal-dot--two  { width: 65%; height: 65%; opacity: 0.75; }
.cal-dot--many { width: 85%; height: 85%; opacity: 1; }

/* Stats row */
.cal-stats {
  display: flex;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.cal-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  text-align: center;
}
.cal-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.cal-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cal-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

/* Day popover */
.cal-popover {
  position: fixed;
  z-index: 50;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 14px;
  width: 240px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.cal-popover-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cal-popover-films {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cal-pop-film {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  padding: 4px;
  transition: background 0.15s;
}
.cal-pop-film:hover { background: var(--bg-hover); }
.cal-pop-poster {
  width: 32px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.cal-pop-poster--stub {
  width: 32px;
  height: 48px;
  border-radius: 4px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
}
.cal-pop-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-pop-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-pop-stars { display: flex; gap: 1px; font-size: 11px; }
.cal-pop-stars .star-full,
.cal-pop-stars .star-half { color: var(--accent); }
.cal-pop-stars .star-empty { color: var(--border-strong); }

/* ============================================================
   DASHBOARD MEMBERS
   ============================================================ */
.members-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 180px;
  max-width: 280px;
  transition: border-color 0.15s, background 0.15s;
}
.member-card:hover { border-color: var(--accent); background: var(--bg-hover); }
.member-avatar-wrap { position: relative; flex-shrink: 0; }
.member-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-now-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 20px;
  height: 30px;
  border-radius: 3px;
  object-fit: cover;
  border: 1.5px solid var(--bg);
}
.member-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.member-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-handle { font-size: 11px; color: var(--text-muted); }
.member-count { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.member-now { font-size: 11px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* Most anticipated modal */
.anticipated-modal-panel { max-width: 420px; }
.anticipated-search-wrap { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 0; }
.anticipated-results { margin-top: 8px; display: flex; flex-direction: column; }
.anticipated-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.anticipated-result:hover { background: var(--bg-hover); }
.anticipated-result-poster {
  width: 36px;
  height: 54px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.anticipated-result-poster--stub {
  width: 36px;
  height: 54px;
  border-radius: 4px;
  background: var(--border);
  flex-shrink: 0;
}
.anticipated-result-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.anticipated-result-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anticipated-result-year { font-size: 12px; color: var(--text-muted); }

/* Most anticipated hero card */
.anticipated-hero { margin-bottom: 32px; }
.anticipated-hero-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 14px 18px;
  position: relative;
  width: 100%;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.anticipated-hero-card:hover { border-color: var(--accent); }
.anticipated-hero-poster {
  width: 54px;
  height: 80px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.anticipated-hero-poster--stub {
  width: 54px;
  height: 80px;
  border-radius: 5px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.anticipated-hero-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.anticipated-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}
.anticipated-hero-release {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.anticipated-hero-release-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.anticipated-hero-release-date {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.anticipated-hero-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.anticipated-hero-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}
.anticipated-hero-year {
  font-size: 14px;
  color: var(--text-muted);
}
.anticipated-hero-edit {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  opacity: 0;
  transition: opacity 0.15s;
  border-radius: 4px;
}
.anticipated-hero-card:hover .anticipated-hero-edit { opacity: 1; }

/* Watchlist row on profile */
.profile-watchlist-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}
.profile-watchlist-scroll::-webkit-scrollbar { display: none; }
.profile-watchlist-grid {
  display: grid;
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  grid-auto-columns: 120px;
  gap: 12px;
  width: max-content;
}
.profile-watchlist-item {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.profile-watchlist-poster {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s, transform 0.2s;
}
.profile-watchlist-item:hover .profile-watchlist-poster {
  opacity: 0.85;
  transform: translateY(-3px);
}
.profile-watchlist-poster--stub {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-muted);
}
.profile-watchlist-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.profile-watchlist-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.profile-watchlist-year {
  font-size: 11px;
  color: var(--text-muted);
}


@media (max-width: 700px) {
  /* Profile header */
  .pf-header { gap: 14px; margin-bottom: 24px; padding-bottom: 20px; flex-wrap: wrap; }
  .pf-avatar  { width: 50px; height: 50px; font-size: 20px; }
  .pf-name    { font-size: 19px; }
  .pf-props   { gap: 5px; }
  .pf-prop-joined { display: none; }
  .pf-prop-joined-dot { display: none; }
  .pf-now-watching { width: 100%; }
  .pf-now-watching .feed-now-title { max-width: none; }

  /* Archive list — tighten on mobile */
  .pf-arc-card { height: 110px; }
  .pf-arc-img { background-size: cover; }
  .pf-film-row { gap: 10px; }
  .pf-film-title { font-size: 13px; }
  .pf-film-date { font-size: 11px; }

  /* Genres — widen name to avoid truncation */
  .pf-genre-name { width: 90px; }

  /* Anticipated — horizontal scroll on mobile, show ~3 */
  .pf-ant-list {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 10px;
  }
  .pf-ant-list::-webkit-scrollbar { display: none; }
  .pf-ant-list > * {
    flex: 0 0 30%;
    min-width: 0;
    scroll-snap-align: start;
  }

  /* Activity layout — stack vertically on mobile */
  .pf-activity-layout { flex-direction: column; align-items: stretch; }
  .pf-activity-layout .cal-wrap { flex: none; width: 100%; }
  .pf-archive-col { width: 100%; }
  /* Calendar body stacks on mobile */
  .cal-body { flex-direction: column; }
  .cal-grid-col, .cal-month-films { flex: none; width: 100%; min-width: 0; }
  .cal-month-films {
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .cal-month-films::-webkit-scrollbar { display: none; }

  /* Most anticipated card */
  .anticipated-hero-card       { padding: 12px 14px; gap: 12px; }
  .anticipated-hero-poster     { width: 44px; height: 66px; }
  .anticipated-hero-title      { font-size: 16px; }
  .anticipated-hero-right      { gap: 8px; }
  .anticipated-hero-release-date { font-size: 13px; }

  /* Watchlist — single row on mobile */
  .profile-watchlist-grid {
    grid-template-rows: repeat(1, auto);
    grid-auto-columns: 100px;
    gap: 8px;
  }

  /* Members */
  .members-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
  .members-list::-webkit-scrollbar { display: none; }
  .member-card { min-width: 160px; flex-shrink: 0; }
}

/* Profile page — tighten dash-stats spacing */
.profile-page .dash-stats {
  margin-bottom: 40px;
  padding-bottom: 32px;
}


/* Share card — mobile */
@media (max-width: 700px) {
  .share-modal-panel { max-width: 100%; }
  .share-card { width: 260px; }
  .share-card-poster-col { height: 230px; }
  .share-card-body { padding: 14px 14px 13px; gap: 8px; }
  .share-card-title { font-size: 15px; }
  .share-card-sub { font-size: 10px; }
  .share-card-stars { font-size: 13px; }
  .share-card-review { font-size: 11px; }
  .share-modal-hint { display: block; }

  /* Tighten section spacing on mobile */
  .dash-section { margin-bottom: 32px; }
  .dash-section-header { margin-bottom: 16px; }
}
