/* ══════════════════════════════════════════════════════════════
   media-advisor v0.2 — dark theme, mobile-first
   Shared structural/layout CSS lives here.
   Component CSS lives in base.html <style> block.
   ══════════════════════════════════════════════════════════════ */

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

:root {
  --bg:        #0d0d1a;
  --surface:   #161625;
  --surface2:  #1e1e32;
  --border:    #2a2a45;
  --accent:    #7c3aed;
  --accent-h:  #6d28d9;
  --green:     #22c55e;
  --red:       #dc2626;
  --amber:     #f59e0b;
  --blue:      #3b82f6;
  --text:      #e2e8f0;
  --muted:     #94a3b8;
  --subtle:    #475569;
  --max-w:     900px;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* ── Header / Nav ──────────────────────────────────────────── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.app-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  flex: 1;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  transition: color 0.15s, background 0.15s;
}
nav a:hover { color: var(--text); background: var(--surface2); }
nav a.nav-active { color: #fff; background: var(--accent); }
.nav-user {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  color: var(--accent) !important;
  background: transparent !important;
  font-size: 0.85rem !important;
}
.sync-bar {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.sync-btn {
  padding: 0.2rem 0.5rem;
  background: var(--surface2);
  color: var(--subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.sync-btn:hover { background: var(--border); color: var(--muted); }

/* ── Main layout ───────────────────────────────────────────── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem 1rem;
}
.page-header { margin-bottom: 1.25rem; }
.page-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.tonight-subtitle {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.3rem;
}

/* ── Shared card / badge / btn ─────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface2);
  color: var(--muted);
}
.type-movie  { background: #1e2f4d; color: #7ab4e0; }
.type-series { background: #1a2e1a; color: #7ac87a; }
.rating      { background: #3a2a1a; color: #e0b870; }
.decision-accept { background: #14291a; color: #7ac87a; }
.decision-decline { background: #291414; color: #c87a7a; }

.btn {
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { opacity: 0.88; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); opacity: 1; }
.btn-success { background: var(--green); color: #000; font-weight: 600; }
.btn-danger  { background: var(--red);   color: #fff; }
.btn-neutral { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }

/* legacy card grid buttons (queue / triage) */
.btn-accept  { background: #1e4d1e; color: #a8e6a8; font-size: 0.78rem; padding: 0.35rem 0; flex: 1; border-radius: 6px; }
.btn-decline { background: #4d1e1e; color: #e6a8a8; font-size: 0.78rem; padding: 0.35rem 0; flex: 1; border-radius: 6px; }
.btn-skip    { background: var(--surface2); color: var(--muted); font-size: 0.78rem; padding: 0.35rem 0; flex: 1; border-radius: 6px; }

/* ── Queue card grid ───────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}
.card-grid .card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  transition: transform 0.15s;
}
.card-grid .card:hover { transform: translateY(-2px); }
.card-grid .card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--surface2);
  display: block;
}
.card-body {
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.card-body h3 { font-size: 0.83rem; font-weight: 600; line-height: 1.3; color: var(--text); }
.year         { color: var(--subtle); font-weight: 400; font-size: 0.78rem; }
.meta         { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.genres       { font-size: 0.72rem; color: var(--subtle); line-height: 1.4; }
.blurb        { font-size: 0.75rem; color: var(--muted); line-height: 1.5; font-style: italic; }
.actions      { display: flex; gap: 0.3rem; margin-top: auto; padding-top: 0.5rem; }
.card-skipped { opacity: 0.55; }
.skipped-badge { background: var(--surface2); color: var(--subtle); }

/* ── Empty state ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  margin-top: 5rem;
  color: var(--subtle);
  line-height: 2;
}
.empty-state p { margin-bottom: 0.5rem; }
.empty-state a { color: var(--accent); }
.empty-state code {
  background: var(--surface);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85rem;
  color: var(--muted);
}
.hint { font-size: 0.85rem; }

/* ── Filter bar ────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  font-size: 0.83rem;
}
.filter-label { color: var(--subtle); }
.filter-sep   { color: var(--border); margin: 0 0.2rem; }
.filter-btn {
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border: 1px solid var(--border);
}
.filter-btn:hover { background: var(--surface2); color: var(--text); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── History table ─────────────────────────────────────────── */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.history-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--subtle);
  font-weight: 500;
}
.history-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--surface2);
  color: var(--muted);
}
.history-table tr:hover td { background: var(--surface); }
.arr-yes { color: var(--green); }
.arr-no  { color: var(--subtle); }
.btn-restore {
  padding: 0.2rem 0.55rem;
  background: #1a2e1a;
  color: #7ac87a;
  border: 1px solid #2a4a2a;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-restore:hover { background: #243824; }

/* ── Tab bar ───────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  padding: 0.5rem 1.1rem;
  color: var(--subtle);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px 8px 0 0;
  transition: color 0.15s, background 0.15s;
}
.tab-btn:hover { color: var(--text); background: var(--surface); }
.tab-btn.active { color: #fff; background: var(--surface); border-bottom: 2px solid var(--accent); }
.tab-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
  vertical-align: middle;
  margin-left: 0.2rem;
}

/* ── For You recs ──────────────────────────────────────────── */
.rec-list { display: flex; flex-direction: column; gap: 0.65rem; }
.rec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.rec-body { flex: 1; }
.rec-title { font-size: 0.97rem; font-weight: 600; color: var(--text); margin-bottom: 0.3rem; }
.rec-reason { font-size: 0.82rem; color: var(--muted); line-height: 1.5; font-style: italic; }
.rec-actions { display: flex; align-items: center; padding-top: 0.1rem; }
.rec-links { margin-top: 0.4rem; }
.rec-link { font-size: 0.78rem; color: var(--accent); text-decoration: none; }
.rec-link:hover { text-decoration: underline; }
.rec-meta { font-size: 0.78rem; color: var(--subtle); margin-bottom: 1rem; }
.in-queue-badge { background: #1e2f4d; color: #7ab4e0; margin-left: 0.4rem; }

/* ── Stats page ────────────────────────────────────────────── */
.stat-cards {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.25rem 1.75rem;
  min-width: 120px;
  text-align: center;
  border: 1px solid var(--border);
}
.stat-card-accept { border-top: 3px solid var(--green); }
.stat-card-decline { border-top: 3px solid var(--red); }
.stat-value { font-size: 2rem; font-weight: 700; color: #fff; line-height: 1.1; }
.stat-label { font-size: 0.75rem; color: var(--subtle); margin-top: 0.3rem; text-transform: uppercase; letter-spacing: 0.07em; }

.dim-section { margin-bottom: 2rem; }
.dim-title { font-size: 1rem; color: var(--text); margin-bottom: 0.65rem; font-weight: 600; }
.dim-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; max-width: 600px; }
.dim-table th { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); color: var(--subtle); font-weight: 500; }
.dim-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--surface2); }
.dim-table tr:hover td { background: var(--surface); }
.dim-value { color: var(--muted); min-width: 100px; }
.dim-bar-cell { display: flex; align-items: center; gap: 0.5rem; min-width: 180px; }
.rate-bar-wrap { flex: 1; height: 7px; background: var(--border); border-radius: 4px; overflow: hidden; }
.rate-bar-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }
.bar-high { background: var(--green); }
.bar-mid  { background: var(--amber); }
.bar-low  { background: var(--red); }
.rate-pct { font-size: 0.78rem; color: var(--subtle); min-width: 36px; }
.dim-count { text-align: right; color: var(--subtle); font-size: 0.8rem; min-width: 30px; }
.accept-count  { color: #4a9a5a; }
.decline-count { color: #9a4a4a; }

/* ── Release panel ─────────────────────────────────────────── */
#release-panel:not(:empty) {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--surface);
  border-top: 2px solid var(--accent);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.7);
  max-height: 55vh;
  display: flex;
  flex-direction: column;
}
.release-panel-inner { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.release-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text);
  flex-shrink: 0;
}
.release-close {
  background: none; border: none;
  color: var(--subtle); font-size: 1.1rem;
  cursor: pointer; padding: 0 0.25rem;
}
.release-close:hover { color: var(--text); }
.release-loading, .release-empty, .release-error { padding: 1.25rem; color: var(--subtle); font-size: 0.88rem; }
.release-error { color: #c87a7a; }
.release-grabbed { padding: 1rem 1.25rem; color: var(--green); font-size: 0.9rem; }
.releases-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; overflow-y: auto; display: block; }
.releases-table thead { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.releases-table th { text-align: left; padding: 0.4rem 0.75rem; border-bottom: 1px solid var(--border); color: var(--subtle); font-weight: 500; white-space: nowrap; }
.releases-table td { padding: 0.4rem 0.75rem; border-bottom: 1px solid var(--surface2); color: var(--muted); vertical-align: middle; }
.release-row:hover td { background: var(--surface2); }
.release-rejected td { opacity: 0.4; }
.release-name { max-width: 420px; word-break: break-all; }
.release-size, .release-indexer { white-space: nowrap; color: var(--subtle); }
.release-seeds { white-space: nowrap; color: var(--green); }
.btn-grab {
  padding: 0.22rem 0.65rem;
  background: #1a3a1a;
  color: #a8e6a8;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-grab:hover { background: #243a24; }

/* ── User Picker ───────────────────────────────────────────── */
.user-pick-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg);
}
.user-pick-wrap { text-align: center; padding: 2rem; }
.user-pick-title { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 2rem; }
.user-pick-grid {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  justify-content: center; max-width: 600px;
}
.user-pick-grid-inline { max-width: 100%; }
.user-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px; padding: 1.5rem 1.75rem;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
  min-width: 100px;
}
.user-card:hover { border-color: var(--accent); background: var(--surface2); }
.user-card-active { border-color: var(--accent); background: var(--surface2); }
.user-card-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 1.4rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.user-card-kid .user-card-avatar { background: var(--amber); }
.user-card-name { font-size: 1rem; font-weight: 600; color: var(--text); }

