/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import url("/assets/custom-image-28f4633e.css");
@import url("/assets/ranking-availability-515a0ef8.css");

/* Bootstrap sets scroll-behavior: smooth on :root, which
   interferes with Turbo's scroll preservation during morphs. */
:root {
  scroll-behavior: auto !important;
}

@media (max-width: 576px) {
  #dev-toolbar {
    display: none !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: #101018;
  color: #f7f4ef;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.navbar {
  align-items: center;
  background: rgba(16, 16, 24, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar__logo {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.navbar__links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.navbar__links a,
.navbar__button {
  background: transparent;
  border: 0;
  color: #dfd8cf;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.navbar__links a:hover,
.navbar__button:hover {
  color: #ffffff;
}

.navbar__links form {
  margin: 0;
}

.navbar__links a:focus-visible,
.navbar__button:focus-visible {
  border-radius: 0.35rem;
  outline: 2px solid #ffb000;
  outline-offset: 0.25rem;
}

.navbar__cta,
.button--primary {
  background: #ffb000;
  border-radius: 999px;
  color: #16110a !important;
  font-weight: 800;
  padding: 0.65rem 1rem;
  text-decoration: none;
}

.navbar__user {
  color: #a9a3b4;
  font-size: 0.9rem;
}

.page-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.flash {
  border-radius: 0.8rem;
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
}

.flash--notice {
  background: rgba(69, 191, 119, 0.16);
  border: 1px solid rgba(69, 191, 119, 0.35);
}

.flash--alert {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.hero {
  align-items: center;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  min-height: 68vh;
}

.eyebrow {
  color: #ffcf70;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.dashboard h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.98;
  margin: 0 0 1rem;
  max-width: 860px;
}

.hero__copy,
.dashboard__header p {
  color: #c7c0b8;
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 720px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button {
  align-items: center;
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  border-radius: 999px;
  color: #f7f4ef;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  padding: 0.85rem 1.15rem;
  text-decoration: none;
}

.button--secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f7f4ef;
}

.hero__panel,
.feature-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  padding: 1.5rem;
}

.hero__panel h2,
.feature-card h2 {
  margin-top: 0;
}

.hero__panel li,
.feature-card p {
  color: #c7c0b8;
  line-height: 1.6;
}

.dashboard__header {
  margin-bottom: 2rem;
}

.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .hero,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .navbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
  }
}

.library-page,
.library-detail,
.library-edit {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.library-hero,
.library-empty-state,
.library-panel,
.library-form,
.movie-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.library-hero,
.library-empty-state,
.library-panel,
.library-form {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.library-hero__content,
.library-detail__grid,
.library-panels {
  display: grid;
  gap: 1.5rem;
}

.library-hero__content {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
}

.library-hero h1,
.library-detail h1,
.library-edit h1 {
  font-size: clamp(2.3rem, 6vw, 4.5rem);
  line-height: 0.98;
  margin: 0.2rem 0 1rem;
}

.library-hero p,
.library-empty-state p,
.library-detail__overview,
.library-edit__header p,
.library-panel p {
  color: #c7c0b8;
  line-height: 1.7;
}

.library-hero__stat {
  background: rgba(255, 176, 0, 0.12);
  border: 1px solid rgba(255, 176, 0, 0.28);
  border-radius: 1rem;
  min-width: 120px;
  padding: 1rem;
  text-align: center;
}

.library-hero__stat strong {
  display: block;
  font-size: 2.4rem;
}

.library-hero__stat span,
.movie-card__year,
.library-detail__meta,
.library-back-link {
  color: #a9a3b4;
}

.library-filters {
  align-items: end;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.8fr) auto;
  padding: 1rem;
}

.library-filters label,
.library-form__field label {
  color: #dfd8cf;
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.library-filters input[type="search"],
.library-form__field input {
  background: rgba(16, 16, 24, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.8rem;
  color: #f7f4ef;
  font: inherit;
  padding: 0.8rem 0.9rem;
  width: 100%;
}

.library-filters__chips,
.badge-row,
.movie-card__actions,
.library-actions,
.library-form__actions,
.library-form__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.filter-chip,
.status-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.08);
  color: #dfd8cf;
}

.filter-chip--active,
.status-badge--rating {
  background: #ffb000;
  color: #16110a;
}

.movie-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.movie-card {
  display: grid;
  gap: 1rem;
  grid-template-columns: 92px minmax(0, 1fr);
  overflow: hidden;
  padding: 1rem;
}

.movie-poster {
  align-items: center;
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 8px, transparent 8px, transparent calc(100% - 8px), rgba(255, 255, 255, 0.08) calc(100% - 8px)),
    radial-gradient(circle at 30% 20%, rgba(255, 176, 0, 0.35), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.movie-poster::before,
.movie-poster::after {
  background-image: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.42) 0 6px, transparent 6px 13px);
  content: "";
  inset: 0 auto 0 0;
  opacity: 0.5;
  position: absolute;
  width: 8px;
}

.movie-poster::after {
  left: auto;
  right: 0;
}

.movie-poster img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.movie-poster span {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.movie-poster__placeholder-label {
  padding: 0 1rem;
  text-align: center;
}

.movie-poster--large {
  max-width: 320px;
  width: 100%;
}

.movie-card h2 {
  font-size: 1.15rem;
  margin: 0.15rem 0 0.7rem;
}

.movie-card h2 a,
.library-back-link {
  text-decoration: none;
}

.movie-card__body {
  display: flex;
  flex-direction: column;
}

.movie-card__actions {
  margin-top: auto;
  padding-top: 1rem;
}

.status-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #f7f4ef;
}

.library-detail__grid {
  align-items: start;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
}

.library-actions {
  align-items: center;
  margin-top: 1.5rem;
}

.button--danger {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.42);
  color: #ffd6d6;
}

.button-to-form {
  display: inline-flex;
  margin: 0;
}

.library-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.status-list div {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.75rem;
}

.status-list dt {
  color: #a9a3b4;
}

.status-list dd {
  font-weight: 800;
  margin: 0;
}

.library-list-memberships {
  color: #dfd8cf;
  line-height: 1.8;
  margin: 0;
  padding-left: 1.2rem;
}

.library-form {
  max-width: 760px;
}

.library-form__checks label {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  padding: 0.65rem 0.85rem;
}

.library-form__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.25rem;
}

