/* viperr.net design: Unbounded + Montserrat, warm greys, marble, square corners, silver-marble type */
:root {
    --bg: #08080a;
    --bg2: #070708;
    --panel: rgba(16, 16, 18, .86);
    --panel-hi: #131315;
    --line: #1d1d1f;
    --line-hi: #2a2a2d;
    --line-hover: #8a8985;
    --text: #e9e7e2;
    --text-hi: #f2f1ee;
    --soft: #b6b4ae;
    --muted: #9c9a95;
    --dim: #6b6a66;
    --accent: #e4e2dc;
    --good: #8fc79a;
    --bad: #c0554b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { color: var(--text); font: 400 14px/1.55 Montserrat, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; }
a { color: var(--text); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #0a0a0b; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
svg.lucide { width: 16px; height: 16px; stroke-width: 1.6; flex-shrink: 0; display: block; }

@keyframes vp-blink { 0%, to { opacity: 1 } 50% { opacity: .25 } }
@keyframes vp-screen { 0% { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
@keyframes vp-row { 0% { opacity: 0; transform: translateY(-4px) } to { opacity: 1; transform: none } }
@keyframes vp-drop { 0% { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }
@keyframes vp-boom { 0% { transform: scale(.6); opacity: 0 } 60% { transform: scale(1.08); opacity: 1 } to { transform: scale(1); opacity: 1 } }

.silver-text { background: url(/assets/marble-silver.webp) center / cover, #bdbbb6; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.marble { position: absolute; inset: 0; z-index: 0; background: url(/assets/marble-dark.webp) center / cover; opacity: .9; pointer-events: none; }
.marble.fixed { position: fixed; opacity: .75; }
.logo { width: 16px; height: 16px; display: block; color: #d8d6d0; }
.brand, .side-brand { display: flex; align-items: center; gap: 12px; }
.brand-word { font: 700 14px Unbounded, sans-serif; letter-spacing: .08em; }

/* buttons */
.btn-silver { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px; white-space: nowrap;
    background: url(/assets/marble-silver.webp) center / cover, #d8d6d0; color: #0a0a0b; font: 600 11px Montserrat, sans-serif; letter-spacing: .16em; text-transform: uppercase; transition: filter .15s; }
.btn-silver:hover { filter: brightness(.88); color: #0a0a0b; }
.btn-silver:active { filter: brightness(.78); }
.btn-white { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 18px; background: var(--text-hi); color: #0a0a0b; font: 600 11px Montserrat, sans-serif; letter-spacing: .16em; text-transform: uppercase; transition: filter .15s; }
.btn-white:hover { filter: brightness(.88); color: #0a0a0b; }
.btn-white svg.lucide { width: 14px; height: 14px; }
.btn-silver.big { min-height: 52px; padding: 0 30px; font-size: 12px; }
.btn-silver svg.lucide { width: 15px; height: 15px; }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border: 1px solid var(--line-hi); color: var(--soft); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; transition: border-color .15s, color .15s; }
.btn-ghost:hover { border-color: var(--line-hover); color: var(--text-hi); }
.btn-ghost:disabled { opacity: .35; pointer-events: none; }
.btn-ghost.save { background: url(/assets/marble-silver.webp) center / cover, #d8d6d0; color: #0a0a0b; border-color: transparent; }
.btn-ghost.save:hover { filter: brightness(.88); color: #0a0a0b; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-hi); color: var(--muted); transition: border-color .15s, color .15s; }
.icon-btn:hover { border-color: var(--line-hover); color: var(--text-hi); }

/* ---------- guest ---------- */
.guest { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: var(--bg2); }
.g-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px clamp(18px, 4vw, 56px); border-bottom: 1px solid #1a1a1c; }
.g-right { display: flex; align-items: center; gap: 20px; }
.live { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.live i { width: 5px; height: 5px; background: var(--accent); display: block; animation: vp-blink 2.6s ease-in-out infinite; }
.g-hero { position: relative; z-index: 1; flex: 1; min-height: clamp(520px, 78vh, 780px); display: flex; align-items: center; justify-content: center; padding: clamp(40px, 6vw, 80px) clamp(18px, 4vw, 56px); border-bottom: 1px solid #1a1a1c; }
.g-hero-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(18px, 2.4vw, 28px); max-width: 900px; animation: vp-screen .5s ease both; }
.hero-mark { font: italic 800 clamp(26px, 3.6vw, 48px)/1.1 Unbounded, sans-serif; letter-spacing: .02em; }
.framed { position: relative; padding: clamp(18px, 2.6vw, 30px) clamp(22px, 4vw, 56px); }
.framed .c { position: absolute; width: 24px; height: 24px; border: 0 solid #9c9a95; }
.framed .tl { left: 0; top: 0; border-left-width: 3px; border-top-width: 3px; }
.framed .tr { right: 0; top: 0; border-right-width: 3px; border-top-width: 3px; }
.framed .bl { left: 0; bottom: 0; border-left-width: 3px; border-bottom-width: 3px; }
.framed .br { right: 0; bottom: 0; border-right-width: 3px; border-bottom-width: 3px; }
.framed h1 { font: 700 clamp(30px, 7vw, 100px)/1.05 Unbounded, sans-serif; letter-spacing: -.01em; text-transform: uppercase; }
.divider { display: flex; align-items: center; gap: 18px; width: min(620px, 100%); color: var(--soft); }
.divider > span { flex: 1; height: 2px; display: block; background: linear-gradient(90deg, transparent, #8a8985); }
.divider > span:last-child { background: linear-gradient(270deg, transparent, #8a8985); }
.divider .logo { width: 34px; height: 34px; color: var(--soft); }
.lead { color: var(--soft); max-width: 520px; font-size: 15px; }
.g-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.error { color: var(--bad); min-height: 1.5em; font-size: 13px; }
.g-foot { position: relative; z-index: 2; display: flex; justify-content: center; gap: 18px; padding: 18px; font-size: 10px; letter-spacing: .3em; color: var(--dim); }
.g-foot span { color: var(--muted); }

/* hero scene (hero.js) */
.hero-scene { position: absolute; inset: 0; overflow: hidden; background: #060607; pointer-events: none; z-index: 0; }
.hero-plate { position: absolute; left: -30px; top: -20px; width: calc(100% + 60px); height: calc(100% + 40px); object-fit: cover; opacity: .95; }
.hero-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 75% at 50% 50%, rgba(0,0,0,0) 0%, rgba(0,0,0,.35) 60%, rgba(0,0,0,.8) 100%); }
.hero-snake { position: absolute; left: 0; bottom: 0; width: 44%; height: 100%; overflow: hidden; }
.hero-pendant { position: absolute; right: max(-4%, calc(2% - 60px)); top: -12%; height: min(92%, 34vw); width: 22%; max-width: 22%; opacity: .92; transform-origin: 50% 0; filter: drop-shadow(18px 26px 22px rgba(0,0,0,.85)) brightness(1.15); }
.hero-pendant img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: top right; }
.hero-dust { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- app ---------- */
.app { position: relative; display: flex; align-items: stretch; min-height: 100vh; background: var(--bg2); }
.side { width: 236px; flex-shrink: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 24px 0; z-index: 2; background: rgba(7, 7, 8, .9); }
.side-brand { padding: 0 24px 24px; border-bottom: 1px solid var(--line); }
.side-nav { padding: 16px 0; display: flex; flex-direction: column; overflow-y: auto; flex: 1; }
.side-nav button { display: flex; align-items: center; gap: 12px; padding: 11px 24px; width: 100%; font-size: 13.5px; text-align: left; color: var(--text); border-left: 2px solid transparent; transition: background .15s, color .15s; }
.side-nav button:hover { background: #111113; color: #fff; }
.side-nav button.on { background: var(--panel-hi); color: #fff; border-left-color: var(--accent); }
.side-me { display: flex; align-items: center; gap: 10px; padding: 16px 24px 0; border-top: 1px solid var(--line); }
.side-me img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-hi); }
.side-me div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.side-me b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me small { color: var(--muted); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }

.main { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.banner { position: relative; height: 190px; border-bottom: 1px solid #1a1a1c; display: flex; align-items: flex-end; padding: 0 clamp(18px, 4vw, 48px) 26px; overflow: hidden; }
.banner-text { position: relative; z-index: 2; animation: vp-screen .3s ease both; }
.eyebrow { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.banner h2 { font: 700 clamp(24px, 3.4vw, 40px)/1.05 Unbounded, sans-serif; text-transform: uppercase; letter-spacing: -.01em; }
.content { padding: clamp(18px, 3vw, 36px) clamp(18px, 4vw, 48px) 60px; max-width: 1240px; width: 100%; }
.view { animation: vp-screen .22s ease both; display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.view.single { display: block; }

/* settings */
.sections { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 48px); overflow: auto; }
.search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-hi); background: rgba(8, 8, 10, .7); padding: 0 12px; margin-bottom: 12px; color: var(--muted); transition: border-color .15s; }
.search:focus-within { border-color: var(--line-hover); }
.search input { flex: 1; background: none; border: 0; outline: none; padding: 11px 0; font-size: 13px; color: var(--text); }
.sec { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left; color: var(--soft); font-size: 13px; border-left: 2px solid transparent; transition: background .15s, color .15s; }
.sec:hover { background: #111113; color: var(--text); }
.sec.on { background: var(--panel-hi); color: var(--text); border-left-color: var(--accent); }
.sec span { flex: 1; }
.sec em { font-style: normal; font-size: 11px; color: var(--dim); }
.fields-head { margin-bottom: 18px; }
.fields-head h3, .block-title { display: flex; align-items: center; gap: 10px; font: 600 15px Unbounded, sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.block-title { margin: 28px 0 12px; font-size: 12px; color: var(--soft); }
.fields-head p { color: var(--muted); margin-top: 4px; font-size: 13px; }
.note { border-left: 2px solid var(--line-hover); padding-left: 10px; color: var(--soft) !important; }
#fieldList { display: flex; flex-direction: column; gap: 6px; }
.field { background: var(--panel); border: 1px solid var(--line); padding: 14px 16px; display: grid; grid-template-columns: minmax(200px, 1fr) minmax(220px, 1.25fr) auto; gap: 14px; align-items: center; transition: border-color .15s; animation: vp-row .3s ease both; }
.field:hover { border-color: var(--line-hi); }
.field.saved { animation: vp-boom .45s ease both; }
.label b { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.label .hint { display: block; color: var(--muted); font-size: 12px; }
.label code { color: var(--dim); font: 11px ui-monospace, Menlo, monospace; }
.badge { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; border: 1px solid var(--line-hover); color: var(--soft); padding: 1px 6px; font-weight: 600; }
.ro { color: var(--soft); }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.err { grid-column: 1 / -1; color: var(--bad); font-size: 12px; animation: vp-drop .18s ease both; }
.field input[type=text], .field input[type=number], .field select { width: 100%; background: rgba(8, 8, 10, .75); border: 1px solid var(--line-hi); padding: 9px 11px; outline: none; transition: border-color .15s; }
.field input:focus, .field select:focus { border-color: var(--line-hover); }
.field select option { background: #111113; }
.toggle { position: relative; width: 46px; height: 24px; border: 1px solid var(--line-hi); background: rgba(8, 8, 10, .75); transition: border-color .15s, background .15s; }
.toggle::after { content: ''; position: absolute; top: 4px; left: 4px; width: 14px; height: 14px; background: var(--dim); transition: transform .18s cubic-bezier(.2, .7, .3, 1), background .18s; }
.toggle[aria-checked="true"] { border-color: var(--line-hover); background: rgba(228, 226, 220, .08); }
.toggle[aria-checked="true"]::after { transform: translateX(22px); background: url(/assets/marble-silver.webp) center / cover, var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; border: 1px solid var(--line-hi); font-size: 12px; background: rgba(8, 8, 10, .6); cursor: default; }
label.chip { cursor: pointer; }
.chip button { color: var(--dim); display: grid; }
.chip button:hover { color: var(--bad); }
.chip i.sw { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chips select { width: auto !important; padding: 5px 8px !important; font-size: 12px; }
.empty { color: var(--muted); padding: 28px 0; display: flex; align-items: center; gap: 10px; }

/* history */
.table { border: 1px solid var(--line); background: var(--panel); }
.row { display: grid; grid-template-columns: 130px 170px 1fr 1.3fr; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: center; animation: vp-row .3s ease both; font-size: 13px; }
.row:first-child { border-top: 0; color: var(--muted); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; animation: none; }
.row .who { display: flex; align-items: center; gap: 8px; }
.row .from { color: var(--dim); text-decoration: line-through; }
.row .arrow { color: var(--muted); margin: 0 6px; }
.row .when { color: var(--muted); font-variant-numeric: tabular-nums; }

/* health */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; }
.stat { background: var(--panel); border: 1px solid var(--line); padding: 16px 18px; animation: vp-row .3s ease both; }
.stat small { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.stat b { display: block; margin-top: 8px; font: 600 24px Unbounded, sans-serif; letter-spacing: -.01em; }
.bots { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.bot { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); padding: 12px 14px; animation: vp-row .3s ease both; transition: border-color .15s; }
.bot:hover { border-color: var(--line-hi); }
.bot img { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-hi); }
.bot div { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.bot b { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.bot small { color: var(--muted); font-size: 12px; }
.dot { width: 6px; height: 6px; display: inline-block; background: var(--bad); }
.dot.on { background: var(--accent); animation: vp-blink 2.4s ease-in-out infinite; }

/* journal */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin-bottom: 14px; }
.filters .search { margin: 0; min-width: 170px; }
.filters .search.grow { flex: 1; min-width: 220px; }
.filters select, .periods button { background: rgba(8, 8, 10, .75); border: 1px solid var(--line-hi); padding: 0 12px; min-height: 42px; color: var(--text); font-size: 13px; }
.filters select:focus { border-color: var(--line-hover); outline: none; }
.filters select option { background: #111113; }
.check { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line-hi); background: rgba(8, 8, 10, .75); font-size: 13px; color: var(--soft); cursor: pointer; }
.check { min-height: 36px; transition: border-color .15s, color .15s, background .15s; }
.check:hover { border-color: var(--line-hover); color: #fff; }
.check input[type=checkbox] { appearance: none; -webkit-appearance: none; margin: 0; width: 15px; height: 15px; border: 1px solid var(--line-hover); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.check input[type=checkbox]::after { content: ''; width: 7px; height: 4px; border: solid transparent; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.count { color: var(--muted); font-size: 12px; margin-bottom: 8px; letter-spacing: .04em; }
.journal { border: 1px solid var(--line); background: var(--panel); }
.jrow { border-top: 1px solid var(--line); animation: vp-row .25s ease both; }
.jrow:first-child { border-top: 0; }
.jhead { display: grid; grid-template-columns: 112px 170px 1fr 150px 22px; gap: 12px; align-items: center; width: 100%; padding: 10px 14px; text-align: left; font-size: 13px; transition: background .15s; }
.jhead:hover { background: #111113; }
.jhead .when { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.jhead .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jhead .what { display: flex; align-items: center; gap: 8px; min-width: 0; }
.jhead .what b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jhead .where { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jhead .chev { color: var(--dim); transition: transform .18s; }
.jrow.open .chev { transform: rotate(180deg); }
.kind { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; padding: 2px 6px; border: 1px solid var(--line-hi); color: var(--soft); white-space: nowrap; font-weight: 600; }
.kind svg.lucide { width: 11px; height: 11px; }
.jrow.bad .jhead { box-shadow: inset 2px 0 0 var(--bad); }
.jrow.bad .kind { border-color: var(--bad); color: #e08a80; }
.jbody { padding: 4px 14px 14px 138px; font-size: 12.5px; animation: vp-drop .18s ease both; }
.jbody dl { display: grid; grid-template-columns: 150px 1fr; gap: 5px 14px; }
.jbody dt { color: var(--muted); }
.jbody dd { word-break: break-word; }
.jbody .errtext { color: #e08a80; }
.more { margin: 12px auto 0; display: flex; }

/* stats */
.periods { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.periods button { min-height: 36px; color: var(--soft); transition: border-color .15s, color .15s; }
.periods button:hover { color: #fff; }
.periods button.on { border-color: var(--line-hover); color: #fff; background: var(--panel-hi); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.card { background: var(--panel); border: 1px solid var(--line); padding: 4px 18px 18px; margin-top: 8px; animation: vp-row .3s ease both; }
.card .block-title { margin: 14px 0 12px; }
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar .track { position: relative; height: 26px; background: rgba(255, 255, 255, .025); border: 1px solid #18181a; overflow: hidden; }
.bar .fill { position: absolute; top: 0; bottom: 0; left: 0; background: linear-gradient(90deg, rgba(228, 226, 220, .22), rgba(228, 226, 220, .08)); border-right: 1px solid rgba(228, 226, 220, .5); transform-origin: left; animation: grow .6s cubic-bezier(.2, .7, .3, 1) both; }
.bar .lbl { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .n { text-align: right; font: 600 12px Unbounded, sans-serif; color: var(--soft); font-variant-numeric: tabular-nums; }
.bar.bad .fill { background: linear-gradient(90deg, rgba(192, 85, 75, .35), rgba(192, 85, 75, .1)); border-right-color: var(--bad); }
@keyframes grow { from { transform: scaleX(0) } to { transform: scaleX(1) } }
.cols { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 6px; }
.col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.col i { width: 100%; background: linear-gradient(180deg, rgba(228, 226, 220, .55), rgba(228, 226, 220, .1)); transform-origin: bottom; animation: rise .6s cubic-bezier(.2, .7, .3, 1) both; min-height: 2px; }
.col span { font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums; }
.col:hover i { background: linear-gradient(180deg, #e4e2dc, rgba(228, 226, 220, .25)); }
.cols.days .col span { writing-mode: vertical-rl; transform: rotate(180deg); }
@keyframes rise { from { transform: scaleY(0) } to { transform: scaleY(1) } }

/* overview */
.ov-hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.ov-hello h3 { font: 600 18px Unbounded, sans-serif; letter-spacing: .01em; }
.ov-hello p { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 8px; }
.ov-hello p::before { content: ''; width: 5px; height: 5px; background: var(--accent); animation: vp-blink 2.6s ease-in-out infinite; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px; }
.kpi { position: relative; background: var(--panel); border: 1px solid var(--line); padding: 16px 18px 14px; animation: vp-row .3s ease both; overflow: hidden; transition: border-color .15s; }
.kpi:hover { border-color: var(--line-hi); }
.kpi small { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.kpi b { display: block; margin-top: 10px; font: 600 28px Unbounded, sans-serif; letter-spacing: -.01em; }
.kpi .kpi-note { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; min-height: 1.2em; }
.kpi.warn { border-color: #3a3833; }
.kpi.warn::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.kpi.alert { border-color: rgba(192, 85, 75, .45); }
.kpi.alert::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--bad); animation: vp-blink 1.6s ease-in-out infinite; }
.kpi.alert .kpi-note { color: #e08a80; }
.ov-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; margin-top: 8px; }
.ov-grid .card { margin-top: 0; }
.feed { list-style: none; display: flex; flex-direction: column; }
.feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; animation: vp-row .25s ease both; }
.feed li:first-child { border-top: 0; }
.feed li b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed li > span:last-child { color: var(--muted); font-size: 12px; white-space: nowrap; }
.feed li.muted { display: block; color: var(--muted); }
.feed li.bad .kind { border-color: var(--bad); color: #e08a80; }
.feed.duty li { grid-template-columns: auto minmax(0, 1fr) auto; }
.tag { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; padding: 2px 6px; border: 1px solid var(--line-hi); color: var(--soft); white-space: nowrap; font-weight: 600; }
.ov-week { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: end; }
.ov-week b { display: block; font: 600 34px Unbounded, sans-serif; }
.ov-week span { color: var(--muted); font-size: 12px; }
.ov-week .cols { height: 110px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.quick a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line-hi); background: var(--panel); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--soft); transition: border-color .15s, color .15s; }
.quick a:hover { border-color: var(--line-hover); color: #fff; }
@media (max-width: 900px) { .ov-grid, .ov-week { grid-template-columns: 1fr; } }

/* custom controls */
.picker { position: relative; width: 100%; }
.picker-face { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 6px 36px 6px 11px; text-align: left; background: rgba(8, 8, 10, .75); border: 1px solid var(--line-hi); transition: border-color .15s; position: relative; }
.picker-face:hover, .picker.open .picker-face { border-color: var(--line-hover); }
.picker-face .val { font-weight: 500; }
.picker-face .ph { color: var(--dim); }
.picker-face small { color: var(--muted); font-size: 11px; }
.picker-face .caret { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); transition: transform .18s; display: grid; }
.picker.open .caret { transform: translateY(-50%) rotate(180deg); }
.picker-face svg.lucide { color: var(--muted); width: 15px; height: 15px; }
.picker-pop { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: #0e0e10; border: 1px solid var(--line-hover); box-shadow: 0 18px 40px rgba(0, 0, 0, .65); display: none; animation: vp-drop .18s cubic-bezier(.2, .7, .3, 1) both; }
.picker.open .picker-pop { display: block; }
.picker-search { display: flex; align-items: center; gap: 8px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--muted); }
.picker-search input { flex: 1; background: none; border: 0; outline: none; padding: 10px 0; color: var(--text); font-size: 13px; }
.picker-list { max-height: 280px; overflow: auto; padding: 4px 0; }
.picker-group { padding: 10px 12px 4px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.picker-opt { width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 12px; font-size: 13px; text-align: left; color: var(--soft); transition: background .12s, color .12s; }
.picker-opt:hover { background: #17171a; color: #fff; }
.picker-opt.on { color: #fff; background: #131315; }
.picker-opt span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-opt .tick { flex: 0; color: var(--accent); display: grid; }
.picker-opt svg.lucide { width: 15px; height: 15px; color: var(--muted); }
.picker-empty { padding: 14px 12px; color: var(--dim); font-size: 13px; }
.picker .sw { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line-hi); background: rgba(8, 8, 10, .75); width: max-content; transition: border-color .15s; }
.stepper:focus-within { border-color: var(--line-hover); }
.stepper button { width: 38px; display: grid; place-items: center; color: var(--muted); transition: background .12s, color .12s; }
.stepper button:hover { background: #17171a; color: #fff; }
.stepper input { width: 84px; text-align: center; background: none !important; border: 0 !important; border-left: 1px solid var(--line) !important; border-right: 1px solid var(--line) !important; padding: 9px 4px !important; font: 600 15px Unbounded, sans-serif; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tchip { display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px; border: 1px solid var(--line-hi); background: rgba(8, 8, 10, .6); font-size: 13px; color: var(--soft); transition: border-color .15s, color .15s, background .15s; }
.tchip:hover { border-color: var(--line-hover); color: #fff; }
.tchip .box { width: 15px; height: 15px; border: 1px solid var(--line-hover); display: grid; place-items: center; color: transparent; transition: background .15s, color .15s; }
.tchip .box svg.lucide { width: 11px; height: 11px; stroke-width: 2.6; }
.tchip.on { border-color: var(--line-hover); color: #fff; background: rgba(228, 226, 220, .06); }
.tchip.on .box { background: url(/assets/marble-silver.webp) center / cover, var(--accent); color: #0a0a0b; border-color: transparent; }
.label .path { display: none; }
.label b[title] { cursor: help; }


/* antinuke */
.guard-bar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 10px 0; margin-bottom: 4px; background: linear-gradient(180deg, rgba(7,7,8,.95), rgba(7,7,8,.75)); backdrop-filter: blur(6px); }
.guard-bar .note { margin-right: auto; }
.btn-ghost.save.pulse { animation: vp-blink 1.8s ease-in-out infinite; }
.glist { display: flex; flex-direction: column; gap: 6px; }
.glist .field { animation: none; }
.idlist { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.idadd { display: flex; gap: 6px; }
.idadd input { width: 190px; background: rgba(8,8,10,.75); border: 1px solid var(--line-hi); padding: 7px 10px; outline: none; }
.idadd input:focus { border-color: var(--line-hover); }
.hint-line { color: var(--muted); font-size: 12px; margin: -6px 0 12px; }
.weights { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; }
.wrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 12px; border: 1px solid var(--line); background: rgba(8,8,10,.5); font-size: 13px; }
.wrow .stepper input { width: 64px; font-size: 13px; }


/* polish: aligned id input, field icons, viperr corners + sheen, numbered blocks */
.idadd { display: inline-flex; align-items: stretch; height: 38px; border: 1px solid var(--line-hi); background: rgba(8,8,10,.75); transition: border-color .15s; }
.idadd:focus-within { border-color: var(--line-hover); }
.idadd .idadd-ic { width: 36px; display: grid; place-items: center; color: var(--muted); border-right: 1px solid var(--line); }
.idadd input { width: 190px; height: 100%; border: 0 !important; background: none !important; padding: 0 12px !important; outline: none; font-size: 13px; }
.idadd button { width: 38px; display: grid; place-items: center; color: var(--soft); border-left: 1px solid var(--line); transition: background .12s, color .12s; }
.idadd button:hover { background: url(/assets/marble-silver.webp) center / cover, var(--accent); color: #0a0a0b; }
.idlist .chip { height: 38px; padding: 0 12px; }
.label.with-icon { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: center; }
.label.with-icon .ficon { grid-row: span 3; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-hi); background: rgba(228,226,220,.03); color: var(--soft); transition: border-color .15s, color .15s; }
.field:hover .ficon { border-color: var(--line-hover); color: #fff; }
.card { --c: rgba(156,154,149,.55); }
.card::before, .card::after { content: ''; position: absolute; width: 12px; height: 12px; pointer-events: none; transition: width .25s, height .25s, border-color .25s; }
.card::before { left: -1px; top: -1px; border-left: 2px solid var(--c); border-top: 2px solid var(--c); }
.card::after { right: -1px; bottom: -1px; border-right: 2px solid var(--c); border-bottom: 2px solid var(--c); }
.card:hover { --c: #e4e2dc; }
.card:hover::before, .card:hover::after { width: 22px; height: 22px; }
.stat, .bot { position: relative; }
.field, .kpi, .stat, .bot { overflow: hidden; }
.field::after, .kpi::before, .stat::after, .bot::after { content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, rgba(228,226,220,.07), transparent); transform: skewX(-18deg); pointer-events: none; opacity: 0; }
.field:hover::after, .kpi:hover::before, .stat:hover::after, .bot:hover::after { animation: sheen .9s ease forwards; }
@keyframes sheen { 0% { left: -40%; opacity: 1 } 100% { left: 120%; opacity: 0 } }
#guardBody { counter-reset: blk; }
#guardBody .card > .block-title::before { counter-increment: blk; content: counter(blk, decimal-leading-zero); font: 600 11px Unbounded, sans-serif; color: var(--dim); margin-right: 4px; letter-spacing: .06em; }
.field:has(.picker.open) { overflow: visible; }
.field:has(.picker.open)::after { display: none; }

/* misc */
.loading { display: flex; justify-content: center; gap: 6px; padding: 48px 0; }
.loading i { width: 6px; height: 6px; background: var(--accent); animation: vp-blink 1.2s ease-in-out infinite; }
.loading i:nth-child(2) { animation-delay: .2s; }
.loading i:nth-child(3) { animation-delay: .4s; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; display: flex; align-items: center; gap: 10px; background: #111113; border: 1px solid var(--line-hi); padding: 11px 16px; font-size: 13px; transition: opacity .2s, transform .2s cubic-bezier(.2, .7, .3, 1); pointer-events: none; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: var(--bad); }

@media (max-width: 900px) {
    .app { flex-direction: column; }
    .side { position: sticky; width: 100%; height: auto; flex-direction: row; align-items: center; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); gap: 10px; }
    .side-brand { padding: 0; border: 0; }
    .side-brand .brand-word { display: none; }
    .side-nav { flex-direction: row; padding: 0; overflow-x: auto; }
    .side-nav button { padding: 8px 12px; border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
    .side-nav button.on { border-bottom-color: var(--accent); }
    .side-me { border: 0; padding: 0; }
    .side-me div { display: none; }
    .banner { height: 140px; }
    .view { grid-template-columns: 1fr; }
    .sections { position: static; max-height: none; }
    .field { grid-template-columns: 1fr; }
    .actions { justify-content: flex-start; }
    .row { grid-template-columns: 1fr; gap: 4px; }
    .jhead { grid-template-columns: 1fr auto; }
    .jhead .who, .jhead .where { display: none; }
    .jbody { padding-left: 14px; }
    .jbody dl { grid-template-columns: 1fr; }
    .grid2 { grid-template-columns: 1fr; }
    .row:first-child { display: none; }
    .g-right .live { display: none; }
    .hero-pendant { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.field { position: relative; }
.field:has(.picker.open) { z-index: 20; animation: none; }

/* an open dropdown lifts its card and row above the next ones (cards animate, which makes each its own layer) */
.card { position: relative; }
.card:has(.picker.open) { z-index: 30; animation: none; }
.glist .field:has(.picker.open) { z-index: 31; }

/* every remaining native checkbox gets the site's box (journal «Только ошибки» etc.) */
input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0; flex-shrink: 0; border: 1px solid var(--line-hover); background: rgba(8,8,10,.75); display: inline-grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s; }
input[type=checkbox]::after { content: ''; width: 8px; height: 4px; border-left: 2px solid #0a0a0b; border-bottom: 2px solid #0a0a0b; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; transition: opacity .12s; }
input[type=checkbox]:checked { background: url(/assets/marble-silver.webp) center / cover, var(--accent); border-color: transparent; }
input[type=checkbox]:checked::after { opacity: 1; }
.check:has(input:checked) { border-color: var(--line-hover); color: #fff; background: rgba(228, 226, 220, .06); }
.check:has(input:checked) input[type=checkbox] { background: url(/assets/marble-silver.webp) center / cover, var(--accent); border-color: transparent; }
.check:has(input:checked) input[type=checkbox]::after { border-color: #0a0a0b; }

/* staff: branches, administration, moderation */
.tbl .row:first-child { color: inherit; font-size: 13px; letter-spacing: 0; text-transform: none; animation: vp-row .3s ease both; }
.tbl .row { grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; }
.tbl .row.staff { grid-template-columns: minmax(150px, 1.2fr) auto 110px 110px minmax(0, 2fr); }
.tbl .row.undone { opacity: .5; }
.row .who img, .feed .who img { width: 24px; height: 24px; border-radius: 50%; }
.who { display: inline-flex; align-items: center; gap: 8px; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag.soft { color: var(--muted); border-style: dashed; }
.acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.btn-ghost.sm { min-height: 26px; padding: 0 8px; font-size: 9px; gap: 5px; }
.btn-ghost.sm svg.lucide { width: 13px; height: 13px; }
.btn-ghost.bad:hover { border-color: var(--bad); color: var(--bad); }
.muted { color: var(--muted); }
.warn { color: #c9a86a; }
.msearch .search { max-width: 360px; }
.picks { margin-top: 6px; }
.pick { display: flex; width: 100%; padding: 6px 4px; text-align: left; }
.pick:hover { background: var(--panel-hi); }
dialog.ask { margin: auto; width: min(460px, calc(100vw - 32px)); background: var(--bg2); color: var(--text); border: 1px solid var(--line-hi); padding: 22px; }
dialog.ask::backdrop { background: rgba(0, 0, 0, .7); }
dialog.ask form { display: grid; gap: 12px; }
dialog.ask h3 { font: 600 15px Unbounded, sans-serif; }
dialog.ask p { color: var(--muted); }
.ask-reason { display: grid; gap: 6px; font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.ask-reason textarea { font: inherit; text-transform: none; letter-spacing: 0; color: var(--text); background: var(--panel-hi); border: 1px solid var(--line-hi); padding: 8px; resize: vertical; }
.ask-actions { display: flex; gap: 8px; justify-content: flex-end; }
#askExtra input[type=number] { width: 80px; background: none; border: 0; }
@media (max-width: 900px) {
    .tbl .row, .tbl .row.staff { grid-template-columns: 1fr; gap: 6px; }
    .acts { justify-content: flex-start; }
}

/* radio: sidebar player and the «Боты» panel */
.radio { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; margin: 0 12px 10px; padding: 10px 12px; border: 1px solid var(--line); background: linear-gradient(90deg, rgba(214, 211, 204, .08), transparent 70%); border-left: 2px solid var(--line-hover); }
.radio-meta { min-width: 0; }
.radio-meta small { display: block; font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.radio-meta b { display: block; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio input[type=range], .radio-vol input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.radio-now { display: grid; gap: 2px; }
.radio-now small { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.radio-now b { font: 600 16px Unbounded, sans-serif; }
.radio-vol { display: flex; align-items: center; gap: 10px; max-width: 420px; }
.acts.left { justify-content: flex-start; }
.radio-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.radio-add .search { flex: 1 1 260px; }
#radioPanel > .glist + .glist { margin-top: 18px; }

/* inline rows: search fields line up with their buttons */
.radio-add, .msearch { align-items: stretch; }
.radio-add .search, .msearch .search { margin: 0; min-height: 38px; }
.radio-add .search input, .msearch .search input { padding: 0; height: 36px; }
.radio-add .btn-ghost.sm { min-height: 38px; padding: 0 14px; font-size: 10px; }
.tbl > .note { border-left: 0; padding: 14px 16px; color: var(--muted) !important; }

/* range sliders: thin line, silver marble thumb */
input[type=range] { -webkit-appearance: none; appearance: none; height: 18px; background: none; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--accent) var(--fill, 50%), var(--line-hi) var(--fill, 50%)); }
input[type=range]::-moz-range-track { height: 2px; background: var(--line-hi); }
input[type=range]::-moz-range-progress { height: 2px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -5px; border: 0; background: url(/assets/marble-silver.webp) center / cover, var(--accent); transition: transform .15s; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 0; background: url(/assets/marble-silver.webp) center / cover, var(--accent); }
input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.25); }
.radio-vol span { min-width: 44px; color: var(--soft); font-variant-numeric: tabular-nums; }

/* moderation tables: fixed columns with a header row */
.tbl .row.thead, .tbl .row.thead:first-child { color: var(--dim); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; animation: none; padding-top: 10px; padding-bottom: 10px; }
.tbl .row.prow, #modRecent .row.thead { grid-template-columns: 96px 130px minmax(0, 1fr) minmax(0, 1.4fr) 120px; }
.tbl .row.mrow, #modStats .row.thead { grid-template-columns: minmax(0, 1fr) 80px minmax(0, 2fr) 120px; }
.row .two { display: grid; gap: 2px; min-width: 0; }
.row .two small { color: var(--muted); font-size: 11px; }
.row .two b, .row .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .num { font-variant-numeric: tabular-nums; }
.row .when { color: var(--muted); font-variant-numeric: tabular-nums; }
.row .tag { display: inline-block; }
@media (max-width: 900px) {
    .tbl .row.prow, .tbl .row.mrow { grid-template-columns: 1fr; }
    .tbl .row.thead { display: none; }
}

/* administration: one line per person, positions removable from their own tag */
.tbl .row.arow { grid-template-columns: minmax(160px, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr) 130px; }
.tag.pos { display: inline-flex; align-items: center; gap: 4px; padding-right: 2px; }
.tag.pos .x { display: grid; place-items: center; width: 16px; height: 16px; color: var(--dim); transition: color .15s, background .15s; }
.tag.pos .x svg.lucide { width: 11px; height: 11px; }
.tag.pos .x:hover { color: var(--bad); background: rgba(192, 85, 75, .12); }
.card > .note + .table { margin-top: 10px; }
@media (max-width: 900px) { .tbl .row.arow { grid-template-columns: 1fr; } }

/* folding */
.card > .block-title { cursor: pointer; user-select: none; }
.card > .block-title::after { content: ''; margin-left: auto; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .2s; }
.card.collapsed > .block-title::after { transform: rotate(-45deg); }
.card.collapsed > :not(.block-title) { display: none !important; }
.card.collapsed > .block-title { margin-bottom: 0; }
.fold-more { margin: 8px auto 0; display: flex; }

/* radio library: checkboxes and bulk actions */
.lib-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.lib-bar .btn-ghost.sm { min-height: 36px; padding: 0 12px; }
.tbl .row.lrow { grid-template-columns: 28px 120px minmax(0, 1fr) auto; }
.check.bare { padding: 0; border: 0; background: none; min-height: 0; }

/* branch applications */
.tbl .row.aprow { grid-template-columns: 96px minmax(0, 1.2fr) 130px 70px auto; }
.app-answers { grid-column: 1 / -1; display: grid; gap: 10px; padding: 10px 0 4px; border-top: 1px dashed var(--line-hi); }
.app-answers small { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.app-answers p { white-space: pre-wrap; color: var(--text); }
@media (max-width: 900px) { .tbl .row.aprow { grid-template-columns: 1fr; } }
