:root {
  color-scheme: dark;
  --bg: #221e22;
  --side: #1d191d;
  --surface: #2b252a;
  --surface-2: #332c31;
  --border: #4c4147;
  --ink: #fbf2e9;
  --muted: #c3b4b8;
  --soft: #b1a2a7;
  --accent: #eca72c;
  --border-strong: #796a70;
  --accent-hover: #f6ba51;
  --accent-ink: #f9daa2;
  --accent-surface: #382d26;
  --accent-surface-strong: #473625;
  --accent-border: #99713e;
  --accent-drop: #5c4329;
  --accent-glow: #eca72c60;
  --success-ink: #c0d9bd;
  --success-surface: #30392e;
  --danger-ink: #ffc1bd;
  --danger-surface: #492c30;
  --title: "Geist", "Segoe UI", sans-serif;
  font: 14px "DM Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: var(--accent); }
svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 218px minmax(0, 1fr); }
.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 420px); padding: clamp(22px, 6vw, 36px); }
.auth-card .brand { margin: 0 0 26px; }
.auth-card h1, .no-room h1 { margin: 0 0 16px; font: 700 30px/1.15 var(--title); }
.auth-card .form .primary { width: 100%; }
.no-room { padding: 24px; }
.no-room p { margin: 0; color: var(--muted); }
.no-room .button { margin-top: 16px; }
.sidebar { background: var(--side); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 26px 16px 18px; position: sticky; top: 0; height: 100vh; }
.sidebar-menu { display: contents; }
.icon-button.mobile-nav-toggle { display: none; }
.brand { display: flex; align-items: center; gap: 11px; margin: 1px 6px 49px; }
.brand-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--bg); background: var(--accent); }
.brand-icon svg { width: 22px; height: 22px; }
.brand strong { display: block; font: 700 23px/.96 var(--title); letter-spacing: -.9px; }
.brand strong span { color: var(--accent); }
.brand small { color: var(--muted); display: block; margin-top: 5px; font-size: 11px; }
.nav-label { font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--soft); margin: 0 10px 12px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px; border-radius: 8px; border: 1px solid transparent; color: var(--muted); background: none; margin-bottom: 4px; }
.nav-item:hover, .nav-item.active { color: var(--accent); background: var(--accent-surface); }
.nav-item.active { border-color: var(--accent-border); font-weight: 700; }
.sidebar-bottom { margin-top: auto; }
.room-badge { width: 100%; display: flex; align-items: center; gap: 9px; text-align: left; border-radius: 10px; background: var(--surface); padding: 10px; border: 1px solid var(--border); margin-top: 12px; }
.room-badge > span:first-child { display: grid; place-items: center; background: var(--accent-surface-strong); color: var(--accent); width: 32px; height: 32px; border-radius: 8px; flex: none; }
.room-badge div { min-width: 0; }
.room-badge strong, .room-badge small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-badge strong { font-size: 12px; }
.room-badge small { font-size: 11px; color: var(--muted); margin-top: 3px; }
.topbar { display: flex; min-height: 69px; padding: 11px 32px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); gap: 12px; }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: var(--muted); min-width: 0; }
.breadcrumb button { color: var(--ink); font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; border: 0; padding: 3px 0; }
.breadcrumb button:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb svg { width: 13px; }
.mobile-account-button { display: none; }
.avatar { display: grid; place-items: center; background: #f3cd88; color: var(--bg); border: 2px solid var(--bg); border-radius: 50%; width: 30px; height: 30px; margin-left: -7px; font-size: 11px; font-weight: 700; }
.avatar:nth-child(3n+2) { background: #e9b29d; color: var(--bg); }
.avatar:nth-child(3n) { background: #cdbbc5; color: var(--bg); }
.avatar { position: relative; overflow: hidden; flex-shrink: 0; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-button .avatar { width: 25px; height: 25px; margin-left: 0; border: 0; }
.account-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 16px; }
.room-options { display: grid; gap: 8px; }
.room-options button { justify-content: start; }
.room-options [aria-current] { border-color: currentColor; }
.room-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.room-members-title { margin: 0 0 9px; font-size: 14px; }
.room-members { display: grid; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; }
.room-member { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.room-member:hover { background: var(--accent-surface); }
.room-member .avatar { margin-left: 0; }
.room-member > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.room-member small { display: block; color: var(--muted); }
.room-member > svg { width: 14px; color: var(--muted); }
.profile-avatar { margin: 0 0 14px 7px; }
.profile-avatar .avatar { width: 60px; height: 60px; font-size: 22px; }
.button, .icon-button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; border-radius: 8px; border: 1px solid transparent; font-weight: 700; white-space: nowrap; min-height: 37px; padding: 7px 12px; }
.button svg { width: 16px; height: 16px; }
.primary { background: var(--accent); color: var(--bg); padding: 10px 15px; }
.primary:hover { background: var(--accent-hover); }
.secondary, .icon-button { border-color: var(--border); background: var(--surface); }
.secondary:hover, .icon-button:hover, .subtle:hover { background: var(--surface-2); }
.subtle { background: transparent; border-color: var(--border); }
.icon-button { width: 34px; min-height: 34px; padding: 0; }
.icon-button svg { width: 16px; }
.content { max-width: 1640px; margin: 0 auto; padding: 28px 32px 50px; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 23px; }
.hero .primary { margin-bottom: 3px; }
.eyebrow { color: var(--accent); font-size: 10px; letter-spacing: .16em; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.eyebrow span:first-child { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--title); }
h1 { font-size: clamp(36px, 4vw, 54px); line-height: 1.04; letter-spacing: -.065em; margin-top: 7px; }
.hero p { margin-top: 8px; color: var(--muted); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 22px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.calendar { display: flex; flex-direction: column; align-self: stretch; }
.calendar-grid { flex: 1; }
.calendar-aside { display: grid; gap: 14px; grid-template-rows: auto 1fr; align-self: stretch; min-width: 0; }
.calendar-toolbar { min-height: 62px; padding: 11px 15px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calendar-toolbar h2 { font-size: 21px; letter-spacing: -.035em; text-transform: capitalize; }
.calendar-controls { display: flex; align-items: center; gap: 5px; }
.calendar-controls .subtle { min-height: 34px; }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekdays { background: var(--bg); border-block: 1px solid var(--border); }
.weekdays span { font-size: 11px; color: var(--muted); padding: 9px 0; text-align: center; font-weight: 700; }
.day { min-width: 0; position: relative; min-height: 65px; display: flex; flex-direction: column; gap: 3px; padding: 5px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.day:nth-child(7n) { border-right: 0; }
.day.outside { background: var(--side); }
.day.outside .day-number { color: var(--soft); }
.day.has-movie { background: var(--surface-2); }
.day.current { background: var(--accent-surface); }
.day.drag-over { background: var(--accent-drop); outline: 2px solid var(--accent); outline-offset: -2px; }
.day-number { align-self: flex-start; width: 24px; height: 24px; display: grid; place-items: center; border: 0; background: transparent; padding: 0; border-radius: 50%; color: var(--ink); font-size: 11px; font-weight: 700; }
.day-number:hover { background: var(--accent-surface-strong); }
.current .day-number { background: var(--accent); color: var(--bg); }
.day-films { display: flex; flex-direction: column; gap: 3px; }
.day-film { display: flex; align-items: center; gap: 5px; min-width: 0; background: var(--accent-surface-strong); border: 1px solid var(--accent-border); color: var(--accent-ink); border-radius: 4px; text-align: left; padding: 2px 4px 2px 2px; cursor: grab; }
.day-film .poster { width: 17px; height: 23px; border-radius: 2px; flex: none; }
.day-film .poster > span { display: none; }
.day-film > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 700; }
.calendar-footer { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 13px; color: var(--muted); font-size: 11px; min-height: 38px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.legend-dot.plan { margin-left: 9px; background: var(--accent-border); }
.drag-tip { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.drag-tip svg { width: 12px; height: 12px; }
.planning { padding: 16px 14px 14px; }
.planning h2, .collection h2 { font-size: 21px; letter-spacing: -.035em; }
.planning p, .collection-header p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.plan-list { display: grid; margin: 13px 0 8px; }
.plan-row { display: flex; align-items: center; gap: 9px; text-align: left; padding: 8px 0; background: transparent; border: 0; border-top: 1px solid var(--border); width: 100%; }
.plan-row .poster { width: 34px; height: 46px; border-radius: 4px; flex: none; }
.plan-row .poster > span { display: none; }
.plan-meta { min-width: 0; display: grid; gap: 3px; flex: 1; }
.plan-meta strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.plan-meta small { color: var(--muted); font-size: 11px; }
.plan-date { display: grid; justify-items: center; align-content: center; width: 37px; height: 39px; flex: none; border-radius: 6px; background: var(--accent-surface); color: var(--accent); }
.plan-date strong { line-height: 1; font: 700 15px var(--title); }
.plan-date small { font-size: 8px; text-transform: uppercase; letter-spacing: .09em; }
.planning .section-link { width: 100%; text-align: left; justify-content: space-between; }
.section-link { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--accent); font-weight: 700; font-size: 12px; padding: 7px 0 3px; }
.section-link svg { width: 15px; }
.planning-empty { margin: 17px 0 11px !important; }
.roulette { display: flex; flex-direction: column; justify-content: center; gap: 9px; padding: 12px 14px; }
.roulette h2 { font-size: 16px; letter-spacing: -.025em; }
.roulette-drop-zone { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg); }
.roulette.drag-over .roulette-drop-zone { border-color: var(--accent); background: var(--accent-surface); }
.roulette-wheel { width: 58px; height: 58px; position: relative; display: grid; place-items: center; flex: none; }
.roulette-wheel::before, .roulette-wheel::after { content: ''; position: absolute; z-index: 1; }
.roulette-wheel::before { top: -3px; border: 5px solid transparent; border-top: 8px solid var(--accent-ink); }
.roulette-wheel::after { width: 9px; height: 9px; border: 2px solid var(--accent-ink); border-radius: 50%; background: var(--bg); }
.roulette-disc { width: 100%; height: 100%; border-radius: 50%; border: 1px solid var(--accent-border); background: repeating-conic-gradient(var(--surface-2) 0 45deg, var(--surface) 45deg 90deg); }
.roulette-message { min-width: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.roulette-message small { display: block; }
.roulette-winner { text-align: left; padding-block: 2px; }
.roulette-list { list-style: none; margin: 0; padding: 0; max-height: 54px; overflow-y: auto; scrollbar-width: thin; }
.roulette-list li { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 26px; font-size: 12px; }
.roulette-swatch { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--slice-color); }
.roulette-movie-title { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.roulette-remove { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); }
.roulette-remove:hover { background: var(--surface-2); color: var(--ink); }
.roulette-remove:focus-visible { outline-offset: -2px; }
.roulette-remove svg { width: 13px; }
.roulette-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.roulette-actions .button { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.roulette-actions [aria-disabled="true"] { opacity: .55; cursor: default; background: var(--accent); }
.collection { grid-column: 1 / -1; min-width: 0; padding-top: 2px; }
.collection-header { margin-bottom: 12px; }
.collection-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.collection-tools .search-field { flex: 1 1 230px; max-width: 360px; }
.collection-tools > .filters { margin-inline-start: auto; }
.collection-search-filters { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.collection-search-filters select {
  width: auto;
  max-width: 100%;
  min-height: 32px;
  padding: 4px 7px;
  border-color: transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.collection-search-filters select:hover { color: var(--ink); background: var(--surface); }
.collection-search-filters select:has(option:checked:not([value=""])) {
  color: var(--accent);
  background: var(--accent-surface);
}
.collection-search-filters select:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }
.collection-search-filters option { background: var(--surface); color: var(--ink); }
.ratings-movies { display: grid; gap: 10px; }
.ratings-film { overflow: hidden; }
.ratings-film summary { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; padding: 10px 14px; list-style: none; cursor: pointer; }
.ratings-film summary::-webkit-details-marker { display: none; }
.ratings-film summary:hover, .ratings-film[open] summary { background: var(--surface-2); }
.ratings-film summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.ratings-film summary .poster { height: 60px; border-radius: 5px; }
.ratings-film summary .poster > span { display: none; }
.ratings-film-title { overflow-wrap: anywhere; }
.ratings-film-title strong { font: 700 16px/1.25 var(--title); }
.ratings-film-title small, .ratings-film-score small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.ratings-film-score { text-align: right; white-space: nowrap; }
.ratings-film-score strong, .group-review-score { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-variant-numeric: tabular-nums; }
.ratings-film-score svg, .group-review-score svg { width: 14px; height: 14px; fill: currentColor; }
.ratings-chevron { display: flex; color: var(--muted); }
.ratings-film[open] .ratings-chevron { transform: rotate(90deg); }
.ratings-feedback { padding: 12px 14px; border-top: 1px solid var(--border); }
.ratings-message { color: var(--muted); }
.count { display: inline-grid; place-items: center; border-radius: 5px; min-width: 24px; min-height: 20px; padding: 0 4px; font: 700 11px "DM Sans", sans-serif; color: var(--accent); background: var(--accent-surface); vertical-align: middle; margin-left: 3px; }
.filters { display: flex; flex-wrap: wrap; gap: 4px; }
.filters button { border: 1px solid transparent; padding: 5px 8px; background: none; border-radius: 5px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.filters button:hover, .filters .selected { background: var(--accent-surface); color: var(--accent); border-color: var(--accent-border); }
.movies { display: grid; grid-template-columns: repeat(auto-fill, minmax(121px, 1fr)); gap: 13px; }
.movie-tile { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; }
.movie-tile:hover { border-color: var(--accent-border); }
.movie-card { display: block; width: 100%; height: 100%; text-align: left; padding: 0; background: transparent; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; }
body:has(#calendarView:not([hidden])) .movie-card { cursor: grab; }
.movie-tile:has(.recommendations) .movie-card { height: auto; border-radius: 8px 8px 0 0; }
.recommendations { border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; padding: 7px 9px 9px; overflow-wrap: anywhere; }
.recommendations > span { color: var(--accent); font-weight: 700; }
.recommendations ul { display: grid; gap: 5px; list-style: none; padding: 0; margin: 4px 0 0; }
.recommendations strong { color: var(--ink); }
.remove-recommendation { display: block; background: none; border: 0; color: var(--accent); padding: 4px 0; text-decoration: underline; }
[data-draggable] { user-select: none; }
[data-draggable].dragging { opacity: .58; cursor: grabbing; }
.plan-row[data-draggable], .result[data-draggable] > .poster { cursor: grab; }
.day-film[data-draggable], .result[data-draggable] > .poster, .movie-drag-handle { touch-action: none; }
.movie-drag-handle { display: none; }
.drag-preview { position: fixed; z-index: 5; top: 0; left: 0; pointer-events: none; padding: 5px 8px; border: 1px solid var(--accent-border); border-radius: 6px; color: var(--accent-ink); background: var(--accent-surface-strong); font-size: 12px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster { position: relative; display: grid; place-items: center; background: radial-gradient(ellipse at 25% 5%, #845a2e, transparent 70%), var(--bg); overflow: hidden; }
.poster.red { background: radial-gradient(ellipse at 25% 5%, #854844, transparent 75%), #35242a; }
.poster.green { background: radial-gradient(ellipse at 25% 5%, #626343, transparent 75%), #282721; }
.poster.orange { background: radial-gradient(ellipse at 25% 5%, #965b35, transparent 75%), #382923; }
.poster.blue { background: radial-gradient(ellipse at 25% 5%, #5d5868, transparent 75%), #28242d; }
.poster > span { font: 700 clamp(11px, 1.2vw, 16px)/1.1 var(--title); text-align: center; padding: 8px; }
.poster img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; pointer-events: none; }
.movie-card > .poster { width: 100%; aspect-ratio: 2 / 2.68; }
.movie-meta { display: grid; gap: 4px; padding: 9px; }
.movie-meta > strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.movie-meta > small { color: var(--muted); font-size: 11px; }
.movie-footer { display: flex; align-items: center; gap: 6px; min-height: 16px; }
.movie-rating { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.movie-rating svg { width: 12px; height: 12px; fill: currentColor; }
.status { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--accent-ink); background: var(--accent-surface-strong); padding: 3px 5px; border-radius: 4px; justify-self: start; }
.status.watched { color: var(--success-ink); background: var(--success-surface); }
.status.paused { color: #e9c5c0; background: #4b333b; }
.status svg { width: 11px; height: 11px; }
.status.movie-status { margin-inline-start: auto; padding: 0; background: none; }
.movie-status svg { width: 15px; height: 15px; }
.empty { grid-column: 1 / -1; color: var(--muted); padding: 24px; border: 1px dashed var(--border); background: var(--surface); border-radius: 9px; }
.empty p { margin-bottom: 8px; }
.news-view { display: grid; gap: clamp(24px, 4vw, 44px); }
.news-section h2 { margin-bottom: 12px; font-size: clamp(20px, 3vw, 26px); }
.news-movies { grid-template-columns: repeat(auto-fill, minmax(min(100%, clamp(100px, 15vw, 154px)), 1fr)); }
.news-movies .movie-card { display: flex; flex-direction: column; }
.news-movies .movie-card > .poster { aspect-ratio: 2 / 3; }
.news-movies .movie-meta > strong { white-space: normal; overflow-wrap: anywhere; }
.news-movies time { color: var(--muted); font-size: 11px; }
dialog { color: var(--ink); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; padding: 19px; width: min(475px, calc(100vw - 26px)); max-height: calc(100dvh - 28px); box-shadow: 0 14px 80px #130f13e0; }
dialog::backdrop { background: #171317bd; }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.modal-header h2 { letter-spacing: -.03em; font-size: 23px; }
.modal-copy { margin: 0 0 13px; color: var(--muted); line-height: 1.55; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-weight: 700; }
input, select { color: var(--ink); background: var(--side); border: 1px solid var(--border-strong); border-radius: 7px; padding: 9px 10px; min-height: 38px; width: 100%; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 3px; flex-wrap: wrap; }
.search-field { position: relative; min-width: 0; }
.search-field input { min-height: 42px; padding-inline: 38px; }
.search-field input::-webkit-search-cancel-button { appearance: none; }
.search-icon, .search-clear { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-icon { left: 12px; display: flex; pointer-events: none; }
.search-clear { right: 5px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 5px; background: none; }
.search-clear:hover { color: var(--ink); background: var(--surface-2); }
dialog.catalog-dialog { --catalog-top: clamp(12px, 18dvh, 150px); inset: var(--catalog-top) 0 auto; margin: 0 auto; width: min(620px, calc(100vw - 26px)); max-height: calc(100dvh - var(--catalog-top) - 12px); padding: 0; }
.catalog-dialog #modalContent { display: grid; grid-template-rows: auto auto minmax(0, 1fr); max-height: calc(100dvh - var(--catalog-top) - 14px); }
.catalog-dialog .modal-header { margin: 0; padding: 16px 20px 8px; }
.catalog-search { padding: 0 20px 10px; }
.search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.catalog-status { min-height: 1.4em; margin: 8px 0 0; color: var(--muted); font-size: 12px; }
#catalogActionError:empty { margin: 0; }
.results { display: grid; align-content: start; gap: 5px; max-height: 340px; margin: 0 20px 14px; padding: 6px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.results:empty { display: none; }
.results[inert] { opacity: .55; }
.results:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .results { transition: opacity .15s ease; }
}
.result { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.result .poster { height: 60px; border-radius: 4px; }
.result .poster > span { display: none; }
.result-title { overflow-wrap: anywhere; }
.result small { color: var(--muted); display: block; margin-top: 3px; }
.result-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.catalog-pick { min-width: 106px; min-height: 37px; }
.catalog-pick[aria-disabled="true"] { opacity: .55; cursor: wait; }
.catalog-saved { display: inline-flex; justify-content: center; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 8px; color: var(--success-ink); background: var(--success-surface); font-size: 11px; white-space: nowrap; }
.catalog-saved svg { width: 13px; height: 13px; }
.film-page { position: relative; isolation: isolate; --film-space: clamp(90px, 17vw, 255px); }
.film-backdrop { position: absolute; z-index: -1; inset: 0 0 auto; height: calc(var(--film-space) + 250px); overflow: hidden; }
.film-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.film-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #221e2266, #221e221a 24%, #221e22d9 74%, var(--bg)), linear-gradient(90deg, #221e2280, transparent 30%, transparent 70%, #221e2280); }
.film-inner { width: min(100%, 1200px); margin-inline: auto; padding: 22px clamp(20px, 4vw, 64px) 55px; }
.film-inner h1 { margin: 0; font: 700 clamp(30px, 5vw, 66px)/1.02 var(--title); letter-spacing: -.05em; overflow-wrap: anywhere; }
.film-inner h2 { margin: 0; font: 700 19px/1.25 var(--title); letter-spacing: -.02em; }
.film-inner :is(h1, h2):focus { outline: none; }
.film-back { position: relative; padding-inline: 10px; border-radius: 7px; background: var(--side); color: var(--ink); }
.film-intro { display: grid; grid-template-columns: clamp(128px, 17vw, 220px) minmax(0, 1fr); gap: 18px clamp(20px, 4vw, 48px); margin-top: var(--film-space); align-items: start; }
.film-intro .poster { grid-row: span 2; aspect-ratio: 2 / 3; border-radius: 9px; border: 1px solid var(--border-strong); box-shadow: 0 12px 28px #100c1055; }
.movie-detail-meta { display: grid; gap: 10px; align-self: end; }
.movie-detail-meta p, .movie-synopsis p, .movie-group-ratings p { margin: 0; overflow-wrap: anywhere; }
.film-original-title { font-style: italic; color: var(--muted); }
.movie-detail-meta strong { margin-right: 5px; }
.movie-detail-facts { display: flex; gap: 7px 10px; flex-wrap: wrap; align-items: center; color: var(--muted); }
.movie-year-genre { min-width: 0; overflow-wrap: anywhere; }
.movie-detail-facts .status { flex: none; white-space: nowrap; }
.movie-imdb-rating { display: inline-flex; flex: none; align-items: center; gap: 6px; margin-inline-start: auto; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.movie-imdb-rating img { flex: none; object-fit: contain; }
.movie-imdb-rating .section-link { justify-content: center; min-width: 24px; min-height: 24px; padding: 0; }
.movie-added-by, .movie-group-ratings p { color: var(--muted); font-size: 13px; }
.movie-detail-card h3 { margin: 0; font: 700 15px/1.3 var(--title); }
.movie-synopsis p { max-width: 68ch; margin-top: 7px; color: var(--muted); line-height: 1.65; }
.movie-synopsis .section-link { padding: 5px 0; }
.film-trailer-action { margin-top: 13px; }
.film-trailer-action p, .movie-synopsis .film-catalog-message { font-size: 13px; color: var(--soft); }
.film-trailer { margin-top: 24px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--side); }
.film-section-header, .film-section-header > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.film-section-header { padding: 9px 14px; }
.film-trailer iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.film-columns, .film-feedback { display: grid; grid-template-columns: minmax(0, 1fr) minmax(265px, 35%); gap: clamp(18px, 4vw, 48px); margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--border); }
.film-columns-catalog { grid-template-columns: minmax(0, 1fr); }
.film-credits, .film-watchlist { display: grid; align-content: start; gap: 22px; min-width: 0; }
.film-watchlist { grid-column: 2; }
.film-credits[hidden] + .film-watchlist { grid-column: 1 / -1; }
.film-cast { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); gap: 8px; padding: 0; margin: 12px 0 0; list-style: none; }
.film-cast li { display: grid; gap: 3px; padding: 9px 11px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; overflow-wrap: anywhere; }
.film-cast span, .film-crew dt { color: var(--muted); font-size: 13px; }
.film-crew { margin: 10px 0 0; }
.film-crew > div { display: grid; grid-template-columns: minmax(105px, 34%) minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.film-crew dd { margin: 0; overflow-wrap: anywhere; }
.film-external, .film-watchlist-actions { display: flex; flex-wrap: wrap; gap: 7px 16px; }
.film-watchlist-actions { justify-content: flex-end; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border); }
.film-watchlist-actions .film-remove { color: var(--danger-ink); }
.movie-detail-card { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.movie-detail-card .movie-added-by { margin: -4px 0 0; }
#movieFormError { margin: 0; }
#movieFormError:empty { display: none; }
.movie-date { display: grid; gap: 3px; }
.movie-date input { min-width: 0; }
.movie-date .section-link { justify-self: start; padding: 3px 0; }
.movie-group-ratings h2 { margin-bottom: 11px; }
.group-average { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 8px; padding: 9px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; }
.group-average strong { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 17px; }
.group-average svg { width: 14px; height: 14px; fill: currentColor; }
.group-average small, .group-rating-list small { color: var(--muted); font-size: 12px; font-weight: 400; }
.group-average strong, .group-rating-list strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.group-rating-list { list-style: none; padding: 0; margin: 7px 0 0; }
.group-rating-list li { display: flex; align-items: center; gap: 8px; padding: 7px 0; }
.group-rating-list li + li { border-top: 1px solid var(--border); }
.group-rating-list li > small { white-space: nowrap; }
.group-rating-list .avatar { margin: 0; }
.group-rating-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#reviewStatus { margin: 0; }
#reviewStatus, .review-editor small, .group-review-author small, .group-review-score small, .group-review-unrated { color: var(--muted); font-size: 12px; font-weight: 400; }
.review-editor { padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.review-editor summary { width: fit-content; color: var(--accent); cursor: pointer; font-weight: 700; }
.review-editor label { display: block; margin: 10px 0 5px; }
.review-editor textarea { display: block; width: 100%; min-height: 90px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 7px; color: var(--ink); background: var(--side); font: inherit; line-height: 1.5; resize: vertical; }
.review-editor :is(summary, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.review-editor .section-link { padding: 5px 0 0; }
.group-review-list { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.group-review-list > li { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.group-review-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.group-review-author { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.group-review-author .avatar { margin: 0; }
.group-review-list p { margin: 6px 0 0; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.film-feedback { align-items: start; }
.film-reviews h2 { padding-bottom: 11px; border-bottom: 1px solid var(--border); }
.film-reviews .group-review-list { gap: 0; }
.film-reviews .group-review-list > li { padding: 14px 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
.film-reviews .group-review-heading { justify-content: flex-start; column-gap: 10px; }
.film-reviews .group-review-list > li > p { margin-inline-start: 38px; font-size: 15px; line-height: 1.65; }
.review-thread { margin: 10px 0 0 38px; }
.review-replies { list-style: none; margin: 0 0 8px; padding: 0 0 0 12px; border-inline-start: 1px solid var(--border-strong); }
.review-replies > li { padding: 6px 0; }
.review-replies .avatar { width: 24px; height: 24px; }
.review-replies p { margin: 4px 0 0 32px; }
.review-reply-editor { padding: 0; border: 0; background: transparent; }
.review-reply-editor summary { font-size: 12px; }
.review-reply-editor textarea { margin-top: 5px; }
.review-reply-editor .error:empty { margin: 0; }
.review-reply-editor button { margin-top: 5px; }
.rating-picker { min-width: 0; margin: 0; padding: 8px 11px 10px; border: 1px solid var(--border); border-radius: 8px; }
.rating-picker legend { padding: 0 4px; font-weight: 700; }
.rating-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rating-header output { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.rating-header button { padding: 4px 0; }
.rating-stars { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); margin-top: 4px; }
.rating-stars > span { position: relative; display: grid; place-items: center; padding: 5px 0; color: var(--muted); cursor: pointer; }
.rating-stars svg { width: min(100%, 25px); height: 25px; pointer-events: none; }
.rating-stars svg + svg { position: absolute; color: var(--accent); fill: currentColor; visibility: hidden; }
.rating-stars [data-fill="full"] svg + svg, .rating-stars [data-fill="half"] svg + svg { visibility: visible; }
.rating-stars [data-fill="half"] svg + svg { clip-path: inset(0 50% 0 0); }
.rating-picker input[type="range"] { display: block; min-height: 24px; padding: 0; margin: 0; border: 0; background: transparent; accent-color: var(--accent); cursor: pointer; }
.danger { margin-right: auto; color: var(--danger-ink); background: transparent; }
.danger:hover { background: var(--danger-surface); }
.error { color: var(--danger-ink); margin: 8px 0 0; }
.credits-logo { width: 62px; height: auto; display: block; margin: 0 0 10px; }
.mobile-credits { display: none; }
#toast { position: fixed; right: 18px; bottom: 18px; z-index: 2; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 13px; max-width: calc(100vw - 36px); box-shadow: 0 6px 28px #0008; }
#toast:empty { display: none; }
@media (max-width: 1130px) {
  .shell { grid-template-columns: 170px minmax(0, 1fr); }
  .content, .topbar { padding-inline: 21px; }
  .layout { gap: 15px; grid-template-columns: minmax(0, 1fr) 222px; }
}
@media (max-width: 905px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .plan-list { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
}
@media (any-pointer: coarse) {
  .movie-drag-handle { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 1px solid var(--border); border-radius: 6px; background: var(--side); color: var(--ink); }
  .movie-drag-handle svg { width: 16px; height: 16px; }
  .movie-card { position: relative; }
  .movie-card .movie-drag-handle { position: absolute; top: 5px; right: 5px; }
}
@media (max-width: 655px) {
  .shell { display: block; }
  .sidebar { position: relative; z-index: 3; height: auto; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--border); flex-direction: row; justify-content: space-between; gap: 7px; align-items: center; }
  .icon-button.mobile-nav-toggle { display: grid; }
  .sidebar-menu { display: none; }
  .sidebar.menu-open .sidebar-menu { display: grid; position: absolute; top: 100%; left: 0; right: 0; padding: 12px 10px; background: var(--side); border-bottom: 1px solid var(--border); box-shadow: 0 12px 20px #0005; }
  .brand { margin: 0; gap: 5px; }
  .brand-icon { width: 28px; height: 28px; border-radius: 7px; }
  .brand-icon svg { width: 16px; }
  .brand strong { font-size: 18px; }
  .brand small, .topbar { display: none; }
  .nav { display: grid; }
  .nav-item { margin: 0; gap: 9px; padding: 10px; font-size: 13px; }
  .nav-item svg { width: 17px; height: 17px; }
  .sidebar-bottom { margin-top: 8px; }
  .mobile-account-button { display: flex; }
  .content { padding: 18px 9px 30px; }
  .hero { align-items: end; margin-bottom: 15px; }
  .hero p { font-size: 11px; }
  .hero .primary { font-size: 11px; padding: 7px; }
  .calendar-toolbar { padding: 7px; min-height: 49px; }
  .calendar-toolbar h2 { font-size: 17px; }
  .day { min-height: 57px; padding: 2px; }
  .day-film { padding: 1px; border-radius: 3px; gap: 2px; }
  .day-film .poster { width: 12px; height: 16px; }
  .day-film > span:last-child { font-size: 8px; }
  .day-number { width: 19px; height: 19px; }
  .drag-tip { display: none; }
  .collection-tools .search-field { flex-basis: 100%; max-width: none; }
  .collection-tools > .filters { margin-inline-start: 0; }
  .movies { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 7px; }
  .mobile-credits { display: block; margin-top: 20px; }
}

@media (max-width: 430px) {
  .ratings-film summary { grid-template-columns: 32px minmax(0, 1fr) auto 14px; gap: 8px; padding-inline: 9px; }
  .ratings-film summary .poster { height: 46px; }
  .ratings-film-score strong { font-size: 12px; }
  .ratings-chevron svg { width: 14px; }
  .ratings-feedback { padding-inline: 9px; }
}
@media (max-width: 580px) {
  dialog.catalog-dialog { --catalog-top: clamp(12px, 9dvh, 64px); }
  .catalog-dialog .modal-header { padding-inline: 12px; }
  .catalog-search { padding-inline: 12px; }
  .results { margin-inline: 12px; }
  .result { grid-template-columns: 42px minmax(0, 1fr); gap: 5px 10px; }
  .result .poster { grid-row: 1 / span 2; }
  .result-actions { grid-column: 2; justify-content: flex-start; }
  .film-page { --film-space: 82px; }
  .film-intro { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
  .film-intro .poster { grid-row: 1; }
  .movie-detail-meta { align-self: center; }
  .movie-synopsis { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .film-columns, .film-feedback { grid-template-columns: minmax(0, 1fr); }
  .film-watchlist { grid-column: 1; }
}
