:root {
  color-scheme: light;
  --ground: #f5f5f3;
  --surface: #fff;
  --ink: #20211f;
  --muted: #62645f;
  --line: #dedfd9;
  --accent: #c83b09;
  --tint: #fff1e9;
  font:
    15px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--ground);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
a:hover {
  text-decoration: underline;
}
button {
  color: inherit;
}
button[hidden],
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
button,
input,
textarea,
select {
  border-radius: 4px;
}
.shell {
  max-width: 1088px;
  margin: 0 auto;
  padding: 0 24px;
}
.skip {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--ink);
  color: #fff;
  padding: 12px;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}
header {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 40px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -1px;
}
.brand svg,
.brand-dot {
  color: var(--accent);
}
.brand:hover {
  text-decoration: none;
}
nav {
  display: flex;
  gap: 6px;
}
nav a {
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 550;
}
nav a[aria-current] {
  color: var(--ink);
  background: #e9e9e5;
  border-radius: 4px;
}
header > .submit-button {
  margin-left: auto;
}
.submit-button {
  background: var(--accent);
  color: white;
  border: 0;
  padding: 11px 16px;
  font-weight: 600;
  min-height: 44px;
}
.submit-button:hover {
  background: #aa3005;
}
.submit-button span {
  margin-left: 12px;
}
.intro {
  padding: 32px 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
h1 {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.6px;
  margin: 0 0 8px;
  font-weight: 650;
}
.intro p {
  margin: 0;
  color: var(--muted);
}
.intro-note {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 2px;
}
.feed-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
h2 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.25px;
}
.feed-heading h2 {
  font-size: 14px;
}
.feed-heading span {
  font-size: 12px;
  color: var(--muted);
}
.game {
  display: grid;
  grid-template-columns: 44px 168px minmax(0, 1fr) 80px;
  align-items: center;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin: 20px;
}
.vote {
  border: 1px solid var(--line);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 44px;
  min-height: 56px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.vote svg {
  width: 14px;
  height: 14px;
}
.vote:hover {
  border-color: var(--muted);
  background: #ecece8;
}
.vote[aria-pressed="true"] {
  color: var(--accent);
  background: var(--tint);
  border-color: #e4ac96;
}
.preview {
  display: block;
  width: 168px;
  height: 105px;
  border-radius: 4px;
  overflow: hidden;
  background: #e8e8e3;
  position: relative;
}
.preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.preview .no-preview {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #71736b;
  font-size: 13px;
  background: #e9e9e5;
}
.preview:hover img {
  filter: brightness(0.94);
}
.game-title {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.3px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.description {
  margin: 6px 0 8px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 7px;
  row-gap: 2px;
  font-size: 12px;
  color: var(--muted);
}
.meta .genre {
  color: #44473f;
}
.meta .separator {
  color: #7d7f76;
}
.meta a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ai-details {
  display: inline;
  position: relative;
}
.ai-details summary {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  list-style: none;
}
.ai-details summary::-webkit-details-marker {
  display: none;
}
.ai-details p {
  font-size: 12px;
  max-width: 45ch;
  margin: 6px 0;
  color: var(--ink);
}
.play {
  border: 1px solid #c7c9c0;
  background: var(--surface);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  border-radius: 4px;
  font-size: 14px;
}
.play:hover {
  text-decoration: none;
  border-color: var(--ink);
  background: #ecece8;
}
.game.new-game {
  background: var(--tint);
  outline: 8px solid var(--tint);
}
.empty {
  padding: 64px 16px;
  text-align: center;
  color: var(--muted);
}
.empty strong {
  display: block;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}
.secondary {
  background: var(--surface);
  border: 1px solid #c7c9c0;
  padding: 10px 18px;
  min-height: 44px;
}
#load-more {
  display: block;
  margin: 24px auto;
}
.feed-error {
  padding: 24px 0;
  color: #9e2700;
}
footer {
  padding: 24px 0 32px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 12px;
  color: var(--muted);
}
footer > div {
  display: flex;
  gap: 20px;
  align-items: center;
}
footer a,
.text-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.text-button,
.inline-button {
  background: none;
  padding: 0;
  border: 0;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: inherit;
}
dialog {
  width: min(600px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 70px #0003;
}
dialog::backdrop {
  background: #20211f66;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog-heading h2 {
  font-size: 23px;
}
.close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--muted);
}
.dialog-intro {
  margin: 4px 0 24px;
  color: var(--muted);
  font-size: 14px;
}
form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
label {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #b9bbb3;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 400;
}
textarea {
  resize: vertical;
}
input::placeholder,
textarea::placeholder {
  color: #77796f;
}
.hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.optional {
  font-weight: 400;
  color: var(--muted);
  display: contents;
}
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.form-actions > span {
  font-size: 12px;
  color: var(--muted);
}
.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.error {
  margin: 0;
  color: #a82700;
  font-size: 14px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  width: max-content;
  background: var(--ink);
  color: #fff;
  border-radius: 5px;
  padding: 12px 20px;
  font-size: 14px;
  z-index: 20;
}
#about-dialog p,
#about-dialog li {
  font-size: 14px;
}
#about-dialog h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
.guidelines {
  padding-left: 20px;
}
.guidelines li {
  padding-bottom: 8px;
}
#about-dialog a {
  text-decoration: underline;
}
@media (min-width: 1500px) {
  .shell {
    padding-top: 12px;
  }
}
@media (max-width: 700px) {
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .shell {
    padding: 0 16px;
  }
  header {
    min-height: 76px;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    padding: 16px 0 12px;
  }
  .brand {
    font-size: 22px;
    gap: 7px;
  }
  .brand svg {
    width: 24px;
    height: 24px;
  }
  header > .submit-button {
    font-size: 12px;
    padding: 9px 10px;
  }
  header > .submit-button span {
    margin-left: 3px;
  }
  nav {
    order: 3;
    flex-basis: 100%;
    gap: 4px;
    margin-top: 0;
  }
  nav a {
    padding: 8px 16px;
    min-height: 40px;
    font-size: 14px;
  }
  .intro {
    padding: 24px 0;
    display: block;
  }
  h1 {
    font-size: 22px;
  }
  .intro p {
    font-size: 14px;
    max-width: 32ch;
  }
  .intro-note {
    display: none;
  }
  .feed-heading {
    padding: 11px 0;
  }
  .feed-heading span {
    font-size: 11px;
    max-width: 175px;
    text-align: right;
  }
  .game {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 12px;
    padding: 18px 0;
    align-items: start;
  }
  .preview {
    grid-column: 1;
    grid-row: 1;
    width: 96px;
    height: 64px;
  }
  .game-content {
    grid-column: 2;
    grid-row: 1;
  }
  .game-title {
    font-size: 17px;
  }
  .description {
    font-size: 13px;
    margin: 5px 0 7px;
  }
  .meta {
    font-size: 11px;
    column-gap: 5px;
  }
  .vote {
    grid-column: 1;
    grid-row: 2;
    min-height: 44px;
    flex-direction: row;
    width: 70px;
    gap: 8px;
  }
  .play {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    width: 88px;
    min-height: 44px;
  }
  .game-content {
    min-height: 64px;
  }
  footer {
    display: block;
    padding-top: 22px;
  }
  footer > div {
    gap: 24px;
    margin-top: 8px;
  }
  dialog {
    padding: 20px;
    max-height: calc(100dvh - 24px);
  }
  .dialog-heading h2 {
    font-size: 21px;
  }
  .form-pair {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .toast {
    bottom: 16px;
  }
  .form-actions > span {
    max-width: 110px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition:
      background-color 0.12s,
      border-color 0.12s;
  }
  dialog[open] {
    animation: appear 0.12s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

.comment-count {
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: inherit;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  min-height: 28px;
}
#comments-dialog {
  width: min(680px, calc(100% - 32px));
  padding: 24px;
}
#comments-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: min(780px, calc(100dvh - 48px));
}
#comments-dialog .dialog-heading {
  flex-shrink: 0;
}
#comments-title {
  font-size: 20px;
  overflow-wrap: anywhere;
}
#comments-scroll {
  flex: 1;
  min-height: 100px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 4px;
}
#comments-status {
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0;
}
#comments-older {
  margin-bottom: 12px;
}
.comment {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin: 12px;
}
.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.comment-meta strong {
  color: var(--ink);
  font-weight: 600;
}
.comment-body {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 8px 0;
}
.comment-actions {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}
.comment-actions > * {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}
.comment-actions a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
#comment-form {
  flex-shrink: 0;
  gap: 10px;
}
#comment-form .form-actions {
  padding-top: 0;
  border-top: 0;
}
#comment-form textarea {
  max-height: 140px;
  min-height: 72px;
}
@media (max-width: 700px) {
  #comments-dialog {
    width: calc(100% - 16px);
    padding: 16px;
  }
  #comments-dialog[open] {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    gap: 10px;
  }
  #comments-title {
    font-size: 18px;
  }
  .comment-count {
    min-height: 36px;
  }
  .comment-actions > * {
    min-height: 44px;
  }
  #comment-form .form-actions > span {
    max-width: 150px;
  }
}
