/* paxta.online — anonim choyxona */

:root {
  --bg: #121212;
  --surface: #1A1A18;
  --surface-2: #22221F;
  --sidebar: #161614;
  --hovercard: #1F1F1C;
  --text: #E8E4DC;
  --bright: #F2E8DC;
  --muted: #6E6A60;
  --muted-2: #A8A396;
  --faint: #4A473C;
  --accent: #D9531E;
  --green: #789922;
  --border: #2A2A26;
  --border-2: #33312A;
  --border-3: #3A382F;
  --backlink: #8A5A3E;
  --thumb-bg: #22221F;
  --thumb-icon: #3A382F;
  --spoiler-bg: #2A2A26;
  --row-border: #22221F;
  --shadow: rgba(0, 0, 0, .45);
}

[data-theme="light"] {
  --bg: #F5F1E8;
  --surface: #EFE9DC;
  --surface-2: #EFE9DC;
  --sidebar: #EFE9DC;
  --hovercard: #FDFBF5;
  --text: #1A1A18;
  --bright: #1A1A18;
  --muted: #8A8472;
  --muted-2: #6E6A60;
  --faint: #B5AD9C;
  --border: #DDD5C4;
  --border-2: #D8CFBC;
  --border-3: #C4BBA6;
  --backlink: #C07A52;
  --thumb-bg: #EFE9DC;
  --thumb-icon: #C4BBA6;
  --spoiler-bg: #DDD5C4;
  --row-border: #EAE3D3;
  --shadow: rgba(90, 74, 50, .18);
}

[data-theme="light"] .post,
[data-theme="light"] .thread-card,
[data-theme="light"] .admin-table,
[data-theme="light"] .form-card {
  background: #FDFBF5;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.55 -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.mono { font-family: 'IBM Plex Mono', monospace; }
.grotesk { font-family: 'Space Grotesk', sans-serif; }

/* ============ header ============ */
.site-header {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 46px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 17px 'Space Grotesk', sans-serif;
  color: var(--text);
  flex: none;
}
.wordmark .dot { color: var(--accent); }
.wordmark .tld { color: var(--muted); }
.wordmark svg { stroke: var(--bright); }

.board-nav {
  display: flex;
  gap: 10px;
  font: 400 12px 'IBM Plex Mono', monospace;
  color: var(--muted);
  overflow-x: auto;
  scrollbar-width: none;
}
.board-nav::-webkit-scrollbar { display: none; }
.board-nav a { color: var(--muted); white-space: nowrap; }
.board-nav a:hover, .board-nav a.active { color: var(--bright); }

.header-crumb { font: 400 12px 'IBM Plex Mono', monospace; color: var(--muted); white-space: nowrap; }
.header-crumb .tag { color: var(--accent); }

.header-spacer { flex: 1; }

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  flex: none;
  position: relative;
}
.lang-switch::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 50%;
  background: var(--spoiler-bg);
  transition: transform .28s cubic-bezier(.22, .61, .36, 1);
}
.lang-switch.is-ru::before { transform: translateX(100%); }
.lang-switch a {
  font: 500 10px 'IBM Plex Mono', monospace;
  padding: 4px 0;
  width: 32px;
  text-align: center;
  color: var(--muted);
  position: relative;
  z-index: 1;
  transition: color .28s;
}
.lang-switch a.active { color: var(--bright); }

.theme-toggle {
  background: none;
  border: 0;
  padding: 2px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  flex: none;
}
.theme-toggle svg { stroke: var(--muted); }
.theme-toggle:hover svg { stroke: var(--bright); }
.theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: block; }

/* ============ home ============ */
.home-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.home-logo svg { stroke: var(--bright); }
.home-title { font: 700 34px/1 'Space Grotesk', sans-serif; margin-top: 14px; }
.home-sub { font: 400 12px 'IBM Plex Mono', monospace; color: var(--muted); margin-top: 8px; }

