*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #fafaf9;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #292524 0%, #0c0a09 55%);
}

a {
  color: #f59e0b;
  text-decoration: underline;
  text-decoration-color: rgba(245, 158, 11, 0.35);
  text-underline-offset: 2px;
}

a:hover {
  color: #fbbf24;
}

.page-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.layout {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .layout {
    grid-template-columns: 1fr 2fr;
  }
}

.pane-left {
  border-bottom: 1px solid #292524;
  max-height: none;
  overflow: visible;
}

@media (min-width: 1024px) {
  .pane-left {
    border-bottom: none;
    border-right: 1px solid #292524;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
  }
}

.pane-right {
  padding: 1.5rem 1rem 2rem;
  min-height: 40vh;
  max-height: none;
  overflow: visible;
}

.results-pane {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .results-pane {
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .pane-right {
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding: 2rem 1.5rem;
  }
}

.site-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #292524;
}

.site-header-hero {
  flex-shrink: 0;
  margin-bottom: 0;
  padding: 2rem 1rem 1.75rem;
}

@media (min-width: 640px) {
  .site-header-hero {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.search-pane-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0 1rem;
}

@media (min-width: 640px) {
  .search-pane-stack {
    gap: 1.5rem;
    margin: 0 1.5rem;
  }
}

.surface-panel {
  border-radius: 1rem;
  border: 1px solid #292524;
  background: rgba(28, 25, 23, 0.4);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  padding: 1.25rem;
}

@media (min-width: 640px) {
  .surface-panel {
    padding: 1.5rem;
  }
}

.instructions-panel {
  font-size: 0.875rem;
  line-height: 1.55;
  color: #a8a29e;
}

.instructions-heading {
  margin: 0 0 0.75rem;
  font-size: 24px;
  font-weight: 700;
  color: #e7e5e4;
}

.instructions-list {
  margin: 0;
  padding-left: 1.25rem;
  list-style: decimal;
}

.instructions-list li {
  margin-top: 0.35rem;
}

.instructions-list li:first-child {
  margin-top: 0;
}

.site-header h1 {
  margin: 0;
  font-size: 54px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fafaf9;
}

.hero-header-inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1rem;
}

@media (min-width: 640px) {
  .hero-header-inner {
    gap: 1.5rem;
  }
}

.hero-logo-wrap {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  min-height: 0;
}

.hero-logo {
  height: 100%;
  width: auto;
  max-width: min(14vw, 4.5rem);
  object-fit: contain;
  object-position: left center;
  display: block;
}

@media (min-width: 640px) {
  .hero-logo {
    max-width: 5.25rem;
  }
}

.hero-header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
}

.site-header-hero h1 {
  text-align: left;
}

.hero-tagline {
  margin: 0;
  max-width: none;
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #a8a29e;
}

.lead {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #a8a29e;
}

.intro-copy {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #a8a29e;
}

.intro-copy > p {
  margin: 0 0 0.75rem;
}

.intro-copy > p:last-of-type {
  margin-bottom: 0;
}

.intro-copy-label {
  margin: 0 0 0.35rem;
  font-weight: 600;
  color: #d6d3d1;
}

.intro-copy-list {
  margin: 0;
  padding-left: 1.25rem;
}

.intro-copy-list li {
  margin-top: 0.35rem;
}

.intro-copy-list li:first-child {
  margin-top: 0;
}

.version-notes {
  margin: 0;
}

.version-notes-title {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a8a29e;
}

.version-notes ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.75rem;
  line-height: 1.55;
  color: #78716c;
}

.version-notes li {
  margin-top: 0.35rem;
}

.version-notes li:first-child {
  margin-top: 0;
}


.search-pane-stack .banner-error {
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
}

.pane-left {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.banner-error {
  margin: 0 1rem 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(127, 29, 29, 0.55);
  background: rgba(69, 10, 10, 0.35);
  color: #fecaca;
  font-size: 0.875rem;
}

.banner-warn {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(120, 53, 15, 0.45);
  background: rgba(66, 32, 6, 0.25);
  color: rgba(254, 243, 199, 0.92);
  font-size: 0.875rem;
}

.banner-warn ul {
  margin: 0;
  padding-left: 1.1rem;
}

form.card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
}

.random-criteria-block {
  margin: 0;
  padding: 0;
}

.random-criteria-btn {
  width: 100%;
  margin: 0;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(217, 119, 6, 0.55);
  background: rgba(12, 10, 9, 0.75);
  color: #f59e0b;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.random-criteria-btn:hover:not(:disabled) {
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(28, 25, 23, 0.9);
}

.random-criteria-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.random-criteria-hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: #78716c;
}

.field label.title,
.field span.title {
  display: block;
}

.field label.title-primary-genre {
  font-size: 24px;
  font-weight: 700;
  color: #e7e5e4;
}

.field label.title-subcategory,
.field span.title-subcategory {
  font-size: 18px;
  font-weight: 700;
  color: #e7e5e4;
}

.field label.title-standard,
.field span.title-standard {
  font-size: 0.875rem;
  font-weight: 500;
  color: #e7e5e4;
}

