:root {
  color-scheme: dark;
  --background: #241e28;
  --surface: #2e2632;
  --text: #f3e9e3;
  --muted: #bbaab9;
  --accent: #e0b5b1;
  --line: #4a3b4b;
  --poster-background: #392f3d;
  --logo-filter: invert(1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: var(--background);
  color: var(--text);
}
:root[data-theme='light'] {
  color-scheme: light;
  --background: #faf7f2;
  --surface: #fffdfb;
  --text: #403139;
  --muted: #78686e;
  --accent: #9c596e;
  --line: #e5dada;
  --poster-background: #f0e5e3;
  --logo-filter: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.page { width: min(100%, 1120px); margin-inline: auto; padding: 28px 42px; }
.skip-link { position: absolute; top: 8px; left: 8px; padding: 8px 12px; background: var(--surface); z-index: 30; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.identity { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; letter-spacing: -.5px; }
.star { color: var(--accent); font-size: 24px; font-weight: 400; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.socials { display: flex; flex-wrap: wrap; gap: 19px; }
.socials a { color: var(--muted); font-size: 12px; }
.socials a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 34px; padding: 7px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); }
.icon-button:hover { background: var(--line); color: var(--text); }
.theme-picker { position: relative; flex-shrink: 0; }
.theme-symbol { display: none; }
[data-preference='system'] .system-symbol, [data-preference='light'] .light-symbol, [data-preference='dark'] .dark-symbol { display: block; }
.theme-options { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 204px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.theme-options button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); text-align: left; font-size: 12px; }
.theme-options button[aria-pressed='true'], .theme-options button:hover { background: var(--background); color: var(--text); }
.theme-options button[aria-pressed='true']::after { content: '✓'; margin-left: auto; color: var(--accent); }
.intro { padding: 29px 0 24px; }
h1 { font: 400 35px/1.15 Georgia, 'Times New Roman', serif; letter-spacing: -.8px; }
.intro p { color: var(--muted); font-size: 13px; margin-top: 9px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; }
.categories { display: flex; flex-wrap: wrap; gap: 6px; }
.categories button { padding: 8px 11px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; }
.categories button[aria-pressed='true'] { border-color: var(--line); background: var(--surface); color: var(--text); }
.categories button:hover { color: var(--text); background: var(--surface); }
.search { display: flex; align-items: center; gap: 9px; width: 245px; flex-shrink: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); }
.search input { min-width: 0; width: 100%; padding: 0; border: 0; background: transparent; color: var(--text); font-size: 12px; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 14px; color: var(--muted); font-size: 11px; }
.film-grid { display: grid; grid-template-columns: repeat(var(--desktop-columns, 4), minmax(0, 1fr)); gap: 23px 18px; align-items: stretch; }
.film { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: 8px; overflow: hidden; }
.film-open { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; }
.film-open:focus-visible { outline-offset: -3px; }
.film:has(.film-open:hover) .record-link { background: var(--line); color: var(--text); }
.poster-frame { position: relative; width: 100%; aspect-ratio: 2 / 3; background: var(--poster-background); }
.poster { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.poster-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px; color: var(--muted); text-align: center; overflow: hidden; }
.poster-placeholder .star { font-size: 32px; }
.poster-placeholder .placeholder-title { font: 400 22px/1.25 Georgia, serif; overflow-wrap: anywhere; }
.film-body { display: flex; flex: 1; flex-direction: column; padding: 13px 13px 12px; }
.film-meta { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.film-title { min-height: 40px; font-size: 14px; line-height: 1.4; font-weight: 500; letter-spacing: -.15px; overflow-wrap: anywhere; }
.film-bottom { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 12px; }
.watched-on { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.status-pill { display: inline-flex; align-self: flex-start; margin-top: 6px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--poster-background); color: var(--accent); font-size: 10px; line-height: 1.4; }
.watched-on svg { width: 12px; height: 12px; }
.service-logo { width: 18px; height: 18px; display: block; filter: var(--logo-filter); opacity: .88; }
.record-unavailable { border-style: dashed; opacity: .6; }
.dialog-open { overflow: hidden; }
.posts-dialog { width: min(560px, calc(100% - 36px)); max-height: min(760px, calc(100dvh - 48px)); margin: auto; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 18px 70px #0005; overflow: hidden; }
.posts-dialog[open] { display: flex; flex-direction: column; }
.posts-dialog::backdrop { background: #100c15b3; }
.posts-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-shrink: 0; padding-bottom: 18px; }
.posts-heading { min-width: 0; }
.posts-description { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.posts-heading h2 { font: 400 26px/1.25 Georgia, 'Times New Roman', serif; overflow-wrap: anywhere; }
.posts-close { width: 44px; height: 44px; font-size: 26px; line-height: 1; }
.posts-list { min-height: 0; margin: 0 -7px; padding: 3px 7px 7px; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.post-row + .post-row { border-top: 1px solid var(--line); }
.post-link { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 8px; border-radius: 6px; }
.post-link:hover { background: var(--background); }
.post-link .service-logo { flex-shrink: 0; }
.post-details { min-width: 0; flex: 1; }
.post-title { display: block; line-height: 1.4; overflow-wrap: anywhere; }
.post-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 5px; color: var(--muted); font-size: 11px; }
.post-external { flex-shrink: 0; color: var(--accent); font-size: 20px; }
.posts-empty { color: var(--muted); padding-block: 8px; }
.empty-state { padding: 56px 12px; text-align: center; }
.empty-state h2 { font-size: 18px; font-weight: 500; }
.empty-state p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.text-button { margin-top: 15px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--accent); font-size: 13px; }
.text-button:hover { background: var(--surface); }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.site-footer .star { font-size: 20px; }
.noscript { padding: 24px 0; color: var(--muted); }
@media (max-width: 900px) {
  .page { padding: 24px 28px; }
  .toolbar { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
  .search { width: 100%; }
}
@media (max-width: 620px) {
  .page { padding: 20px 18px; }
  .film-grid { grid-template-columns: repeat(var(--mobile-columns, 2), minmax(0, 1fr)); gap: 18px 12px; }
  .site-header { gap: 10px; }
  .header-actions { gap: 8px; }
  .socials { gap: 8px; }
  .socials a { font-size: 11px; }
  h1 { font-size: 29px; }
  .intro { padding: 25px 0 21px; }
  .categories button { padding: 7px 9px; }
  .search input { font-size: 16px; }
  .film-body { padding: 11px 10px; }
  .film-title { min-height: 37px; font-size: 13px; }
  .watched-on svg { display: none; }
  .film-bottom .icon-button { width: 44px; height: 44px; padding: 11px; }
  .poster-placeholder { padding: 12px; }
  .poster-placeholder .placeholder-title { font-size: 18px; }
  .posts-dialog { padding: 18px; max-height: calc(100dvh - 36px); }
  .posts-header { gap: 12px; }
  .posts-heading h2 { font-size: 23px; }
  .post-link { gap: 10px; padding-inline: 4px; }
}
@media (max-width: 380px) {
  .site-header { align-items: flex-start; }
  .header-actions { gap: 5px; }
  .socials { justify-content: flex-end; max-width: 155px; gap: 6px 8px; padding-top: 7px; }
}
@media (pointer: coarse) {
  .categories button, .theme-options button { min-height: 44px; }
  .theme-toggle { min-width: 44px; min-height: 44px; }
}
.links-page { display: flex; flex-direction: column; min-height: 100vh; max-width: 520px; }
.links-top { display: flex; justify-content: flex-end; }
.links-main { display: flex; flex: 1; flex-direction: column; justify-content: center; gap: 30px; padding-bottom: 48px; }
.links-hero { text-align: center; }
.links-hero .star { font-size: 34px; }
.links-hero h1 { margin-top: 4px; }
.links-hero p { color: var(--muted); font-size: 13px; margin-top: 9px; }
.links-list { display: flex; flex-direction: column; gap: 12px; }
.links-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 15px; }
.links-list a:hover { border-color: var(--accent); color: var(--accent); }
.links-list a span:last-child { color: var(--muted); }
.links-list a.links-archive { margin-top: 8px; border-color: var(--accent); }
