:root {
  color-scheme: dark;
  --bg: #171a1d;
  --panel: #202428;
  --line: #353a3f;
  --ink: #f3ece2;
  --muted: #b5b5b0;
  --accent: #ef9875;
  --mint: #b9d1b6;
  --radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  /* Avoid accidental double-tap zoom while retaining browser pan/pinch zoom. */
  touch-action: manipulation;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  padding: 10px 15px;
}
button:hover {
  border-color: var(--accent);
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  background: #171a1d;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 46px;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
label {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  margin: 15px 0 7px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-family: Georgia, serif;
  font-weight: normal;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 14px;
}
h2 {
  font-size: 1.3125rem;
  font-weight: 550;
}
h3 {
  font-size: 1.0625rem;
}
p {
  line-height: 1.55;
}
small,
.muted {
  color: var(--muted);
}
a {
  color: var(--accent);
}
.shell {
  max-width: 1440px;
  margin: auto;
  padding: 26px 40px 100px;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, serif;
  font-size: 1.5rem;
}
.brand img {
  width: 39px;
  height: 39px;
}
.header-actions,
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nav {
  display: flex;
  gap: 8px;
}
.nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
}
.nav button.active {
  color: var(--ink);
  background: #303539;
}
.badge {
  display: inline-flex;
  border: 1px solid var(--line);
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}
.demo {
  color: var(--accent);
  border-color: #65493d;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 13px;
}
.hero {
  padding: 35px 0 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
}
.hero p {
  max-width: 630px;
  color: var(--muted);
  margin-bottom: 0;
}
.hero .row {
  justify-content: flex-end;
}
.primary {
  background: var(--accent);
  color: #241d19;
  border-color: var(--accent);
  font-weight: 650;
}
.subtle {
  background: transparent;
}
.danger {
  color: #ffb2a5;
}
.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 45px 25px;
  text-align: center;
  color: var(--muted);
}
.start-panel {
  max-width: 760px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.start-panel h2 {
  font-family: Georgia, serif;
  font-size: 1.6875rem;
}
.options {
  display: flex;
  gap: 12px;
  margin: 25px 0;
  flex-wrap: wrap;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0;
  flex: 1;
  min-width: 210px;
  color: var(--ink);
}
.check input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--accent);
}
.preferences {
  position: sticky;
  top: calc(8px + env(safe-area-inset-top));
  z-index: 30;
  overflow-anchor: none;
  background: #282b2b;
  border: 1px solid #494944;
  border-radius: 14px;
  margin-bottom: 22px;
  box-shadow: 0 6px 15px #0003;
}
.preferences summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 53px;
  padding: 12px 16px;
  list-style: none;
}
.preferences .pref-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #dfd5c7;
  font-size: 0.875rem;
}
.pref-expanded {
  padding: 0 16px 16px;
}
.pref-expanded p {
  white-space: pre-wrap;
  margin-bottom: 12px;
}
.runtime-tag {
  font-size: 0.75rem;
  color: var(--mint);
}
.sessionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 23px;
  background: var(--panel);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.turn {
  font-size: 1.0625rem;
  color: var(--mint);
}
.count {
  color: var(--muted);
  font-size: 0.8125rem;
  margin-top: 5px;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}
