@font-face {
  font-family: 'SF Pro Display';
  src: url('/fonts/SFPRODISPLAYREGULAR.OTF') format('opentype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'SF Pro Display';
  src: url('/fonts/SFPRODISPLAYMEDIUM.OTF') format('opentype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'SF Pro Display';
  src: url('/fonts/SFPRODISPLAYBOLD.OTF') format('opentype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'SF Pro Display';
  src: url('/fonts/SFPRODISPLAYBOLD.OTF') format('opentype');
  font-weight: 800;
  font-style: normal;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  
  --bg-page:        #f2ebe0;       
  --bg-header:      #4a3728;       
  --bg-header-grad: #36271a;       
  --bg-sidebar:     #ede5d8;       
  --bg-post:        #faf6f0;       
  --bg-post-op:     #f5ede0;       
  --bg-reply:       #faf7f3;       
  --bg-form:        #f0e8db;       
  --bg-footer:      #4a3728;

  --border:         #c9b89a;       
  --border-light:   #ddd0bc;

  --text-main:      #2c1f0f;       
  --text-muted:     #8a6a4a;       
  --text-light:     #b09070;       
  --text-header:    #ffffff;
  --text-subject:   #6b3a2a;       
  --text-link:      #7a4f30;       
  --text-link-hov:  #5a3520;
  --text-quote:     #7a8c50;       

  --accent:         #c05a38;       
  --accent-hov:     #a04828;
  --accent-olive:   #6b7c3a;       
  --sand:           #d4b896;       
}

body {
  font-family: 'SF Pro Display', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  background-color: var(--bg-page);
  color: var(--text-main);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(107,124,58,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(192,90,56,0.06) 0%, transparent 60%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-footer {
  margin-top: auto;
}

a {
  color: var(--text-link);
  text-decoration: none;
}
a:hover {
  color: var(--text-link-hov);
  text-decoration: underline;
}

.site-header {
  background: linear-gradient(135deg, var(--bg-header), var(--bg-header-grad));
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 2px 10px rgba(0,0,0,0.30);
}

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

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-main {
  font-size: 28px;
  font-weight: 800;
  color: #f5e8d8;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.logo-sub {
  font-size: 10px;
  color: #c4a882;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 1px;
}

.board-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.board-nav a {
  color: #d4bfa0;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  letter-spacing: 0.2px;
}

.board-nav a:hover {
  background: rgba(192,90,56,0.35);
  color: #f5e8d8;
  border-color: rgba(192,90,56,0.5);
  text-decoration: none;
}

.page-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: start;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 16px;
}

.sidebar-block {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-olive);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(74,55,40,0.08);
}

.sidebar-block h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 700;
}

.sidebar-block ul {
  list-style: none;
}

.sidebar-block ul li {
  padding: 5px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.sidebar-block ul li:last-child {
  border-bottom: none;
}

.sidebar-block ul li a {
  color: var(--text-link);
  transition: color 0.15s;
}

.sidebar-block ul li a:hover {
  color: var(--accent);
  text-decoration: none;
}

.content {
  min-width: 0;
}

.board-header {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.board-header h1 {
  font-size: 22px;
  color: var(--text-subject);
  font-weight: 800;
  letter-spacing: 0.3px;
}

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

.post-form-wrapper {
  background: var(--bg-form);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 2px 6px rgba(74,55,40,0.08);
}

.post-form-toggle {
  padding: 10px 16px;
  background: var(--sand);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-link);
  user-select: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  letter-spacing: 0.3px;
}

.post-form-toggle:hover {
  background: #c4a882;
  color: var(--bg-header);
}

.post-form {
  padding: 14px 18px;
}

.post-form.hidden {
  display: none;
}

.form-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.form-row label {
  width: 62px;
  font-size: 13px;
  color: var(--text-muted);
  padding-top: 6px;
  flex-shrink: 0;
  font-weight: 600;
}

.form-row input[type="text"],
.form-row textarea {
  flex: 1;
  background: #fff9f4;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-main);
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.form-row input[type="text"]:focus,
.form-row textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192,90,56,0.12);
}

.form-row textarea {
  resize: vertical;
  min-height: 90px;
}

.btn-post {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 8px 26px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(192,90,56,0.3);
}

.btn-post:hover {
  background: var(--accent-hov);
  box-shadow: 0 3px 10px rgba(192,90,56,0.4);
}

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

.threads-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.thread {
  background: var(--bg-post-op);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 5px rgba(74,55,40,0.07);
  transition: box-shadow 0.2s;
}

.thread:hover {
  box-shadow: 0 3px 12px rgba(74,55,40,0.12);
}

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

.post-image img {
  display: block;
  max-width: 200px;
  max-height: 180px;
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s;
}

.post-image img:hover {
  border-color: var(--accent);
  transform: scale(1.02);
}

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

.post-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 7px;
  font-size: 12.5px;
}

.post-subject {
  font-weight: 800;
  color: var(--text-subject);
  font-size: 15px;
  letter-spacing: 0.2px;
}

.post-name {
  font-weight: 700;
  color: var(--accent-olive);
}

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

.post-num {
  color: var(--text-light);
  cursor: pointer;
  font-size: 12px;
  transition: color 0.15s;
}

.post-num:hover {
  color: var(--accent);
  text-decoration: underline;
}

.post-text {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.6;
  word-break: break-word;
}

.quote {
  color: var(--text-quote);
  font-style: italic;
  font-weight: 500;
}

.post-footer {
  margin-top: 10px;
  font-size: 12px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.reply-btn {
  color: var(--accent);
  font-weight: 700;
  transition: color 0.15s;
}

.reply-btn:hover {
  color: var(--accent-hov);
  text-decoration: none;
}

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

.replies {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reply {
  background: var(--bg-reply);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--accent-olive);
  border-radius: 6px;
  padding: 9px 12px;
}

.pagination {
  margin-top: 22px;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.page-current {
  background: var(--accent);
  color: white;
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(192,90,56,0.3);
}

.page-link {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-post);
  color: var(--text-link);
  transition: background 0.15s, border-color 0.15s;
}

.page-link:hover {
  background: var(--sand);
  border-color: var(--accent);
  text-decoration: none;
}

.page-sep {
  color: var(--text-muted);
}

.site-footer {
  background: linear-gradient(135deg, var(--bg-header), var(--bg-header-grad));
  border-top: 3px solid var(--accent);
  padding: 14px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  color: #b09070;
}

.footer-inner a {
  color: #d4b896;
  transition: color 0.15s;
}

.footer-inner a:hover {
  color: #f5e8d8;
}

.alert {
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 14px;
  font-weight: 600;
}
.alert--error   { background: #fceae6; border: 1px solid #e8a090; color: #7a2a1a; }
.alert--success { background: #eaf4e8; border: 1px solid #90c890; color: #1a4a1a; }
.alert--info    { background: #e8f0fa; border: 1px solid #90b0d8; color: #1a3a6a; }

.captcha-wrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.captcha-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.captcha-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}
.captcha-img svg {
  border: 2px solid var(--border);
  border-radius: 7px;
  display: block;
  background: #faf6f0;
}
.captcha-refresh {
  background: var(--sand);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  transition: background 0.15s;
  line-height: 1;
}
.captcha-refresh:hover { background: #c4a882; color: var(--bg-header); }
.captcha-input {
  flex: 1;
  background: #fff9f4;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 14px;
  font-family: monospace;
  letter-spacing: 2px;
  max-width: 200px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.captcha-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192,90,56,0.12);
}

.file-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.file-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.file-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--border);
}

.post-images {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.post-images--multi {
  flex-direction: row;
}
.post-images img {
  max-width: 200px;
  max-height: 200px;
  object-fit: cover;
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s;
  display: block;
}
.post-images img:hover {
  border-color: var(--accent);
  transform: scale(1.02);
}
.post-video {
  max-width: 320px;
  max-height: 240px;
  border-radius: 4px;
  display: block;
}
.file-preview video {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
}
.img-more {
  font-size: 12px;
  color: var(--text-muted);
  align-self: center;
}

a.quote {
  color: var(--text-quote);
  font-style: italic;
  text-decoration: none;
  font-weight: 500;
}
a.quote:hover {
  text-decoration: underline;
  color: var(--accent);
}

.greentext { color: var(--accent-olive); font-style: italic; }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30,20,10,0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  object-fit: contain;
}

.page-wrapper--full {
  grid-template-columns: 1fr;
}
.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.board-card {
  background: var(--bg-post-op);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
  display: block;
}
.board-card:hover {
  box-shadow: 0 4px 16px rgba(74,55,40,0.15);
  transform: translateY(-2px);
  text-decoration: none;
}
.board-card__slug {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}
.board-card__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-subject);
}
.board-card__desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.post-ip {
  font-size: 11px;
  color: #a07050;
  background: #f5ede0;
  border: 1px solid #ddd0bc;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: monospace;
  opacity: 0.8;
}

