@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-garamond-500.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-garamond-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/manrope-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/manrope-500.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/manrope-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/manrope-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #12100f;
  --ink-soft: #1b1816;
  --ink-raised: #24201d;
  --paper: #f3eadb;
  --paper-muted: #b7aa9a;
  --line: rgba(243, 234, 219, 0.18);
  --line-strong: rgba(243, 234, 219, 0.34);
  --ember: #e75c38;
  --ember-hover: #f2744f;
  --success: #7da983;
  font-family: "Manrope", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 34px clamp(24px, 6.5vw, 94px);
  pointer-events: none;
}

.header-content {
  width: min(100%, 1320px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.identity-switch {
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  font-weight: 700;
}

.identity-switch {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(18, 16, 15, 0.88);
  color: var(--paper);
  text-align: right;
}

.identity-switch:hover {
  border-color: var(--line-strong);
  background: var(--ink-soft);
}

.identity-switch img {
  width: 34px;
  height: 34px;
  filter: invert(45%) sepia(93%) saturate(1800%) hue-rotate(337deg) brightness(103%);
}

.identity-switch-copy {
  display: grid;
  gap: 1px;
}

.identity-switch-name {
  font-weight: 700;
  font-size: 13px;
}

.identity-switch-household {
  color: var(--paper-muted);
  font-size: 11px;
}

.choice-screen {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--ink);
  background-image: url("assets/movie-night-room.png");
  background-size: cover;
  background-position: center;
}

.choice-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 9, 8, 0.22);
}

.choice-content {
  width: min(760px, 57vw);
  margin-left: max(6.5vw, calc((100vw - 1320px) / 2));
  padding: 140px 0 54px;
}

.eyebrow,
.section-number {
  margin: 0 0 18px;
  color: var(--ember);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.choice-title,
.main-heading h1,
.section-header h2,
.search-intro h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.choice-title {
  max-width: 690px;
  margin: 0;
  font-size: clamp(70px, 7vw, 108px);
  line-height: 0.88;
}

.choice-description {
  max-width: 520px;
  margin: 28px 0 36px;
  color: var(--paper-muted);
  font-size: 17px;
  line-height: 1.55;
}

.choice-description strong {
  color: var(--paper);
  font-weight: 600;
}

.household-list,
.people-list {
  width: min(100%, 760px);
}

.choice-list,
.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.choice-list {
  border-top: 1px solid var(--line);
}

.household-row,
.person-row {
  min-height: 94px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.choice-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--ink-raised);
  color: var(--paper);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 23px;
  font-weight: 600;
}

.household-row.is-remembered .choice-avatar,
.person-row.is-remembered .choice-avatar {
  border-color: var(--ember);
  background: var(--ember);
  color: var(--ink);
}

.household-row.is-remembered {
  padding-right: 16px;
  padding-left: 16px;
  background: rgba(243, 234, 219, 0.05);
}

.choice-avatar img {
  width: 26px;
  height: 26px;
  filter: invert(1);
}

.choice-copy {
  min-width: 0;
}

.choice-copy h2,
.choice-copy h3 {
  margin: 0;
  color: var(--paper);
  font-size: 17px;
  line-height: 1.3;
}

.choice-copy p {
  margin: 5px 0 0;
  color: var(--paper-muted);
  font-size: 13px;
}

.remembered-label {
  margin-left: 8px;
  color: var(--ember);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.primary,
.choice-action,
.secondary,
.icon-button,
.back-button,
.mark-watched {
  border: 0;
  font-weight: 700;
}

.primary,
.choice-action {
  min-height: 46px;
  border-radius: 2px;
  background: var(--ember);
  color: #18120f;
}

.primary:hover:not(:disabled),
.choice-action:hover:not(:disabled) {
  background: var(--ember-hover);
}

.primary {
  padding: 11px 20px;
}

.choice-action {
  min-width: 134px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 11px 14px 11px 18px;
}

.choice-action img {
  width: 19px;
  height: 19px;
}

.person-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remove-person {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
}

.remove-person:hover {
  border-color: var(--line-strong);
  background: rgba(243, 234, 219, 0.06);
}

.remove-person img {
  width: 17px;
  height: 17px;
  filter: invert(88%) sepia(11%) saturate(300%);
}

.create-disclosure {
  width: min(100%, 760px);
  border-bottom: 1px solid var(--line);
}

.create-disclosure summary {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px 0;
  cursor: pointer;
  list-style: none;
}

.create-disclosure summary::-webkit-details-marker {
  display: none;
}

.summary-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
}

.summary-icon img {
  width: 19px;
  height: 19px;
  filter: invert(45%) sepia(93%) saturate(1800%) hue-rotate(337deg) brightness(103%);
}

.create-disclosure summary strong,
.create-disclosure summary small {
  display: block;
}

.create-disclosure summary strong {
  color: var(--paper);
  font-size: 14px;
}

.create-disclosure summary small {
  margin-top: 4px;
  color: var(--paper-muted);
  font-size: 12px;
  font-weight: 400;
}