.tabs button.active {
  border-color: var(--accent);
  color: var(--accent);
}
.browse-tools {
  display: grid;
  grid-template-columns: 2fr 1.3fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.shelf-note {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 22px 17px;
}
.card {
  min-width: 0;
  position: relative;
}
.poster {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 12px;
  background: #333;
  position: relative;
  overflow: hidden;
  border: 1px solid #ffffff0b;
}
.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.poster-fallback {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background: linear-gradient(145deg, #4a555a, #20282a);
  color: #e7ded0;
  font-family: Georgia, serif;
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.2;
}
.card:nth-child(3n + 2) .poster-fallback {
  background: linear-gradient(145deg, #6a5547, #302725);
}
.card:nth-child(3n) .poster-fallback {
  background: linear-gradient(145deg, #53583e, #252d26);
}
.poster .select-card {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: #161a1de8;
  font-size: 1.25rem;
}
.card.selected .poster {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.card.selected .select-card {
  background: var(--accent);
  color: #171a1d;
}
.card-title {
  font-size: 0.9375rem;
  line-height: 1.3;
  margin: 12px 0 5px;
  font-weight: 600;
}
.meta {
  font-size: 0.75rem;
  color: var(--muted);
  min-height: 18px;
}
.card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.card-actions button {
  padding: 8px 10px;
  font-size: 0.8125rem;
  flex: 1;
}
.card-actions .info {
  flex: 0;
  min-width: 42px;
}
.pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 5px 8px;
  font-size: 0.6875rem;
  border-radius: 7px;
  background: #171a1de8;
  color: var(--mint);
}
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}
.elimination-dock {
  position: sticky;
  bottom: 80px;
  margin: 25px auto 0;
  border-radius: 18px;
  border: 1px solid #80634e;
  background: #2d2925;
  padding: 15px;
  box-shadow: 0 8px 50px #0009;
  z-index: 5;
  max-width: 900px;
}
.elimination-dock .row {
  margin-top: 10px;
}
.reason {
  font-size: 0.8125rem;
  padding: 8px 10px;
}
.reason.selected {
  border-color: var(--accent);
  color: var(--accent);
}
.completion {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 30px;
  max-width: 800px;
}
.completion .poster {
  max-width: 160px;
}
.completion h2 {
  font-family: Georgia, serif;
  font-size: 2rem;
}
.history-list {
  display: grid;
  gap: 14px;
}
.history-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 20px;
}
.history-card h3 {
  margin-bottom: 7px;
}
.timeline {
  border-left: 1px solid var(--line);
  padding-left: 16px;
  margin: 20px 0 0;
  font-size: 0.8125rem;
}
.timeline p {
  margin-bottom: 12px;
}
.undone {
  opacity: 0.45;
  text-decoration: line-through;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.stat {
  background: #171a1d;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
}
.stat strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.6875rem;
  margin-bottom: 6px;
}
.stat span {
  font-size: 0.75rem;
  color: var(--muted);
}
.login {
  max-width: 460px;
  margin: 10vh auto;
  padding: 30px;
}
.login .brand {
  margin-bottom: 40px;
}
.login h1 {
  font-size: 2.6875rem;
}
.login .primary {
  width: 100%;
  margin-top: 25px;
}
.login p {
  color: var(--muted);
}
.login .profile-choices {
  display: flex;
  gap: 10px;
}
.login .profile-choices button {
  flex: 1;
}
.login .profile-choices button.selected {
  border-color: var(--accent);
  color: var(--accent);
}
dialog {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  width: min(540px, calc(100% - 28px));
  max-height: 85dvh;
  padding: 25px;
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(4px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.modal-head h2 {
  margin-bottom: 0;
}
.modal-head button {
  padding: 5px 12px;
}
.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 25px;
}
.form-error {
  color: #ffb2a5;
  margin: 12px 0 0;
  font-size: 0.875rem;
}
.loading {
  padding: 50px;
  color: var(--muted);
}
#toast {
  position: fixed;
  pointer-events: none;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: #171a1d;
  padding: 14px 20px;
  border-radius: 12px;
  z-index: 80;
  max-width: min(90vw, 640px);
  width: max-content;
  box-shadow: 0 5px 30px #0006;
  display: none;
}
#toast.visible {
  display: block;
}
#handoff {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
}
#handoff[hidden] {
  display: none;
}
#handoff h1 {
  font-size: 2.8125rem;
}
.footnote {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 30px;
}
.settings-panel {
  max-width: 700px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 25px;
  border-radius: 18px;
}
.settings-panel hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 25px 0;
}
@media (min-width: 1000px) {
  .elimination-dock {
    bottom: 20px;
  }
  .shell {
    padding-bottom: 60px;
  }
}
@media (max-width: 700px) {
  .shell {
    padding: 18px 17px calc(100px + env(safe-area-inset-bottom));
  }
  .header {
    padding-bottom: 17px;
  }
  .brand {
    font-size: 1.3125rem;
  }
  .header-actions .badge {
    display: none;
  }
  .nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #202428f5;
    border-top: 1px solid var(--line);
    padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
    z-index: 8;
    justify-content: space-around;
    backdrop-filter: blur(10px);
  }
  .nav button {
    font-size: 0.8125rem;
    flex: 1;
    padding: 12px 4px;
  }
  .hero {
    padding: 28px 0 20px;
    display: block;
  }
  .hero .row {
    justify-content: flex-start;
    margin-top: 18px;
  }
  h1 {
    font-size: 2.25rem;
  }
  .sessionbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 15px;
  }
  .sessionbar .row {
    width: 100%;
  }
  .browse-tools {
    grid-template-columns: 1fr 1fr;
  }
  .browse-tools input {
    grid-column: 1/-1;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 14px;
  }
  .preferences summary {
    gap: 8px;
    padding: 10px 12px;
  }
  .completion {
    grid-template-columns: 95px 1fr;
    gap: 18px;
    padding: 20px;
  }
  .completion h2 {
    font-size: 1.6875rem;
  }
  .completion .row {
    grid-column: 1/-1;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .start-panel {
    padding: 22px;
  }
  .elimination-dock {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
  .login {
    padding: 25px;
    margin-top: 5vh;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      border-color 0.15s,
      background 0.15s;
  }
  .card {
    animation: appear 0.25s ease-out;
  }
  .card.artwork-steady {
    animation: none;
  }
  @keyframes appear {
    from {
      opacity: 0.6;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

.mystery-focus {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 22px;
}
.library-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}
.library-switch input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--accent);
}
.focus-libraries {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.focus-libraries button {
  font-size: 0.8125rem;
}
.focus-libraries .suppressed {
  border-color: var(--accent);
  color: var(--accent);
  background: #362c27;
}
.mystery-focus .row label[for] {
  margin: 0;
}
.mystery-focus select {
  width: auto;
  max-width: 100%;
}
.mystery-focus .shelf-note {
  margin: 12px 0 0;
}
.library-badge {
  display: inline-block;
  margin-top: 8px;
  color: var(--mint);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 0.75rem;
}
.card.dimmed .poster {
  filter: saturate(0.25);
}
.card.dimmed::after {
  content: "Dimmed for focus";
  color: var(--muted);
  font-size: 0.8rem;
}
.card.dimmed .library-badge {
  color: var(--muted);
}

.poster .poster-toggle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
}
.poster-toggle:hover {
  background: #ffffff0a;
}
.poster-toggle:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -4px;
}
.poster-check {
  position: absolute;
  right: 9px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #161a1de8;
  color: var(--ink);
  font-size: 1.25rem;
}
.card.selected .poster-check {
  background: var(--accent);
  color: #171a1d;
}
.poster .pill {
  pointer-events: none;
}

