/* Minha Cinemateca — estilos (celular primeiro) */

:root {
  --bg: #101114;
  --bg-2: #16181d;
  --surface: #1c1f25;
  --surface-2: #252931;
  --line: #2e333c;
  --text: #ece8df;
  --text-2: #a9a59c;
  --text-3: #77746d;
  --accent: #f0b646;
  --accent-ink: #1b1406;
  --ok: #58c28a;
  --want: #6aa7ff;
  --drop: #e3707a;
  --danger: #ef6b6b;
  --radius: 12px;
  --radius-sm: 8px;
  --tabbar-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
  min-height: 100vh;
}
body.auth, body:not(:has(.tabbar)) { padding-bottom: 0; }
body.sheet-open { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.85rem; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; font-weight: 700; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px 16px 24px; }
.meta { color: var(--text-2); font-size: 0.85rem; margin: 0; }
.small { display: block; font-size: 0.75rem; color: var(--text-3); margin-top: 4px; }
.hint { color: var(--text-2); font-size: 0.82rem; margin: 10px 0 0; min-height: 0; }
.hint:empty { display: none; }

/* ---------- barra superior (computador) e inferior (celular) ---------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: rgba(16, 17, 20, 0.86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand svg { width: 22px; height: 22px; color: var(--accent); }
.topnav { display: none; gap: 4px; }
.topnav a { color: var(--text-2); padding: 8px 12px; border-radius: 999px; font-weight: 500; }
.topnav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.topnav a.on { color: var(--accent-ink); background: var(--accent); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(22, 24, 29, 0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); font-size: 0.7rem; font-weight: 600;
}
.tabbar a:hover { text-decoration: none; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--accent); }

/* ---------- elementos de formulário ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 0.78rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
input[type=text], input[type=password], input[type=search], input[type=date], input[type=number], select {
  width: 100%; min-height: 46px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; font: inherit; font-size: 16px; /* 16px evita zoom no iPhone */
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240, 182, 70, 0.18); }
input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(239, 107, 107, 0.18); }
input[type=date] { color-scheme: dark; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 600; text-decoration: none;
}
.btn:hover { text-decoration: none; background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.link-danger { background: none; border: 0; color: var(--danger); padding: 8px 0; margin-top: 12px; font-size: 0.88rem; font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 14px; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin: 0 0 14px; font-size: 0.92rem; border: 1px solid; }
.alert.error { background: rgba(239, 107, 107, 0.1); border-color: rgba(239, 107, 107, 0.4); color: #ffb1b1; }
.alert.warn { background: rgba(240, 182, 70, 0.08); border-color: rgba(240, 182, 70, 0.35); color: #f5d38f; }
.alert.ok { background: rgba(88, 194, 138, 0.1); border-color: rgba(88, 194, 138, 0.4); color: #a6e6c3; }

/* ---------- login ---------- */

body.auth .page { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.auth-box { width: 100%; max-width: 380px; margin: 0 auto; padding: 28px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.auth-box h1 { text-align: center; margin-bottom: 20px; font-size: 1.6rem; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 10px; color: var(--accent); }
.auth-logo svg { width: 44px; height: 44px; }
body.auth .credits { margin-top: 32px; }

/* ---------- cabeçalhos de página ---------- */

.hero { padding: 10px 0 18px; }
.eyebrow { margin: 0 0 2px; color: var(--accent); font-weight: 600; font-size: 0.85rem; }
.hero h1 { margin-bottom: 14px; }
.page-head { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 14px; }
.section-title { margin: 6px 0 12px; color: var(--text-2); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
.result-info { color: var(--text-2); font-size: 0.85rem; margin: 0 0 12px; }

.searchbar { position: relative; }
.searchbar svg { position: absolute; left: 13px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.searchbar input { padding-left: 42px; min-height: 50px; border-radius: 999px; background: var(--surface); }

.segmented { display: flex; gap: 6px; }
.segmented.scroll { overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.segmented.scroll::-webkit-scrollbar { display: none; }
.segmented a {
  flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--text-2); font-weight: 600; font-size: 0.88rem; white-space: nowrap;
}
.segmented a:hover { text-decoration: none; color: var(--text); }
.segmented a.on { background: var(--text); border-color: var(--text); color: var(--bg); }

.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filters input[type=search] { grid-column: 1 / -1; }

/* ---------- números do início ---------- */

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 22px; }
.stat {
  display: flex; flex-direction: column; gap: 2px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); position: relative; overflow: hidden;
}
.stat:hover { text-decoration: none; border-color: var(--text-3); }
.stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--accent)); }
.stat strong { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.stat span { color: var(--text-2); font-size: 0.74rem; font-weight: 600; line-height: 1.25; }
.s-assistido { --c: var(--ok); }
.s-quero_ver { --c: var(--want); }
.s-abandonei { --c: var(--drop); }

/* ---------- prateleiras e grade ---------- */

.shelf { margin-bottom: 26px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.shelf-head a { font-size: 0.88rem; font-weight: 600; }
.row-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 30%; gap: 10px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px 4px;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll .card { scroll-snap-align: start; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }

.card { position: relative; min-width: 0; }
.card-link { color: var(--text); display: block; }
.card-link:hover { text-decoration: none; }
.poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 6px 16px rgba(0, 0, 0, 0.35);
  -webkit-touch-callout: none; user-select: none;
}
.poster img { width: 100%; height: 100%; object-fit: cover; }
.noposter { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; text-align: center;
  font-family: var(--font-display); font-size: 0.85rem; color: var(--text-2); background: linear-gradient(160deg, var(--surface-2), var(--bg-2)); }
.card h3 { font-size: 0.82rem; font-weight: 600; margin-top: 7px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { font-size: 0.75rem; }

.badge {
  position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 999px;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.02em;
  background: rgba(0, 0, 0, 0.72); color: #fff; backdrop-filter: blur(4px);
}
.badge:empty { display: none; }
.card[data-status=assistido] .badge { background: var(--ok); color: #06210f; }
.card[data-status=quero_ver] .badge { background: var(--want); color: #061a33; }
.card[data-status=abandonei] .badge { background: var(--drop); color: #2c0609; }
.card[data-status=assistido] .poster { outline: 2px solid var(--ok); outline-offset: -2px; }

.score {
  position: absolute; right: 6px; bottom: 6px; min-width: 34px; padding: 3px 7px; border-radius: 6px; text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.score:empty { display: none; }
.kind { position: absolute; left: 6px; bottom: 6px; padding: 2px 6px; border-radius: 4px; font-size: 0.62rem; font-weight: 700;
  background: rgba(0, 0, 0, 0.7); color: var(--text); text-transform: uppercase; letter-spacing: 0.05em; }

/* botão de marcação rápida, no canto superior direito do pôster */
.quick {
  position: absolute; right: 4px; top: 4px;
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, 0.62); color: #fff; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); opacity: 0.95;
}
.quick:hover { background: var(--accent); color: var(--accent-ink); }
.quick svg { width: 18px; height: 18px; fill: currentColor; }

.empty { text-align: center; padding: 34px 18px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); margin-bottom: 24px; }
.empty h2 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 6px; }
.empty p { color: var(--text-2); margin: 0 0 16px; }

.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 22px 0 6px; }
.pager .btn { min-height: 40px; padding: 8px 14px; }
.pager > :last-child { justify-self: end; }

/* ---------- página do título ---------- */

.detail-hero { position: relative; margin: -16px -16px 16px; padding: 18px 16px 6px; isolation: isolate; }
.detail-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(180deg, rgba(16, 17, 20, 0.55) 0%, rgba(16, 17, 20, 0.85) 55%, var(--bg) 100%), var(--backdrop, none);
  background-size: cover; background-position: center top;
}
.detail-top { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: start; }
.detail-poster { aspect-ratio: 2 / 3; border-radius: var(--radius-sm); overflow: hidden; position: relative; background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { font-size: 1.45rem; }
.original { margin: 2px 0 0; color: var(--text-2); font-style: italic; font-size: 0.9rem; }
.detail-info .meta { margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 0; }
.chip { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(28, 31, 37, 0.7); font-size: 0.75rem; color: var(--text-2); }
.credit { margin: 8px 0 0; font-size: 0.88rem; }
.credit span { color: var(--text-3); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; margin-right: 4px; }
.ext-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 12px 0 0; font-size: 0.85rem; font-weight: 600; }
.tmdb-score { color: var(--text-2); font-weight: 600; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.panel h2 { margin-bottom: 12px; }
.item-panel { border-color: rgba(240, 182, 70, 0.35); }
.panel-fields, .sheet-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.panel-rating, .sheet-rating { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem !important; letter-spacing: 0.02em; }
.tagline { font-family: var(--font-display); font-style: italic; color: var(--text-2); margin: 0 0 8px; }
.overview { margin: 0; color: var(--text); }

.status-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.status-btn {
  min-height: 46px; padding: 8px 6px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); font-weight: 600; font-size: 0.88rem;
  transition: background .15s, color .15s, border-color .15s;
}
.status-btn:hover { color: var(--text); border-color: var(--text-3); }
.status-btn.on[data-set-status=assistido] { background: var(--ok); border-color: var(--ok); color: #06210f; }
.status-btn.on[data-set-status=quero_ver] { background: var(--want); border-color: var(--want); color: #061a33; }
.status-btn.on[data-set-status=andamento] { background: #b18cff; border-color: #b18cff; color: #1c0b3a; }
.status-btn.on[data-set-status=abandonei] { background: var(--drop); border-color: var(--drop); color: #2c0609; }

.season-list, .cast-list { list-style: none; margin: 0; padding: 0; }
.season-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.season-list li:last-child { border-bottom: 0; }
.cast-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.cast-list li { display: flex; flex-direction: column; font-size: 0.88rem; min-width: 0; }
.cast-list span { color: var(--text-2); font-size: 0.8rem; }

/* ---------- painel rápido ---------- */

.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity .25s; }
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  max-height: 92vh; overflow-y: auto;
  background: var(--surface); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0;
  padding: 8px 16px calc(16px + var(--safe-b));
  transform: translateY(105%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.5);
  visibility: hidden;
}
.sheet.open { transform: translateY(0); visibility: visible; }
.sheet-grip { width: 42px; height: 5px; border-radius: 99px; background: var(--line); margin: 4px auto 12px; }
.sheet-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.sheet-head > div { min-width: 0; flex: 1; }
.sheet-poster { flex: none; width: 62px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; background: var(--bg-2); }
.sheet-title { font-family: var(--font-display); font-size: 1.15rem; }
.sheet-open { display: inline-block; margin-top: 4px; font-size: 0.85rem; font-weight: 600; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.sheet-actions .btn.ghost.sheet-clear { color: var(--danger); border-color: rgba(239, 107, 107, 0.35); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); z-index: 90;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 0.9rem; text-align: center;
  transition: opacity .2s, transform .2s; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; border-radius: 12px; }
body.sheet-open .toast { z-index: 95; top: calc(14px + env(safe-area-inset-top, 0px)); bottom: auto; transform: translate(-50%, -20px); }
body.sheet-open .toast.show { transform: translate(-50%, 0); }

/* ---------- listas ---------- */

.btn.small { min-height: 36px; padding: 6px 14px; font-size: 0.85rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.note { font-size: 0.82rem; color: var(--text-2); margin: -4px 0 0; }

.new-list, .list-edit { width: 100%; }
.new-list > summary, .list-edit > summary { list-style: none; display: inline-flex; width: auto; }
.new-list > summary::-webkit-details-marker, .list-edit > summary::-webkit-details-marker { display: none; }
.new-list[open] > summary, .list-edit[open] > summary { margin-bottom: 12px; }
.list-head { flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; }
.list-head > div:first-child { flex: 1 1 60%; min-width: 0; }
.list-edit { width: auto; text-align: right; }
.list-edit[open] { width: 100%; text-align: left; }
.delete-form { margin-top: 4px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.85rem; color: var(--text-3); margin: 0 0 4px; }
.crumbs a { font-weight: 600; }

.tree { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; }
.tree-row {
  display: flex; align-items: center; gap: 10px; min-height: 52px;
  padding: 10px 14px 10px calc(14px + var(--depth, 0) * 22px);
  color: var(--text); border-bottom: 1px solid var(--line);
}
.tree-row:last-child { border-bottom: 0; }
.tree-row:hover { background: var(--surface-2); text-decoration: none; }
.tree-icon { width: 16px; text-align: center; color: var(--accent); flex: none; }
.tree-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-count { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 0.88rem; }
.pill { padding: 2px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; flex: none; }
.pill.warn { background: rgba(227, 112, 122, 0.18); color: #ffa7ae; }

.chip-cloud, .sublists { display: flex; flex-wrap: wrap; gap: 8px; }
.sublists { margin: 0 0 14px; }
.chip.big { padding: 7px 12px; font-size: 0.88rem; font-weight: 600; color: var(--text); background: var(--surface); }
.chip.big span { color: var(--text-3); font-weight: 500; margin-left: 4px; }
.chip.big:hover { text-decoration: none; border-color: var(--text-3); }
.chip.add { color: var(--accent); border-style: dashed; background: transparent; }

.block-link { display: block; text-decoration: none !important; }
.list-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.order-form select { width: 100%; }

/* nota na lista: própria (âmbar), herdada/geral (cinza), conflito (vermelho) */
.score.src-herdada, .score.src-geral { background: rgba(20, 22, 27, 0.88); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text-3), 0 2px 8px rgba(0, 0, 0, 0.4); }
.score.src-conflito { background: var(--drop); color: #2c0609; }
.src-note { color: var(--text-3); }

/* fila com ordem manual */
.queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.queue-row {
  display: grid; grid-template-columns: 28px 26px 1fr; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px 8px 4px;
}
.queue-row.inherited { opacity: 0.75; }
.queue-row.dragging { position: fixed; z-index: 50; margin: 0; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); border-color: var(--accent); pointer-events: none; }
.queue-ph { border: 2px dashed var(--line); border-radius: var(--radius); list-style: none; }
.handle { display: flex; align-items: center; justify-content: center; height: 44px; color: var(--text-3); font-size: 1.3rem; cursor: grab; touch-action: none; user-select: none; }
.handle.off { cursor: default; }
.queue-n { font-family: var(--font-display); font-weight: 700; color: var(--accent); text-align: center; font-variant-numeric: tabular-nums; }
.queue .card .card-link { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: center; padding-right: 40px; }
.queue .card .poster { border-radius: 6px; }
.queue .noposter { font-size: 0.55rem; padding: 4px; overflow: hidden; }
.queue .card .badge, .queue .card .kind { display: none; }
.queue .card .score { right: auto; left: 50%; bottom: 3px; transform: translateX(-50%); min-width: 28px; padding: 1px 5px; font-size: 0.75rem; }
.queue .card h3 { margin: 0; font-size: 0.95rem; }
.queue .card .quick { top: 50%; transform: translateY(-50%); right: 0; }

/* nas listas dentro da página do título */
.item-lists-rows { display: flex; flex-direction: column; }
.il-row { display: grid; grid-template-columns: 1fr 74px 34px; gap: 8px; align-items: center; padding: 8px 0 8px calc(var(--depth, 0) * 16px); border-bottom: 1px solid var(--line); }
.il-row:last-child { border-bottom: 0; }
.il-row.conflict .il-rating { border-color: var(--drop); }
.il-name { min-width: 0; display: flex; flex-direction: column; }
.il-name a { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.il-name small { color: var(--text-3); font-size: 0.75rem; }
.il-row.conflict .il-name small { color: #ffa7ae; }
.il-rating { min-height: 40px !important; text-align: center; font-family: var(--font-display); font-weight: 700; padding: 6px !important; }
.il-remove { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text-2); font-size: 1.1rem; line-height: 1; }
.il-remove:hover { color: var(--danger); border-color: var(--danger); }
.il-remove.off { border: 0; }

.lists-btn { margin-top: 12px; }
.sheet-list { background: var(--bg-2); border: 1px solid rgba(240, 182, 70, 0.35); border-radius: var(--radius-sm); padding: 12px; margin-top: 14px; }
.sheet-list .link-danger { margin-top: 6px; }

/* seletor de listas */
.sheet.picker { z-index: 75; max-height: 86vh; }
.picker-title { font-size: 1.05rem; margin-bottom: 4px; }
.picker-title span { font-family: var(--font-display); }
.picker-tree { display: flex; flex-direction: column; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.pick-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 48px; padding: 8px 12px 8px calc(12px + var(--depth, 0) * 20px); border-bottom: 1px solid var(--line); cursor: pointer; }
.pick-row:last-child { border-bottom: 0; }
.pick-row input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.pick-name { font-weight: 600; flex: 1; min-width: 0; }
.pick-row small { color: var(--text-3); font-size: 0.75rem; width: 100%; padding-left: 30px; margin-top: -4px; }
.picker-new { margin-bottom: 4px; }
.picker-new summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 6px 0; }
.picker-new .stack { gap: 8px; margin-top: 8px; }
.sheet-actions.one { grid-template-columns: 1fr; }

/* janela de pedido de nota */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.65); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.modal h2 { font-family: var(--font-display); font-size: 1.2rem; }
.modal > p { margin: 6px 0; }
.cf-options { list-style: none; padding: 0; margin: 8px 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cf-options li { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.cf-options li:last-child { border-bottom: 0; }
.cf-options strong { font-family: var(--font-display); color: var(--accent); }
.cf-rating { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem !important; }

/* ---------- por ano ---------- */

.year-nav { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.btn.round { min-height: 44px; padding: 8px 14px; font-variant-numeric: tabular-nums; }
.year-form input { text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem !important; min-height: 52px; border-radius: 999px; }
.year-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--text-2); grid-column: 1 / -1; min-height: 32px; }
.toggle input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.year-progress { display: flex; flex-direction: column; gap: 8px; }
.year-progress strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent); }
.progress { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--line); }
.progress-bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #ffd27a); border-radius: 99px; transition: width .3s; }
.logout-link { float: right; color: var(--text-3); font-weight: 500; margin-left: 14px; }

/* notas externas */
.ratings { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.rating-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 6px; font-weight: 700; font-size: 0.92rem;
  background: rgba(28, 31, 37, 0.85); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.rating-chip b { font-size: 0.7rem; letter-spacing: 0.04em; color: var(--text-2); }
.rating-chip.imdb { background: #f5c518; color: #000; border-color: #f5c518; }
.rating-chip.imdb b { color: #000; }
.rating-chip.rt b { font-size: 0.9rem; }
.rating-chip.meta { background: #2a3a2a; border-color: #4b7a3e; }
.rating-chip.loading { color: var(--text-3); font-weight: 500; font-size: 0.8rem; border-style: dashed; }
.rating-setup { font-size: 0.82rem; font-weight: 600; align-self: center; }
.ext-links { margin-top: 10px !important; }
.settings { display: flex; flex-direction: column; gap: 10px; }
.settings h2 { margin: 0; }
.steps { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 0.9rem; display: flex; flex-direction: column; gap: 6px; }

.check {
  position: absolute; right: 4px; top: 42px; width: 34px; height: 34px; border-radius: 50%; border: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.62); color: #fff; backdrop-filter: blur(4px);
}
.check svg { width: 18px; height: 18px; }
.check:hover { background: var(--ok); color: #06210f; }
.card[data-status=assistido] .check { background: var(--ok); color: #06210f; }
.card.saving { opacity: 0.6; }
.card.just-done .poster { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.04); } }
.year-grid .kind { display: none; }

/* temporadas */
.season-list.interactive li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; }
.season-check { display: flex; align-items: center; gap: 12px; flex: 1 1 220px; min-width: 0; cursor: pointer; }
.season-check input { width: 22px; height: 22px; accent-color: var(--ok); flex: none; }
.season-check span { display: flex; flex-direction: column; min-width: 0; }
.season-check small { color: var(--text-3); font-size: 0.78rem; }
.season-row.seen strong { color: var(--ok); }
.season-row.future { opacity: 0.55; }
.season-date { width: auto !important; min-height: 38px !important; padding: 6px 10px !important; font-size: 14px !important; margin-left: 34px; }
.season-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#seasonsPanel .progress { margin-bottom: 6px; }
#seasonsPanel.busy { opacity: 0.7; pointer-events: none; }
.card[data-status=andamento] .badge { background: #b18cff; color: #1c0b3a; }
.s-andamento { --c: #b18cff; }

/* ---------- estatísticas ---------- */

.stats-link {
  display: flex; align-items: center; gap: 12px; margin: -10px 0 24px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
}
.stats-link:hover { text-decoration: none; border-color: var(--text-3); }
.stats-link svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.stats-link > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.stats-link small { color: var(--text-2); font-size: 0.8rem; }
.stats-link > span:last-child { color: var(--text-3); font-size: 1.4rem; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.kpi {
  display: flex; flex-direction: column; gap: 2px; padding: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0;
}
a.kpi:hover { text-decoration: none; border-color: var(--text-3); }
.kpi strong { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 0.75rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-sub { font-size: 0.78rem; color: var(--text-3); }
.kpi.kpi-main { grid-column: 1 / -1; padding: 18px; border-color: rgba(240, 182, 70, 0.4); }
.kpi.kpi-main strong { font-size: 2.6rem; color: var(--accent); }
.kpi.kpi-main .kpi-sub { font-size: 0.9rem; color: var(--text-2); }
.split { display: flex; gap: 2px; height: 10px; margin: 12px 0 8px; border-radius: 4px; overflow: hidden; background: var(--bg-2); }
.split span { display: block; height: 100%; }
.split-a { background: var(--accent); }
.split-b { background: #8fb8ff; }
.split-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.85rem; color: var(--text-2); }
.split-legend b { color: var(--text); margin-left: 4px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw.a { background: var(--accent); }
.sw.b { background: #8fb8ff; }

.stats-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.stats-grid .panel { margin: 0; }
.stats-grid h2 { margin-bottom: 2px; }
.stats-grid .panel > .meta { margin-bottom: 12px; font-size: 0.8rem; }

.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 7.5em) 1fr auto; gap: 10px; align-items: center; padding: 5px 4px; border-radius: 6px; }
.bar-row:hover { background: var(--surface-2); }
.bar-label { font-size: 0.86rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label a { color: var(--text); }
.bar-track { height: 12px; background: transparent; position: relative; }
.bar { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 2px; }
.bar-row:hover .bar { filter: brightness(1.12); }
.bar-val { display: flex; flex-direction: column; align-items: flex-end; min-width: 4.6em; line-height: 1.15; }
.bar-val strong { font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.bar-val small { color: var(--text-3); font-size: 0.7rem; white-space: nowrap; }

.dist { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; height: 170px; align-items: end; padding-top: 4px; }
.dist-col { display: grid; grid-template-rows: auto 1fr auto; height: 100%; align-items: end; text-align: center; }
.dist-n { font-size: 0.72rem; color: var(--text-2); font-variant-numeric: tabular-nums; min-height: 1.1em; }
.dist-bar { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; align-self: end; }
.dist-col:hover .dist-bar { filter: brightness(1.12); }
.dist-x { font-size: 0.72rem; color: var(--text-3); border-top: 1px solid var(--line); padding-top: 4px; margin-top: 2px; }

.rank { list-style: none; margin: 0; padding: 0; }
.rank li a { display: grid; grid-template-columns: 22px 34px 1fr auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 6px; color: var(--text); }
.rank li a:hover { background: var(--surface-2); text-decoration: none; }
.rank-n { color: var(--text-3); font-variant-numeric: tabular-nums; text-align: right; font-size: 0.85rem; }
.rank img, .rank-noimg { width: 34px; height: 51px; object-fit: cover; border-radius: 4px; background: var(--bg-2); display: block; }
.rank-title { min-width: 0; font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; flex-direction: column; }
.rank-title small { color: var(--text-3); font-weight: 400; font-size: 0.75rem; }
.rank-val { font-family: var(--font-display); font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.rank-val.plain { background: transparent; color: var(--text); font-family: var(--font); font-weight: 600; font-size: 0.88rem; }

/* ---------- modo app (instalado na tela inicial) ---------- */

.backbtn { display: none; align-items: center; justify-content: center; width: 38px; height: 38px; margin: -4px 2px -4px -8px;
  border: 0; background: transparent; color: var(--text); font-size: 1.7rem; line-height: 1; }
html.standalone .backbtn.on { display: flex; }
@media (display-mode: standalone) { .backbtn.on { display: flex; } }
.install-box { display: flex; flex-direction: column; gap: 10px; }
.install-box .steps li b { color: var(--text); }
body.auth .page { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }

/* ---------- instalação ---------- */

.install { max-width: 560px; margin: 0 auto; }
.install h1 { margin: 10px 0 6px; }
.install .lead { color: var(--text-2); margin: 0 0 18px; }
.install fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 16px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
.install legend { padding: 0 6px; font-weight: 700; }
.install .note { font-size: 0.82rem; color: var(--text-2); margin: -4px 0 0; }

/* ---------- rodapé ---------- */

.credits { margin: 34px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 0.8rem; text-align: center; }
.credits a { font-weight: 700; }

/* ---------- telas maiores ---------- */

@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 14px; }
  .row-scroll { grid-auto-columns: 22%; }
  .detail-top { grid-template-columns: 170px 1fr; gap: 22px; }
  .detail-info h1 { font-size: 1.9rem; }
  .filters { grid-template-columns: 2fr 1fr 1.4fr; }
  .filters input[type=search] { grid-column: auto; }
  .cast-list { grid-template-columns: repeat(3, 1fr); }
  .sheet { left: 50%; right: auto; width: 520px; transform: translate(-50%, 105%); }
  .sheet.open { transform: translate(-50%, 0); }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .page { padding: 24px 28px 32px; }
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 16px; }
  .row-scroll { grid-auto-columns: calc((100% - 5 * 14px) / 6); gap: 14px; margin: 0; padding: 0 0 6px; }
  .hero { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 24px; }
  .hero h1 { margin: 0; font-size: 2.3rem; }
  .stat-row { max-width: 820px; }
  .detail-hero { margin: -24px -28px 22px; padding: 36px 28px 12px; }
  .detail-top { grid-template-columns: 230px 1fr; gap: 32px; }
  .detail-info h1 { font-size: 2.4rem; }
  .detail-wrap { display: grid; }
  .item-panel { max-width: 640px; }
  .toast { bottom: 24px; }
  .page-head { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .page-head h1 { margin-right: auto; }
  .page-head .searchbar { flex: 1 1 100%; order: 3; }
  .page-head .filters { flex: 1 1 100%; order: 3; }
  .list-filters { flex-direction: row; align-items: center; justify-content: space-between; }
  .year-head { flex-direction: column; align-items: stretch; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .kpi.kpi-main { grid-column: span 2; grid-row: span 2; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .bar-row { grid-template-columns: minmax(0, 10em) 1fr auto; }
  .stats-link { max-width: 640px; }
  .year-nav { max-width: 520px; }
  .year-filters { grid-template-columns: 240px 260px auto auto; align-items: center; }
  .toggle { grid-column: auto; }
  .season-date { margin-left: 0; }
  .order-form select { width: 280px; }
  .queue { max-width: 760px; }
  .quick { opacity: 0; transition: opacity .15s; }
  .card:hover .quick, .quick:focus-visible { opacity: 1; }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

@media (hover: none) {
  .quick { opacity: 0.95 !important; }
}

.topbar-left { display: flex; align-items: center; min-width: 0; }

/* estreias */
.soon { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 0.68rem; color: #fff; text-align: center;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88) 45%); font-variant-numeric: tabular-nums; }
.soon b { display: block; color: var(--accent); font-size: 0.8rem; }
.card.has-soon .score, .card.has-soon .kind { display: none; }
.next-info { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; font-size: 0.86rem;
  background: rgba(240, 182, 70, 0.1); border: 1px solid rgba(240, 182, 70, 0.35); color: var(--text); }
.next-info b { color: var(--accent); }
.notif-state { font-weight: 600; }
.notif-state.ok { color: var(--ok); }
.notif-state.warn { color: #f5d38f; }
.cron-cmd { display: block; padding: 10px 12px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line);
  font: 0.78rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; user-select: all; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.shelf-sub { margin: -6px 0 10px; font-size: 0.8rem; }

/* onde assistir */
.watch-group { margin-bottom: 12px; }
.watch-group:last-of-type { margin-bottom: 4px; }
.watch-group h3 { font-size: 0.75rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.providers { display: flex; flex-wrap: wrap; gap: 10px; }
.provider { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; text-align: center; font-size: 0.68rem; color: var(--text-2); line-height: 1.2; }
.provider img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.watch-credit { font-size: 0.72rem; color: var(--text-3); margin: 10px 0 0; }

/* assistindo */
.status-btn { font-size: 0.82rem; padding: 8px 4px; }
.watch-box { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; padding: 12px; border-radius: var(--radius-sm);
  background: rgba(177, 140, 255, 0.07); border: 1px solid rgba(177, 140, 255, 0.35); }
.wb-progress .field small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text-3); }
.wb-min { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem !important; max-width: 160px; }
.wb-next { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wb-next-text { display: flex; flex-direction: column; min-width: 0; }
.wb-next-label { font-weight: 700; font-size: 1rem; }
.wb-next-name { color: var(--text-2); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-plus { flex: none; min-height: 42px; padding: 8px 14px; background: #b18cff; border-color: #b18cff; color: #1c0b3a; }
.wb-people { display: flex; flex-direction: column; gap: 6px; }
.wb-people-label { font-size: 0.78rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.people-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { min-height: 34px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); font-weight: 600; font-size: 0.85rem; }
.pchip.on { background: #b18cff; border-color: #b18cff; color: #1c0b3a; }
.pchip.chip-add { border-style: dashed; color: var(--accent); background: transparent; }
.chip-new input { min-height: 34px !important; width: 130px !important; padding: 4px 12px !important; border-radius: 999px !important; font-size: 15px !important; }

.card .plus {
  position: absolute; right: 4px; top: 42px; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 999px; border: 0;
  background: #b18cff; color: #1c0b3a; font-weight: 800; font-size: 0.85rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.card.cont .soon b { color: #d6c4ff; }
.card .idle { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 999px; font-size: 0.64rem; font-weight: 700;
  background: #f0b646; color: #1b1406; }
.card-note { margin: 2px 0 0; font-size: 0.72rem; color: var(--text-2); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-filter { margin: -2px -16px 10px; }
.card[hidden] { display: none !important; }

/* episódios */
.season-row.partial strong { color: #d6c4ff; }
.ep-toggle { margin-left: 34px; background: none; border: 0; color: var(--accent); font-weight: 600; font-size: 0.82rem; padding: 4px 0; }
.ep-list { list-style: none; margin: 4px 0 0 34px; padding: 0; width: calc(100% - 34px); border-left: 2px solid var(--line); }
.ep-row label { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0 5px 10px; cursor: pointer; }
.ep-row input { width: 20px; height: 20px; accent-color: #b18cff; flex: none; margin-top: 1px; }
.ep-row span { display: block; font-size: 0.88rem; min-width: 0; line-height: 1.3; }
.ep-row b { color: var(--text-2); margin-right: 4px; }
.ep-row small { display: block; color: var(--text-3); font-size: 0.74rem; }
.ep-row.seen span { color: var(--text-2); }
.ep-row.future { opacity: 0.55; }
@media (min-width: 900px) { .person-filter { margin: -2px 0 10px; } .ep-toggle, .ep-list { margin-left: 34px; } }
.person-row { display: grid; grid-template-columns: 1fr auto 34px; gap: 10px; align-items: center; }
.person-ren input { min-height: 40px !important; }
.person-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.season-list.interactive .ep-list li { display: block; padding: 0; border-bottom: 0; }

/* quem está assistindo junto (no pôster, como a nota) */
.who { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 56px); padding: 3px 8px; border-radius: 6px;
  background: #b18cff; color: #1c0b3a; font-size: 0.7rem; font-weight: 700; line-height: 1.25;
  overflow: hidden; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.who:empty { display: none; }
.who:not(:empty) ~ .kind { display: none; }
.card.has-soon .who { bottom: 52px; }
.queue .card .who { display: none; }
.year-link { color: var(--text); }
.year-link:hover { text-decoration: none; color: var(--accent); }
.year-chip { margin-left: 8px; font-size: 0.8rem; padding: 4px 10px; }

button.rating-chip { font: inherit; font-weight: 700; font-size: 0.92rem; color: var(--text); cursor: pointer; }
button.rating-chip.imdb { color: #000; }
button.rating-chip:hover { filter: brightness(1.15); }
button.rating-chip:active, button.rating-chip.applied { transform: scale(0.95); box-shadow: 0 0 0 3px rgba(240, 182, 70, 0.5); }

/* arrastar e soltar nas listas */
.result-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.result-row .result-info { margin: 0; }
.order-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -4px 0 12px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; font-size: 0.85rem; }
.reorder-bar { position: sticky; top: 58px; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: #2a2140; border: 1px solid #b18cff; font-size: 0.88rem; font-weight: 600; }
.grid.reordering .card { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; animation: wiggle .5s ease-in-out infinite alternate; }
.grid.reordering .card:nth-child(2n) { animation-delay: .15s; }
.grid.reordering .card .quick, .grid.reordering .card .check, .grid.reordering .card .plus { display: none; }
.grid.reordering .card-link { pointer-events: none; }
@keyframes wiggle { from { transform: rotate(-0.6deg); } to { transform: rotate(0.6deg); } }
.card-ph { border: 2px dashed #b18cff; border-radius: var(--radius-sm); background: rgba(177, 140, 255, 0.08); aspect-ratio: 2 / 3; }
.dragging-card { position: fixed !important; z-index: 80; pointer-events: none; animation: none !important; opacity: 0.92;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6); }
.dragging-card .poster { outline: 2px solid #b18cff; }
body.reorder-mode { overscroll-behavior: none; }

/* pessoas */
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; }
.people-row { grid-auto-columns: 28%; margin-bottom: 8px; }
.person-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; color: var(--text); min-width: 0; }
.person-card:hover { text-decoration: none; }
.person-card:hover .person-photo { outline: 2px solid var(--accent); }
.person-photo { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; flex: none; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-photo span, .person-big-photo span { font-family: var(--font-display); font-size: 2rem; color: var(--text-3); }
.person-card strong { font-size: 0.86rem; line-height: 1.25; }
.person-card small { font-size: 0.72rem; color: var(--text-3); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person-card .person-dept { color: var(--accent); font-weight: 600; }
.person-hero { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: start; margin: 4px 0 16px; }
.person-big-photo { aspect-ratio: 2 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.person-big-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-info h1 { font-size: 1.5rem; }
.person-info .meta { margin-top: 4px; }
.person-seen { margin: 12px 0 6px; font-size: 0.9rem; }
.person-seen b { font-family: var(--font-display); font-size: 1.2rem; color: var(--accent); }
.bio summary { list-style: none; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; cursor: pointer; }
.bio summary::-webkit-details-marker { display: none; }
.bio summary h2 { margin: 0; }
.bio[open] summary .meta { display: none; }
.bio .overview { margin-top: 10px; }
.person-filters { gap: 10px; }
.tab-n { opacity: 0.6; font-weight: 500; margin-left: 2px; }
.card-role { margin: 2px 0 0; font-size: 0.72rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-link, .cast-link { color: inherit; }
.person-link { text-decoration: underline; text-decoration-color: var(--text-3); text-underline-offset: 3px; }
.cast-link { display: flex; flex-direction: column; min-width: 0; }
.cast-link:hover { text-decoration: none; }
.cast-link:hover strong, .person-link:hover { color: var(--accent); }
@media (min-width: 560px) {
  .people-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .people-row { grid-auto-columns: 20%; }
  .person-hero { grid-template-columns: 170px 1fr; gap: 22px; }
  .person-info h1 { font-size: 2rem; }
}
@media (min-width: 900px) {
  .people-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .people-row { grid-auto-columns: calc((100% - 6 * 14px) / 7); }
  .person-photo { width: 110px; height: 110px; }
  .person-hero { grid-template-columns: 210px 1fr; }
}

/* Oscar (vencedor em dourado, com troféu e texto: não depende só da cor) */
.oscar-head h1 .trophy { font-size: 0.85em; }
.oscar-sub { margin-top: -4px; }
.oscar-head .year-form select { text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem !important; min-height: 52px; border-radius: 999px; }
.oscar-cat { margin-top: 20px; }
.oscar-cat h2 { font-family: var(--font-display); font-size: 1.15rem; }
.oscar-row { margin-bottom: 4px; }
.card.oscar-win .poster { box-shadow: 0 0 0 3px #f0b646, 0 8px 20px rgba(240, 182, 70, 0.25); }
.oscar-band { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; text-align: center; font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase; background: #f0b646; color: #1b1406; }
.card.oscar-win .score { bottom: 30px; }
.card.oscar-win .who { bottom: 30px; }
.card.oscar-win .kind { display: none; }
.plain-card .card-link { cursor: pointer; }
.plain-card[data-pending] .noposter { animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.6; } to { opacity: 1; } }
.oscar-others { margin-top: 24px; }
.oscar-others summary { list-style: none; display: flex; align-items: baseline; justify-content: space-between; cursor: pointer; }
.oscar-others summary::-webkit-details-marker { display: none; }
.oscar-others summary h2 { margin: 0; }
.oscar-link svg { color: #f0b646; }
.oscar-link { margin-top: -14px; }
.credits.small { margin-top: 24px; font-size: 0.75rem; }

/* Parecidos com este */
.similar { margin-top: 8px; }
.similar .shelf-head { gap: 10px; flex-wrap: wrap; }
.sim-hide { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted, #9aa0a6); cursor: pointer; }
.sim-hide input { width: 16px; height: 16px; accent-color: var(--accent, #f5c451); }
.sim-wrap { display: flex; flex-direction: column; min-width: 0; scroll-snap-align: start; }
.sim-why { margin: 2px 0 0; font-size: 0.72rem; line-height: 1.25; color: var(--muted, #9aa0a6); font-style: italic;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.similar.hide-seen .sim-wrap[data-seen] { display: none; }
.tmdb-note { font-weight: 600; color: var(--text, #e8e6e3); }

/* Busca no topo de todas as páginas */
.global-search { margin: 0 0 16px; }
.global-search input { min-height: 44px; font-size: 0.95rem; }
@media (min-width: 900px) { .global-search { max-width: 560px; } }
/* Na página do título, a imagem de fundo começa logo abaixo da busca (sem cobri-la) */
.global-search + .detail-hero { margin-top: 0; }
.global-search { position: relative; z-index: 2; }

/* Trailer */
.trailer-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 16px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.92rem; text-decoration: none; }
.trailer-btn:hover { text-decoration: none; filter: brightness(1.06); }
.trailer-btn svg { width: 18px; height: 18px; }
.trailer-btn small { font-weight: 500; opacity: 0.8; }
.trailer-modal { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, 0.88); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.trailer-modal[hidden] { display: none; }
.trailer-box { width: min(100%, 1100px); }
.trailer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: #fff; }
.trailer-head h2 { font-size: 1rem; margin: 0; font-family: var(--font-body, inherit); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trailer-close { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.trailer-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer-yt { display: inline-block; margin-top: 10px; color: #ddd; font-size: 0.85rem; }
.btn.trailer-btn, .btn.trailer-btn:hover, .btn.trailer-btn:focus-visible { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); text-decoration: none; }
.btn.trailer-btn:hover { filter: brightness(1.1); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }

/* Premiações */
.award-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 18px; }
@media (min-width: 760px) { .award-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1180px) { .award-grid { grid-template-columns: 1fr 1fr 1fr; } }
.award-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px; color: var(--text); text-decoration: none; margin: 0; }
.award-card:hover { text-decoration: none; border-color: var(--text-3); }
.award-icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.award-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.award-body strong { font-family: var(--font-display); font-size: 1.08rem; }
.award-body small { color: var(--text-2); font-size: 0.82rem; line-height: 1.35; }
.award-meta { color: var(--text-3); font-size: 0.78rem; margin-top: 2px; }
.award-seen { font-size: 0.85rem; margin-top: 6px; }
.award-seen b { color: var(--accent); font-family: var(--font-display); font-size: 1.05rem; }
.award-card .progress { margin-top: 4px; }
.award-go { align-self: center; color: var(--text-3); font-size: 1.4rem; }
.back-up { margin-bottom: 2px; }
.back-up a { color: var(--text-2); font-weight: 600; }
.noposter.person { background: linear-gradient(160deg, var(--bg-2), var(--bg)); font-style: italic; }
.award-blocks .card-role { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-height: 1.3; }
.award-person .poster img { object-fit: cover; object-position: center top; }

/* Meu comentário */
.review-box { margin-top: 14px; }
.review-field textarea { width: 100%; min-height: 84px; resize: vertical; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; font-size: 0.95rem; line-height: 1.45; }
.review-field textarea:focus { outline: none; border-color: var(--accent); }
.review-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; min-height: 32px; }
.review-info { font-size: 0.78rem; }
.review-box.invite .review-field textarea { animation: review-invite 1.6s ease-out 1; }
@keyframes review-invite { 0% { box-shadow: 0 0 0 0 rgba(240, 182, 70, 0.75); border-color: var(--accent); } 100% { box-shadow: 0 0 0 12px rgba(240, 182, 70, 0); } }
.sheet .review-box { margin: 4px 0 12px; }
