:root {
  color-scheme: light;
  --ink: #2f2830;
  --muted: #7d7078;
  --line: #eadde2;
  --paper: #fffafd;
  --soft: #fff2f6;
  --rose: #e96087;
  --rose-dark: #ba315d;
  --mint: #79c7b1;
  --butter: #f7cb6a;
  --sky: #8fbde7;
  --lilac: #bca0e8;
  --shadow: 0 18px 50px rgba(112, 72, 91, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 220, 231, 0.9), transparent 24rem),
    radial-gradient(circle at 90% 8%, rgba(210, 239, 230, 0.9), transparent 22rem),
    linear-gradient(135deg, #fff8fb 0%, #fef5df 52%, #eff8ff 100%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  align-items: center;
}

.app-shell-wide {
  width: calc(100% - 16px);
  align-items: start;
}

.loading-card,
.login-panel,
.setup-grid,
.game-panel {
  background: rgba(255, 250, 253, 0.86);
  border: 1px solid rgba(234, 221, 226, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.loading-card,
.login-panel {
  width: min(460px, 100%);
  margin: auto;
  border-radius: 8px;
  padding: 28px;
  text-align: center;
}

.sparkle-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  letter-spacing: 0;
  background: conic-gradient(from 180deg, var(--rose), var(--butter), var(--mint), var(--sky), var(--rose));
  box-shadow: 0 10px 30px rgba(233, 96, 135, 0.28);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--rose-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.muted {
  color: var(--muted);
}

.login-form,
.name-row,
.word-row,
.upload-row {
  display: flex;
  gap: 10px;
}

input[type="password"],
input[type="text"],
input[type="date"] {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: white;
  outline: 0;
}

input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(233, 96, 135, 0.14);
}

.primary,
.secondary,
.ghost,
.choice-button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary {
  color: white;
  background: var(--rose);
  box-shadow: 0 12px 24px rgba(233, 96, 135, 0.22);
}

.secondary {
  color: #2b5349;
  background: #dff6ef;
}

.ghost {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.primary:disabled,
.secondary:disabled,
.ghost:disabled,
.choice-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.primary:not(:disabled):hover,
.secondary:not(:disabled):hover,
.ghost:not(:disabled):hover,
.choice-button:not(:disabled):hover {
  transform: translateY(-1px);
}

.error {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--rose-dark);
  font-weight: 700;
}

.setup-grid {
  width: 100%;
  border-radius: 8px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(280px, 440px) 1fr;
  gap: 24px;
  align-items: start;
}

.canvas-wrap {
  display: grid;
  gap: 12px;
}

.avatar-canvas {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  touch-action: none;
}

.tool-strip,
.saved-avatars,
.topbar,
.player-list,
.time-grid,
.submission-grid,
.reveal-grid,
.game-menu {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 1px var(--line);
}

.swatch.active {
  box-shadow: 0 0 0 3px var(--ink);
}

.saved-avatar,
.avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 0 0 1px var(--line), 0 8px 18px rgba(112, 72, 91, 0.12);
  background: var(--soft);
}

.saved-avatar {
  padding: 0;
  overflow: hidden;
}

.game-panel {
  width: 100%;
  border-radius: 8px;
  padding: 22px;
}

.gposes-panel {
  min-height: calc(100vh - 64px);
  padding: 18px;
}

.topbar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.storage-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: #2b5349;
  background: #dff6ef;
  font-size: 0.82rem;
  font-weight: 800;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  background: var(--rose);
}

.game-menu {
  margin: 18px 0 24px;
}

.welcome-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.welcome-tile {
  min-height: 190px;
  border-radius: 8px;
  padding: 22px;
  text-align: left;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(112, 72, 91, 0.1);
}

.welcome-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.welcome-tile:hover {
  transform: translateY(-2px);
  border-color: var(--rose);
}

.movies-welcome-tile {
  color: #f7f2e8;
  border-color: #342f39;
  background:
    radial-gradient(circle at 82% 22%, rgba(213, 169, 87, 0.22), transparent 28%),
    linear-gradient(145deg, #191820, #29242d);
}

.movies-welcome-tile .muted {
  color: #bdb5c0;
}

.movies-welcome-tile:hover {
  border-color: #d7ad60;
}

.movies-page {
  --movie-bg: #111116;
  --movie-panel: #1a191f;
  --movie-panel-light: #232129;
  --movie-line: #34313a;
  --movie-copy: #f4f0e8;
  --movie-muted: #aaa3ad;
  --movie-gold: #d9ae61;
  min-height: calc(100vh - 20px);
  overflow: hidden;
  border: 1px solid #29272e;
  border-radius: 12px;
  color: var(--movie-copy);
  background: var(--movie-bg);
  box-shadow: 0 24px 70px rgba(22, 16, 24, 0.28);
}

.movies-page .eyebrow {
  color: var(--movie-gold);
}

.movies-page button,
.movies-page input,
.movies-page select,
.movies-page textarea {
  font: inherit;
}

.movies-hero {
  padding: clamp(24px, 4vw, 52px);
  border-bottom: 1px solid var(--movie-line);
  background:
    linear-gradient(90deg, rgba(17, 17, 22, 0.94), rgba(17, 17, 22, 0.5)),
    radial-gradient(circle at 83% 10%, rgba(174, 61, 74, 0.28), transparent 35%),
    radial-gradient(circle at 69% 88%, rgba(217, 174, 97, 0.16), transparent 30%);
}

.movies-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.movies-hero h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 0.9;
}

