/* Anything with the hidden attribute stays hidden, even if a class or id sets display. */
[hidden] { display: none !important; }

:root {
	color-scheme: dark;
	--bg: #0e1014;
	--panel: #171a21;
	--panel-border: rgba(255, 255, 255, 0.08);
	--panel-strong: rgba(255, 255, 255, 0.18);
	--text: #f2f2f4;
	--muted: #9aa0ab;
	--accent: #e94560;
	--accent-dim: rgba(233, 69, 96, 0.15);
	--gold: #f5b942;
	--danger: #ff6b6b;
	--success: #2ecc9a;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: inherit; }

/* Easter egg — see isAmy()/spawnDucks() in index.html */
.duck-easter-egg {
	position: fixed;
	bottom: -60px;
	z-index: 999;
	pointer-events: none;
	animation-name: duck-float-up;
	animation-timing-function: ease-in;
	animation-fill-mode: forwards;
}

@keyframes duck-float-up {
	0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 1; }
	60% { opacity: 1; }
	100% { transform: translateY(-115vh) translateX(24px) rotate(12deg); opacity: 0; }
}

.site-watermark {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 8px;
	text-align: center;
	font-size: 0.7rem;
	letter-spacing: 0.05em;
	color: var(--muted);
	opacity: 0.6;
	pointer-events: none;
	z-index: 20;
}

/* ── Page wrappers ── */
.page { margin: 0 auto; padding: 40px 16px 60px; }
.page--narrow { max-width: 460px; }
.page--wide { max-width: 960px; }

.card {
	background: var(--panel);
	border: 1px solid var(--panel-border);
	border-radius: 20px;
	padding: 32px;
}

.panel-header { margin-bottom: 24px; }

.panel-header h1 {
	margin: 0;
	font-size: clamp(1.8rem, 6vw, 2.4rem);
	letter-spacing: -0.03em;
}

.subtitle { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* ── Buttons ── */
.btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 13px 18px;
	border-radius: 999px;
	border: none;
	background: var(--accent);
	color: #fff;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
}

.btn:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.5; cursor: default; }

.btn--ghost { background: transparent; border: 1px solid var(--panel-strong); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); opacity: 1; }

.btn-sm {
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid var(--panel-strong);
	background: transparent;
	color: var(--text);
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}
.btn-sm:hover { background: rgba(255, 255, 255, 0.06); }
.btn-sm--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-sm--accent:hover { background: var(--accent); opacity: 0.88; }

/* ── Forms ── */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }

label {
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--muted);
}

input[type="text"],
input[type="search"],
input[type="number"] {
	width: 100%;
	padding: 11px 16px;
	border: 1px solid var(--panel-strong);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.03);
	color: var(--text);
	font-family: inherit;
	font-size: 1rem;
	outline: none;
}

input:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ── Errors ── */
.error-msg {
	margin-bottom: 16px;
	padding: 12px 16px;
	border-radius: 10px;
	background: rgba(255, 107, 107, 0.1);
	border: 1px solid rgba(255, 107, 107, 0.35);
	color: var(--danger);
	font-size: 0.88rem;
}

.empty-state {
	color: var(--muted);
	font-style: italic;
	font-size: 0.9rem;
	text-align: center;
	padding: 30px 0;
}

/* ── App shell / tabs ── */
.app-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 10px;
}

.app-title { margin: 0; font-size: 1.4rem; letter-spacing: -0.02em; }

.logout-btn {
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid var(--panel-strong);
	background: transparent;
	color: var(--muted);
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
}
.logout-btn:hover { background: rgba(255, 255, 255, 0.06); }

.tab-bar {
	display: flex;
	gap: 4px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--panel-border);
	overflow-x: auto;
	position: sticky;
	top: 0;
	background: var(--bg);
	z-index: 5;
}

.tab-btn {
	padding: 10px 16px;
	border: none;
	background: transparent;
	color: var(--muted);
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}

.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }

/* ── Search results / poster grid ── */
.poster-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 16px;
}

.poster-card {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--panel-border);
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.poster-img {
	width: 100%;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	background: rgba(255, 255, 255, 0.06);
	display: block;
}

.poster-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

.poster-title { font-size: 0.86rem; font-weight: 700; line-height: 1.3; }
.poster-watched-date { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }

.poster-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.72rem;
	color: var(--muted);
}

.type-badge {
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.65rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}
.type-badge--movie { background: rgba(245, 185, 66, 0.18); color: var(--gold); }
.type-badge--tv { background: rgba(46, 204, 154, 0.18); color: var(--success); }

/* Public TMDB score — deliberately neutral (grey, labelled) so it reads as "everyone's"
   score, distinct from your own accent-coloured stars in .my-rating-badge. */
.rating-badge {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--text);
	font-size: 0.65rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	line-height: inherit;
}
.rating-src { color: var(--muted); }
.rating-badge--lg { font-size: 0.82rem; padding: 4px 10px; }

/* Your own 1-5 stars: accent colour, filled + empty stars, no pill */
.my-rating-badge {
	display: inline-flex;
	color: var(--accent);
	font-size: 0.8rem;
	letter-spacing: 1px;
	line-height: 1;
}
.my-rating-empty { color: rgba(255, 255, 255, 0.18); }

.poster-ratings { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

/* Card tag row (type + Series ended): pills sized to their text, left-aligned, so they
   line up with the ratings row below instead of stretching across the card. */
.poster-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.poster-tags .status-badge { margin-left: 0; }
.poster-tags > span, .poster-ratings .rating-badge { line-height: 1.5; }

.added-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid var(--panel-strong);
	color: var(--muted);
	cursor: pointer;
}
.added-badge:hover { border-color: var(--danger); color: var(--danger); }

.status-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--muted);
	font-size: 0.65rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.provider-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 9px;
	border-radius: 999px;
	background: rgba(46, 204, 154, 0.15);
	color: var(--success);
	font-size: 0.7rem;
	font-weight: 800;
}
.provider-badge--paid { background: rgba(255, 255, 255, 0.08); color: var(--muted); }

.poster-card .btn-sm { margin-top: auto; }

.entry-poster-card { cursor: pointer; }
.entry-poster-card:hover { border-color: var(--panel-strong); }
.entry-poster-card .progress-bar,
.entry-poster-card .progress-label { margin-top: 2px; }

.entry-title { font-size: 1rem; font-weight: 700; }
.entry-meta { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

.entry-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Filter bar ── */
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }

.filter-btn {
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid var(--panel-strong);
	background: transparent;
	color: var(--muted);
	font-family: inherit;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
}
.filter-btn:hover { background: rgba(255, 255, 255, 0.06); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.filter-select {
	appearance: none;
	-webkit-appearance: none;
	padding: 6px 30px 6px 14px;
	border-radius: 999px;
	border: 1px solid var(--panel-strong);
	background-color: var(--panel);
	/* Custom chevron, inset from the edge — the native arrow browsers draw
	   sits right against the box edge, which crowds the fully-rounded pill
	   corner and looks off. */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%239aa0ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 12px;
	color: var(--text);
	font-family: inherit;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--accent); }

