/* Colors, page basics, top bar, tabs, cards */

:root {
  --bg: #0a0b0f; --bg2: #101218; --card: #14161d; --card2: #1b1e27; --line: #232731; --line2: #313644;
  --text: #eef0f4; --text2: #babec9; --muted: #7f8593;
  --accent: #7cff4f; --warn: #ffb020; --bad: #ff4f5e; --blue: #4fa8ff; --violet: #a77bff;
  --r: 22px; --shadow: 0 12px 36px rgba(0,0,0,.32);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; scroll-padding-top: 80px; }   /* keeps focused / scrolled-to things out from under the sticky tab bar */
body {
  margin: 0; min-height: 100vh; color: var(--text); -webkit-font-smoothing: antialiased;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-variant-numeric: tabular-nums;
  background: radial-gradient(1000px 600px at 0% -10%, rgba(124,255,79,.08), transparent 60%),
              radial-gradient(900px 600px at 100% 0%, rgba(79,168,255,.08), transparent 60%), var(--bg);
  background-attachment: fixed;
}
button { font: inherit; color: inherit; }
input { font: inherit; color: var(--text); }
.app { max-width: 1080px; margin: 0 auto; padding: max(22px, calc(env(safe-area-inset-top) + 6px)) max(18px, env(safe-area-inset-right)) 48px max(18px, env(safe-area-inset-left)); }   /* safe-area: room for the iPhone status bar and notch */
.hint { color: var(--muted); font-size: 12.5px; }
.hint.warn { color: var(--bad); font-weight: 600; }
.mobonly { display: none; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; gap: 14px; }
.logo { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--card2); border: 1px solid var(--line2); box-shadow: 0 6px 22px rgba(0,0,0,.3); }
.logo img { width: 32px; height: 32px; display: block; }
.ttl h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.ttl p { margin: 1px 0 0; color: var(--muted); font-size: 13px; }
.live { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; background: var(--card); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(124,255,79,.6); } 70%, 100% { box-shadow: 0 0 0 7px rgba(124,255,79,0); } }
.iconbtn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer;
  display: grid; place-items: center; font-size: 16px; flex: none; transition: border-color .15s, transform .15s; }
@media (hover: hover) { .iconbtn:hover { border-color: var(--line2); transform: scale(1.06); } }

/* ---------- tabs: sticky on desktop, bottom bar on phones ---------- */
.tabs { position: sticky; top: 10px; z-index: 40; display: flex; gap: 4px; margin: 18px 0; padding: 5px;
  background: rgba(16,18,24,.84); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px; border: none; background: none;
  border-radius: 12px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; position: relative; transition: background .15s, color .15s; }
.tab svg { width: 18px; height: 18px; flex: none; }
@media (hover: hover) { .tab:hover { color: var(--text2); background: rgba(255,255,255,.03); } }
.tab[aria-selected="true"] { color: var(--text); background: var(--card2); box-shadow: inset 0 0 0 1px var(--line2); }
.tab[aria-selected="true"] svg { color: var(--accent); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #08120a; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.badge:empty { display: none; }

/* ---------- panels & cards ---------- */
.panel { display: none; }
.panel.on { display: block; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
.stack > * + * { margin-top: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; align-items: start; }
.chead { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 16px; }
.chead h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.linkbtn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 0; margin-top: 10px; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .linkbtn:hover { color: var(--text2); } }