.stitch { width: 100%; border: 0; border-top: 1px dashed var(--border-2); margin: 36px 0 28px; }

.board-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 720px) { .board-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .board-grid { grid-template-columns: 1fr; } }

.board-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
}
.board-card:hover { border-color: var(--accent); }
.board-card .row { display: flex; justify-content: space-between; align-items: baseline; }
.board-card .tag { font: 500 14px 'IBM Plex Mono', monospace; color: var(--accent); }
.board-card .count { font: 400 10px 'IBM Plex Mono', monospace; color: var(--muted); }
.board-card .name { font: 700 14px 'Space Grotesk', sans-serif; color: var(--text); margin-top: 6px; }
.board-card .name2 { font: 400 11px -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--muted); }

.stats-line {
  width: 100%;
  border-top: 1px dashed var(--border-2);
  margin-top: 28px;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font: 400 11px 'IBM Plex Mono', monospace;
  color: var(--muted);
}
.stats-line b { color: var(--muted-2); font-weight: 400; }
.disclaimer {
  width: 100%;
  margin-top: 12px;
  font: 400 10px/1.5 'IBM Plex Mono', monospace;
  color: var(--faint);
}

/* ============ buttons & controls ============ */
.btn {
  display: inline-block;
  border: 0;
  padding: 7px 16px;
  border-radius: 3px;
  font: 500 13px 'Space Grotesk', sans-serif;
  cursor: pointer;
  color: var(--text);
  background: none;
}
.btn--primary { background: var(--accent); color: #FFF; }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { border: 1px solid var(--border); }
.btn--sm { padding: 5px 12px; font-size: 12px; }

.seg {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.seg a, .seg span {
  font: 500 11px 'IBM Plex Mono', monospace;
  padding: 5px 12px;
  color: var(--muted);
  cursor: pointer;
}
.seg .active { background: var(--spoiler-bg); color: var(--bright); }

select.ctl, input.ctl, textarea.ctl {
  font: 400 12px 'IBM Plex Mono', monospace;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 8px 10px;
  outline: none;
}
textarea.ctl {
  font: 400 14px/1.5 -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 110px;
  resize: vertical;
  width: 100%;
}
input.ctl:focus, textarea.ctl:focus { border-color: var(--accent); }

/* ============ catalog ============ */
.page-wrap { padding: 20px 24px 48px; max-width: 1160px; margin: 0 auto; }

.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.catalog-title { font: 700 20px 'Space Grotesk', sans-serif; color: var(--text); }
.catalog-title .tag { font: 500 18px 'IBM Plex Mono', monospace; color: var(--accent); }
.catalog-title .name2 { font: 400 13px -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--muted); }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
@media (max-width: 1000px) { .catalog-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .catalog-grid { grid-template-columns: 1fr 1fr; } }

.thread-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.thread-card:hover { border-color: var(--border-3); }
.thread-card .thumb {
  height: 104px;
  background: var(--thumb-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.thread-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thread-card .thumb svg { stroke: var(--thumb-icon); }
.thread-card .body { padding: 8px 10px 10px; }
.thread-card .meta { font: 400 10px 'IBM Plex Mono', monospace; color: var(--muted); margin-bottom: 5px; }
.thread-card .text {
  font: 400 12px/1.45 -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.thread-card .text b { font-family: 'Space Grotesk', sans-serif; color: var(--bright); }

.thread-list .thread-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 4px;
  border-top: 1px dashed var(--border-2);
}
.thread-list .thread-row:last-child { border-bottom: 1px dashed var(--border-2); }
.thread-row .meta { font: 400 10px 'IBM Plex Mono', monospace; color: var(--muted); flex: none; }
.thread-row .text { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  font: 400 12px 'IBM Plex Mono', monospace;
}
.pagination a, .pagination span { padding: 4px 9px; color: var(--muted); border-radius: 3px; }
.pagination .active { background: var(--spoiler-bg); color: var(--bright); }

/* ============ thread / posts ============ */
.thread-wrap { max-width: 900px; margin: 0 auto; padding: 20px 24px 48px; position: relative; }

.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
}
.post--reply {
  border-left: 2px solid var(--border-2);
  padding: 10px 14px;
}
.replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  margin-left: 20px;
}
@media (max-width: 640px) { .replies { margin-left: 10px; } }

.post:target { border-color: var(--accent); }

.post-meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  font: 400 12px 'IBM Plex Mono', monospace;
  color: var(--muted);
}
.post-meta .name { font-weight: 500; color: var(--bright); }
.post-meta .num { font-weight: 500; color: var(--accent); cursor: pointer; }
.post-meta .op-badge { font-size: 10px; color: var(--faint); }
.post-meta .spacer { flex: 1; }
.post-meta .act { font-size: 11px; color: var(--muted); cursor: pointer; background: none; border: 0; padding: 0; font-family: 'IBM Plex Mono', monospace; }
.post-meta .act:hover { color: var(--accent); }

