/* ============ Popcorn theme ============
 *
 * Palette: classic popcorn box — cinema red, warm white, butter &
 * popcorn yellow. Light, cheerful, carnival-adjacent without being loud.
 */

:root {
  --red: #d7263d;          /* cinema red — brand, active states */
  --red-deep: #b01e31;     /* pressed / hover red */
  --red-soft: #fdeaec;     /* red tint for chips & hovers */
  --butter: #ffb703;       /* butter yellow — primary actions */
  --butter-deep: #f5a300;  /* butter hover */
  --popcorn: #ffd166;      /* lighter popcorn yellow — tints, highlights */
  --popcorn-soft: #fff3d6; /* pale kernel tint for chip fills */
  --cream: #fffaf0;        /* page background */
  --white: #ffffff;        /* panels, cards */
  --ink: #33221a;          /* main text — warm dark brown */
  --ink-dim: #8a7466;      /* secondary text */
  --line: #f0e2cf;         /* borders */
  --line-strong: #e4d2b8;  /* borders that need more presence */
  --green: #3f9d63;        /* "liked it" affordance */
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(90, 60, 20, 0.06), 0 2px 8px rgba(90, 60, 20, 0.06);
  --shadow-md: 0 2px 6px rgba(90, 60, 20, 0.08), 0 10px 24px rgba(90, 60, 20, 0.10);
  --shadow-lg: 0 6px 16px rgba(90, 60, 20, 0.12), 0 20px 44px rgba(90, 60, 20, 0.16);
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  height: 100%;
  /* iOS Safari zooms an input on focus if its font-size is under 16px */
  -webkit-text-size-adjust: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--cream);
  /* faint scattered-kernel texture */
  background-image: radial-gradient(rgba(255, 183, 3, 0.10) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button, input {
  font-family: inherit;
  touch-action: manipulation;
}

h1, h2, h3, .brand { font-family: var(--font-display); }

.hidden { display: none !important; }

/* Keyboard-focus rings (mouse clicks stay clean) */
:focus-visible {
  outline: 3px solid rgba(215, 38, 61, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 16px calc(110px + env(safe-area-inset-bottom));
}

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

.header-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 10px rgba(90, 60, 20, 0.08);
}

/* popcorn-box stripe ribbon — a thin flair line, not a slab */
.header-sticky::after {
  content: "";
  display: block;
  height: 5px;
  background: repeating-linear-gradient(
    135deg,
    var(--red) 0 12px,
    var(--white) 12px 20px,
    var(--butter) 20px 32px,
    var(--white) 32px 40px
  );
}

.topbar {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.3px;
  color: var(--red);
}

.brand-icon {
  font-size: 1.5rem;
  transform-origin: 50% 90%;
  animation: brand-pop 0.9s cubic-bezier(0.22, 1.4, 0.4, 1) 0.15s both;
}

@keyframes brand-pop {
  0% { transform: scale(0) rotate(-18deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.lib-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: #7a5200;
  white-space: nowrap;
  background: var(--popcorn-soft);
  border: 1px solid #f4dfa8;
  padding: 6px 12px;
  border-radius: 999px;
}

/* ---------- bottom tab bar ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--white);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -4px 20px rgba(90, 60, 20, 0.10);
}

.tabbar-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 6px 8px;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--ink-dim);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 8px 4px;
  min-height: 54px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.tab:active { transform: scale(0.95); }

.tab-icon {
  font-size: 1.4rem;
  line-height: 1;
  filter: grayscale(0.6) opacity(0.75);
  transition: filter 0.15s, transform 0.15s;
}

.tab-label { line-height: 1; white-space: nowrap; }

.tab.active {
  color: var(--red);
  background: var(--red-soft);
}

.tab.active .tab-icon {
  filter: none;
  transform: scale(1.12);
}

/* ---------- views & panels ---------- */

.view { display: none; }

.view.active {
  display: block;
  animation: view-in 0.28s ease both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.panel-head h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  letter-spacing: 0.2px;
}

.panel-sub {
  margin: 0 0 16px;
  color: var(--ink-dim);
  font-size: 0.92rem;
  line-height: 1.5;
}

.recs-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.recs-head h2 { margin: 0; font-size: 1.35rem; }

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

.btn {
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  min-height: 46px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s, opacity 0.15s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(180deg, var(--popcorn), var(--butter));
  color: #4a2c00;
  box-shadow: 0 2px 0 var(--butter-deep), 0 6px 16px rgba(255, 183, 3, 0.35);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffd97d, var(--butter));
  box-shadow: 0 2px 0 var(--butter-deep), 0 8px 22px rgba(255, 183, 3, 0.45);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-block { width: 100%; margin-top: 16px; }

.btn-link {
  background: none;
  border: none;
  color: var(--red);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 6px;
  margin: -10px -6px;
  border-radius: 8px;
  transition: color 0.15s;
}

.btn-link:hover { color: var(--red-deep); text-decoration: underline; }

/* ---------- empty states ---------- */

.empty-state {
  text-align: center;
  padding: 40px 20px 44px;
  color: var(--ink-dim);
}

.empty-state::before {
  content: "🍿";
  display: block;
  font-size: 3.4rem;
  margin-bottom: 12px;
  animation: kernel-drop 0.6s cubic-bezier(0.22, 1.3, 0.4, 1) both;
}

@keyframes kernel-drop {
  from { opacity: 0; transform: translateY(-16px) scale(0.6); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.empty-title {
  color: var(--ink);
  font-weight: 800;
  font-size: 1.15rem;
  margin: 0 0 6px;
  font-family: var(--font-display);
}

.empty-sub {
  margin: 0 auto 20px;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 460px;
}

/* ---------- chips ---------- */

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-dim);
  border: 1px solid var(--line-strong);
}

.chip-genre {
  color: #7a5200;
  background: var(--popcorn-soft);
  border-color: #f4dfa8;
}

.chip-group { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.chip-toggle {
  cursor: pointer;
  background: var(--white);
  padding: 9px 14px;
  font-size: 0.8rem;
  transition: background 0.12s, border-color 0.12s, transform 0.1s;
}

.chip-toggle:hover { border-color: var(--butter); }
.chip-toggle:active { transform: scale(0.95); }

.chip-toggle.chip-selected {
  background: var(--butter);
  color: #4a2c00;
  border-color: var(--butter-deep);
}

/* ---------- search / add ---------- */

.search-wrap { position: relative; margin-bottom: 6px; }

#movie-search, #fav-filter {
  width: 100%;
  background: var(--white);
  border: 2px solid var(--line-strong);
  color: var(--ink);
  border-radius: 12px;
  padding: 13px 16px;
  /* 16px stops iOS Safari from auto-zooming the page on focus */
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#movie-search::placeholder, #fav-filter::placeholder { color: #b8a894; }

#movie-search:focus, #fav-filter:focus {
  outline: none;
  border-color: var(--butter);
  box-shadow: 0 0 0 4px rgba(255, 183, 3, 0.18);
}

.search-results {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

.search-results.open { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 11px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  transition: background 0.1s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--popcorn-soft); }
.search-result-year { color: var(--ink-dim); font-weight: 500; }
.search-result-custom { color: var(--red); font-weight: 700; }

.custom-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px dashed var(--line-strong);
}

.custom-form-title { font-size: 0.92rem; font-weight: 600; margin: 0 0 10px; }
.custom-form-sub { font-size: 0.82rem; color: var(--ink-dim); margin: 6px 0; }
.custom-form-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }

/* ---------- favorites list ---------- */

.fav-filter-row { margin-bottom: 14px; }

.fav-list { display: flex; flex-direction: column; gap: 10px; }

.fav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--butter);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}