.movie-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #5b4d3a;
  border-radius: 50%;
  color: var(--movie-gold);
  background: #201d1d;
  box-shadow: 0 0 32px rgba(217, 174, 97, 0.12);
}

.movie-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 1px;
  margin-top: 38px;
  overflow: hidden;
  border: 1px solid var(--movie-line);
  border-radius: 8px;
  background: var(--movie-line);
}

.movie-stats div {
  padding: 18px 20px;
  background: rgba(21, 20, 25, 0.9);
}

.movie-stats strong,
.movie-stats span {
  display: block;
}

.movie-stats strong {
  margin-bottom: 5px;
  color: var(--movie-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 500;
}

.movie-stats span {
  color: var(--movie-muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.movie-primary-button,
.movie-quiet-button,
.movie-gold-button,
.movie-danger-button {
  min-height: 42px;
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 750;
}

.movie-primary-button {
  color: #171419;
  background: var(--movie-gold);
}

.movie-gold-button {
  color: #1b1712;
  background: #e6bf78;
  box-shadow: 0 10px 30px rgba(217, 174, 97, 0.2);
}

.movie-quiet-button {
  color: var(--movie-copy);
  border: 1px solid var(--movie-line);
  background: rgba(25, 24, 30, 0.88);
}

.movie-danger-button {
  color: #ffb0b9;
  border: 1px solid #63333b;
  background: #301d22;
}

.movie-primary-button:hover,
.movie-quiet-button:hover,
.movie-gold-button:hover,
.movie-danger-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
}

.movies-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(20px, 4vw, 52px);
  border-bottom: 1px solid var(--movie-line);
  background: #151419;
}

.movie-tabs {
  display: flex;
  gap: 6px;
}

.movie-tabs button {
  min-height: 40px;
  border-radius: 6px;
  padding: 0 14px;
  color: var(--movie-muted);
  background: transparent;
  font-weight: 750;
}

.movie-tabs button span {
  margin-left: 5px;
  color: #77717b;
}

.movie-tabs button.active {
  color: var(--movie-copy);
  background: var(--movie-panel-light);
}

.movie-tabs button.active span {
  color: var(--movie-gold);
}

.movie-filters {
  display: flex;
  gap: 10px;
}

.movies-page input[type="text"],
.movies-page input[type="search"],
.movies-page input[type="number"],
.movies-page input[type="date"],
.movies-page select,
.movies-page textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--movie-line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--movie-copy);
  background: #151419;
  outline: 0;
}

.movies-page input:focus,
.movies-page select:focus,
.movies-page textarea:focus {
  border-color: var(--movie-gold);
  box-shadow: 0 0 0 3px rgba(217, 174, 97, 0.12);
}

.movies-page textarea {
  min-height: 88px;
  resize: vertical;
}

.movie-filters input {
  width: min(260px, 35vw);
}

.movie-filters select {
  width: 170px;
}

.movie-night-panel {
  margin: 24px clamp(20px, 4vw, 52px) 0;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #493d2c;
  border-radius: 8px;
  background: linear-gradient(115deg, #201d1d, #18171c 68%);
}

.movie-night-panel.has-pick {
  border-color: #7b6040;
  background:
    radial-gradient(circle at 90% 50%, rgba(217, 174, 97, 0.16), transparent 30%),
    linear-gradient(115deg, #2a221b, #18171c 68%);
}

.movie-night-panel h3 {
  margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.movie-night-panel p:last-child {
  margin: 0;
  color: var(--movie-muted);
}

.movie-night-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.movie-taste-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 24px clamp(20px, 4vw, 52px) 0;
  overflow: hidden;
  border: 1px solid var(--movie-line);
  border-radius: 8px;
  background: var(--movie-line);
}

.movie-taste-panel div {
  padding: 18px;
  background: var(--movie-panel);
}

.movie-taste-panel span,
.movie-taste-panel strong {
  display: block;
}

.movie-taste-panel span {
  margin-bottom: 6px;
  color: var(--movie-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.movie-taste-panel strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 500;
}

.movie-notice,
.movie-error {
  margin: 18px clamp(20px, 4vw, 52px) 0;
  border-radius: 6px;
  padding: 12px 14px;
}

.movie-notice {
  color: #d9f0e6;
  border: 1px solid #315647;
  background: #1b3028;
}

.movie-error,
.movie-form-error {
  color: #ffb0b9;
}

.movies-content {
  padding: 24px clamp(20px, 4vw, 52px) clamp(32px, 5vw, 64px);
}

.watchlist-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--movie-line);
  border-radius: 8px;
}

.watchlist-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--movie-panel);
}

.watchlist-table th {
  padding: 12px 14px;
  color: #817b84;
  background: #151419;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.watchlist-table td {
  padding: 13px 14px;
  border-top: 1px solid var(--movie-line);
  color: #d5d0d6;
  font-size: 0.88rem;
  vertical-align: middle;
}

.watchlist-table tbody tr:hover {
  background: #201e25;
}

