/* Velniro Discover: the Mac app's look on the web. Colors are tokens on :root, redone for dark mode. */
@font-face { font-family: "Rubik"; src: url("../assets/fonts/rubik.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }

/* Velniro's own colors, as in the app icon, the Mac installer and velniro.net: near-black or soft white, with
   white (dark) or ink (light) as the accent. The other accents are choices in Settings → Appearance. */
:root {
  --bg: #f4f4f6; --sidebar: rgba(234, 234, 238, .82); --surface: #ffffff; --surface-2: #ebebef; --line: rgba(16, 17, 22, .09);
  --text: #101116; --muted: #5f6068; --shade: rgba(244, 244, 246, 1); --glass: rgba(255, 255, 255, .62); --glass-line: rgba(16, 17, 22, .1);
  --accent: #101116; --on-accent: #ffffff; --star: #e3a008; --danger: #c62f3f;
  --radius: 14px; --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Rubik, Roboto, sans-serif;
  --display: "SF Pro Rounded", Rubik, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-accent="violet"] { --accent: #6e40b5; }
:root[data-accent="blue"] { --accent: #007aff; }
:root[data-accent="mint"] { --accent: #00a29b; }
:root[data-accent="rose"] { --accent: #e0284f; }
:root[data-accent="orange"] { --accent: #d97a00; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f13; --sidebar: rgba(22, 23, 28, .82); --surface: #16171c; --surface-2: #1f2026; --line: rgba(255, 255, 255, .08);
    --text: #f2f2f4; --muted: #9b9ca5; --shade: rgba(14, 15, 19, 1); --glass: rgba(255, 255, 255, .08); --glass-line: rgba(255, 255, 255, .13);
    --accent: #f2f2f4; --on-accent: #0e0f13; --star: #f5c542; --danger: #ff6b7a; color-scheme: dark;
  }
  :root:not([data-theme="light"])[data-accent="violet"] { --accent: #ad7af0; --on-accent: #16101f; }
  :root:not([data-theme="light"])[data-accent="blue"] { --accent: #0a84ff; --on-accent: #fff; }
  :root:not([data-theme="light"])[data-accent="mint"] { --accent: #63e6e2; }
  :root:not([data-theme="light"])[data-accent="rose"] { --accent: #ff375f; --on-accent: #fff; }
  :root:not([data-theme="light"])[data-accent="orange"] { --accent: #ff9f0a; }
}
:root[data-theme="dark"] {
  --bg: #0e0f13; --sidebar: rgba(22, 23, 28, .82); --surface: #16171c; --surface-2: #1f2026; --line: rgba(255, 255, 255, .08);
  --text: #f2f2f4; --muted: #9b9ca5; --shade: rgba(14, 15, 19, 1); --glass: rgba(255, 255, 255, .08); --glass-line: rgba(255, 255, 255, .13);
  --accent: #f2f2f4; --on-accent: #0e0f13; --star: #f5c542; --danger: #ff6b7a; color-scheme: dark;
}
:root[data-theme="dark"][data-accent="violet"] { --accent: #ad7af0; --on-accent: #16101f; }
:root[data-theme="dark"][data-accent="blue"] { --accent: #0a84ff; --on-accent: #fff; }
:root[data-theme="dark"][data-accent="mint"] { --accent: #63e6e2; }
:root[data-theme="dark"][data-accent="rose"] { --accent: #ff375f; --on-accent: #fff; }
:root[data-theme="dark"][data-accent="orange"] { --accent: #ff9f0a; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0; }
.noscript { padding: 40px 16px; text-align: center; }
.icon { flex: none; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Shell */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; width: 232px; flex: none; display: flex; flex-direction: column; gap: 6px;
  padding: 18px 12px; background: var(--sidebar); border-right: 1px solid var(--line); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font: 800 19px var(--display); text-decoration: none; }
.brand img { border-radius: 7px; }
.side-nav, .side-bottom { display: flex; flex-direction: column; gap: 2px; }
.side-bottom { margin-top: auto; gap: 10px; }
.side-link { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: var(--text); opacity: .85; transition: background .15s, opacity .15s; }
.side-link:hover { background: var(--glass); opacity: 1; }
.side-link.on { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); opacity: 1; font-weight: 600; }
.get-app { justify-content: center; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.search { flex: 1; min-width: 0; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-line); color: var(--muted); cursor: text; }
.search:focus-within { border-color: var(--accent); }
.search-input { flex: 1; min-width: 0; width: 100%; height: 100%; border: 0; background: none; outline: none; color: var(--text); }
.search-input::-webkit-search-cancel-button { cursor: pointer; }
.content { flex: 1; outline: none; }
.app-footer { padding: 28px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); }
.app-footer p { margin: 4px 0; }
.tabbar { display: none; }

/* Controls */
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); cursor: pointer; transition: background .15s, transform .1s; }
.icon-button:hover { background: color-mix(in srgb, var(--accent) 16%, var(--glass)); }
.icon-button:active { transform: scale(.94); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 20px; border: 1px solid var(--glass-line); background: var(--surface); text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s, filter .15s; }
.button:hover { filter: brightness(1.06); }
.button:active { transform: scale(.97); }
.button:disabled { opacity: .45; cursor: default; transform: none; }
.button.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.button.glass { background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.button.glass.on { border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); }
.button.danger { color: var(--danger); }
.button.small { height: 34px; padding: 0 14px; font-size: 13px; }
.link-button { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; }
.select { height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--glass-line); background: var(--glass); cursor: pointer; font-weight: 600; font-size: 14px; }
.select option { background: var(--surface); color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chips, .segments { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.segments { gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 14px; border-radius: 16px; border: 1px solid var(--glass-line); background: var(--glass); text-decoration: none; font-size: 13.5px; cursor: pointer; transition: background .15s, color .15s; }
.chip:hover { background: color-mix(in srgb, var(--accent) 14%, var(--glass)); }
.chip.on { background: var(--accent); border-color: transparent; color: var(--on-accent); font-weight: 600; }
.segments .chip { font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 11px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-line); font-size: 12.5px; text-decoration: none; }
.tag.link:hover { color: var(--accent); }
.spinner { display: inline-block; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--glass-line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Pages */
.page { padding: 8px 28px 40px; max-width: 1600px; }
.page.narrow { max-width: 820px; }
.page-head { margin: 10px 0 18px; }
.page-head h1 { font-size: 32px; font-weight: 800; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.notice { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.notice p { margin: 0; }
.notice.quiet { background: transparent; }
.title-loading { display: grid; place-items: center; min-height: 50vh; }

/* Posters */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
.grid-footer { display: flex; justify-content: center; padding: 26px 0 0; }
.grid-footer:empty { display: none; }
.poster { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; text-decoration: none; }
.poster-art { position: relative; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-2); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); transition: transform .2s ease, box-shadow .2s ease; }
.poster-art img { width: 100%; height: 100%; object-fit: cover; }
.poster:hover .poster-art, .poster:focus-visible .poster-art { transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 26px rgba(0, 0, 0, .28); }
.poster:focus-visible { outline: none; }
.poster:focus-visible .poster-art { outline: 3px solid var(--accent); outline-offset: 2px; }
.poster-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; font: 700 14px var(--display); color: var(--muted); }
.poster-title { margin-top: 6px; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poster-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-rating { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 9px; background: rgba(10, 10, 16, .66); color: #fff; font-size: 11.5px; font-weight: 700; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.badge-rating .icon { color: #f5c542; }
.badge-lib { position: absolute; bottom: 8px; left: 8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.skeleton .poster-art, .skeleton-hero { background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface) 50%, var(--surface-2) 70%); background-size: 300% 100%; animation: shimmer 1.4s ease infinite; box-shadow: none; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Rows */
.row { margin: 26px 0 8px; }
.row-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.row-head h2 { font-size: 21px; font-weight: 800; }
.row-more { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.row-arrows { margin-left: auto; display: flex; gap: 8px; }
.row-arrows .icon-button { width: 32px; height: 32px; }
.row-track { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 4px 2px 14px; scrollbar-width: thin; }
.row-track > * { scroll-snap-align: start; }
.row-track > .notice { grid-column: 1 / -1; width: min(520px, 80vw); }

/* Home hero */
.hero { position: relative; min-height: 440px; margin: 4px 0 10px; border-radius: 22px; overflow: hidden; display: flex; align-items: flex-end; background: #111; color: #fff; }
.hero.skeleton-hero { background-color: var(--surface-2); }
.hero-bg, .title-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 8, 14, .88) 0%, rgba(8, 8, 14, .55) 45%, rgba(8, 8, 14, 0) 80%), linear-gradient(0deg, rgba(8, 8, 14, .7), transparent 50%); }
.hero-body { position: relative; max-width: 560px; padding: 40px; }
.eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.hero-logo { max-width: 340px; max-height: 120px; object-fit: contain; object-position: left bottom; margin-bottom: 12px; }
.hero-title { font-size: 40px; font-weight: 900; margin-bottom: 8px; }
.hero-meta { margin: 0 0 8px; font-size: 14px; opacity: .85; }
.hero-text { margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; opacity: .92; }
.hero .button.glass { color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .22); }
.hero .button.glass.on { color: #fff; border-color: #fff; }
.hero-dots { position: absolute; right: 24px; bottom: 22px; display: flex; gap: 8px; }
.dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .4); cursor: pointer; }
.dot.on { background: #fff; width: 22px; border-radius: 5px; }

/* Title page */
.title-page { padding: 0 0 40px; max-width: none; }
.title-hero { position: relative; min-height: 470px; display: flex; align-items: flex-end; overflow: hidden; background: var(--surface-2); }
.title-shade { position: absolute; inset: 0; background: linear-gradient(0deg, var(--shade) 0%, color-mix(in srgb, var(--shade) 70%, transparent) 35%, rgba(0, 0, 0, .2) 100%); }
.title-head { position: relative; display: flex; gap: 30px; align-items: flex-end; padding: 120px 28px 24px; width: 100%; max-width: 1600px; }
.title-poster { width: 200px; flex: none; aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; background: var(--surface-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.title-poster img { width: 100%; height: 100%; object-fit: cover; }
.title-info { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.title-info h1 { font-size: 40px; font-weight: 900; }
.title-logo { max-width: 380px; max-height: 130px; object-fit: contain; object-position: left bottom; }
.title-alt { margin: 0; color: var(--muted); }
.title-facts { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; }
.score { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 700; }
.score .icon { color: var(--star); }
.title-body { padding: 0 28px; max-width: 1600px; }
.panel { margin: 20px 0; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.panel h2 { font-size: 19px; font-weight: 800; margin-bottom: 12px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.title-text { margin: 0 0 8px; white-space: pre-line; max-width: 900px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 24px; margin: 18px 0; }
.facts dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.watch .chips { margin-bottom: 10px; }
.watch p { margin: 6px 0; }
.label { margin: 14px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.episodes { display: flex; flex-direction: column; gap: 10px; }
.episode { display: flex; gap: 16px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.episode.seen { opacity: .7; }
.episode-thumb { position: relative; width: 190px; flex: none; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--glass); }
.episode-thumb img { width: 100%; height: 100%; object-fit: cover; }
.episode-number { position: absolute; left: 8px; bottom: 6px; padding: 1px 7px; border-radius: 8px; background: rgba(10, 10, 16, .66); color: #fff; font-size: 11.5px; font-weight: 700; }
.episode-info { flex: 1; min-width: 0; }
.episode-info h3 { font-size: 15px; font-weight: 700; }
.episode-info p { margin: 2px 0 0; }
.episode-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 13.5px; }
.episode-check { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); color: var(--muted); cursor: pointer; }
.episode-check[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.episode-check:disabled { opacity: .35; cursor: default; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; margin-top: 10px; }
.ep-cell { height: 40px; border-radius: 10px; border: 1px solid var(--glass-line); background: var(--surface-2); font-weight: 600; cursor: pointer; }
.ep-cell.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.ep-cell:disabled { opacity: .35; cursor: default; }
.people { grid-auto-columns: 112px; }
.person { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.person-photo { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; background: var(--surface-2); margin-bottom: 6px; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-name { font-size: 13px; font-weight: 600; line-height: 1.25; }
.person-role { font-size: 12px; color: var(--muted); }

/* Search, calendar, settings */
.search-group { margin: 10px 0 30px; }
.search-group h2 { font-size: 21px; font-weight: 800; margin-bottom: 14px; }
.search-group .grid > .notice { grid-column: 1 / -1; }
.day h2 { font-size: 16px; }
.cal-item { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 12px; text-decoration: none; }
.cal-item:hover { background: var(--surface-2); }
.cal-item p { margin: 2px 0 0; }
.cal-poster { width: 46px; flex: none; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.cal-poster img { width: 100%; height: 100%; object-fit: cover; }
.swatches { display: flex; gap: 12px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.swatch.on { border-color: var(--text); }
.swatch.velniro { background: linear-gradient(135deg, #f2f2f4 50%, #101116 50%); } .swatch.violet { background: #8f5ce0; } .swatch.blue { background: #0a84ff; } .swatch.mint { background: #2fd0c9; } .swatch.rose { background: #ff375f; } .swatch.orange { background: #ff9f0a; }

/* Trailer and toast */
.trailer { width: min(1100px, 94vw); padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: #000; }
.trailer::backdrop { background: rgba(0, 0, 0, .78); backdrop-filter: blur(6px); }
.trailer-frame { aspect-ratio: 16 / 9; }
.trailer-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.trailer-close { position: absolute; top: 10px; right: 10px; z-index: 1; color: #fff; background: rgba(0, 0, 0, .55); border-color: rgba(255, 255, 255, .25); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; max-width: min(520px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Profiles, dialogs and the rest of the library tools */
.app-bg { position: fixed; inset: 0; z-index: -1; background-size: cover; background-position: center; }
.app-bg::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 82%, transparent); }
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: #fff; font-weight: 800; font-family: var(--display); }
.avatar.violet, .swatch.avatar-violet { background: #8f5ce0; } .avatar.blue, .swatch.avatar-blue { background: #0a84ff; } .avatar.mint, .swatch.avatar-mint { background: #1fb5ae; }
.avatar.rose, .swatch.avatar-rose { background: #ff375f; } .avatar.orange, .swatch.avatar-orange { background: #f08a00; } .avatar.gold, .swatch.avatar-gold { background: #c9a227; } .avatar.slate, .swatch.avatar-slate { background: #5b6478; }
.profile-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border: 0; border-radius: 12px; background: none; cursor: pointer; font-weight: 600; text-align: left; }
.profile-button span:not(.avatar) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-button:hover { background: var(--glass); }
.chooser { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; background: var(--bg); overflow-y: auto; }
.chooser img { border-radius: 12px; }
.chooser h1 { font-size: 34px; font-weight: 900; }
.chooser-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; max-width: 760px; }
.chooser-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 130px; padding: 12px; border: 0; border-radius: 18px; background: none; cursor: pointer; font-weight: 700; font-size: 16px; }
.chooser-tile:hover, .chooser-tile:focus-visible { background: var(--glass); }
.chooser-tile .avatar { transition: transform .15s; }
.chooser-tile:hover .avatar { transform: scale(1.05); }
.sheet { width: min(560px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.sheet::backdrop { background: rgba(0, 0, 0, .5); backdrop-filter: blur(4px); }
.sheet-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 10px; background: var(--surface); }
.sheet-head h2 { font-size: 18px; font-weight: 800; }
.sheet-body { padding: 4px 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.sheet-body .label { margin: 8px 0 0; }
.text-input { width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--glass-line); background: var(--surface-2); color: var(--text); }
.text-input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.text-input.pin { letter-spacing: .3em; }
.inline-form { display: flex; gap: 10px; }
.inline-form .text-input { flex: 1; min-width: 0; }
.pin-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--glass-line); background: var(--surface-2); cursor: pointer; text-align: left; }
.pick span:first-of-type { flex: 1; font-weight: 600; }
.pick.on { border-color: var(--accent); color: var(--accent); }
.poster-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; max-height: 50vh; overflow-y: auto; }
.poster-choice { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; aspect-ratio: 2 / 3; background: var(--surface-2); cursor: pointer; }
.poster-choice:hover, .poster-choice:focus-visible { border-color: var(--accent); }
.poster-choice img { width: 100%; height: 100%; object-fit: cover; }
.badge-award { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 9px; background: #f47521; color: #fff; font-size: 11px; font-weight: 800; }
.tag.award { border-color: rgba(244, 117, 33, .5); }
.provider-group { margin-bottom: 8px; }
.providers { display: flex; flex-wrap: wrap; gap: 10px; }
.provider { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 12px; background: var(--surface-2); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.provider img { width: 30px; height: 30px; border-radius: 8px; }
.comments { display: flex; flex-direction: column; gap: 12px; }
.comment { padding: 14px; border-radius: 14px; background: var(--surface-2); }
.comment p { margin: 0 0 6px; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.comment-text { white-space: pre-line; }
.comment-text.spoiler { filter: blur(6px); user-select: none; }
.playlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; }
.playlist-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--surface-2); place-items: center; color: var(--muted); margin-bottom: 4px; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic > .icon:only-child { grid-column: 1 / -1; grid-row: 1 / -1; }
.removable { position: relative; }
.removable .remove { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; background: rgba(10, 10, 16, .7); color: #fff; border-color: rgba(255, 255, 255, .2); }
.actions.spaced { margin-bottom: 18px; }
.transfer-status p { margin: 8px 0 0; }
.profile-rows, .account-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.profile-row, .account-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.profile-name { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
.account-row > strong { flex: 1; }
.account-picture { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

/* Phones and small windows: a tab bar along the bottom instead of the sidebar. */
@media (max-width: 860px) {
  .sidebar { display: none; }
  .topbar { padding: 10px 16px; }
  .page { padding: 4px 16px 30px; }
  .title-body { padding: 0 16px; }
  .app-footer { padding: 22px 16px 96px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); background: var(--sidebar); border-top: 1px solid var(--line); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
  .tab-link { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 52px; padding: 4px; font-size: 10.5px; text-decoration: none; color: var(--muted); }
  .tab-link.on { color: var(--accent); font-weight: 600; }
  .hero { min-height: 380px; border-radius: 18px; }
  .hero-body { padding: 24px 20px 46px; }
  .hero-title, .title-info h1 { font-size: 30px; }
  .hero-logo, .title-logo { max-width: 240px; max-height: 90px; }
  .title-head { flex-direction: column; align-items: flex-start; gap: 18px; padding: 90px 16px 20px; }
  .title-poster { width: 130px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 18px 12px; }
  .row-track { grid-auto-columns: 120px; gap: 12px; }
  .row-arrows { display: none; }
  .episode { flex-wrap: wrap; }
  .episode-thumb { width: 130px; }
  .panel { padding: 18px 16px; }
  .toast { bottom: 90px; }
  .pin-fields { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Velniro account */
.form-stack { display: grid; gap: 12px; max-width: 460px; }
.form-stack .actions { margin-top: 4px; }
.field { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 10px; }
.field .label { margin: 0 0 6px; }
.field .text-input { grid-column: 1 / -1; }
.field .link-button { margin-bottom: 6px; }
.form-stack .hint { margin: -6px 0 0; }
.form-message { margin: 0; min-height: 1.2em; color: var(--danger); font-size: 13.5px; font-weight: 600; }
.form-message:empty { display: none; }
.form-message.good { color: var(--text); font-weight: 500; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.check-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.account-tabs { margin-bottom: 16px; }
.account-notice { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-weight: 600; }

/* While a library handed over from mystream.lol is saved (js/move-in.js), the page stays blank until it reloads. */
html.moving body { visibility: hidden; }