.random-entry {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.skip-balances {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin: 20px 0 12px;
}
.skip-balances span {
  display: grid;
  gap: 6px;
}
.skip-balances small {
  font-size: 0.75rem;
}
.random-offer {
  display: grid;
  grid-template-columns: minmax(130px, 220px) 1fr;
  gap: 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.random-offer h2 {
  font-family: Georgia, serif;
  font-size: 1.875rem;
  margin-top: 20px;
}
.random-overrides {
  margin-top: 24px;
}
.dice {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--accent);
  color: #211d19;
  font-size: 2.375rem;
  font-weight: 700;
  clip-path: polygon(50% 0, 95% 26%, 100% 68%, 50% 100%, 0 68%, 5% 26%);
}
.dice.rolling {
  animation: d10-roll 0.32s ease-in-out infinite;
  font-size: 1.5625rem;
}
@keyframes d10-roll {
  0% {
    transform: rotate(-30deg) scale(0.8);
  }
  50% {
    transform: rotate(80deg) scale(1.05);
  }
  100% {
    transform: rotate(330deg) scale(0.8);
  }
}
@media (max-width: 600px) {
  .random-offer {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .random-offer > .poster {
    max-width: 190px;
    margin: auto;
  }
  .dice {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dice.rolling {
    animation: none;
  }
}

.sync-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #80634e;
  background: #302923;
  border-radius: 14px;
}
.sync-warning p {
  margin: 8px 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.sync-warning small {
  line-height: 1.5;
  display: block;
}
.sync-warning button {
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .sync-warning {
    align-items: stretch;
    flex-direction: column;
  }
}

.mystery-rules {
  padding: 18px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.mystery-rules .shelf-note {
  margin: 10px 0 0;
}
.mystery-rule-inputs {
  max-width: 520px;
}
.mystery-rule-inputs button {
  margin-top: 15px;
}
.mystery-rule-inputs input {
  max-width: 110px;
  display: block;
}

.poster-hint {
  position: relative;
  width: 100%;
  height: 100%;
  background: #101619;
  overflow: hidden;
}
.poster-hint img {
  filter: blur(var(--hint-blur, 40px)) saturate(0.7);
  opacity: var(--hint-opacity, 0);
  transform: scale(1.18);
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.poster-hint span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d5d4c9;
  font-size: 1.5625rem;
}
.hint-preview {
  max-width: 150px;
  margin-top: 14px;
}
#poster-hint,
#mutual-poster-hint {
  max-width: 100%;
  padding: 0;
  accent-color: var(--accent);
}
#poster-hint-value,
#mutual-poster-hint-value {
  display: block;
  color: var(--mint);
  font-size: 0.8125rem;
  margin-top: 7px;
}

.mode-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.mode-buttons button {
  flex: 1;
  min-width: 170px;
}
.mystery-rules summary {
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
}
.mystery-rules summary span {
  font-size: 0.75rem;
  color: var(--muted);
}
.mystery-rules {
  padding: 10px 14px;
}
.mystery-rules[open] {
  padding-bottom: 18px;
}
.card.elimination-selected .poster {
  outline: 3px solid #ffb2a5;
  outline-offset: 2px;
}
.card.elimination-selected .poster-check {
  background: #ffb2a5;
  color: #241d19;
}
.removal-pill {
  color: #ffb2a5;
}
.chooser-reminder {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--mint);
}
@media (max-width: 700px) {
  .hero {
    padding: 20px 0 15px;
  }
  .hero h1 {
    font-size: 1.875rem;
  }
  .hero p {
    font-size: 0.875rem;
  }
  .sessionbar {
    gap: 10px;
  }
  .sessionbar .row > button {
    flex: 1;
  }
  .mystery-rules summary {
    flex-wrap: wrap;
  }
  .mystery-rules {
    margin-bottom: 14px;
  }
  .preferences {
    margin-bottom: 14px;
  }
}

.hint-1 {
  --hint-opacity: 0.01;
  --hint-blur: 23.2px;
}
.hint-2 {
  --hint-opacity: 0.02;
  --hint-blur: 22.4px;
}
.hint-3 {
  --hint-opacity: 0.03;
  --hint-blur: 21.6px;
}
.hint-4 {
  --hint-opacity: 0.04;
  --hint-blur: 20.8px;
}
.hint-5 {
  --hint-opacity: 0.05;
  --hint-blur: 20px;
}
.hint-6 {
  --hint-opacity: 0.06;
  --hint-blur: 19.2px;
}
.hint-7 {
  --hint-opacity: 0.07;
  --hint-blur: 18.4px;
}
.hint-8 {
  --hint-opacity: 0.08;
  --hint-blur: 17.6px;
}
.hint-9 {
  --hint-opacity: 0.09;
  --hint-blur: 16.8px;
}
.hint-10 {
  --hint-opacity: 0.1;
  --hint-blur: 16px;
}
.hint-11 {
  --hint-opacity: 0.11;
  --hint-blur: 15.2px;
}
.hint-12 {
  --hint-opacity: 0.12;
  --hint-blur: 14.4px;
}
.hint-13 {
  --hint-opacity: 0.13;
  --hint-blur: 13.6px;
}
.hint-14 {
  --hint-opacity: 0.14;
  --hint-blur: 12.8px;
}
.hint-15 {
  --hint-opacity: 0.15;
  --hint-blur: 12px;
}
.hint-16 {
  --hint-opacity: 0.16;
  --hint-blur: 11.2px;
}
.hint-17 {
  --hint-opacity: 0.17;
  --hint-blur: 10.4px;
}
.hint-18 {
  --hint-opacity: 0.18;
  --hint-blur: 9.6px;
}
.hint-19 {
  --hint-opacity: 0.19;
  --hint-blur: 8.8px;
}
.hint-20 {
  --hint-opacity: 0.2;
  --hint-blur: 8px;
}
.hint-21 {
  --hint-opacity: 0.21;
  --hint-blur: 7.2px;
}
.hint-22 {
  --hint-opacity: 0.22;
  --hint-blur: 6.4px;
}
.hint-23 {
  --hint-opacity: 0.23;
  --hint-blur: 5.6px;
}
.hint-24 {
  --hint-opacity: 0.24;
  --hint-blur: 4.8px;
}
.hint-25 {
  --hint-opacity: 0.25;
  --hint-blur: 4px;
}

.outside-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.outside-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.outside-row small {
  display: block;
  margin-top: 4px;
}
.outside-row .row {
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .outside-row {
    flex-wrap: wrap;
  }
  .outside-row .row {
    width: 100%;
  }
}

.swipe-area {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin: 20px 0;
  overflow: clip;
  width: 100%;
}
.swipe-card {
  position: relative;
  width: min(100%, 360px);
  text-align: center;
}
.swipe-card .poster {
  touch-action: pan-y;
  user-select: none;
}
.swipe-card .poster img {
  pointer-events: none;
}
.swipe-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.round-progress {
  color: var(--mint);
  font-size: 0.8125rem;
  margin: 6px 0;
  max-width: 60ch;
}
.poster-unavailable {
  position: absolute;
  bottom: 16px;
  left: 8px;
  right: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 0.6875rem;
}
.mystery-rules summary span {
  text-align: right;
  max-width: 65%;
  line-height: 1.5;
}
@media (max-width: 600px) {
  .mystery-rules summary {
    align-items: flex-start;
  }
  .mystery-rules summary span {
    max-width: 60%;
  }
}

.browse-tools {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.browse-tools #search {
  grid-column: 1/-1;
}
.browse-tools label {
  margin: 0 0 6px;
}
.browse-tools select {
  min-width: 0;
}
.pagination {
  justify-content: center;
  margin: 18px 0;
}
.pagination span {
  font-size: 0.8125rem;
  color: var(--muted);
}
@media (max-width: 700px) {
  .browse-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding: 18px;
  white-space: normal;
  min-height: 150px;
}
.mode-card strong {
  font-size: 1.0625rem;
}
.mode-card span {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.mode-card .mode-next {
  margin-top: auto;
  color: var(--accent);
}
.browse-tools {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 700px) {
  .mode-grid {
    grid-template-columns: 1fr 1fr;
  }
  .browse-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .mode-grid {
    grid-template-columns: 1fr;
  }
}

.mystery-reset {
  flex-shrink: 0;
  width: 44px;
  padding: 0;
  font-size: 1.375rem;
  background: transparent;
}
.mystery-rules summary span {
  margin-left: auto;
}
.mystery-rules summary strong {
  min-width: 0;
}

.session-actions {
  gap: 10px;
}
.danger {
  background: #4a2428;
  color: #ffd8dc;
  border-color: #b95760;
}
.danger:hover {
  background: #622d34;
  border-color: #e4828c;
}

[hidden] {
  display: none !important;
}
.return-top {
  position: fixed;
  right: 20px;
  bottom: calc(90px + env(safe-area-inset-bottom));
  z-index: 7;
  box-shadow: 0 5px 25px #0008;
  background: var(--panel);
  border-color: var(--accent);
}
.completion.celebrate {
  animation: choice-reveal 0.7s ease-out;
}
.completion.celebrate .poster {
  animation: choice-poster 0.8s ease-out;
}
@keyframes choice-reveal {
  from {
    opacity: 0.4;
    transform: translateY(18px);
    box-shadow: 0 0 35px #dba57c66;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 0 0 #dba57c00;
  }
}
@keyframes choice-poster {
  from {
    transform: scale(0.94) rotate(-2deg);
  }
  to {
    transform: scale(1) rotate(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .completion.celebrate,
  .completion.celebrate .poster {
    animation: none;
  }
}

summary {
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary::before {
  content: "▸";
  display: inline-block;
  color: var(--accent);
  margin-right: 8px;
  flex-shrink: 0;
}
details[open] > summary::before {
  content: "▾";
}
:is(.session-actions, .swipe-toolbar) .compact-action {
  min-height: 44px;
  width: 44px;
  min-width: 44px;
  padding: 7px;
  background: transparent;
  font-size: 1.375rem;
  flex: 0 0 44px;
}
:is(.session-actions, .swipe-toolbar) .cancel-icon {
  color: #ff9ca9;
  font-weight: 800;
  border-color: transparent;
}
:is(.session-actions, .swipe-toolbar) .cancel-icon:hover {
  background: #4a2428;
  border-color: #b95760;
}
.tabs {
  align-items: center;
  flex-wrap: wrap;
}
.tabs .outside-tab {
  margin-left: auto;
  color: var(--mint);
  font-size: 0.8125rem;
  padding: 8px 12px;
}
.pref-edit {
  color: var(--muted);
  padding: 4px 10px;
  font-size: 0.8125rem;
  min-height: 44px;
  border-color: transparent;
}
.preferences.floating summary {
  padding-top: 5px;
  padding-bottom: 5px;
  min-height: 44px;
}
.preferences.floating .pref-expanded {
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.preferences.floating .pref-expanded p {
  margin: 0;
  font-size: 0.8125rem;
}
.preferences.floating .pref-expanded > p:first-child {
  max-height: 3em;
  overflow: auto;
  flex: 1;
}
.preferences.floating .pref-edit {
  margin-left: auto;
}
.shell {
  padding-top: max(26px, env(safe-area-inset-top));
}
@media (max-width: 700px) {
  .shell {
    padding-top: max(18px, env(safe-area-inset-top));
  }
  .sessionbar .session-actions {
    width: auto;
    margin-left: auto;
  }
  .sessionbar .session-actions > button {
    flex: 0 0 44px;
  }
  .tabs .outside-tab {
    padding: 8px;
    max-width: 110px;
    line-height: 1.2;
  }
}

.tabs > button:not(.outside-tab) {
  font-size: 0.875rem;
  padding: 8px 10px;
}
@media (max-width: 360px) {
  .tabs > button:not(.outside-tab) {
    font-size: 0.8125rem;
    padding: 8px 6px;
  }
  .tabs .outside-tab {
    max-width: 92px;
    font-size: 0.75rem;
    padding: 6px 4px;
  }
}

.plex-sync {
  width: 44px;
  height: 44px;
  padding: 9px;
  color: #e5a00d;
  border-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.plex-sync:hover {
  border-color: var(--line);
}
.plex-sync:disabled svg {
  opacity: 0.6;
}
.purge-data {
  display: block;
  margin-top: 18px;
}
.pref-reset {
  margin-left: 0;
  color: var(--muted);
}

.preferences summary.with-pref-reset {
  position: relative;
  padding-right: 64px;
}
.preferences .pref-reset {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: 44px;
  min-height: 44px;
  border-color: transparent;
  background: transparent;
}
#connection-status {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left));
  background: #493529;
  color: #fff0dd;
  border-bottom: 1px solid #976c4d;
}
#connection-status[hidden] {
  display: none;
}
#connection-status button {
  flex-shrink: 0;
}

.swipe-history {
  margin-top: 24px;
  min-width: 0;
}
.swipe-discard {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 16px;
  list-style: none;
}
.swipe-discard li {
  flex: 0 0 108px;
  padding: 8px;
  background: var(--panel);
  border-radius: 12px;
}
.swipe-discard .poster {
  height: 112px;
  aspect-ratio: auto;
}
.swipe-discard strong {
  display: block;
  margin-top: 8px;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.swipe-discard span {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
}
.swipe-discard .interested {
  color: var(--accent);
}
select[multiple] {
  min-height: 100px;
}

#update-notice {
  position: fixed;
  z-index: 90;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--accent);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 8px 32px #0008;
}
#update-notice[hidden] {
  display: none;
}
#update-notice p {
  margin: 6px 0 0;
  font-size: 0.9rem;
}
#update-notice button {
  flex-shrink: 0;
}
@media (max-width: 540px) {
  #update-notice {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
}
.removed-items {
  margin: 28px 0;
  padding: 16px;
  border: 1px solid #45494c;
  border-radius: 14px;
}
.removed-items summary {
  cursor: pointer;
  font-weight: 600;
}
.removed-items summary::before {
  content: "▸ ";
}
.removed-items[open] summary::before {
  content: "▾ ";
}
.removed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.removed-card {
  padding: 14px;
  background: var(--panel);
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
}
.removed-card h3 {
  margin: 0;
  font-size: 1rem;
}
.removed-card p,
.removed-card small {
  font-size: 0.8rem;
}
.surprise-art {
  font-size: 5rem;
  color: var(--accent);
  padding: 24px;
}

