/* ============================================================
   goyim.soy — The Most Kosher Imageboard on the Internet
   Color scheme: Israeli blue (#0038b8), white, gold (#d4af37)
   ============================================================ */

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue-deep:   #0038b8;
  --blue-mid:    #0050d8;
  --blue-light:  #3878e0;
  --blue-pale:   #d6e4ff;
  --blue-bg:     #eef3ff;
  --gold:        #d4af37;
  --gold-light:  #f0d060;
  --white:       #ffffff;
  --off-white:   #f8f9fc;
  --gray-light:  #e8eaf0;
  --gray-mid:    #c0c4d0;
  --gray-dark:   #6b7280;
  --text:        #1a1d26;
  --text-muted:  #6b7280;
  --red:         #c0392b;
  --green:       #27ae60;
  --border:      #c8d0e8;
  --shadow:      0 2px 8px rgba(0,56,184,0.10);
  --radius:      6px;
  --font-main:   'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:   'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--blue-bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--blue-mid);
  text-decoration: none;
}
a:hover {
  color: var(--blue-deep);
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  background: var(--gray-light);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.9em;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

/* ─── Layout ────────────────────────────────────────────────── */
.site-main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 12px 32px;
}

/* ─── Header ────────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-mid) 100%);
  color: var(--white);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 12px rgba(0,56,184,0.30);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  text-decoration: none;
}

.star-of-david {
  font-size: 26px;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 8px rgba(212,175,55,0.5);
}

.site-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--white);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.header-nav a {
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  transition: background 0.15s;
}
.header-nav a:hover {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  text-decoration: none;
}

.nav-sep {
  color: rgba(255,255,255,0.35);
  font-size: 12px;
}

.header-tagline {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  font-style: italic;
}

.hebrew-accent {
  color: var(--gold);
  font-weight: bold;
  font-style: normal;
}

/* ─── Countdown Bar ─────────────────────────────────────────── */
.countdown-bar {
  background: var(--blue-mid);
  color: var(--white);
  border-bottom: 2px solid var(--gold);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}

.countdown-star {
  color: var(--gold-light);
  line-height: 1;
}

.countdown-label {
  color: rgba(255,255,255,0.85);
}

.countdown-time {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--blue-deep);
  color: rgba(255,255,255,0.75);
  border-top: 3px solid var(--gold);
  padding: 20px 12px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-boards {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}
.footer-boards a {
  color: var(--gold-light);
}
.footer-boards a:hover {
  color: var(--white);
}

.footer-info {
  font-size: 12px;
  color: rgba(255,255,255,0.60);
  line-height: 1.6;
}

.star-of-david-sm {
  color: var(--gold);
  margin-right: 4px;
}

.footer-flavor {
  font-size: 11px;
  color: rgba(255,255,255,0.40);
  font-style: italic;
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-top: 8px;
}

/* ─── Music Player ──────────────────────────────────────────── */
.music-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--blue-deep);
  border-top: 2px solid var(--gold);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.25);
  font-size: 13px;
  color: var(--white);
}

.music-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
}

.music-playlist {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 40vh;
  overflow-y: auto;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.music-playlist-item {
  display: block;
  width: 100%;
  padding: 6px 16px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.music-playlist-item:hover {
  background: rgba(255,255,255,0.12);
}
.music-playlist-item.is-current {
  color: var(--gold-light);
  font-weight: 600;
}

.music-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.15s;
}
.music-btn:hover {
  background: rgba(255,255,255,0.22);
}
.music-btn-wide {
  border-radius: var(--radius);
  width: auto;
  padding: 0 10px;
}

body.has-music-player {
  padding-bottom: 46px;
}

.music-track {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--gold-light);
  font-weight: 600;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: filter 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:hover {
  filter: brightness(1.1);
  text-decoration: none;
}
.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--blue-mid);
  color: var(--white);
}
.btn-secondary {
  background: var(--gray-light);
  color: var(--blue-deep);
  border: 1px solid var(--border);
}
.btn-post {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-mid));
  color: var(--white);
  padding: 8px 24px;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,56,184,0.30);
}

