/* blvcksyxx shitpost — two themes, one file. system + mono only. */

:root, [data-theme="dark"] {
  --bg: #0e0d0b;
  --bg80: rgba(14, 13, 11, 0.82);
  --surface: #151412;
  --line: #262420;
  --line-soft: #1b1a17;
  --text: #ece6d9;
  --muted: #a39a87;
  --faint: #6a6357;
  --acc: #c9a15f;
  --acc-dim: rgba(201, 161, 95, 0.14);
  --code-bg: #080706;
  --noise-op: 0.05;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f2eee3;
  --bg80: rgba(242, 238, 227, 0.85);
  --surface: #faf6ec;
  --line: #ddd3bf;
  --line-soft: #e7dfcd;
  --text: #23201a;
  --muted: #6e6555;
  --faint: #a89d87;
  --acc: #8a6a2c;
  --acc-dim: rgba(138, 106, 44, 0.1);
  --code-bg: #e9e2d1;
  --noise-op: 0.06;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  transition: background 0.2s ease, color 0.2s ease;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: var(--noise-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
.mono, .meta, .actions, .foot, .count, .tt { font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; }
.wrap { max-width: 700px; margin: 0 auto; padding: 0 20px; }
a { color: var(--text); text-underline-offset: 3px; }

/* header */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg80);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.top-in { display: flex; align-items: center; gap: 14px; min-height: 58px; }
.brand { font-family: ui-monospace, Menlo, monospace; font-weight: 800; font-size: 17px; letter-spacing: -0.4px; text-decoration: none; white-space: nowrap; }
.brand em { font-style: normal; color: var(--faint); font-weight: 400; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.count { font-size: 12px; color: var(--faint); border: 1px solid var(--line); border-radius: 20px; padding: 1px 9px; }
.tt {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); border-radius: 50%;
  color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  padding: 0;
}
.tt:hover { color: var(--acc); border-color: var(--acc); }
.tt:active { transform: scale(0.92); }
.tt .g { display: none; }
[data-theme="dark"] .tt .g-m { display: inline; }
[data-theme="light"] .tt .g-s { display: inline; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }

/* feed */
#feed { padding-top: 8px; }
.post { padding: 26px 2px 22px; border-bottom: 1px solid var(--line-soft); }
.post:first-child { padding-top: 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 12.5px; color: var(--faint); margin-bottom: 12px; }
.pid { color: var(--muted); text-decoration: none; }
.pid:hover { color: var(--acc); }
.pin { color: var(--acc); background: var(--acc-dim); border-radius: 4px; padding: 0 7px; font-size: 11.5px; }
.body { font-family: Georgia, "Times New Roman", serif; font-size: 17.5px; line-height: 1.72; overflow-wrap: break-word; }
.body > :first-child { margin-top: 0; }
.body > :last-child { margin-bottom: 0; }
.body p, .body ul, .body ol, .body blockquote, .body pre, .body table { margin: 0 0 14px; }
.body h1, .body h2, .body h3, .body h4 { font-family: system-ui, sans-serif; line-height: 1.3; margin: 18px 0 10px; }
.body h1 { font-size: 22px; } .body h2 { font-size: 19px; } .body h3, .body h4 { font-size: 17px; }
.body a { overflow-wrap: anywhere; }
.body img, .body video { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); display: block; margin: 14px 0; animation: fadein 0.45s ease both; }
.body pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; overflow-x: auto; font-size: 13.5px; }
.body code { font-family: ui-monospace, Menlo, monospace; font-size: 0.85em; background: var(--code-bg); border: 1px solid var(--line-soft); padding: 1px 6px; border-radius: 6px; }
.body pre code { background: none; border: none; padding: 0; }
.body blockquote { border-left: 2px solid var(--acc); margin-left: 2px; padding: 2px 0 2px 16px; color: var(--muted); }
.body table { border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.body th, .body td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.actions { display: flex; align-items: center; gap: 16px; margin-top: 14px; font-size: 13px; }
.like {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font: inherit; font-size: 13px; padding: 4px 13px; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.like:hover { color: var(--acc); border-color: var(--acc); }
.like.on { color: var(--acc); border-color: var(--acc); background: var(--acc-dim); }
.like.pop { animation: pop 0.22s ease; }
.views { color: var(--faint); font-size: 12.5px; }
@keyframes pop { 50% { transform: scale(1.22); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* misc public */
.foot { color: var(--faint); font-size: 12px; padding: 34px 0 52px; }
.endline { text-align: center; color: var(--faint); font-size: 13px; padding: 26px 0 10px; font-family: ui-monospace, monospace; }
.loading { text-align: center; color: var(--faint); font-size: 13px; padding: 18px 0; font-family: ui-monospace, monospace; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.archlink { margin: 14px 0 34px; font-size: 14px; }
.archlink a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.archlink a:hover { color: var(--acc); border-color: var(--acc); }
.empty { text-align: center; padding: 70px 10px; }
.empty .big { font-family: Georgia, serif; font-style: italic; font-size: 24px; color: var(--muted); }
.empty .sub { font-size: 13px; color: var(--faint); margin-top: 10px; font-family: ui-monospace, monospace; }
.pagehead { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; margin: 10px 0 6px; }
.arch { list-style: none; padding: 0; margin: 0; }
.arch li { padding: 11px 2px; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; display: flex; gap: 12px; align-items: baseline; }
.arch li:hover { background: var(--surface); }
.arch a { font-family: ui-monospace, monospace; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.arch a:hover { color: var(--acc); }
.arch .dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dim { color: var(--faint); }
.err { text-align: center; padding: 70px 10px; }
.errcode { font-size: 72px; font-weight: 800; letter-spacing: -3px; color: var(--line); }
.err p { color: var(--muted); }

/* login — same URL, no separate /login */
.login { display:flex; justify-content:center; padding:60px 0 80px; }
.login-card { width:100%; max-width:360px; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:28px 24px; }
.login-form { display:flex; gap:10px; }
.login-form input { flex:1; min-width:0; background:var(--code-bg); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:9px 12px; font:14px/1.4 ui-monospace, monospace; outline:none; }
.login-form input:focus { border-color:var(--acc); }
.login-form button { background:var(--text); color:var(--bg); border:1px solid var(--text); border-radius:8px; padding:9px 16px; font:14px/1 ui-monospace, monospace; cursor:pointer; white-space:nowrap; }
.login-form button:hover { opacity:.9; }
.login-err { margin-top:12px; font-size:13px; color:#c0392b; text-align:center; }
[data-theme="light"] .login-err { color:#a8322e; }

/* admin (functional, plain) */
.composer textarea { width: 100%; background: var(--code-bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: 14px/1.6 ui-monospace, monospace; }
.composer .row { display: flex; gap: 10px; align-items: center; margin: 10px 0; font-size: 14px; flex-wrap: wrap; }
.composer button, .adminlist button, .logout button { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 14px; cursor: pointer; font-size: 14px; }
.composer button:hover, .adminlist button:hover, .logout button:hover { border-color: var(--acc); color: var(--acc); }
.adminlist { list-style: none; padding: 0; font-size: 13px; font-family: ui-monospace, monospace; }
.adminlist li { padding: 9px 2px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.logout { margin-left: auto; background: none; border: none; padding: 0; }

@media (max-width: 560px) {
  body { font-size: 15px; }
  .wrap { padding: 0 16px; }
  .post { padding: 20px 0 18px; }
  .body { font-size: 16.5px; }
  .brand { font-size: 15.5px; }
  .top-in { min-height: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