.field .hint {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: #78716c;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #44403c;
  background: rgba(12, 10, 9, 0.8);
  color: #fafaf9;
  font-size: 1rem;
}

input.input-genre {
  color: #f59e0b;
}

input.input-genre::placeholder {
  color: rgba(245, 158, 11, 0.45);
}

input:not(.input-genre)::placeholder {
  color: #57534e;
}

input:focus {
  outline: none;
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35);
}

input.year {
  width: 7rem;
}

.subcats-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.genre-multi-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.genre-multi-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.genre-multi-row .input-genre {
  flex: 1 1 10rem;
  min-width: 0;
}

button.genre-row-remove {
  flex-shrink: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid #44403c;
  border-radius: 0.5rem;
  background: rgba(12, 10, 9, 0.65);
  color: #a8a29e;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
}

button.genre-row-remove:hover {
  border-color: #57534e;
  color: #e7e5e4;
}

button.add-genre-row-btn {
  margin-top: 0.5rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #44403c;
  border-radius: 0.5rem;
  background: rgba(28, 25, 23, 0.55);
  color: #d6d3d1;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

button.add-genre-row-btn:hover {
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.year-row {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.rating-threshold-field .rating-threshold-value {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: #f59e0b;
}

.rating-threshold-tagline {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: #78716c;
}

input[type="range"].rating-threshold {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  height: 0.5rem;
  cursor: pointer;
  accent-color: #d97706;
  border-radius: 999px;
}

fieldset.mode-row {
  margin: 0.65rem 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
  min-inline-size: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

fieldset.mode-row label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 11px;
  line-height: 1;
  color: #d6d3d1;
  cursor: pointer;
}

fieldset.mode-row input[type="radio"] {
  width: 12px;
  height: 12px;
  margin: 0;
  flex-shrink: 0;
}

button.submit {
  width: 100%;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 0.5rem;
  background: #d97706;
  color: #0c0a09;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

button.submit:hover:not(:disabled) {
  background: #f59e0b;
}

button.submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.start-over-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem 0.25rem;
  border: none;
  background: transparent;
  color: #78716c;
  font-size: 0.875rem;
  font-weight: 400;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: rgba(87, 83, 78, 0.45);
  text-underline-offset: 0.2rem;
  cursor: pointer;
}

button.start-over-btn:hover:not(:disabled) {
  color: #fbbf24;
  text-decoration-color: rgba(251, 191, 36, 0.55);
}

button.start-over-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.meta {
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: #78716c;
}

.results-count {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #d6d3d1;
}

.results-list {
  font-size: 0.875rem;
  line-height: 1.55;
  color: #d6d3d1;
}

a.stream-link {
  color: #f59e0b;
  text-decoration: underline;
  text-decoration-color: rgba(245, 158, 11, 0.35);
  text-underline-offset: 2px;
}

a.stream-link:hover {
  color: #fbbf24;
}

article.movie {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(41, 37, 36, 0.75);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.thumb-col {
  display: flex;
  width: 92px;
  flex-shrink: 0;
  flex-direction: column;
  gap: 0.5rem;
}

article.movie:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.thumb-meta {
  font-family: system-ui, sans-serif;
  font-size: 11px;
  line-height: 1.35;
  color: #a8a29e;
}

.thumb-rating {
  color: #d6d3d1;
}

a.thumb-link {
  display: block;
  margin-top: 0.35rem;
  color: #f59e0b;
  text-decoration: underline;
  text-decoration-color: rgba(245, 158, 11, 0.35);
  text-underline-offset: 2px;
}

a.thumb-link:hover {
  color: #fbbf24;
}

.thumb img {
  display: block;
  width: 92px;
  height: 138px;
  object-fit: cover;
  border-radius: 0.375rem;
  box-shadow: 0 0 0 1px #44403c;
}

.thumb .placeholder {
  width: 92px;
  height: 138px;
  border-radius: 0.375rem;
  background: #292524;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #78716c;
  text-align: center;
  padding: 0.25rem;
  box-sizing: border-box;
}

.movie-body {
  min-width: 0;
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
}

@media (min-width: 640px) {
  .movie-body {
    font-size: 0.875rem;
  }
}

article.movie h2 {
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fafaf9;
}

article.movie h2 .yr {
  font-weight: 400;
  color: #78716c;
}

dl.stream-dl {
  margin: 0.5rem 0 0;
}

.stream-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.35rem;
}

dl.stream-dl dt {
  margin: 0;
  flex-shrink: 0;
  color: #78716c;
  font-weight: normal;
}

dl.stream-dl dd {
  margin: 0;
  display: inline;
  font-family: system-ui, sans-serif;
  color: #d6d3d1;
}

.stream-sep {
  color: #57534e;
  user-select: none;
}

.muted {
  color: #78716c;
}

.empty {
  font-size: 0.875rem;
  color: #78716c;
}

.empty.empty-no-match {
  font-size: 18px;
  font-weight: 700;
  color: #f59e0b;
}
