.catalog-filters { margin: 0 0 24px; }
.catalog-filters > label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
#game-sort { max-width: 100%; min-height: 44px; padding: 8px 12px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.tag-filter-panel { margin: 12px 0; }
.tag-filter-panel summary { cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 650; }
.game-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.filter-tag { min-height: 44px; max-width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); background: var(--surface); font-size: 12px; overflow-wrap: anywhere; }
.filter-tag[aria-pressed="true"] { background: var(--selected); border-color: var(--border-strong); box-shadow: inset 0 0 0 1px var(--border-strong); }
.game-completion-time {
  display: grid;
  gap: 0.15rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.completion-caption { font-weight: 650; }
.completion-value { display: block; }
:root {
  --page: #f8f3fc;
  --text: #301b43;
  --muted: #64516f;
  --accent: #532576;
  --panel: #fffaf4;
  --surface: #fff;
  --soft: #f0e7f7;
  --selected: #e4d0f4;
  --border: #c7b1d8;
  --border-strong: #7735a9;
  --focus: #7f54e0;
  --button: #7447c8;
  --button-hover: #6134b1;
  --action: #532576;
  --action-hover: #512078;
  --brand-bg: #eaddf6;
  --error-bg: #fff0e9;
  --error-text: #853b27;
  --error-border: #e4b8ab;
  --success-bg: #eee2fa;
  --success-text: #624279;
  --positive: #236146;
  --negative: #7c355b;
  --winner-start: #f2e6ff;
  --winner-end: #fff8ed;
  --on-action: #fff;
  --bg-alt: var(--panel);

  color-scheme: light;
  font-family: Inter, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--page);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

button,
a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
:where(.game-card):focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

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

.page-shell {
  max-width: 1280px;
  margin: auto;
  padding: 0 48px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 106px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.8px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--brand-bg);
  font-family: Georgia, serif;
  font-size: 35px;
  font-style: italic;
  font-weight: 400;
}

.brand-subtitle {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.account {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.quiet-button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 330px;
  align-items: center;
  gap: 72px;
  padding: 58px 0 36px;
}

.eyebrow,
.step-label {
  margin: 0 0 15px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2.1px;
}

h1 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(42px, 5.5vw, 73px);
  font-weight: 400;
  letter-spacing: -3px;
  line-height: 1.05;
}

.dot {
  color: #a889d9;
}