/* ─── Homepage ──────────────────────────────────────────────── */
.welcome-banner {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 48px 16px;
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-mid) 55%, var(--blue-light) 100%);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,56,184,0.30);
  margin-bottom: 24px;
}

.deco-star {
  position: absolute;
  height: auto;
  opacity: 0.22;
  pointer-events: none;
  animation: spin-star linear infinite;
  mix-blend-mode: overlay;
  z-index: 0;
}
.deco-star-1 { top: 14%; left: 8%;   width: 30px; animation-duration: 9s; }
.deco-star-2 { top: 68%; left: 15%;  width: 22px; animation-duration: 6s; }
.deco-star-3 { top: 18%; right: 9%;  width: 44px; animation-duration: 12s; }
.deco-star-4 { top: 70%; right: 17%; width: 26px; animation-duration: 7s; }
.deco-star-5 { top: 40%; left: 50%;  width: 20px; animation-duration: 5s; opacity: 0.12; }

.welcome-hero {
  position: relative;
  z-index: 1;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.welcome-star-wrap {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: -8%;
  transform: translateY(-50%);
  pointer-events: none;
}

.welcome-star {
  display: block;
  width: clamp(320px, 52vw, 640px);
  height: auto;
  filter: drop-shadow(0 0 30px rgba(212,175,55,0.6));
  animation: spin-star 16s linear infinite;
}

@keyframes spin-star {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.welcome-text {
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 440px;
}

.welcome-title {
  font-size: 60px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -1.5px;
  text-shadow: 0 2px 24px rgba(212,175,55,0.55);
}

.welcome-sub {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  margin-bottom: 14px;
}

.welcome-flavor {
  max-width: 480px;
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  font-style: italic;
  line-height: 1.6;
}

.section-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 6px;
}

.star-sm {
  color: var(--gold);
  font-size: 14px;
}

/* Board list cards */
.board-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.board-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue-mid);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.board-card:hover {
  border-left-color: var(--gold);
  box-shadow: 0 8px 22px rgba(0,56,184,0.18);
  transform: translateY(-3px);
}

.board-card.board-nsfw {
  border-left-color: var(--red);
}

.board-card-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.board-link {
  font-size: 18px;
  font-weight: 800;
  color: var(--blue-deep);
  font-family: var(--font-mono);
}
.board-link:hover {
  color: var(--gold);
  text-decoration: none;
}

.board-name-full {
  font-size: 13px;
  color: var(--gray-dark);
  font-weight: 600;
}

.nsfw-badge {
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
}

.board-description {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}

.board-stats {
  font-size: 12px;
  color: var(--gray-dark);
  margin-bottom: 10px;
}
.stat-sep {
  margin: 0 4px;
  color: var(--gray-mid);
}

.board-card-actions {
  display: flex;
  gap: 8px;
}

/* Rules */
.rules-section,
.chat-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.chat-section {
  margin-bottom: 16px;
}

.chat-blurb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chat-homeserver {
  font-size: 12px;
  color: var(--text-muted);
}

.rules-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── Board Page ────────────────────────────────────────────── */
.board-header {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--blue-deep);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.board-header-inner {
  padding: 14px 16px;
}

.board-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--blue-deep);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.board-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

.board-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.board-header-nav {
  font-size: 12px;
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--gray-dark);
}
.board-header-nav a {
  color: var(--blue-mid);
}

/* Post form */
.post-form-container {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.post-form-details {
  padding: 0;
}

.post-form-summary {
  padding: 10px 14px;
  font-weight: 700;
  font-size: 14px;
  color: var(--blue-deep);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius);
  background: var(--blue-pale);
  user-select: none;
  list-style: none;
}
.post-form-summary::-webkit-details-marker { display: none; }
.post-form-summary::before {
  content: '▶';
  font-size: 10px;
  color: var(--blue-mid);
  transition: transform 0.2s;
}
details[open] .post-form-summary::before {
  transform: rotate(90deg);
}
.post-form-summary:hover {
  background: var(--blue-pale);
  filter: brightness(0.97);
}