.inline-form {
  padding: 4px 0 24px 72px;
}

.inline-form label,
.search-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--paper-muted);
  font-size: 12px;
  font-weight: 600;
}

.input-group,
.search-group {
  display: flex;
  gap: 8px;
}

input,
select {
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(18, 16, 15, 0.92);
  color: var(--paper);
}

input {
  min-width: 0;
  padding: 10px 13px;
}

input::placeholder {
  color: #81766b;
}

select {
  padding: 10px 36px 10px 12px;
}

.input-group input {
  flex: 1;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 26px 0 0;
  color: #8e8378;
  font-size: 11px;
  line-height: 1.5;
}

.privacy-note img {
  width: 18px;
  height: 18px;
  filter: invert(73%) sepia(10%) saturate(450%);
}

.privacy-note span,
.privacy-note strong {
  display: block;
}

.privacy-note strong {
  color: var(--paper-muted);
}
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 26px;
  padding: 8px 0;
  background: transparent;
  color: var(--paper-muted);
  font-size: 12px;
}

.back-button:hover {
  color: var(--paper);
}

.back-button img {
  width: 17px;
  height: 17px;
  filter: invert(75%) sepia(8%) saturate(500%);
}

.app-main {
  width: min(100% - 48px, 1320px);
  margin: 0 auto;
  padding: 154px 0 80px;
}

.main-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: end;
  gap: 56px;
  padding: 0 0 42px;
  border-bottom: 1px solid var(--line);
}

.main-heading h1 {
  margin: 0;
  font-size: clamp(64px, 7vw, 104px);
  line-height: 0.9;
}

.main-heading p:last-child {
  max-width: 420px;
  margin: 0 0 8px;
  color: var(--paper-muted);
  line-height: 1.7;
}

.tab-bar {
  display: flex;
  gap: 28px;
  padding: 24px 0 0;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  position: relative;
  padding: 0 0 17px;
  border: 0;
  background: transparent;
  color: var(--paper-muted);
  font-weight: 700;
}

.tab-button[aria-selected="true"] {
  color: var(--paper);
}

.tab-button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--ember);
}

.tab-panel {
  padding-top: 48px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.section-header h2,
.search-intro h2 {
  margin: 0;
  font-size: clamp(40px, 4vw, 58px);
  line-height: 1;
}

.vote-summary {
  margin: 10px 0 0;
}

.vote-counter,
.voting-day-balance {
  margin: 0;
  color: var(--paper-muted);
  font-size: 13px;
}

.voting-day-balance {
  min-height: 16px;
  margin-top: 2px;
  color: #8e8378;
  font-size: 11px;
}

.section-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding-left: 13px;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.filter-control:focus-within {
  border-color: var(--ember);
}

.filter-control img,
.icon-button img {
  width: 18px;
  height: 18px;
  filter: invert(82%) sepia(13%) saturate(350%);
}

#movies-filter {
  width: 190px;
  min-height: 44px;
  border: 0;
  background: transparent;
}

#movies-filter:focus-visible {
  outline: 0;
}

.icon-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--ink-soft);
}

.shared-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(38px, 6vw, 90px);
}

.list-subsection {
  min-width: 0;
}

.list-subtitle {
  margin: 0 0 18px;
  font-size: 15px;
}

.card-list {
  border-top: 1px solid var(--line);
}

.movie-card,
.result-card {
  display: grid;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.movie-card {
  position: relative;
  grid-template-columns: 74px minmax(0, 1fr);
}

.delete-movie {
  display: none;
}

@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  .delete-movie {
    --delete-progress: 0deg;
    position: absolute;
    top: 9px;
    right: 0;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper-muted);
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 150ms ease, transform 150ms ease, color 150ms ease;
  }

  .movie-card:hover .delete-movie,
  .movie-card:focus-within .delete-movie {
    opacity: 0.62;
    transform: scale(1);
  }

  .movie-card .delete-movie:hover,
  .movie-card .delete-movie:focus-visible,
  .delete-movie.is-holding {
    opacity: 1;
    color: var(--ember-hover);
  }

  .delete-movie-ring {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: conic-gradient(var(--ember) var(--delete-progress), var(--line) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
  }

  .delete-movie img {
    width: 13px;
    height: 13px;
    filter: invert(82%) sepia(13%) saturate(350%);
    pointer-events: none;
  }

  .delete-movie.is-holding img {
    filter: invert(48%) sepia(91%) saturate(1740%) hue-rotate(337deg) brightness(101%);
  }
}

.movie-poster,
.result-poster {
  overflow: hidden;
  background: var(--ink-raised);
}

.movie-poster {
  width: 74px;
  height: 106px;
  display: grid;
  place-items: center;
  color: #7f7469;
  font-size: 10px;
  text-align: center;
}

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

.movie-content {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
}

.movie-main h3,
.result-details h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.movie-main p,
.result-details p {
  margin: 5px 0 0;
  color: var(--paper-muted);
  font-size: 11px;
}