.hero-copy {
  max-width: 450px;
  margin: 23px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.twitch-button {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 33px;
  min-height: 50px;
  padding: 14px 21px;
  border-radius: 8px;
  background: var(--button);
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.form-login {
  width: 100%;
}

.twitch-button:hover {
  background: var(--button-hover);
}

.small-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.hero-sidebar {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.currently-playing {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--soft);
  overflow-wrap: anywhere;
}

.currently-playing-score {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.balance-card {
  position: relative;
  overflow: hidden;
  padding: 31px;
  border: 1px solid #d0b6e3;
  border-radius: 18px;
  background: linear-gradient(145deg, #542777, #38204e);
  color: white;
}

.balance-card::after {
  position: absolute;
  top: -36px;
  right: -42px;
  width: 145px;
  height: 145px;
  border: 1px solid #8f6ba7;
  border-radius: 50%;
  content: '';
}

.balance-label {
  position: relative;
  z-index: 1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
}

.balance-card strong {
  display: block;
  margin: 16px 0 0;
  font-family: Georgia, serif;
  font-size: 78px;
  font-weight: 400;
  line-height: 1;
}

.balance-card p {
  margin: 10px 0 26px;
  color: #f2e7fb;
  font-size: 13px;
}

.balance-foot {
  display: block;
  padding-top: 19px;
  border-top: 1px solid #82619d;
  color: #eee1f7;
  font-size: 11px;
  line-height: 1.6;
}

.status {
  min-height: 24px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.status.error {
  padding: 12px 16px;
  border: 1px solid var(--error-border);
  border-radius: 8px;
  background: var(--error-bg);
  color: var(--error-text);
}

.status.success {
  color: var(--success-text);
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--success-bg);
}

.voting-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 33px;
  padding-bottom: 57px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-heading .eyebrow {
  margin-bottom: 8px;
}

h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 400;
  letter-spacing: -0.6px;
}

.currently-playing h2 {
  margin: 8px 0;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  line-height: 1.3;
}

.count-badge {
  flex-shrink: 0;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  font-size: 10px;
}

.section-copy {
  margin: 12px 0 23px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.refresh-button {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.refresh-button:hover:not(:disabled),
.refresh-button[aria-busy='true'] {
  background: var(--soft);
  color: var(--accent);
}

.refresh-button[aria-busy='true'] {
  cursor: progress;
}

.refresh-icon {
  display: block;
  width: 20px;
  height: 20px;
}

.refresh-button[aria-busy='true'] .refresh-icon {
  animation: refresh-turn 1s linear infinite;
}

@keyframes refresh-turn {
  to {
    transform: rotate(360deg);
  }
}

.game-search {
  margin-bottom: 24px;
}

.game-search label {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 650;
}

.search-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-controls input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

.search-controls input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search-controls button {
  flex-shrink: 0;
  min-width: 64px;
  min-height: 46px;
}

.search-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.game-list-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 215px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 120ms;
}

.game-card:hover {
  border-color: var(--border-strong);
}

.game-card-label {
  display: block;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.score-caption {
  display: block;
}

.trailer-link {
  display: block;
  margin-top: 8px;
  min-height: 44px;
  padding: 6px 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: center;
}

.game-card:has(input:checked) {
  border: 2px solid var(--border-strong);
  padding: 21px;
  background: var(--selected);
}

.game-top {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.game-rank {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.5px;
}

.game-card input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--border-strong);
}

.game-name {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.4px;
}

.game-overview {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.game-card > .game-overview {
  flex: 1;
}

.game-media {
  flex: 0 0 110px;
  min-width: 0;
}

.game-copy {
  flex: 1;
  min-width: 0;
}

.game-artwork {
  position: relative;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 110px;
  height: 147px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--soft);
}

.game-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-fallback {
  max-width: 90px;
  padding: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.game-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.game-score {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
}

.game-score strong {
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
}

.vote-controls {
  position: sticky;
  top: 20px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--soft);
}

.step-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9px;
}

.selected-game {
  min-height: 43px;
  margin: 13px 0 25px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.7;
}

.action-picker {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.action-picker legend {
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 11px;
}

.action-picker label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  font-size: 11px;
  cursor: pointer;
}

.action-picker input {
  margin: 0;
  accent-color: var(--border-strong);
}

.action-picker label:has(input:checked) {
  border-color: var(--border-strong);
  background: var(--selected);
}

.amount-label {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
}

#amount {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  font-size: 20px;
}

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 9px 0 13px;
}

.quick-amounts button {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.quick-amounts button:hover {
  background: var(--soft);
}

.vote-effect {
  min-height: 38px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.submit-button {
  width: 100%;
  min-height: 50px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--action);
  color: white;
  font-size: 13px;
  font-weight: 650;
}

.submit-button:hover:not(:disabled) {
  background: var(--action-hover);
}

.empty-state {
  overflow-wrap: anywhere;
  grid-column: 1 / -1;
  padding: 35px 20px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.demo-note {
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 15px;
  z-index: 10;
  padding: 13px;
  background: var(--surface);
}

.skip-link:focus {
  top: 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (width <= 950px) {
  .page-shell {
    padding: 0 28px;
  }

  .hero {
    grid-template-columns: 1fr 270px;
    gap: 30px;
  }

  .voting-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 22px;
  }

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

@media (width <= 680px) {
  .page-shell {
    padding: 0 20px;
  }

  .site-header {
    min-height: 88px;
    gap: 12px;
  }

  .brand {
    font-size: 20px;
    gap: 9px;
  }

  .brand-subtitle {
    font-size: 8px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
    font-size: 29px;
  }

  .account {
    max-width: 140px;
    gap: 7px;
    flex-direction: column;
    align-items: end;
    font-size: 10px;
    overflow-wrap: anywhere;
  }

  .quiet-button {
    min-height: 36px;
    font-size: 11px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 36px;
  }

  h1 {
    font-size: 53px;
    letter-spacing: -2.4px;
  }

  .hero-copy {
    max-width: 100%;
    font-size: 14px;
  }

  .balance-card {
    padding: 23px;
  }

  .balance-card strong {
    font-size: 60px;
  }

  .balance-card p {
    margin-bottom: 17px;
  }

  .voting-layout {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-bottom: 35px;
  }

  .game-card {
    min-height: 190px;
  }

  .game-artwork {
    width: 84px;
    height: 112px;
  }

  .game-media {
    flex-basis: 84px;
  }

  .game-overview {
    gap: 13px;
  }

  .game-top {
    margin-bottom: 17px;
  }

  .vote-controls {
    position: static;
    scroll-margin-top: 20px;
  }

  h2 {
    font-size: 25px;
  }

  .section-heading {
    align-items: start;
  }

  footer {
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .refresh-button[aria-busy='true'] .refresh-icon {
    animation: none;
  }
}

.winner-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 22px 28px;
  margin: 22px 0 0;
  background: linear-gradient(110deg, var(--winner-start), var(--winner-end));
  overflow-wrap: anywhere;
}

.winner-copy {
  flex: 1;
  min-width: 0;
}

.winner-cover {
  display: block;
  flex: 0 0 auto;
  width: clamp(72px, 14vw, 128px);
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 10px;
}

@media (width <= 480px) {
  .winner-banner {
    gap: 12px;
    padding: 16px;
  }

  .winner-cover {
    width: 64px;
  }
}

.winner-banner h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin: 5px 0;
}

.winner-banner p:last-child {
  margin-bottom: 0;
}

.viewer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
}

.page-shell .viewer-nav button,
.favorite-button {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--accent);
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.viewer-nav button[aria-current='page'],
.favorite-button[aria-pressed='true'] {
  color: var(--on-action);
  background: var(--action);
}

.favorite-button {
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
}

.favorite-button[aria-pressed='true'] {
  background: transparent;
  color: var(--accent);
}

.game-top input {
  margin-left: auto;
}

.browse-actions,
.discovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.page-shell .browse-actions button {
  min-height: 44px;
}

.discovery-view {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}

.discovery-view h3 {
  margin: 0 0 12px;
}

.discovery-media iframe,
.list-trailer-media iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  border: 0;
  border-radius: 10px;
  margin: 12px 0;
}

.list-trailer {
  min-width: 0;
  padding: 16px;
  border: 2px solid var(--border-strong);
  border-radius: 12px;
  background: var(--panel);
  overflow-wrap: anywhere;
}

.list-trailer-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.list-trailer-header h3 {
  margin: 0;
  font-size: 19px;
}

.favorite-button:disabled {
  cursor: default;
  opacity: 0.6;
}

.personal-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(20px, 4vw, 40px);
  margin: 20px 0 40px;
  overflow-wrap: anywhere;
}