/* Watchlist/Watched: search + Sort + a Filters button in view, the rest in a
   collapsible panel (built by entryFilterBarMarkup() in index.html). */
.entry-filter-bar { display: block; }
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.filter-toggle.active { background: var(--accent-dim); border-color: var(--accent); color: var(--text); }
.filter-panel {
	display: grid;
	gap: 12px;
	margin-top: 12px;
	padding: 14px;
	border: 1px solid var(--panel-border);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.02);
}
/* display: grid above would otherwise override the hidden attribute */
.filter-field { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; }
.filter-field .filter-select { justify-self: start; min-width: 180px; }
.filter-label { font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-panel .toggle-switch,
.filter-reset-btn { justify-self: start; }

/* Same look as the plain text/search inputs elsewhere (e.g. the Search tab's
   box) — not the rounded-pill style used for the filter buttons/selects next
   to it, which reads as oversized once stretched full-width on mobile. */
input.filter-search-input {
	flex: 1 1 160px;
	min-width: 120px;
	width: auto;
}

.toggle-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-slider {
	position: relative;
	width: 34px;
	height: 20px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid var(--panel-strong);
	border-radius: 999px;
	flex-shrink: 0;
	transition: background 0.15s, border-color 0.15s;
}
.toggle-slider::before {
	content: "";
	position: absolute;
	top: 1px;
	left: 1px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--muted);
	transition: transform 0.15s, background 0.15s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent-dim); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(14px); background: var(--accent); }
.toggle-label { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: none; letter-spacing: 0; }

/* ── Entry detail modal ── */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 50;
}

.modal-box {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: 85vh;
	overflow-y: auto;
	background: var(--panel);
	border: 1px solid var(--panel-border);
	border-radius: 20px;
	padding: 28px;
}

.modal-close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: var(--muted);
	font-size: 1.1rem;
	cursor: pointer;
	line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal-header { display: flex; gap: 16px; margin-bottom: 16px; padding-right: 40px; }

.entry-extra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -6px 0 14px; min-height: 22px; }
.time-remaining { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.info-updated { font-size: 0.72rem; color: var(--muted); }

.modal-poster {
	width: 110px;
	flex-shrink: 0;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.06);
}

.progress-bar {
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;
}
.progress-bar-fill { height: 100%; background: var(--accent); }

.progress-label { font-size: 0.72rem; color: var(--muted); }

/* Stars */
.stars { display: flex; gap: 0; margin: 0 -6px; }
.star {
	font-size: 1.2rem;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.2);
	background: none;
	border: none;
	padding: 8px 6px;
	line-height: 1;
}
.star.filled { color: var(--accent); } /* matches .my-rating-badge — accent = your rating */
.stars-label { margin-top: 12px; font-size: 0.75rem; font-weight: 700; color: var(--muted); }

.entry-genres { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }

/* Lists row in the detail modal */
.lists-label { display: flex; align-items: center; gap: 8px; }
.link-btn {
	background: none;
	border: none;
	padding: 0;
	color: var(--accent);
	font: inherit;
	cursor: pointer;
}
.list-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.list-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid var(--panel-strong);
	background: transparent;
	color: var(--muted);
	font-family: inherit;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
}
.list-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.list-chip--new { border-style: dashed; }
.list-chip--edit { cursor: default; color: var(--text); }
.list-chip-icon {
	background: none;
	border: none;
	padding: 2px 4px;
	color: var(--muted);
	font: inherit;
	cursor: pointer;
}
.list-chip-icon:hover { color: var(--text); }
input.list-chip-input { width: 160px; padding: 5px 12px; border-radius: 999px; font-size: 0.78rem; }

/* Watched date row in the detail modal */
.watched-date-row { margin: 4px 0 12px; }
.watched-date-btn { font-size: 0.9rem; }
.watched-date-input {
	padding: 6px 10px;
	border-radius: 10px;
	border: 1px solid var(--panel-strong);
	background: rgba(255, 255, 255, 0.03);
	color: var(--text);
	font-family: inherit;
	color-scheme: dark;
}

textarea.notes-input {
	width: 100%;
	min-height: 50px;
	padding: 8px 12px;
	border-radius: 10px;
	border: 1px solid var(--panel-strong);
	background: rgba(255, 255, 255, 0.03);
	color: var(--text);
	font-family: inherit;
	font-size: 0.85rem;
	resize: vertical;
}

/* Episodes */
.episode-toggle {
	background: none;
	border: none;
	color: var(--accent);
	font-family: inherit;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
	padding: 0;
	text-align: left;
}

.season-group { margin-top: 8px; border-top: 1px solid var(--panel-border); padding-top: 8px; }

.season-header {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	padding: 4px 0;
}

.season-toggle-icon { color: var(--muted); font-size: 0.7rem; flex-shrink: 0; }

.season-title {
	flex: 1;
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 800;
	color: var(--muted);
}

.season-count { text-transform: none; letter-spacing: 0; font-weight: 700; }

.season-episodes { padding: 4px 0 6px 20px; }

.episode-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 5px 0;
	font-size: 0.82rem;
}

.episode-row input[type="checkbox"] { flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--accent); }
.episode-row.watched .episode-name { color: var(--muted); text-decoration: line-through; }
.episode-num { color: var(--muted); flex-shrink: 0; width: 26px; }

/* Stats */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
}

.stat-card {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--panel-border);
	border-top: 2px solid var(--accent);
	border-radius: 16px;
	padding: 20px;
	text-align: center;
}

.stat-value {
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--text);
	margin-bottom: 6px;
}

.stat-label {
	font-size: 0.78rem;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 700;
}

.stat-card--highlight { border-top-color: var(--gold); }
.genre-rank { list-style: none; margin: 10px 0 0; padding: 0; text-align: left; }
.genre-rank li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-weight: 700; }
.genre-count { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.stat-highlight-poster {
	width: 64px;
	margin: 0 auto 10px;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.06);
}

/* Upcoming */
.upcoming-list { display: flex; flex-direction: column; gap: 10px; }

.upcoming-item {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0 10px;
	padding: 12px 16px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--panel-border);
	border-radius: 12px;
}

.upcoming-date {
	font-size: 0.78rem;
	font-weight: 800;
	color: var(--gold);
	white-space: nowrap;
}

.upcoming-title { font-weight: 700; font-size: 0.9rem; }
.upcoming-detail { font-size: 0.78rem; color: var(--muted); }
.upcoming-item > div:first-child { flex: 1; min-width: 0; }

.upcoming-more { flex-basis: 100%; margin-top: 6px; font-size: 0.78rem; }
.upcoming-more summary { cursor: pointer; color: var(--accent); font-weight: 700; width: fit-content; }
.upcoming-more-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.upcoming-more-row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	color: var(--muted);
	padding-top: 4px;
	border-top: 1px solid var(--panel-border);
}

