:root {
  color-scheme: dark;
  --page: #10131e;
  --surface: #191e2e;
  --surface-strong: #1c2234;
  --surface-muted: #30384d;
  --text: #f5f6fa;
  --text-muted: #b5bbce;
  --line: #30384d;
  --line-strong: #47536c;
  --accent: #67dce5;
  --accent-hover: #99edf2;
  --accent-soft: #173a46;
  --danger: #f07175;
  --danger-soft: #3d1c1f;
  --focus: #a9f2f5;
  --shadow: 0 20px 44px -12px rgb(3 6 17 / 0.7), 0 6px 14px rgb(3 6 17 / 0.25);
  --card-shadow: 0 18px 30px -8px rgb(2 5 15 / 0.85), 0 5px 12px rgb(2 5 15 / 0.4);
  --control-radius: 8px;
  --panel-radius: 12px;
  font-family: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", sans-serif;
  font-synthesis: none;
}

* {
  scrollbar-color: #47536c #191e2e;
}

::selection {
  color: var(--page);
  background: var(--accent);
}

html {
  min-width: 320px;
  overflow-x: hidden;
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  position: relative;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(ellipse at 50% 0%, rgb(53 69 110 / 0.26), transparent 60rem),
    var(--page);
}

/* Match the hero fade to the gallery so there is no visible surface seam. */
body:has(.catalog-page) {
  background: var(--page);
}

.app-header,
.app-main,
.toast-region {
  position: relative;
  z-index: 1;
}

.skip-link {
  z-index: 21;
  color: var(--page);
  background: var(--accent);
  border-radius: 4px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 80px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  width: min(1440px, calc(100% - 96px));
  gap: 24px;
}