.post-form {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row label {
  font-weight: 600;
  font-size: 12px;
  color: var(--gray-dark);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.required {
  color: var(--red);
}

.post-form input[type="text"],
.post-form input[type="file"],
.post-form textarea {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: var(--font-main);
  width: 100%;
  background: var(--off-white);
  transition: border-color 0.15s;
}
.post-form input[type="text"]:focus,
.post-form textarea:focus {
  outline: none;
  border-color: var(--blue-mid);
  background: var(--white);
  box-shadow: 0 0 0 2px rgba(0,80,216,0.12);
}

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

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.form-row-inline {
  flex-direction: row;
  align-items: center;
}

.sage-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.form-flavor {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* ─── Thread List ───────────────────────────────────────────── */
.thread-list {
  display: flex;
  flex-direction: column;
}

.thread-preview {
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 4px;
  box-shadow: var(--shadow);
}

.thread-preview-inner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.thread-thumb {
  flex-shrink: 0;
  width: 140px;
}

.thumb-media {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.media-type-badge {
  display: block;
  background: rgba(0,0,0,0.6);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  padding: 2px 0;
  border-radius: 0 0 4px 4px;
  margin-top: -4px;
}

.file-info {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  word-break: break-all;
}
.file-info a {
  color: var(--blue-light);
}
.file-size {
  color: var(--gray-mid);
}
.file-mime {
  color: var(--gray-mid);
  font-style: italic;
  font-size: 10px;
  margin-left: 4px;
}

.thread-body {
  flex: 1;
  min-width: 0;
}

/* ─── Post header ───────────────────────────────────────────── */
.post-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}

.post-subject {
  font-weight: 700;
  color: var(--blue-deep);
  font-size: 14px;
}

.post-anon {
  font-weight: 600;
  color: #1a6b1a;
  font-size: 13px;
}

.post-anon.post-sage {
  color: var(--blue-mid);
}

.post-time {
  font-size: 11px;
  color: var(--text-muted);
}

.post-time-rel {
  font-size: 11px;
  color: var(--gray-mid);
}

.post-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-dark);
}
.post-num:hover {
  color: var(--blue-mid);
}

.reply-to-btn {
  font-size: 12px;
  color: var(--blue-mid);
  font-weight: 600;
}

/* ─── Post comment ──────────────────────────────────────────── */
.post-comment {
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  color: var(--text);
  white-space: pre-wrap;
}

.thread-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray-dark);
  display: flex;
  gap: 12px;
  align-items: center;
}

.reply-link {
  font-weight: 600;
  color: var(--blue-mid);
}

.bump-time {
  color: var(--gray-mid);
  font-size: 11px;
}

/* Inline reply previews on board page */
.reply-preview-list {
  margin-top: 10px;
  border-left: 3px solid var(--blue-pale);
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.reply-preview {
  font-size: 12px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.reply-preview-text {
  color: var(--text-muted);
}

.reply-thumb-tiny {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 3px;
  vertical-align: middle;
  display: inline;
}

.inline-media-badge {
  font-size: 10px;
  background: var(--gray-light);
  padding: 0 4px;
  border-radius: 2px;
  color: var(--gray-dark);
}

.reply-preview-more {
  font-size: 11px;
}
.reply-preview-more a {
  color: var(--gold);
  font-weight: 600;
}

/* Thread flags */
.thread-flags {
  margin-bottom: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.flag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}
.flag-sticky {
  background: #fff8e1;
  color: #b07d00;
  border: 1px solid #ffe082;
}
.flag-locked {
  background: #fdecea;
  color: var(--red);
  border: 1px solid #ffcdd2;
}

.thread-divider {
  margin: 14px 0 0;
}

/* ─── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin: 20px 0 8px;
  flex-wrap: wrap;
}

.page-link {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--blue-mid);
  background: var(--white);
  cursor: pointer;
  transition: background 0.12s;
}
.page-link:hover {
  background: var(--blue-pale);
  text-decoration: none;
}
.page-current {
  background: var(--blue-deep);
  color: var(--white);
  border-color: var(--blue-deep);
  font-weight: 700;
}

/* ─── Catalog ───────────────────────────────────────────────── */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.catalog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow);
}
.catalog-card:hover {
  box-shadow: 0 4px 16px rgba(0,56,184,0.18);
  transform: translateY(-2px);
  text-decoration: none;
}

