[hidden] { display: none !important; }
:root {
  --ink: #14181F; --blue: #2E4CBC; --red: #D42514; --red2: #FA2D1A; --soft: #F4F6FC; --line: #D5DAE8;
  --muted: #4A5160; --field: #767E90; --side2: #1F2533;
  --ok-bg: #E3F3E9; --ok: #1D6B3E; --warn-bg: #FFF1D6; --warn: #7A4E00; --bad-bg: #FBE3E0; --bad: #A51D10;
  --info-bg: #E3E8F7; --info: #1F2C6B; --none-bg: #EEF0F5; --none: #3A4150;
  --font: Archivo, "Helvetica Neue", Arial, sans-serif; --display: Anton, Impact, "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--soft); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; }
a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.boot { padding: 40px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 232px; max-width: 100%; background: var(--ink); color: #fff; padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; }
.brand { display: flex; align-items: baseline; gap: 8px; padding: 0 12px; }
.brand .logo { font-family: Yellowtail, "Brush Script MT", cursive; font-size: 30px; line-height: 1; }
.brand .tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #B8C1DA; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: #fff; font-weight: 500; font-size: 14px; }
.nav a:hover { background: var(--side2); color: #fff; }
.nav a[aria-current="page"] { background: #fff; color: var(--ink); font-weight: 700; }
.nav .label { flex: 1; }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red2); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.nav a[aria-current="page"] .badge { background: var(--red); }
.sess { margin-top: auto; padding: 14px 12px; border-radius: 12px; background: var(--side2); font-size: 13px; color: #E3E8F7; display: flex; flex-direction: column; gap: 6px; }
.sess strong { color: #fff; display: flex; gap: 8px; align-items: center; }
.sess button { align-self: flex-start; background: none; border: 0; padding: 0; color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }

main { flex: 999 1 560px; min-width: 0; padding: 32px clamp(16px, 3vw, 40px) 40px; display: flex; flex-direction: column; gap: 24px; }
.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
h1.title { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 44px; line-height: .95; color: var(--blue); }
.sub { margin: 8px 0 0; color: var(--muted); max-width: 760px; }
h2.cap { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-narrow { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.col-wide { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { padding: 32px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 16px; }

.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--none-bg); color: var(--none); }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); } .chip.info { background: var(--info-bg); color: var(--info); }

.btn { min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn.sec { background: #fff; color: var(--ink); }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn.dangerline { background: #fff; color: var(--red); border-color: var(--red); }
.btn.blue { background: var(--blue); border-color: var(--blue); }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; min-height: 32px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink); }
.linkbtn:hover { color: var(--blue); }
.linkbtn.danger { color: var(--bad); }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--field); border-radius: 10px; background: #fff; font-size: 14px; }
.field textarea { padding: 12px; line-height: 1.45; resize: vertical; min-height: 88px; }
.field .help { font-size: 12px; color: var(--muted); }
.field.err input, .field.err textarea { border-color: var(--red); }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.radio:has(input:checked) { border-color: var(--ink); background: var(--soft); }
.radio input, .check input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.radio b { display: block; font-size: 14px; }
.radio span span { display: block; font-size: 13px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }

.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who .n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .u { font-size: 13px; color: var(--muted); }
.av { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--info-bg); color: var(--info); display: grid; place-items: center; font-weight: 700; font-size: 13px; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.big { width: 72px; height: 72px; font-size: 26px; }

.qitem { display: flex; gap: 12px; padding: 14px; border-radius: 12px; border: 1.5px solid transparent; background: transparent; text-align: left; width: 100%; cursor: pointer; color: var(--ink); }
.qitem:hover { background: #fff; }
.qitem[aria-current="true"] { background: #fff; border-color: var(--ink); }
.thumb { flex: 0 0 52px; height: 52px; border-radius: 8px; background: #C9D1E8; display: grid; place-items: center; color: var(--info); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; filter: blur(8px); }
.qmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cnt { font-size: 13px; font-weight: 700; color: var(--red); }

.media { position: relative; border-radius: 12px; overflow: hidden; background: #C9D1E8; min-height: 160px; display: grid; place-items: center; color: var(--info); }
.media img { width: 100%; max-height: 360px; object-fit: contain; display: block; background: #0B1026; }
.media.blur img { filter: blur(24px); }
.quote { padding: 12px; border-radius: 12px; background: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }

.tablebox { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 12px 14px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.sel td { background: var(--soft); }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--soft); }
.nowrap { white-space: nowrap; }

.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.post { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.post .media { min-height: 130px; height: 130px; }
.post .media img { height: 130px; max-height: none; object-fit: cover; }
.post .acts { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login .box { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 20px; }
.login .brand { padding: 0; }
.login .brand .logo { font-size: 44px; }
.login .brand .tag { color: var(--muted); font-size: 12px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--bad-bg); color: var(--bad); font-size: 14px; }
.alert.info { background: var(--info-bg); color: var(--info); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.qr { background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 12px; width: 200px; height: 200px; }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.divider { height: 1px; background: var(--line); }

.backdrop { position: fixed; inset: 0; background: rgba(20, 24, 31, .55); display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto; z-index: 20; }
.dialog { width: 100%; max-width: 560px; background: #fff; border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 60px rgba(11, 16, 38, .35); }
.dialog h2 { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 34px; line-height: .95; color: var(--blue); }
.dialog .head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.x { flex: 0 0 44px; height: 44px; border-radius: 50%; border: 1px solid var(--field); background: var(--soft); cursor: pointer; display: grid; place-items: center; }
.dialog .foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.note { padding: 12px 14px; border-radius: 12px; background: var(--soft); font-size: 14px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; }
#toast div { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
#toast div.bad { background: var(--bad); }
@media (max-width: 600px) { h1.title { font-size: 36px; } }
