@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;0,9..144,700;1,9..144,300&family=DM+Sans:wght@400;500&display=swap');

/* ── Variables ────────────────────────────────────────────────── */
:root {
  --bg:         #FFFEF9;
  --surface:    #F5F4EF;
  --surface2:   #ECEAE3;
  --border:     #E0DED7;
  --text:       #17160F;
  --text-2:     #58564F;
  --text-3:     #9A9890;
  --ok:         #1A5C3A;
  --ok-bg:      #E4F2EB;
  --poop-text:  #6B4F10;
  --poop-bg:    #FDF3E3;
  --danger:     #C0392B;
  --danger-bg:  #FCE8E6;
  --admin:      #6B4E9E;
  --link:       #17160F;
  --r:          3px;
  --font-d:     'Fraunces', Georgia, serif;
  --font-b:     'DM Sans', system-ui, sans-serif;
  --shadow:     0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --trans:      .15s ease;
}

/* ── Maintenance bar ──────────────────────────────────────────── */
.maintenance-bar {
  background: #FEF3DC;
  color: #855C0A;
  border-bottom: 1px solid #e8d5a0;
  padding: 8px 24px;
  font-size: .8rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.maintenance-bar a {
  color: #855C0A;
  font-weight: 500;
  text-decoration: underline;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
a:hover { opacity: .65; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; }

/* ── Layout ───────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
main { flex: 1; }

/* ── Navigation ───────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}

.site-logo {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -.5px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--r);
  transition: background var(--trans), opacity var(--trans);
}

.site-nav a:hover { background: var(--surface); opacity: 1; }

.nav-sep { color: var(--border); font-size: .75rem; }

.nav-username {
  font-size: .875rem;
  color: var(--text-3);
  padding: 0 6px;
}

.site-nav .btn-nav {
  background: var(--text);
  color: var(--bg);
  padding: 6px 14px;
}
.site-nav .btn-nav:hover { opacity: .8; background: var(--text); }

/* ── Hamburger (mobile) ───────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform .2s ease, opacity .2s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Search & Filters ─────────────────────────────────────────── */
.filter-bar {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  background: var(--bg);
}

.filter-bar form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  font-size: .875rem;
  transition: border-color var(--trans);
}
.search-input:focus { outline: none; border-color: var(--text); }

.filter-select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  font-size: .875rem;
  cursor: pointer;
  transition: border-color var(--trans);
}
.filter-select:focus { outline: none; border-color: var(--text); }

.filter-bar .btn { height: 38px; }

.filter-clear {
  font-size: .8rem;
  color: var(--text-3);
  text-decoration: none;
  padding: 0 6px;
}
.filter-clear:hover { color: var(--text); opacity: 1; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--trans), border-color var(--trans), opacity var(--trans);
  background: var(--bg);
  color: var(--text);
  white-space: nowrap;
}
.btn:hover { background: var(--surface); opacity: 1; }

.btn--primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn--primary:hover { opacity: .8; background: var(--text); }

.btn--sm { padding: 5px 12px; font-size: .8rem; }

.btn--danger { border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: var(--danger-bg); }

.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover { background: var(--surface); }

/* ── Page heading ─────────────────────────────────────────────── */
.page-header {
  padding: 32px 0 20px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.page-title {
  font-family: var(--font-d);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -.5px;
}

.page-count {
  font-size: .875rem;
  color: var(--text-3);
}

/* ── Game Cards Grid ──────────────────────────────────────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 24px;
  padding-bottom: 48px;
}

.game-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--r);
  transition: opacity var(--trans);
}
.game-card:hover { opacity: .8; }

/* Cover image 2:3 */
.cover {
  display: block;
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--r);
  background: var(--surface);
}

.cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-d);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-3);
  border: 1px solid var(--border);
}

.cover--page {
  width: 240px;
  flex-shrink: 0;
  aspect-ratio: 2/3;
  border-radius: var(--r);
  object-fit: cover;
}

.cover--page.cover--placeholder { width: 240px; font-size: 4rem; border: 1px solid var(--border); }