.post-flex { display: flex; gap: 14px; margin-top: 10px; align-items: flex-start; }
@media (max-width: 560px) { .post-flex { flex-direction: column; } }

.post-thumb {
  flex: none;
  background: var(--thumb-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
}
.post-thumb--op { width: 180px; }
.post-thumb--reply { width: 120px; }
.post-thumb img { max-width: 100%; display: block; }
.post-thumb .fn { font: 400 9px 'IBM Plex Mono', monospace; color: var(--faint); padding: 2px 4px; word-break: break-all; }

.post-body { font: 400 14px/1.55 -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text); word-break: break-word; min-width: 0; }
.post-subject { font: 700 15px 'Space Grotesk', sans-serif; color: var(--bright); margin-bottom: 6px; }

.greentext { color: var(--green); }

.post-ref {
  font: 400 13px 'IBM Plex Mono', monospace;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}
.post-ref--dead { color: var(--faint); text-decoration: line-through; cursor: default; }

.backlinks { margin-top: 10px; font: 400 11px 'IBM Plex Mono', monospace; color: var(--backlink); display: flex; gap: 8px; flex-wrap: wrap; }
.backlinks a { color: var(--backlink); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }

.spoiler {
  background: var(--spoiler-bg);
  color: transparent;
  padding: 1px 6px;
  border-radius: 2px;
  cursor: pointer;
  transition: color .12s;
}
.spoiler.open, .spoiler:hover, .spoiler:focus { color: var(--text); }

.hover-preview {
  position: absolute;
  width: min(420px, 90vw);
  background: var(--hovercard);
  border: 1px solid var(--border-3);
  border-radius: 4px;
  padding: 10px 14px;
  box-shadow: 0 10px 28px var(--shadow);
  z-index: 30;
  pointer-events: none;
}
.hover-preview .post-body { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.thread-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  border-top: 1px dashed var(--border-2);
  padding-top: 14px;
  flex-wrap: wrap;
  font: 400 11px 'IBM Plex Mono', monospace;
  color: var(--muted);
}
.thread-footer .links a { color: var(--muted); }
.thread-footer .links a:hover { color: var(--bright); }