.watchlist-title {
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.watchlist-title strong,
.watchlist-title span {
  display: block;
}

.watchlist-title strong {
  margin-bottom: 4px;
  color: var(--movie-copy);
  font-size: 0.96rem;
}

.watchlist-title span {
  color: var(--movie-muted);
  font-size: 0.78rem;
}

.movie-poster {
  object-fit: cover;
  color: #c9b386;
  background:
    radial-gradient(circle at 50% 25%, #4b3e32, transparent 28%),
    linear-gradient(145deg, #25222a, #17161b);
}

.movie-poster-small {
  width: 42px;
  height: 58px;
  flex: 0 0 42px;
  border-radius: 4px;
}

.movie-poster-large {
  width: 100%;
  height: 100%;
}

.movie-poster-editor {
  width: 100%;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--movie-line);
  border-radius: 7px;
}

.movie-poster-placeholder {
  display: grid;
  place-items: center;
  padding: 8px;
  text-align: center;
}

.movie-poster-placeholder span {
  font-size: 1.5rem;
}

.movie-poster-placeholder small {
  display: block;
  overflow: hidden;
  color: #d9d0c0;
  font-family: Georgia, "Times New Roman", serif;
}

.movie-poster-small small {
  display: none;
}

.movie-chip,
.priority-pill,
.watch-status {
  display: inline-block;
  border-radius: 999px;
  white-space: nowrap;
}

.movie-chip {
  margin: 2px 0;
  padding: 4px 7px;
  color: #bdb7bf;
  border: 1px solid #3b3841;
  font-size: 0.7rem;
}

.priority-pill {
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: capitalize;
}

.priority-pill.high { color: #ffc0bd; background: #4b2529; }
.priority-pill.normal { color: #e5cca0; background: #403522; }
.priority-pill.low { color: #b9bac4; background: #2e2e36; }

.watch-status {
  position: relative;
  padding-left: 15px;
  color: var(--movie-muted);
  font-size: 0.75rem;
}

.watch-status::before {
  position: absolute;
  top: 0.35em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5b5860;
  content: "";
}

.watch-status.never-seen::before { background: #8fbde7; }
.watch-status.rewatch::before { background: #e96087; }

.movie-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.movie-row-actions button {
  min-height: 34px;
  border-radius: 5px;
  padding: 0 9px;
  color: #d8d1da;
  border: 1px solid var(--movie-line);
  background: #24222a;
  white-space: nowrap;
}

.watched-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 22px;
}

.watched-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--movie-line);
  border-radius: 8px;
  background: var(--movie-panel);
  transition: transform 180ms ease, border-color 180ms ease;
}

.watched-card:hover {
  transform: translateY(-4px);
  border-color: #66543b;
}

.watched-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  padding: 0;
  background: #17161b;
}

.watched-poster .movie-poster {
  transition: transform 350ms ease;
}

.watched-card:hover .watched-poster .movie-poster {
  transform: scale(1.035);
}

.shared-favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f4cf8b;
  background: rgba(22, 18, 20, 0.82);
  backdrop-filter: blur(8px);
}

.watched-overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 28px 12px 12px;
  color: white;
  background: linear-gradient(transparent, rgba(9, 9, 12, 0.9));
  font-size: 0.77rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.watched-card:hover .watched-overlay {
  opacity: 1;
  transform: translateY(0);
}

.watched-card-body {
  padding: 14px;
}

.watched-card-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.watched-card h3 {
  margin: 0 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 500;
}

.watched-card p,
.watched-card time {
  color: var(--movie-muted);
  font-size: 0.74rem;
}

.average-score {
  color: var(--movie-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.couple-ratings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 12px 0;
}

.couple-ratings span {
  padding: 7px;
  border-radius: 5px;
  color: var(--movie-muted);
  background: #232129;
  font-size: 0.68rem;
}

.couple-ratings b {
  float: right;
  color: var(--movie-copy);
}

.couple-ratings i {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 4px;
  border-radius: 50%;
}

.enzo-dot { background: #6fa0cb; }
.celine-dot { background: #d77d9a; }

.movie-empty {
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px dashed #3d3943;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
}

.movie-empty > span {
  margin-bottom: 12px;
  font-size: 2.4rem;
}

.movie-empty h3 { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; }
.movie-empty p { color: var(--movie-muted); }

.movie-editor {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  justify-items: end;
}

.movie-editor-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  background: rgba(6, 6, 9, 0.76);
  backdrop-filter: blur(5px);
}

.movie-editor-sheet {
  position: relative;
  width: min(980px, calc(100% - 30px));
  height: 100%;
  overflow-y: auto;
  padding: 28px;
  color: var(--movie-copy);
  border-left: 1px solid var(--movie-line);
  background: #141318;
  box-shadow: -20px 0 70px rgba(0, 0, 0, 0.45);
  animation: movieSheetIn 240ms ease both;
}

@keyframes movieSheetIn {
  from { transform: translateX(30px); opacity: 0; }
}

.movie-editor-head,
.movie-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.movie-editor-head {
  margin-bottom: 20px;
}

.movie-editor-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.movie-close-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--movie-copy);
  background: var(--movie-panel-light);
  font-size: 1.6rem;
}

.movie-editor-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
}

.movie-poster-fields,
.movie-form-main {
  min-width: 0;
}

.movie-poster-fields > label:not(.movie-file-label) {
  display: block;
  margin-top: 14px;
  color: var(--movie-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.movie-poster-fields select {
  margin-top: 6px;
}

.movie-file-label {
  min-height: 40px;
  margin-top: 10px;
  display: grid;
  place-items: center;
  border: 1px dashed #514b55;
  border-radius: 6px;
  color: #d4c7b1;
  background: #1c1a20;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.movie-file-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.movie-form-section {
  margin-bottom: 18px;
  border: 1px solid var(--movie-line);
  border-radius: 8px;
  padding: 18px;
  background: var(--movie-panel);
}

.movie-form-section > h3 {
  margin-bottom: 16px;
  color: #e7dcc9;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 500;
}

.movie-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.movie-field-grid .wide {
  grid-column: 1 / -1;
}

.movie-form-section label,
.movie-person-card > label {
  display: grid;
  gap: 6px;
  color: var(--movie-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.movie-check {
  display: flex !important;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 8px !important;
  color: #c9c3ca !important;
  cursor: pointer;
}

.movie-check input {
  accent-color: var(--movie-gold);
}

.favorite-check {
  margin-top: 14px;
}

.movie-people-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.movie-person-card {
  display: grid;
  gap: 12px;
  border: 1px solid #34313a;
  border-radius: 7px;
  padding: 15px;
  background: #18171c;
}

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

.movie-person-title span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6fa0cb;
}

.movie-person-card.celine .movie-person-title span {
  background: #d77d9a;
}

.movie-person-title h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.movie-preferences {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 12px;
}

.movie-help {
  margin-top: -10px;
  color: var(--movie-muted);
  font-size: 0.78rem;
}

.movie-existing-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.movie-existing-images label {
  overflow: hidden;
  border: 1px solid var(--movie-line);
  border-radius: 6px;
  background: #141318;
}

.movie-existing-images img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.movie-existing-images span,
.movie-existing-images small {
  padding: 7px 8px;
}

.movie-image-upload {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.movie-image-upload input[type="file"] {
  padding: 9px;
  border: 1px dashed #4a454f;
  border-radius: 6px;
  color: var(--movie-muted);
}

.movie-editor-actions {
  position: sticky;
  bottom: -28px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  margin: 8px -28px -28px;
  padding: 16px 28px;
  border-top: 1px solid var(--movie-line);
  background: rgba(20, 19, 24, 0.94);
  backdrop-filter: blur(12px);
}

/* Movies follows the same soft, colorful visual language as the rest of Our lil space. */
.movies-page {
  --movie-bg: rgba(255, 250, 253, 0.9);
  --movie-panel: #ffffff;
  --movie-panel-light: var(--soft);
  --movie-line: var(--line);
  --movie-copy: var(--ink);
  --movie-muted: var(--muted);
  --movie-gold: var(--rose);
  border-color: rgba(234, 221, 226, 0.95);
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 220, 231, 0.76), transparent 25rem),
    radial-gradient(circle at 92% 4%, rgba(210, 239, 230, 0.72), transparent 24rem),
    linear-gradient(135deg, #fffafd, #fff8e9 55%, #f2f9ff);
  box-shadow: var(--shadow);
}

.movies-page .eyebrow {
  color: var(--rose-dark);
}

.movies-hero {
  border-color: var(--line);
  background:
    radial-gradient(circle at 82% 18%, rgba(143, 189, 231, 0.24), transparent 28%),
    radial-gradient(circle at 66% 84%, rgba(121, 199, 177, 0.2), transparent 26%),
    rgba(255, 250, 253, 0.78);
}

.movie-mark {
  color: white;
  border-color: rgba(233, 96, 135, 0.3);
  background: var(--rose);
  box-shadow: 0 10px 26px rgba(233, 96, 135, 0.22);
}

.movie-stats {
  border-color: var(--line);
  background: var(--line);
  box-shadow: 0 12px 30px rgba(112, 72, 91, 0.08);
}

.movie-stats div {
  background: rgba(255, 255, 255, 0.9);
}

.movie-stats strong {
  color: var(--rose-dark);
}

.movie-stats span {
  color: var(--muted);
}

.movie-primary-button,
.movie-gold-button {
  color: white;
  background: var(--rose);
  box-shadow: 0 10px 22px rgba(233, 96, 135, 0.2);
}

.movie-quiet-button {
  color: var(--ink);
  border-color: var(--line);
  background: white;
}

.movie-danger-button {
  color: var(--rose-dark);
  border-color: #ffd0db;
  background: #fff0f4;
}

.movies-toolbar {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.movie-tabs button {
  color: var(--muted);
}

.movie-tabs button span {
  color: #aa9ea5;
}

.movie-tabs button.active {
  color: var(--rose-dark);
  background: white;
  box-shadow: 0 8px 20px rgba(112, 72, 91, 0.1);
}

.movie-tabs button.active span {
  color: var(--rose);
}

.movies-page input[type="text"],
.movies-page input[type="search"],
.movies-page input[type="number"],
.movies-page input[type="date"],
.movies-page select,
.movies-page textarea {
  color: var(--ink);
  border-color: var(--line);
  background: white;
}

.movies-page input:focus,
.movies-page select:focus,
.movies-page textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(233, 96, 135, 0.12);
}

.movie-night-panel {
  border-color: #f1dca6;
  background:
    radial-gradient(circle at 90% 50%, rgba(247, 203, 106, 0.2), transparent 28%),
    linear-gradient(115deg, #fffdf7, #fff8e7);
  box-shadow: 0 12px 28px rgba(112, 72, 91, 0.07);
}

.movie-night-panel.has-pick {
  border-color: #eecf82;
  background:
    radial-gradient(circle at 90% 50%, rgba(247, 203, 106, 0.3), transparent 30%),
    linear-gradient(115deg, #fffdf7, #fff5d9);
}

.movie-night-panel p:last-child,
.movie-help,
.movie-form-section label,
.movie-person-card > label {
  color: var(--muted);
}

.movie-taste-panel {
  border-color: var(--line);
  background: var(--line);
}

.movie-taste-panel div,
.watchlist-table,
.watched-card,
.movie-form-section {
  background: white;
}

.movie-taste-panel span,
.watchlist-title span,
.watched-card p,
.watched-card time {
  color: var(--muted);
}

.movie-taste-panel strong,
.watchlist-title strong,
.watched-card h3 {
  color: var(--ink);
}

.movie-notice {
  color: #286353;
  border-color: #bfe8dc;
  background: #e7f8f2;
}

.movie-error,
.movie-form-error {
  color: var(--rose-dark);
}

.watchlist-table-wrap,
.watchlist-table td,
.watchlist-table th {
  border-color: var(--line);
}

.watchlist-table th {
  color: #8c7d85;
  background: var(--soft);
}

.watchlist-table td {
  color: var(--ink);
}

.watchlist-table tbody tr:hover {
  background: #fff8fb;
}

.movie-poster {
  color: var(--rose-dark);
  background:
    radial-gradient(circle at 50% 25%, rgba(247, 203, 106, 0.6), transparent 28%),
    linear-gradient(145deg, #ffe7ef, #eaf7ff);
}

.movie-poster-placeholder small {
  color: var(--ink);
}

.movie-chip {
  color: #5c5961;
  border-color: #ddd2d8;
  background: #fffafd;
}

.priority-pill.high { color: #9f294f; background: #ffe1e9; }
.priority-pill.normal { color: #775815; background: #ffefbf; }
.priority-pill.low { color: #496979; background: #e4f3fb; }
.watch-status { color: var(--muted); }
.watch-status::before { background: #b6adb2; }
.watch-status.never-seen::before { background: var(--sky); }
.watch-status.rewatch::before { background: var(--rose); }

.movie-row-actions button {
  color: var(--ink);
  border-color: var(--line);
  background: white;
}

.watched-card:hover {
  border-color: #e7a6b9;
  box-shadow: 0 16px 34px rgba(112, 72, 91, 0.13);
}

.watched-poster {
  background: var(--soft);
}

.shared-favorite {
  color: white;
  background: rgba(233, 96, 135, 0.88);
}

.average-score {
  color: var(--rose-dark);
}

.couple-ratings span {
  color: var(--muted);
  background: #fff6f9;
}

.couple-ratings b {
  color: var(--ink);
}

.movie-empty {
  border-color: #decfd6;
  background: rgba(255, 255, 255, 0.45);
}

.movie-empty p {
  color: var(--muted);
}

.movie-editor-backdrop {
  background: rgba(67, 50, 60, 0.36);
}

.movie-editor-sheet {
  color: var(--ink);
  border-color: var(--line);
  background:
    radial-gradient(circle at 100% 0%, rgba(210, 239, 230, 0.55), transparent 22rem),
    #fffafd;
  box-shadow: -20px 0 60px rgba(92, 62, 77, 0.22);
}

.movie-close-button {
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
}

.movie-poster-fields > label:not(.movie-file-label) {
  color: var(--muted);
}

.movie-file-label {
  color: var(--rose-dark);
  border-color: #edb8c8;
  background: #fff1f5;
}

.movie-form-section,
.movie-person-card {
  border-color: var(--line);
  box-shadow: 0 8px 22px rgba(112, 72, 91, 0.06);
}

.movie-form-section > h3 {
  color: var(--ink);
}

.movie-check {
  color: #5f565b !important;
}

.movie-person-card {
  background: #fffafd;
}

.movie-existing-images label,
.movie-image-upload input[type="file"] {
  border-color: var(--line);
  background: white;
}

.movie-existing-images span,
.movie-existing-images small,
.movie-image-upload input[type="file"] {
  color: var(--muted);
}

.movie-editor-actions {
  border-color: var(--line);
  background: rgba(255, 250, 253, 0.94);
}

.tmdb-importer {
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    radial-gradient(circle at 95% 10%, rgba(143, 189, 231, 0.22), transparent 34%),
    linear-gradient(135deg, white, #f4fbff);
  box-shadow: 0 10px 26px rgba(112, 72, 91, 0.07);
}

.tmdb-importer-copy h3 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.tmdb-importer-copy p:last-child,
.tmdb-attribution,
.tmdb-message {
  color: var(--muted);
}

.tmdb-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 14px;
}

.tmdb-results {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.tmdb-result {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: white;
}

.tmdb-result img,
.tmdb-result-placeholder {
  width: 54px;
  height: 76px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--soft);
}

.tmdb-result-placeholder {
  display: grid;
  place-items: center;
}

.tmdb-result h4,
.tmdb-result p,
.tmdb-result small {
  margin: 0;
}

.tmdb-result p,
.tmdb-result small {
  color: var(--muted);
}

.tmdb-result small {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tmdb-message {
  margin: 10px 0 0;
  font-weight: 700;
}

.tmdb-attribution {
  margin: 12px 0 0;
  font-size: 0.7rem;
}

.tmdb-imported-badge {
  display: inline-block;
  margin-left: 8px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #2b6154;
  background: #dff6ef;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.65rem;
  vertical-align: middle;
}

.tmdb-community-score {
  margin: 14px 0 0;
  border-radius: 6px;
  padding: 10px 12px;
  color: #496979;
  background: #eaf6fc;
  font-size: 0.8rem;
}

.menu-tile {
  flex: 1 1 260px;
  min-height: 132px;
  border-radius: 8px;
  padding: 18px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
}

.menu-tile.active {
  border-color: var(--rose);
  box-shadow: 0 12px 26px rgba(233, 96, 135, 0.16);
}

.menu-tile strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.player-card,
.phase-card,
.submission-card,
.reveal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.player-card {
  min-width: 210px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  margin-left: auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 900;
  color: #694a16;
  background: #ffe9ab;
}

.status-pill.ready {
  color: #24544a;
  background: #dff6ef;
}

.player-info {
  min-width: 0;
}

.kick-button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--rose-dark);
  background: var(--soft);
  border: 1px solid #ffd4df;
  font-size: 0.78rem;
  font-weight: 900;
}

.kick-button:hover {
  color: white;
  background: var(--rose);
}

.phase-card {
  margin-top: 18px;
  padding: 18px;
}

.word-badge {
  display: inline-flex;
  margin: 8px 0 14px;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--rose-dark);
  background: var(--soft);
  font-weight: 900;
}

.time-grid {
  margin-top: 12px;
}

.choice-button {
  width: 48px;
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.choice-button.active {
  color: white;
  background: var(--rose);
  border-color: var(--rose);
}

.timer {
  margin: 16px 0;
  font-size: clamp(2rem, 9vw, 5rem);
  line-height: 1;
  font-weight: 900;
}

.submission-card,
.reveal-card {
  flex: 1 1 280px;
  overflow: hidden;
}

.submission-card {
  padding: 14px;
}

.submission-card img,
.reveal-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 8px;
  background: #fff8fb;
  border: 1px solid var(--line);
}

.hidden-submission {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.hidden-submission::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 250, 253, 0.34);
}

.blurred-submission {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) saturate(0.9);
  transform: scale(1.1);
}

.ready-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: white;
  font-size: clamp(1.4rem, 5vw, 2.4rem);
  font-weight: 900;
  text-shadow: 0 3px 18px rgba(47, 40, 48, 0.44);
}

.reveal-card {
  padding: 14px;
}

.reveal-focus {
  max-width: 680px;
  margin-bottom: 14px;
}

.guess-details {
  margin: 10px 0 12px;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--soft);
}

.guess-details p {
  margin: 4px 0;
}

.history-list {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.history-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.history-head h3,
.history-head p {
  margin-bottom: 4px;
}

.album-upload {
  margin-bottom: 18px;
}

.album-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 0.7fr) minmax(220px, 1.4fr) auto;
  gap: 10px;
  align-items: center;
}

.album-grid {
  column-width: 330px;
  column-gap: 18px;
}

.album-card,
.album-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.album-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  break-inside: avoid;
  box-shadow: 0 14px 34px rgba(112, 72, 91, 0.11);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.album-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(112, 72, 91, 0.18);
}

.album-frame {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: var(--soft);
}

.album-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 220ms ease;
}

.album-card:hover img {
  transform: scale(1.08);
}

.album-caption {
  padding: 14px;
}

.album-caption time {
  display: block;
  margin-bottom: 8px;
  color: var(--rose-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.album-caption blockquote {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
}

.album-edit {
  margin-top: 12px;
}

.album-edit summary {
  width: fit-content;
  color: var(--rose-dark);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.album-edit-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.album-empty {
  display: inline-block;
  width: 100%;
  min-height: 180px;
  padding: 18px;
}

.memory-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}

.memory-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(47, 40, 48, 0.72);
  backdrop-filter: blur(12px);
}

.memory-dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 1500px);
  max-height: 94vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 26px 80px rgba(47, 40, 48, 0.35);
}

.memory-dialog img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  background: #171316;
}