.game-card__body {
  padding: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.game-card__title {
  font-weight: 500;
  font-size: .9rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card__meta {
  font-size: .78rem;
  color: var(--text-3);
}

.game-card__rating { margin-top: 4px; }

/* ── Rating Badge ─────────────────────────────────────────────── */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
}

.rating--ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.rating--poop {
  background: var(--poop-bg);
  color: var(--poop-text);
  font-size: .85rem;
}

.rating--large {
  font-size: 1rem;
  padding: 6px 16px;
  font-weight: 600;
}

/* ── Game Page ────────────────────────────────────────────────── */
.game-page {
  padding: 40px 0 60px;
}

.game-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.game-sidebar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.game-title {
  font-family: var(--font-d);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.5px;
  margin-bottom: 20px;
}

.game-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.meta-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: .875rem;
}

.meta-label {
  color: var(--text-3);
  width: 90px;
  flex-shrink: 0;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding-top: 2px;
}

.meta-value { display: flex; flex-wrap: wrap; gap: 4px; }

.tag {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .78rem;
  text-decoration: none;
  color: var(--text-2);
}
.tag:hover { background: var(--surface2); opacity: 1; }

.game-description {
  font-size: .9375rem;
  line-height: 1.75;
  color: var(--text-2);
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* ── Comments ─────────────────────────────────────────────────── */
.comments-section {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding-top: 40px;
}

.comments-title {
  font-family: var(--font-d);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 28px;
}

.comment-list { display: flex; flex-direction: column; gap: 0; }

.comment {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.comment:first-child { border-top: 1px solid var(--border); }

.comment__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.comment__author {
  font-weight: 700;
  font-size: 1rem;
}

.comment__author--admin {
  color: var(--admin);
}

.comment__author--registered {
  color: var(--ok);
}

.comment__date {
  font-size: .775rem;
  color: var(--text-3);
}

.comment__text {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--text-2);
  word-break: break-word;
}

.comment__actions { margin-top: 10px; }

.btn-report {
  font-size: .75rem;
  color: var(--text-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 2px;
  transition: color var(--trans), background var(--trans);
  text-decoration: none;
}
.btn-report:hover { color: var(--danger); background: var(--danger-bg); }
.btn-report[disabled] { opacity: .4; cursor: default; }
.btn-report--done { color: var(--danger); }

.btn-quote {
  font-size: .75rem;
  color: var(--text-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 2px;
  margin-right: 6px;
  transition: color var(--trans), background var(--trans);
}
.btn-quote:hover { color: var(--text); background: var(--surface); }

/* ── Quote blocks ─────────────────────────────────────────────── */
.comment-quote {
  background: var(--surface);
  border-left: 3px solid var(--border);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 8px 12px;
  margin: 0 0 10px 0;
  font-size: .875em;
}

.comment-quote__header {
  font-size: .78em;
  color: var(--text-3);
  font-style: italic;
  padding-bottom: 5px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.comment-quote__body {
  line-height: 1.55;
  color: var(--text-2);
}

/* Nested: quote inside a quote */
.comment-quote--nested {
  background: var(--surface2);
  border-left-color: var(--text-3);
  margin: 4px 0 4px 4px;
  padding: 6px 10px;
  font-size: .95em;
}

/* Jump-to-original link in quote header */
.quote-jump {
  font-style: normal;
  font-size: .85em;
  color: var(--text-3);
  text-decoration: none;
  margin-left: 6px;
  opacity: .7;
  transition: opacity var(--trans), color var(--trans);
}
.quote-jump:hover { opacity: 1; color: var(--text); }

.no-comments {
  font-size: .875rem;
  color: var(--text-3);
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

/* ── Comment Form ─────────────────────────────────────────────── */
.comment-form {
  margin-top: 36px;
}

.comment-form-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 16px;
}

/* ── Forms ────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  font-size: .825rem;
  font-weight: 500;
  color: var(--text-2);
}

.form-input, .form-textarea, .form-select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--text);
  font-size: .9rem;
  transition: border-color var(--trans);
  width: 100%;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--text);
}

.form-input--sm { width: auto; }

.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

.form-hint { font-size: .775rem; color: var(--text-3); }

.form-error { font-size: .8rem; color: var(--danger); }

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* Checkbox group */
.check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .875rem;
  cursor: pointer;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: background var(--trans), border-color var(--trans);
}

.check-item:has(input:checked) {
  background: var(--surface);
  border-color: var(--text);
}

.check-item input { cursor: pointer; }

/* Radio rating */
.rating-radios { display: flex; gap: 12px; }

.rating-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: .875rem;
  transition: background var(--trans), border-color var(--trans);
}

.rating-radio:has(input:checked) { border-color: var(--text); background: var(--surface); }
.rating-radio input { cursor: pointer; }

/* ── Flash messages ───────────────────────────────────────────── */
.flash {
  padding: 10px 16px;
  border-radius: var(--r);
  font-size: .875rem;
  margin-bottom: 20px;
  border: 1px solid;
}
.flash--success { background: var(--ok-bg);    color: var(--ok);    border-color: #b7dcc8; }
.flash--error   { background: var(--danger-bg); color: var(--danger); border-color: #f5c0bb; }
.flash--info    { background: var(--surface);   color: var(--text-2); border-color: var(--border); }

/* ── Pagination ───────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 32px 0;
  justify-content: center;
  flex-wrap: wrap;
}

.pagination a, .pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: .875rem;
  text-decoration: none;
  transition: background var(--trans);
}

.pagination a:hover { background: var(--surface); opacity: 1; }
.pagination a.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.pagination__ellipsis { border-color: transparent; color: var(--text-3); }

/* ── Empty states ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-3);
}

.empty-state__icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state__text { font-size: .9rem; }

/* ── Suggest page ─────────────────────────────────────────────── */
.narrow-page { max-width: 540px; margin: 0 auto; padding: 48px 0 80px; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  margin-top: auto;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: .775rem;
  color: var(--text-3);
  flex-wrap: wrap;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-link {
  color: var(--text-3);
  display: flex;
  align-items: center;
  text-decoration: none;
  opacity: .65;
  transition: opacity var(--trans), color var(--trans);
}
.social-link:hover { opacity: 1; color: var(--text); }

/* ── Auth pages ───────────────────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.auth-box {
  width: 100%;
  max-width: 380px;
}

.auth-title {
  font-family: var(--font-d);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-subtitle { font-size: .875rem; color: var(--text-3); margin-bottom: 28px; }
.auth-footer { margin-top: 20px; font-size: .85rem; color: var(--text-3); text-align: center; }

/* ── Responsive ───────────────────────────────────────────────── */

/* Tablet: game page, filter bar */
@media (max-width: 800px) {
  .game-layout { flex-direction: column; gap: 28px; }
  .cover--page { width: 100%; max-width: 240px; }
  .cover--page.cover--placeholder { width: 100%; max-width: 240px; }
  .game-title { font-size: 1.75rem; }

  /* Filter bar: search takes full row, selects share next row */
  .filter-bar form { flex-wrap: wrap; gap: 6px; }
  .search-input { flex: 1 1 100%; max-width: none; }
  .filter-select { flex: 1 1 auto; min-width: 130px; }
}

/* Mobile: hamburger nav, hero stacked, grids narrower */
@media (max-width: 640px) {
  /* ── Hamburger ── */
  .hamburger { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 0 12px;
    margin-left: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
    z-index: 99;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 10px 24px; border-radius: 0; font-size: .9rem; }
  .site-nav a:hover { background: var(--surface); }
  .nav-sep { display: none; }
  .nav-username { padding: 8px 24px 4px; font-size: .8rem; }
  .site-nav .btn-nav,
  .site-nav .btn {
    margin: 4px 16px 0;
    border-radius: var(--r);
    justify-content: center;
  }

  /* ── Hero stacked ── */
  .home-hero { margin: 20px 0 24px; }
  .home-hero__link { flex-direction: column; }
  .home-hero__cover { width: 100%; }
  .home-hero__cover img,
  .home-hero__cover .cover {
    width: 100%;
    height: 220px;
    aspect-ratio: unset;
    object-fit: cover;
    object-position: center top;
  }
  .home-hero__title { font-size: 1.4rem; }
  .home-hero__body { padding: 16px 20px 20px; }

  /* ── Grids ── */
  .page-title { font-size: 1.25rem; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .games-grid--poop { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  /* ── Filter bar: stack everything ── */
  .filter-bar form { flex-direction: column; align-items: stretch; }
  .filter-select { width: 100%; }
  .filter-bar .btn { align-self: flex-start; }

  /* ── Auth pages ── */
  .auth-page { padding: 32px 0; }
}

/* ── Related games ────────────────────────────────────────────── */
.related-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.related-title {
  font-family: var(--font-d);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.games-grid--related {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  padding-bottom: 0; /* override .games-grid default 48px */
}

/* Tighter gap when comments follow directly after related games */
.related-section + .comments-section {
  margin-top: 28px;
}

/* ── Home page ────────────────────────────────────────────────── */

/* Hero */
.home-hero {
  margin: 40px 0 32px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.home-hero__link {
  display: flex;
  gap: 0;
  text-decoration: none;
  color: inherit;
  transition: opacity var(--trans);
}
.home-hero__link:hover { opacity: .85; }

.home-hero__cover {
  flex-shrink: 0;
  width: 200px;
}
.home-hero__cover img,
.home-hero__cover .cover {
  width: 200px;
  height: 300px;
  aspect-ratio: unset;
  border-radius: 0;
  object-fit: cover;
}

.home-hero__body {
  flex: 1;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  background: var(--surface);
}

.home-hero__eyebrow {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
}

.home-hero__title {
  font-family: var(--font-d);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.5px;
  line-height: 1.15;
}

.home-hero__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .875rem;
  color: var(--text-2);
  flex-wrap: wrap;
}

.home-hero__comments {
  font-size: .8rem;
  color: var(--text-3);
}

.comment-delta {
  color: var(--ok);
  font-weight: 500;
}

.home-hero__desc {
  font-size: .9rem;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 560px;
}

/* Stats line */
.home-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .875rem;
  color: var(--text-2);
  margin-bottom: 36px;
}
.home-stats__sep { color: var(--border); }

/* Section header */
.home-section {
  margin-bottom: 48px;
}

.home-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.home-section__title {
  font-family: var(--font-d);
  font-size: 1.1rem;
  font-weight: 600;
}

.home-section__more {
  font-size: .825rem;
  color: var(--text-3);
  text-decoration: none;
}
.home-section__more:hover { color: var(--text); opacity: 1; }

/* Poop section — slightly muted grid */
.games-grid--poop .game-card { opacity: .92; }
.games-grid--poop { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* Bottom section: single column by default (mobile-first),
   sidebar + comments layout on wider screens */
.home-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 60px;
  align-items: start;
}

@media (min-width: 640px) {
  .home-bottom {
    grid-template-columns: 220px 1fr;
    gap: 48px;
  }
}

/* Prevent grid cells from overflowing their column */
.home-random,
.home-comments { min-width: 0; overflow: hidden; }

.home-random__card { max-width: 180px; }

/* Comments feed — compact single-line */
.home-comment-list {
  display: flex;
  flex-direction: column;
}

.home-comment {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity var(--trans);
}
.home-comment:first-child { border-top: 1px solid var(--border); }
.home-comment:hover { opacity: .7; }

.home-comment__author {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.home-comment__on {
  font-size: .8rem;
  color: var(--text-3);
  white-space: nowrap;
}

.home-comment__dash {
  font-size: .8rem;
  color: var(--border);
}

.home-comment__text {
  font-size: .875rem;
  color: var(--text-2);
  word-break: break-word;
  flex: 1 1 60%;
}


