:root {
  --accent: #0f766e;
  --text: #18212c;
  --muted: #5b6673;
  --border: #dfe5ea;
  --canvas: #f4f6f8;
  --danger: #b3261e;
  --radius: 12px;
}
body[data-service="skystream"] { --accent: #004EFF; }
* { box-sizing: border-box; letter-spacing: 0; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--canvas);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
button, input, a.button { font: inherit; }
button { cursor: pointer; }
.topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 24px; background: #fff; border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-left: 8px; }
.tabs button {
  border: 0; background: transparent; color: var(--muted);
  padding: 10px 14px; border-radius: 9px; min-height: 40px;
}
.tabs button:hover { background: var(--canvas); }
.tabs button[aria-current="true"] { background: var(--canvas); color: var(--text); font-weight: 600; }
#signout { margin-left: auto; }
.link { border: 0; background: transparent; color: var(--accent); padding: 8px 4px; min-height: 40px; }
.page { width: min(880px, 100%); margin: 0 auto; padding: 28px 20px 64px; }
.status { color: var(--muted); }
.gate, .card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.gate h1 { margin: 0 0 8px; font-size: 22px; }
.gate p { margin: 0 0 20px; color: var(--muted); }
.card + .card { margin-top: 16px; }
.card h2 { margin: 0 0 6px; font-size: 18px; }
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card p.hint { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; max-width: 420px; }
.field label { font-size: 13px; color: var(--muted); }
.field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border);
  border-radius: 9px; background: #fff; color: inherit;
}
.field input:focus-visible, button:focus-visible, a.button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 9px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 600;
}
.button.secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.button.danger { background: #fff; color: var(--danger); border: 1px solid #f0c9c4; }
.button:disabled { opacity: .6; cursor: default; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.error { color: var(--danger); background: #fdf0ee; border: 1px solid #f6d5d1; border-radius: 9px; padding: 10px 12px; margin: 0 0 14px; font-size: 13px; }
.notice { color: #14532d; background: #ecfdf3; border: 1px solid #bbf7d0; border-radius: 9px; padding: 10px 12px; margin: 0 0 14px; font-size: 13px; }
.avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--canvas); border: 1px solid var(--border); }
.avatar-fallback { display: grid; place-items: center; font-size: 26px; font-weight: 600; color: var(--accent); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.row .body { flex: 1; min-width: 0; }
.row .body p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--canvas); color: var(--muted); font-size: 12px; font-weight: 600; }
.badge.on { background: #ecfdf3; color: #14532d; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #18212c; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; max-width: 90vw;
}
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; gap: 10px; }
  .tabs { width: 100%; margin-left: 0; overflow-x: auto; }
  .tabs button { flex: 1 0 auto; }
  .page { padding: 20px 16px 48px; }
  #signout { margin-left: 0; }
}