.memory-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 900;
}

.memory-dialog-caption {
  padding: 14px 18px;
}

.memory-dialog-caption time {
  display: block;
  margin-bottom: 6px;
  color: var(--rose-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.memory-dialog-caption blockquote {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 900;
}

.empty-art {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff8fb;
}

.chapter-panel {
  min-height: calc(100vh - 64px);
}

.chapter-tile {
  background: linear-gradient(135deg, #ffffff, #fff2f6 54%, #eff8ff);
}

.end-chapter-tile {
  border-color: #e4bfd0;
  background: linear-gradient(135deg, #fffafd, #f7e3ec 52%, #eaf5f2);
}

.end-chapter-panel {
  min-height: calc(100vh - 64px);
  background: radial-gradient(circle at top right, rgba(249, 211, 225, 0.5), transparent 34%), var(--panel);
}

.end-chapter-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0 28px;
}

.end-chapter-progress span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 900;
}

.end-chapter-progress span.active {
  border-color: #d99bb3;
  color: #713d52;
  background: #fbe7ef;
}

.end-chapter-progress span.done {
  border-color: #bce6da;
  color: #24544a;
  background: #dff6ef;
}

.end-intro-card,
.end-checkpoint-card,
.end-complete-card {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}

.end-intro-card .primary,
.end-checkpoint-card .primary,
.end-complete-card .primary {
  margin-top: 12px;
}

.checkpoint-confirmed {
  width: max-content;
  margin: 18px auto 2px;
  border-radius: 999px;
  padding: 8px 13px;
  color: #24544a;
  background: #dff6ef;
  font-weight: 900;
}

.end-game-heading {
  max-width: 760px;
  margin: 0 auto 22px;
  text-align: center;
}

.end-game-heading h3 {
  margin: 4px 0 8px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.scratch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 20px;
  align-items: start;
}

.scratch-stage,
.scratch-history {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.turn-pill {
  width: max-content;
  margin: 0 auto 14px;
  border-radius: 999px;
  padding: 7px 13px;
  color: var(--muted);
  background: #f3edf0;
  font-size: 0.82rem;
  font-weight: 900;
}

.turn-pill.your-turn {
  color: #713d52;
  background: #fbe2ec;
}

.scratch-card-wrap {
  position: relative;
  width: min(100%, 700px);
  aspect-ratio: 700 / 320;
  margin: auto;
}

.scratch-picker {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.scratch-picker > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 900;
}

.scratch-deck {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 12px;
}

.deck-card {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 2px solid #dca6b7;
  border-radius: 16px;
  padding: 14px;
  color: #713d52;
  background: linear-gradient(145deg, #f9dbe6, #dca6b7);
  box-shadow: 0 8px 18px rgba(103, 57, 75, 0.12);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.deck-card:hover:not(:disabled) {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: 0 13px 24px rgba(103, 57, 75, 0.2);
}

.deck-card:disabled {
  cursor: default;
  opacity: 0.72;
}

.deck-card span,
.deck-card small {
  font-weight: 900;
}

.deck-card strong {
  font-size: 1.9rem;
}

.scratch-card,
.scratch-canvas {
  width: 100%;
  height: 100%;
  border-radius: 20px;
}

.scratch-card {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 2px solid #e3b5c7;
  padding: 28px;
  text-align: center;
  background: linear-gradient(145deg, #fff8fb, #f6e3eb);
  box-shadow: 0 16px 34px rgba(103, 57, 75, 0.12);
}

.scratch-card h3 {
  max-width: 560px;
  margin: 8px 0 0;
  font-size: clamp(1.4rem, 4vw, 2.25rem);
  line-height: 1.3;
}

.scratch-card span {
  color: var(--rose-dark);
  font-weight: 900;
}

.scratch-card-wrap .scratch-card {
  position: absolute;
  inset: 0;
  min-height: 0;
}

.scratch-canvas {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: crosshair;
}

.scratch-status,
.rather-status,
.waiting-copy {
  margin: 14px 0 0;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.scratch-answer-box {
  display: grid;
  gap: 10px;
  max-width: 700px;
  margin: 14px auto 0;
}

.scratch-answer-box textarea {
  min-height: 110px;
  resize: vertical;
}

.scratch-history {
  max-height: 660px;
  overflow: auto;
}

.scratch-history h3 {
  margin-top: 0;
}

.scratch-history article {
  border-top: 1px solid var(--line);
  padding: 13px 0;
}

.scratch-history small {
  color: var(--muted);
  font-weight: 800;
}

.scratch-history p {
  margin: 5px 0 0;
  line-height: 1.45;
}

.rather-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}

.rather-choice {
  display: grid;
  place-items: center;
  min-height: 230px;
  border: 2px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.rather-choice:hover:not(:disabled) {
  transform: translateY(-4px);
  border-color: #d99bb3;
}

.rather-choice span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #713d52;
  background: #fbe2ec;
  font-weight: 900;
}

.rather-choice strong {
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  text-align: center;
}

.rather-choice.selected {
  border-color: #d58da9;
  background: #fff1f6;
}

.rather-choice:disabled:not(.selected) {
  opacity: 0.55;
}

.rather-reveal {
  max-width: 760px;
  margin: 22px auto 0;
  border: 1px solid #bce6da;
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  background: #eaf8f3;
}

.rather-reveal h3 {
  margin-top: 0;
}

.end-chapter-poem-mode {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 64px);
  border-color: #251c28;
  color: #fff9fc;
  background:
    radial-gradient(circle at 20% 10%, rgba(191, 93, 132, 0.18), transparent 36%),
    radial-gradient(circle at 85% 85%, rgba(110, 143, 174, 0.14), transparent 38%),
    #100c12;
  animation: poemBackdropIn 1.8s ease both;
}

.end-chapter-poem {
  position: relative;
  width: min(760px, 100%);
  padding: clamp(28px, 5vw, 64px) 20px;
  text-align: center;
}

.poem-lines,
.poem-home {
  position: relative;
  z-index: 1;
}

.poem-decorations {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
}

.poem-decor {
  position: absolute;
  left: var(--decor-x);
  top: var(--decor-y);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  opacity: 0;
  animation:
    poemDecorIn 2.4s ease forwards var(--decor-delay),
    poemDecorBreathe 5.5s ease-in-out infinite calc(var(--decor-delay) + 2.4s);
}

.poem-decor.heart {
  font-size: 1.35rem;
}

.poem-decor.tiny {
  font-size: 0.9rem;
}

.poem-decor.sparkle {
  font-size: 0.8rem;
}

.poem-decor.line {
  width: 64px;
  height: 1px;
  background: #fff;
  transform: rotate(-7deg);
}

.poem-decor.line.short {
  width: 38px;
  transform: rotate(8deg);
}

.poem-stanza {
  margin-bottom: clamp(16px, 2.2vh, 26px);
}

.poem-stanza p {
  margin: 0 0 7px;
  color: #fff9fc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  line-height: 1.35;
  opacity: 0;
  transform: translateY(10px);
  animation: poemLineIn 1.8s ease forwards;
  animation-delay: var(--poem-delay);
}

.poem-home {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff9fc;
  background: rgba(255, 255, 255, 0.08);
  opacity: 0;
  animation: poemLineIn 1s ease forwards;
  animation-delay: var(--poem-delay);
}

@keyframes poemBackdropIn {
  from { background-color: #fffafd; }
  to { background-color: #100c12; }
}

@keyframes poemLineIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes poemDecorIn {
  from { opacity: 0; }
  to { opacity: 0.2; }
}

@keyframes poemDecorBreathe {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .end-chapter-poem-mode,
  .poem-stanza p,
  .poem-home,
  .poem-decor {
    animation: none;
  }

  .poem-stanza p,
  .poem-home {
    opacity: 1;
    transform: none;
  }

  .poem-decor {
    opacity: 0.2;
  }
}

.chapter-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 20px;
}

.chapter-word {
  min-width: 92px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  text-align: center;
  color: var(--muted);
  background: white;
  font-weight: 900;
}

.chapter-word.recovered {
  color: #24544a;
  background: #dff6ef;
  border-color: #bce6da;
}

.chapter-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.chapter-card {
  margin-top: 0;
}

.letter-lines {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.letter-lines p {
  margin: 0;
  border-left: 4px solid var(--line);
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff8fb;
  line-height: 1.55;
}

.checkpoint-card {
  max-width: 780px;
}

.memory-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 12px 0 18px;
  border-radius: 8px;
  padding: 0 16px;
  color: #2b5349;
  background: #dff6ef;
  font-weight: 900;
  text-decoration: none;
}

.memory-link:hover {
  transform: translateY(-1px);
}

.checkpoint-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.password-card {
  max-width: 760px;
}

.final-progress {
  margin-bottom: 18px;
}

.chapter-night {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100vh - 64px);
  border-color: #08070a;
  background: #050507;
  animation: chapterFade 1400ms ease both;
}

.chapter-final {
  width: min(760px, 100%);
  padding: 32px 20px;
  color: #fffafd;
  text-align: center;
}

.chapter-final p {
  margin: 0 0 18px;
  font-size: clamp(1.25rem, 4vw, 2rem);
  line-height: 1.35;
  opacity: 0;
  transform: translateY(10px);
  animation: chapterLineIn 900ms ease forwards;
}

.chapter-final p:nth-child(1) {
  animation-delay: 900ms;
}

.chapter-final p:nth-child(2) {
  animation-delay: 2100ms;
}

.chapter-final p:nth-child(3) {
  animation-delay: 3300ms;
}

.chapter-final p:nth-child(4) {
  animation-delay: 4500ms;
}

.chapter-final p:nth-child(5) {
  animation-delay: 5900ms;
}

@keyframes chapterFade {
  from {
    background: rgba(255, 250, 253, 0.86);
  }
  to {
    background: #050507;
  }
}

@keyframes chapterLineIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 780px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding: 10px 0;
  }

  .setup-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .game-panel {
    padding: 14px;
  }

  .login-form,
  .name-row,
  .word-row,
  .upload-row,
  .album-form,
  .welcome-menu {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .topbar {
    align-items: flex-start;
  }

  .history-head {
    flex-direction: column;
  }

  .chapter-grid {
    grid-template-columns: 1fr;
  }

  .end-chapter-progress,
  .rather-grid,
  .scratch-layout {
    grid-template-columns: 1fr;
  }

  .end-chapter-progress span {
    font-size: 0.74rem;
    padding: 8px;
  }

  .rather-choice {
    min-height: 150px;
  }

  .scratch-deck {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  .movies-hero {
    padding: 22px 18px;
  }

  .movies-hero-top,
  .movies-toolbar,
  .movie-night-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .movies-hero-top .top-actions {
    justify-content: stretch;
  }

  .movies-hero-top .top-actions button {
    flex: 1;
  }

  .movie-stats {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 24px;
  }

  .movies-toolbar {
    padding: 14px 18px;
  }

  .movie-tabs button {
    flex: 1;
  }

  .movie-filters,
  .movie-filters input,
  .movie-filters select {
    width: 100%;
  }

  .movie-night-panel,
  .movie-taste-panel,
  .movie-notice,
  .movie-error {
    margin-right: 18px;
    margin-left: 18px;
  }

  .movie-night-actions button {
    flex: 1;
  }

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

  .movies-content {
    padding: 18px;
  }

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

  .couple-ratings {
    grid-template-columns: 1fr;
  }

  .movie-editor-sheet {
    width: 100%;
    padding: 18px;
  }

  .movie-editor-grid,
  .movie-people-grid,
  .movie-field-grid,
  .movie-image-upload {
    grid-template-columns: 1fr;
  }

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

  .tmdb-result {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .tmdb-result > button {
    grid-column: 1 / -1;
  }

  .movie-field-grid .wide {
    grid-column: auto;
  }

  .movie-poster-fields {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    align-items: start;
  }

  .movie-poster-fields .movie-poster-editor {
    grid-row: span 4;
  }

  .movie-poster-fields > label:not(.movie-file-label) {
    margin-top: 0;
  }

  .movie-file-label {
    margin-top: 0;
  }

  .movie-editor-actions {
    bottom: -18px;
    grid-template-columns: 1fr 1fr;
    margin: 8px -18px -18px;
    padding: 12px 18px;
  }

  .movie-editor-actions span {
    display: none;
  }
}

@media (max-width: 480px) {
  .watched-grid {
    grid-template-columns: 1fr;
  }

  .movie-stats div {
    padding: 14px;
  }

  .movie-filters,
  .movie-night-actions {
    flex-direction: column;
  }
}