/* ── Settings ──────────────────────────────────────────────── */
.settings-section { margin: 2rem 0; }
.settings-section h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
.settings-hint { color: var(--muted); font-size: 0.875rem; margin-bottom: 1rem; }

/* ── Swipeee ───────────────────────────────────────────────── */
.swipe-stats { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }
.swipe-analysis-link { font-size: 0.85rem; color: var(--accent); text-decoration: none; display: inline-block; margin-top: 0.3rem; }
.swipe-analysis-link:hover { text-decoration: underline; }

#swipe-area {
  display: flex;
  justify-content: center;
  padding: 1.5rem 0.5rem;
}

.swipe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: row;
}

.swipe-poster {
  width: 160px;
  min-height: 240px;
  object-fit: cover;
  object-position: top;
  display: block;
  flex-shrink: 0;
}

.swipe-body {
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.swipe-title { font-size: 1.05rem; font-weight: 700; color: #fff; line-height: 1.3; }
.swipe-meta  { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.swipe-overview { font-size: 0.82rem; color: var(--muted); line-height: 1.5; flex: 1; }

.swipe-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0.35rem;
  margin-top: auto;
}
.swipe-btn {
  padding: 0.65rem 0.2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  transition: opacity 0.15s, transform 0.1s;
  text-align: center;
}
.swipe-btn:hover  { opacity: 0.88; transform: scale(1.04); }
.swipe-btn:active { transform: scale(0.97); }
.swipe-btn-best    { background: var(--amber); color: #000; }
.swipe-btn-yes     { background: var(--green); color: #000; }
.swipe-btn-no      { background: var(--red);   color: #fff; }
.swipe-btn-unknown { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }

.swipe-skip-row { text-align: center; margin-top: 0.1rem; }
.swipe-btn-skip {
  background: transparent; color: var(--subtle); border: none;
  padding: 0.2rem 0.5rem; cursor: pointer;
  font-size: 0.78rem; text-decoration: underline;
}
.swipe-btn-skip:hover { color: var(--muted); }

/* ── Swipeee Analysis ──────────────────────────────────────── */
.analysis-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  max-width: 640px;
}
.analysis-text { color: var(--text); line-height: 1.7; font-size: 1rem; margin: 0 0 1rem 0; }
.analysis-meta { color: var(--subtle); font-size: 0.8rem; margin: 0 0 1rem 0; }
.analysis-regen-btn {
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
}
.analysis-regen-btn:hover { background: var(--border); color: var(--text); }

/* ── Tonight? survey ───────────────────────────────────────── */
.tonight-form { max-width: 680px; display: flex; flex-direction: column; gap: 1.5rem; }
.tonight-section { display: flex; flex-direction: column; gap: 0.75rem; }
.tonight-section-label { font-weight: 600; font-size: 0.95rem; color: var(--text); }

.tonight-mood-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}
.tonight-mood-label {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  user-select: none;
}
.tonight-mood-label:has(input:checked) {
  border-color: var(--accent);
  background: #2a1f45;
  color: #d8b4fe;
}
.tonight-mood-label input { display: none; }

.tonight-radio-row { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.tonight-radio-label {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.875rem; color: var(--muted); cursor: pointer;
}
.tonight-radio-label input { accent-color: var(--accent); }

.tonight-comp-list { display: flex; flex-direction: column; gap: 0.65rem; }
.tonight-comp-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.tonight-comp-title { font-size: 0.875rem; color: var(--text); flex: 1; }
.tonight-comp-btns  { display: flex; gap: 0.35rem; }
.comp-react-btn {
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--subtle);
  transition: opacity 0.15s, border-color 0.15s;
}
.comp-react-btn:hover { border-color: var(--muted); color: var(--text); }
.comp-react-btn.comp-react-selected { border-color: transparent; }
.comp-react-best.comp-react-selected    { background: var(--amber); color: #000; }
.comp-react-yes.comp-react-selected     { background: var(--green); color: #000; }
.comp-react-no.comp-react-selected      { background: var(--red);   color: #fff; }
.comp-react-unknown.comp-react-selected { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }

.tonight-submit-row { display: flex; align-items: center; gap: 1rem; }
.tonight-submit-btn {
  padding: 0.65rem 1.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.tonight-submit-btn:hover { background: var(--accent-h); }
.tonight-spinner { color: var(--muted); font-size: 0.85rem; display: none; }
.tonight-spinner.htmx-request { display: inline; }
.tonight-results { margin-top: 1.5rem; }
.tonight-results-list { display: flex; flex-direction: column; gap: 0.85rem; }

.tonight-section-inline { padding: 0.5rem 0; }
.tonight-toggle-label {
  display: flex; align-items: center; gap: 0.75rem;
  cursor: pointer; font-size: 0.95rem; color: var(--text); user-select: none;
}
.tonight-toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.tonight-toggle-track {
  width: 40px; height: 22px;
  background: var(--border);
  border-radius: 11px;
  position: relative; flex-shrink: 0;
  transition: background 0.2s;
}
.tonight-toggle-track::after {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: var(--subtle);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.tonight-toggle-input:checked + .tonight-toggle-track { background: var(--accent); }
.tonight-toggle-input:checked + .tonight-toggle-track::after { transform: translateX(18px); background: #fff; }

/* Tonight result cards */
.tonight-card {
  display: flex; gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden; padding: 0.85rem;
  align-items: flex-start;
}
.tonight-card-poster {
  width: 64px; height: 96px;
  object-fit: cover; border-radius: 6px;
  flex-shrink: 0; background: var(--surface2);
}
.tonight-card-body { flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.tonight-card-title { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.tonight-card-blurb { font-size: 0.83rem; color: var(--muted); line-height: 1.45; }
.tonight-card-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.2rem 0 0.4rem; }
.badge-imdb     { background: #f5c518; color: #000; }
.badge-provider { background: #0f4f2a; color: #a8e6a8; }
.badge-czdub    { background: #1a3a6b; color: #a8c4ff; }
.badge-csfd     { background: #c00; color: #fff; }

.tonight-add-btn {
  align-self: flex-start; margin-top: 0.4rem;
  padding: 0.4rem 1rem;
  background: var(--accent); color: #fff;
  border: none; border-radius: 7px;
  font-size: 0.8rem; font-weight: 700;
  cursor: pointer; transition: background 0.15s; flex: unset;
}
.tonight-add-btn:hover { background: var(--accent-h); }
.tonight-card-done { opacity: 0.7; align-items: center; justify-content: center; padding: 1rem; }
.tonight-card-added { color: var(--green); font-weight: 700; font-size: 0.95rem; text-align: center; }
.tonight-card-added-name { font-weight: 400; color: var(--subtle); font-size: 0.85rem; }

/* Tonight card reactions */
.tonight-card-reactions {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0.3rem; margin-top: 0.5rem;
}
.tonight-react-btn {
  padding: 0.55rem 0.2rem;
  border-radius: 7px; border: none;
  cursor: pointer;
  font-size: 0.78rem; font-weight: 700;
  transition: opacity 0.15s, transform 0.1s;
}
.tonight-react-btn:hover { opacity: 0.88; transform: scale(1.04); }
.tonight-react-best    { background: var(--amber); color: #000; }
.tonight-react-yes     { background: var(--green); color: #000; }
.tonight-react-no      { background: var(--red);   color: #fff; }
.tonight-react-unknown { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }

/* ── HTMX indicator ────────────────────────────────────────── */
.htmx-indicator { opacity: 0; transition: opacity 200ms; }
.htmx-request .htmx-indicator, .htmx-indicator.htmx-request { opacity: 1; display: block !important; }

/* ── Kids Advisor ──────────────────────────────────────────── */
.kids-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.kids-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s;
}
.kids-card:hover { transform: translateY(-3px); }

.kids-card-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--surface2);
}

.kids-card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.kid-pill {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  color: #fff;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.kid-pill-green  { background: #22c55e; }
.kid-pill-yellow { background: #f59e0b; }
.kid-pill-red    { background: #ef4444; }

.kids-card-body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.kids-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.kids-card-reason {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  font-style: italic;
}

.kids-rate-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

.kids-rate-btn {
  padding: 0.55rem 0.3rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  transition: opacity 0.15s, transform 0.1s;
  text-align: center;
}
.kids-rate-btn:hover  { opacity: 0.88; transform: scale(1.04); }
.kids-rate-btn:active { transform: scale(0.97); }
.kids-rate-love  { background: #db2777; color: #fff; }
.kids-rate-like  { background: var(--green); color: #000; }
.kids-rate-meh   { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }
.kids-rate-nope  { background: var(--red); color: #fff; }

.kids-queue-btn {
  width: 100%;
  padding: 0.6rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
  margin-top: auto;
}
.kids-queue-btn:hover { background: var(--accent-h); }

.kid-rate-done {
  padding: 1.5rem;
  text-align: center;
  color: var(--green);
  font-weight: 700;
  font-size: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.kid-queue-done {
  padding: 1.5rem;
  text-align: center;
  color: var(--text);
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  line-height: 1.6;
}

.requester-badge {
  display: inline-block;
  background: #2a1f45;
  color: #d8b4fe;
  border-radius: 20px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  main { padding: 1rem 0.75rem; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.65rem; }
  .header-inner { gap: 0.5rem; }
  .sync-bar { display: none; }
  .history-table { display: block; overflow-x: auto; white-space: nowrap; }
  .stat-cards { flex-direction: column; }
  .stat-card { flex: 1; min-width: unset; }
  .rec-card { flex-direction: column; gap: 0.5rem; }
  .rec-actions { align-self: flex-end; }
  .dim-table { display: block; overflow-x: auto; }
  .tab-bar { overflow-x: auto; flex-wrap: nowrap; }
  .tab-btn { white-space: nowrap; flex-shrink: 0; }
  .tonight-mood-grid { grid-template-columns: repeat(2, 1fr); }
  .tonight-comp-row { flex-direction: column; align-items: flex-start; }
  .tonight-comp-btns { flex-wrap: wrap; }

  /* Kids: smaller grid on mobile */
  .kids-card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.85rem; }
  .kids-rate-row { grid-template-columns: 1fr 1fr; }

  /* Swipeee: stack poster above body on very small screens */
  .swipe-card { flex-direction: column; max-width: 360px; }
  .swipe-poster { width: 100%; min-height: unset; aspect-ratio: 2/3; }
  .swipe-btn-row { grid-template-columns: 1fr 1fr; }
}