.fav-item:hover {
  transform: translateX(2px);
  box-shadow: var(--shadow-md);
}

.fav-thumb {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 63px;
  border-radius: 8px;
  background: linear-gradient(160deg, var(--popcorn-soft), var(--red-soft));
  overflow: hidden;
}

.fav-thumb::before {
  content: "🍿";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  opacity: 0.6;
}

.fav-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fav-item-main { flex: 1; min-width: 0; }

.fav-item-title { font-weight: 700; margin-right: 8px; }
.fav-item-year { color: var(--ink-dim); font-size: 0.85rem; }

.fav-item-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.12s, color 0.12s;
}

.fav-item-remove:hover { color: var(--red); background: var(--red-soft); }

/* ---------- seed picker ---------- */

.seed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-dim);
  margin-bottom: 12px;
}

.seed-toolbar-actions { display: flex; gap: 16px; }

.seed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding: 2px 6px 2px 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.seed-grid::-webkit-scrollbar { width: 8px; }
.seed-grid::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.seed-grid::-webkit-scrollbar-track { background: transparent; }

.seed-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0; /* let grid tracks shrink; .seed-title ellipsizes */
  text-align: left;
  background: var(--white);
  border: 2px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 46px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.12s, background 0.12s, transform 0.1s;
}

.seed-card:hover { border-color: var(--popcorn); }
.seed-card:active { transform: scale(0.97); }

.seed-card.selected {
  border-color: var(--butter);
  background: var(--popcorn-soft);
}

.seed-check {
  width: 16px;
  color: var(--red);
  font-weight: 800;
  flex-shrink: 0;
}

.seed-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seed-year { color: var(--ink-dim); font-size: 0.78rem; font-weight: 500; }

/* ---------- mood quick-select ---------- */

.mood-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.mood-row-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-dim);
  margin-right: 2px;
}