.movie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.secondary,
.vote-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--paper);
}

.vote-button:hover:not(:disabled) {
  border-color: var(--ember);
  color: var(--ember-hover);
}

.vote-button--big,
.vote-button--small,
.vote-button--anne {
  border-color: var(--ember);
  color: var(--ember-hover);
}

.mark-watched {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 0;
  background: transparent;
  color: #8e8378;
  font-size: 11px;
}

.mark-watched:hover:not(:disabled) {
  color: var(--paper);
  text-decoration: underline;
}

.mark-watched:disabled {
  color: var(--success);
}

.movie-points {
  min-height: 13px;
  display: grid;
  gap: 4px;
  color: var(--paper-muted);
  font-size: 10px;
}

.points-row {
  display: flex;
  gap: 4px;
}

.point-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border: 1px solid #756a60;
  border-radius: 50%;
}

.point-dot--filled {
  border-color: var(--ember);
  background: var(--ember);
}

.point-dot--half {
  border-color: var(--ember);
  background: var(--ember);
  opacity: 0.55;
}

.movie-empty {
  margin: 0;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  color: var(--paper-muted);
  font-size: 13px;
}

.search-card {
  width: min(100%, 900px);
}

.search-intro {
  margin-bottom: 36px;
}

.search-group input {
  flex: 1;
}

#search-feedback {
  min-height: 24px;
  margin-top: 16px;
  color: var(--paper-muted);
  font-size: 13px;
}

.result-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.result-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.result-poster {
  width: 54px;
  height: 78px;
  flex: none;
}

@media (max-width: 900px) {
  .app-header {
    padding: 24px;
  }

  .choice-content {
    width: min(650px, calc(100vw - 48px));
    margin-left: 24px;
  }

  .choice-screen {
    background-position: 58% center;
  }

  .main-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .shared-lists {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .app-header {
    padding: 18px 18px 12px;
  }

  .brand {
    font-size: 11px;
  }

  .identity-switch {
    min-height: 44px;
    padding: 6px;
  }

  .identity-switch-copy {
    display: grid;
  }

  .identity-switch-household {
    display: none;
  }

  .identity-switch img {
    width: 30px;
    height: 30px;
  }

  .choice-screen {
    align-items: start;
    background-position: 64% center;
  }

  .choice-screen::before {
    background: rgba(10, 9, 8, 0.54);
  }

  .choice-content {
    width: calc(100vw - 36px);
    margin-left: 18px;
    padding: 104px 0 26px;
  }

  .choice-title {
    font-size: clamp(56px, 18vw, 72px);
    line-height: 0.9;
  }

  .choice-description {
    margin: 20px 0 24px;
    font-size: 14px;
    line-height: 1.5;
  }

  .household-row,
  .person-row {
    min-height: 82px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 11px;
  }

  .household-row.is-remembered {
    padding-right: 8px;
    padding-left: 8px;
  }

  .choice-avatar,
  .summary-icon {
    width: 44px;
    height: 44px;
  }

  .choice-copy h2,
  .choice-copy h3 {
    font-size: 14px;
  }

  .choice-copy p,
  .remembered-label {
    font-size: 10px;
  }

  .remembered-label {
    display: block;
    margin: 3px 0 0;
  }

  .choice-action {
    min-width: 0;
    min-height: 42px;
    padding: 9px 10px;
    font-size: 12px;
  }

  .choice-action img {
    display: none;
  }

  .person-actions {
    gap: 2px;
  }

  .remove-person {
    width: 38px;
    height: 38px;
  }

  .create-disclosure summary {
    min-height: 74px;
    gap: 11px;
  }

  .inline-form {
    padding: 4px 0 20px;
  }

  .input-group {
    align-items: stretch;
  }

  .privacy-note {
    margin-top: 18px;
  }

  .back-button {
    margin-bottom: 16px;
  }

  .app-main {
    width: calc(100% - 36px);
    padding: 114px 0 52px;
  }

  .main-heading {
    padding-bottom: 28px;
  }

  .main-heading h1 {
    font-size: 62px;
  }

  .main-heading p:last-child {
    font-size: 13px;
    line-height: 1.55;
  }

  .tab-panel {
    padding-top: 34px;
  }

  .section-header {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 28px;
  }

  .section-header h2,
  .search-intro h2 {
    font-size: 42px;
  }

  .section-controls {
    width: 100%;
  }

  .filter-control {
    flex: 1;
  }

  #movies-filter {
    width: 100%;
  }

  .movie-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .movie-poster {
    width: 64px;
    height: 92px;
  }

  .movie-content {
    grid-template-columns: 1fr;
  }

  .movie-actions,
  .mark-watched {
    grid-column: 1;
  }

  .search-group {
    flex-wrap: wrap;
  }

  .search-group input {
    flex-basis: 100%;
  }

  .search-group select {
    flex: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  button,
  summary,
  .tab-button {
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease;
  }
}