/* ============ posting form ============ */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px 20px;
  margin-top: 16px;
}
.form-card h3 { font: 700 15px 'Space Grotesk', sans-serif; margin: 0 0 14px; color: var(--text); }
.form-card h3 small { font: 400 11px 'IBM Plex Mono', monospace; color: var(--muted); }
.form-stack { display: flex; flex-direction: column; gap: 10px; }
.form-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.file-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px dashed var(--border-3);
  border-radius: 3px;
  padding: 8px 12px;
  flex: 1;
  cursor: pointer;
  min-width: 220px;
}
.file-drop .box {
  width: 44px; height: 44px;
  background: var(--thumb-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  overflow: hidden;
}
.file-drop .box img { width: 100%; height: 100%; object-fit: cover; }
.file-drop .box svg { stroke: var(--thumb-icon); }
.file-drop .fn { font: 400 12px 'IBM Plex Mono', monospace; color: var(--muted-2); }
.file-drop .hint { font: 400 10px 'IBM Plex Mono', monospace; color: var(--muted); }
.file-drop.dragover { border-color: var(--accent); }

.form-hint { font: 400 10px 'IBM Plex Mono', monospace; color: var(--muted); }

.form-errors {
  font: 400 12px 'IBM Plex Mono', monospace;
  color: var(--accent);
  display: flex; flex-direction: column; gap: 3px;
}
.flash {
  font: 400 12px 'IBM Plex Mono', monospace;
  color: var(--green);
  margin-bottom: 10px;
}

/* FAB */
.fab {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  border: 0;
  border-radius: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px var(--shadow);
  cursor: pointer;
  z-index: 25;
}
@media (max-width: 720px) { .fab { display: flex; } }

/* report inline form */
.report-pop { margin-top: 8px; display: none; gap: 8px; }
.report-pop.open { display: flex; }
.report-pop input { flex: 1; }

/* ============ 404 / banned ============ */
.void-wrap {
  min-height: calc(100vh - 46px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 24px;
}
.void-wrap svg { stroke: var(--faint); }
.void-code { font: 700 40px 'Space Grotesk', sans-serif; color: var(--text); }
.void-text { font: 400 13px 'IBM Plex Mono', monospace; color: var(--muted); }
.void-sep { width: 120px; border: 0; border-top: 1px dashed var(--border-2); }
.void-wrap .post-ref { font-size: 12px; }

/* ============ admin ============ */
.admin-shell { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
@media (max-width: 860px) { .admin-shell { grid-template-columns: 1fr; } }

.admin-side {
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
}
.admin-side .brand {
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px 16px;
  border-bottom: 1px dashed var(--border-2);
  font: 700 14px 'Space Grotesk', sans-serif;
  color: var(--text);
}
.admin-side .brand svg { stroke: var(--bright); }
.admin-nav { display: flex; flex-direction: column; padding-top: 8px; }
.admin-nav a {
  font: 400 12px 'IBM Plex Mono', monospace;
  color: var(--muted);
  padding: 9px 16px;
  border-left: 2px solid transparent;
}
.admin-nav a.active {
  font-weight: 500;
  color: var(--bright);
  background: var(--hovercard);
  border-left-color: var(--accent);
}
.admin-nav a .cnt { color: var(--accent); }
.admin-side .foot {
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px dashed var(--border-2);
  font: 400 10px 'IBM Plex Mono', monospace;
  color: var(--muted);
}
.admin-side .foot button { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.admin-side .foot button:hover { color: var(--accent); }

.admin-main { padding: 20px 24px 28px; min-width: 0; }
.admin-h1 { font: 700 18px 'Space Grotesk', sans-serif; margin: 0 0 16px; color: var(--text); }
.admin-h1 small { font: 400 11px 'IBM Plex Mono', monospace; color: var(--muted); }
.admin-h2 { font: 700 13px 'Space Grotesk', sans-serif; margin: 0 0 8px; color: var(--text); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 14px 16px; }
.stat-card .lbl { font: 400 10px 'IBM Plex Mono', monospace; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stat-card .val { font: 700 28px 'Space Grotesk', sans-serif; color: var(--text); margin-top: 6px; }
.stat-card .val--accent { color: var(--accent); }
.stat-card .sub { font: 400 10px 'IBM Plex Mono', monospace; color: var(--muted); margin-top: 2px; }
.stat-card .sub--green { color: var(--green); }

.admin-table { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 22px; background: var(--bg); }
.admin-table .thead, .admin-table .row {
  display: grid;
  gap: 0;
  padding: 9px 12px;
  align-items: center;
  font: 400 12px 'IBM Plex Mono', monospace;
}
.admin-table .thead {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font: 500 10px 'IBM Plex Mono', monospace;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.admin-table .row { border-bottom: 1px solid var(--row-border); }
.admin-table .row:last-child { border-bottom: 0; }
.admin-table .tag { color: var(--accent); }
.admin-table .num { color: var(--accent); }
.admin-table .txt { color: var(--muted-2); font-family: -apple-system, 'Segoe UI', Roboto, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-table .dim { color: var(--muted); }
.admin-table .green { color: var(--green); }
.admin-table .accent { color: var(--accent); }
.admin-table form { display: inline; }

.chip {
  padding: 3px 8px;
  border-radius: 2px;
  font: 400 10px 'IBM Plex Mono', monospace;
  cursor: pointer;
  border: 0;
  background: var(--spoiler-bg);
  color: var(--text);
}
.chip--accent { background: var(--accent); color: #FFF; }
.chip--ghost { background: none; border: 1px solid var(--border); color: var(--muted); }
.chip--danger { background: none; border: 1px solid var(--backlink); color: var(--accent); }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }

.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1100px) { .admin-cols { grid-template-columns: 1fr; } }

.mod-log-list {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font: 400 11px 'IBM Plex Mono', monospace;
  color: var(--muted);
}
.mod-log-list .who { color: var(--muted-2); }
.mod-log-list .num { color: var(--accent); }

.admin-form-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: var(--sidebar);
  flex-wrap: wrap;
}

/* login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.login-card .brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 8px; }
.login-card .brand svg { stroke: var(--bright); }

/* bottom sheet (mobile form) */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 40;
  display: none;
}
.sheet-backdrop.open { display: block; }
@media (max-width: 720px) {
  body.sheet-open { overflow: hidden; }
  .form-card--sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    margin: 0;
    border-radius: 6px 6px 0 0;
    border-bottom: 0;
    z-index: 41;
    max-height: 82vh;
    overflow-y: auto;
    display: none;
  }
  .form-card--sheet.open { display: block; }
  .form-card--sheet::before {
    content: '';
    display: block;
    width: 36px; height: 3px;
    background: var(--border-3);
    border-radius: 2px;
    margin: 0 auto 12px;
  }
}

img { max-width: 100%; }

[hidden] { display: none !important; }

/* ============ smooth theme switch ============ */
html.theme-anim body,
html.theme-anim body * {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease,
    fill .45s ease, stroke .45s ease, box-shadow .45s ease !important;
}

/* ============ live online pill ============ */
@keyframes paxta-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.odot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: paxta-pulse 2.2s infinite;
  flex: none;
}

.online-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 4px 9px;
  font: 400 10px 'IBM Plex Mono', monospace;
  color: var(--muted);
  flex: none;
}
.online-pill b { color: var(--bright); font-weight: 500; }
.online-pill:hover { border-color: var(--accent); }
@media (max-width: 560px) { .online-pill .lbl--chat { display: none; } }
@media (max-width: 400px) { .online-pill .lbl { display: none; } }

/* home chat banner */
.chat-banner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px dashed var(--border-3);
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.chat-banner:hover { border-color: var(--accent); }
.cb-title { font: 700 14px 'Space Grotesk', sans-serif; color: var(--bright); }
.cb-sub { font: 400 11px -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--muted); }
.cb-online { font: 400 11px 'IBM Plex Mono', monospace; color: var(--muted); white-space: nowrap; }
.cb-online b { color: var(--green); font-weight: 500; }