.lock-notice {
  background: #fdf3e0;
  border: 1px solid #e8c878;
  border-left: 4px solid #c09030;
  border-radius: 7px;
  padding: 12px 16px;
  font-size: 14px;
  color: #7a5010;
  margin-bottom: 14px;
}
.lock-badge {
  background: #fdf3e0;
  border: 1px solid #e8c878;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 11px;
  color: #7a5010;
  margin-left: 8px;
  font-weight: 600;
}
.lock-icon { font-size: 0.85em; }
.mod-lock-btn {
  margin-top: 8px;
  background: transparent;
  border: 1px solid #c9b89a;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.mod-lock-btn:hover { background: #f0e8db; color: var(--text-main); }

.mod-del-btn {
  background: transparent;
  border: 1px solid #e8a090;
  border-radius: 4px;
  color: #c05a38;
  font-size: 11px;
  padding: 2px 8px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s, background 0.15s;
}
.mod-del-btn:hover { opacity: 1; background: #fceae6; }

.empty-board {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 15px;
  background: var(--bg-post);
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.geo-warning-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30,20,10,0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.geo-warning-modal {
  background: linear-gradient(135deg, var(--bg-post), var(--bg-form));
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 32px 40px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  text-align: center;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.geo-warning-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.geo-warning-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-subject);
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.geo-warning-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 24px;
}

.geo-warning-btn {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(192,90,56,0.3);
}

.geo-warning-btn:hover {
  background: var(--accent-hov);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(192,90,56,0.4);
}

.geo-warning-btn:active {
  transform: translateY(0);
}

@media (max-width: 680px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    padding: 12px 10px;
  }
  .sidebar {
    display: none;
  }
  .post {
    flex-direction: column;
  }
  .post-image img {
    max-width: 100%;
    max-height: none;
  }
  .header-inner {
    padding: 10px 14px;
    gap: 14px;
  }
}
