:root {
  --bg: #0a0c0b; --panel: #0d100f; --card: #111513; --soft: #171c1a; --line: #1f2624; --line2: #2a3230;
  --text: #e9edeb; --muted: #8b9490; --dim: #626b67; --accent: #2fc56b; --accent-soft: rgba(47,197,107,.12);
  --link: #6fd99a; --green: #8fcf5a; --bad: #ef5350; --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg) radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 18px 18px; }
a { color: var(--link); text-decoration: none; }
h1 { font-size: 1.45rem; letter-spacing: -.3px; margin: 0; }
h2 { font-size: 1.05rem; margin: 20px 0 8px; }
h6 { margin: 20px 12px 6px; font-size: .68rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dim); }
input, textarea, select, button { font: inherit; color: inherit; }
input, textarea, select { width: 100%; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 10px; background: var(--soft); outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input[type=checkbox] { width: auto; margin-right: 8px; accent-color: var(--accent); }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--line2); border-radius: 10px; background: var(--soft); color: var(--text); font-weight: 500; cursor: pointer; }
button:hover, .btn:hover { border-color: var(--dim); }
.primary, button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #04140a; font-weight: 600; }
button:disabled { opacity: .5; }
svg { display: block; flex: none; }

/* shell */
.side { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 268px; display: flex; flex-direction: column; overflow-y: auto; padding: 14px 8px; background: var(--panel); border-right: 1px solid var(--line); scrollbar-width: thin; }
.logo { display: flex; align-items: center; gap: 8px; padding: 4px 12px 14px; font-weight: 700; font-size: 1.1rem; color: var(--text); }
.lm { color: var(--accent); font-size: 1.3rem; }
.sn { display: grid; gap: 2px; }
.sn a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn a span:last-child { overflow: hidden; text-overflow: ellipsis; }
.sn a svg { width: 20px; height: 20px; }
.sn a:hover { background: var(--soft); color: var(--text); }
.sn a.on { background: var(--accent-soft); color: var(--accent); }
.bav { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line2); font-size: .8rem; }
.bav.lg { width: 40px; height: 40px; font-size: 1.2rem; }
.side footer { margin-top: auto; padding: 20px 12px 4px; color: var(--dim); font-size: .72rem; }
.side footer nav { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; } .side footer a { color: var(--muted); }
.scrim { display: none; }
.col { margin-left: 268px; min-height: 100vh; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 24px; background: rgba(10,12,11,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.burger { display: none; cursor: pointer; padding: 6px; color: var(--text); }
.search { flex: 1; max-width: 640px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 10px; background: var(--soft); color: var(--muted); }
.search svg { width: 18px; height: 18px; }
.search input { border: 0; background: none; padding: 9px 0; }
.top .btn { margin-left: auto; white-space: nowrap; }
.cols { display: flex; gap: 28px; max-width: 1000px; padding: 24px; }
main { flex: 1; min-width: 0; max-width: 640px; padding-bottom: 80px; }
.right { width: 300px; flex: none; display: grid; gap: 14px; align-content: start; position: sticky; top: 88px; }
.box { padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.box h6 { margin: 0 0 14px; }
.box ol { margin: 0 0 12px; padding-left: 18px; color: var(--dim); }
.box li { margin-bottom: 12px; } .box li b { color: var(--text); font-weight: 500; display: block; } .box li small { color: var(--muted); }
.box dl { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 0; font-size: .9rem; } .box dt { color: var(--muted); } .box dd { margin: 0; }

/* page heads + feed */
.ph { margin-bottom: 18px; } .ph h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .ph p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.anon { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.anon svg { width: 22px; height: 22px; color: var(--accent); } .anon p { margin: 0; }
.feed { display: grid; gap: 14px; }
.fcard { padding: 18px 20px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s; }
.fcard:hover { border-color: var(--line2); }
.fmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; color: var(--dim); }
.chip { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 500; }
.ftitle { display: block; margin: 8px 0 4px; font-size: 1.12rem; font-weight: 700; letter-spacing: -.2px; color: var(--text); overflow-wrap: anywhere; }
.fsnip { margin: 0 0 4px; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.fimg { display: block; margin-top: 10px; border-radius: 12px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.fimg img { display: block; width: 100%; max-height: 480px; object-fit: cover; }
.spoil img { filter: blur(24px); }
.fact { display: flex; align-items: center; gap: 18px; margin-top: 10px; font-size: .82rem; color: var(--muted); }
.fact a, .fact span, .fact button { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.fact svg { width: 18px; height: 18px; }
.fact .share { margin-left: auto; border: 0; background: none; padding: 4px 8px; }
.fact a:hover, .fact .share:hover { color: var(--text); }
.empty { color: var(--muted); text-align: center; padding: 48px 16px; }

/* boards list */
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bcard { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); }
.bcard:hover { border-color: var(--line2); }
.bcard small { display: block; color: var(--muted); font-size: .8rem; }
.nsfw { display: inline-block; padding: 1px 6px; border-radius: 6px; background: rgba(239,83,80,.15); color: var(--bad); font-size: .7rem; font-weight: 700; }
.brules { margin-top: 10px; } .brules summary { color: var(--muted); cursor: pointer; font-size: .85rem; }
.newthread { margin-bottom: 18px; }
.newthread > summary { list-style: none; width: 100%; }
.newthread > summary::-webkit-details-marker { display: none; }
.newthread .pf { margin-top: 12px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

/* thread */
.crumbs { display: flex; justify-content: space-between; margin-bottom: 14px; color: var(--muted); font-size: .9rem; }
.crumbs a { color: var(--text); }
#posts { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post { padding: 14px 20px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.post.op { border-top: 0; padding: 20px; }
.post:target, .post.hl { background: var(--accent-soft); }
.post.deleted { opacity: .45; }
.post header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .82rem; color: var(--dim); }
.av { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; color: #0a0c0b; font-weight: 700; font-size: .8rem; background: var(--soft); }
.av.c0 { background: #f4b183; } .av.c1 { background: #9fd8a8; } .av.c2 { background: #8ecfe0; } .av.c3 { background: #b4a7e5; }
.av.c4 { background: #e7a6d6; } .av.c5 { background: #e8dc8f; } .av.c6 { background: #94b4ef; } .av.c7 { background: #ef9a9a; }
.subj { width: 100%; order: 10; margin-top: 8px; font-size: 1.25rem; color: var(--text); letter-spacing: -.2px; }
.name { color: var(--text); font-weight: 600; } .when { color: var(--dim); }
.trip { font-family: monospace; color: var(--muted); }
.capcode { color: #04140a; background: var(--accent); padding: 0 6px; border-radius: 6px; font-weight: 700; font-size: .72rem; }
.pid { padding: 0 6px; border-radius: 6px; font: .7rem monospace; background: var(--soft); }
.menu { margin-left: auto; position: relative; }
.menu > summary { list-style: none; cursor: pointer; padding: 0 6px; font-size: 1.2rem; color: var(--muted); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > div { position: absolute; right: 0; z-index: 5; width: min(300px, 85vw); padding: 12px; display: grid; gap: 10px; background: var(--soft); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.menu form { display: flex; gap: 6px; flex-wrap: wrap; } .menu select { flex: 1; }
.file { display: block; margin: 10px 0 0 36px; }
.file img { display: block; max-width: 100%; max-height: 420px; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; }
.post.op .file { margin-left: 0; } .post.op .file img { width: 100%; max-height: 560px; object-fit: contain; background: var(--soft); }
.file.big img { max-height: none; }
.finfo { font-size: .72rem; color: var(--dim); margin-left: 36px; }
.body { margin: 6px 0 0 36px; }
.post.op .body, .post.op .pfoot, .post.op .banmsg, .post.op .finfo { margin-left: 0; }
.green { color: var(--green); }
.ql { color: var(--link); font-weight: 500; }
.spoiler { background: var(--text); color: var(--text); border-radius: 3px; } .spoiler:hover, .spoiler:active { color: var(--bg); }
.banmsg { color: var(--bad); font-weight: 700; margin: 6px 0 0 36px; }
.pfoot { display: flex; align-items: center; gap: 16px; margin: 8px 0 0 36px; font-size: .78rem; color: var(--dim); }
.rbtn { color: var(--muted); font-weight: 500; } .rbtn:hover { color: var(--text); }
.no { color: var(--dim); margin-left: auto; }

/* forms */
.pf { display: grid; gap: 10px; }
.pf .row { display: flex; gap: 8px; align-items: flex-end; }
.pf .row textarea { flex: 1; resize: vertical; }
.filebtn { display: grid; place-items: center; min-height: 120px; border: 1.5px dashed var(--line2); border-radius: 12px; cursor: pointer; color: var(--muted); }
.filebtn[data-name]::after { content: "✓ " attr(data-name); color: var(--accent); font-size: .85rem; overflow-wrap: anywhere; padding: 0 12px; }
.pic { display: grid; place-items: center; width: 42px; height: 42px; flex: none; font-size: 1.2rem; cursor: pointer; border-radius: 10px; border: 1px solid var(--line2); background: var(--soft); }
.pic[data-name] { border-color: var(--accent); background: var(--accent-soft); }
.pic input, .filebtn input { display: none; }
.extra { display: grid; gap: 8px; }
.more > summary { color: var(--muted); font-size: .85rem; cursor: pointer; }
.more input, .more label { margin-top: 8px; display: block; }
.cap { display: flex; gap: 8px; align-items: center; } .cap img { border-radius: 8px; cursor: pointer; width: 150px; height: auto; } .cap input { flex: 1; text-transform: uppercase; }
.pf.sticky { position: sticky; bottom: 0; z-index: 10; margin-top: 14px; padding: 12px; background: var(--card); border: 1px solid var(--line2); border-radius: var(--radius); box-shadow: 0 -10px 30px rgba(0,0,0,.4); }
.pf.sticky .row textarea { resize: none; }
.pf.sticky .extra { display: none; }
.pf.sticky:focus-within .extra, .pf.sticky:has(textarea:not(:placeholder-shown)) .extra, .pf.sticky:has(label[data-name]) .extra { display: grid; }
.pf.sticky:focus-within textarea { min-height: 80px; }
.legal .pf, .rep .pf { margin: 12px 0; }

/* misc pages */
.notice { margin: 0 0 16px; padding: 16px 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.notice.bad { border-color: rgba(239,83,80,.5); }
.notice p { margin: 0 0 10px; }
.gate { text-align: center; max-width: 380px; margin: 40px auto; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.gate .big { font-size: 3rem; } .gate p { color: var(--muted); } .gate button { width: 100%; padding: 12px; margin: 8px 0; }
.legal li { margin: 6px 0; } .legal h1 { margin-bottom: 12px; }
.legal dt { font-weight: 600; margin-top: 12px; } .legal dd { margin: 2px 0 0; color: var(--muted); }
.legal ul, .legal ol, .legal p, .legal dl { color: var(--muted); } .legal b { color: var(--text); }
blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--line2); color: var(--muted); overflow-wrap: anywhere; }
.tablewrap { overflow-x: auto; } table { border-collapse: collapse; width: 100%; font-size: .82rem; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; } th { color: var(--dim); font-weight: 500; }
.banbox { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; }

/* staff */
.modf { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line2); }
.ipinfo { font-size: .72rem; color: var(--dim); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar a { padding: 6px 12px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line2); color: var(--text); font-size: .85rem; }
.modnav span { color: var(--muted); font-size: .8rem; margin-left: auto; }
.rep { padding: 14px 16px; margin-bottom: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.rep.pri3 { border-left: 4px solid var(--bad); } .rep.pri2 { border-left: 4px solid #f0a040; }
.rep .post { border: 0; padding: 10px 0 0; }
.rmeta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); } .rmeta form { margin-left: auto; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; transition: .2s; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line2); color: var(--text); font-size: .9rem; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%); } #toast.bad { border-color: var(--bad); color: var(--bad); }

/* responsive */
@media (max-width: 1180px) { .right { display: none; } }
@media (max-width: 900px) {
  .side { transform: translateX(-100%); transition: transform .2s; }
  #nav:checked ~ .side { transform: none; }
  #nav:checked ~ .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.6); }
  .col { margin-left: 0; }
  .burger { display: block; }
  .top { padding: 0 12px; }
  .top .btn { padding: 8px 12px; }
  .cols { padding: 16px 12px; }
  .fcard { padding: 14px 14px 10px; }
  .post { padding: 12px 14px; } .post.op { padding: 14px; }
}

/* accounts */
.btn.ghost { background: none; border-color: transparent; }
.me { position: relative; } .me > summary { list-style: none; } .me > summary::-webkit-details-marker { display: none; }
.me > div { position: absolute; right: 0; top: 46px; padding: 8px; background: var(--soft); border: 1px solid var(--line2); border-radius: 10px; }
.loginbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line2); border-radius: var(--radius); }
.loginbar p { margin: 0; color: var(--muted); } .loginbar div { display: flex; gap: 8px; }
.authbox { max-width: 420px; margin: 24px auto; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.authbox h1 { margin-bottom: 8px; } .authbox .pf { margin: 16px 0; }
.muted { color: var(--muted); font-size: .9rem; }
.warn { padding: 10px 12px; border-radius: 10px; background: rgba(240,160,64,.1); color: #f0b060; font-size: .85rem; margin: 0; }
.uname { display: grid; gap: 4px; margin: 16px 0; padding: 16px; text-align: center; border: 1px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); }
.uname small { color: var(--muted); } .uname b { font-size: 1.4rem; letter-spacing: .3px; color: var(--accent); overflow-wrap: anywhere; } .uname a { font-size: .85rem; }
.opb { padding: 0 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: .7rem; font-weight: 700; }
@media (max-width: 600px) { .top .ghost { display: none; } .search input::placeholder { color: transparent; } .me > summary { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; } }
