:root {
  --bg: #0c0e13;
  --text: #f4f6fb;
  --muted: #a7b0c0;
  --card: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.14);
  --accent: #7eb6ff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(1200px 500px at 20% -10%, #1a2744, transparent), var(--bg);
  color: var(--text);
}
#app { min-height: 100%; padding: 18px 16px 120px; }
header { margin-bottom: 14px; }
#title { font-size: 22px; font-weight: 700; }
#subtitle { color: var(--muted); font-size: 13px; margin-top: 4px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
}
.streak-num { font-size: 64px; font-weight: 800; line-height: 1; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
button, .btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: #2f6fed;
  color: white;
  font-weight: 650;
  font-size: 15px;
}
button.ghost, .btn.ghost { background: rgba(255,255,255,0.08); color: var(--text); }
button.danger { background: #8d3141; }
button.full { width: 100%; }
input[type="checkbox"] { width: auto; margin: 0 6px 0 0; }
input, textarea, select {
  width: 100%;
  margin-top: 6px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}
textarea { min-height: 110px; resize: vertical; }
.list-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.tabs-grid { display: grid; gap: 6px; }
.tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
}
.tabbar button {
  background: transparent;
  color: var(--muted);
  border-radius: 18px;
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 650;
}
.tabbar button.active {
  background: rgba(255, 255, 255, 0.18);
  color: white;
}
.sheet {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  z-index: 5;
}
.sheet .panel {
  width: 100%;
  background: #151922;
  border-radius: 22px 22px 0 0;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
}
.hidden { display: none; }
.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  top: 16px;
  background: #11151d;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  z-index: 6;
}
.bubble {
  white-space: pre-wrap;
  background: #1d2b22;
  border-radius: 16px 16px 16px 4px;
  padding: 10px 12px;
  line-height: 1.35;
}
.captcha { width: 100%; border-radius: 12px; background: #111; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
a { color: var(--accent); }
.tg-spoiler { filter: blur(4px); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: rgba(255,255,255,0.04); border-radius: 14px; padding: 10px; }
.stat b { display: block; font-size: 20px; }