.foot-link { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.foot-link:hover { color: var(--bright); }

/* ============ rules / consent ============ */
.rules-link {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  color: var(--faint);
}
.rules-link:hover { color: var(--muted-2); }

.rules-wrap { max-width: 640px; margin: 0 auto; padding: 40px 24px 60px; }
.rules-title { font: 700 26px 'Space Grotesk', sans-serif; margin: 0 0 24px; color: var(--text); }
.rules-sec { margin-bottom: 26px; }
.rules-sec h2 { font: 500 13px 'IBM Plex Mono', monospace; color: var(--accent); margin: 0 0 8px; }
.rules-sec p, .rules-sec li { font: 400 13.5px/1.65 -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text); }
.rules-sec p { margin: 0 0 8px; }
.rules-sec ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.rules-foot { margin-top: 32px; font: 400 12px 'IBM Plex Mono', monospace; }
.rules-foot a { color: var(--muted); }
.rules-foot a:hover { color: var(--bright); }

.consent-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.consent-card {
  width: 460px;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-3);
  border-radius: 6px;
  padding: 22px 24px;
  box-shadow: 0 14px 40px var(--shadow);
}
.consent-head {
  display: flex;
  gap: 10px;
  align-items: center;
  font: 700 16px 'Space Grotesk', sans-serif;
  color: var(--bright);
  margin-bottom: 12px;
}
.consent-head svg { stroke: var(--bright); }
.consent-list {
  margin: 0 0 16px;
  padding-left: 18px;
  font: 400 12.5px/1.6 -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.consent-actions { display: flex; gap: 10px; align-items: center; }

/* ============ suhbat (chat) ============ */
.chat-wrap {
  max-width: 760px;
  margin: 0 auto;
  height: calc(100vh - 46px);
  height: calc(100dvh - 46px);
  display: flex;
  flex-direction: column;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-empty {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font: 400 12px 'IBM Plex Mono', monospace;
}
.chat-empty svg { stroke: var(--faint); }

.cday {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font: 400 10px 'IBM Plex Mono', monospace;
  margin: 6px 0 2px;
}
.cday::before, .cday::after { content: ''; flex: 1; border-top: 1px dashed var(--border-2); }

.cmsg {
  max-width: 86%;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px 6px 6px 2px;
  padding: 8px 12px 9px;
  align-self: flex-start;
  transition: border-color .25s;
}
[data-theme="light"] .cmsg { background: #FDFBF5; }
.cmsg--mine {
  align-self: flex-end;
  border-radius: 6px 6px 2px 6px;
  border-color: var(--border-3);
  background: linear-gradient(0deg, rgba(217, 83, 30, .05), rgba(217, 83, 30, .05)), var(--surface);
}
[data-theme="light"] .cmsg--mine { background: #FBF0E7; }
.cmsg.hit { border-color: var(--accent); }

.cmeta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font: 400 10.5px 'IBM Plex Mono', monospace;
  color: var(--muted);
  margin-bottom: 3px;
}
.canon { font-weight: 500; }
.cyou { color: var(--faint); font-size: 9px; }
.ctime { color: var(--faint); }
.cspacer { flex: 1; min-width: 14px; }

.creply {
  background: none;
  border: 0;
  padding: 0;
  font: 400 10px 'IBM Plex Mono', monospace;
  color: var(--faint);
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.cmsg:hover .creply, .creply:focus { opacity: 1; }
@media (hover: none) { .creply { opacity: 1; } }
.creply:hover { color: var(--accent); }
.creport.done { color: var(--green); cursor: default; opacity: 1; }

.cquote {
  display: flex;
  gap: 8px;
  align-items: baseline;
  border-left: 2px solid var(--accent);
  background: var(--spoiler-bg);
  border-radius: 2px;
  padding: 4px 9px;
  margin: 2px 0 6px;
  font: 400 11px 'IBM Plex Mono', monospace;
  color: var(--muted-2);
  cursor: pointer;
  overflow: hidden;
}
.cquote .qanon { font-weight: 500; flex: none; }
.cquote .qtext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cbody { font: 400 13.5px/1.5 -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text); word-break: break-word; }

.cimg {
  display: block;
  margin: 4px 0;
  cursor: pointer;
  max-width: 240px;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  background: var(--thumb-bg);
}
.cimg img { display: block; max-width: 100%; }
.cimg.expanded { max-width: 100%; }

.caudio { display: flex; align-items: center; gap: 10px; margin: 4px 0; min-width: 210px; }
.cplay {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  padding: 0;
}
.cplay .i-pause { display: none; }
.caudio.playing .cplay .i-play, .cplay.playing .i-play { display: none; }
.caudio.playing .cplay .i-pause, .cplay.playing .i-pause { display: block; }
.cwave { flex: 1; height: 4px; background: var(--spoiler-bg); border-radius: 2px; cursor: pointer; overflow: hidden; }
.cwave i { display: block; height: 100%; width: 0; background: var(--accent); }
.cdur { font: 400 10px 'IBM Plex Mono', monospace; color: var(--muted); }

/* voice player embedded in board posts */
.caudio--post {
  max-width: 340px;
  min-width: 230px;
  background: var(--thumb-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  margin: 0 0 8px;
}

/* voice row in posting forms */
.form-voice { align-items: center; }
.form-voice .chat-icon { width: 38px; height: 38px; }

.chat-err { margin: 0 20px 6px; font: 400 11px 'IBM Plex Mono', monospace; color: var(--accent); }

.chat-bar {
  margin: 10px 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 28px var(--shadow);
}
[data-theme="light"] .chat-bar { background: #FDFBF5; }
@media (max-width: 560px) { .chat-bar { margin: 8px 8px 10px; padding: 10px; } }

.chat-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 10px 'IBM Plex Mono', monospace;
  color: var(--muted-2);
}
.chat-upload .bar { flex: 1; height: 4px; background: var(--spoiler-bg); border-radius: 2px; overflow: hidden; }
.chat-upload .bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .12s linear; }
.chat-upload .pct { min-width: 34px; text-align: right; color: var(--accent); }

.chat-replyp {
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-left: 2px solid var(--accent);
  background: var(--spoiler-bg);
  border-radius: 2px;
  padding: 6px 10px;
  font: 400 11px 'IBM Plex Mono', monospace;
  color: var(--muted-2);
  overflow: hidden;
}
.chat-replyp .rq { color: var(--accent); flex: none; }
.chat-replyp .ranon { font-weight: 500; flex: none; }
.chat-replyp .rtext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-replyp .x { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; flex: none; }
.chat-replyp .x:hover { color: var(--accent); }

.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-icon {
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 3px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  padding: 0;
  touch-action: none;
  transition: color .15s, border-color .15s;
}
.chat-icon:hover { color: var(--bright); border-color: var(--border-3); }
.chat-mic.recording { color: #FFF; background: var(--accent); border-color: var(--accent); animation: paxta-pulse 1.2s infinite; }

.chat-input {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 132px;
  font: 400 14px/1.45 -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 12px;
  outline: none;
  transition: border-color .15s;
}
.chat-input:focus { border-color: var(--accent); }

.chat-send {
  width: 52px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 0;
  border-radius: 3px;
  background: var(--accent);
  color: #FFF;
  cursor: pointer;
  transition: filter .15s, transform .06s;
}
.chat-send:hover { filter: brightness(1.08); }
.chat-send:active { transform: scale(.96); }
.chat-send:disabled { opacity: .55; cursor: default; transform: none; }
.chat-send svg { display: block; margin-left: 2px; }

.chat-attach, .chat-voicep {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px dashed var(--border-3);
  border-radius: 3px;
  padding: 6px 10px;
  font: 400 11px 'IBM Plex Mono', monospace;
  color: var(--muted-2);
}
.chat-attach img { width: 36px; height: 36px; object-fit: cover; border-radius: 2px; border: 1px solid var(--border); }
.chat-attach .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-attach .x, .chat-voicep .x { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; flex: none; }
.chat-attach .x:hover, .chat-voicep .x:hover { color: var(--accent); }
.chat-voicep .hint { color: var(--muted); }

.chat-rec { display: flex; align-items: center; gap: 10px; font: 400 12px 'IBM Plex Mono', monospace; color: var(--accent); }
.rdot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: paxta-pulse 1s infinite; flex: none; }
.chat-rec .hint { color: var(--muted); }

.chat-bar .rules-link { align-self: flex-start; }

/* ============ large screens (QHD+): scale the whole UI up ============ */
@media (min-width: 1800px) {
  body { font-size: 16px; }

  .site-header { height: 58px; padding: 0 28px; gap: 18px; }
  .wordmark { font-size: 21px; }
  .wordmark svg { width: 25px; height: 25px; }
  .header-crumb, .board-nav { font-size: 14px; }
  .lang-switch a { font-size: 12px; width: 40px; padding: 6px 0; }
  .theme-toggle svg { width: 20px; height: 20px; }

  .home-wrap { max-width: 1000px; padding-top: 90px; }
  .home-logo svg { width: 72px; height: 72px; }
  .home-title { font-size: 46px; }
  .home-sub { font-size: 14px; margin-top: 10px; }
  .board-grid { gap: 14px; }
  .board-card { padding: 18px 20px; border-radius: 6px; }
  .board-card .tag { font-size: 18px; }
  .board-card .count { font-size: 12px; }
  .board-card .name { font-size: 18px; margin-top: 8px; }
  .board-card .name2 { font-size: 13px; }
  .chat-banner { padding: 16px 22px; border-radius: 6px; }
  .chat-banner .odot { width: 8px; height: 8px; }
  .cb-title { font-size: 18px; }
  .cb-sub, .cb-online { font-size: 13px; }
  .stats-line { font-size: 13px; }
  .disclaimer { font-size: 12px; }

  .btn { font-size: 15px; padding: 9px 20px; }
  .btn--sm { font-size: 13px; padding: 7px 15px; }
  select.ctl, input.ctl, textarea.ctl { font-size: 14px; padding: 10px 12px; }
  textarea.ctl { font-size: 15px; min-height: 130px; }
  .form-hint { font-size: 12px; }
  .form-card h3 { font-size: 17px; }
  .file-drop .fn { font-size: 13px; }
  .file-drop .hint { font-size: 11px; }

  .page-wrap { max-width: 1440px; }
  .catalog-title { font-size: 24px; }
  .catalog-title .tag { font-size: 21px; }
  .catalog-title .name2 { font-size: 15px; }
  .seg a, .seg span { font-size: 12px; padding: 6px 14px; }
  .thread-card .thumb { height: 130px; }
  .thread-card .meta { font-size: 11px; }
  .thread-card .text { font-size: 13.5px; }

  .thread-wrap { max-width: 1060px; }
  .post-meta { font-size: 13px; }
  .post-body { font-size: 15.5px; }
  .post-subject { font-size: 18px; }
  .post-ref { font-size: 14px; }
  .post-thumb--op { width: 220px; }
  .post-thumb--reply { width: 150px; }
  .thread-footer { font-size: 13px; }

  .chat-wrap { max-width: 920px; }
  .cmeta { font-size: 12px; }
  .cbody { font-size: 15.5px; }
  .cquote { font-size: 12px; }
  .cimg { max-width: 320px; }
  .cplay { width: 34px; height: 34px; }
  .cdur { font-size: 11px; }
  .creply { font-size: 11px; }
  .cday { font-size: 11px; }
  .chat-empty { font-size: 13px; }
  .chat-icon { width: 48px; height: 48px; }
  .chat-input { min-height: 48px; font-size: 15px; }
  .chat-send { width: 58px; height: 48px; }
  .chat-send svg { width: 22px; height: 22px; }
  .chat-attach, .chat-voicep, .chat-replyp { font-size: 12px; }
  .chat-rec { font-size: 13px; }

  .rules-wrap { max-width: 780px; }
  .rules-title { font-size: 32px; }
  .rules-sec h2 { font-size: 15px; }
  .rules-sec p, .rules-sec li { font-size: 15px; }

  .consent-card { width: 540px; padding: 26px 30px; }
  .consent-head { font-size: 19px; }
  .consent-list { font-size: 14px; }

  .void-code { font-size: 52px; }
  .void-text { font-size: 15px; }
}