.mood-chip {
  border: 1px solid #f6c3ca;
  color: var(--red-deep);
  background: var(--red-soft);
  padding: 9px 14px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.12s, transform 0.1s;
}

.mood-chip:hover { background: #fbd8dc; }
.mood-chip:active { transform: scale(0.95); }

.recs-mood {
  margin: -2px 0 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
}

/* ---------- taste panel ---------- */

.taste-panel h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

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

.taste-cluster {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
}

.taste-cluster-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.taste-cluster-label {
  font-weight: 800;
  font-size: 0.95rem;
  font-family: var(--font-display);
}

.taste-cluster-count {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-dim);
  white-space: nowrap;
}

.taste-cluster-examples {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--ink-dim);
  font-style: italic;
}

.taste-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

.taste-chip + .taste-chip { margin-top: 7px; }

.taste-label {
  width: 130px;
  flex-shrink: 0;
  color: var(--ink-dim);
  font-weight: 600;
  text-transform: capitalize;
}

.taste-bar-track {
  flex: 1;
  height: 9px;
  border-radius: 999px;
  background: #f3e8d5;
  overflow: hidden;
}

.taste-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--butter), var(--red));
  border-radius: 999px;
  animation: bar-grow 0.5s ease both;
  transform-origin: left center;
}

@keyframes bar-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- movie cards (poster-first) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.movie-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Poster: the hero of the card. 2:3 like a one-sheet. */
.movie-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background: linear-gradient(160deg, var(--popcorn-soft), var(--red-soft));
  overflow: hidden;
}

/* fallback kernel when there's no poster (custom adds, offline) */
.movie-poster::before {
  content: "🍿";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.6;
}

.movie-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.movie-card:hover .movie-poster img { transform: scale(1.045); }

.movie-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
  padding: 12px 14px 14px;
}

.movie-card-title {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.25;
  font-family: var(--font-display);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-meta {
  color: var(--ink-dim);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  gap: 5px;
  margin-top: auto;
  padding-top: 10px;
}

.card-action-btn {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink-dim);
  border-radius: 9px;
  padding: 6px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s, transform 0.1s;
}

.card-action-btn:active { transform: scale(0.96); }

.card-action-btn.like:hover { border-color: var(--green); color: var(--green); background: #edf7f0; }
.card-action-btn.dislike:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.card-action-btn.seen:hover { border-color: var(--butter-deep); color: #7a5200; background: var(--popcorn-soft); }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px) scale(0.95);
  background: var(--ink);
  color: var(--popcorn);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 13px 22px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.22, 1.3, 0.4, 1);
  z-index: 50;
  box-shadow: 0 10px 30px rgba(51, 34, 26, 0.35);
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* ---------- responsive: phones ---------- */

@media (max-width: 640px) {
  .container { padding-top: 18px; }
  .topbar { gap: 10px; padding-left: 14px; padding-right: 14px; }
  .brand { font-size: 1.1rem; }
  .panel { padding: 18px 16px; }
  .taste-label { width: 96px; }
  /* poster gallery: two-up on phones */
  .card-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .card-actions { flex-wrap: wrap; }
  .card-action-btn { flex-basis: calc(50% - 3px); }
  .card-action-btn.seen { flex-basis: 100%; }
  .seed-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------- responsive: tablet and up ---------- */

@media (min-width: 641px) {
  .tab { flex-direction: row; gap: 8px; font-size: 0.85rem; }

  /* floating pill dock instead of a full-width bar */
  .tabbar {
    left: 50%;
    right: auto;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: auto;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    box-shadow: var(--shadow-lg);
    padding-bottom: 0;
  }

  .tabbar-inner { padding: 6px; gap: 4px; }

  .tab {
    border-radius: 999px;
    padding: 10px 22px;
    min-height: 48px;
  }

  .toast { bottom: 96px; }
}

/* ---------- responsive: desktop two-column layouts ---------- */

@media (min-width: 1000px) {
  .container { padding-top: 32px; }
  .panel { padding: 26px; }

  /* For You: seed picker beside the taste panel, recs full width below */
  #foryou-ready {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }

  #foryou-ready > .panel { margin-bottom: 0; }

  /* NOTE: don't make .taste-panel sticky — Chromium lets a sticky grid item
   * roam the whole grid container (including the recs row below), so it
   * ends up floating over the recommendation cards on scroll. */

  #recs-wrap {
    grid-column: 1 / -1;
    margin-top: 4px;
  }

  .seed-grid { max-height: 440px; }

  /* Favorites: add panel beside the list */
  #view-favorites.active {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 20px;
    align-items: start;
  }

  #view-favorites > .panel { margin-bottom: 0; }

  #view-favorites > .panel:first-child {
    position: sticky;
    top: 96px;
  }
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-dim);
  line-height: 1.5;
}

.site-footer a { color: var(--red); font-weight: 600; }

/* ---------- reduced motion ---------- */

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