/* ── Social: Friends tab, profiles, recommend sheet ── */
.app-user-btn {
	background: none;
	border: none;
	padding: 0;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	cursor: pointer;
	border-bottom: 1px dashed transparent;
}
.app-user-btn:hover { border-bottom-color: var(--muted); }
.tab-btn { position: relative; }
.tab-badge {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 800;
	line-height: 18px;
	text-align: center;
	animation: badge-pop 0.3s ease-out;
}
@keyframes badge-pop { from { transform: scale(0.4); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .tab-badge { animation: none; } }
.pill-count {
	display: inline-block;
	min-width: 18px;
	margin-left: 5px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-size: 0.7rem;
	line-height: 18px;
}
.filter-btn.active .pill-count { background: #fff; color: var(--accent); }
.request-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: -4px 0 14px;
	padding: 10px 12px;
	border-radius: 14px;
	background: rgba(233, 69, 96, 0.14);
	border: 1px solid rgba(233, 69, 96, 0.4);
	font-size: 0.9rem;
}
.filter-btn--me { margin-left: auto; }
.status-pill {
	display: inline-flex;
	align-items: center;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid var(--panel-border);
	color: var(--muted);
	font-size: 0.8rem;
	font-weight: 700;
}
.btn-sm--danger { color: var(--danger); border-color: rgba(255, 255, 255, 0.12); }
.user-link {
	background: none;
	border: none;
	padding: 0;
	color: var(--text);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.user-link:hover { color: var(--accent); }
.social-heading {
	margin: 18px 0 8px;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
}
.social-row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 10px 0;
	border-bottom: 1px solid var(--panel-border);
	cursor: pointer;
}
.social-row--new { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
.social-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
.social-row-meta { color: var(--muted); font-size: 0.8rem; }
.mini-poster { width: 46px; height: 69px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.rec-message { font-style: italic; color: var(--text); }
.load-more { margin: 14px auto 0; display: block; }
.people-search { width: 100%; margin-bottom: 8px; }
.person-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--panel-border);
}
.person-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.person-name { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.profile-back { margin-bottom: 12px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-avatar {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--accent);
	color: #fff;
	font-size: 1.4rem;
	font-weight: 800;
	flex-shrink: 0;
}
.profile-name { font-size: 1.2rem; font-weight: 800; }
.profile-avatar--owner { position: relative; box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--gold), 0 6px 20px rgba(245, 185, 66, 0.35); }
.owner-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	background: linear-gradient(90deg, rgba(245, 185, 66, 0.22), rgba(233, 69, 96, 0.18));
	border: 1px solid rgba(245, 185, 66, 0.45);
	color: var(--gold);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	vertical-align: middle;
	white-space: nowrap;
}
.profile-actions { margin-top: 12px; }
.profile-settings { margin-top: 14px; }
.own-profile-note { margin: 12px 0 0; }
label.toggle-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; font-size: 0.9rem; font-weight: 400; letter-spacing: normal; text-transform: none; color: var(--text); cursor: pointer; }
.toggle-row input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.profile-stats div { display: flex; flex-direction: column; padding: 10px 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.profile-stats strong { font-size: 1.2rem; }
.profile-stats span { font-size: 0.75rem; color: var(--muted); }
.poster-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.strip-item {
	flex: 0 0 96px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	background: none;
	border: none;
	padding: 0;
	color: var(--text);
	font: inherit;
	text-align: left;
	cursor: pointer;
	scroll-snap-align: start;
}
.strip-poster { width: 96px; height: 144px; border-radius: 8px; object-fit: cover; }
.strip-title { font-size: 0.78rem; font-weight: 700; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.strip-caption { font-size: 0.72rem; color: var(--muted); }
.strip-caption .my-rating-badge { font-size: 0.72rem; }
.trending-row { margin-bottom: 18px; }
.trending-row .social-heading { margin-top: 0; }
.friends-watched { font-size: 0.74rem; color: var(--accent); font-weight: 700; margin-top: 4px; }
.friend-ratings { flex-basis: 100%; font-size: 0.85rem; margin-top: 4px; }
.sheet-extra { margin-top: 8px; font-size: 0.88rem; color: var(--muted); }
.list-members { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.list-share-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.shared-list-grid { display: flex; flex-direction: column; }
.shared-list-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--panel-border); }
.rec-friends { max-height: 220px; overflow-y: auto; padding-left: 8px; margin-bottom: 10px; border-left: 2px solid var(--panel-border); }

.compare-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.compare-table td, .compare-table th { padding: 7px 4px; border-bottom: 1px solid var(--panel-border); }
.compare-table td { width: 40%; font-weight: 700; }
.compare-table td:first-child { text-align: right; }
.compare-table th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; text-align: center; }
.compare-table thead td { color: var(--accent); }