.library-checklist {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.library-checklist summary {
  cursor: pointer;
}
.library-checklist summary::before {
  content: "▸ ";
}
.library-checklist[open] summary::before {
  content: "▾ ";
}
.library-checklist fieldset {
  border: 0;
  padding: 0;
  margin: 12px 0;
  max-height: 240px;
  overflow-y: auto;
}
.library-checklist label.check {
  margin: 0;
  padding: 10px 4px;
}
.deck-count {
  font-weight: 700;
  color: var(--accent);
}
.large-deck-warning {
  border: 1px solid var(--accent);
  padding: 14px;
  border-radius: 12px;
  margin: 14px 0;
}
.undo-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.undo-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.session-actions .undo-action.compact-action {
  width: auto;
  min-width: 84px;
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
}
.turn-reminder {
  position: sticky;
  top: 72px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 20px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.turn-reminder p {
  margin: 4px 0 0;
  font-size: 0.9rem;
}
.turn-reminder.your-turn {
  border-color: var(--accent);
  box-shadow: 0 4px 20px #0005;
}
.shell:has(.preferences[open]) .turn-reminder {
  position: relative;
  top: auto;
  z-index: auto;
}
.turn-reminder strong {
  color: var(--accent);
}
.turn-reminder button {
  flex-shrink: 0;
}
.quick-eliminate {
  font-size: 0.85rem;
}
.emoji-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.emoji-palette button,
.reaction-chip {
  font-size: 1.25rem;
  padding: 6px 10px;
}
.note-reaction-summary {
  font-size: 1rem;
}
@media (max-width: 540px) {
  .turn-reminder {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
}
body:has(.elimination-dock) .return-top {
  display: none;
}

.swipe-card.swipe-returning {
  transition: transform 160ms ease-out;
}
.swipe-feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 8px 12px;
  border: 3px solid currentColor;
  border-radius: 8px;
  background: #171a1de8;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-8deg);
}
.swipe-card[data-swipe-direction="right"] .swipe-feedback {
  color: var(--mint);
}
.swipe-card[data-swipe-direction="left"] .swipe-feedback {
  color: #ff9ca9;
  transform: translate(-50%, -50%) rotate(8deg);
}
.synopsis {
  white-space: pre-wrap;
  line-height: 1.6;
}
@media (prefers-reduced-motion: reduce) {
  .swipe-card {
    animation: none;
    transition: none;
  }
}

.completed-choice {
  max-width: 800px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  overflow: hidden;
}
.completed-choice > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 15px 20px;
  list-style: none;
  font-size: 0.875rem;
  color: var(--muted);
}
.completed-choice > summary::-webkit-details-marker {
  display: none;
}
.completed-choice > summary > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.completed-choice summary strong {
  color: var(--ink);
}
.completed-choice .choice-show,
.completed-choice .choice-hide {
  flex-shrink: 0;
  color: var(--mint);
  font-size: 0.8125rem;
}
.completed-choice[open] .choice-show,
.completed-choice:not([open]) .choice-hide {
  display: none;
}
.completed-choice .completion {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.completed-choice > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

/* Keep the current swipe and its actions visible on a short phone. */
body:has(.mutual-round) .header {
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.swipe-toolbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  background: var(--bg);
}
.swipe-context summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: 600;
  list-style: none;
}
.swipe-context summary::before {
  content: "▸";
  margin-right: 6px;
  color: var(--accent);
}
.swipe-context[open] summary::before {
  content: "▾";
}
.swipe-details {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 60svh;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 24px #0008;
}
.swipe-details .preferences {
  position: static;
  margin-bottom: 0;
}
.match-meter {
  max-width: min(36vw, 166px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--accent);
  border-radius: 12px;
}
.match-meter > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.match-meter .eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  margin: 0;
}
.match-meter strong {
  font-size: 1.25rem;
  color: var(--accent);
}
.match-meter .censored-count {
  font-family: monospace;
  letter-spacing: 0.08em;
}
.match-meter small {
  display: none;
}
.swipe-progress {
  margin: 8px 0;
  font-size: 0.8rem;
}
.swipe-progress p {
  margin: 3px 0 0;
}
.mutual-round .swipe-area {
  gap: 8px;
  margin: 12px 0;
}
.mutual-round .swipe-card .poster {
  --art-height: clamp(120px, calc(100svh - 475px), 280px);
  height: var(--art-height);
  width: calc(var(--art-height) * 2 / 3);
  margin: 0 auto;
}
.swipe-title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.swipe-title h2 {
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0;
}
.swipe-title .swipe-info {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 8px;
}
.swipe-meta {
  font-size: 0.8rem;
  margin: 4px 0 10px;
  color: var(--muted);
}
.swipe-buttons {
  gap: 8px;
}
.swipe-buttons button {
  min-height: 44px;
  flex: 1;
  padding: 10px 8px;
  white-space: nowrap;
}
.mutual-round .swipe-card .footnote {
  margin: 8px 0 0;
}
.swipe-undo {
  justify-content: center;
}
.swipe-undo button {
  min-height: 44px;
  font-size: 0.8rem;
}

