:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --panel: rgba(255, 255, 255, .03);
  --panel-2: rgba(255, 255, 255, .06);
  --hover: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --gold: #c9a24d;
  --gold-light: #e6cd8f;
  --gold-soft: rgba(201, 162, 77, .14);
  --green: #34c759;
  --red: #ff453a;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --blue: #0a84ff;
  --violet: #bf5af2;
  --title: "Clash Display", "Clash Grotesk", system-ui, sans-serif;
  --body: "Clash Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r1: 8px;
  --r2: 12px;
  --r3: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
::selection { background: var(--gold); color: #000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 10px; border: 2px solid var(--bg); }
.hidden { display: none !important; }
svg.i { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.shell { display: grid; grid-template-columns: 248px 1fr; height: 100vh; }
.side { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); min-height: 0; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--title); font-weight: 600; font-size: 15px; }
.brand img { width: 24px; height: 24px; }
.brand b { color: var(--gold); font-weight: 600; }
.org-line { margin: -6px 18px 10px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-line b { color: var(--text-2); font-weight: 600; }
.visit-bar { display: flex; align-items: center; gap: 10px; padding: 8px 24px; background: var(--gold-soft); border-bottom: 1px solid rgba(201, 162, 77, .35); color: var(--gold-light); font-size: 13px; }
.visit-bar .btn { margin-left: auto; }
.status-bar { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; padding: 14px 18px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--panel); }
.status-bar div { display: grid; gap: 2px; }
.status-bar span { font-size: 12px; color: var(--text-3); }
.status-bar b { font-weight: 600; }
.picker { position: relative; margin: 0 12px 10px; }
.picker-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--panel); text-align: left; }
.picker-btn:hover { background: var(--hover); }
.avatar { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #1a1406; font-family: var(--title); font-weight: 700; flex-shrink: 0; position: relative; }
.avatar .dot { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--bg); background: var(--text-3); }
.avatar .dot.on { background: var(--green); }
.picker-txt { flex: 1; min-width: 0; }
.picker-txt b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-txt span { font-size: 12px; color: var(--text-3); }
.picker-menu { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; right: 0; padding: 6px; border: 1px solid var(--line-2); border-radius: var(--r2); background: #141414; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); max-height: 320px; overflow: auto; }
.picker-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r1); text-align: left; }
.picker-menu button:hover, .picker-menu button.on { background: var(--hover); }
.nav { flex: 1; overflow: auto; padding: 4px 12px 12px; }
.nav h6 { margin: 14px 8px 6px; font-size: 11px; font-weight: 500; color: var(--text-3); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r1); color: var(--text-2); font-weight: 500; }
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.on { background: var(--hover); color: var(--text); }
.nav a .count { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.nav a .count::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.me { display: flex; align-items: center; gap: 10px; margin: 10px 12px 14px; padding: 10px; border-top: 1px solid var(--line); }
.me .avatar { width: 32px; height: 32px; border-radius: 50%; }
.me div { flex: 1; min-width: 0; }
.me b { display: block; font-weight: 600; }
.me span { font-size: 12px; color: var(--text-3); }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r1); color: var(--text-2); }
.icon-btn:hover { background: var(--hover); color: var(--text); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 24px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.crumbs { display: flex; gap: 8px; color: var(--text-3); font-size: 13px; }
.crumbs b { color: var(--text); font-weight: 500; }
.search { margin-left: auto; position: relative; width: 340px; }
.search input { width: 100%; height: 34px; padding: 0 70px 0 34px; border: 1px solid var(--line); border-radius: var(--r1); background: var(--panel); outline: none; }
.search input:focus { border-color: var(--gold); }
.search .i { position: absolute; left: 10px; top: 9px; color: var(--text-3); }
.search kbd { position: absolute; right: 8px; top: 7px; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 5px; font-size: 11px; color: var(--text-3); font-family: var(--body); }
.search-res { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0; padding: 6px; border: 1px solid var(--line-2); border-radius: var(--r2); background: #141414; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); }
.search-res h6 { margin: 6px 8px; font-size: 11px; color: var(--text-3); font-weight: 500; }
.search-res button { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 8px; border-radius: var(--r1); text-align: left; }
.search-res button:hover { background: var(--hover); }
.search-res span { color: var(--text-3); font-size: 12px; }
.live-pill { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); }
.live-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52, 199, 89, .6); animation: ping 1.8s infinite; }
.live-pill.off::before { background: var(--text-3); animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, .55); } 80%, 100% { box-shadow: 0 0 0 7px rgba(52, 199, 89, 0); } }