/* ── Wrapped (wrapped.js): full-screen story slides ── */
.wr-banner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	margin: 0 0 18px;
	padding: 16px;
	border: none;
	border-radius: 16px;
	background: linear-gradient(120deg, #e94560, #8a2be2);
	color: #fff;
	font: inherit;
	font-size: 1.05rem;
	font-weight: 800;
	cursor: pointer;
}
.wr-banner span { font-size: 0.9rem; }
.wr-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	color: #fff;
	user-select: none;
	-webkit-user-select: none;
}
.wr-bars { position: absolute; top: 12px; left: 12px; right: 52px; display: flex; gap: 4px; z-index: 2; }
.wr-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); }
.wr-bars .wr-done, .wr-bars .wr-now { background: #fff; }
.wr-close {
	position: absolute;
	top: 4px;
	right: 6px;
	z-index: 2;
	width: 44px;
	height: 44px;
	border: none;
	background: none;
	color: #fff;
	font-size: 1.3rem;
	cursor: pointer;
}
.wr-slide {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 60px max(28px, calc(50vw - 270px)) 40px;
	overflow-y: auto;
	animation: wr-in 0.35s ease-out;
}
@keyframes wr-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wr-slide { animation: none; } }
.wr-g1 { background: linear-gradient(160deg, #e94560 0%, #3a1430 60%, #0e1014 100%); }
.wr-g2 { background: linear-gradient(160deg, #1e3c72 0%, #2a5298 45%, #0e1014 100%); }
.wr-g3 { background: linear-gradient(160deg, #11998e 0%, #0b4d47 55%, #0e1014 100%); }
.wr-g4 { background: linear-gradient(160deg, #f5b942 0%, #a0522d 50%, #0e1014 100%); }
.wr-g5 { background: linear-gradient(160deg, #8a2be2 0%, #3b1166 55%, #0e1014 100%); }
.wr-kicker { margin: 0 0 8px; font-size: 0.9rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.wr-huge { margin: 0 0 16px; font-size: clamp(3rem, 16vw, 5.5rem); line-height: 0.95; letter-spacing: -0.03em; }
.wr-number { font-size: clamp(4rem, 26vw, 8rem); font-weight: 900; line-height: 1; letter-spacing: -0.04em; }
.wr-title { margin: 6px 0 8px; font-size: clamp(1.5rem, 7vw, 2.2rem); line-height: 1.15; }
.wr-sub { margin: 4px 0; font-size: 1.05rem; opacity: 0.85; }
.wr-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.wr-trio div { display: flex; flex-direction: column; padding: 18px 6px; border-radius: 16px; background: rgba(0, 0, 0, 0.22); text-align: center; }
.wr-trio b { font-size: clamp(1.6rem, 8vw, 2.6rem); }
.wr-rank { margin: 6px 0 0; padding-left: 1.3em; font-size: clamp(1.6rem, 8vw, 2.4rem); font-weight: 800; line-height: 1.4; }
.wr-poster { width: 46%; max-width: 220px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; margin: 10px 0; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }
.wr-poster--sm { width: 100%; }
.wr-ph { display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.1); font-size: 2rem; }
.wr-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wr-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; height: 180px; align-items: end; margin-top: 18px; }
.wr-months div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.wr-months i { width: 100%; border-radius: 4px 4px 0 0; background: rgba(255, 255, 255, 0.45); }
.wr-months i.wr-best { background: #f5b942; }
.wr-months b { margin-top: 5px; font-size: 0.7rem; opacity: 0.8; }
.wr-posters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.wr-posters figure { margin: 0; }
.wr-posters img, .wr-posters .wr-ph { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; }
.wr-posters figcaption { margin-top: 4px; font-size: 0.75rem; line-height: 1.25; }
.wr-posters figcaption span { color: #f5b942; }
.wr-board { margin: 10px 0 0; padding: 0; list-style: none; }
.wr-board li { display: flex; justify-content: space-between; padding: 10px 14px; margin-bottom: 6px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); font-size: 1.05rem; }
.wr-board li.wr-me { background: #fff; color: #3b1166; font-weight: 800; }
.wr-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.wr-row { display: flex; gap: 8px; }
.wr-row .wr-btn { flex: 1; }
.wr-btn {
	padding: 14px 18px;
	border: none;
	border-radius: 999px;
	background: #fff;
	color: #3a1430;
	font: inherit;
	font-size: 1rem;
	font-weight: 800;
	cursor: pointer;
}
.wr-btn--ghost { background: rgba(255, 255, 255, 0.14); color: #fff; }
.wr-btn:disabled { opacity: 0.6; }
.wr-link { display: flex; flex-direction: column; gap: 8px; }
.wr-url { width: 100%; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 12px; background: rgba(0, 0, 0, 0.25); color: #fff; font: inherit; font-size: 16px; }
.wr-note { margin: 0; font-size: 0.82rem; opacity: 0.8; }

@media (max-width: 560px) {
	.tab-badge { top: 0; right: -2px; }
	#socialPills { gap: 6px; }
	#socialPills .filter-btn { padding: 9px 11px; }
	.profile-stats { grid-template-columns: repeat(2, 1fr); }
	.page { padding: 24px 12px 40px; }
	.card { padding: 22px 16px; }
	/* Poster stays beside the title (small) so the main actions are in view on open. */
	.modal-poster { width: 84px; }
	.modal-header { gap: 12px; }
	.modal-box { padding: 20px; max-height: 90vh; }

	.poster-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }

	/* Evenly fill the tab bar instead of relying on horizontal scroll */
	.tab-bar { gap: 0; }
	.tab-btn { flex: 1; padding: 10px 2px; font-size: 0.72rem; text-align: center; }

	/* Bigger touch targets (~40px+) for anything meant to be tapped */
	.btn-sm { padding: 10px 14px; min-height: 40px; }
	.filter-btn { padding: 9px 14px; min-height: 40px; }
	.logout-btn { padding: 9px 14px; min-height: 40px; }

	.filter-bar { gap: 8px; }
	.filter-select {
		padding: 9px 30px 9px 14px;
		min-height: 40px;
		font-size: 16px; /* avoid iOS auto-zoom on focus */
	}

	/* Search and Sort share the top row; the search box takes its own line so the
	   Sort select and Filters button sit side by side underneath. */
	.filter-row .filter-search-input { flex: 1 1 100%; min-height: 40px; font-size: 16px; }
	.filter-row .filter-select { flex: 1 1 auto; }
	.filter-toggle { flex: 0 0 auto; }

	/* Panel rows go label-above-control, full width. */
	.filter-field { grid-template-columns: 1fr; gap: 6px; }
	.filter-field .filter-select { width: 100%; }

	.list-chip { padding: 9px 14px; min-height: 40px; }
	.list-chip-input { min-height: 40px; font-size: 16px; }

	textarea.notes-input, .watched-date-input { font-size: 16px; } /* avoid iOS auto-zoom on focus */

	.episode-row { padding: 9px 0; }
	.season-header { padding: 8px 0; }
}

/* ── Tab icons: only shown in the phone bottom bar (below) ── */
.tab-icon { display: none; }

/* ── Search: tappable poster ── */
.poster-open { display: block; padding: 0; border: none; background: none; cursor: pointer; }
.poster-open:disabled { opacity: 0.6; cursor: progress; }

/* ── Watchlist: Continue watching row ── */
.continue-row { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--panel-border); }
.continue-row .social-heading { margin-top: 0; }
.continue-item { flex-basis: 120px; cursor: default; gap: 5px; }
.continue-open { padding: 0; border: none; background: none; cursor: pointer; }
.continue-item .strip-poster { width: 120px; height: 180px; }
.continue-next { width: 100%; margin-top: 2px; }

/* ── Detail modal sections ── */
.modal-primary-actions { margin: 0 0 14px; }
.modal-section { margin-top: 4px; }
.modal-footer { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--panel-border); text-align: center; }
.modal-remove-btn { color: var(--muted); font-size: 0.82rem; padding: 8px 12px; }
.modal-remove-btn:hover { color: var(--danger); }

/* ── Upcoming groups ── */
.upcoming-heading {
	margin: 14px 0 0;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
}
.upcoming-heading:first-child { margin-top: 0; }
.upcoming-when { text-align: right; }
.upcoming-add, .upcoming-when .status-pill { margin-top: 6px; white-space: nowrap; }
.upcoming-rel { font-size: 0.72rem; color: var(--muted); margin-top: 2px; white-space: nowrap; }

/* ── In-app dialog (askDialog) and toast (showToast) — above the Wrapped overlay ── */
.dialog-overlay { z-index: 1100; }
.dialog-box { max-width: 380px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog-msg { margin: 0; font-size: 0.95rem; line-height: 1.5; }
.dialog-input {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--panel-strong);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.03);
	color: var(--text);
	font: inherit;
	font-size: 16px;
}
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dialog-actions .btn-sm--danger { background: var(--danger); border-color: var(--danger); color: #fff; }

.toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	max-width: min(92vw, 420px);
	padding: 12px 18px;
	border-radius: 14px;
	background: #262a33;
	border: 1px solid var(--panel-strong);
	color: var(--text);
	font-size: 0.88rem;
	line-height: 1.4;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	z-index: 1200;
	animation: toast-in 0.18s ease-out;
}
.toast--error { border-color: rgba(255, 107, 107, 0.6); color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ── Phones: tabs become a bottom bar, in thumb reach ── */
@media (max-width: 560px) {
	#app { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
	.tab-bar {
		position: fixed;
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		margin: 0;
		padding: 4px 4px env(safe-area-inset-bottom);
		border-bottom: none;
		border-top: 1px solid var(--panel-border);
		background: rgba(14, 16, 20, 0.96);
		backdrop-filter: blur(8px);
		z-index: 40;
		overflow: visible;
	}
	.tab-btn {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 2px;
		padding: 7px 0 8px;
		min-height: 56px;
		font-size: 0.66rem;
		border-bottom: none;
		border-top: 2px solid transparent;
	}
	.tab-btn.active { border-top-color: var(--accent); border-bottom-color: transparent; }
	.tab-icon { display: block; font-size: 1.25rem; line-height: 1; filter: grayscale(1); opacity: 0.6; }
	.tab-btn.active .tab-icon { filter: none; opacity: 1; }
	.tab-badge { top: 2px; right: calc(50% - 22px); }

	/* The watermark and toast sit above the bottom bar. */
	body:has(#app:not([hidden])) .site-watermark { display: none; }
	.toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ── Landing page (logged out) ─────────────────────────────────────────────
   Static: the preview on the right is an illustration built from CSS, no data. */
.landing {
	position: relative;
	max-width: 1040px;
	margin: 0 auto;
	padding: 56px 20px 88px;
}
.landing::before {
	content: "";
	position: absolute;
	inset: -40px 0 auto;
	height: 560px;
	background:
		radial-gradient(520px 320px at 18% 30%, rgba(233, 69, 96, 0.22), transparent 70%),
		radial-gradient(420px 300px at 85% 20%, rgba(245, 185, 66, 0.10), transparent 70%);
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
	pointer-events: none;
	z-index: -1;
}

.landing-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: 48px;
	align-items: center;
	margin-bottom: 72px;
}
.landing-logo img { display: block; width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 10px 30px rgba(233, 69, 96, 0.35); }
.landing-title {
	margin: 22px 0 0;
	font-size: clamp(2rem, 5.2vw, 3.1rem);
	line-height: 1.08;
	letter-spacing: -0.035em;
	text-wrap: balance;
}
.landing-title span {
	background: linear-gradient(90deg, var(--accent), var(--gold));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.landing-lede { margin: 18px 0 0; max-width: 34em; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.landing-cta { display: flex; gap: 12px; margin-top: 28px; }
.landing-cta .btn { width: auto; min-height: 48px; padding: 13px 26px; }
.landing-trust { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.82rem; }
.landing-trust li::before { content: "✓"; margin-right: 6px; color: var(--success); font-weight: 700; }

/* App illustration */
.landing-preview { perspective: 1200px; }
.lp-window {
	padding: 20px;
	border-radius: 24px;
	background: linear-gradient(180deg, #1b1f28, var(--panel));
	border: 1px solid var(--panel-strong);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
	transform: rotateY(-8deg) rotateX(3deg);
}
.lp-label { margin: 0 0 10px; color: var(--muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.lp-label:not(:first-child) { margin-top: 18px; }
.lp-continue { display: flex; gap: 14px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); }
.lp-continue .lp-poster { width: 64px; flex: none; }
.lp-continue-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.lp-line { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.16); flex: 1; }
.lp-line--title { flex: none; width: 70%; height: 12px; background: rgba(255, 255, 255, 0.32); }
.lp-line--short { max-width: 55%; }
.lp-meta { color: var(--muted); font-size: 0.75rem; }
.lp-progress { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.lp-progress span { display: block; width: var(--p); height: 100%; border-radius: inherit; background: var(--accent); animation: lp-fill 1.4s 0.4s ease-out both; }
@keyframes lp-fill { from { width: 0; } }
.lp-next { align-self: flex-start; padding: 5px 12px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700; }
.lp-upcoming { display: flex; flex-direction: column; gap: 8px; }
.lp-up { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.lp-day { width: 34px; color: var(--gold); font-size: 0.75rem; font-weight: 700; }
.lp-chip { padding: 3px 9px; border-radius: 999px; background: var(--accent-dim); color: var(--accent); font-size: 0.68rem; font-weight: 700; }
.lp-chip--film { background: rgba(245, 185, 66, 0.15); color: var(--gold); }
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.lp-poster { position: relative; aspect-ratio: 2 / 3; border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
.lp-poster--a { background: linear-gradient(160deg, #e94560, #3a1430 70%); }
.lp-poster--b { background: linear-gradient(160deg, #2a5298, #121a33 75%); }
.lp-poster--c { background: linear-gradient(160deg, #11998e, #0b3330 75%); }
.lp-poster--d { background: linear-gradient(160deg, #f5b942, #5a3510 75%); }
.lp-stars { position: absolute; left: 6px; bottom: 6px; color: var(--gold); font-size: 0.62rem; letter-spacing: 1px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }

/* Feature grid */
.landing-section { margin-bottom: 64px; }
.landing-h2 { margin: 0 0 22px; font-size: clamp(1.4rem, 3.4vw, 1.8rem); letter-spacing: -0.02em; }
.landing-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.landing-feature {
	padding: 22px 20px;
	border-radius: 18px;
	background: var(--panel);
	border: 1px solid var(--panel-border);
	transition: transform 0.2s ease, border-color 0.2s ease;
}
.landing-feature:hover { transform: translateY(-3px); border-color: var(--panel-strong); }
.lf-icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-bottom: 14px;
	border-radius: 12px;
	background: var(--accent-dim);
	font-size: 1.3rem;
}
.landing-feature h3 { margin: 0 0 6px; font-size: 1rem; letter-spacing: -0.01em; }
.landing-feature p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.landing-feature em { color: var(--text); font-style: normal; font-weight: 600; }

/* How it works */
.landing-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.landing-steps li {
	counter-increment: step;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 22px 20px;
	border-radius: 18px;
	border: 1px dashed var(--panel-strong);
}
.landing-steps li::before {
	content: counter(step);
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	margin-bottom: 8px;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	font-weight: 800;
	font-size: 0.9rem;
}
.landing-steps span { color: var(--muted); font-size: 0.86rem; line-height: 1.5; }

/* Closing call to action */
.landing-final {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 40px 24px;
	border-radius: 24px;
	text-align: center;
	background: linear-gradient(160deg, rgba(233, 69, 96, 0.16), rgba(23, 26, 33, 0.9) 60%);
	border: 1px solid var(--panel-border);
}
.landing-private { margin: 0; max-width: 30em; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.landing-final-btn { width: auto; min-height: 48px; padding: 13px 30px; }
.landing-signin { margin: 0; color: var(--muted); font-size: 0.85rem; }
.landing-signin a { color: var(--accent); font-weight: 700; text-decoration: none; }

.landing-back {
	margin: 0 0 18px -6px;
	padding: 8px 10px;
	border: none;
	border-radius: 999px;
	background: none;
	color: var(--muted);
	font: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
}
.landing-back:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

/* Entrance: sections rise in one after another. */
#landingScreen:not([hidden]) .landing-hero-copy,
#landingScreen:not([hidden]) .landing-preview,
#landingScreen:not([hidden]) .landing-section,
#landingScreen:not([hidden]) .landing-final { animation: wr-in 0.5s ease-out both; }
#landingScreen .landing-preview { animation-delay: 0.12s; }
#landingScreen .landing-section { animation-delay: 0.22s; }
#landingScreen .landing-final { animation-delay: 0.3s; }

@media (max-width: 900px) {
	.landing-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	.landing { padding: 32px 16px 72px; }
	.landing-hero { grid-template-columns: 1fr; gap: 36px; margin-bottom: 52px; }
	.lp-window { transform: none; max-width: 400px; margin: 0 auto; }
	.landing-steps { grid-template-columns: 1fr; }
	.landing-steps li { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; }
	.landing-steps li::before { margin-bottom: 0; }
	.landing-steps span { flex-basis: 100%; padding-left: 44px; margin-top: -4px; }
	.landing-section { margin-bottom: 48px; }
}
@media (max-width: 560px) {
	.landing-cta { flex-direction: column; }
	.landing-cta .btn, .landing-final-btn { width: 100%; }
	.landing-features { grid-template-columns: 1fr; gap: 10px; }
	.landing-feature { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 16px; }
	.lf-icon { grid-row: span 2; margin: 0; }
	.landing-final { padding: 32px 18px; }
}
@media (prefers-reduced-motion: reduce) {
	#landingScreen *, #landingScreen .lp-progress span { animation: none !important; transition: none !important; }
}

/* ── Badges (Stats → 🏆 Badges, and the profile card) ──────────────────────── */
.stats-grid--badges { display: block; }
.badges:not(.badges--all) .badge-tile--later { display: none; }
.badges-more { width: auto; align-self: center; padding: 11px 24px; }
.badges { --bronze: #cd7f32; --silver: #c4ccd6; display: flex; flex-direction: column; gap: 26px; }

.skeleton {
	border-radius: 16px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 75%);
	background-size: 200% 100%;
	animation: skeleton-shimmer 1.2s linear infinite;
}
@keyframes skeleton-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.badges-summary {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 20px 22px;
	border-radius: 18px;
	background: linear-gradient(135deg, rgba(245, 185, 66, 0.16), rgba(233, 69, 96, 0.10) 60%, rgba(255, 255, 255, 0.02));
	border: 1px solid var(--panel-border);
}
.badges-trophy {
	display: grid;
	place-items: center;
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(245, 185, 66, 0.18);
	font-size: 1.8rem;
	box-shadow: 0 0 0 1px rgba(245, 185, 66, 0.35), 0 8px 24px rgba(245, 185, 66, 0.18);
}
.badges-summary-body { flex: 1; min-width: 0; }
.badges-total { font-size: 1rem; color: var(--muted); }
.badges-total strong { font-size: 1.6rem; color: var(--text); letter-spacing: -0.02em; margin-right: 2px; }
.badges-sub { margin-top: 8px; color: var(--muted); font-size: 0.82rem; }

.badge-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.badge-bar span { display: block; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--gold)); animation: badge-bar-fill 0.9s 0.15s ease-out both; }
.badge-bar--big { height: 8px; margin-top: 10px; }
@keyframes badge-bar-fill { from { width: 0; } }

.badges-section { animation: wr-in 0.4s ease-out both; }
.badges-h {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin: 0 0 12px;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}
.badges-h span { font-size: 0.78rem; letter-spacing: 0.02em; color: var(--muted); font-weight: 600; text-transform: none; }

/* Medal: emoji in a ring; the ring is the tier colour, filled to progress on locked ones. */
.medal {
	--size: 64px;
	--ring: var(--bronze);
	position: relative;
	display: grid;
	place-items: center;
	flex: none;
	width: var(--size);
	height: var(--size);
	border-radius: 50%;
	background: conic-gradient(var(--ring) calc(var(--fill) * 1%), rgba(255, 255, 255, 0.08) 0);
}
.medal::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #262b36, #14171d 70%); }
.medal span { position: relative; font-size: calc(var(--size) * 0.44); line-height: 1; }
.medal--t1 { --ring: var(--bronze); }
.medal--t2 { --ring: var(--silver); }
.medal--t3 { --ring: var(--gold); }
.medal--t4 { --ring: var(--accent); }
.medal:not(.medal--locked) { box-shadow: 0 0 18px color-mix(in srgb, var(--ring) 35%, transparent); }
.medal--locked { --ring: rgba(255, 255, 255, 0.35); }
.medal--locked span { filter: grayscale(1); opacity: 0.45; }
.medal--sm { --size: 44px; }
.medal--sm::before { inset: 3px; }

.badges-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.badge-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 18px 12px 16px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--panel-border);
	text-align: center;
}
.badge-tile .medal { margin-bottom: 6px; }
.badge-tile--locked { background: transparent; border-style: dashed; }
.badge-tile--locked .badge-name { color: var(--muted); }
.badge-tile--new { border-color: var(--gold); }
.badge-tile--new .medal { animation: badge-pop 0.5s ease-out both; }
.badge-new {
	position: absolute;
	top: 8px;
	right: 8px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--gold);
	color: #1a1205;
	font-size: 0.64rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.badge-name { font-weight: 800; font-size: 0.9rem; letter-spacing: -0.01em; }
.badge-desc { color: var(--muted); font-size: 0.76rem; line-height: 1.4; }
.badge-when { margin-top: auto; padding-top: 6px; color: var(--success); font-size: 0.72rem; font-weight: 700; }
.badge-tile .badge-bar { width: 100%; margin-top: auto; }
.badge-count { color: var(--muted); font-size: 0.72rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.badges-next { display: flex; flex-direction: column; gap: 10px; }
.badge-next {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--panel-border);
}
.badge-next-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.badge-next-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }

/* Friends profile card */
.badges-profile { --bronze: #cd7f32; --silver: #c4ccd6; }
.badges-profile-count { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }
.badges-profile-count strong { color: var(--text); font-size: 1.2rem; }
.badges-profile-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.badges-profile-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; flex: none; text-align: center; font-size: 0.7rem; font-weight: 700; color: var(--muted); }

@media (max-width: 760px) {
	.badges-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
	.skeleton, .badge-bar span, .badges-section, .badge-tile--new .medal { animation: none; }
}

/* ── Upcoming: List / Calendar switch, month grid, calendar-app sheet ─────── */
.upcoming-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.view-toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--panel-border); }
.view-toggle-btn {
	padding: 7px 16px;
	border: none;
	border-radius: 999px;
	background: transparent;
	color: var(--muted);
	font: inherit;
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}
.view-toggle-btn.active { background: var(--accent); color: #fff; }
.sync-btn { padding: 8px 14px; }
.sync-btn-short { display: none; }

.upcoming-list--calendar { display: block; }
.cal { animation: wr-in 0.3s ease-out both; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cal-title { text-align: center; }
.cal-month { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.cal-sub { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.cal-nav {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--panel-strong);
	background: transparent;
	color: var(--text);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}
.cal-nav:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); }
.cal-nav:disabled { opacity: 0.25; cursor: default; }

.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-weekday { padding: 0 0 4px; text-align: center; color: var(--muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.cal-cell {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
	min-height: 92px;
	padding: 6px;
	border-radius: 12px;
	border: 1px solid var(--panel-border);
	background: rgba(255, 255, 255, 0.02);
	color: var(--text);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.cal-cell--blank { border: none; background: none; cursor: default; }
.cal-cell:hover:not(.cal-cell--blank) { border-color: var(--panel-strong); }
.cal-cell--past { opacity: 0.45; }
.cal-cell--has { background: rgba(255, 255, 255, 0.05); }
.cal-num { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.cal-cell--has .cal-num { color: var(--text); }
.cal-cell--today .cal-num {
	display: inline-grid;
	place-items: center;
	width: 24px;
	height: 24px;
	margin: -3px 0 0 -3px;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
}
.cal-cell--selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-dim); }
.cal-thumbs { display: flex; gap: 3px; align-items: flex-end; flex: 1; }
.cal-thumb { width: calc(50% - 2px); max-width: 34px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.cal-thumb--blank { display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); font-size: 0.8rem; }
.cal-more { align-self: center; color: var(--muted); font-size: 0.66rem; font-weight: 800; }
.cal-dot { display: none; }

.cal-day { margin-top: 18px; }
.cal-day .upcoming-heading { margin-top: 0; }
.cal-event {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	margin-bottom: 8px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--panel-border);
	animation: wr-in 0.25s ease-out both;
}
.cal-event-poster { flex: none; width: 40px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; }
.cal-event-poster--blank { display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); font-size: 1.1rem; }
.cal-event-body { flex: 1; min-width: 0; }
.cal-empty { margin: 4px 0 0; }
.cal-note { margin: 10px 0 0; color: var(--muted); font-size: 0.8rem; }

/* Calendar-app sheet (in the shared modal) */
.sync { display: flex; flex-direction: column; gap: 14px; }
.sync-hero { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-dim); font-size: 1.7rem; }
.sync-title { font-size: 1.2rem; }
.sync-lede { margin: -6px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.sync-options { display: flex; flex-direction: column; gap: 8px; }
.sync-option {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	min-height: 56px;
	padding: 10px 14px;
	border-radius: 14px;
	border: 1px solid var(--panel-border);
	background: rgba(255, 255, 255, 0.04);
	color: var(--text);
	font: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.sync-option:hover { border-color: var(--panel-strong); background: rgba(255, 255, 255, 0.07); }
.sync-option > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sync-option strong { font-size: 0.92rem; }
.sync-option small { color: var(--muted); font-size: 0.76rem; }
.sync-option-icon { font-size: 1.3rem; }
.sync-arrow { color: var(--muted); font-size: 1.3rem; }
.sync-note { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.sync-actions { margin-top: 0; }

@media (max-width: 560px) {
	.cal-grid { gap: 4px; }
	.cal-cell { min-height: 50px; padding: 5px 4px; align-items: center; border-radius: 10px; }
	.cal-cell--today .cal-num { margin: -2px 0 0; }
	.cal-thumbs { display: none; }
	.cal-dot { display: block; min-width: 7px; height: 7px; margin-top: auto; border-radius: 999px; background: var(--accent); }
	.cal-dot:not(:empty) { height: auto; padding: 0 5px; color: #fff; font-size: 0.6rem; font-weight: 800; line-height: 13px; }
	.cal-weekday { font-size: 0.6rem; letter-spacing: 0.02em; }
	.view-toggle-btn { padding: 8px 14px; }
	.upcoming-toolbar { flex-wrap: nowrap; }
	.sync-btn-long { display: none; }
	.sync-btn-short { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
	.cal, .cal-event { animation: none; }
}

/* ── Search: "Recommended for you" ─────────────────────────────────────────── */
.foryou-row { margin-bottom: 22px; }
.foryou-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.foryou-head .social-heading { margin: 0; }
.foryou-off { margin-left: auto; font-size: 0.78rem; color: var(--muted); }
.foryou-dismiss {
	position: absolute; top: 6px; left: 6px; z-index: 1;
	display: grid; place-items: center; width: 26px; height: 26px; padding: 0;
	border: none; border-radius: 50%; background: rgba(0, 0, 0, 0.62); color: #fff;
	font: inherit; font-size: 0.8rem; line-height: 1; cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.foryou-dismiss:hover:not(:disabled) { background: rgba(0, 0, 0, 0.85); }
.discover-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.discover-chip {
	padding: 8px 14px; border: 1px solid var(--panel-strong); border-radius: 999px;
	background: transparent; color: var(--text); font: inherit; font-size: 0.88rem; cursor: pointer;
}
.discover-chip:hover { border-color: var(--accent); }
.discover-chip::after { content: " ▾"; color: var(--muted); }
.discover-chip--open { background: var(--accent-dim); border-color: var(--accent); }
.discover-chip--open::after { content: " ▴"; }
.discover-empty { margin: 0 0 16px; text-align: left; }
.foryou-head .social-heading::before { content: "✨ "; }
.foryou-sub { color: var(--muted); font-size: 0.78rem; }
.foryou-sub strong { color: var(--text); }
.foryou-strip .strip-item { flex-basis: 112px; position: relative; }
.foryou-strip .strip-poster { width: 112px; height: 168px; }
.foryou-item { animation: wr-in 0.35s ease-out both; animation-delay: calc(var(--n) * 40ms); }
.foryou-open { position: relative; display: block; padding: 0; border: none; background: none; border-radius: 10px; cursor: pointer; overflow: hidden; }
.foryou-open .strip-poster { display: block; transition: transform 0.2s ease; }
.foryou-open:hover .strip-poster { transform: scale(1.04); }
.foryou-score {
	position: absolute;
	left: 6px;
	bottom: 6px;
	padding: 2px 7px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.7);
	color: var(--gold);
	font-size: 0.68rem;
	font-weight: 800;
	backdrop-filter: blur(4px);
}
.foryou-add {
	position: absolute;
	top: 6px;
	right: 6px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	font: inherit;
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
	transition: transform 0.15s ease, background 0.15s ease;
}
.foryou-add:hover:not(:disabled) { transform: scale(1.08); }
.foryou-add:disabled { cursor: default; }
.foryou-item--added .foryou-add { background: var(--success); animation: badge-pop 0.3s ease-out; }
.foryou-because { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.foryou-why { margin-top: 10px; color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.foryou-why strong { color: var(--text); }
.foryou-overview { margin: 14px 0 0; color: var(--text); opacity: 0.88; font-size: 0.9rem; line-height: 1.55; }
.foryou-empty {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	border-radius: 16px;
	border: 1px dashed var(--panel-strong);
	background: linear-gradient(135deg, rgba(233, 69, 96, 0.08), transparent 70%);
}
.foryou-empty-icon { font-size: 1.6rem; }
.foryou-empty div { display: flex; flex-direction: column; gap: 3px; }
.foryou-empty strong { font-size: 0.92rem; }
.foryou-empty span { color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.strip-poster.skeleton { display: block; }
@media (prefers-reduced-motion: reduce) {
	.foryou-item, .foryou-item--added .foryou-add { animation: none; }
	.foryou-open .strip-poster { transition: none; }
}

/* ── Import history (import.js) — builds on the .sync sheet ─────────────── */
.imp-back { align-self: flex-start; }
.imp-head { display: flex; align-items: center; gap: 12px; }
.imp-head-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-dim); font-size: 1.5rem; }
.imp-file { color: var(--muted); font-size: 0.8rem; margin-top: 2px; word-break: break-all; }
.imp-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text); font-size: 0.88rem; line-height: 1.5; }
.imp-steps li::marker { color: var(--accent); font-weight: 700; }
.imp-template { align-self: flex-start; font-size: 0.85rem; }
.imp-drop {
	position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px;
	border: 1.5px dashed var(--panel-strong); border-radius: 14px; background: rgba(255, 255, 255, 0.03);
	text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.imp-drop:hover, .imp-drop--over, .imp-drop:focus-within { border-color: var(--accent); background: var(--accent-dim); }
.imp-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.imp-drop-icon { font-size: 1.8rem; }
.imp-drop small { color: var(--muted); }
.imp-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 107, 107, 0.12); color: var(--danger); font-size: 0.85rem; }
.imp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
.imp-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--panel-border); animation: wr-in 0.35s ease-out both; }
.imp-stats strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.imp-stats span { color: var(--muted); font-size: 0.75rem; text-align: center; }
.imp-choice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.88rem; }
.imp-sample, .imp-unmatched { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--panel-border); border-radius: 12px; overflow: hidden; }
.imp-sample li, .imp-unmatched li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 0.86rem; }
.imp-sample li + li, .imp-unmatched li + li { border-top: 1px solid var(--panel-border); }
.imp-sample-title, .imp-unmatched li > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-sample small, .imp-unmatched small { color: var(--muted); }
.imp-sample-meta { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.imp-sample-more { justify-content: center; color: var(--muted); font-size: 0.8rem !important; }
.imp-unmatched { max-height: 260px; overflow-y: auto; }
.imp-unmatched .btn-sm { flex: none; }
.imp-center { text-align: center; justify-content: center; }
.imp-progress-ring {
	--p: 0; align-self: center; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%;
	background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0);
}
.imp-progress-ring span { display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%; background: var(--panel); font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.imp .badge-bar span { animation: none; transition: width 0.4s ease-out; }
.imp-done { align-self: center; animation: badge-pop 0.5s ease-out both; }
.imp-nudge, .settings-import {
	display: flex; align-items: center; gap: 12px; width: 100%; max-width: 460px; margin: 4px auto 0; padding: 14px 16px;
	border: 1px solid var(--panel-border); border-radius: 14px; background: var(--panel); color: var(--text);
	font: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s;
}
.settings-import { max-width: none; margin: 0 0 8px; }
.poster-grid > .empty-state, .poster-grid > .imp-nudge { grid-column: 1 / -1; }
.imp-nudge:hover, .settings-import:hover { border-color: var(--accent); }
.imp-nudge > span:first-child { font-size: 1.5rem; }
.imp-nudge > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.imp-nudge small { color: var(--muted); font-size: 0.78rem; }
@media (prefers-reduced-motion: reduce) {
	.imp-stats > div, .imp-done { animation: none; }
	.imp .badge-bar span { transition: none; }
}

/* ── Cast & crew, People row, person page (people.js) ─────────────────── */
.modal-cast:empty { display: none; }
.modal-cast { margin-top: 14px; }
.cast-crew { font-size: 0.88rem; color: var(--muted); margin: 4px 0 8px; }
.cast-link { color: var(--text); font-weight: 600; }
.cast-strip, .people-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.cast-item {
	flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0;
	border: 0; background: none; color: var(--text); font: inherit; text-align: center; cursor: pointer; scroll-snap-align: start;
}
.cast-face, .person-face, .person-photo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: var(--panel-strong); flex: none; }
.person-face--blank { display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 0.95rem; }
.cast-item:hover .cast-face { box-shadow: 0 0 0 2px var(--accent); }
.cast-name { font-size: 0.74rem; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cast-role { font-size: 0.68rem; color: var(--muted); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.people-row { margin-bottom: 18px; }
.person-chip {
	flex: none; display: flex; align-items: center; gap: 10px; min-width: 200px; max-width: 260px; padding: 8px 14px 8px 8px;
	border: 1px solid var(--panel-border); border-radius: 40px; background: rgba(255, 255, 255, 0.04); color: var(--text);
	font: inherit; text-align: left; cursor: pointer; scroll-snap-align: start; transition: border-color 0.15s;
}
.person-chip:hover { border-color: var(--accent); }
.person-chip .person-face { width: 44px; height: 44px; }
.person-chip-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.person-chip-body strong { font-size: 0.9rem; }
.person-chip-body small { color: var(--muted); font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-header { margin-bottom: 16px; animation: wr-in 0.3s ease-out both; }
.person-back { margin-bottom: 12px; }
.person-head { display: flex; gap: 16px; align-items: flex-start; }
.person-head .person-photo { width: 96px; height: 96px; font-size: 1.6rem; }
.person-head-body { flex: 1; min-width: 0; }
.person-name { margin: 0; }
.person-meta { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.person-bio { margin: 10px 0 0; font-size: 0.86rem; line-height: 1.55; color: var(--text); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.person-bio--open { display: block; }
.person-more { margin-top: 4px; font-size: 0.82rem; }
.person-tabs { margin-top: 16px; }
.person-role { font-size: 0.75rem; color: var(--muted); margin: 2px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) {
	.person-head .person-photo { width: 72px; height: 72px; }
	.person-chip { min-width: 180px; }
}
@media (prefers-reduced-motion: reduce) { .person-header { animation: none; } }

/* ── Recommended for you: rate tile and quick-rating sheet ───────────── */
.foryou-rate {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; aspect-ratio: 2 / 3;
	border: 1.5px dashed var(--panel-strong); border-radius: 10px; background: rgba(245, 185, 66, 0.06); color: var(--text);
	font: inherit; font-size: 0.8rem; text-align: center; padding: 8px; cursor: pointer; transition: border-color 0.15s;
}
.foryou-rate:hover { border-color: var(--gold); }
.foryou-rate > span { font-size: 1.6rem; }
.foryou-rate small { color: var(--muted); }
.rate-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.rate-row { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 12px; transition: background 0.2s; }
.rate-row--done { background: rgba(46, 204, 154, 0.08); }
.rate-poster { width: 40px; height: 60px; border-radius: 6px; object-fit: cover; flex: none; }
.rate-body { flex: 1; min-width: 0; }
.rate-title { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rate-stars .star { font-size: 1.5rem; padding: 2px 4px; }

/* ── Notifications settings (notify.js) ─────────────────────────────── */
.notify-settings { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.notify-settings .toggle-row span { display: flex; flex-direction: column; gap: 2px; }
.notify-settings .toggle-row small { color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.notify-device { padding: 12px 14px !important; border: 1px solid var(--panel-border); border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.notify-test { align-self: flex-start; font-size: 0.82rem; margin: 2px 0 6px; }
.notify-kinds { display: flex; flex-direction: column; padding-left: 4px; transition: opacity 0.2s; }
.notify-kinds--off { opacity: 0.55; }
.notify-note { margin: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