.catalog-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--gray-light);
  overflow: hidden;
}

.catalog-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-pale);
}

.star-of-david-lg {
  font-size: 48px;
  color: var(--gold);
  opacity: 0.5;
}

.catalog-video-icon {
  font-size: 36px;
  color: var(--blue-mid);
  opacity: 0.7;
}

.catalog-flag {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 14px;
}

.catalog-info {
  padding: 7px 8px;
}

.catalog-subject {
  font-weight: 700;
  font-size: 12px;
  color: var(--blue-deep);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-snippet {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-stats {
  font-size: 11px;
  color: var(--gray-dark);
  margin-top: 4px;
}

/* ─── Thread Page ───────────────────────────────────────────── */
.page-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thread-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* OP post */
.post-op {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.post-inner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.post-file {
  flex-shrink: 0;
  max-width: 250px;
}

.post-media {
  max-width: 250px;
  max-height: 350px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}

.post-media-reply {
  max-width: 180px;
  max-height: 220px;
}

.post-content {
  flex: 1;
  min-width: 0;
}

.post-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray-dark);
}

/* Reply posts */
.reply-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-reply {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue-pale);
  border-radius: 0;
  padding: 10px 14px;
  border-top: none;
}
.post-reply:first-child {
  border-top: 1px solid var(--border);
}
.post-reply:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}
.post-reply:hover {
  background: var(--white);
  border-left-color: var(--blue-light);
}

/* Reply form */
.reply-form-container {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  box-shadow: var(--shadow);
}

.reply-form-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.no-replies {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-style: italic;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}

.locked-notice {
  background: #fdecea;
  border: 1px solid #ffcdd2;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--red);
}

.locked-notice-img {
  display: block;
  max-width: 220px;
  margin: 0 auto 10px;
  border-radius: 4px;
}

.return-link {
  display: flex;
  gap: 12px;
  font-size: 13px;
  padding: 4px 0;
}
.return-link a {
  color: var(--blue-mid);
}

/* ─── Total Goy Freedom page ───────────────────────────────────── */
.page-goy-freedom {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.goy-hero {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 16px;
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-mid) 55%, var(--blue-light) 100%);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,56,184,0.30);
}

.goy-hero-star {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(260px, 60vw, 620px);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0.16;
  animation: spin-star 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.goy-hero-text {
  position: relative;
  z-index: 1;
}

.goy-hero-title {
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -1px;
  text-shadow: 0 2px 24px rgba(212,175,55,0.6);
  margin-bottom: 8px;
}

.goy-hero-sub {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 20px;
}

.goy-hero-countdown {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(24px, 5vw, 44px);
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(212,175,55,0.4);
  border-radius: 12px;
  padding: 12px 28px;
  margin-bottom: 14px;
}

.goy-hero-date {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  font-style: italic;
}

.goy-hero-secondary {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, var(--blue-mid) 0%, var(--blue-light) 100%);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0,56,184,0.22);
}

.goy-hero2-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.goy-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.goy-gallery-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.goy-gallery-item img {
  max-width: 100%;
  max-height: 160px;
  width: auto;
  margin: 0 auto 10px;
  object-fit: contain;
}

.goy-gallery-item p {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-deep);
}

.goy-gallery-big {
  grid-column: span 2;
}
.goy-gallery-big img {
  max-height: 220px;
}

.spin-slow {
  animation: spin-star 8s linear infinite;
}
.spin-fast {
  animation: spin-star 3s linear infinite;
}

.goy-back-link {
  text-align: center;
  font-size: 13px;
}

@media (max-width: 640px) {
  .goy-gallery-big { grid-column: span 1; }
}

