:root {
  --bg: #0b0d12;
  --panel: #151922;
  --panel-2: #1d2330;
  --line: #2a3142;
  --text: #eef1f7;
  --muted: #8b94a7;
  --accent: #ff3d6e;
  --accent-2: #7b5cff;
  --ok: #2fd27a;
  --warn: #ffb648;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.4 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel-2); cursor: pointer; text-decoration: none; user-select: none; white-space: nowrap;
}
button:active, .btn:active { transform: scale(.97); }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.ghost { background: transparent; }
button.small { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
button.on { background: color-mix(in srgb, var(--accent) 22%, var(--panel-2)); border-color: var(--accent); }
button:disabled { opacity: .45; }

input[type=text], input[type=password], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2);
}
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=color] { width: 44px; height: 44px; border: none; background: none; padding: 0; }
label { color: var(--muted); font-size: 13px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.row { display: flex; gap: 8px; align-items: center; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 2px 8px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--ok); }
.dot.live { background: var(--accent); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

#toasts { position: fixed; left: 0; right: 0; bottom: 90px; display: grid; justify-items: center; gap: 6px; z-index: 100; pointer-events: none; }
.toast { background: #fff; color: #111; padding: 10px 16px; border-radius: 12px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: opacity .3s, transform .3s; }
.toast.hide { opacity: 0; transform: translateY(10px); }

.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; background: var(--panel); border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; max-height: 85dvh; overflow: auto; }
.sheet h3 { margin: 0 0 4px; }

.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login form { width: min(360px, 100%); display: grid; gap: 12px; }
.logo { font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.logo span { color: var(--accent); }

/* lists */
.list { display: grid; gap: 8px; }
.item { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.item .thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: contain; background: repeating-conic-gradient(#2a3142 0 25%, #1d2330 0 50%) 0 0/14px 14px; flex: none; }
.item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item.live { border-color: var(--accent); }