.library-form__actions {
  margin-top: 1.5rem;
}

@media (max-width: 760px) {
  .library-hero__content,
  .library-filters,
  .library-detail__grid,
  .library-panels,
  .library-form__grid {
    grid-template-columns: 1fr;
  }
}

.import-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.import-hero,
.import-empty-state,
.import-panel,
.import-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.import-hero,
.import-empty-state,
.import-panel,
.import-card {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.import-hero__content,
.import-card,
.import-summary-grid,
.import-counts {
  display: grid;
  gap: 1.25rem;
}

.import-hero__content {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
}

.import-hero h1 {
  font-size: clamp(2.3rem, 6vw, 4.5rem);
  line-height: 0.98;
  margin: 0.2rem 0 1rem;
}

.import-hero p,
.import-empty-state p,
.import-note,
.import-card p,
.import-panel p,
.import-panel li {
  color: #c7c0b8;
  line-height: 1.7;
}

.import-list {
  display: grid;
  gap: 1rem;
}

.import-card {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.import-card h2 {
  margin: 0.8rem 0 0.4rem;
}

.import-actions,
.import-card__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.import-actions {
  align-self: end;
}

.import-card__stats,
.import-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.import-card__stats {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  min-width: 180px;
}

.import-card__stats div {
  background: rgba(255, 176, 0, 0.12);
  border: 1px solid rgba(255, 176, 0, 0.28);
  border-radius: 1rem;
  padding: 0.8rem;
  text-align: center;
}

.import-card__stats dt,
.status-list dt {
  color: #a9a3b4;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.import-card__stats dd,
.status-list dd {
  margin: 0.2rem 0 0;
}

.import-card__stats dd {
  font-size: 1.5rem;
  font-weight: 900;
}

.import-form {
  display: grid;
  gap: 1.2rem;
}

.library-form__field input[type="file"] {
  background: rgba(16, 16, 24, 0.84);
  border: 1px dashed rgba(255, 255, 255, 0.26);
  border-radius: 0.8rem;
  color: #f7f4ef;
  font: inherit;
  padding: 1rem;
  width: 100%;
}

.import-table-wrap {
  overflow-x: auto;
}

.import-table {
  border-collapse: collapse;
  width: 100%;
}

.import-table th,
.import-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.8rem;
  text-align: left;
  vertical-align: top;
}

.import-table th {
  color: #ffcf70;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.import-table code,
.import-sample-row pre {
  background: rgba(16, 16, 24, 0.72);
  border-radius: 0.45rem;
}

.import-table code {
  color: #dfd8cf;
  padding: 0.2rem 0.35rem;
}

.import-sample-rows {
  display: grid;
  gap: 1rem;
}

.import-sample-row {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.9rem;
  padding: 1rem;
}

.import-sample-row pre {
  color: #dfd8cf;
  max-height: 260px;
  overflow: auto;
  padding: 1rem;
  white-space: pre-wrap;
}

.status-badge--completed {
  background: rgba(69, 191, 119, 0.2);
  color: #b9ffd4;
}

.status-badge--failed {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.status-badge--processing {
  background: rgba(255, 176, 0, 0.2);
  color: #ffcf70;
}

.status-badge--pending {
  background: rgba(255, 255, 255, 0.1);
  color: #f7f4ef;
}

@media (max-width: 900px) {
  .import-hero__content,
  .import-card,
  .import-summary-grid,
  .import-counts {
    grid-template-columns: 1fr;
  }
}

.feature-card__links {
  color: #dfd8cf;
  line-height: 1.8;
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.ranking-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ranking-hero,
.ranking-empty-state,
.ranking-panel,
.ranking-card,
.ranking-form {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.ranking-hero__content,
.ranking-card,
.ranking-summary-grid,
.ranking-form__grid,
.ranking-panel__header {
  display: grid;
  gap: 1.25rem;
}

.ranking-hero__content,
.ranking-panel__header {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
}

.ranking-summary-grid,
.ranking-stats,
.ranking-form__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ranking-hero h1 {
  font-size: clamp(2.3rem, 6vw, 4.5rem);
  line-height: 0.98;
  margin: 0.2rem 0 1rem;
}

.ranking-hero p,
.ranking-empty-state p,
.ranking-card p,
.ranking-panel p,
.ranking-table__meta,
.movie-card__meta {
  color: #c7c0b8;
  line-height: 1.7;
}

.ranking-list {
  display: grid;
  gap: 1rem;
}

.ranking-card {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.ranking-card h2 a,
.feature-card h2 a {
  text-decoration: none;
}

.ranking-stats {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  min-width: 180px;
}

.ranking-stats div,
.ranking-panel {
  background-color: rgba(255, 255, 255, 0.06);
}

.ranking-stats dt,
.ranking-filters span {
  color: #a9a3b4;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ranking-stats dd {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0.2rem 0 0;
}

.ranking-hero__stat {
  background: rgba(255, 176, 0, 0.12);
  border: 1px solid rgba(255, 176, 0, 0.28);
  border-radius: 1rem;
  min-width: 150px;
  padding: 1rem;
  text-align: center;
}

.ranking-hero__stat strong {
  display: block;
  font-size: 2.4rem;
}

.ranking-hero__stat span {
  color: #a9a3b4;
}

.ranking-filters {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 1rem;
}

.library-form__field select,
.library-form__field textarea {
  background: rgba(16, 16, 24, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.8rem;
  color: #f7f4ef;
  font: inherit;
  padding: 0.8rem 0.9rem;
  width: 100%;
}

.ranking-availability-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ranking-table-wrap,
.ranking-table-wrapper {
  overflow-x: auto;
}

.ranking-table {
  border-collapse: collapse;
  min-width: 1120px;
  width: 100%;
}

.ranking-table th,
.ranking-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.8rem;
  text-align: left;
  vertical-align: top;
}

.ranking-table th {
  color: #ffcf70;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-badge--confidence {
  background: rgba(255, 176, 0, 0.16);
  color: #ffcf70;
}

.json-block,
.json-preview {
  background: rgba(16, 16, 24, 0.72);
  border-radius: 0.45rem;
  color: #dfd8cf;
  overflow: auto;
  padding: 1rem;
  white-space: pre-wrap;
}

.json-block {
  max-height: 520px;
}

.json-preview {
  margin: 0;
  max-height: 180px;
  min-width: 260px;
}

.status-badge--normalized {
  background: rgba(69, 191, 119, 0.2);
  color: #b9ffd4;
}

.status-badge--skipped {
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

@media (max-width: 900px) {
  .ranking-hero__content,
  .ranking-card,
  .ranking-summary-grid,
  .ranking-form__grid,
  .ranking-panel__header {
    grid-template-columns: 1fr;
  }
}

.battle-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.battle-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
}

.battle-card__stats {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1rem 0 0;
}

.battle-card__stats dt {
  color: #a9a3b4;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.battle-card__stats dd {
  margin: 0.25rem 0 0;
}

.battle-skip {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.battle-skip form {
  margin: 0;
}

@media (max-width: 900px) {
  .battle-grid,
  .battle-card__stats {
    grid-template-columns: 1fr;
  }
}

.ranking-progress-panel {
  display: grid;
  gap: 1rem;
}

.ranking-progress-meter {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  height: 0.8rem;
  overflow: hidden;
}

.ranking-progress-meter__bar {
  background: linear-gradient(90deg, #ffb000, #ffcf70);
  border-radius: inherit;
  height: 100%;
}

.confidence-distribution {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.status-badge--low {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.status-badge--developing {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}

.status-badge--good {
  background: rgba(69, 191, 119, 0.18);
  color: #bdf7d3;
}

.status-badge--strong {
  background: rgba(255, 176, 0, 0.18);
  color: #ffcf70;
}

.ranking-table--compact {
  min-width: 760px;
}

.battle-guidance {
  display: grid;
  gap: 0.5rem;
}

.discover-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.discover-search {
  align-items: end;
}

.discover-results {
  margin-top: 0.5rem;
}

.discover-result-card__overview {
  color: var(--color-text-muted, #5f6470);
  line-height: 1.5;
  margin: 0.75rem 0;
}

.discover-empty-state code {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 0.35rem;
  padding: 0.1rem 0.35rem;
}

.taste-rank-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.taste-rank-hero,
.taste-rank-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.taste-rank-hero {
  align-items: flex-end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.taste-rank-hero h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.98;
  margin: 0 0 1rem;
}

.taste-rank-hero p,
.taste-rank-card p {
  color: #c7c0b8;
  line-height: 1.7;
}

.taste-rank-actions,
.taste-rank-actions form,
.taste-rank-card__header,
.taste-rank-progress-label {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.taste-rank-card__header,
.taste-rank-progress-label {
  justify-content: space-between;
}

.taste-rank-card--featured {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr) minmax(220px, 0.7fr);
}

.taste-rank-card h2,
.taste-rank-card h3 {
  margin-top: 0;
}

.taste-rank-stats,
.feature-card__stats {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.taste-rank-stats div,
.feature-card__stats div,
.taste-rank-status {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1rem;
}

.taste-rank-stats dt,
.feature-card__stats dt {
  color: #a9a3b4;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.taste-rank-stats dd,
.feature-card__stats dd {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0.2rem 0 0;
}

.taste-rank-progress-group + .taste-rank-progress-group {
  margin-top: 1.25rem;
}

.taste-rank-ladder__current {
  background: rgba(255, 176, 0, 0.08);
}

@media (max-width: 900px) {
  .taste-rank-hero,
  .taste-rank-card--featured {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }
}

.taste-game-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.taste-game-hero,
.taste-game-card,
.taste-game-battle-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.taste-game-hero {
  align-items: flex-end;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
}

.taste-game-hero--compact {
  align-items: center;
}

.taste-game-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 0.98;
  margin: 0 0 1rem;
}

.taste-game-hero p,
.taste-game-card p,
.taste-game-battle-card p,
.taste-game-muted {
  color: #c7c0b8;
  line-height: 1.7;
}

.taste-game-hero__stats,
.taste-game-actions,
.taste-game-actions form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.taste-game-hero__stats {
  justify-content: flex-end;
}

.taste-game-battle-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.taste-game-battle-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
}

.taste-game-battle-card h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0 0 0.5rem;
}

.taste-game-pick {
  font-size: 1.05rem;
  width: 100%;
}

.taste-game-progress {
  min-width: min(360px, 100%);
}

.taste-game-progress__label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.taste-game-progress__label span {
  color: #a9a3b4;
}

.taste-game-results-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.taste-game-results-list li {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto 1fr;
  padding: 1rem;
}

.taste-game-results-list__position {
  align-items: center;
  background: #ffb000;
  border-radius: 999px;
  color: #16110a;
  display: inline-flex;
  font-weight: 900;
  height: 2.25rem;
  justify-content: center;
  width: 2.25rem;
}

.taste-game-results-list p {
  margin: 0.25rem 0 0;
}

@media (max-width: 900px) {
  .taste-game-hero,
  .taste-game-battle-grid {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }
}

/* Feature 12: Taste Check MVP polish system */
:root {
  --tc-bg: #090a10;
  --tc-bg-soft: #10131f;
  --tc-surface: rgba(255, 255, 255, 0.08);
  --tc-surface-strong: rgba(255, 255, 255, 0.13);
  --tc-border: rgba(255, 255, 255, 0.14);
  --tc-border-strong: rgba(255, 255, 255, 0.26);
  --tc-text: #fff8ed;
  --tc-muted: #d7d0c7;
  --tc-muted-2: #a9b0c3;
  --tc-gold: #ffb000;
  --tc-gold-2: #ffd166;
  --tc-coral: #ff5c7a;
  --tc-blue: #7dd3fc;
  --tc-green: #7cf0a1;
  --tc-danger: #ff6b6b;
  --tc-focus: #ffcf70;
  --tc-radius: 1.25rem;
  --tc-radius-sm: 0.8rem;
  --tc-shadow: 0 26px 90px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }

body {
  background:
    radial-gradient(circle at top left, rgba(255, 92, 122, 0.18), transparent 34rem),
    radial-gradient(circle at 78% 8%, rgba(125, 211, 252, 0.14), transparent 28rem),
    linear-gradient(135deg, var(--tc-bg), #11111a 58%, #0b0d15);
  color: var(--tc-text);
}

a:hover { color: #ffffff; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--tc-focus);
  outline-offset: 0.22rem;
}

.navbar {
  backdrop-filter: blur(18px);
  background: rgba(9, 10, 16, 0.88);
  border-bottom-color: var(--tc-border);
}

.navbar__logo {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.navbar__links a,
.navbar__button {
  border-radius: 999px;
  color: var(--tc-muted);
  min-height: 42px;
  padding: 0.55rem 0.75rem;
}

.navbar__links a:hover,
.navbar__button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.navbar__cta,
.button,
input[type="submit"] {
  min-height: 44px;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.button:hover,
.navbar__cta:hover,
input[type="submit"]:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
  transform: translateY(-1px);
}

.button--primary,
.navbar__cta {
  background: linear-gradient(135deg, var(--tc-gold), var(--tc-gold-2));
  border: 1px solid rgba(255, 209, 102, 0.92);
  color: #14100a !important;
}

.button--secondary {
  background: #f6efe4;
  border-color: #ffffff;
  color: #11131c !important;
}

.button--ghost,
.button:not(.button--primary):not(.button--secondary):not(.button--danger) {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--tc-border-strong);
  color: var(--tc-text) !important;
}

.button--danger {
  background: rgba(255, 107, 107, 0.18);
  border-color: rgba(255, 107, 107, 0.58);
  color: #ffe3e3 !important;
}

.button:disabled,
.button[aria-disabled="true"],
input[type="submit"]:disabled {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
  color: #b6bbc8 !important;
  cursor: not-allowed;
  transform: none;
}

.page-shell { max-width: 1220px; }

.hero h1,
.dashboard h1,
.library-hero h1,
.ranking-hero h1,
.import-hero h1,
.taste-rank-hero h1,
.taste-check-hero h1,
.taste-game-hero h1,
.result-card h1 {
  letter-spacing: -0.065em;
}

.hero__copy--punchline {
  color: var(--tc-gold-2);
  font-weight: 800;
}

.hero__panel,
.feature-card,
.library-hero,
.library-empty-state,
.library-panel,
.library-form,
.movie-card,
.import-hero,
.import-empty-state,
.import-panel,
.import-card,
.ranking-hero,
.ranking-empty-state,
.ranking-panel,
.ranking-card,
.ranking-form,
.taste-rank-card,
.taste-game-hero,
.taste-game-card,
.taste-game-battle-card,
.action-card,
.result-card,
.onboarding-card {
  background: linear-gradient(145deg, var(--tc-surface-strong), rgba(255, 255, 255, 0.045));
  border: 1px solid var(--tc-border);
  box-shadow: var(--tc-shadow);
}

.feature-card--hero,
.taste-check-hero,
.result-card--snapshot,
.taste-game-hero--playful {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 176, 0, 0.24), transparent 22rem),
    radial-gradient(circle at 92% 0%, rgba(255, 92, 122, 0.18), transparent 20rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.055));
}

.landing-page,
.dashboard-grid,
.step-grid,
.preview-grid,
.taste-check-grid {
  display: grid;
  gap: 1rem;
}

.landing-page { gap: 1.5rem; }
.preview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step-grid,
.dashboard-grid,
.taste-check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-grid .feature-card--hero { grid-column: span 2; }

.action-card,
.result-card,
.onboarding-card,
.taste-check-hero {
  border-radius: var(--tc-radius);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.step-number {
  align-items: center;
  background: var(--tc-gold);
  border-radius: 999px;
  color: #15100a;
  display: inline-flex;
  font-weight: 950;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

.result-card {
  overflow: hidden;
  position: relative;
}

.result-card::after {
  background: radial-gradient(circle, rgba(255, 209, 102, 0.28), transparent 58%);
  content: "";
  height: 18rem;
  position: absolute;
  right: -7rem;
  top: -7rem;
  width: 18rem;
}

.result-card > * { position: relative; z-index: 1; }
.result-card--snapshot { margin-inline: auto; max-width: 860px; width: 100%; }
.result-card--compact { min-height: 100%; }
.result-card__header { align-items: center; display: flex; gap: 0.75rem; justify-content: space-between; }
.result-card__score { color: #ffffff; font-size: clamp(3rem, 10vw, 6.5rem); font-weight: 950; letter-spacing: -0.08em; line-height: 0.9; margin: 1rem 0; }
.result-card__alignment { color: var(--tc-gold-2); font-size: clamp(1rem, 3vw, 1.45rem); font-weight: 950; letter-spacing: 0.12em; margin: 1.25rem 0 0.35rem; text-transform: uppercase; }
.result-card__snapshot-label { background: linear-gradient(135deg, #ffffff, var(--tc-gold-2) 48%, var(--tc-coral)); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: clamp(3.6rem, 13vw, 8.5rem); font-weight: 950; letter-spacing: -0.08em; line-height: 0.86; margin: 0 0 1rem; text-wrap: balance; }
.result-card__caption { color: var(--tc-text); font-size: 1.25rem; font-weight: 800; }
.result-card__share { color: var(--tc-gold-2); font-weight: 900; }

.mini-stat-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0;
}

.mini-stat-grid div {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--tc-border);
  border-radius: 1rem;
  padding: 1rem;
}

.mini-stat-grid dt {
  color: var(--tc-muted-2);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mini-stat-grid dd {
  font-size: 1.1rem;
  font-weight: 900;
  margin: 0.3rem 0 0;
}

.taste-check-hero {
  align-items: end;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
}

.taste-check-hero h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); line-height: 0.95; margin: 0.2rem 0 1rem; }
.taste-check-hero p,
.action-card p { color: var(--tc-muted); line-height: 1.7; }
.onboarding-card strong { display: block; font-size: 1.8rem; margin: 0.5rem 0 1rem; }

.status-badge--accent {
  background: linear-gradient(135deg, var(--tc-coral), var(--tc-gold));
  color: #11131c;
}

.library-filters input[type="search"],
.library-form__field input,
.library-form__field select,
.library-form__field textarea,
.library-form__field input[type="file"] {
  border-color: var(--tc-border-strong);
  min-height: 44px;
}

.discover-result-card__overview { color: var(--tc-muted); }
.status-badge--in-library { background: rgba(125, 211, 252, 0.18); border-color: rgba(125, 211, 252, 0.34); color: #d9f6ff; }
.discover-empty-state code { background: rgba(255, 255, 255, 0.14); color: var(--tc-gold-2); }

.movie-card--choice {
  background:
    radial-gradient(circle at 20% 0%, rgba(125, 211, 252, 0.18), transparent 18rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  min-height: 380px;
}

.taste-game-pick { font-size: 1.1rem; min-height: 56px; }

@media (max-width: 980px) {
  .preview-grid,
  .step-grid,
  .dashboard-grid,
  .taste-check-grid,
  .taste-check-hero,
  .mini-stat-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid .feature-card--hero { grid-column: auto; }
}

@media (max-width: 640px) {
  .button,
  .navbar__cta,
  .navbar__links a,
  .navbar__button,
  .button-to-form,
  .button-to-form form {
    width: 100%;
  }

  .navbar__links { width: 100%; }
  .hero__actions,
  .taste-game-actions,
  .library-actions { align-items: stretch; flex-direction: column; }
  .result-card__score { font-size: clamp(2.6rem, 18vw, 4rem); }
}
