body:has(.movie-page) {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 102px 20px 110px;
  background: var(--theme-page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.movie-page { width: min(100%, 1050px); margin: 0 auto; }
.movie-heading { position: relative; padding: 30px 0 38px; }
.movie-back {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 15px;
  border: 1px solid var(--theme-border); border-radius: 99px;
  color: var(--theme-text); background: var(--theme-surface-raised); text-decoration: none;
  font-size: 13px; font-weight: 700;
}
.movie-eyebrow { margin: 0 0 10px; color: var(--theme-muted); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.movie-heading .movie-eyebrow { margin-top: 30px; }
.movie-heading h1 { margin: 0; color: var(--theme-text); font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 8vw, 76px); font-weight: 500; letter-spacing: -.055em; line-height: .98; }
.movie-heading h1 em { color: var(--theme-accent); font-weight: 400; }
.movie-intro { max-width: 500px; margin: 17px 0 0; color: var(--theme-muted); font-size: 15px; line-height: 1.65; }

.movie-add { padding: 24px; border: 1px solid var(--theme-border); border-radius: 20px; background: var(--theme-surface); }
.section-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 21px; }
.kicker-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--theme-accent); }
.section-kicker h2, .collection-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
#movie-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 15px; }
.movie-search-wrap { position: relative; min-width: 0; }
.movie-search-wrap label, .status-select-label { display: block; margin-bottom: 8px; color: var(--theme-muted); font-size: 12px; font-weight: 700; }
#movie-search, #new-status { width: 100%; min-height: 50px; border: 1px solid var(--theme-border); border-radius: 11px; padding: 0 14px; color: var(--theme-text); background: var(--theme-surface-raised); font: inherit; }
#movie-search:focus { border-color: var(--theme-accent); }
.field-hint { margin: 7px 0 0; color: var(--theme-muted); font-size: 11px; }
.add-actions { display: flex; align-items: end; gap: 9px; }
.add-actions .status-select-label { display: none; }
#new-status { width: auto; min-width: 136px; }
.movie-submit { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 7px; padding: 0 17px; border: 0; border-radius: 11px; color: var(--theme-surface-raised); background: var(--theme-accent); font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.movie-submit span { font-size: 19px; font-weight: 400; }
.movie-submit:hover { filter: brightness(1.08); }
.movie-submit:disabled { cursor: wait; opacity: .65; }
.form-message, .list-message { min-height: 20px; margin: 10px 0 0; color: var(--theme-muted); font-size: 12px; }
.form-message[data-kind="error"] { color: #a4313b; }
.form-message[data-kind="success"] { color: #26744c; }

.movie-suggestions { position: absolute; z-index: 20; top: calc(100% - 22px); right: 0; left: 0; max-height: 320px; overflow: auto; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--theme-border); border-radius: 13px; background: var(--theme-surface-raised); box-shadow: 0 16px 36px rgb(0 0 0 / 14%); }
.movie-suggestion { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 11px; width: 100%; padding: 7px; border: 0; border-radius: 9px; color: var(--theme-text); background: transparent; text-align: left; cursor: pointer; }
.movie-suggestion:hover, .movie-suggestion[aria-selected="true"] { background: var(--theme-accent-soft); }
.movie-suggestion img { width: 44px; height: 58px; border-radius: 5px; background: var(--theme-page); object-fit: cover; }
.suggestion-title { display: block; overflow: hidden; font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-description { display: -webkit-box; overflow: hidden; margin-top: 4px; color: var(--theme-muted); font-size: 11px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.suggestion-empty { padding: 14px; color: var(--theme-muted); font-size: 12px; }

.collection { padding-top: 48px; }
.collection-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.collection-heading h2 { font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 500; letter-spacing: -.04em; }
.collection-heading .movie-eyebrow { margin-bottom: 7px; }
.movie-count { margin: 0 0 5px; color: var(--theme-muted); font-size: 12px; }
.movie-tabs { display: flex; gap: 6px; width: fit-content; margin: 22px 0 12px; padding: 5px; border: 1px solid var(--theme-border); border-radius: 12px; background: var(--theme-surface); }
.movie-tab { display: inline-flex; min-height: 41px; align-items: center; gap: 9px; padding: 0 14px; border: 0; border-radius: 8px; color: var(--theme-muted); background: transparent; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.movie-tab[aria-selected="true"] { color: var(--theme-surface-raised); background: var(--theme-accent); }
.movie-tab span { min-width: 20px; padding: 3px 5px; border-radius: 99px; background: color-mix(in srgb, currentColor 14%, transparent); text-align: center; font-size: 10px; }
.movie-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; }
.movie-card { min-width: 0; overflow: hidden; border: 1px solid var(--theme-border); border-radius: 13px; background: var(--theme-surface); }
.movie-poster { display: block; width: 100%; aspect-ratio: 2 / 3; background: color-mix(in srgb, var(--theme-accent-soft) 55%, var(--theme-page)); object-fit: cover; }
.movie-poster-fallback { display: grid; place-items: center; width: 100%; aspect-ratio: 2 / 3; padding: 14px; color: var(--theme-muted); text-align: center; font-family: Georgia, serif; font-size: 15px; }
.movie-card-info { padding: 11px; }
.movie-card h3 { display: -webkit-box; overflow: hidden; min-height: 36px; margin: 0; font-size: 13px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.movie-card-actions { display: flex; gap: 6px; margin-top: 11px; }
.movie-card-actions button { min-height: 34px; flex: 1; padding: 0 7px; border: 1px solid var(--theme-border); border-radius: 8px; color: var(--theme-text); background: var(--theme-surface-raised); font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.movie-card-actions button:hover { background: var(--theme-accent-soft); }
.movie-card-actions .delete-movie { flex: 0 0 34px; color: #9d3540; }
.movie-empty { grid-column: 1 / -1; padding: 32px 20px; border: 1px dashed var(--theme-border); border-radius: 13px; color: var(--theme-muted); text-align: center; font-size: 13px; line-height: 1.6; }
.poster-credit { margin: 17px 0 0; color: var(--theme-muted); font-size: 10px; }

@media (min-width: 900px) {
  body:has(.movie-page) { padding-top: 104px; }
  .movie-heading { padding-top: 31px; }
  .movie-back { position: absolute; top: 31px; right: 0; }
}
@media (max-width: 760px) {
  .movie-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 560px) {
  body:has(.movie-page) { padding: 18px 15px 112px; }
  .movie-heading { padding: 24px 0 25px; }
  .movie-heading .movie-eyebrow { margin-top: 25px; }
  .movie-heading h1 { font-size: clamp(43px, 13vw, 59px); }
  .movie-intro { max-width: 330px; font-size: 14px; }
  .movie-add { padding: 18px 15px 13px; border-radius: 16px; }
  .section-kicker { margin-bottom: 16px; }
  .section-kicker h2 { font-size: 15px; }
  #movie-form { grid-template-columns: 1fr; gap: 13px; }
  .add-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .add-actions .status-select-label { display: block; grid-column: 1 / -1; margin: 0 0 -7px; }
  #new-status { min-width: 0; }
  .movie-submit { padding-inline: 13px; }
  .collection { padding-top: 37px; }
  .collection-heading h2 { font-size: 30px; }
  .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .movie-card-info { padding: 10px; }
  .movie-tab { min-height: 43px; padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) { .movie-page *, .movie-page *::before, .movie-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
