:root {
  --void: #070708;
  --panel: #0b0b0d;
  --panel-raised: #101014;
  --field: #0d0d10;
  --line: #242429;
  --line-soft: #1a1a1f;
  --ink: #f0f1f3;
  --muted: #9a9ca5;
  --quiet: #676a73;
  --lift: rgba(255, 255, 255, .045);
  --active: rgba(255, 255, 255, .07);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--void); }
body {
  min-height: 100%;
  margin: 0;
  background: linear-gradient(180deg, #0b0b0e 0, #070708 230px);
  color: var(--ink);
  font: 14px/1.45 "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select {
  font: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 4px;
}
button { cursor: pointer; }
button:hover { border-color: #4a4b54; }
button:focus-visible, input:focus, textarea:focus, select:focus { outline: 1px solid #656773; outline-offset: 1px; }
.wrap { width: min(1040px, calc(100% - 32px)); margin: 0 auto; }
header {
  height: 52px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 10, 12, .94);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.bar { height: 100%; display: flex; align-items: stretch; gap: 24px; }
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 118px;
  font: 700 18px/1 "Segoe UI Variable Display", "Segoe UI", sans-serif;
  letter-spacing: 0;
}
.brand img { width: 25px; height: 25px; margin-right: 9px; border-radius: 5px; }
nav { display: flex; align-items: stretch; gap: 4px; }
nav a, .account a, .link {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}
nav a { padding: 0 10px; border-bottom: 2px solid transparent; }
nav a:hover { color: var(--ink); background: var(--lift); }
nav a.on { color: var(--ink); border-bottom-color: #d7d8dc; }
.account { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.account a { height: 28px; padding: 0 8px; border-radius: 4px; font-size: 13px; }
.account a:hover, .link:hover { background: var(--lift); color: var(--ink); }
.account img, .av, .av-sm { object-fit: cover; background: #15151a; border: 1px solid var(--line); }
.account img { width: 24px; height: 24px; border-radius: 4px; }
.account .name { color: var(--ink); font-weight: 600; }
main { padding: 34px 0 72px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.title { font: 700 24px/1.1 "Segoe UI Variable Display", "Segoe UI", sans-serif; letter-spacing: 0; }
.sub, .meta, .dim { color: var(--quiet); font-size: 12px; }
.panel { overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.section-label { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--quiet); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.forum-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.forum-toolbar .sub { margin: 0; }
.row, .thread, .member, .item, .post { display: flex; align-items: center; }
.thread { min-height: 64px; padding: 9px 14px; gap: 11px; border-bottom: 1px solid var(--line-soft); }
.thread:last-child, .member:last-child, .item:last-child, .post:last-child { border-bottom: 0; }
.thread:hover, .member:hover { background: var(--lift); }
.thread-main { min-width: 0; flex: 1; }
.thread-title { overflow: hidden; color: var(--ink); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.thread-byline { display: flex; gap: 5px; margin-top: 4px; color: var(--quiet); font-size: 12px; }
.thread-stats { min-width: 62px; text-align: right; color: var(--muted); font-size: 12px; }
.thread-stats span { display: block; color: var(--quiet); font-size: 11px; }
.av-sm { width: 34px; height: 34px; border-radius: 4px; flex: none; }
.grow { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 30px; min-height: 30px; padding: 0 12px; color: var(--ink); font-size: 13px; line-height: 1; }
.btn.primary { background: #e6e7ea; border-color: #e6e7ea; color: #111115; font-weight: 650; }
.btn.primary:hover { background: #fff; border-color: #fff; }
.btn.compact { margin: 0; }
.err { min-height: 18px; margin-top: 8px; color: #c1c3ca; font-size: 12px; }
.empty { padding: 20px 14px; color: var(--quiet); font-size: 13px; }
.empty strong { display: block; margin-bottom: 3px; color: var(--muted); font-weight: 600; }
.auth { width: min(420px, 100%); padding: 22px; }
.auth .page-head { display: block; margin-bottom: 20px; }
.auth .sub { margin-top: 6px; }
.auth .row { height: 36px; margin-bottom: 7px; gap: 12px; }
.auth .row span { width: 84px; color: var(--muted); }
.auth input { height: 28px; flex: 1; padding: 0 8px; }
.auth .btn { width: 100%; margin-top: 8px; }
.link { margin-top: 10px; font-size: 12px; }
.composer { display: flex; flex-direction: column; gap: 8px; }
.composer textarea { min-height: 82px; padding: 9px; resize: vertical; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.new-thread { padding: 14px; margin-bottom: 12px; }
.new-thread input[type=text] { width: 100%; height: 32px; padding: 0 9px; }
.profile { overflow: hidden; }
.banner { height: 236px; position: relative; background: linear-gradient(120deg, #18181d, #101014 58%, #17171c) center/cover no-repeat; border-bottom: 1px solid var(--line); }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 28%, rgba(0,0,0,.78)); }
.identity { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 18px; display: flex; align-items: end; gap: 14px; }
.identity .av { width: 86px; height: 86px; border-radius: 5px; flex: none; box-shadow: 0 0 0 1px #303039; }
.identity .who { min-width: 0; flex: 1; }
.identity h1 { margin: 0; font: 700 24px/1.1 "Segoe UI Variable Display", "Segoe UI", sans-serif; text-shadow: 0 1px 3px #000; }
.callsign {
  margin: 7px 0 0;
  max-width: 46ch;
  color: #d2d4db;
  font: 400 13.5px/1.4 "Segoe UI Variable Text", "Segoe UI", sans-serif;
  letter-spacing: .01em;
  text-shadow: 0 1px 10px #000;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.badge { display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border: 1px solid rgba(255,255,255,.18); border-radius: 3px; background: rgba(7,7,8,.45); color: var(--muted); font-size: 11px; font-weight: 600; }
.role-owner { color: #fff; }
.role-moderator { color: #d4d5dc; }
.role-catsync { color: #d7d8dc; }
.role-user { color: var(--quiet); }
.comments { padding: 18px 20px 20px; }
.comments h2 { margin: 0 0 14px; color: var(--quiet); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.post { align-items: flex-start; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.post .body { min-width: 0; flex: 1; }
.post .who { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.post .who a { font-weight: 650; }
.post p { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; color: #d8d9dd; }
.reply-box { margin: 2px 0 8px; padding: 12px; background: var(--field); border: 1px solid var(--line); border-radius: 4px; }
.form-grid { padding: 14px; }
.form-grid .row { min-height: 36px; gap: 12px; }
.form-grid .row span { width: 110px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; height: 23px; padding: 0 8px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); cursor: pointer; font-size: 12px; }
.list .item { min-height: 44px; padding: 7px 12px; gap: 10px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.list .item input { width: 140px; height: 25px; padding: 0 7px; }
.list .item button, .list .item select { height: 25px; padding: 0 8px; }
.member { min-height: 58px; padding: 10px 14px; gap: 11px; border-bottom: 1px solid var(--line-soft); }
.member .who { display: flex; flex-direction: column; }
.member .uid { color: var(--quiet); font-size: 11px; }
.posts { padding: 2px 18px 18px; }
.thread-page-head { padding: 19px 18px 15px; border-bottom: 1px solid var(--line); }
.thread-page-head h1 { margin: 0; font: 700 21px/1.2 "Segoe UI Variable Display", "Segoe UI", sans-serif; }
.thread-page-head .sub { margin-top: 7px; }
.thread-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.thread-top .sub { margin: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; cursor: pointer; }
.check input[type=checkbox] { width: 14px; height: 14px; margin: 0; accent-color: #d8d9dd; }
@media (max-width: 680px) {
  .wrap { width: min(100% - 20px, 1040px); }
  .bar { gap: 8px; }
  .brand { min-width: auto; }
  .account a { font-size: 12px; }
  main { padding-top: 20px; }
  .thread { padding: 9px 10px; }
  .thread-stats { display: none; }
  .identity { left: 12px; right: 12px; }
  .identity .av { width: 64px; height: 64px; }
  .comments { padding: 14px; }
  .auth { padding: 18px; }
}
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
.home-stack { display: grid; gap: 14px; }
.board { overflow: hidden; }
.board-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.board-header h2 { margin: 0; font: 700 15px/1 "Segoe UI Variable Display", "Segoe UI", sans-serif; }
.board-header p { margin: 4px 0 0; color: var(--quiet); font-size: 12px; }
.board-empty { padding: 14px; color: var(--quiet); font-size: 12px; }
.shoutbox { display: flex; flex-direction: column; height: 520px; overflow: hidden; }
.shout-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px; }
.shout { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.shout:last-child { border-bottom: 0; }
.shout .av-sm { width: 25px; height: 25px; }
.shout-line { min-width: 0; color: #d5d6da; font-size: 12px; line-height: 1.45; word-break: break-word; }
.shout-line a { color: var(--ink); font-weight: 650; }
.shout-line time { margin-left: 5px; color: var(--quiet); font-size: 11px; }
.shout-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 10px 12px; border-top: 1px solid var(--line); flex: none; }
.shout-form input { min-width: 0; height: 29px; padding: 0 8px; }
.shout-form .err { grid-column: 1 / -1; margin: 0; }
.live-dot { display: inline-flex; align-items: center; color: var(--muted); font-size: 11px; font-weight: 650; }
.live-dot::before { content: ""; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #d8d9dd; box-shadow: 0 0 0 0 rgba(216, 217, 221, .55); animation: live-pulse 1.6s ease-out infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.profile-comment-box { margin: 0 0 14px; padding: 10px; background: var(--field); border: 1px solid var(--line); border-radius: 4px; }
.profile-comment-box textarea { min-height: 62px; }
.char-count { color: var(--quiet); font-size: 11px; }
@media (max-width: 800px) { .home-grid { grid-template-columns: 1fr; } .shoutbox { height: 360px; } }
.inline-form { display: inline; margin: 0; }
.link-btn { height: 28px; padding: 0 8px; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.link-btn:hover { background: var(--lift); color: var(--ink); }
.notice { margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 13px; }
.comment-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.comment-heading h2 { margin: 0; }
.markdown { margin-top: 7px; color: #d8d9dd; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown h1, .markdown h2, .markdown h3 { margin: 16px 0 8px; color: var(--ink); font: 650 16px/1.25 "Segoe UI Variable Display", "Segoe UI", sans-serif; }
.markdown h1 { font-size: 20px; }
.markdown h2 { font-size: 18px; }
.markdown p { margin: 8px 0; }
.markdown code { padding: 1px 4px; background: var(--field); border: 1px solid var(--line-soft); border-radius: 3px; color: var(--ink); font: 12px/1.3 Consolas, monospace; }
.markdown a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.form-grid form { border-bottom: 1px solid var(--line-soft); }
.form-grid form:last-child { border-bottom: 0; }
.form-grid input[type=file] { flex: 1; min-width: 0; padding: 3px; font-size: 12px; }
.list .item form { display: flex; align-items: center; gap: 6px; margin: 0; }
@media (max-width: 680px) { .form-grid .row { align-items: flex-start; flex-wrap: wrap; padding: 8px 0; } .form-grid .row span { width: 100%; } }
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; }
.auth-shell header { position: static; }
.auth-shell .account { display: none; }
.auth-shell main { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.auth-shell .auth { width: min(420px, 100%); }
.board-link { color: inherit; cursor: pointer; }
.board-link:hover { background: var(--lift); }
.settings-panel { overflow: hidden; }
.settings-preview { position: relative; border-bottom: 1px solid var(--line); }
.preview-banner { height: 118px; background: linear-gradient(120deg, #18181d, #101014 58%, #17171c); overflow: hidden; }
.preview-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-identity { display: flex; align-items: end; gap: 12px; padding: 0 14px 16px; margin-top: -28px; position: relative; z-index: 1; }
.preview-avatar { width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 5px; background: var(--field); overflow: hidden; box-shadow: 0 0 0 3px var(--panel); flex: none; }
.preview-avatar img, .preview-avatar span { display: block; width: 100%; height: 100%; object-fit: cover; }
.settings-preview strong { display: block; font-size: 16px; }
.preview-who { min-width: 0; flex: 1; }
.callsign-edit { margin-top: 6px; }
.callsign-edit textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0 0 8px;
  resize: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: #c8cad0;
  font: 13.5px/1.4 "Segoe UI Variable Text", "Segoe UI", sans-serif;
}
.callsign-edit textarea:focus { outline: none; border-bottom-color: #656773; }
.callsign-edit textarea::placeholder { color: var(--quiet); }
.callsign-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.callsign-foot .char-count { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.settings-section { padding: 16px 14px; border-bottom: 1px solid var(--line-soft); }
.settings-section:last-child { border-bottom: 0; }
.settings-section h2 { margin: 0 0 6px; color: var(--ink); font: 650 13px/1 "Segoe UI Variable Display", "Segoe UI", sans-serif; }
.settings-copy { margin: 0 0 10px; color: var(--quiet); font-size: 12px; }
.settings-section .row { gap: 8px; }
.settings-section input[type=file] { flex: 1; min-width: 0; height: 29px; padding: 3px; font-size: 12px; }
.settings-status { color: var(--muted); font-size: 13px; }
.redeem-form { display: flex; gap: 8px; }
.redeem-form input { min-width: 0; flex: 1; height: 30px; padding: 0 8px; }
.client { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; padding: 20px; }
.client-mark {
  width: 64px;
  height: 64px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
}
.client-mark img { width: 100%; height: 100%; border-radius: 4px; object-fit: cover; display: block; }
.client-copy { min-width: 0; }
.client-copy h1 { margin: 0; font: 700 18px/1.2 "Segoe UI Variable Display", "Segoe UI", sans-serif; }
.client-copy p { max-width: 420px; margin: 6px 0 0; color: var(--muted); }
.client-life { margin-top: 6px; color: var(--muted); font-size: 13px; }
.client-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.client-copy .redeem-form { max-width: 360px; margin-top: 12px; }
.client-copy .err { margin-top: 8px; }
.hwid-wait {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--quiet);
  font-size: 13px;
}
.sheet {
  width: min(440px, calc(100% - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c0c10;
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .6);
}
.sheet::backdrop { background: rgba(4, 4, 6, .72); }
.sheet-form { padding: 22px 22px 18px; }
.sheet-form h2 { margin: 0; font: 700 18px/1.15 "Segoe UI Variable Display", "Segoe UI", sans-serif; }
.sheet-form header p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.inkbox {
  display: block;
  margin: 18px 0 16px;
  padding: 12px 12px 10px;
  background: linear-gradient(180deg, #121217, #0e0e12);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.inkbox textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  padding: 0;
  resize: vertical;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font: 14px/1.5 "Segoe UI Variable Text", "Segoe UI", sans-serif;
}
.inkbox textarea:focus { outline: none; }
.inkbox:focus-within { border-color: #656773; }
.inkbox textarea::placeholder { color: var(--quiet); }
.sheet-foot { display: flex; align-items: center; gap: 8px; }
.sheet-foot .char-count { margin-right: auto; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.reply-locked {
  margin: 8px 0 4px;
  padding: 12px 14px;
  color: var(--quiet);
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: 4px;
}
.user-row .who .dim { white-space: normal; word-break: break-word; }
.list .item input[name=days] { width: 56px; }
.user-row { flex-wrap: wrap; align-items: center; min-height: 52px; gap: 8px 10px; }
.user-row .who { display: flex; flex-direction: column; gap: 2px; min-width: 132px; }
.user-row .who strong { font-weight: 650; }
@media (max-width: 680px) { .client { grid-template-columns: 1fr; } .redeem-form { flex-wrap: wrap; } .redeem-form .btn { width: 100%; } }