:root {
  --bg: #08080a;
  --surface: #101013;
  --surface-2: #16161a;
  --surface-3: #1c1c22;
  --line: #26262e;
  --line-soft: #1f1f26;
  --text: #f2f2f5;
  --muted: #8b8b98;
  --muted-2: #62626f;
  --accent: #ff7a18;
  --accent-2: #ff9d4d;
  --accent-dim: rgba(255, 122, 24, 0.12);
  --accent-line: rgba(255, 122, 24, 0.32);
  --ok: #43c47c;
  --bad: #f05252;
  --radius: 14px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "SF Pro Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); }

::selection { background: rgba(255, 122, 24, 0.3); color: #fff; }

.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.backdrop-glow {
  position: absolute; top: -340px; left: 40%; width: 900px; height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(circle at center, rgba(255, 122, 24, 0.18), transparent 62%);
  filter: blur(20px);
}
.backdrop-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
}

.shell {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky; top: 0; z-index: 40; min-width: 0;
  height: 100vh;
  display: flex; flex-direction: column; gap: 18px;
  padding: 20px 16px;
  background: rgba(9, 9, 12, 0.82);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--line-soft);
}

.brand { display: flex; align-items: center; gap: 11px; color: var(--text); flex-shrink: 0; padding: 4px 6px; }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; color: var(--accent); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; letter-spacing: -0.02em; font-size: 16px; }
.brand-sub { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-2); }