.brand {
  gap: 12px;
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.brand:hover {
  color: var(--accent-hover);
}

.brand-mark {
  width: 38px;
  height: 38px;
  color: var(--accent);
  background: #203044;
  border-radius: 11px;
  font-size: 25px;
  font-weight: 850;
  line-height: 1;
}

.brand-name {
  font-size: 19px;
  letter-spacing: -0.04em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: #292e3e;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgb(3 6 17 / 0.22);
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 36px;
  padding: 8px 22px;
  color: #c2c8d7;
  background: transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.015em;
  transition: color 180ms ease, background-color 180ms ease;
}

.main-nav a:hover {
  color: #fff;
  background: #3b4256;
}

.main-nav a.active {
  color: #fff;
  background: #606b80;
  font-weight: 700;
  box-shadow: 0 2px 8px rgb(3 6 17 / 0.16);
}

.nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-main {
  width: min(1400px, calc(100% - 96px));
  min-height: calc(100dvh - 80px);
  padding: 54px 0 92px;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.page-heading {
  align-items: flex-end;
  margin-bottom: 34px;
}

.page-heading h1,
.catalog-heading h1,
.catalog-heading h2 {
  color: #fff;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.page-heading p,
.catalog-heading p {
  max-width: 640px;
  margin-top: 13px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
}

h2,
h3 {
  color: #f5f6fa;
}

.panel {
  border: 0;
  background: var(--surface);
  border-radius: var(--panel-radius);
  box-shadow: var(--shadow);
}

.panel-heading h2,
.section-heading-row h2 {
  font-size: 20px;
  font-weight: 740;
  letter-spacing: -0.035em;
}

.panel-heading p,
.section-heading-row p,
.dialog-heading p {
  color: #aeb7ce;
  font-size: 13px;
}

.button {
  gap: 8px;
  min-height: 46px;
  padding-inline: 22px;
  border: 0;
  border-radius: var(--control-radius);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: -0.01em;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    opacity 180ms ease,
    transform 140ms ease;
}

.button:hover {
  filter: none;
  transform: translateY(-1px);
}

.button:active {
  transform: scale(0.98);
}

.button-primary {
  color: #10131e;
  border: 0;
  background: #f5f6fa;
  box-shadow: 0 6px 18px rgb(3 6 17 / 0.2);
}

.button-primary:hover {
  border: 0;
  background: #dce3f1;
}

.button-secondary {
  color: #eef1f9;
  border: 0;
  background: #30384d;
}

.button-secondary:hover {
  border: 0;
  background: #3a455f;
}

.button-quiet {
  color: #c6cddd;
  border: 0;
  background: #222b40;
}

.button-quiet:hover {
  color: #fff;
  border: 0;
  background: #30394f;
}

.button-danger {
  color: var(--danger);
  border: 0;
  background: transparent;
}

.button-danger:hover {
  color: #ff979a;
  background: var(--danger-soft);
}

.button-small {
  min-height: 34px;
  padding-inline: 11px;
  font-size: 12px;
}

.text-button {
  color: #c6cddd;
}

.text-button:hover {
  color: #fff;
  text-decoration-color: var(--accent);
}

.button:focus-visible,
.text-button:focus-visible,
.icon-button:focus-visible,
.host-picker-trigger:focus-visible,
.movie-menu-trigger:focus-visible,
.movie-action-item:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgb(103 220 229 / 0.28);
}

.field label,
.host-selector legend {
  color: #e0e5f1;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.015em;
}

.field input,
.field textarea {
  color: #f5f6fa;
  border: 0;
  background: #2b344b;
  border-radius: var(--control-radius);
  transition: background-color 180ms ease;
}

.field input {
  height: 50px;
  padding-inline: 16px;
}

.field textarea {
  padding: 12px 13px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #99a4bf;
}

.field input:focus,
.field textarea:focus {
  border: 0;
  background: #333f58;
  box-shadow: none;
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.field small {
  color: #a4afc8;
}

/* Search */

.search-heading {
  padding-top: 22px;
}

.search-workbench {
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.72fr);
  gap: 28px;
}

.search-form,
.save-panel {
  padding: 32px;
}

.search-form {
  position: relative;
  overflow: hidden;
}

.save-panel {
  top: 104px;
  background: var(--surface);
}

.host-picker-field {
  margin-top: 27px;
}

.host-picker-trigger {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  color: #f5f6fa;
  text-align: left;
  border: 0;
  background: #2b344b;
  border-radius: var(--control-radius);
  cursor: pointer;
  transition:
    background-color 160ms ease;
}

.host-picker-trigger:hover {
  border: 0;
  background: #333f58;
}

.host-picker-trigger > span {
  font-size: 13px;
  font-weight: 760;
}

.host-picker-trigger strong {
  color: #b5bbce;
  font-size: 12px;
  font-weight: 620;
}

.host-picker-trigger::after {
  color: #a6b0c6;
  content: "›";
  font-size: 22px;
  line-height: 1;
}

.host-picker-dialog .dialog-heading {
  margin-bottom: 18px;
}

.host-picker-dialog .host-selector-toolbar {
  margin-top: 0;
  padding-bottom: 2px;
}

.host-picker-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.host-row.host-picker-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  margin-top: 0;
  cursor: pointer;
}

.host-picker-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: #abb5cb;
  font-size: 13px;
}

.host-picker-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.host-picker-control input:checked + .switch {
  border: 0;
  background: var(--accent);
}

.host-picker-control input:checked + .switch::after {
  background: #fff;
  transform: translateX(16px);
}

.host-picker-control input:focus-visible + .switch {
  outline: 2px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgb(103 220 229 / 0.28);
}

.host-picker-row-disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.host-picker-dialog .dialog-actions {
  margin-top: 20px;
}

.host-selector {
  margin-top: 27px;
}

.host-selector-toolbar {
  color: #abb5cb;
}

.host-options {
  gap: 7px;
  max-height: 260px;
}