/* Expand where tapped, with room left for library controls and navigation. */
.preferences .pref-expanded {
  max-height: min(40svh, 22rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.preferences.floating .pref-expanded {
  display: block;
}
.preferences.floating .pref-expanded > p:first-child {
  max-height: none;
  overflow: visible;
}
.card-actions .choose-secondary {
  font-weight: 400;
  min-height: 44px;
}
.elimination-dock {
  padding: 10px 12px;
}
.elimination-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.elimination-actions strong {
  margin-right: auto;
  font-size: 0.9rem;
}
.elimination-actions button {
  min-height: 44px;
  padding: 10px 12px;
}
.elimination-reasons {
  margin-top: 8px;
}
.elimination-reasons summary {
  min-height: 44px;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
}
.elimination-reasons .quick-eliminate {
  margin-bottom: 0;
}
@media (max-width: 700px) {
  .nav {
    z-index: 50;
  }
  body:not(:has(.elimination-dock)):has(.return-top:not([hidden])) .nav {
    padding-right: 64px;
  }
  .return-top {
    bottom: calc(9px + env(safe-area-inset-bottom));
    right: 10px;
    z-index: 51;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 0;
    border-radius: 12px;
  }
  .return-top::before {
    content: "↑";
    font-size: 1.25rem;
  }
  .turn-reminder {
    padding: 10px 12px;
    gap: 6px;
  }
  .turn-reminder p {
    font-size: 0.8rem;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .swipe-card {
    display: grid;
    width: min(100%, 650px);
    grid-template-columns: 120px 1fr;
    gap: 4px 16px;
    text-align: left;
  }
  .mutual-round .swipe-card .poster {
    grid-column: 1;
    grid-row: 1/6;
    --art-height: 160px;
  }
  .swipe-title,
  .swipe-meta,
  .swipe-buttons,
  .mutual-round .swipe-card .footnote {
    grid-column: 2;
  }
  .swipe-title {
    justify-content: space-between;
    margin: 0;
  }
}

@media (min-width: 1500px) {
  .shell:has(.mutual-round) {
    padding-right: 210px;
  }
  .swipe-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .match-meter {
    position: fixed;
    top: 104px;
    right: max(18px, calc((100vw - 1440px) / 2 + 18px));
    width: 166px;
    padding: 16px;
    background: var(--panel);
    flex-direction: column;
    align-items: start;
  }
  .match-meter > div {
    flex-direction: column;
    align-items: start;
  }
  .match-meter strong {
    font-size: 2.4rem;
  }
  .match-meter small {
    display: block;
    color: var(--muted);
  }
}

.swipe-context summary h1 {
  min-width: 0;
  overflow-wrap: anywhere;
  font: inherit;
  margin: 0;
}
.swipe-context summary::-webkit-details-marker {
  display: none;
}

.elimination-dock.blind-dock {
  padding: 6px 12px;
}

.elimination-reasons .reason {
  min-height: 44px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.watched-status {
  color: var(--mint);
  background: var(--panel);
  border: 1px solid var(--mint);
  padding: 10px 14px;
}
.holder-status {
  font-size: 0.85rem;
  color: var(--muted);
}
.round-status {
  color: var(--mint);
  font-size: 1rem;
}
.update-pill {
  font-size: 0.75rem;
  padding: 8px;
  min-height: 44px;
  color: var(--mint);
}
.about-app {
  margin-bottom: 20px;
}
.about-app summary {
  cursor: pointer;
  min-height: 44px;
}
.swipe-buttons button {
  white-space: normal;
  min-width: 0;
}
@media (max-width: 700px) {
  #update-notice {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
  .nav button {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
@supports (font: -apple-system-body) {
  :root {
    font: -apple-system-body;
  }
}

.setup-options > summary {
  cursor: pointer;
  min-height: 44px;
  font-weight: 600;
}
.setup-summary {
  color: var(--muted);
  font-size: 0.9rem;
}
.setup-modal .modal-foot {
  position: sticky;
  bottom: 0;
  z-index: 30;
  flex-wrap: wrap;
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.setup-modal .modal-foot .deck-count,
.setup-modal #random-count,
.setup-modal .large-deck-warning {
  flex-basis: 100%;
  margin: 0 0 8px;
}
.setup-modal .large-deck-warning {
  font-size: 0.85rem;
  padding: 10px;
}

.setup-chooser-prompt {
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 14px;
  margin: 16px 0;
}
.setup-chooser-prompt h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.setup-chooser-prompt p {
  margin-bottom: 10px;
}
.setup-chooser-prompt .row {
  flex-wrap: wrap;
}
.setup-chooser-prompt button {
  flex: 1 1 130px;
}
.setup-chooser-prompt button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}
.setup-chooser-prompt .footnote {
  margin: 10px 0 0;
}
.setup-chooser-summary {
  color: var(--mint);
  font-size: 0.9rem;
}

/* Library controls leave room for posters on narrow screens. */
.browse-tools {
  display: block;
}
.browse-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.browse-search select {
  width: auto;
  max-width: 145px;
}
.browse-filters > summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 0;
}
.browse-filter-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.filter-chips button {
  font-size: 0.8rem;
  padding: 6px 10px;
}
.recipes,
.keep-going,
.reconcile-panel {
  padding: 20px;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
.recipes > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  min-height: 44px;
}
.recipes > summary h2 {
  flex: 1;
  margin: 0;
}
.recipes > summary::before {
  order: 1;
  margin: 0;
}
.recipe-count {
  color: var(--muted);
  font-size: 0.8125rem;
}
.recipe-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}
.recipe-row small,
.keep-going-list small,
.saved-by {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}
.recipe-row > div:first-child {
  flex: 1 1 180px;
}
.keep-going-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.keep-going-list button {
  text-align: left;
}
.build-summary {
  margin: 12px 0 20px;
  border-left: 2px solid var(--accent);
  padding-left: 12px;
}
.build-summary p {
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}
.decision-details p,
.play-hint {
  font-size: 0.875rem;
}
.play-hint {
  color: var(--mint);
  flex-basis: 100%;
}
.card-actions {
  flex-wrap: wrap;
}
.button-link {
  display: inline-block;
  padding: 12px 0;
}
@media (max-width: 430px) {
  .browse-search {
    grid-template-columns: minmax(0, 1fr);
  }
  .browse-search select {
    width: 100%;
    max-width: none;
  }
  .browse-filter-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero h1 {
    font-size: clamp(1.875rem, 8vw, 3rem);
  }
}

.netflix-preview {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}
.netflix-preview li {
  margin-bottom: 10px;
}
.netflix-preview small {
  display: block;
  color: var(--muted);
}
.netflix-settings summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 0;
}
.netflix-snapshot,
.source-note {
  color: var(--muted);
  font-size: 0.8rem;
}
.source-note {
  display: block;
  margin-top: 4px;
}

.sequel-details {
  margin-block: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.sequel-details li {
  margin-block: 0.75rem;
}
.sequel-details li button {
  display: block;
}
.sequel-warning {
  color: var(--accent);
}
.playback-links {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.playback-links .footnote {
  flex-basis: 100%;
}

/* Keep saved attribution out of the card's fixed action row. */
.card-actions {
  align-items: center;
}
.card-actions .info {
  margin-left: auto;
}
.card > .saved-by {
  margin-top: 6px;
  line-height: 1.4;
}
.title-info-modal .title-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-top: 12px;
}
.title-runtime {
  font-size: 1.4rem;
}
.title-runtime small {
  font-size: 0.85rem;
  font-weight: 400;
}
.title-facts > span,
.title-categories {
  font-size: 0.85rem;
  color: var(--muted);
}
.title-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 6px 0 12px;
}
.title-categories:empty {
  display: none;
}
.title-ratings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-block: 12px;
}
.title-rating {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  background: #171a1d;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.title-rating > span {
  font-size: 0.8rem;
  color: var(--muted);
}
.title-rating > strong {
  font-size: 2.25rem;
  line-height: 1.15;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.title-rating strong small {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 3px;
}
.compact-ratings {
  gap: 6px;
  margin: 8px 0 0;
}
.compact-ratings .title-rating {
  padding: 6px 8px;
  border-radius: 8px;
}
.compact-ratings .title-rating > strong {
  font-size: 1.15rem;
}
.compact-ratings .title-rating > span,
.compact-ratings .title-rating strong small {
  font-size: 0.7rem;
}
.title-synopsis {
  background: #171a1d;
  border-left: 2px solid var(--line);
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  margin: 14px 0;
}
.title-synopsis h3 {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
  margin: 0 0 4px;
}
.title-synopsis .synopsis {
  margin: 0;
  line-height: 1.5;
}
.title-credits {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 0.85rem;
  margin-block: 14px;
}
.title-credits dt {
  color: var(--muted);
}
.title-credits dd {
  margin: 0;
}
.title-activity > summary {
  cursor: pointer;
  min-height: 44px;
  display: list-item;
  align-content: center;
  font-size: 0.875rem;
}
.title-stat-grid {
  gap: 6px;
  margin: 8px 0;
}
.title-stat-grid .stat {
  padding: 8px;
  border-radius: 8px;
}
.title-stat-grid .stat strong {
  font-size: 1.25rem;
  margin-bottom: 2px;
}
.title-stat-grid .stat span {
  font-size: 0.7rem;
}
.title-info-modal .modal-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.title-info-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  width: 100%;
}
.title-info-actions .saved-by {
  margin-top: 6px;
}
.title-info-actions > .primary {
  flex-basis: 100%;
}

.library-quickbar {
  position: sticky;
  top: calc(var(--preferences-height, 0px) + 16px + env(safe-area-inset-top));
  z-index: 29;
  padding: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 6px 18px #0003;
}
.library-cycle {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}
.library-cycle label,
.library-cycle select {
  margin: 0;
  min-width: 0;
}
.library-cycle select {
  min-height: 44px;
  padding: 8px;
}
.library-cycle button {
  padding: 0;
  font-size: 1.6rem;
}
.library-quick-toggles {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.library-quick-toggles button {
  flex: 1;
  font-size: 0.8rem;
  padding: 8px;
}
.browse-checklist {
  min-width: 0;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.browse-checklist legend {
  padding: 0 4px;
  font-size: 0.85rem;
  color: var(--muted);
}
.browse-checklist > button {
  width: 100%;
  text-align: left;
  font-size: 0.8rem;
  margin-bottom: 4px;
}
.browse-check-options {
  max-height: 180px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.browse-check-options .check {
  margin: 0;
  padding: 8px 4px;
  min-height: 44px;
  overflow-wrap: anywhere;
}
.ratings-group[hidden] {
  display: none;
}
.title-rating > strong {
  color: var(--muted);
}
.title-rating[data-tone="good"] > strong {
  color: var(--mint);
}
.title-rating[data-tone="mixed"] > strong {
  color: #e9ca77;
}
.title-rating[data-tone="low"] > strong {
  color: #f0a0af;
}
@media (min-width: 700px) {
  .library-quickbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
  }
  .library-quick-toggles {
    margin: 0;
  }
}
.ratings-toggle[aria-pressed="true"],
.library-quick-toggles button[aria-pressed="true"] {
  border-color: var(--mint);
  color: var(--mint);
  background: #23302b;
}
.library-quick-toggles button {
  white-space: nowrap;
}

/* Browsing starts with the artwork; detailed search stays one tap away. */
.hero.library-hero {
  align-items: center;
  padding: 14px 0;
  gap: 12px;
}
.hero.library-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin: 0;
}
.hero.library-hero .row {
  width: auto;
}
.browse-search {
  margin-bottom: 12px;
}
.library-checklist fieldset {
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.library-checklist fieldset .check {
  min-height: 44px;
  margin: 0;
  padding: 8px 4px;
}

.setup-chooser-prompt .setup-role-choice {
  text-align: left;
  line-height: 1.4;
}
.setup-role-choice strong,
.setup-role-choice small {
  display: block;
}
.setup-role-choice small {
  color: inherit;
  margin-top: 4px;
  font-size: 0.8rem;
  opacity: 0.85;
}

/* WKWebView already disables pinch zoom; prevent a partial gesture before it does. */
html.native-app,
html.native-app body {
  touch-action: pan-x pan-y;
}
@media (max-width: 700px), (any-pointer: coarse) {
  /* iOS zooms focused controls below 16px, including selects inside small labels. */
  input,
  select,
  textarea {
    font-size: max(16px, 1rem);
  }
}

/* Shared preferences and finished-evening insights. */
.post-watch {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.post-watch h3 {
  margin: 0 0 0.5rem;
}
.post-watch p {
  margin: 0.35rem 0;
}

.title-snooze {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}
.snooze-heading,
.snooze-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.snooze-heading {
  margin-bottom: 0.65rem;
}
.snooze-heading h3 {
  margin: 0;
}
.snooze-details {
  display: grid;
  gap: 0.3rem;
}
.snooze-details strong {
  font-weight: 550;
}
.snooze-details span,
.snooze-review dd {
  overflow-wrap: anywhere;
}
.title-snooze .footnote {
  margin: 0.75rem 0;
}
.snooze-controls button {
  padding: 8px 12px;
  font-size: 0.875rem;
}
.title-activity {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.snooze-status {
  display: block;
  position: relative;
  margin-top: 0.15rem;
}
.snooze-badge,
.snooze-badge:hover {
  border: 0;
  background: transparent;
  padding: 0 2px;
}
.snooze-mark {
  display: inline-block;
  border: 1px solid #667562;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--mint);
  background: #29312b;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.3;
}
.snooze-badge:hover .snooze-mark {
  border-color: var(--mint);
}
.snooze-tooltip {
  visibility: hidden;
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: 100%;
  width: 100%;
  display: grid;
  gap: 0.35rem;
  padding: 0.7rem;
  border: 1px solid #667562;
  border-radius: 10px;
  background: #29312b;
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.snooze-badge:hover + .snooze-tooltip,
.snooze-badge:focus + .snooze-tooltip {
  visibility: visible;
}
.snooze-review {
  display: grid;
  gap: 0.4rem;
}
.snooze-review dt {
  color: var(--muted);
}
.snooze-review dd {
  margin: 0 0 0.5rem;
}

.snoozed-row {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.history-insights {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.history-insights .stat strong {
  font-size: clamp(1.2rem, 4vw, 2rem);
}
.history-insights details {
  margin-top: 1rem;
}
.history-insights summary {
  cursor: pointer;
  min-height: 44px;
}
.history-table {
  max-width: 100%;
  overflow-x: auto;
}
.history-table table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.85rem;
}
.history-table th,
.history-table td {
  padding: 0.6rem 0.35rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.history-table th {
  font-weight: 600;
}
.history-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 12px;
  margin-bottom: 1rem;
}

/* Direct selection has its own row so save/info controls stay fixed. */
.card-quick-pick {
  width: 100%;
  margin-top: 10px;
}

/* One picking action; quieter, consistently sized browsing and utility controls. */
.library-header-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 10px;
}
.library-header-actions > button,
.library-tools > summary {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 0.875rem;
  line-height: 22px;
  white-space: nowrap;
  border-radius: 10px;
}
.library-tools {
  position: relative;
  min-width: 0;
}
.library-tools > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
.library-tools > summary::before,
.library-tools[open] > summary::before {
  content: none;
}
.library-tools > summary::after {
  content: "⌄";
  color: var(--muted);
}
.library-tools[open] > summary::after {
  content: "⌃";
}
.library-tools > summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.library-tools-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 240px;
  max-width: calc(100vw - 36px);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 24px #0006;
}
.library-tools-menu button {
  width: 100%;
  min-height: 44px;
  text-align: left;
  font-size: 0.875rem;
  border-color: transparent;
  background: transparent;
}
.library-tools-menu button:hover {
  background: #303539;
}
.library-page .library-cycle select,
.library-page .library-quick-toggles button {
  height: 44px;
  min-height: 44px;
  border-radius: 10px;
}
.library-page .library-quick-toggles button {
  font-size: 0.875rem;
}
.library-page .library-quick-toggles button[aria-pressed="true"] {
  border-color: #89958e;
  background: #303935;
  color: var(--ink);
}
@media (max-width: 700px) {
  .hero.library-hero {
    display: block;
  }
  .library-header-actions {
    width: 100%;
    margin-top: 16px;
  }
}

.pool-view-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 18px 0 22px;
}
.pool-view-controls label {
  flex: 0 0 auto;
  margin: 0;
}
.pool-view-controls select {
  flex: 1 1 180px;
  width: auto;
  min-width: 0;
  max-width: 220px;
}
.pool-view-controls .footnote {
  flex-basis: 100%;
  margin: 0;
}
.pool-library-group {
  margin: 0 0 28px;
}
.pool-library-group > h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 1.1rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.pool-library-group > h2 small {
  font-size: 0.8125rem;
  font-weight: normal;
}

/* Feedback stays in the header, leaving library and phone navigation unobstructed. */
.feedback-shortcut {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
}
.feedback-shortcut[hidden] {
  display: none;
}
.feedback-shortcut svg {
  width: 100%;
  height: 100%;
}
.feedback-modal {
  max-width: 680px;
}
.feedback-composer textarea {
  width: 100%;
  box-sizing: border-box;
}
.feedback-composer,
.feedback-request {
  min-width: 0;
  overflow-wrap: anywhere;
}
.feedback-request {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.feedback-request-text p {
  white-space: pre-wrap;
}
.feedback-state {
  color: var(--mint);
  font-weight: 600;
}
.feedback-history {
  margin-top: 22px;
}
.feedback-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}
.feedback-photos > div,
.feedback-photos > button {
  max-width: 110px;
  min-width: 0;
}
.feedback-photos img {
  display: block;
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}
.feedback-photos button {
  padding: 8px;
}
.feedback-attach {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  max-width: 100%;
  flex-wrap: wrap;
}
.feedback-attach input {
  max-width: 100%;
}
.feedback-screenshot-viewer {
  max-width: 95vw;
  max-height: 90dvh;
}
.feedback-screenshot-viewer img {
  display: block;
  max-width: 100%;
  max-height: 75dvh;
  object-fit: contain;
}
.feedback-settings {
  margin-top: 16px;
}

.feedback-modal .modal-foot {
  position: sticky;
  bottom: -25px;
  background: var(--panel);
  padding: 12px 0;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

/* Everyday settings stay scannable; maintenance is a deliberate destination. */
.settings-panel {
  max-width: 920px;
  background: transparent;
  border: 0;
  padding: 0;
}
.settings-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.settings-account strong {
  display: block;
  margin-top: 4px;
}
.settings-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 12px 0;
  background: var(--panel);
}
.settings-section > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  min-height: 88px;
  border-radius: var(--radius);
}
.settings-section > summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.settings-section-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  flex: 1;
  min-width: 0;
}
.settings-section-heading strong {
  font-size: 1.0625rem;
}
.settings-scope {
  color: var(--mint);
  font-size: 0.75rem;
  align-self: center;
}
.settings-description {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}
.settings-section-body {
  border-top: 1px solid var(--line);
  padding: 22px;
}
.settings-section-body > :first-child {
  margin-top: 0;
}
.settings-section-body > hr:first-child {
  display: none;
}
.settings-section-body > :last-child {
  margin-bottom: 0;
}
.settings-section-body input:not([type="checkbox"]),
.settings-section-body select {
  max-width: 560px;
}
.settings-section-body .feedback-settings {
  margin-bottom: 22px;
}
.settings-section-body summary {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.settings-server {
  overflow-wrap: anywhere;
}
.settings-signout {
  margin-top: 28px;
}
.settings-signout .footnote {
  margin-top: 12px;
}
.mode-card[data-quick="true"] {
  min-height: 0;
  padding: 14px 18px;
  gap: 6px;
  background: transparent;
}
.mode-card[data-quick="true"] .mode-next {
  display: none;
}
.history-empty {
  max-width: 640px;
  text-align: left;
}
.history-empty p {
  line-height: 1.6;
}
.skip-content {
  position: fixed;
  left: 16px;
  top: -120px;
  z-index: 100;
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
}
.skip-content:focus {
  top: 16px;
}
@media (max-width: 420px) {
  .settings-section > summary {
    padding: 16px;
  }
  .settings-section-body {
    padding: 18px 16px;
  }
  .settings-section-heading {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .settings-scope {
    grid-row: 2;
  }
}

/* Keep the brand intact and let controls reflow without losing any actions. */
.header {
  flex-wrap: wrap;
}
.header .brand {
  white-space: nowrap;
  flex-shrink: 0;
}
.header .brand img {
  flex-shrink: 0;
}
.header-actions {
  margin-left: auto;
  min-width: 0;
  max-width: 100%;
  justify-content: flex-end;
}
.header-actions > button {
  flex-shrink: 0;
}
.header .profile-switch {
  min-width: 44px;
  max-width: min(38vw, 14rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header .holder-status {
  max-width: 26rem;
  overflow-wrap: anywhere;
}
.settings-account {
  flex-wrap: wrap;
}
.settings-account > div {
  min-width: 0;
  flex: 1 1 10rem;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .header {
    gap: 10px;
  }
  .header .brand {
    font-size: 1.25rem;
    gap: 8px;
  }
  .header .brand img {
    width: 32px;
    height: 32px;
  }
  .header-actions {
    gap: 8px;
  }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .header .nav {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
  }
}
.history-overview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 24px;
}
.history-overview > summary {
  min-height: 64px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.history-overview > summary span {
  font-size: 0.8125rem;
  color: var(--muted);
}
.history-overview-body {
  padding: 20px;
  border-top: 1px solid var(--line);
}
.history-overview-body > .stat-grid {
  margin-top: 0;
}
.history-overview-body > :last-child {
  margin-bottom: 0;
}
.history-evenings-heading {
  margin-bottom: 12px;
}
.double-feature > ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 16px;
  padding-left: 1.5rem;
}
.double-feature-movie {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.movie-search-results {
  display: grid;
  gap: 6px;
  max-height: 15rem;
  overflow: auto;
  margin-top: 8px;
}
.movie-search-results button {
  text-align: left;
}
.movie-search-results small {
  display: block;
}
.setup-hint {
  margin: 10px 0 4px;
}
.setup-help {
  margin: 0 0 14px;
}
.setup-help > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--mint);
}
.setup-help p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 8px 0 14px;
}
.setup-help > summary:focus-visible,
.history-overview > summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

@media (max-width: 360px) {
  .header {
    gap: 8px;
  }
  .header .brand {
    font-size: 1.1875rem;
    gap: 7px;
  }
  .header .brand img {
    width: 28px;
    height: 28px;
  }
}

.settings-panel,
.hero p,
.sessionbar .turn,
#handoff,
#toast {
  overflow-wrap: anywhere;
}
#modal [data-do="profile"] {
  max-width: 100%;
  overflow-wrap: anywhere;
}
#handoff > div {
  min-width: 0;
  max-width: 100%;
}