.guide-panel {
  max-width: 850px;
}

.personal-panel h3 {
  margin-top: 28px;
}

.page-shell .personal-panel p,
.personal-panel li {
  line-height: 1.65;
}

.account-balance {
  display: block;
  color: var(--accent);
  font-size: clamp(2.5rem, 7vw, 4rem);
}

.activity-list {
  list-style: none;
  padding: 0;
}

.activity-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.activity-row .small-note {
  display: block;
}

.activity-row .earned {
  color: var(--positive);
}

.activity-row .spent {
  color: var(--negative);
}

.history-paging {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 24px;
}

.guide-rewards li {
  margin-bottom: 12px;
}

.inactive-favorites {
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding-top: 18px;
}

.library-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 20px;
  list-style: none;
  margin: 20px 0;
  padding: 0;
}

.library-tile {
  min-width: 0;
}

.library-results {
  overflow-anchor: none;
}

.library-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 20px 0;
}

.library-order,
.library-load-status,
.library-last-played {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.library-last-played {
  display: block;
  margin-top: 4px;
}

.library-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--soft);
}

.library-cover img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-cover-fallback {
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.page-shell .library-game-title {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.library-search-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

#library-clear {
  flex-shrink: 0;
}

.library-heading {
  scroll-margin-top: 20px;
}

.library-search-field {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 500px;
}

.library-search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

#library-search {
  display: block;
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 500px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px 10px 42px;
  font: inherit;
}