.host-option {
  padding: 11px 12px;
  border: 0;
  background: #191e2e;
  border-radius: 5px;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.host-option:hover {
  border: 0;
  transform: translateY(-1px);
}

.host-option:has(input:checked) {
  border: 0;
  background: #233e4b;
}

.host-option input {
  accent-color: var(--accent);
}

.host-option small {
  color: #a4afc8;
}

.inline-empty {
  color: #abb5cb;
  border: 0;
  background: #191e2e;
  border-radius: 6px;
}

.saved-link-preview {
  border: 0;
}

.saved-link-preview span {
  color: #a4afc8;
}

.saved-link-preview a,
.direct-link {
  color: #8de4ed;
}

.results-section {
  margin-top: 52px;
}

.result-groups {
  gap: 14px;
}

.result-group {
  border: 0;
  background: #1c2234;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.18);
}

.result-host-header {
  padding: 13px 15px;
  background: #252d42;
}

.result-host-identity span,
.query-type {
  color: #a6b0c6;
}

.combined-search-row {
  color: #edf0f9;
}

.combined-search-row:hover {
  background: #30394f;
}

.search-item {
  border: 0;
}

.query-open {
  color: #edf0f9;
}

.query-open:hover {
  background: #30394f;
}

.query-open-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #b9f2f5;
  background: #244550;
  border-radius: 6px;
}

.query-option {
  color: #8de4ed;
}

code {
  color: #c5cde0;
}

/* Contained, panoramic artwork inspired by the supplied Disney+ references. */
.catalog-page {
  margin-top: -30px;
}

.featured-carousel {
  margin-bottom: 26px;
}

.hero-controls,
.hero-dots {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-controls {
  gap: 10px;
  margin-top: 12px;
}

.hero-step,
.hero-dot {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #a7b0c3;
  cursor: pointer;
}

.hero-step {
  width: 40px;
  height: 40px;
}

.hero-dot {
  width: 28px;
  height: 40px;
}

.hero-dot[hidden] {
  display: none;
}

.hero-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #60697c;
}

.hero-dot[aria-current="true"]::before {
  background: #f5f6fa;
  box-shadow: 0 0 10px rgb(255 255 255 / 0.2);
}

.hero-step:hover,
.hero-dot:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.06);
}

.hero-step:focus-visible,
.hero-dot:focus-visible {
  outline: 2px solid #b9d6ff;
  outline-offset: 2px;
}

.movie-hero-slot {
  opacity: 1;
  transition: opacity 220ms ease;
}

.movie-hero-slot.is-changing {
  opacity: 0;
}

.catalog-hero {
  position: relative;
  min-height: clamp(300px, 31vw, 470px);
  overflow: hidden;
  isolation: isolate;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.catalog-hero-backdrop,
.catalog-hero-shade {
  position: absolute;
  inset: 0;
}

.catalog-hero-backdrop {
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.catalog-hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgb(8 11 22 / 0.88), rgb(8 11 22 / 0.46) 44%, transparent 76%),
    linear-gradient(0deg, rgb(8 11 22 / 0.65), transparent 65%);
}

.catalog-hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: clamp(300px, 31vw, 470px);
  padding: clamp(28px, 4vw, 60px);
}

.catalog-hero-content h1 {
  max-width: 60%;
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 4.5vw, 66px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 4px 24px rgb(0 0 0 / 0.3);
}

.catalog-hero-meta {
  max-width: 60%;
  margin: 14px 0 0;
  color: #d4dced;
  font-size: 13px;
  font-weight: 550;
}

.catalog-hero-copy {
  display: -webkit-box;
  max-width: min(52%, 600px);
  margin: 18px 0 0;
  overflow: hidden;
  color: #e0e4ee;
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  text-wrap: pretty;
}

.catalog-hero-copy[hidden] {
  display: none;
}

.catalog-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-open-button {
  gap: 9px;
  color: #111;
  border: 0;
  background: #f5f6fa;
  box-shadow: 0 8px 22px rgb(0 0 0 / 0.25);
}

.hero-open-button:hover {
  color: #111;
  background: #dce3f1;
}

.hero-secondary-button {
  gap: 9px;
  color: #fff;
  border: 0;
  background: rgb(48 58 81 / 0.86);
  backdrop-filter: blur(10px);
}

.hero-secondary-button:hover {
  background: rgb(67 80 109 / 0.94);
}

.catalog-section {
  position: relative;
  z-index: 2;
  padding-bottom: 20px;
}

.catalog-page:not(:has(.catalog-hero)) {
  margin-top: 0;
}

.catalog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.catalog-heading h1,
.catalog-heading h2 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.catalog-heading p {
  margin-top: 6px;
  font-size: 12px;
}