/* ─── Error page ────────────────────────────────────────────── */
.page-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
}

.error-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 40px 36px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0,56,184,0.12);
}

.error-jack {
  max-width: 180px;
  margin: 0 auto 12px;
  border-radius: 8px;
}

.error-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--blue-deep);
  margin-bottom: 12px;
}

.error-message {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.error-flavor {
  font-size: 11px;
  color: var(--gray-mid);
  font-style: italic;
}

/* ─── Utility / misc ────────────────────────────────────────── */
.no-content {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-style: italic;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.divider {
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

/* ─── Dark mode ─────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --blue-bg:    #0d1424;
    --off-white:  #111827;
    --white:      #1a2235;
    --text:       #e2e8f0;
    --text-muted: #94a3b8;
    --gray-light: #1e2d45;
    --gray-mid:   #4b6080;
    --gray-dark:  #8899bb;
    --border:     #1e3058;
    --blue-pale:  #0e1e3e;
    --shadow:     0 2px 8px rgba(0,0,0,0.40);
  }

  .board-header { background: var(--white); }
  .post-form-summary { background: #0e1e3e; }
  .post-form input[type="text"],
  .post-form input[type="file"],
  .post-form textarea {
    background: #0d1424;
    color: var(--text);
    border-color: var(--border);
  }
  .post-form input:focus,
  .post-form textarea:focus {
    background: #0a1020;
  }
  .post-reply { background: #111827; }
  .post-reply:hover { background: #1a2235; }
  .catalog-card { background: var(--white); }
  .catalog-no-image { background: #0e1e3e; }
  .page-link { background: var(--white); color: var(--blue-light); }
  .page-link:hover { background: #0e1e3e; }
  .reply-form-container { background: var(--white); }
  .btn-secondary { background: var(--gray-light); color: #c0d4ff; }
  .post-op { background: var(--white); }
  .rules-section { background: var(--white); }
  .chat-section { background: var(--white); }
  .board-card { background: var(--white); }
  .error-box { background: var(--white); }
  .flag-sticky { background: #2a1f00; color: var(--gold-light); border-color: #4a3800; }
  .flag-locked { background: #2a0a0a; color: #ff7070; border-color: #5a1010; }
  .locked-notice { background: #2a0a0a; border-color: #5a1010; color: #ff7070; }
}

/* ─── Greentext & Quoting ───────────────────────────────────── */
.greentext {
  color: #789922;
  display: block;
}
.post-quote {
  color: var(--blue-light);
  text-decoration: underline;
  font-weight: 600;
}
.post-quote:hover { color: var(--gold); }

/* ─── Admin Panel ───────────────────────────────────────────── */
.page-admin { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
.admin-section { margin: 24px 0; }
.admin-section h2 { font-size: 18px; border-bottom: 2px solid var(--blue); padding-bottom: 6px; margin-bottom: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--blue); color: #fff; }
.admin-table tr:hover td { background: var(--blue-pale); }
.admin-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.btn-sm { padding: 2px 8px; font-size: 12px; }
.btn-danger { background: #c0392b; border-color: #922b21; color: #fff; }
.btn-danger:hover { background: #922b21; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .header-tagline { display: none; }
  .board-list { grid-template-columns: 1fr; }
  .thread-preview-inner { flex-direction: column; }
  .thread-thumb { width: 100%; }
  .thumb-media { width: 100%; height: 200px; }
  .post-inner { flex-direction: column; }
  .post-file { max-width: 100%; }
  .post-media { max-width: 100%; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .welcome-title { font-size: 34px; }
  .welcome-banner { padding: 44px 16px 32px; }
  .welcome-hero { min-height: auto; flex-direction: column; justify-content: center; text-align: center; gap: 16px; }
  .welcome-star-wrap { position: static; transform: none; margin: 0 auto; }
  .welcome-star { width: 140px; }
  .welcome-text { text-align: center; max-width: 100%; }
  .welcome-flavor { max-width: 100%; margin: 0 auto; }
  .error-actions { flex-direction: column; align-items: center; }
}