@media (width <= 680px) {
  .library-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

.scary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.scary-game {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  background: var(--soft);
}

.scary-game .game-overview {
  margin-bottom: 0;
}

@media (width <= 680px) {
  .scary-grid {
    grid-template-columns: 1fr;
  }
}

.scary-game h4,
.page-shell .scary-game p {
  margin: 0;
}

.page-shell .scary-game button {
  min-height: 44px;
  margin-top: auto;
}

.scary-archive {
  margin-top: 36px;
}

.round-results {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}

.round-results summary {
  cursor: pointer;
  font-weight: 600;
}

.suggestion-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  margin: 20px 0;
}

.suggestion-card,
.suggestion-history,
.suggestion-recovery {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-wrap: anywhere;
  margin: 12px 0;
}

.suggestion-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.suggestion-choice {
  flex: 1;
  min-width: 0;
  font-weight: 700;
}

.suggestion-cover {
  display: grid;
  flex: 0 0 84px;
  width: 84px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--accent);
}

.suggestion-cover img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.suggestion-cover-fallback {
  grid-area: 1 / 1;
  padding: 6px;
  font-size: 0.75rem;
  line-height: 1.3;
  text-align: center;
}

.suggestion-cover [hidden] {
  display: none;
}

.suggestion-submission-status:empty {
  margin: 0;
}

.suggestion-state {
  font-weight: 700;
  color: var(--accent);
}

#suggestions-content input[type='search'],
#suggestions-content textarea {
  color: var(--text);
  background: var(--surface);
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  margin: 10px 0;
}

#suggestions-content .suggestion-extra-info {
  display: block;
  margin: 16px 0;
}

#suggestions-content textarea {
  box-sizing: border-box;
  resize: vertical;
}

#suggestions-content input[type='radio'] {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  accent-color: var(--accent);
}

.account .twitch-button {
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.library-watch-clip {
  display: block;
  min-height: 36px;
  margin-top: 8px;
  font-size: 13px;
}

.library-clip-expanded {
  grid-column: span var(--library-clip-span);
}

.library-clip-expanded > .library-cover {
  width: var(--library-clip-cover-width);
  max-width: 100%;
}

.library-clip-player {
  box-sizing: border-box;
  max-width: 640px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-alt, var(--panel));
  overflow-wrap: anywhere;
}

.library-clip-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'title navigation'
    'close navigation';
  align-items: start;
  gap: 8px;
  margin-bottom: 10px;
}