.content { flex: 1; overflow: auto; padding: 32px 32px 48px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1 { font-family: var(--title); font-size: 40px; font-weight: 600; letter-spacing: -.01em; line-height: 1.05; }
.page-head p { margin-top: 6px; color: var(--text-3); }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { padding: 0 0 10px; color: var(--text-3); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); border-bottom-color: var(--gold); }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--r1); background: var(--panel); }
.seg button { padding: 5px 12px; border-radius: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.seg button.on { background: var(--hover); color: var(--text); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r1); border: 1px solid var(--line-2); background: var(--panel); font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #17120a; }
.btn.gold:hover { background: var(--gold-light); }
.btn.red { border-color: rgba(255, 69, 58, .45); color: #ff8a82; }
.btn.red:hover { background: rgba(255, 69, 58, .12); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.tag-demo { padding: 6px 12px; border-radius: 999px; background: var(--gold-soft); border: 1px solid rgba(201, 162, 77, .35); color: var(--gold-light); font-size: 12px; font-weight: 500; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--r2); background: var(--panel); padding: 16px 18px; }
.card .k { color: var(--text-2); font-size: 13px; }
.card .v { margin-top: 6px; font-family: var(--title); font-size: 30px; font-weight: 600; letter-spacing: -.01em; }
.card .s { margin-top: 2px; font-size: 12px; color: var(--text-3); }
.card .v.red { color: #ff8a82; }
.card .v.gold { color: var(--gold-light); }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.box { border: 1px solid var(--line); border-radius: var(--r2); background: var(--panel); overflow: hidden; }
.box-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.box-head h3 { font-size: 14px; font-weight: 600; }
.box-body { padding: 16px 18px; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.input, .select, textarea.input { height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r1); background: #121212; outline: none; min-width: 0; }
textarea.input { height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus { border-color: var(--gold); }
.select { padding-right: 28px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #888 50%), linear-gradient(135deg, #888 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
.toolbar .input { width: 280px; }

table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; padding: 11px 16px; font-size: 12px; font-weight: 500; color: var(--text-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.t .muted { color: var(--text-3); }
.t .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--gold-light); }
.t .actions { text-align: right; white-space: nowrap; }
.t .clip { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 48px 20px; text-align: center; color: var(--text-3); }
.empty b { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; border: 1px solid transparent; white-space: nowrap; }
.badge.ban { background: rgba(255, 69, 58, .12); color: #ff8a82; border-color: rgba(255, 69, 58, .3); }
.badge.kick { background: rgba(255, 159, 10, .12); color: #ffbf5c; border-color: rgba(255, 159, 10, .3); }
.badge.log { background: rgba(255, 214, 10, .1); color: #ffe066; border-color: rgba(255, 214, 10, .25); }
.badge.admin { background: rgba(191, 90, 242, .12); color: #d9a3f7; border-color: rgba(191, 90, 242, .3); }
.badge.alert { background: rgba(255, 69, 58, .2); color: #ffb0aa; border-color: rgba(255, 69, 58, .45); }
.badge.connect { background: rgba(10, 132, 255, .12); color: #7cbcff; border-color: rgba(10, 132, 255, .3); }
.badge.ok { background: rgba(52, 199, 89, .12); color: #7ee29b; border-color: rgba(52, 199, 89, .3); }
.badge.off { background: var(--panel-2); color: var(--text-3); border-color: var(--line); }
.badge.wait { background: var(--gold-soft); color: var(--gold-light); border-color: rgba(201, 162, 77, .3); }
.thumb { width: 54px; height: 32px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line-2); cursor: zoom-in; display: block; }

.map-wrap { position: relative; height: calc(100vh - 230px); min-height: 460px; border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; background: #0e2a3d; }
.map-wrap.picking { cursor: crosshair; }
#map { position: absolute; inset: 0; background: #143d59; }
.leaflet-container { font-family: var(--body); background: #143d59; }
.leaflet-control-zoom a { background: #141414 !important; color: var(--text) !important; border-color: var(--line-2) !important; }
.leaflet-control-attribution { background: rgba(0, 0, 0, .55) !important; color: var(--text-2) !important; font-size: 11px; }
.leaflet-control-attribution a { color: var(--text-2) !important; }
.map-note { position: absolute; z-index: 500; left: 12px; bottom: 12px; padding: 6px 10px; border-radius: var(--r1); background: rgba(10, 10, 10, .78); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); pointer-events: none; }
.map-pick { position: absolute; z-index: 600; left: 50%; top: 14px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; padding: 8px 10px 8px 14px; border-radius: var(--r2); background: rgba(10, 10, 10, .9); border: 1px solid var(--gold); color: var(--gold-light); font-weight: 500; }
.pin { position: relative; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 2px solid #0a0a0a; box-shadow: 0 0 0 2px rgba(201, 162, 77, .55), 0 2px 8px rgba(0, 0, 0, .6); }
.pin.admin { background: var(--violet); box-shadow: 0 0 0 2px rgba(191, 90, 242, .55), 0 2px 8px rgba(0, 0, 0, .6); }
.pin.sus { background: var(--orange); box-shadow: 0 0 0 2px rgba(255, 159, 10, .6), 0 2px 8px rgba(0, 0, 0, .6); }
.pin.dead { background: #71717a; box-shadow: 0 0 0 2px rgba(113, 113, 122, .5); }
.pin.sel { transform: scale(1.35); box-shadow: 0 0 0 3px #fff, 0 2px 10px rgba(0, 0, 0, .7); }
.pin-label { position: absolute; left: 50%; bottom: 17px; transform: translateX(-50%); padding: 2px 7px; border-radius: 6px; background: rgba(10, 10, 10, .82); border: 1px solid var(--line-2); font-size: 11.5px; font-weight: 500; white-space: nowrap; color: var(--text); pointer-events: none; }
.pin-dir { position: absolute; left: 50%; top: 50%; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid #fff; transform-origin: 50% 13px; margin: -13px 0 0 -4px; opacity: .85; }
.lp-far .pin-label { display: none; }
.lp-far .pin:hover .pin-label, .lp-far .pin.sel .pin-label { display: block; }
.tp-target { width: 18px; height: 18px; border: 2px solid var(--gold-light); border-radius: 50%; background: rgba(201, 162, 77, .25); }

.drawer { position: absolute; z-index: 700; top: 12px; right: 12px; bottom: 12px; width: 330px; display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: var(--r2); background: rgba(14, 14, 14, .96); backdrop-filter: blur(6px); box-shadow: 0 20px 50px rgba(0, 0, 0, .55); overflow: hidden; }
.drawer-head { display: flex; gap: 12px; align-items: center; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); }
.drawer-head b { display: block; font-size: 15px; font-weight: 600; }
.drawer-head span { font-size: 12px; color: var(--text-3); }
.drawer-body { flex: 1; overflow: auto; padding: 12px 14px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.kv div { padding: 8px 10px; border-radius: var(--r1); background: var(--panel-2); }
.kv span { display: block; font-size: 11px; color: var(--text-3); }
.kv b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ids { margin-bottom: 14px; font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: var(--text-2); word-break: break-all; display: grid; gap: 4px; }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.act-grid .btn { justify-content: flex-start; height: 38px; }
.act-grid .wide { grid-column: span 2; }
.bar { height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--green); }
.bar i.armor { background: var(--blue); }

.modal-bg { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(0, 0, 0, .65); animation: fade .15s ease; padding: 16px; }
.modal { width: min(460px, 100%); border: 1px solid var(--line-2); border-radius: var(--r3); background: #121212; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.modal.wide { width: min(760px, 100%); }
.modal h3 { padding: 18px 20px 4px; font-family: var(--title); font-size: 20px; font-weight: 600; }
.modal .sub { padding: 0 20px; color: var(--text-3); }
.modal .body { padding: 16px 20px; display: grid; gap: 12px; }
.modal label { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }
.code { position: relative; padding: 12px 14px; border-radius: var(--r1); background: #0b0b0b; border: 1px solid var(--line); font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--gold-light); white-space: pre-wrap; word-break: break-all; }
.lightbox img { max-width: min(1200px, 92vw); max-height: 86vh; border-radius: var(--r2); border: 1px solid var(--line-2); display: block; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toasts { position: fixed; z-index: 2000; right: 18px; bottom: 18px; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 380px; padding: 11px 14px; border-radius: var(--r2); background: #151515; border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(0, 0, 0, .6); animation: fade .2s ease; }
.toast.err { border-color: rgba(255, 69, 58, .5); }
.toast.ok { border-color: rgba(52, 199, 89, .45); }

.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(circle at 30% 40%, rgba(201, 162, 77, .22), transparent 55%), #070707; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art img.swirl { position: absolute; width: 720px; right: -160px; bottom: -180px; opacity: .22; animation: spin 90s linear infinite; }
.auth-art h2 { position: relative; font-family: var(--title); font-size: 46px; font-weight: 600; line-height: 1.05; max-width: 520px; }
.auth-art p { position: relative; margin-top: 14px; color: var(--text-2); font-size: 16px; max-width: 460px; }
.auth-form { display: grid; place-items: center; padding: 40px; }
.auth-form form { width: min(380px, 100%); display: grid; gap: 14px; }
.auth-form h1 { font-family: var(--title); font-size: 28px; font-weight: 600; }
.auth-form .sub { color: var(--text-3); margin-top: -6px; }
.auth-form label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
.auth-form .input { height: 42px; }
.auth-form .btn { height: 44px; }
.err-line { color: #ff8a82; font-size: 13px; min-height: 18px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .search { width: 220px; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .side.open { display: flex; position: fixed; z-index: 900; inset: 0 30% 0 0; }
  .content { padding: 20px 16px 40px; }
  .page-head h1 { font-size: 30px; }
  .search { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .drawer { left: 12px; width: auto; top: auto; height: 60%; }
  .t th:nth-child(n+5), .t td:nth-child(n+5) { display: none; }
  .t td.actions, .t th.actions { display: table-cell; }
}

.pin.watched::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--gold-light); animation: ping 1.6s infinite; }
.lp-pop .leaflet-popup-content-wrapper { background: rgba(14, 14, 14, .97); color: var(--text); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); }
.lp-pop .leaflet-popup-tip { background: rgba(14, 14, 14, .97); border: 1px solid var(--line-2); }
.lp-pop .leaflet-popup-content { margin: 12px 14px; font-family: var(--body); }
.lp-pop a.leaflet-popup-close-button { color: var(--text-3); }
.quick { display: grid; gap: 8px; min-width: 250px; }
.quick-head b { font-size: 14px; }
.quick-head span { margin-left: 6px; color: var(--text-3); font-size: 12px; }
.quick-act { font-size: 12px; color: var(--text-2); }
.quick-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.quick-btns .btn { justify-content: flex-start; }
.sec-title { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.activity { display: grid; gap: 6px; margin-bottom: 12px; padding: 10px 12px; border-radius: var(--r1); background: var(--panel-2); }
.activity div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.activity span { color: var(--text-3); }
.activity b { text-align: right; font-weight: 600; }
.hist-row { display: flex; gap: 8px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.hist-row span span { color: var(--text-3); }
.viewer-bg { z-index: 1500; }
.viewer { width: min(1100px, 96vw); max-height: calc(100vh - 32px); display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: var(--r3); background: #0e0e0e; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.viewer-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.viewer-head .muted { color: var(--text-3); }
.viewer-screen { position: relative; flex: 1 1 auto; min-height: 200px; aspect-ratio: 16 / 9; max-height: calc(100vh - 160px); background: #050505; display: grid; place-items: center; overflow: hidden; }
.viewer-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.viewer-wait { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: var(--text-2); gap: 6px; }
.viewer-wait span { color: var(--text-3); font-size: 12px; }
.viewer-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-top: 1px solid var(--line); }