.catalog-heading .button {
  min-height: 38px;
  padding-inline: 16px;
}

.movie-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 22px;
  align-items: start;
}

.title-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  isolation: isolate;
  transition:
    transform 230ms cubic-bezier(0.2, 0.72, 0.2, 1),
    filter 230ms ease;
}

.title-card-primary,
.title-card-art {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.title-card-primary {
  color: #fff;
  text-decoration: none;
}

.title-card-art {
  position: relative;
  overflow: hidden;
  background: #20283b;
  box-shadow: var(--card-shadow);
  transition: box-shadow 230ms ease;
}

.title-card-art [data-movie-poster] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    filter 230ms ease,
    transform 500ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.poster-tone-1 {
  background: radial-gradient(ellipse at 72% 22%, #45617e, transparent 65%), linear-gradient(145deg, #24344b, #121725 85%);
}

.poster-tone-2 {
  background: radial-gradient(ellipse at 20% 80%, #365e65, transparent 65%), linear-gradient(28deg, #141e30, #294b59);
}

.poster-tone-3 {
  background: radial-gradient(ellipse at 78% 72%, #555274, transparent 65%), linear-gradient(160deg, #34384e, #151928 85%);
}

.poster-tone-4 {
  background: radial-gradient(ellipse at 24% 18%, #736553, transparent 65%), linear-gradient(35deg, #181e2c, #393b43);
}

.poster-tone-5 {
  background: radial-gradient(ellipse at 50% 12%, #40627a, transparent 65%), linear-gradient(180deg, #253c50, #141b2b 85%);
}

.title-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(5 9 20 / 0.95) 0%, rgb(5 9 20 / 0.55) 22%, transparent 52%);
  transition: background 220ms ease;
}

.title-card-copy {
  position: absolute;
  right: 13px;
  bottom: 14px;
  left: 13px;
  z-index: 2;
}

.title-card-copy h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.title-card-copy p {
  margin: 7px 0 0;
  overflow: hidden;
  color: #c3ccdf;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cinemeta provides transparent title artwork separately from its backdrop. */
.title-card-logo {
  position: absolute;
  right: 15%;
  bottom: 10%;
  z-index: 2;
  display: block;
  width: 70%;
  height: 34%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0;
  filter: drop-shadow(0 2px 8px rgb(0 0 0 / 0.6));
}

.has-title-logo .title-card-logo {
  opacity: 1;
}

.hero-title-logo {
  display: none;
  width: auto;
  height: auto;
  max-width: min(360px, 100%);
  max-height: 150px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 3px 12px rgb(0 0 0 / 0.4));
}

.has-title-logo .hero-title-logo {
  display: block;
}

.hero-title-logo.title-logo-dark {
  filter: brightness(0) invert(1) drop-shadow(0 3px 12px rgb(0 0 0 / 0.4));
}

.has-title-logo .title-card-copy,
.has-title-logo .hero-title-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.title-card .movie-action-menu {
  top: 8px;
  right: 8px;
  z-index: 5;
  opacity: 0;
  transition: opacity 170ms ease;
}

.title-card:hover .movie-action-menu,
.title-card:focus-within .movie-action-menu,
.title-card .movie-action-menu[open] {
  opacity: 1;
}

.title-card:focus-within {
  z-index: 7;
}

.title-card .movie-menu-trigger {
  width: 34px;
  height: 32px;
  color: #fff;
  border: 0;
  background: rgb(16 23 39 / 0.88);
  box-shadow: 0 8px 22px rgb(0 0 0 / 0.3);
  backdrop-filter: blur(10px);
}

.title-card .movie-menu-trigger:hover,
.title-card .movie-action-menu[open] .movie-menu-trigger {
  border: 0;
  background: #35415a;
}

.title-card .movie-action-popover {
  width: 192px;
  border: 0;
  background: #252d42;
  box-shadow: 0 22px 52px rgb(0 0 0 / 0.52);
}

.movie-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #edf0f9;
}

.movie-action-item:hover {
  background: #36425b;
}

.movie-action-danger {
  color: #ef8589;
}

.movie-action-danger:hover {
  background: #3a1b1e;
}

@media (hover: hover) {
  .title-card:hover {
    z-index: 6;
    filter: brightness(1.04);
    transform: translateY(-6px) scale(1.035);
  }

  .title-card:hover .title-card-art [data-movie-poster] {
    transform: scale(1.045);
  }

  .title-card:hover .title-card-art {
    box-shadow: 0 28px 44px -8px rgb(2 5 15 / 0.95), 0 10px 20px rgb(2 5 15 / 0.5);
  }
}

/* Sources */

.host-list.panel {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.host-list-header {
  padding: 10px 18px;
  color: #a6b0c6;
  border-bottom: 0;
  background: transparent;
  font-size: 10px;
}

.host-row {
  margin-top: 12px;
  padding: 20px 22px;
  border: 0;
  background: #1c2234;
  border-radius: 10px;
  box-shadow: 0 10px 24px -8px rgb(3 6 17 / 0.55);
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.host-row + .host-row {
  border-top: 0;
}

.host-row:hover {
  border: 0;
  background: #283249;
  transform: translateY(-1px);
}

.host-identity strong {
  color: #edf0f9;
  font-size: 14px;
}

.host-identity span,
.switch-label {
  color: #abb5cb;
}

.switch {
  border: 0;
  background: #35405a;
}

.switch::after {
  top: 4px;
  left: 4px;
}

.switch::after {
  background: #b8c3db;
}

.switch-label input:checked + .switch {
  border: 0;
  background: var(--accent);
}

.switch-label input:checked + .switch::after,
.host-picker-control input:checked + .switch::after {
  background: #101b2a;
}

.host-picker-row:has(input:checked) {
  background: #253d4b;
}

/* Shared statuses */

.status-label,
.muted-label {
  border-radius: 3px;
}

.status-label {
  color: #a2edf2;
  background: #173a46;
}

.muted-label {
  color: #b7c1d6;
  background: #35405a;
}

.page-state {
  min-height: 340px;
  border: 0;
  background: var(--surface);
  border-radius: var(--panel-radius);
  box-shadow: var(--shadow);
}

.page-state h1,
.page-state h2 {
  color: #fff;
  font-weight: 820;
  letter-spacing: -0.045em;
}

.page-state p {
  color: #b5bbce;
}

.empty-state-mark {
  color: var(--accent);
  font-size: 46px;
  font-weight: 950;
  line-height: 1;
  transform: scaleX(0.78);
  transform-origin: left;
}

/* Dialogs */

.dialog {
  color: var(--text);
  border: 0;
  background: #1c2234;
  border-radius: 16px;
  box-shadow: 0 34px 110px rgb(2 5 15 / 0.8);
}

.dialog::backdrop {
  background: rgb(3 6 17 / 0.76);
  backdrop-filter: blur(8px) saturate(70%);
}

.dialog-form {
  position: relative;
  padding: 32px;
}

.dialog-heading {
  align-items: flex-start;
  flex-direction: row;
}

.dialog-heading > div {
  min-width: 0;
}

.dialog-heading h2 {
  color: #fff;
  font-size: 24px;
  font-weight: 820;
  letter-spacing: -0.045em;
}

.icon-button {
  display: inline-flex;
  width: 36px;
  min-height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #bac4d9;
  border: 0;
  background: #303a51;
  border-radius: 50%;
}

.icon-button:hover {
  color: #fff;
  border: 0;
  background: #30384d;
}

.dialog-actions {
  border: 0;
  gap: 12px;
}

.dialog-error {
  color: #ffafb2;
  background: #3c1b1e;
  border-radius: 5px;
}

.confirmation-copy {
  color: #b5bbce;
}

/* Feedback */

.toast-region {
  z-index: 30;
}

.toast {
  color: #fff;
  border: 0;
  background: #30394f;
  border-radius: 5px;
  box-shadow: 0 22px 60px rgb(0 0 0 / 0.5);
}

.toast::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  content: "";
  background: var(--accent);
  border-radius: 50%;
  vertical-align: 1px;
}

.toast-error {
  border: 0;
  background: #361a1d;
}

.skeleton {
  border: 0;
  background: linear-gradient(100deg, #242c40 20%, #30394f 38%, #242c40 55%);
  background-size: 220% 100%;
}

@media (min-width: 1600px) {
  .movie-gallery {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .movie-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-hero-backdrop {
    object-position: 62% center;
  }


  .header-inner {
    gap: 16px;
  }

  .main-nav a {
    padding-inline: 16px;
  }
}

@media (max-width: 820px) {
  .brand-name,
  .main-nav .nav-icon {
    display: none;
  }

  .header-inner,
  .app-main {
    width: min(100% - 36px, 1400px);
  }

  .search-workbench {
    grid-template-columns: 1fr;
  }

  .save-panel {
    position: static;
  }

  .movie-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-hero-content h1 {
    max-width: 75%;
  }
}

@media (max-width: 600px) {
  .app-header {
    height: 60px;
  }

  .header-inner,
  .app-main {
    width: calc(100% - 32px);
  }

  .header-inner {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 10px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 23px;
  }

  .main-nav {
    justify-content: center;
    justify-self: center;
    gap: 0;
    padding: 4px;
  }

  .main-nav a {
    min-height: 32px;
    padding: 7px 11px;
    font-size: 11px;
    letter-spacing: 0;
  }

  .nav-icon {
    display: none;
  }

  .app-main {
    min-height: calc(100dvh - 60px);
    padding: 36px 0 64px;
  }

  .page-heading {
    margin-bottom: 26px;
  }

  .page-heading h1,
  .catalog-heading h1,
  .catalog-heading h2 {
    font-size: 36px;
  }

  .search-form,
  .save-panel,
  .dialog-form {
    padding: 19px;
  }

  .catalog-page {
    margin-top: -16px;
  }

  .catalog-hero,
  .catalog-hero-content {
    min-height: 300px;
  }

  .catalog-hero-content {
    padding: 28px 22px;
    justify-content: flex-end;
  }

  .catalog-hero-content h1 {
    max-width: 100%;
    font-size: clamp(28px, 8vw, 42px);
  }

  .hero-title-logo {
    max-width: min(260px, 100%);
    max-height: 110px;
  }


  .catalog-hero-copy {
    max-width: 100%;
    margin-top: 14px;
    font-size: 13px;
    -webkit-line-clamp: 4;
  }

  .catalog-hero-meta {
    max-width: 100%;
    margin-top: 12px;
  }

  .catalog-hero-actions {
    gap: 8px;
    margin-top: 20px;
  }

  .catalog-hero-actions .button {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 12px;
  }


  .featured-carousel {
    margin-bottom: 18px;
  }


  .catalog-heading {
    gap: 12px;
    margin-bottom: 18px;
  }

  .catalog-heading h1,
  .catalog-heading h2 {
    font-size: 22px;
  }

  .movie-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }

  .title-card-copy {
    right: 10px;
    bottom: 11px;
    left: 10px;
  }

  .title-card-copy h2 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
  }

  .title-card-copy p {
    margin-top: 3px;
    font-size: 10px;
  }

  .title-card .movie-action-menu {
    top: 6px;
    right: 6px;
    opacity: 1;
  }

  .title-card .movie-menu-trigger {
    width: 32px;
    height: 30px;
  }

  .host-row {
    padding: 15px;
  }

  .host-row.host-picker-row {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .title-card,
  .title-card-art,
  .title-card-art [data-movie-poster],
  .movie-hero-slot,
  .button,
  .host-row,
  .host-option {
    transition: none;
  }

  .title-card:hover,
  .title-card:hover .title-card-art [data-movie-poster],
  .button:hover,
  .button:active,
  .host-row:hover,
  .host-option:hover {
    transform: none;
  }
}

@media (hover: none) {
  .title-card .movie-action-menu {
    opacity: 1;
  }
}

@media (forced-colors: active) {
  .button,
  .field input,
  .field textarea,
  .host-picker-trigger,
  .switch,
  .dialog,
  .movie-action-popover {
    border: 1px solid ButtonText;
  }
}