.library-clip-title,
.library-clip-title-sizer {
  grid-area: title;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.library-clip-title-sizer {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.library-clip-header > .quiet-button {
  grid-area: close;
  justify-self: start;
  max-width: 100%;
}

.library-clip-title,
.library-clip-title-sizer,
.library-clip-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.library-clip-media iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
}

.library-clip-player > a {
  display: inline-block;
  margin-top: 10px;
  color: var(--text, var(--accent));
  font-size: 13px;
  text-underline-offset: 3px;
}

.scary-game .game-name {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

:root[data-theme='dark'] {
  color-scheme: dark;

  --page: #17111f;
  --text: #f3eafc;
  --muted: #c2afcf;
  --accent: #d3a5ff;
  --panel: #241a2e;
  --surface: #281e35;
  --soft: #30223f;
  --selected: #412957;
  --border: #806991;
  --border-strong: #b988e0;
  --focus: #d6b0ff;
  --button: #7447c8;
  --button-hover: #6134b1;
  --action: #663494;
  --action-hover: #512078;
  --brand-bg: #39284b;
  --error-bg: #482824;
  --error-text: #ffc5b3;
  --error-border: #c08775;
  --success-bg: #352447;
  --success-text: #dbc4f3;
  --positive: #9de1b8;
  --negative: #ffb8d6;
  --winner-start: #392346;
  --winner-end: #251c31;
  --on-action: #fff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;

    --page: #17111f;
    --text: #f3eafc;
    --muted: #c2afcf;
    --accent: #d3a5ff;
    --panel: #241a2e;
    --surface: #281e35;
    --soft: #30223f;
    --selected: #412957;
    --border: #806991;
    --border-strong: #b988e0;
    --focus: #d6b0ff;
    --button: #7447c8;
    --button-hover: #6134b1;
    --action: #663494;
    --action-hover: #512078;
    --brand-bg: #39284b;
    --error-bg: #482824;
    --error-text: #ffc5b3;
    --error-border: #c08775;
    --success-bg: #352447;
    --success-text: #dbc4f3;
    --positive: #9de1b8;
    --negative: #ffb8d6;
    --winner-start: #392346;
    --winner-end: #251c31;
    --on-action: #fff;
  }
}

/* The native select keeps standard keyboard and screen-reader behavior. */
.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.appearance-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.appearance-control select {
  min-height: 44px;
  max-width: 112px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

@media (width <= 680px) {
  .site-header {
    gap: 8px;
    padding: 14px 0;
  }

  .header-tools {
    flex-direction: column;
    align-items: end;
    gap: 8px;
    max-width: 140px;
  }
}

.discord-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.discord-card {
  min-width: 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--soft);
}

.discord-action {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  color: var(--on-action);
  background: var(--action);
  border: 1px solid var(--action);
  border-radius: 10px;
  text-decoration: none;
}

.discord-action:hover {
  background: var(--action-hover);
}

.discord-card summary {
  min-height: 44px;
  padding: 8px 0;
  color: var(--accent);
  cursor: pointer;
}

.discord-action:focus-visible,
.discord-card summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.discord-link-status {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
}

.discord-notice {
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: var(--soft);
}

@media (width <= 680px) {
  .discord-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.library-clip-navigation {
  grid-area: navigation;
  align-self: start;
  display: inline-grid;
  grid-template-columns: 44px minmax(5rem, auto) 44px;
  align-items: center;
  gap: 6px;
}

.library-clip-arrow {
  min-width: 44px;
  min-height: 44px;
  padding: 6px;
  font-size: 20px;
}

.library-clip-position {
  color: var(--text);
  text-align: center;
  font-size: 13px;
  white-space: nowrap;
}

@media (width <= 680px) {
  .library-clip-player {
    padding: 4px;
  }

  .library-clip-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'navigation'
      'close'
      'title';
  }

  .library-clip-navigation {
    grid-template-columns: repeat(2, 44px);
    justify-self: start;
    gap: 4px;
  }

  .library-clip-position {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

/* Descriptive labels; favorites remain independent interactive controls. */
.game-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0;
  margin: 8px 0;
  list-style: none;
  min-width: 0;
}

.game-labels[hidden] {
  display: none;
}

.game-label {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--surface);
  overflow-wrap: anywhere;
}

.game-label-theme {
  background: var(--selected);
}

/* Preserve native radio semantics without a separate empty controls row. */
.game-card > .game-choice {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
}

.game-card:has(> .game-choice:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.game-card > .favorite-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  min-width: 44px;
  min-height: 44px;
}

.game-card:has(> .favorite-button:not([hidden])) .game-artwork {
  margin-top: 32px;
}