.staff-tag { display: none; }
.tabbar { display: none; }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; overflow-y: auto; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.nav-btn {
  appearance: none; border: 1px solid transparent; background: transparent;
  color: var(--muted); font: inherit; font-size: 14px; font-weight: 500;
  padding: 9px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 11px; text-align: left; width: 100%;
  transition: color .16s, background .16s, border-color .16s;
}
.nav-icon { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.nav-btn:hover { color: var(--text); background: var(--surface-2); }
.nav-btn:hover .nav-icon { opacity: 1; }
.nav-btn.is-active {
  color: #ffe3cd; background: var(--accent-dim);
  border-color: var(--accent-line);
}
.nav-btn.is-active .nav-icon { color: var(--accent); opacity: 1; }
.nav-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sidebar-foot { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }

.account-card {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 11px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text); font: inherit; text-align: left;
  transition: border-color .16s, background .16s;
}
.account-card:hover { border-color: #33333d; background: var(--surface-2); }
.account-card.is-active { border-color: var(--accent-line); background: var(--accent-dim); }
.account-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-meta { display: flex; flex-direction: column; min-width: 0; }
.account-nick { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-role { font-size: 10.5px; letter-spacing: .08em; }

.account-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-admin {
  justify-content: center; font-size: 12.5px; padding: 9px 10px; width: 100%;
  border-color: var(--accent-line); background: var(--accent-dim); color: #ffcfa9;
}
.btn-admin:hover { background: rgba(255, 122, 24, .2); border-color: var(--accent); color: #fff; }
.btn-out {
  justify-content: center; width: 100%; font-size: 12.5px; padding: 9px 10px;
  color: #c8c8d2;
}
.btn-out:hover { color: #ffb3b3; border-color: rgba(240, 82, 82, .45); background: rgba(240, 82, 82, .08); }
.account-card-guest .account-role { color: var(--accent-2); }

.content { display: flex; flex-direction: column; min-width: 0; }

.app {
  flex: 1;
  width: 100%; max-width: 1100px; margin: 0 auto;
  padding: clamp(22px, 3vw, 40px) clamp(16px, 3vw, 36px) 60px;
  animation: rise .28s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .app { animation: none; } }

.footer {
  max-width: 1100px; width: 100%; margin: 0 auto; padding: 22px 36px 34px;
  display: flex; align-items: center; gap: 10px;
  color: var(--muted-2); font-size: 12.5px;
  border-top: 1px solid var(--line-soft);
}
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }

.page-head { margin-bottom: 26px; }
.eyebrow {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); display: inline-block; }
h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.14; letter-spacing: -0.03em; margin: 0 0 10px; font-weight: 700; }
h2 { font-size: 19px; letter-spacing: -0.02em; margin: 0 0 4px; font-weight: 650; }
h3 { font-size: 15px; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.lead { color: var(--muted); max-width: 66ch; margin: 0; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; font-size: 12.5px; color: var(--muted-2); }
.meta-line .dot { background: var(--muted-2); }

.card {
  background: linear-gradient(180deg, var(--surface), #0d0d10);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: clamp(18px, 2.2vw, 26px); }

.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head p { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 62ch; }

.btn {
  appearance: none; font: inherit; font-size: 13.5px; font-weight: 600;
  padding: 9px 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  transition: transform .12s, background .16s, border-color .16s, color .16s;
  display: inline-flex; align-items: center; gap: 8px; line-height: 1.2;
}
.btn:hover { background: var(--surface-3); border-color: #33333d; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-color: #ff8b33; color: #1b0d02;
  box-shadow: 0 10px 30px -14px rgba(255, 122, 24, 0.9);
}
.btn-primary:hover { background: linear-gradient(180deg, #ffab68, #ff8529); border-color: #ffa15c; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.btn-ok { border-color: rgba(67, 196, 124, .4); color: #7ce0a7; background: rgba(67, 196, 124, .1); }
.btn-ok:hover { background: rgba(67, 196, 124, .18); border-color: rgba(67, 196, 124, .6); }
.btn-bad { border-color: rgba(240, 82, 82, .38); color: #ff9a9a; background: rgba(240, 82, 82, .09); }
.btn-bad:hover { background: rgba(240, 82, 82, .16); border-color: rgba(240, 82, 82, .6); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
}
.badge.role { color: #ffcaa1; border-color: var(--accent-line); background: var(--accent-dim); }
.badge.pending { color: #ffcf7a; border-color: rgba(255, 190, 80, .35); background: rgba(255, 190, 80, .1); }
.badge.accepted { color: #82dfae; border-color: rgba(67, 196, 124, .35); background: rgba(67, 196, 124, .1); }
.badge.rejected { color: #ff9d9d; border-color: rgba(240, 82, 82, .3); background: rgba(240, 82, 82, .08); }

.r7 { color: #ffd0a3 !important; border-color: rgba(255, 122, 24, .55) !important; }
.r6 { color: #ffc08a !important; }
.r5 { color: #ffb37a !important; }
.r4 { color: #ffa866 !important; }
.r3 { color: #ffa058 !important; }
.r2 { color: #ff9250 !important; }
.r1 { color: #e08a52 !important; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  overflow: hidden;
  color: var(--accent);
  background: #14141a;
  border: 1px solid var(--line);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar svg { width: 62%; height: 62%; display: block; }
.avatar.lg { width: 74px; height: 74px; border-radius: 22px; }
.avatar.lg svg { width: 58%; height: 58%; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label { font-size: 12.5px; font-weight: 600; color: #cfcfd8; letter-spacing: .01em; }
.field .hint { font-size: 11.5px; color: var(--muted-2); }
.input, .textarea, .select {
  width: 100%; font: inherit; font-size: 14px; color: var(--text);
  background: #0b0b0e; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 13px;
  transition: border-color .16s, box-shadow .16s;
}
.input::placeholder, .textarea::placeholder { color: #55555f; }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, .16);
}
.textarea { min-height: 96px; resize: none; line-height: 1.55; }
textarea { resize: none; }
.textarea.short { min-height: 74px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.select option { background: #101013; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.split { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.grid.cols-2 > .field, .grid.cols-3 > .field { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: "JetBrains Mono", "SFMono-Regular", ui-monospace, Consolas, monospace; }

.staff-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.staff-table th {
  text-align: left; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 600; padding: 0 10px 8px 0;
}
.staff-table td { padding: 7px 10px 7px 0; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.staff-table td:last-child { width: 190px; }
.staff-table td:has(.pass-cell) { width: 168px; }

.warnings-table td:last-child { width: 220px; }
.warnings-table td:nth-child(3) { width: 120px; }
.warn-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
}
.warn-badge.w1 { color: #ffd08a; border-color: rgba(255, 190, 80, .4); background: rgba(255, 190, 80, .1); }
.warn-badge.w2 { color: #ffb37a; border-color: rgba(255, 130, 60, .45); background: rgba(255, 130, 60, .12); }
.warn-badge.w3 { color: #ff9d9d; border-color: rgba(240, 82, 82, .5); background: rgba(240, 82, 82, .14); }

.pass-cell { display: inline-flex; align-items: center; gap: 6px; }
.pass-val {
  font-size: 12.5px; letter-spacing: .06em; color: #cfcfda;
  min-width: 88px; display: inline-block;
}
.pass-cell.is-shown .pass-val { color: #ffd0ad; }
.icon-mini {
  appearance: none; border: 1px solid var(--line); background: var(--surface-2);
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  color: var(--muted); cursor: pointer; padding: 0; transition: .16s;
}
.icon-mini svg { width: 14px; height: 14px; }
.icon-mini:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); }
.icon-mini:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-mini[aria-pressed="true"] { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); }
.staff-table .select { padding: 6px 30px 6px 10px; font-size: 13px; }

.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-pill span {
  display: inline-flex; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--muted); font-size: 13px; cursor: pointer; transition: .16s;
}
.radio-pill input:checked + span { border-color: var(--accent-line); background: var(--accent-dim); color: #ffd3b2; }
.radio-pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 15px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: 13px; color: var(--muted);
}
.notice.accent { border-color: var(--accent-line); background: var(--accent-dim); color: #ffd0ad; }
.notice.error { border-color: rgba(240,82,82,.4); background: rgba(240,82,82,.1); color: #ffb3b3; }
.notice.ok { border-color: rgba(67,196,124,.38); background: rgba(67,196,124,.09); color: #9be8bd; }

.segmented {
  display: inline-flex; gap: 3px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px;
  flex-wrap: wrap;
}
.segmented button {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 550; padding: 6px 13px;
  border-radius: 8px; cursor: pointer; transition: .16s;
}
.segmented button:hover { color: var(--text); }
.segmented button.is-active { background: #26262e; color: var(--text); }

.empty {
  text-align: center; padding: 46px 20px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius); background: rgba(255,255,255,.012);
}
.empty strong { display: block; color: var(--text); margin-bottom: 4px; font-size: 15px; }

.rules-layout { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 26px; align-items: start; }
.toc { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 3px; }
.toc-title { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px; }
.toc a {
  display: flex; gap: 9px; padding: 7px 10px; border-radius: 8px;
  color: var(--muted); font-size: 13px; border-left: 2px solid transparent;
}
.toc a:hover { color: var(--text); background: var(--surface-2); }
.toc a .toc-num { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }

.rules-search { position: relative; margin-bottom: 18px; }
.rules-search .input { padding-left: 38px; background: var(--surface); }
.rules-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-2); }

.rule-section { margin-bottom: 26px; scroll-margin-top: 24px; }
.rule-section > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rule-section > h2 .scope {
  font-size: 11px; font-weight: 700; color: #1b0d02; background: var(--accent);
  border-radius: 7px; padding: 3px 8px; letter-spacing: .02em;
}
.rule-item {
  border: 1px solid var(--line-soft); border-radius: 12px;
  background: rgba(255, 255, 255, 0.014);
  padding: 15px 17px; margin-bottom: 9px;
  transition: border-color .16s, background .16s;
}
.rule-item:hover { border-color: var(--line); background: rgba(255, 255, 255, 0.026); }
.rule-item-head { display: flex; gap: 10px; align-items: baseline; }
.rule-num { color: var(--accent); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 42px; }
.rule-item p { margin: 0 0 6px; font-size: 13.8px; color: #c9c9d3; }
.rule-item p:last-child { margin-bottom: 0; }
.rule-item ul { margin: 4px 0 8px; padding-left: 18px; columns: 2; column-gap: 26px; }
.rule-item ul li { font-size: 13.4px; color: #b9b9c5; margin-bottom: 2px; break-inside: avoid; }
.punish {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 8px;
  font-size: 12.5px; font-weight: 600; color: #ffc49a;
  background: rgba(255, 122, 24, .09); border: 1px solid var(--accent-line);
  border-radius: 8px; padding: 4px 10px;
}
.punish b { color: var(--accent); font-weight: 700; letter-spacing: .04em; font-size: 10.5px; text-transform: uppercase; }
.rule-note { margin-top: 8px; font-size: 12.8px; color: #9c9caa; border-left: 2px solid var(--line); padding-left: 10px; }

.staff-rule-text { font-weight: 500; font-size: 14px; letter-spacing: 0; color: #d3d3dd; line-height: 1.5; }
.rule-item.is-danger { border-color: rgba(240, 82, 82, .22); background: rgba(240, 82, 82, .035); }
.rule-item.is-danger .rule-num { color: #ff8f6b; }
.rule-item.is-danger:hover { border-color: rgba(240, 82, 82, .45); background: rgba(240, 82, 82, .07); }

.rule-item.is-action { cursor: pointer; }
.rule-item.is-action:hover { border-color: var(--accent-line); background: rgba(255, 122, 24, .05); }
.rule-item.is-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rule-cmd {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding: 7px 11px;
  border: 1px solid var(--line); border-radius: 9px;
  background: rgba(255, 255, 255, .02);
  font-size: 12.5px; color: #ffd0ad;
}
.rule-item.is-action:hover .rule-cmd { border-color: var(--accent-line); background: rgba(255, 122, 24, .08); }
.rule-cmd-hint { font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); margin-left: auto; }
.rule-item.is-action:hover .rule-cmd-hint { color: var(--accent); }

.manual-section { margin-bottom: 30px; scroll-margin-top: 24px; }
.manual-heading { margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.manual-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.manual-card {
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .016); padding: 16px 18px;
}
.manual-title { margin: 0 0 8px; color: #ffd9bb; letter-spacing: -0.01em; }
.manual-sub { margin: 0 0 10px; font-size: 12.5px; }
.manual-list { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.manual-list li { font-size: 13.3px; color: #c4c4d0; }
.manual-list.is-warn li::marker { color: #f0a35e; }
.check-steps { margin: 0 0 16px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.check-steps li { font-size: 13.5px; color: #c9c9d5; }
.check-step { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--line); }
.check-step-title { display: block; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: #cfcfda;
}
.code-block { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; margin: 12px 0; background: #0b0b0e; }
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; border-bottom: 1px solid var(--line-soft);
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2);
  background: var(--surface-2);
}
.code-block pre {
  margin: 0; padding: 12px 14px; max-height: 230px; overflow: auto;
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: 12px; line-height: 1.6; color: #b9d7c7; white-space: pre-wrap; word-break: break-word;
}
.code-block pre::-webkit-scrollbar { width: 8px; height: 8px; }
.code-block pre::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.weights-table { width: 100%; border-collapse: collapse; font-size: 13.5px; max-width: 420px; }
.weights-table th {
  text-align: left; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2); padding: 0 10px 8px 0; font-weight: 600;
}
.weights-table td { padding: 8px 10px 8px 0; border-top: 1px solid var(--line-soft); color: #d6d6e0; }
.weights-table td:last-child { color: var(--accent-2); font-variant-numeric: tabular-nums; }

.app-list { display: flex; flex-direction: column; gap: 12px; }
.app-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), #0c0c0f);
  overflow: hidden;
}
.app-card.status-accepted { border-left: 2px solid rgba(67,196,124,.6); }
.app-card.status-rejected { border-left: 2px solid rgba(240,82,82,.5); }
.app-card.status-pending { border-left: 2px solid var(--accent); }
.app-card-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.app-nick { font-weight: 650; font-size: 15.5px; letter-spacing: -0.01em; }
.qgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); }
.qa { background: #0d0d11; padding: 13px 18px; }
.qa dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 3px; }
.qa dd { margin: 0; font-size: 13.5px; color: #dbdbe3; white-space: pre-wrap; word-break: break-word; }
.qa.wide { grid-column: span 2; }
.app-actions { display: flex; gap: 9px; padding: 13px 18px; border-top: 1px solid var(--line-soft); align-items: center; flex-wrap: wrap; }

.dropzone {
  border: 1.5px dashed #2e2e38; border-radius: var(--radius);
  padding: 26px 18px; text-align: center; cursor: pointer;
  background: rgba(255, 255, 255, .014);
  transition: border-color .16s, background .16s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-dim); }
.dropzone-icon { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--accent); }
.dropzone strong { display: block; font-size: 14px; margin-bottom: 3px; }
.dropzone span { font-size: 12.5px; color: var(--muted); }
.dropzone kbd {
  font: inherit; font-size: 11.5px; border: 1px solid #383843; border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; background: #1b1b22; color: #d3d3dd;
}

.files-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-top: 12px; }
.file-card { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0a0a0d; aspect-ratio: 4 / 3; }
.file-card img, .file-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-card .file-tag {
  position: absolute; left: 6px; bottom: 6px; font-size: 10px; padding: 2px 7px;
  border-radius: 5px; background: rgba(0,0,0,.72); color: #e6e6ee; letter-spacing: .04em;
}
.file-card .file-del {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.72); color: #fff; cursor: pointer; font-size: 13px; line-height: 1;
  display: grid; place-items: center;
}
.file-card .file-del:hover { background: var(--bad); }

.report-list { display: flex; flex-direction: column; gap: 12px; }
.report {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 15px 17px;
}
.report-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.report-author { font-weight: 650; font-size: 14px; }
.report-text { font-size: 13.8px; color: #d2d2dc; white-space: pre-wrap; margin: 0 0 10px; }
.report-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
.report-media a { display: block; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; background: #000; }
.report-media img, .report-media video { width: 100%; height: 100%; object-fit: cover; display: block; }

.profile-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-id { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-nick { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.profile-avatar-box { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-avatar-actions { display: flex; flex-direction: column; gap: 6px; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; background: var(--line-soft); border-radius: 12px; overflow: hidden; margin-top: 16px; }
.stat { background: #0d0d11; padding: 13px 15px; }
.stat dt { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }
.stat dd { margin: 3px 0 0; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }

.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.member {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), #0c0c0f);
  padding: 16px 18px 6px;
}
.member-head { display: flex; align-items: center; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--line-soft); }
.member-id { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.member-nick { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-info { margin: 0; padding: 4px 0 10px; display: flex; flex-direction: column; }
.member-info > div {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.05);
}
.member-info > div:last-child { border-bottom: 0; }
.member-info dt { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); }
.member-info dd { margin: 0; font-size: 13.5px; color: #dcdce4; text-align: right; word-break: break-word; }

.card .top-row:first-child { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.card .top-row:last-child { border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.top-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px; border-bottom: 1px solid var(--line-soft);
  background: #0d0d11;
}
.top-row:last-child { border-bottom: 0; }
.top-row.is-top { background: linear-gradient(90deg, rgba(255,122,24,.09), rgba(255,122,24,0) 55%); }
.top-rank {
  width: 26px; flex-shrink: 0; text-align: center;
  font-size: 13px; font-weight: 700; color: var(--muted-2); font-variant-numeric: tabular-nums;
}
.top-row.gold .top-rank { color: #ffcf7a; }
.top-row.silver .top-rank { color: #d9dde6; }
.top-row.bronze .top-rank { color: #e0a075; }
.top-name { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.top-count { font-size: 14px; font-weight: 650; color: var(--text); white-space: nowrap; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(4,4,6,.76);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px;
  animation: fade .16s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(480px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 40px 90px -30px #000; padding: 24px;
  animation: pop .18s ease both;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal h2 { margin-bottom: 6px; }
.modal p { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }
.cred-box {
  border: 1px solid var(--accent-line); background: var(--accent-dim);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 16px;
}
.cred-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; }
.cred-row + .cred-row { border-top: 1px solid rgba(255,255,255,.06); }
.cred-key { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #d79a67; }
.cred-val { font-size: 15px; font-weight: 650; color: #fff; word-break: break-all; text-align: right; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: #1a1a20; border: 1px solid var(--line); color: var(--text);
  padding: 11px 18px; border-radius: 11px; font-size: 13.5px;
  box-shadow: 0 20px 50px -20px #000; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 200; max-width: 90vw;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(240,82,82,.5); color: #ffb3b3; }
.toast.ok { border-color: rgba(255,122,24,.5); }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { height: 110px; border-radius: var(--radius); background: linear-gradient(90deg, #101013, #17171c, #101013); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.login-wrap { max-width: 430px; margin: 4vh auto 0; }
.login-head { text-align: center; margin-bottom: 20px; }
.login-head .brand-mark { width: 40px; height: 40px; margin-bottom: 12px; }

@media (max-width: 1080px) {
  .shell { grid-template-columns: 1fr; align-content: start; }
  .sidebar {
    position: sticky; top: 0; height: auto;
    flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: 10px 14px; padding: 10px 14px;
    border-right: 0; border-bottom: 1px solid var(--line-soft);
  }
  .brand { padding: 0; }
  .nav { flex: 1 0 100%; order: 3; flex-direction: row; overflow-x: auto; gap: 4px; min-width: 0; width: 100%; }
  .nav-btn { width: auto; flex: 0 0 auto; padding: 7px 12px; }
  .sidebar-foot { margin-left: auto; flex-direction: row; align-items: center; gap: 8px; padding-top: 0; border-top: 0; }
  .sidebar-foot .account-card { padding: 5px 10px 5px 5px; height: 40px; }
  .sidebar-foot .account-role { display: none; }
  .account-actions { margin: 0; flex-direction: row; }
  .sidebar-foot .btn-admin, .sidebar-foot .btn-out { width: auto; padding: 6px 10px; font-size: 12px; }
  .rules-layout { grid-template-columns: 1fr; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .toc a { border-left: 0; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
  .toc a .toc-num { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .shell { padding-bottom: 72px; }
  .sidebar {
    position: sticky; top: 0; z-index: 45;
    flex-wrap: nowrap; justify-content: space-between; gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line-soft);
  }
  .sidebar .nav, .sidebar-foot { display: none; }
  .staff-tag {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 999px;
    font-size: 10px; font-weight: 700; letter-spacing: .18em;
    color: var(--accent-2); border: 1px solid var(--accent-line);
    background: var(--accent-dim); margin-left: auto;
  }
  .brand { padding: 0; }
  .brand-name { font-size: 15px; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px));
    background: rgba(9, 9, 12, 0.94);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line-soft);
  }
  .tab-btn {
    appearance: none; border: 0; background: transparent; font: inherit;
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px 4px; border-radius: 9px; cursor: pointer;
    color: var(--muted-2); transition: color .16s, background .16s;
  }
  .tab-btn svg { width: 19px; height: 19px; }
  .tab-btn span {
    font-size: 9.5px; line-height: 1.1; letter-spacing: .01em;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .tab-btn.is-active { color: var(--accent-2); background: rgba(255, 122, 24, .1); }
  .tab-btn.is-active svg { color: var(--accent); }
  .tab-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

  .toast { bottom: 84px; }
  .footer { padding-bottom: 22px; }

  .grid.cols-2, .grid.cols-3, .grid.split { grid-template-columns: 1fr; }
  .qgrid { grid-template-columns: 1fr; }
  .qa.wide { grid-column: span 1; }
  .rule-item ul { columns: 1; }
  .stat-row { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .footer { padding: 20px 16px 28px; }
}
